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

[BUG] Server doesn't start automatically #81

Closed
zek opened this issue Apr 15, 2022 · 6 comments
Closed

[BUG] Server doesn't start automatically #81

zek opened this issue Apr 15, 2022 · 6 comments

Comments

@zek
Copy link

zek commented Apr 15, 2022

Hello,

When I set networks by HETZNER_NETWORKS env variable, after the server created it doesn't start automatically.
I had to start it manually throught hetzner panel.

@JonasProgrammer
Copy link
Owner

Hi,

sorry for the inconvenience. This seems rather odd... building the network config should not affect the server creation whatsoever. The network IDs to be added are gathered beforehand and then given to the CreateServer call -- so given the order of operation, there should be no impact.
There is an optional flag indicating whether the server should be started or not, but it defaults to true and we never set it in the past.

Could you maybe try creating a server connected to an existing net with the official hcloud tool and see if it behaves differently? Right now I fail to see how the driver code would cause the behaviour you described, but perhaps I'm overlooking something.

@zek
Copy link
Author

zek commented Apr 15, 2022

Hey thanks for quick response,

hcloud server create  --name test --image "ubuntu-20.04" --type cx11 --network "my-network"

I tested it out and server started without any problem.

image

With docker-machine-driver-hetzner, I had to start it on hetzner panel

image

@JonasProgrammer
Copy link
Owner

Very strange indeed. I just tried with a fresh test project and for me everything works as expected (though I had to specify at least one network via command line argument instead of the environment variable due to an unrelated bug #37). It worked with both a single network provided via command line, as well as two -- one of which was provided via environment variable.

The only thing I could see in the cloud panel was that the server sometimes did take a little more time after creation, before it actually spun up... but still, it was like under a minute between creation and automatic start.

Anyways, as I'm currently out of ideas, I have just released 3.7.1 with updated dependencies. I was unable to reproduce the problem with neither a 3.7.0 build downloaded from GitHub nor my local 3.7.1 build. But maybe you can give it a shot so we can strike outdated library versions from the list of possible causes.

@zek
Copy link
Author

zek commented Apr 17, 2022

Thank you so much
I found the problem. I had networks definition both on env and argument. I removed the HETZNER_NETWORKS from the env.
Somehow they're colliding with each other.

@JonasProgrammer
Copy link
Owner

Glad you were able to figure it out. If it is indeed the same network being specified more than once that causes the issue, I think that is a bug on the API side of things. I'll do a few experiments tomorrow and if that indeed causes the issue and perhaps file a ticket with Hetzner.

@JonasProgrammer
Copy link
Owner

@zek Just to let you know, your suffering was not pointless; the underlying issue is fixed now. hetznercloud/hcloud-go#196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants