Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Info Log Message breaks usage with docker-machine driver #95

Closed
grieshaber opened this issue Sep 21, 2023 · 1 comment · Fixed by #96
Closed

Info Log Message breaks usage with docker-machine driver #95

grieshaber opened this issue Sep 21, 2023 · 1 comment · Fixed by #96
Assignees
Labels
bug Something isn't working

Comments

@grieshaber
Copy link

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:

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

Docker Machine Driver Ionos Cloud version:

v7.0.0

OS:

Ubuntu 22.04

How to Reproduce

Steps to reproduce the behavior:

  1. Install docker-machine
  2. Install ionos docker-machine driver
  3. Create machine
  4. run docker-machine url <name>

References

https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/helpers/docker/machine_command.go?ref_type=heads#L204

@grieshaber grieshaber added the bug Something isn't working label Sep 21, 2023
@grieshaber
Copy link
Author

for ref. #96

@avirtopeanu-ionos avirtopeanu-ionos linked a pull request Sep 22, 2023 that will close this issue
avirtopeanu-ionos added a commit that referenced this issue Sep 22, 2023
* fix: rm info log 'using IP x.x.x.x to connect'

* doc: update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants