Skip to content

Update golang.org/x/sys

Steve Xuereb requested to merge update-dep-golang-sys into master

What does this MR do?

Update the golang.org/x/sys package by removing the override constrain

Why was this MR needed?

For #3488 (closed) we need to update out github.com/docker/docker dependency, which depends on a new version of golang.org/x/sys or it won't compile.

Are there points in the code the reviewer needs to double check?

I have tested the following os, to see if the service installation still works.

Ubuntu 18.04

bash log
vagrant@ubuntu-bionic:/vagrant$ sudo ./gitlab-runner-linux-amd64 install -u root
Runtime platform                                    arch=amd64 os=linux pid=1554 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
vagrant@ubuntu-bionic:/vagrant$ sudo su -
root@ubuntu-bionic:~# systemctl status gitlab-runner
● gitlab-runner.service - GitLab Runner
   Loaded: loaded (/etc/systemd/system/gitlab-runner.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
root@ubuntu-bionic:~# cat /etc/systemd/system/gitlab-runner.service
[Unit]
Description=GitLab Runner
After=syslog.target network.target
ConditionFileIsExecutable=/vagrant/gitlab-runner-linux-amd64

[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/vagrant/gitlab-runner-linux-amd64 "run" "--working-directory" "/vagrant" "--config" "/etc/gitlab-runner/config.toml" "--service" "gitlab-runner" "--syslog" "--user" "root"





Restart=always
RestartSec=120

[Install]
WantedBy=multi-user.target

root@ubuntu-bionic:~# systectl start gitlab-runner

Command 'systectl' not found, did you mean:

  command 'systemctl' from deb systemd

Try: apt install <deb name>

root@ubuntu-bionic:~# systemctl start gitlab-runner
root@ubuntu-bionic:~# systemctl status gitlab-runner
● gitlab-runner.service - GitLab Runner
   Loaded: loaded (/etc/systemd/system/gitlab-runner.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-01-16 10:59:26 UTC; 3s ago
 Main PID: 1647 (gitlab-runner-l)
    Tasks: 8 (limit: 1152)
   CGroup: /system.slice/gitlab-runner.service
           └─1647 /vagrant/gitlab-runner-linux-amd64 run --working-directory /vagrant --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user root

Jan 16 10:59:26 ubuntu-bionic gitlab-runner-linux-amd64[1647]: Running in system-mode.
Jan 16 10:59:26 ubuntu-bionic gitlab-runner-linux-amd64[1647]:
Jan 16 10:59:26 ubuntu-bionic gitlab-runner[1647]: Running in system-mode.
Jan 16 10:59:26 ubuntu-bionic gitlab-runner[1647]:
Jan 16 10:59:26 ubuntu-bionic gitlab-runner[1647]: Configuration loaded                                builds=0
Jan 16 10:59:26 ubuntu-bionic gitlab-runner-linux-amd64[1647]: Configuration loaded                                builds=0
Jan 16 10:59:26 ubuntu-bionic gitlab-runner[1647]: Listen address not defined, metrics server disabled  builds=0
Jan 16 10:59:26 ubuntu-bionic gitlab-runner-linux-amd64[1647]: Listen address not defined, metrics server disabled  builds=0
Jan 16 10:59:26 ubuntu-bionic gitlab-runner-linux-amd64[1647]: Listen address not defined, session server disabled  builds=0
Jan 16 10:59:26 ubuntu-bionic gitlab-runner[1647]: Listen address not defined, session server disabled  builds=0

Centos 7

bash log
[root@localhost vagrant]# ./gitlab-runner-linux-amd64 install -u root
Runtime platform                                    arch=amd64 os=linux pid=2753 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
[root@localhost vagrant]# ./gitlab-runner-linux-amd64 status
Runtime platform                                    arch=amd64 os=linux pid=2787 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
gitlab-runner: Service is not running.
[root@localhost vagrant]# cat /etc/systemd/system/gitlab-runner.service
[Unit]
Description=GitLab Runner
After=syslog.target network.target
ConditionFileIsExecutable=/vagrant/gitlab-runner-linux-amd64

[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/vagrant/gitlab-runner-linux-amd64 "run" "--working-directory" "/vagrant" "--config" "/etc/gitlab-runner/config.toml" "--service" "gitlab-runner" "--syslog" "--user" "root"





Restart=always
RestartSec=120

[Install]
WantedBy=multi-user.target
[root@localhost vagrant]# ./gitlab-runner-linux-amd64 start
Runtime platform                                    arch=amd64 os=linux pid=2812 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
[root@localhost vagrant]# systemctl status gitlab-runner
● gitlab-runner.service - GitLab Runner
   Loaded: loaded (/etc/systemd/system/gitlab-runner.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-01-16 11:12:53 UTC; 15s ago
 Main PID: 2818 (gitlab-runner-l)
   CGroup: /system.slice/gitlab-runner.service
           └─2818 /vagrant/gitlab-runner-linux-amd64 run --working-directory /vagrant --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user root

Jan 16 11:12:53 localhost.localdomain gitlab-runner-linux-amd64[2818]: Running in system-mode.
Jan 16 11:12:53 localhost.localdomain gitlab-runner-linux-amd64[2818]:
Jan 16 11:12:53 localhost.localdomain gitlab-runner-linux-amd64[2818]: Configuration loaded                                builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner-linux-amd64[2818]: Listen address not defined, metrics server disabled  builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner-linux-amd64[2818]: Listen address not defined, session server disabled  builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Running in system-mode.
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]:
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Configuration loaded                                builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Listen address not defined, metrics server disabled  builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Listen address not defined, session server disabled  builds=0
[root@localhost vagrant]# ./gitlab-runner-linux-amd64 stop
Runtime platform                                    arch=amd64 os=linux pid=2825 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
[root@localhost vagrant]# systemctl status gitlab-runner
● gitlab-runner.service - GitLab Runner
   Loaded: loaded (/etc/systemd/system/gitlab-runner.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Wed 2019-01-16 11:13:16 UTC; 3s ago
  Process: 2818 ExecStart=/vagrant/gitlab-runner-linux-amd64 run --working-directory /vagrant --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user root (code=exited, status=0/SUCCESS)
 Main PID: 2818 (code=exited, status=0/SUCCESS)

Jan 16 11:12:53 localhost.localdomain gitlab-runner-linux-amd64[2818]: Listen address not defined, session server disabled  builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Running in system-mode.
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]:
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Configuration loaded                                builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Listen address not defined, metrics server disabled  builds=0
Jan 16 11:12:53 localhost.localdomain gitlab-runner[2818]: Listen address not defined, session server disabled  builds=0
Jan 16 11:13:16 localhost.localdomain systemd[1]: Stopping GitLab Runner...
Jan 16 11:13:16 localhost.localdomain systemd[1]: Stopped GitLab Runner.
Jan 16 11:13:16 localhost.localdomain gitlab-runner-linux-amd64[2818]: WARNING: Requested service stop: terminated         builds=0
Jan 16 11:13:16 localhost.localdomain gitlab-runner-linux-amd64[2818]: All workers stopped. Can exit now                   builds=0
[root@localhost vagrant]# ./gitlab-runner-linux-amd64 uninstall
Runtime platform                                    arch=amd64 os=linux pid=2833 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
[root@localhost vagrant]# cat /etc/systemd/system/gitlab-runner.service
cat: /etc/systemd/system/gitlab-runner.service: No such file or directory

Free BSD

bash log
root@freebsd:/vagrant # ./gitlab-runner install -u root
Runtime platform                                    arch=amd64 os=freebsd pid=908 revision=8d829975 version=11.6.1
WARNING: No service system detected. Some features may not work!
FATAL: Failed to install SimpleService: Not supported

Windows server 2019

Powershell logs
PS C:\vagrant> .\gitlab-runner-windows-amd64.exe install
Runtime platform                                    arch=amd64 os=windows pid=3412 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
PS C:\vagrant> .\gitlab-runner-windows-amd64.exe status
Runtime platform                                    arch=amd64 os=windows pid=3756 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
gitlab-runner: Service is not running.
PS C:\vagrant> .\gitlab-runner-windows-amd64.exe start
Runtime platform                                    arch=amd64 os=windows pid=3888 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
PS C:\vagrant> .\gitlab-runner-windows-amd64.exe s^C
PS C:\vagrant> Get-Service -Name "gitlab-runner"

Status   Name               DisplayName
------   ----               -----------
Running  gitlab-runner      gitlab-runner


PS C:\vagrant> .\gitlab-runner-windows-amd64.exe stop
Runtime platform                                    arch=amd64 os=windows pid=3784 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
PS C:\vagrant> Get-Service -Name "gitlab-runner"

Status   Name               DisplayName
------   ----               -----------
Stopped  gitlab-runner      gitlab-runner


PS C:\vagrant> .\gitlab-runner-windows-amd64.exe uninstall
Runtime platform                                    arch=amd64 os=windows pid=4068 revision=eba04eb0 version=11.8.0~beta.979.geba04eb0
PS C:\vagrant> Get-Service -Name "gitlab-runner"
Get-Service : Cannot find any service with service name 'gitlab-runner'.
At line:1 char:1
+ Get-Service -Name "gitlab-runner"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (gitlab-runner:String) [Get-Service], ServiceCommandException
    + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.GetServiceCommand

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

#3488 (closed)

Merge request reports