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

volumes: treat non-aliased devices as equivalent to aliased ones #114

Merged
merged 1 commit into from Sep 22, 2020

Conversation

@andir
Copy link
Member

@andir andir commented Sep 18, 2020

The AWS API provides us with some non-sensical device names that might
have nothing to do with reality. For some reason there is weird renaming
going on from the values that boto3 (the AWS API bindings) returns to us
to what we actually configure on the machine. Apparently nowadays some
volumes are not properly being mapped from AWS to NixOps. Amazon doesn't
appear to give much of a guarantee (or any) in terms of device names.
Accepting the "real" device name instead of the mapped device name gets
rid of issue #105. In an ideal world Amazon would be providing WWUIDs,
device paths or some other attribute that they can define with the block
device. Since that doesn't (seem to) exist we must live with this change
until someone comes up with a better solution.

@andir andir force-pushed the andir:treat-aliased-devices-the-same branch from c466a7f to 9147651 Sep 18, 2020
@grahamc
Copy link
Member

@grahamc grahamc commented Sep 18, 2020

This seems to fix nixops check but not nixops deploy for an r5.2xlarge, which still prints that it is reattaching the drive.

The AWS API provides us with some non-sensical device names that might
have nothing to do with reality. For some reason there is weird renaming
going on from the values that boto3 (the AWS API bindings) returns to us
to what we actually configure on the machine. Apparently nowadays some
volumes are not properly being mapped from AWS to NixOps. Amazon doesn't
appear to give much of a guarantee (or any) in terms of device names.
Accepting the "real" device name instead of the mapped device name gets
rid of issue #105. In an ideal world Amazon would be providing WWUIDs,
device paths or some other attribute that they can define with the block
device. Since that doesn't (seem to) exist we must live with this change
until someone comes up with a better solution.
@andir andir force-pushed the andir:treat-aliased-devices-the-same branch from 9147651 to 94265b4 Sep 21, 2020
@andir
Copy link
Member Author

@andir andir commented Sep 21, 2020

@grahamc please check again, I've added the same fix to the deploy code path.

@grahamc
Copy link
Member

@grahamc grahamc commented Sep 22, 2020

:shipit: looks good to me!

@grahamc grahamc merged commit 34307d3 into NixOS:master Sep 22, 2020
4 checks passed
4 checks passed
build
Details
black
Details
flake8
Details
mypy
Details
tewfik-ghariani added a commit to PsyanticY/nixops that referenced this pull request Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.