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

ec2: fix broken nixops check with NVMe #1075

Merged

Conversation

@amemni
Copy link
Contributor

commented Jan 8, 2019

I've noticed that nixops check is failing to recognize NVMe devices and shows them as un-attached all the time, then tries to re-attach them with each nixops deploy, here's an example:
nix-shell:~/src/nixops-unstable]$ nixops check -d XXXXX Machines state: +----------+--------+-----+-----------+----------+----------------+-------+---------------------------------------------------------------+ | Name | Exists | Up | Reachable | Disks OK | Load avg. | Units | Notes | +----------+--------+-----+-----------+----------+----------------+-------+---------------------------------------------------------------+ | data0 | Yes | Yes | Yes | No | 1.65 1.80 1.32 | | volume ‘vol-0e386094f39e6d82a’ not attached to ‘/dev/nvme1n1’ | | frontend | Yes | Yes | Yes | No | 0.12 0.18 0.17 | | volume ‘vol-0b2aa0f4d7be9434b’ not attached to ‘/dev/nvme1n1’ | +----------+--------+-----+-----------+----------+----------------+-------+---------------------------------------------------------------+ Non machines resources state: +---------+--------+ | Name | Exists | +---------+--------+ | keypair | Yes | | sg | Yes | | role | Yes | +---------+--------+
[nix-shell:~/src/nixops-unstable]$ nixops deploy -d XXXXX frontend> warning: device ‘/dev/nvme1n1’ was manually detached! data0...> warning: device ‘/dev/nvme1n1’ was manually detached! frontend> attaching volume ‘vol-0b2aa0f4d7be9434b’ as ‘/dev/nvme1n1’... data0...> attaching volume ‘vol-0e386094f39e6d82a’ as ‘/dev/nvme1n1’... building all machine configurations... ^Cerror: interrupted error: interrupted by the user ^[[A [nix-shell:~/src/nixops-unstable]$

Using the device_name_to_boto_expected() function, it seems working for both 5th generation (NVMe) and older generation disks as it translates both device names 'xvdX' and 'nvmeXnX' to 'sdX'.

@amemni amemni force-pushed the amemni:use_boto-expected-devices_nixops-check branch from 971c066 to 2a4d4ff Jan 8, 2019
@amemni amemni changed the title Use device_that_boto_expects in nixops check to avoid NVMes showing as un-attached ec2: fix broken nixops check with NVMe Jan 8, 2019
@amemni

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2019

@AmineChikhaoui AmineChikhaoui merged commit 555d25e into NixOS:master Jan 9, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
@amemni amemni deleted the amemni:use_boto-expected-devices_nixops-check branch Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.