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

Use device_that_boto_expects in nixops check to avoid NVMes showing as un-attached #1074

Closed

Conversation

amemni
Copy link
Contributor

@amemni amemni 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 closed this Jan 8, 2019
@amemni amemni reopened this Jan 8, 2019
@amemni amemni closed this Jan 8, 2019
@amemni amemni deleted the nixops-check_use_boto-expected-devices branch January 8, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants