I don't 100% understand the system, but we have an active and working postscript and postbootscript system. I found that focusing on the templates confused me and concentrating on what end I wanted and how to get there worked
In particular, these points helped me yesterday when I was fixing an install: - postscript happens at end of install - postbootscripts happen at the end of reboot after install /install/postscripts and (in our case) /install/postscripts/custom contain shell scripts that we want executed in the above two situations. We add and remove them as necessary from groups (generally). This is from tabdump postscripts: "xcatdefaults","syslog,remoteshell,syncfiles","otherpkgs",,"service","servicenode",,, "compute","confignetwork -s","custom/websockify",, "all","custom/disablerepos","custom/enableautofs,custom/configsssd,custom/pbsprosetup,custom/misc",, "katana","custom/disablerepos","custom/enableautofs,custom/configsssd,custom/pbsprosetup,custom/misc",, "gpu",,"custom/enableautofs,custom/configsssd,custom/pbsprosetup,custom/nvidia,custom/misc",, After an installation, I can go onto the new machine and see that each of the postscripts are mentioned in /xcatpost/mypostscript Overlapping groups has the effect you expect - both sets of scripts are run. Does that help at all? cheers L. On Tue, Nov 3, 2020, at 06:39, Thomas HUMMEL wrote: > Hello, > > I'm using xCAT 2.16 on CentOS 8.2 x86_64. > I mostly uses stateless nodes but also have a few stateful ones. I > installed the first batch of the latter using the standard method (which > basically comes to an xCAT wrapped kickstart install) and everything > works fine. > > Then, for some reason, I had to provide users a VMWare template of a > stateful node so they could just right click "New VM from this template" > to create a new node (some ansible runs afterwards). > > In order to to this, I just xCAT installed a new stateful node on a new > VM, then after minor cleanup (ssh keys, history, ...) convert it into a > template. > > For this second case I noticed that for VM's created after this template > the /opt/xcat/xcatinfo file would come with info from the initial VM > (the one which was used to create the template). Obviously I did not > cleaned enough for that matter. > > I know about postscripts and I've read the doc (I'm using them via > xcatpostinit1.service in the stateless case and through updatenode -P in > the stateful case) but it is still not quite clear to me what is > generated and what is downloaded or already present on the node. > > My understanding is that : > > it is ultmiately the /xcatpost/mypostscript which wraps and runs the > configured postscripts. > > It is dynamically generated from a (standard or customised ) > mypostscript.tmpl template located on the xCAT server > > Note: I'm not using precreatemypostscripts > > Client side, my understanding is that > > /opt/xcat/xcatinfo is generated and that, depending on if this is the > first REBOOT after install or not: > > - either /opt/xcat/xcatdsklpost > - or /opt/xcat/xcatinstallpost > > gets run. The latter itself patches and runs > > - /xcatpost/mypostscript.post > > Finally, it seems that the mypostscript is could be downloaded from the > server. > > Could you quicly explain/clarify the relation between all those objets ? > > - what is generated and is not (and thus can/must be remove in a general > purpose template) ? > -> server side > -> node side > > - what may exist or not on node's side depending on contexts > > - what is downloaded ? > > - in what general circumstances ? For instance I noticed > /xcatpost/mypostscript.post presence seems to depend on the REBOOT context. > > My goal, as you understand is to know what to remove in the template so > the VM's instanciated after it would have the correct info (NODE=, ...) > into the proper files. > > 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