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

Fixing merge conflicts in amazon-ec2-utils/pull/33 #36

Merged
merged 4 commits into from
Mar 7, 2024
Merged

Fixing merge conflicts in amazon-ec2-utils/pull/33 #36

merged 4 commits into from
Mar 7, 2024

Conversation

vigh-m
Copy link
Contributor

@vigh-m vigh-m commented Mar 6, 2024

Closes #28 by writing the error to stderr
Adds a changelog entry that was missed in #30
Fixes merge conflicts in #33

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@vigh-m vigh-m requested a review from nmeyerhans March 6, 2024 23:12
@vigh-m vigh-m self-assigned this Mar 6, 2024
@vigh-m
Copy link
Contributor Author

vigh-m commented Mar 7, 2024

Tested the behaviour on a Nitro Instance.

$ dnf info ec2-utils
Last metadata expiration check: 0:00:10 ago on Wed Mar  6 23:57:03 2024.
Installed Packages
History database cannot be created, using in-memory database instead: SQLite error on "/var/lib/dnf/history.sqlite": Open failed: unable to open database file
Name         : ec2-utils
Version      : 2.1.0
Release      : 1.amzn2023.0.1
Architecture : noarch
Size         : 20 k
Source       : ec2-utils-2.1.0-1.amzn2023.0.1.src.rpm
Repository   : @System
Summary      : A set of tools for running in EC2
URL          : https://github.com/aws/amazon-ec2-utils
License      : MIT
Description  : ec2-utils contains a set of utilities for running in ec2.

After attaching vol-016ecbc13fe7e4e95

$ ls -la /dev/disk/by-id/
total 0
drwxr-xr-x. 2 root root 680 Mar  7 00:18 .
drwxr-xr-x. 9 root root 180 Mar  7 00:16 ..
lrwxrwxrwx. 1 root root  13 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  13 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  15 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  13 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1-part128 -> ../../nvme0n1p128
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-part128 -> ../../nvme0n1p128
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1-part128 -> ../../nvme0n1p128
lrwxrwxrwx. 1 root root  13 Mar  7 00:18 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:18 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:18 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part128 -> ../../nvme0n1p128

After updating the package

$ dnf info amazon-ec2-utils
Amazon Linux 2023 repository                                                                             57 MB/s |  25 MB     00:00    
Amazon Linux 2023 Kernel Livepatch repository                                                           1.0 MB/s | 165 kB     00:00    
Installed Packages
Name         : amazon-ec2-utils
Version      : 2.2.0
Release      : 1.amzn2023
Architecture : noarch
Size         : 20 k
Source       : amazon-ec2-utils-2.2.0-1.amzn2023.src.rpm
Repository   : @System
From repo    : @commandline
Summary      : A set of tools for running in EC2
URL          : https://github.com/aws/amazon-ec2-utils
License      : MIT
Description  : amazon-ec2-utils contains a set of utilities for running in ec2.

Detaching and re-attaching the volume

$ ls -la /dev/disk/by-id/
total 0
drwxr-xr-x. 2 root root 680 Mar  7 00:41 .
drwxr-xr-x. 9 root root 180 Mar  7 00:16 ..
lrwxrwxrwx. 1 root root  13 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  13 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-ns-1-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  15 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  13 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-Amazon_Elastic_Block_Store_vol016ecbc13fe7e4e95_1-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-ns-1-part128 -> ../../nvme0n1p128
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812-part128 -> ../../nvme0n1p128
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-Amazon_Elastic_Block_Store_vol04652b39e5959d812_1-part128 -> ../../nvme0n1p128
lrwxrwxrwx. 1 root root  13 Mar  7 00:41 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 -> ../../nvme1n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:41 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1 -> ../../nvme1n1p1
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part14 -> ../../nvme1n1p14
lrwxrwxrwx. 1 root root  16 Mar  7 00:41 nvme-nvme.1d0f-766f6c3031366563626331336665376534653935-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part15 -> ../../nvme1n1p15
lrwxrwxrwx. 1 root root  13 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 -> ../../nvme0n1
lrwxrwxrwx. 1 root root  15 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1 -> ../../nvme0n1p1
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part127 -> ../../nvme0n1p127
lrwxrwxrwx. 1 root root  17 Mar  7 00:16 nvme-nvme.1d0f-766f6c3034363532623339653539353964383132-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part128 -> ../../nvme0n1p128

Symlinks are unchanged and setup correctly

@vigh-m vigh-m merged commit 09b53f2 into main Mar 7, 2024
1 check passed
@vigh-m vigh-m deleted the pr/33 branch March 7, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2-metadata writes error messages to stdout
3 participants