On 10/02/16 07:14, Thomas HUMMEL wrote:

> Hello,

Hi Thomas,

> I'm new to xcat but I've already played with it for some time and read
> the doc quite a few time as well.

Welcome!

> 1. rpm installed in the rootimg at the genimage stage :
> 
> Though it seems to work as expected, we've encountered messages like :

Those are quite harmless, we see the same building images too and it's
not (yet) caused us any issues.

> 2. the chain table
> 
> I try to avoid tabedit-ing xcat tables as much as possible and use the
> xcat (especially chdef) commands instead (I guess it's a good practice).

Certainly!

> However, I didn't find any way other than tabedit-ing the chain table to
> perform more than one action when deploying a node. As a matter of fact,
> I'm unable to state "do a runcmd=bmcsetup, then do a runimage=....tgz,
> then boot the osimage <image>" with a (single) nodeset command.
[...]
> Is there a better way to do that ?

Oh indeed - use the osimage system via provmethod attributes.

We set those on groups, so we do:

[root@snowy-m ~]# lsdef -t group compute -i provmethod
Object name: compute
    provmethod=rhel67_gpfs35027

You can then change those on the fly with:

chdef -t group provmethod=${NEWOSIMAGE}

to set that to a new value, then you can do "nodeset compute osimage"
and you're ready to reboot.

> 3. postscripts
> 
> a) I don't see the difference between postscripts and postbootscripts in
> the case of a stateless image deployment : am I right ? Both seem to be
> executed at the exact same stage of init.d

Umm, possibly. :-)

We also use postinstall scripts that run when building the osimage
itself - BUT YOU HAVE TO BE CAREFUL - they run outside of the chroot!

For instance:

[root@snowy-m ~]# lsdef -t osimage rhel67_gpfs35027 -i postinstall
Object name: rhel67_gpfs35027
    
postinstall=/install/postinstall/02-VLSCIsyncfiles.post,/install/postinstall/add-usr-local.post,/install/postinstall/munge.post,/install/postinstall/ldap.post,/install/postinstall/gpfs.post,/install/postinstall/slurm.post,/install/postinstall/tmpfs.post,/install/postinstall/haveged.post,/install/postinstall/irqbalance.post

Our skeleton script has a bunch of checks in it to try and avoid
doing nasty things to the management node.

--------------------------8< snip snip 8<--------------------------
#!/bin/bash

# WARNING: THIS RUNS ON THE MANAGEMENT NODE AND *NOT* IN A CHROOT!

# Basic sanity checks to try and prevent us clobbering things on the management 
node.

if [ "x${1}" = "x" ]; then
        echo "Was not passed the directory to run in as the first argument - 
aborting!"
        exit 1
fi

if [ \! -d ${1} ]; then
        echo "Argument ${1} was not a directory - aborting!"
        exit 1
fi

if [ $( echo ${1} | egrep -c "^/install/netboot/" ) -ne 1 ]; then
        echo "Directory does not live under /install/netboot - aborting!"
        exit 1
fi

# More checks and doing things after here please!
--------------------------8< snip snip 8<--------------------------


> b) my understanding is that any action that updatenode can perform
> (install packages, run scripts, sync files) is in fact implemented by a
> postscript.
> But as I tried to follow what the /opt/xcat/xcatdsklspost wrapper did, I
> came with the following questions :
> 
> - why does it seem to build twice the mypostscript launcher - at least
> in some code path (first calling getpostscript.awk, then just putting in
> it the run_ps code) ?

No ideas on that section sorry!

> - will postscripts be run by genimage or packimage (isn't it the way it
> install rpms ?) If yes, won't they be run twice (first by
> genimage/packimage, and then at boot init.d time of the stateless node) ?
> Does it make sense to run a postscript "in the image" ?
> Or maybe just a subset of all the postscripts are run at image
> generation/packing ?

No, they don't get run during genimage at all, that's what the postinstall
scripts are for in this case.

> On the other hand, unlike synclist or pkglist, postscripts are a
> propriety of the node object (as opposed to an osimage object
> propriety). So it wouldn't all the more make sense to run them at the
> image generation stage.

You can have postscripts in osimages as well:

[root@snowy-m ~]# lsdef -t osimage rhel67_gpfs35027 -i postscripts
Object name: rhel67_gpfs35027
    postscripts=confignics,enablekdump

> 4. overlapping groups
> 
> It seems to me that, if for some reason you've got 2 groups of nodes (at
> least in the same table - let's say chain for instance) with a non empty
> intersection, they'll be "flattened" for that node : For instance, if in
> chain nodex is a member of group1 (runcmd=bmcsetup) AND a member of
> group2 (osimage=<image>), it will end up, when deployed with bmc setup
> AND booted on <image> : is this correct ?

Not something I've tried here either, sorry!

> Thanks and sorry for the long post ;-)

Not a problem, welcome to the group!

All the best,
Chris
-- 
 Christopher Samuel        Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: [email protected] Phone: +61 (0)3 903 55545
 http://www.vlsci.org.au/      http://twitter.com/vlsci


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to