View on GitHub

warewulf3

Warewulf is a scalable systems management suite originally developed to manage large high-performance Linux clusters.

Stateful provisioning refers to provisioning a Warewulf VNFS directly to a node’s hard drive, after which it can be booted directly from the disk instead of via PXE.

Building the chroot and vnfs

The chroot generated by wwmkchroot currently cannot be used directly for stateful provisioning as it lacks a kernel and grub installation. This can be solved by modifying the wwmkchroot script, or by simply installing those packages into the chroot before bundling the vnfs:

yum --installroot=/var/chroots/rhel-7-stateful install kernel grub

Then re-import the vnfs with these changes:

sudo wwvnfs --chroot /var/chroots/rhel-7-stateful

Also, in older revisions of Warewulf, the default “excludes” list in /etc/warewulf/vnfs.conf excludes the grub files in /usr/share/grub. (Newer revisions do not have this problem.) Make sure that the “excludes” list will not remove any of the grub or kernel files.

Node configuration

In wwsh, set the following variables for the node you want to provision (using object modify -s … nodename where … are any of the options listed below):

bootloader=sda                                          # which disk to install grub to
diskpartition=sda                                       # which disks to partition
diskformat=sda1                                         # which partitions to format
filesystems=mountpoint=/:dev=sda1:type=ext4:size=20480  # specify the filesystem scheme, size=MB

(Note that these variables do not appear in node print . To view the current values, type object print nodename -p :all)

Currently supported filesystems are ext2, ext3, ext4, vfat, swap and tmpfs. When not set, filesystems=mountpoint=/:type=tmpfs. The filesystems variable can be used to set up more complex partitioning schemes as well.

Once the node has been provisioned statefully, Warewulf can be configured to not re-provision the node by setting bootlocal=EXIT. This will prevent the master from responding to PXE requests from this node until bootlocal is set back to NORMAL/UNDEF.

Note: In revision r1280 the ability to use size=fill was added. You should use this on the last entry. For example:

Warewulf> object modify -s FILESYSTEMS="mountpoint=/boot:dev=sda1:type=ext4:size=500,dev=sda2:type=swap:size=32768,mountpoint=/:dev=sda3:type=ext4:size=fill" node0000