Thanks for all you comments Jarrod!  The commit on github should solve the
issue moving forward!

However, I decided that manually adjusting the xcat-core (either manually
or by downloading a different version from git) would be too difficult to
track for the long term stability of our project. I used the following
custom osimage.partitionfile to do:
1. generate an "ignoredisk --drives=..." directive and then
2. echo an "%include /tmp/parititoning" directive to slurp in the standard
xcat partitioning output.
Since the partitionfile is an explicit key in the osimage definition, it
should be easily trackable and maintainable by any admin on the project.

For those curious, here's what my script looks like:

tmpfn=/tmp/partitionfile
(
#
# Find any non-OS disks we care about and ignore them
#
DATADRIVES=$( lsblk -lno name,label,partlabel,mountpoint \
  | awk '{name=$1; $1=""}; /zfs|dpool|qserv|data/ { gsub(
/[0-9]+/,"",name); printf("%s,", name) }' \
  | sed 's/,$//' )

# debug output, useful if anaconda has a problem
echo "DATADRIVES= $DATADRIVES" | sed -e 's/^/#/'

if [[ -n "$DATADRIVES" ]]; then
  echo "ignoredisk --drives=$DATADRIVES"
fi

#
# Pull in xCAT default partitioning
#
echo "%include /tmp/partitioning"

) > $tmpfn


On Fri, Oct 14, 2016 at 7:20 AM, Jarrod Johnson <jjohns...@lenovo.com>
wrote:

> First, I propose:
>
> https://github.com/xcat2/xcat-core/commit/e803d56405248e9bbab85890340507
> 3e8b501776
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_xcat2_xcat-2Dcore_commit_e803d56405248e9bbab858903405073e8b501776&d=DQMGaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=-r3BBEZ_WFjGy1MiB9K7dee6ctjdE3GaBxKaaAvaGcI&m=bT3WwmnLpj4mrMNvS33e5j88FmKsH3pVCjBEUwd1WMI&s=2r9HM3Og_RiCI4dpCdxHv_FQMMMab91HklsLuipTy4g&e=>
>
>
>
> That would be an adaptive approach.  Any kickstart directive can be
> slurped up through %include.
>
>
>
> This is what I would suggest.
>
>
> I’m not familiar with the partition directive.  I personally tend to favor
> just putting a copy of template in 
> /install/custom/install/rh/profilename.rhels7.tmpl
> if I have to customize.
>
>
>
> In your case, if it’s just about proper ignoredisk, I’d just do the above.
>
>
>
> Someone else can probably speak to why that look iterates through a
> plurality and then just pays attention to the last one.  I also see no
> evidence that anything but the last matters.
>
>
>
> *From:* Andrew Loftus [mailto:alof...@illinois.edu]
> *Sent:* Thursday, October 13, 2016 5:23 PM
> *To:* xCAT Users Mailing list
> *Subject:* Re: [xcat-user] kickstart wipes out partitions of all local
> disks
>
>
>
> In file:
>
> lib/perl/xCAT/Template.pm
>
> on line: 189
>
> it appears that a partition file (value) can effectively specify multiple
> files by separating the filenames with commas.
>
> However, the following foreach doesn't do anything with the multiple
> values except walk through them and keeps only the last value.
>
>
>
> Am I missing something?
>
>
>
> Is this perharps a hook for new functionality that is not yet finished?
>
>
>
> --Andy
>
>
>
>
>
> On Thu, Oct 13, 2016 at 3:13 PM, Andrew Loftus <alof...@illinois.edu>
> wrote:
>
> I think I figured out what's going on (and for posterity sake I will
> elaborate.) Anaconda never uses the provided kickstart directly, it always
> creates it's own kickstart file.  The kickstart provided by xCAT simply
> provides answer to Anaconda just like the interactive GUI or text install
> configurator would provide (I would guess that Anaconda doesn't even know
> how it got the answers, whether from kickstart or GUI or text
> configurator.)  Anaconda then runs any "%pre" sections, slurps in any
> "%include" files, and probably other stuff, then sanitizes all the data and
> creates the actual settings file it uses for the install, which is saved in
> /root/anaconda-ks.cfg.
>
>
>
> As Jarrod suggests, I simply need to get my own "ignoredisk --only-use"
> line into the kickstart so that Anaconda does not add it's own.  I tested
> by hardcoding the line directly in 
> "/opt/xcat/share/xcat/install/centos/compute.centos7.tmpl"
> and indeed Anaconda did not add it's own ignoredisk directive.  I do not
> want to hardcode the "sda" value, so would like to make it a little more
> dynamic.
>
>
>
> However, if I provide my own script to osimage.partitionfile, the default
> xcat partition script output is not included in the kickstart.
>
>
>
> In the simplest of terms, what I need is "ignoredisk --only-use=$instdisk"
> in
>
> /opt/xcat/share/xcat/install/scripts/pre.rh.rhels7
>
> Is there a way to access $instdisk in my own script?
>
>
>
> Or, is there a (clean) way to get both "%include /tmp/partitioning" AND
> "%include /tmp/partitionfile" in the xcat generated kickstart file?
>
> This latter idea would allow me to output something like "ignoredisk
> --drives=" for anything that should not be touched by the install.  Then
> everything else could work normally.
>
>
>
> On Thu, Oct 13, 2016 at 2:10 PM, Jarrod Johnson <jjohns...@lenovo.com>
> wrote:
>
> If you have a system to test, I would do ignoredisk –only-use=sda
>
>
>
> If explicit, it should use that over any calculated value.
>
>
>
> *From:* Andrew Loftus [mailto:alof...@illinois.edu]
> *Sent:* Thursday, October 13, 2016 1:10 PM
> *To:* xCAT Users Mailing list
> *Subject:* [xcat-user] kickstart wipes out partitions of all local disks
>
>
>
> xCAT Version 2.11.1
>
> Lenovo X 3550
>
> CentOS Linux release 7.2.1511 (Core)
>
>
>
> On a stateful install, both sda and sdb are wiped, even though the
> kickstart correctly identifies and paritions (and installs to) sda.  The
> /root/anaconda-ks.cfg file on the freshly installed node includes these
> lines:
>
>
>
> > ignoredisk --only-use=sda,sdb
>
> > zerombr
>
> > clearpart --all --initlabel
>
>
>
> which I suspect are the issue.
>
>
>
> However, I can't figure out how the "ignoredisk" line got in the kickstart
> or from where it came.  It have verified that it is not in any of the xCAT
> templates or "pre" scripts, nor is it in the xCAT generated
> /install/autoinst/<nodename> file.
>
>
>
> All xCAT settings relating to storage and partitioning are default.  The
> osimage does not have a custom partitioning script associated with it.
>
>
>
> Does anyone know where this comes from or how it gets put in there, or,
> more importantly, how to work around it or adjust it?
>
>
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to