From cec5fd2557ba7448aca59b88ad5e5fde623428d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Fri, 6 Nov 2026 15:32:09 -0300 Subject: [PATCH] docs(genimage): require the image lock for boot file publication --- docs/source/developers/guides/code/genimage_boot_files.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/developers/guides/code/genimage_boot_files.rst b/docs/source/developers/guides/code/genimage_boot_files.rst index 8c075d3947..1e72f84e94 100644 --- a/docs/source/developers/guides/code/genimage_boot_files.rst +++ b/docs/source/developers/guides/code/genimage_boot_files.rst @@ -11,6 +11,10 @@ image directory must always come from the same build. Rules ----- +#. Hold the image operation lock of the root image, + ``xCAT::Utils->acquire_lock_imageop``, also with ``--onlyinitrd``. The + rollback of a failed publication restores earlier files, so two runs on + the same image must not overlap. #. Build the boot files in a staging directory inside the image directory. Create it with ``File::Temp->newdir`` in the image directory, so that each file moves into place with a ``rename`` on the same file system. @@ -34,7 +38,8 @@ Scripts ``rh/genimage`` follows these rules. It is the ``genimage`` of RHEL, AlmaLinux, Rocky Linux, CentOS, Oracle Linux, Scientific Linux, Fedora and -openEuler. ``ubuntu/genimage`` also follows them. +openEuler. ``ubuntu/genimage`` follows them, except that it does not take +the image operation lock. The ``sles``, ``suse``, ``debian`` and ``fedora12`` scripts still write the kernel and the ramdisks directly into the image directory.