xcat-core
xcat-core copied to clipboard
RHEL 9.0 statelite support requires /etc/init.d directory to exist in the rootimg to work
On RHEL 9.0 we found we could not get statelite support to work.
xCAT version:
lsxcatd -v
Version 2.16.5 (git commit 94cc776a2f0229c313608207796fe91c68b50836, built Thu Oct 20 00:23:41 EDT 2022)
We followed the normal method for setting up statelite such as described here; https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/ppc64le/statelite/index.html
When we boot the image none of the statelite configuration seems to work.
We found the root cause is the /etc/init.d directory does not exist on RHEL 9 in the statelite rootimg directory. The genimage command for statelite relies on /etc/init.d directory existing in the disk-less image so it can copy the script it uses for bind mounts of persistent files/directories.
The /opt/xcat/share/xcat/netboot/rh/genimage script contains this code:
system("cp $cwd/../add-on/statelite/rc.statelite $rootimg_dir/etc/init.d/statelite");
system("cp $cwd/../add-on/statelite/rc.localdisk $rootimg_dir/etc/init.d/localdisk");
The xCAT code has to copy `/opt/xcat/share/xcat/netboot/add-on/statelite/rc.statelite into the root image directory but as the target directory does not exist it fails.
The short-term work-around is to add the initscripts rpm to the statelite osimage pkglist as installing this rpm creates the /etc/init.d directory.
Once this is done genimage is able to copy the rc.statelite file into the disk-less image and we found statelite was working fine after this.
Note: The long-term fix is to alter the RHEL genimage script to support a pure Linux systemd implementation. Considering that using the short-term fix may eventually be deprecated this needs to be considered as a separate enhancement request