After remove mypostscript and mypostscript.post,  if your process didn't
recreate those two files,
/xcatpost/getpostscript.awk  is the script to get mypostscript from MN.
maybe there is a way you can call this file on the CN to recreate.


Thanks,
Casandra Qiu

...................................................................
Casandra Hong Qiu
Phone: (845) 433-9291, t/l 293-9291
Office: Building 8, 3-B-04
cxh...@us.ibm.com





From:   Thomas HUMMEL <thomas.hum...@pasteur.fr>
To:     <xcat-user@lists.sourceforge.net>
Date:   11/03/2020 02:06 PM
Subject:        [EXTERNAL] Re: [xcat-user] Postscripts : generation/download
            workflow



I forgot: so, half blindly, my guess would be that, in the VMWare
template I should/could :

- remove /xcatpost/mypostscript
- remove /xcatpost/mypostscript.post
- have only the following lines in /opt/xcat/xcatinfo:

XCATSERVER=...
HTTPPORT=...
INSTALLDIR=...
REBOOT=yes

--
TH.

On 03/11/2020 19:48, Thomas HUMMEL wrote:
> Hello Cassandra,
>
> from what I've read in the scripts themselves and tested in debug mode,
> I came to the following partial conclusion:
>
> 1) postscripts
>
> - postscripts : ran in post-install
> - postbootscripts : ran at the first reboot after install
>
> They're run via a wrapper called mypostscript, which basically consists
> of 3 parts:
>
>      1. var, function definitions, lib sourcing
>      2. a section running postscripts (# postscripts-start-here / #
> postscripts-end-here delimited)
>      3. a section running postbootscripts (# postbootscripts-start-here
> / # postbootscripts-end-here delimited)
>
> 2) /xcatpost/ dir (on CN)
>
> this directory holds:
>
>     - a copy of MN's /install/postscripts dir (downloaded)
>     - pre-created mypostscript.<node> if it exists (later renamed into
> mypostscript)
>     - the mypostcript file, which is locally reassembled by:
>           - include (here doc/echo + redirect) of part 1.
>           - download (via curl or awk script) + patch of parts 2 and 3
>       in the stateful node install case, this is done by an xCAT
> kickstart postinstall script (post.xcat.ng which ultimately runs it)
>
>      - this later postinstall script also creates:
>          - xcatpostinit1.service unit file
>          - xcatpostinit1 ExecStart command
>          - xcatinstallpost (used to run postbootscript only ?)
>          - xcatdsklspost : general purpose script used in many different
> contexts (like an updatenode -P for instance)
>
>       - /opt/xcat/xcatinfo file which is either read or written by above
> scripts
>
> My understanding is that the /opt/xcat/xcatinfo file must at least have
> XCATSERVER, INSTALLDIR, HTTPPORT for xcatpostini1.service to work
>
> It also seems to me that after first boot, some script (which one ?)
> writes REBOOT=yes into it in order not to run postbootscripts again
> after a new reboot ?
>
> Am I correct ?
>
> What's still unclear to me (the logic is hard to follow and not
> everything is shown even in debug mode) is:
>
> in what case (conceptually, not in the code) is xcatinstallpost vs
> xcatdsklspost called ?
>
> xcatdsklspost seems to be only for diskless nodes but I don't see why it
> would not be called on a statefull node as well (for an updatenode -P
> for instance).
>
> I mean all three scripts :
>
>
> - /opt/xcat/share/xcat/install/scripts/post.xcat.ng called from kickstart
> - xcatdsklpost
> - xcatinstallpost
>
> seems to do similar tasks, basically consisting in (re)constructing a
> mypostscript file and running it
>
> It is not clear what writes what and when into /opt/xcat/xcatinfo
>
> Finally, my understanding is that /xcatpost/mypostscript.post is a
> copy/backup (done by post.xcat.ng) of the postscripts (#
> postscripts-start-here section):
>
> - what is it used for ?
> - why does an updatenode -P seems to remove it ?
>
> Last thing : post.xcat.ng seems to call postbootscripts "prebootscripts"
> and postscript "postbootscripts" (which adds to the confusion) : am I
> correct ?
>
> Thanks for your help
>
> --
> Thomas HUMMEL
>
>
>
>
>
>
> On 03/11/2020 11:07, Thomas HUMMEL wrote:
>>
>>
>> On 03/11/2020 03:09, Casandra H Qiu wrote:
>>> Have you check this link:
>>
>> Hello, thanks for your answer. Yes I did read it.
>>
>>> after "rinstall" command , you can run command "xcatprobe osdeploy -n
>>> <nodename>" to probe operating system provision process.
>>> The output will show from begin of provision process until end of
>>> node installation completion. set attribute "xcatdebugmode=1" on the
>>> site table will show more of debug information.
>>
>> I'll try this
>>
>>
>>> when you deploy the VM template, How did u change the network setting?
>>
>> The template has an NetworkManager auto (dhcp) profile but the node
>> xCAT object has been created beforehand with the correct MAC address
>> (of the VM instanciated from the template). Then a role in the ansible
>> playbook which is run to further configure the VM runs updatenode -P
>> <node> "confignetwork -s" to "statify" the (already correct) ip address.
>>
>>   I
>>> think /opt/xcat/xcatinfo just capture some information for the CN.
>>> Don't think will use them during the provision.
>>
>> I'll check all of this. Can you tell me what
>> /xcatpost/mypostscript.post is ? Is just for the
>> REBOOT/postbootscripts case ?
>>
>> Basically, what I want to know is this :
>>
>> all those generated or patched scripts on the CN hold some node's info
>> (node's name, ...) : what is the source of this info (local or from
>> the node object definition on the MN ?) and in what file can it be
>> safely removed (in order not to have the template info which will be
>> incorrect on the VM) ?
>>
>> 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



_______________________________________________
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