You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Gitlab-Runner with docker-machine executor and the ionoscloud docker-machine driver as the provider, the usage of created machines will break.
The gitlab-runner calls the getURL Method (https://github.com/ionos-cloud/docker-machine-driver/blob/master/ionoscloud.go#L1004), which then calls getIP - within the getIP Method, a info log message is created (Using IP x.x.x.x to connect). The calling function in gitlab-runner parses the complete stdout, which is produced by the called function - including the info log message.
This results in a corrupt docker host information:
tcp://x.x.x.x:2376\n(runner) Using IP x.x.x.x to connect)
.. leading to errors, when the runners tries to add the docker container on the remote vm.
Within the corresponding gitlab-runner code, it uses the plain go os/exec package, to run the following command
docker-machine url <name>
which returns the complete stdout as the result of the cmd invocation.
Expected behavior
I expect the getURL() method to return the correct host (tcp://x.x.x.x:2376) - nothing more, nothing less, so that the gitlab-runner is able to parse the stdout information as needed.
Environment
Go Version:
1.20.5
Docker Machine version:
docker-machine version 0.16.2-gitlab.22, build 0420c703
Description
When using Gitlab-Runner with docker-machine executor and the ionoscloud docker-machine driver as the provider, the usage of created machines will break.
The gitlab-runner calls the getURL Method (https://github.com/ionos-cloud/docker-machine-driver/blob/master/ionoscloud.go#L1004), which then calls getIP - within the getIP Method, a info log message is created (Using IP x.x.x.x to connect). The calling function in gitlab-runner parses the complete stdout, which is produced by the called function - including the info log message.
This results in a corrupt docker host information:
.. leading to errors, when the runners tries to add the docker container on the remote vm.
Within the corresponding gitlab-runner code, it uses the plain go os/exec package, to run the following command
which returns the complete stdout as the result of the cmd invocation.
Expected behavior
I expect the getURL() method to return the correct host (tcp://x.x.x.x:2376) - nothing more, nothing less, so that the gitlab-runner is able to parse the stdout information as needed.
Environment
Go Version:
Docker Machine version:
Docker Machine Driver Ionos Cloud version:
OS:
How to Reproduce
Steps to reproduce the behavior:
docker-machine url <name>
References
https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/helpers/docker/machine_command.go?ref_type=heads#L204
The text was updated successfully, but these errors were encountered: