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

multiple libvirt/qemu machines deployed locally leads to ssh connection fail race condition #554

Closed
NotBrianZach opened this issue Nov 22, 2016 · 1 comment

Comments

@NotBrianZach
Copy link
Contributor

NotBrianZach commented Nov 22, 2016

I'm trying to deploy locally on nixos using nixops and getting a random failure trying to connect to the qemu vms.
I have tried running nixops deploy with dev-shell of a fork of the most recent nixops (as of this moment), same result (as the earlier nixops v 1.4).

Warning: Permanently added '192.168.122.38' (ED25519) to the list of known hosts.
postgresqlServer> setting state version to 17.03
postgresqlServer> waiting for SSH...
Warning: Permanently added '192.168.122.201' (ED25519) to the list of known hosts.
Permission denied (publickey,password,keyboard-interactive).
apiServer.......> could not connect to ‘root@192.168.122.201’, retrying in 1 seconds...
Warning: Permanently added '192.168.122.156' (ED25519) to the list of known hosts.
Permission denied (publickey,password,keyboard-interactive).
renderServer....> could not connect to ‘root@192.168.122.156’, retrying in 1 seconds...

nixops info looks like this (though sometimes it's only one/none/three machines unknown)

+------------------+----------------------+----------+-------------+-----------------+
| Name             |        Status        | Type     | Resource Id | IP address      |
+------------------+----------------------+----------+-------------+-----------------+
| apiServer        | Unknown / Up-to-date | libvirtd |             | 192.168.122.201 |
| postgresqlServer |   Up / Up-to-date    | libvirtd |             | 192.168.122.38  |
| renderServer     | Unknown / Up-to-date | libvirtd |             | 192.168.122.156 |
+------------------+----------------------+----------+-------------+-----------------+

edit: still looking into this, I think it might be similar problem to https://github.com/NixOS/nixops/pull/364/files

@NotBrianZach
Copy link
Contributor Author

looks like maybe
https://github.com/NixOS/nixops/blob/master/nixops/backends/libvirtd.py#L87
could be culpable if there's multithreading involved, could get overridden perhaps?
currently trying to write a patch that passes env directly, see if that changes anything

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

1 participant