osuosl/ganeti-instance-image — pull request #4 by alexkiousis (2014-09-19 12:40:44+00:00)
Title: GRNET patches

Tried to create a different PR for each feature, but i've already commited them on the same branch. So it's easier to include them together.

The first 2 patches extend ganeti-instance-image's OS API to v20 and add support for basic osparams.

The first patch adds `img_format` and `img_id`. This allows specifing the os of the image during instance creation. These parameters are required. The original commit were made by `Constantinos Venetsanopoulos ` on 05-2011. The verify script is new.

The second commit adds support for a second osparam (`img_ssh_key_url`) and a hook that injects it into the image (for the root user). This was made by `Apollon Oikonomopoulos ` on 06-2011. The img_ssh_key_url osparam is not required.

The third one was commited by `Nikos Skalkotos ` on 05-2011 with the following comment:
Forced filesystem relabeling in the initial boot of a Fedora image. This is needed by SELinux in recent Fedora releases, because in any other case, SELinux will consider files that were externally altered by gnt-instance-image scripts as being in a inconsistent state and will not permit the system to use them, causing a denial of service.

The forth one is a new hook that randomizes the generated system crontab. The reasoning is that we don't want all the vms on a node running their crons at the same time to avoid stressing the node. This was written by @fubvr.

The last one is by me. We wanted to centralize the images so we don't have to sync them to every cluster. So this is a feature that enables ganeti-instance-image to fetch a specified image from an HTTP URL. It introduces 4 new options IMAGE_URL, CACHE_DIR, IMG_VERIFY, IMG_CLEANUP and 2 new dependencies: `sha1sum` for image verification and `curl` for the downloading of the images.