In my experience, this potential critical section is rarely a problem.

> but in the [end_of_packimage,nodeset] interval I may have a
> (kernel+initrd) / rootimg.tar.gz mismatch, which may not be good if
> kernel has changed, correct ?
In practice, having a (kernel + initrd) / rootimg.tar.gz match does not usually 
cause problems,
but there is the possibility of an issue arising.

>Is my understanding correct and can you think about some way to prevent
>such a critical section ?
Your understanding is correct. Here are two approaches you can take to avoid 
problems:
1.) Usually the process of genimage/packimage/nodeset/reboot is being 
controlled directly by an administrator,
by taking care to not reboot a node while genimage/packimage/nodeset is 
running, any potential problems are avoided.

2.) Rather than rebuilding a single osimage, you can keep your existing image 
in place and work on a new image instead.
Once you have completed your testing on the new image, update your nodes to the 
new image by doing nodeset/reboot.

________________________________
From: Thomas HUMMEL <thomas.hum...@pasteur.fr>
Sent: Thursday, July 7, 2022 1:03 PM
To: xcat-user@lists.sourceforge.net <xcat-user@lists.sourceforge.net>
Subject: [EXTERNAL] [xcat-user] Stateless osimage atomic rebuild

Hello,

I'm using

     xCAT 2.16.4 on RHEL 8.4 x86_64 for stateless nodes provisionning

I have the following (naive) question about rebuilding from scratch an
osimage:

My understanding is the

a) genimage is copying
        <rootimgdir:>/initrd-stateless.gz
        and <rootimgdir:>/kernel
    from <rootimgir:>/rootimg (simple copy for kernel, chrooted dracut
for initrd) content

b) packimage is replacing (same inode)
        <rootimgdir:>/rootimg.tar.gz

c) nodeset is copying
        <rootimgdir:>/initrd-stateless.gz
        and <rootimgdir:>/kernel
    to /tftpboot/xcat/osimage/<image_name>/

My process is to insert an ansible playbook run to provision the
<rootimg:>/rootimg chroot between genimage and packimage

Doesn't this introduce a critical section when I rebuild the osimage
"from scratch", "from scratch" meaning

     0) rm -rf <rootimgdir:>/rootimg
     1) genimage + ansible-playbook + packimage

-> if some stateless node reboots while in this process, as long as
packimage has is still running, it will boot on the old image (which is
fine to me)

but in the [end_of_packimage,nodeset] interval I may have a
(kernel+initrd) / rootimg.tar.gz mismatch, which may not be good if
kernel has changed, correct ?

This seems to me to be the same even without my ansible-playbook step
Shouldn't the root fs be moved somewhere by nodeset as well instead of
being downloaded in the same place it is (re)generated ?

Is my understanding correct and can you think about some way to prevent
such a critical section ?



Thanks for your help

--
Thomas HUMMEL


_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to