With the release of a new generation of Spot Hibernation, this repo has entered legacy status
Please refer to the hibinit-agent repo now used for Spot Hibernation
Related Documentation:
- Instructions to enable Spot Hibernation | Link
The code is released under Apache License Vesion 2.0. See LICENSE.txt for details.
This agent does several things:
- Upon startup it checks for sufficient swap space to allow hibernate and fails if it's present but there's not enough of it.
- If there's no swap space, it creates it and launches a background thread to touch all of its blocks to make sure that EBS volumes are pre-warmed.
- It updates the offset of the swap file in the kernel using SNAPSHOT_SET_SWAP_AREA ioctl.
- It daemonizes and starts a polling thread to listen for instance termination notifications.
The code can be build using the usual Python setuptools:
python setup.py install
Additionally, you can build an sRPM package for CentOS/RedHat by running "make sources".