-
Notifications
You must be signed in to change notification settings - Fork 55
Using environment variables for setting Networks and Volumes #37
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
Comments
A good point to start would be to simply put bogus values into these variables. The names or ids of the corresponding components are simply put through to the corresponding retrieval functions of If this turns out to be the case, we have to dig deeper; using a custom-build version with some debug output is the easiest way to go then. I can help you with that, if you want. Aside from that, can you give us a little more insight on your environment? Judging from your Dockerfile it's |
Ok, it seems there is something strange going on. I've put bogus input into |
I've downloaded the prebuilt binaries for docker-machine and the Hetzner driver. My platform is Ubuntu 18.04 LTS (amd64) now. The following script...
produces the following output:
Although the specified volume and the network do not exist, no error is signaled. |
Mmh, that's strange. Given that you build it from source anyways, could you please try and add a log message before https://github.com/JonasProgrammer/docker-machine-driver-hetzner/blob/master/driver.go#L255 (and do the same before line 266) and print nameOrID? If there is no output for this, then the options are indeed not getting passed. Btw, have you tried if it works when you pass in the option via command line? |
Ok, I added Here is the result:
The arguments seem to be stuck somewhere. Then I've tried the following:
Result:
|
I did some debugging and this actually looks like a bug somewhere downstream in Given that it works for non-slice flags, I for now can just assume this is not our field. Do you have, by any chance, any out-of-tree machine driver that uses string slice flags as well? Would be interesting to see if the behaviour is the same there. |
Hmm, there is no driver I'm aware of. To be honest, I'm not a GO programmer, so tracking the issue down could become a bit tedious. |
Sorry to coming back to you only now. I just want to let you know I'm still on this, but don't hold your breath please. I still think this is an issue in I'll try and look into this in the weekend. |
Thank you very much for your engagement, Jonas! I think I can work around the issue by mapping the environment variables to docker-machine command line parameters. This circumvents the problem entirely and enables me to proceed. BTW: Your driver is a great piece of work and Hetzner Cloud is also my favorite :-) |
https://github.com/docker/machine/blob/a555e4f7a8f518a8b1b174824c377e46cbfc4fe2/commands/create.go#L371 That's your problem right there. The flag is not even considered, if it's not set by the command line. Kinda useless to then even provide Basically, this confirms what I already guessed: It's a problem of EDIT: I'll still leave this open, just in case
Thanks, but aside from building the initial implementation in the beta times I don't do as much; @mxschmitt is the person carrying this. Heck, this guy fixed the #38 before I had finished typing the answer... |
Then the laurels go to you too, @mxschmitt. Good work and many thanks for the driver :-) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi guys! @JonasProgrammer @ravenpride ... I want to make a suggestion for an additional parameter and functionality. HETZNER_TYPE=test_net # - network selection
HETZNER_TYPE_MASK='10.0.3.0/24' # - subnet selection by mask. Explanations: Therefore, either you need to first create a dedicated network, a balancer, and dance with a tambourine ... Or we can determine exactly which subnet the new node should be patched to. I tried it differently, took out the created clusters in the subnet, but as it turned out, hetzner randomly issues IP and subnet wounds for one cluster, conditionally for each call to get a node, a new IP from a random subnet. I hope we will can use your plugin for Rancher with new feature ((manual or selecting subnetwork). |
At the moment I'm working on a project that builds a docker image providing an auto-scaling gitlab-runner connected to docker-machine and your driver for Hetzner Cloud. The docker container pulls its settings from environment variables, so I set the variables
HETZNER_VOLUMES
andHETZNER_NETWORKS
to configure bound volumes and connected private networks at Hetzner, but I could not get it working. The variables seem to be ignored.Is there anything I can do to track the issue down?
Thank you in advance!
The text was updated successfully, but these errors were encountered: