Comment 5 for bug 2013336

Revision history for this message
Alberto Contreras (aciba) wrote (last edit ):

It looks like AWS EC2 has disabled the ability to request spot instances with the interruption behavior set as 'hibernate'.
I have tried to reproduce it in multiple regions and with multiple valid instance types and I consistently get the following error:

```
launchSpecTemporarilyBlacklisted Repeated errors have occurred processing the launch specification "t3.micro, ami-08d931621368a5861, Linux/UNIX, eu-west-3a while launching spot instance". It will not be retried for at least 13 minutes. Error message: The request with instanceType 't3.micro' and Linux/UNIX is not supported when instanceInterruptionBehavior is set to 'hibernate'. (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Proxy: null)
```

I have been able to reproduce and verify that the hibernation works and that this bug is fixed simulating the workflow on normal instance with focal, jammy and kinetic:

apt purge ec2-hibinit-agent
apt-get update
apt-get upgrade -y

cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF

apt-get update
apt-get install -y hibagent
apt-cache policy hibagent
systemctl is-active hibagent.target || /usr/bin/enable-ec2-spot-hibernation

# Verify no errors
systemctl status hibagent
journalctl -u hibagent

systemctl hibernate

# Start the instance and verify the hibernation resuming was okay
systemctl status hibinit-agent
journalctl --reverse