I went ahead and tested the proposed package for Lunar/Kinetic/Jammy/Focal. The results are good. The testing steps are very similar for all releases so I'll make a single comment and highlight the small changes between them.
I tested the following packages:
Lunar - 1.0.0-0ubuntu13.2
Kinetic - 1.0.0-0ubuntu12.2
Jammy - 1.0.0-0ubuntu11.22.04.3
Focal - 1.0.0-0ubuntu9.4
3) update to proposed package
$ echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe" | sudo tee /etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
$ sudo apt update -y && sudo apt upgrade -y
4) test proposed package
# For Lunar I had to specify the version like so:
# sudo apt install ec2-hibinit-agent=1.0.0-0ubuntu13.2
$ file /\"/var/lib/hibinit-agent\"/
/"/var/lib/hibinit-agent"/: cannot open `/"/var/lib/hibinit-agent"/' (No such file or directory)
In addition to this, I tested the hibernation functionality of the utility to ensure no regressions.
1) Create a program to run continuously and run it
/bin/cat <<EOM >~/allocate_mem.py
#!/usr/bin/python3
import time
# Enter indefinite loop
while True:
time.sleep(1) # Wait for 1 second
# The script will never reach this point
EOM
python3 ~/allocate_mem.py &
2) hibernate instance, and then resume instance
3) check for process still running
$ ps aux | grep allocate_mem | grep -v grep
ubuntu 2151 0.1 22.1 220644 210992 ? S 20:08 0:00 python3 /home/ubuntu/allocate_mem.py
I went ahead and tested the proposed package for Lunar/Kinetic/ Jammy/Focal. The results are good. The testing steps are very similar for all releases so I'll make a single comment and highlight the small changes between them.
I tested the following packages: .22.04. 3
Lunar - 1.0.0-0ubuntu13.2
Kinetic - 1.0.0-0ubuntu12.2
Jammy - 1.0.0-0ubuntu11
Focal - 1.0.0-0ubuntu9.4
1) Create AWS instance like so: required" \ group-ids ${AWS_SECURITY_ GROUP} \ specifications 'ResourceType= instance, Tags=[{ Key=Name, Value=test- hibinit- ${RELEASE} }]' \ device- mappings '[{"DeviceName" :"/dev/ sda1"," Ebs":{" Encrypted" :true," DeleteOnTermina tion":true, "VolumeSize" :8,"VolumeType" :"gp2"} }]' \ options 'Configured=true'
aws ec2 run-instances \
--region ${AWS_REGION} \
--image-id ${AWS_AMI} \
--count 1 \
--instance-type t3.micro \
--key-name ${AWS_KEY} \
--metadata-options "HttpTokens=
--security-
--tag-
--block-
--hibernation-
Following AMIs were used: 095495524a76a48 7a lunar" 070f3a579ee524c c4 kinetic" 086178f8d4f1d44 a2 jammy" 00ab811808de193 f8 focal"
images=(
"ami-
"ami-
"ami-
"ami-
)
2) ssh to system & update lib/hibinit- agent\" / lib/hibinit- agent"/ : directory
$ sudo apt update -y && sudo apt upgrade -y
...
$ file /\"/var/
/"/var/
3) update to proposed package archive. ubuntu. com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe" | sudo tee /etc/apt/ sources. list.d/ ubuntu- $(lsb_release -cs)-proposed.list
$ echo "deb http://
$ sudo apt update -y && sudo apt upgrade -y
4) test proposed package agent=1. 0.0-0ubuntu13. 2 lib/hibinit- agent\" / lib/hibinit- agent"/ : cannot open `/"/var/ lib/hibinit- agent"/ ' (No such file or directory)
# For Lunar I had to specify the version like so:
# sudo apt install ec2-hibinit-
$ file /\"/var/
/"/var/
In addition to this, I tested the hibernation functionality of the utility to ensure no regressions.
1) Create a program to run continuously and run it
/bin/cat <<EOM >~/allocate_mem.py
#!/usr/bin/python3
import time
# Allocate 200MB chunk of memory
size = 200 * 1024 * 1024 # 200MB
memory_chunk = bytearray(size)
print("Allocated 200MB of memory.")
# Enter indefinite loop
while True:
time.sleep(1) # Wait for 1 second
# The script will never reach this point allocate_ mem.py
EOM
python3 ~/allocate_mem.py &
2) hibernate instance, and then resume instance
3) check for process still running
$ ps aux | grep allocate_mem | grep -v grep
ubuntu 2151 0.1 22.1 220644 210992 ? S 20:08 0:00 python3 /home/ubuntu/