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-utils: init at 0.5.1, include in amazon-image profile #67347

Merged
merged 2 commits into from Nov 1, 2019

Conversation

thefloweringash
Copy link
Member

@thefloweringash thefloweringash commented Aug 23, 2019

Motivation for this change

Friendly device names on ec2 instances. This is the most "upstream" version I could find.

Note to reviewer: this package includes a handful of udev rules:

result/etc/udev/rules.d
├── 51-ec2-hvm-devices.rules
├── 52-ec2-vcpu.rules
├── 60-cdrom_id.rules
└── 70-ec2-nvme-devices.rules

I primarily want 70-ec2-nvme-devices.rules, but haven't thought carefully about the consequences of including the rest.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This sets up device mappings like /dev/xvda -> /dev/nvme0n1
@Mic92
Copy link
Member

Mic92 commented Nov 1, 2019

Scripts looks legit. Have you tested this?

@thefloweringash
Copy link
Member Author

I have done a minimal test of booting a t3a.nano AMI on this branch, with the change to register the root device as xvda, and verified the the symlink exists:

[root@ip-172-31-18-196:~]# ls -lh /dev/nvme0* /dev/xvda*
crw------- 1 root root 249, 0 Nov  1 20:47 /dev/nvme0
brw-rw---- 1 root disk 259, 0 Nov  1 20:47 /dev/nvme0n1
brw-rw---- 1 root disk 259, 2 Nov  1 20:47 /dev/nvme0n1p1
lrwxrwxrwx 1 root root      7 Nov  1 20:47 /dev/xvda -> nvme0n1
lrwxrwxrwx 1 root root      9 Nov  1 20:47 /dev/xvda1 -> nvme0n1p1

@Mic92 Mic92 merged commit b55a7a3 into NixOS:master Nov 1, 2019
@thefloweringash thefloweringash deleted the amazon-ec2-utils branch November 1, 2019 21:10
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