I've updated the find_device_for_file() function in /usr/bin/hibinit-
agent to:
def find_device_for_file(filename):
# Find the mount point for the swap file ('df -P /swap')
df_out = check_output(['df', '-P', filename]).decode('ascii')
dev_str = df_out.split("\n")[1].split()[0]
lsblk_out = check_output(['lsblk', '-dno', 'PARTUUID',
dev_str]).decode('ascii')
uuid_str = lsblk_out.strip()
return "PARTUUID=%s" % (uuid_str)
I've tested this on xenial and bionic. With xenial, I would see 2-3% failures
on certain instance types due to this issue. Now I see none.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1896638
Title:
Path to swapfile doesn't use a static device path
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ec2-hibinit-agent/+bug/1896638/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs