NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.87k stars 364 forks source link

`nixops check` reports wrong results #1446

Closed c4710n closed 1 year ago

c4710n commented 3 years ago

I am trying to check all my machines with nixops check, it reports:

+-----------+--------+-----+-----------+----------+----------------+-------+-------+
| Name      | Exists | Up  | Reachable | Disks OK | Load avg.      | Units | Notes |
+-----------+--------+-----+-----------+----------+----------------+-------+-------+
| alpha-0   | Yes    | Yes | Yes       | N/A      | 0.07 0.11 0.16 |       |       |
| popcorn-0 | Yes    | No  | N/A       | N/A      |                |       |       |
| popcorn-1 | Yes    | No  | N/A       | N/A      |                |       |       |
| pot-0     | Yes    | No  | N/A       | N/A      |                |       |       |
+-----------+--------+-----+-----------+----------+----------------+-------+-------+

3 of them are reported as 'not reachable' by nixops.

I have inspected the code at here: https://github.com/NixOS/nixops/blob/1ed5a091bc52de6c91319f446f833018a1cb326e/nixops/backends/__init__.py#L196

It seems that nixops just sends command through SSH and checks /proc/loadavg.

I have confirmed that all of these 4 machines can be reachable by nixops ssh.

Have no idea what's going on here. Can anybody help me?