-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
NixOps locks itself out when deploying to a node for the first time with --force-reboot
and the SSH key for provisioning isn't in the nixops configuration
#904
Comments
I'm seeing the same behavior here too. Using a configuration that has a secondary user which can be used to SSH in and inspect the post-deploy state, the public key for the root user is definitely inserted:
So it looks like this may be something on the nixops connection side. As a side note: in my environment only the second workaround above worked. Even when doing a live switch (no |
I ran into the same issue. I narrowed it down to this condition: https://github.com/NixOS/nixops/blob/master/nixops/backends/none.py#L82. As far as I can see the check for |
@selaux how did you debug this? |
I noticed that the ssh key is not written into the temporary directory during deployment, so it seemed that nixops was not using it. I looked into the state file where Not sure how this change will influence other things, but since |
I would definitely open a PR so it can be tested more easily :) |
So this is a bit weird, but...
--force-reboot
Workaround: don't --force-reboot the first deploy, or: add the provisioning ssh key to your ssh agent and do a regular deploy once
The text was updated successfully, but these errors were encountered: