agent fails if /boot/grub/menu.lst GRUB config file is not present
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hibagent (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Alberto Contreras | ||
Jammy |
Fix Released
|
Undecided
|
Alberto Contreras | ||
Kinetic |
Fix Released
|
Undecided
|
Alberto Contreras |
Bug Description
[ Impact ]
* This bug prevents the agent to correctly set up instances
for hibernation. It disallows AWS to hibernate spot instances.
[ Test Plan ]
* Spin up an EC2 spot instance with `hibernate` as `Interruption behavior` [1].
* Install the latest hibagent: `sudo apt-get install hibagent`
* Enable hibernation: `sudo /usr/bin/
* Create an AWS FIS experiment template to send a spot-instance-
Note: This step is optional, one can wait for AWS EC2 to send the interruption signal, but it could take a lot of time.
* After some minutes, EC2 will send a signal to resume the interrupted instance.
* Verify the instance has correctly been resumed from hibernation.
[1] https:/
[2] https:/
[ Where problems could occur ]
* On affected releases, hibagent modifies config files for both GRUB and
GRUB2. The upstream patch only modifies the GRUB config file if it is
present. Thus, if there is a regression it would affect releases with GRUB,
but we are going to include it in series that ship with GRUB2.
[ Other Info ]
* Bionic ships GRUB2 but the images contain the old and not needed
/boot/
to remove that file as that would constitute a breaking change for
an LTS. That's why this bug does not affect bionic.
[Original Description]
The agent fails to initialize the swap when /boot/grub/menu.lst is not present.
That file is related to GRUB and is not needed on systems with GRUB2 installed.
# /usr/bin/
# journalctl -u hibagent
...
Mar 30 10:51:10 ip-172-31-34-23 /hibagent[615]: Failed to initialize swap, reason: [Errno 2] No such file or directory: '/boot/
Mar 30 10:51:11 ip-172-31-34-23 /hibagent[615]: Background swap initialization thread is complete.
I expected the agent to not require config files of older grub versions to be present to correctly configure the system for hibernation.
Related branches
- Simon Chopin (community): Approve
-
Diff: 149 lines (+121/-0)4 files modifieddebian/changelog (+11/-0)
debian/patches/lp1896638-set-resume-device-by-partition-uuid.patch (+33/-0)
debian/patches/lp2013336-do-not-modify-GRUB-config-on-GRUB2-systems.patch (+75/-0)
debian/patches/series (+2/-0)
- Simon Chopin (community): Approve
-
Diff: 149 lines (+121/-0)4 files modifieddebian/changelog (+11/-0)
debian/patches/lp1896638-set-resume-device-by-partition-uuid.patch (+33/-0)
debian/patches/lp2013336-do-not-modify-GRUB-config-on-GRUB2-systems.patch (+75/-0)
debian/patches/series (+2/-0)
- Simon Chopin (community): Approve
-
Diff: 149 lines (+121/-0)4 files modifieddebian/changelog (+11/-0)
debian/patches/lp1896638-set-resume-device-by-partition-uuid.patch (+33/-0)
debian/patches/lp2013336-do-not-modify-GRUB-config-on-GRUB2-systems.patch (+75/-0)
debian/patches/series (+2/-0)
description: | updated |
Changed in hibagent (Ubuntu Kinetic): | |
assignee: | nobody → Alberto Contreras (aciba) |
Changed in hibagent (Ubuntu Jammy): | |
assignee: | nobody → Alberto Contreras (aciba) |
Changed in hibagent (Ubuntu Focal): | |
assignee: | nobody → Alberto Contreras (aciba) |
description: | updated |
description: | updated |
Changed in hibagent (Ubuntu Focal): | |
status: | New → In Progress |
Changed in hibagent (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in hibagent (Ubuntu Kinetic): | |
status: | New → In Progress |
tags: | added: verification-done |
This bug was fixed in lunar as the 1.0.1+git202302 16.9ac1209f7- 0ubuntu1 version made an upstream snapshot including https:/ /github. com/aws/ ec2-hibernate- linux-agent/ commit/ 0f995e803483acb f87ddb04c62960c 30e837afce
This was made to fix https:/ /bugs.launchpad .net/ubuntu/ +source/ ec2-hibinit- agent/+ bug/1896638 for lunar.