2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge branch 'master' of github.com:xcat2/xcat-core

This commit is contained in:
caomengmeng 2016-12-06 01:34:09 -05:00
commit c64212427a
39 changed files with 289 additions and 160 deletions

View File

@ -1 +1 @@
2.13
2.13.0

View File

@ -180,7 +180,7 @@ function setversionvars {
VER=`cat Version`
fi
XCATVER=$VER
export XCATVER
#export XCATVER
SHORTVER=`echo $VER|cut -d. -f 1,2`
SHORTSHORTVER=`echo $VER|cut -d. -f 1`
BUILD_TIME=`date`

View File

@ -0,0 +1,48 @@
.. _Using-Postinstallscript-label:
=========================
Using postinstall scripts
=========================
While running ``genimage`` to generate diskless or statelite osimage, you may want to customize the root image after the package installation step. The ``postinstall`` attribute of the osimage definition provides a hook to run user specified script(s), in non-chroot mode, against the directory specified by ``rootimgdir`` attribute.
xCAT ships a default ``postinstall`` script for the diskless/statelite osimages that must be executed to ensure a successful provisioning of the OS: ::
lsdef -t osimage -o rhels7.3-ppc64le-netboot-compute -i postinstall
Object name: rhels7.3-ppc64le-netboot-compute
postinstall=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall
Customizing the ``postinstall`` script, can be done by either one of the methods below:
* Append your own ``postinstall`` scripts ::
chdef -t osimage -o <osimage> -p postinstall=/install/custom/postinstall/rh7/mypostscript
* Create your own ``postinstall`` script based on the default ``postinstall`` script ::
cp /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall /install/custom/postinstall/rh7/mypostscript
# edit /install/custom/postinstall/rh7/mypostscript
chdef -t osimage -o <osimage> postinstall=/install/custom/postinstall/rh7/mypostscript
Common questions about the usage of ``postinstall`` scripts:
------------------------------------------------------------
When do ``postinstall`` scripts run?
````````````````````````````````````
High level flow of ``genimage`` process:
a) install the packages specified by ``pkglist`` into ``rootimgdir`` directory
b) cumstomize the ``rootimgdir`` directory
c) generate the initrd based on the ``rootimgdir`` directory
The ``postinstall`` scripts are executed in step b).
Do ``postinstall`` scripts execute in chroot mode under ``rootimgdir`` directory?
`````````````````````````````````````````````````````````````````````````````````
No. Unlike postscripts and postbootscripts, the ``postinstall`` scripts are run in non-chroot environment, directly on the management node. In the postinstall scripts, all the paths of the directories and files are based on ``/`` of the managememnt node. To reference inside the ``rootimgdir``, use the ``$IMG_ROOTIMGDIR`` environment variable, exported by ``genimage``.
What are some of the environment variables available to my customized ``postinstall`` scripts?
``````````````````````````````````````````````````````````````````````````````````````````````
Environment variables, available to be used in the ``postinstall`` scripts are listed in ``postinstall`` attribute section of :doc:`linuximage </guides/admin-guides/references/man5/linuximage.5>`

View File

@ -1,91 +1,66 @@
Configure RAID before Deploy OS
===============================
Configure RAID before deploying the OS
======================================
Overview
--------
This section describes how to use xCAT to deploy diskful nodes with RAID1 setup, and the procedure for RAID1 maintainence activities such as replacing a failed disk.
xCAT provides an user interface :doc:`linuximage.partitionfile </guides/admin-guides/references/man5/linuximage.5>` to specify the customized partition script for diskful provision, and provides some default partition scripts.
All the examples in this section are based on three configuration scenarios:
#. RHEL6 on a system p machine with two SCSI disks sda and sdb
#. RHEL6 on a system p machine with two SAS disks and multipath configuration.
#. SLES 11 SP1 on a system p machine with two SCSI disks sda and sdb
If you are not using the configuration scenarios listed above, you may need to modify some of the steps in this documentation to make it work in your environment.
Deploy Diskful Nodes with RAID1 Setup on RedHat
-----------------------------------------------
xCAT provides two sample kickstart template files with the RAID1 settings, ``/opt/xcat/share/xcat/install/rh/service.raid1.rhel6.ppc64.tmpl`` is for the configuration scenario **1** listed above and ``/opt/xcat/share/xcat/install/rh/service.raid1.multipath.rhel6.ppc64.tmpl`` is for the configuration scenario **2** listed above. You can customize the template file and put it under ``/install/custom/install/<platform>/`` if the default one does not match your requirements.
xCAT provides a partition script `raid1_rh.sh <https://raw.githubusercontent.com/xcat2/xcat-extensions/master/partition/raid1_rh.sh>`_ which configures RAID1 across 2 disks on RHEL 7.x operating systems.
Here is the RAID1 partitioning section in ``service.raid1.rhel6.ppc64.tmpl``: ::
In most scenarios, the sample partitioning script is sufficient to create a basic RAID1 across two disks and is provided as a sample to build upon.
#Full RAID 1 Sample
part None --fstype "PPC PReP Boot" --size 8 --ondisk sda --asprimary
part None --fstype "PPC PReP Boot" --size 8 --ondisk sdb --asprimary
1. Obtain the partition script: ::
part raid.01 --size 200 --fstype ext4 --ondisk sda
part raid.02 --size 200 --fstype ext4 --ondisk sdb
raid /boot --level 1 --device md0 raid.01 raid.02
mkdir -p /install/custom/partition/
wget https://raw.githubusercontent.com/xcat2/xcat-extensions/master/partition/raid1_rh.sh \
-O /install/custom/partition/raid1_rh.sh
part raid.11 --size 1024 --ondisk sda
part raid.12 --size 1024 --ondisk sdb
raid swap --level 1 --device md1 raid.11 raid.12
2. Associate the partition script to the osimage: ::
part raid.21 --size 1 --fstype ext4 --grow --ondisk sda
part raid.22 --size 1 --fstype ext4 --grow --ondisk sdb
raid / --level 1 --device md2 raid.21 raid.22
chdef -t osimage -o rhels7.3-ppc64le-install-compute \
partitionfile="s:/install/custom/partition/raid1_rh.sh"
Here is the RAID1 partitioning section in ``service.raid1.multipath.rhel6.ppc64.tmpl``: ::
3. Provision the node: ::
#Full RAID 1 Sample
part None --fstype "PPC PReP Boot" --size 8 --ondisk mpatha --asprimary
part None --fstype "PPC PReP Boot" --size 8 --ondisk mpathb --asprimary
rinstall cn1 osimage=rhels7.3-ppc64le-install-compute
After the diskful nodes are up and running, you can check the RAID1 settings with the following process:
part raid.01 --size 200 --fstype ext4 --ondisk mpatha
part raid.02 --size 200 --fstype ext4 --ondisk mpathb
raid /boot --level 1 --device md0 raid.01 raid.02
part raid.11 --size 1024 --ondisk mpatha
part raid.12 --size 1024 --ondisk mpathb
raid swap --level 1 --device md1 raid.11 raid.12
part raid.21 --size 1 --fstype ext4 --grow --ondisk mpatha
part raid.22 --size 1 --fstype ext4 --grow --ondisk mpathb
raid / --level 1 --device md2 raid.21 raid.22
The samples above created one PReP partition, one 200MB ``/boot`` partition and one ``/`` partition on ``sda/sdb`` and ``mpatha/mpathb``. If you want to use different partitioning scheme in your cluster, modify this RAID1 section in the kickstart template file accordingly.
After the diskful nodes are up and running, you can check the RAID1 settings with the following commands:
Mount command shows the ``/dev/mdx`` devices are mounted to various file systems, the ``/dev/mdx`` indicates that the RAID is being used on this node. ::
``mount`` command shows the ``/dev/mdx`` devices are mounted to various file systems, the ``/dev/mdx`` indicates that the RAID is being used on this node. ::
# mount
/dev/md2 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/md0 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
...
/dev/md1 on / type xfs (rw,relatime,attr2,inode64,noquota)
/dev/md0 on /boot type xfs (rw,relatime,attr2,inode64,noquota)
/dev/md2 on /var type xfs (rw,relatime,attr2,inode64,noquota)
The file ``/proc/mdstat`` includes the RAID devices status on the system, here is an example of ``/proc/mdstat`` in the non-multipath environment: ::
# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda5[0] sdb5[1]
19706812 blocks super 1.1 [2/2] [UU]
md2 : active raid1 sdk2[0] sdj2[1]
1047552 blocks super 1.2 [2/2] [UU]
resync=DELAYED
bitmap: 1/1 pages [64KB], 65536KB chunk
md1 : active raid1 sda2[0] sdb2[1]
1048568 blocks super 1.1 [2/2] [UU]
md0 : active raid1 sda3[0] sdb3[1]
204788 blocks super 1.0 [2/2] [UU]
md3 : active raid1 sdk3[0] sdj3[1]
1047552 blocks super 1.2 [2/2] [UU]
resync=DELAYED
md0 : active raid1 sdk5[0] sdj5[1]
524224 blocks super 1.0 [2/2] [UU]
bitmap: 0/1 pages [0KB], 65536KB chunk
md1 : active raid1 sdk6[0] sdj6[1]
973998080 blocks super 1.2 [2/2] [UU]
[==>..................] resync = 12.8% (125356224/973998080) finish=138.1min speed=102389K/sec
bitmap: 1/1 pages [64KB], 65536KB chunk
unused devices: <none>
On the system with multipath configuration, the ``/proc/mdstat`` looks like: ::

View File

@ -1 +0,0 @@
../../diskful/customize_image/pre_post_script.rst

View File

@ -0,0 +1,11 @@
Prescripts and Postscripts
==========================
.. toctree::
:maxdepth: 2
../../../common/deployment/prepostscripts/pre_script.rst
../../../common/deployment/prepostscripts/post_script.rst
../../../common/deployment/prepostscripts/postinstall_script.rst
../../../common/deployment/prepostscripts/suggestions.rst

View File

@ -33,9 +33,9 @@ SYNOPSIS
\ **xcattest**\ [\ **-c**\ \ *cmd list*\ ] [\ **-l**\ ]
\ **xcattest**\ [\ **-s**\ \ *command*\ ]
\ **xcattest**\ [\ **-s**\ \ **command**\ ]
\ **xcattest**\ [\ **-s**\ \ *bundle*\ ]
\ **xcattest**\ [\ **-s**\ \ **bundle**\ ]
***********
@ -62,13 +62,13 @@ OPTIONS
\ **-f**\ \ *configure file*\
Specifies the configuration file with full-path. xCAT supports an example config file: /opt/xcat/share/xcat/tools/autotest/linux.conf.template
Specifies the configuration file with full-path. xCAT supports an example config file: /opt/xcat/share/xcat/tools/autotest/linux.conf.template
\ **-b**\ \ *case bundle list*\
Comma separated list of test cases bundle files, each test cases bundle can contain multiple lines and each line for one test case name.
Comma separated list of test cases bundle files, each test cases bundle can contain multiple lines and each line for one test case name. The bundle files should be listed in: /opt/xcat/share/xcat/tools/autotest/bundle.
@ -89,9 +89,13 @@ Specifies the configuration file with full-path. xCAT supports an example config
Display the test cases names specified by the flag -b, -t or -c.
\ **-s**\
\ **-s**\
Display the bundle files and command with value: bundle or command.
************
RETURN VALUE
@ -160,7 +164,7 @@ EXAMPLES
.. code-block:: perl
xcattest -l > /opt/xcat/share/xcat/tools/autotest/bundle/custom.bundle
xcattest -c lsdef -l > /opt/xcat/share/xcat/tools/autotest/bundle/custom.bundle
Modify custom.bundle
xcattest -f /tmp/config -b custom.bundle
@ -169,7 +173,7 @@ EXAMPLES
3.
To run specified test cases with /tmp/config:
To run specified test cases with /tmp/config file:
.. code-block:: perl

View File

@ -92,17 +92,22 @@ linuximage Attributes:
\ **postinstall**\
Only supported in diskless image only. The fully qualified name of the scripts running in non-chroot mode after the package installation but before initrd generation during genimage. If multiple scripts are specified, they should be speperated with comma ",". A set of osimage attributes are exported as the environment variables to be used in the postinstall scripts:
IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"),
IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"),
IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"),
IMG_KERNELVERSION(the "kernelver" attribute of the osimage),
IMG_PROFILE(the profile of the osimage, such as "service","compute"),
IMG_PKGLIST(the "pkglist" attribute of the osimage),
IMG_PKGDIR(the "pkgdir" attribute of the osimage),
IMG_OTHERPKGLIST(the "otherpkglist" attribute of the osimage),
IMG_OTHERPKGDIR(the "otherpkgdir" attribute of the osimage),
IMG_ROOTIMGDIR(the "rootimgdir" attribute of the osimage)
Supported in diskless image only. The fully qualified name of the scripts running in non-chroot mode after the package installation but before initrd generation during genimage. If multiple scripts are specified, they should be seperated with comma ",". A set of osimage attributes are exported as the environment variables to be used in the postinstall scripts:
.. code-block:: perl
IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"),
IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"),
IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"),
IMG_KERNELVERSION(the "kernelver" attribute of the osimage),
IMG_PROFILE(the profile of the osimage, such as "service","compute"),
IMG_PKGLIST(the "pkglist" attribute of the osimage),
IMG_PKGDIR(the "pkgdir" attribute of the osimage),
IMG_OTHERPKGLIST(the "otherpkglist" attribute of the osimage),
IMG_OTHERPKGDIR(the "otherpkgdir" attribute of the osimage),
IMG_ROOTIMGDIR(the "rootimgdir" attribute of the osimage)
@ -168,13 +173,19 @@ linuximage Attributes:
\ **partitionfile**\
The path of the configuration file which will be used to partition the disk for the node. For stateful osimages,two types of files are supported: "<partition file absolute path>" which contains a partitioning definition that will be inserted directly into the generated autoinst configuration file and must be formatted for the corresponding OS installer (e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). "s:<partitioning script absolute path>" which specifies a shell script that will be run from the OS installer configuration file %pre section; the script must write the correct partitioning definition into the file /tmp/partitionfile on the node which will be included into the configuration file during the install process. For statelite osimages, partitionfile should specify "<partition file absolute path>"; see the xCAT Statelite documentation for the xCAT defined format of this configuration file.For Ubuntu, besides "<partition file absolute path>" or "s:<partitioning script absolute path>", the disk name(s) to partition must be specified in traditional, non-devfs format, delimited with space, it can be specified in 2 forms: "d:<the absolute path of the disk name file>" which contains the disk name(s) to partition and "s:d:<the absolute path of the disk script>" which runs in pressed/early_command and writes the disk names into the "/tmp/xcat.install_disk" . To support other specific partition methods such as RAID or LVM in Ubuntu, some additional preseed values should be specified, these values can be specified with "c:<the absolute path of the additional pressed config file>" which contains the additional pressed entries in "d-i ..." form and "s:c:<the absolute path of the additional pressed config script>" which runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
Only available for diskful osimages and statelite osimages(localdisk enabled). The full path of the partition file or the script to generate the partition file. The valid value includes:
"<the absolute path of the parititon file>": For diskful osimages, the partition file contains the partition definition that will be inserted directly into the template file for os installation. The syntax and format of the partition file should confirm to the corresponding OS installer of the Linux distributions(e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). For statelite osimages, when the localdisk is enabled, the partition file with specific syntax and format includes the partition scheme of the local disk, please refer to the statelite documentation for details.
"s:<the absolute path of the partition script>": a shell script to generate the partition file "/tmp/partitionfile" inside the installer before the installation start.
"d:<the absolute path of the disk name file>": only available for ubuntu osimages, includes the name(s) of the disks to partition in traditional, non-devfs format(e.g, /dev/sdx, not e.g. /dev/discs/disc0/disc), and be delimited with space. All the disks involved in the partition file should be specified.
"s:d:<the absolute path of the disk script>": only available for ubuntu osimages, a script to generate the disk name file "/tmp/xcat.install_disk" inside the debian installer. This script is run in the "pressed/early_command" section.
"c:<the absolute path of the additional pressed config file>": only availbe for ubuntu osimages, contains the additional pressed entries in "d-i ..." form. This can be used to specify some additional preseed options to support RAID or LVM in Ubuntu.
"s:c:<the absolute path of the additional pressed config script>": only available for ubuntu osimages, runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
\ **driverupdatesrc**\
The source of the drivers which need to be loaded during the boot. Two types of driver update source are supported: Driver update disk and Driver rpm package. The value for this attribute should be comma separated sources. Each source should be the format tab:full_path_of_srouce_file. The tab keyword can be: dud (for Driver update disk) and rpm (for driver rpm). If missing the tab, the rpm format is the default. e.g. dud:/install/dud/dd.img,rpm:/install/rpm/d.rpm
The source of the drivers which need to be loaded during the boot. Two types of driver update source are supported: Driver update disk and Driver rpm package. The value for this attribute should be comma separated sources. Each source should be the format tab:full_path_of_source_file. The tab keyword can be: dud (for Driver update disk) and rpm (for driver rpm). If missing the tab, the rpm format is the default. e.g. dud:/install/dud/dd.img,rpm:/install/rpm/d.rpm

View File

@ -57,7 +57,7 @@ litefile Attributes:
tmpfs - It is the default option if you leave the options column blank. It provides a file or directory for the node to use when booting, its permission will be the same as the original version on the server. In most cases, it is read-write; however, on the next statelite boot, the original version of the file or directory on the server will be used, it means it is non-persistent. This option can be performed on files and directories..
rw - Same as Above.Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Do not confuse it with the "rw" permission in the file system.
rw - Same as above. Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Do not confuse it with the "rw" permission in the file system.
persistent - It provides a mounted file or directory that is copied to the xCAT persistent location and then over-mounted on the local file or directory. Anything written to that file or directory is preserved. It means, if the file/directory does not exist at first, it will be copied to the persistent location. Next time the file/directory in the persistent location will be used. The file/directory will be persistent across reboots. Its permission will be the same as the original one in the statelite location. It requires the statelite table to be filled out with a spot for persistent statelite. This option can be performed on files and directories.

View File

@ -51,6 +51,8 @@ mac Attributes:
\ **mac**\
The mac address or addresses for which xCAT will manage static bindings for this node. This may be simply a mac address, which would be bound to the node name (such as "01:02:03:04:05:0E"). This may also be a "|" delimited string of "mac address!hostname" format (such as "01:02:03:04:05:0E!node5|01:02:03:04:05:0F!node6-eth1"). If there are multiple nics connected to Management Network(usually for bond), in order to make sure the OS deployment finished successfully, the macs of those nics must be able to resolve to same IP address. First, users have to create alias of the node for each mac in the Management Network through either: 1. adding the alias into /etc/hosts for the node directly or: 2. setting the alias to the "hostnames" attribute and then run "makehost" against the node. Then, configure the "mac" attribute of the node like "mac1!node|mac2!node-alias". For the first mac address (mac1 in the example) set in "mac" attribute, do not need to set a "node name" string for it since the nodename of the node will be used for it by default.
\ **comments**\

View File

@ -130,7 +130,7 @@ site Attributes:
domain: The DNS domain name used for the cluster.
forwarders: The DNS servers at your site that can provide names outside of the cluster.
The makedns command will configure the DNS on the management node to foward
The makedns command will configure the DNS on the management node to forward
requests it does not know to these servers. Note that the DNS servers on the
service nodes will ignore this value and always be configured to forward
to the management node.

View File

@ -86,7 +86,7 @@ vm Attributes:
\ **cfgstore**\
Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistant store to place configuration data
Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistent store to place configuration data

View File

@ -1166,7 +1166,7 @@ group Attributes:
\ **vmcfgstore**\ (vm.cfgstore)
Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistant store to place configuration data
Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistent store to place configuration data

View File

@ -1202,7 +1202,7 @@ node Attributes:
\ **vmcfgstore**\ (vm.cfgstore)
Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistant store to place configuration data
Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistent store to place configuration data

View File

@ -83,7 +83,7 @@ osimage Attributes:
\ **driverupdatesrc**\ (linuximage.driverupdatesrc)
The source of the drivers which need to be loaded during the boot. Two types of driver update source are supported: Driver update disk and Driver rpm package. The value for this attribute should be comma separated sources. Each source should be the format tab:full_path_of_srouce_file. The tab keyword can be: dud (for Driver update disk) and rpm (for driver rpm). If missing the tab, the rpm format is the default. e.g. dud:/install/dud/dd.img,rpm:/install/rpm/d.rpm
The source of the drivers which need to be loaded during the boot. Two types of driver update source are supported: Driver update disk and Driver rpm package. The value for this attribute should be comma separated sources. Each source should be the format tab:full_path_of_source_file. The tab keyword can be: dud (for Driver update disk) and rpm (for driver rpm). If missing the tab, the rpm format is the default. e.g. dud:/install/dud/dd.img,rpm:/install/rpm/d.rpm
@ -279,7 +279,13 @@ osimage Attributes:
\ **partitionfile**\ (linuximage.partitionfile, winimage.partitionfile)
The path of the configuration file which will be used to partition the disk for the node. For stateful osimages,two types of files are supported: "<partition file absolute path>" which contains a partitioning definition that will be inserted directly into the generated autoinst configuration file and must be formatted for the corresponding OS installer (e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). "s:<partitioning script absolute path>" which specifies a shell script that will be run from the OS installer configuration file %pre section; the script must write the correct partitioning definition into the file /tmp/partitionfile on the node which will be included into the configuration file during the install process. For statelite osimages, partitionfile should specify "<partition file absolute path>"; see the xCAT Statelite documentation for the xCAT defined format of this configuration file.For Ubuntu, besides "<partition file absolute path>" or "s:<partitioning script absolute path>", the disk name(s) to partition must be specified in traditional, non-devfs format, delimited with space, it can be specified in 2 forms: "d:<the absolute path of the disk name file>" which contains the disk name(s) to partition and "s:d:<the absolute path of the disk script>" which runs in pressed/early_command and writes the disk names into the "/tmp/xcat.install_disk" . To support other specific partition methods such as RAID or LVM in Ubuntu, some additional preseed values should be specified, these values can be specified with "c:<the absolute path of the additional pressed config file>" which contains the additional pressed entries in "d-i ..." form and "s:c:<the absolute path of the additional pressed config script>" which runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
Only available for diskful osimages and statelite osimages(localdisk enabled). The full path of the partition file or the script to generate the partition file. The valid value includes:
"<the absolute path of the parititon file>": For diskful osimages, the partition file contains the partition definition that will be inserted directly into the template file for os installation. The syntax and format of the partition file should confirm to the corresponding OS installer of the Linux distributions(e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). For statelite osimages, when the localdisk is enabled, the partition file with specific syntax and format includes the partition scheme of the local disk, please refer to the statelite documentation for details.
"s:<the absolute path of the partition script>": a shell script to generate the partition file "/tmp/partitionfile" inside the installer before the installation start.
"d:<the absolute path of the disk name file>": only available for ubuntu osimages, includes the name(s) of the disks to partition in traditional, non-devfs format(e.g, /dev/sdx, not e.g. /dev/discs/disc0/disc), and be delimited with space. All the disks involved in the partition file should be specified.
"s:d:<the absolute path of the disk script>": only available for ubuntu osimages, a script to generate the disk name file "/tmp/xcat.install_disk" inside the debian installer. This script is run in the "pressed/early_command" section.
"c:<the absolute path of the additional pressed config file>": only availbe for ubuntu osimages, contains the additional pressed entries in "d-i ..." form. This can be used to specify some additional preseed options to support RAID or LVM in Ubuntu.
"s:c:<the absolute path of the additional pressed config script>": only available for ubuntu osimages, runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
or
@ -313,17 +319,22 @@ osimage Attributes:
\ **postinstall**\ (linuximage.postinstall)
Only supported in diskless image only. The fully qualified name of the scripts running in non-chroot mode after the package installation but before initrd generation during genimage. If multiple scripts are specified, they should be speperated with comma ",". A set of osimage attributes are exported as the environment variables to be used in the postinstall scripts:
IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"),
IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"),
IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"),
IMG_KERNELVERSION(the "kernelver" attribute of the osimage),
IMG_PROFILE(the profile of the osimage, such as "service","compute"),
IMG_PKGLIST(the "pkglist" attribute of the osimage),
IMG_PKGDIR(the "pkgdir" attribute of the osimage),
IMG_OTHERPKGLIST(the "otherpkglist" attribute of the osimage),
IMG_OTHERPKGDIR(the "otherpkgdir" attribute of the osimage),
IMG_ROOTIMGDIR(the "rootimgdir" attribute of the osimage)
Supported in diskless image only. The fully qualified name of the scripts running in non-chroot mode after the package installation but before initrd generation during genimage. If multiple scripts are specified, they should be seperated with comma ",". A set of osimage attributes are exported as the environment variables to be used in the postinstall scripts:
.. code-block:: perl
IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"),
IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"),
IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"),
IMG_KERNELVERSION(the "kernelver" attribute of the osimage),
IMG_PROFILE(the profile of the osimage, such as "service","compute"),
IMG_PKGLIST(the "pkglist" attribute of the osimage),
IMG_PKGDIR(the "pkgdir" attribute of the osimage),
IMG_OTHERPKGLIST(the "otherpkglist" attribute of the osimage),
IMG_OTHERPKGDIR(the "otherpkgdir" attribute of the osimage),
IMG_ROOTIMGDIR(the "rootimgdir" attribute of the osimage)

View File

@ -31,7 +31,7 @@ DESCRIPTION
***********
The \ **copycds**\ command copies all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory. The destination directory can be specified by the \ **-p**\ option. If no path is specified, the default destination directory will be formed from the \ **installdir**\ site table attribute and the distro name and architecture, for example: /install/rhels6.3/x86_64. The \ **copycds**\ command can copy from one or more ISO files, or the CD/DVD device path.
The \ **copycds**\ command copies all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory. The destination directory can be specified by the \ **-p**\ option. If no path is specified, the default destination directory will be formed from the \ **installdir**\ site table attribute, distro name and architecture, for example: /install/rhels6.3/x86_64. The \ **copycds**\ command can copy from one or more ISO files, or the CD/DVD device path.
You can specify \ **-i**\ or \ **-**\ **-inspection**\ option to check whether the DVDs/ISOs can be recognized by xCAT. If recognized, the distribution name, architecture and the disc no (the disc sequence number of DVDs/ISOs in multi-disk distribution) of the DVD/ISO is displayed. If xCAT doesn't recognize the DVD/ISO, you must manually specify the distro name and architecture using the \ **-n**\ and \ **-a**\ options. This is sometimes the case for distros that have very recently been released, and the xCAT code hasn't been updated for it yet.
@ -52,7 +52,7 @@ OPTIONS
\ **-a|-**\ **-arch**\ =\ *architecture*\
The architecture of the linux distro on the ISO/DVD. Examples: x86, x86_64, ppc64, s390x.
The architecture of the linux distro on the ISO/DVD. Examples: x86, x86_64, ppc64, s390x.

View File

@ -0,0 +1,48 @@
2016-11-30 - Removal of Service Stream Password
===============================================
It has been brought to our attention that the xCAT product has hard-coded default passwords for the HMC/FSP to allow for IBM Service to connect to customer machines for L2/L3 support activities. This creates a security vulnerability where third parties could potentially gain root level access using these weak, hard coded passwords.
Example: ::
create_pwd => "netsDynPwdTool --create dev FipSdev",
password => "FipSdev"
In response, xCAT will remove these hard-coded password and interfaces from the xCAT code.
Action
------
No action is required for xCAT 2.12.3, and higher.
If running older versions of xCAT, update xCAT to a higher level code base that has the hard-coded default passwords removed.
The following table describes the recommended update path:
+-------------------------+-----------------------------------------------+---------------------------------------+
| xCAT Version | Action | Release Notes |
+=========================+===============================================+=======================================+
| **2.13**, or newer | No applicable | |
| | | |
+-------------------------+-----------------------------------------------+---------------------------------------+
| **2.12.x** | Update to **2.12.3**, or higher | `2.12.3 Release Notes <https:// |
| | | github.com/xcat2/xcat-core/wiki |
| | | /XCAT_2.12.3_Release_Notes>`_ |
+-------------------------+-----------------------------------------------+---------------------------------------+
| **2.11.x** | Update to **2.12.3**, or higher | `2.12.3 Release Notes <https:// |
| | | github.com/xcat2/xcat-core/wiki |
| | | /XCAT_2.12.3_Release_Notes>`_ |
+-------------------------+-----------------------------------------------+---------------------------------------+
| **2.10.x** | Update to **2.12.3**, or higher | `2.12.3 Release Notes <https:// |
| | | github.com/xcat2/xcat-core/wiki |
| | | /XCAT_2.12.3_Release_Notes>`_ |
+-------------------------+-----------------------------------------------+---------------------------------------+
| **2.9.x**, or older | Update to: | `2.9.4 Release Notes <https:// |
| | | github.com/xcat2/xcat-core/wiki |
| | - **2.9.4**, or higher for **AIX** | /XCAT_2.9.4_Release_Notes>`_ |
| | - **2.12.3**, or higher for **LINUX** | |
+-------------------------+-----------------------------------------------+---------------------------------------+

View File

@ -4,6 +4,7 @@
.. toctree::
:maxdepth: 1
20161130_hard_code_password.rst
20160824_openssl.rst
20160815_openssl.rst
20160503_openssl.rst

14
makerpm
View File

@ -55,7 +55,7 @@ function makenoarch {
tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz --define "version $VER"
rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz --define "version $VER" $REL "$EASE"
RC=$?
if [ $RPMNAME = "xCAT-UI" ]; then
@ -137,7 +137,7 @@ function makexcat {
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER-snap*.$ARCH.rpm $EMBEDTXT..."
rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET --define "version $VER"
rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET --define "version $VER" $REL "$EASE"
RC=$?
fi
}
@ -162,15 +162,19 @@ function makeironic {
# Make the xCAT-genesis rpm
function makegenesis {
DIR="xCAT-genesis-builder"
SPEC_FILE="xCAT-genesis-base.spec"
RPMNAME="$1"
cd `dirname $0`/$DIR
sed -i s/%%REPLACE_CURRENT_VERSION%%/${VER}/g ${SPEC_FILE}
tar --exclude .svn -cjf $RPMROOT/SOURCES/$RPMNAME.tar.bz2 .
# undo the changes from the SED command above so it's not tracked by Git
git checkout ${SPEC_FILE}
cp LICENSE.html $RPMROOT/BUILD
cp $RPMNAME.spec $RPMROOT/SOURCES
cd - >/dev/null
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm $EMBEDTXT..."
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec --define "version $VER"
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec --define "version $VER" $REL "$EASE"
}
function makegenesisscripts {
@ -190,7 +194,7 @@ function makegenesisscripts {
cd - >/dev/null
rm -f $RPMROOT/SRPMS/$RPMNAME-$ARCH-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$ARCH-$VER*rpm
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$ARCH-$VER-snap*.noarch.rpm $EMBEDTXT..."
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec $TARGET --define "version $VER"
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec $TARGET --define "version $VER" $REL "$EASE"
}
@ -215,6 +219,8 @@ fi
OSNAME=$(uname)
if [ -z "$XCATVER" ] ; then
VER=`cat Version`
REL="--define"
EASE='usedate 1'
else
VER=$XCATVER
REL="--define"

View File

@ -154,7 +154,7 @@ use xCAT::ExtTab;
file => "The full pathname of the file. e.g: /etc/hosts. If the path is a directory, then it should be terminated with a '/'. ",
options => "Options for the file:\n\n" .
qq{ tmpfs - It is the default option if you leave the options column blank. It provides a file or directory for the node to use when booting, its permission will be the same as the original version on the server. In most cases, it is read-write; however, on the next statelite boot, the original version of the file or directory on the server will be used, it means it is non-persistent. This option can be performed on files and directories..\n\n} .
qq{ rw - Same as Above.Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Do not confuse it with the "rw" permission in the file system. \n\n} .
qq{ rw - Same as above. Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Do not confuse it with the "rw" permission in the file system. \n\n} .
qq{ persistent - It provides a mounted file or directory that is copied to the xCAT persistent location and then over-mounted on the local file or directory. Anything written to that file or directory is preserved. It means, if the file/directory does not exist at first, it will be copied to the persistent location. Next time the file/directory in the persistent location will be used. The file/directory will be persistent across reboots. Its permission will be the same as the original one in the statelite location. It requires the statelite table to be filled out with a spot for persistent statelite. This option can be performed on files and directories. \n\n} .
qq{ con - The contents of the pathname are concatenated to the contents of the existing file. For this directive the searching in the litetree hierarchy does not stop when the first match is found. All files found in the hierarchy will be concatenated to the file when found. The permission of the file will be "-rw-r--r--", which means it is read-write for the root user, but readonly for the others. It is non-persistent, when the node reboots, all changes to the file will be lost. It can only be performed on files. Do not use it for one directory.\n\n} .
qq{ ro - The file/directory will be overmounted read-only on the local file/directory. It will be located in the directory hierarchy specified in the litetree table. Changes made to this file or directory on the server will be immediately seen in this file/directory on the node. This option requires that the file/directory to be mounted must be available in one of the entries in the litetree table. This option can be performed on files and directories.\n\n} .
@ -169,7 +169,7 @@ qq{ link,ro - The file is readonly, and will be placed in tmpfs on the booted no
vmmaster => {
#will add columns as approriate, for now:
#will add columns as appropriate, for now:
#os arch profile to populate the corresponding nodetype fields of a cloned vm
#storage to indicate where the master data is actually stored (i.e. virtual disk images)
#storagemodel to allow chvm on a clone to be consistent with the master by default
@ -205,7 +205,7 @@ qq{ link,ro - The file is readonly, and will be placed in tmpfs on the booted no
'migrationdest' => 'A noderange representing candidate destinations for migration (i.e. similar systems, same SAN, or other criteria that xCAT can use',
'storage' => 'A list of storage files or devices to be used. i.e. dir:///cluster/vm/<nodename> or nfs://<server>/path/to/folder/',
'storagemodel' => 'Model of storage devices to provide to guest',
'cfgstore' => 'Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistant store to place configuration data',
'cfgstore' => 'Optional location for persistent storage separate of emulated hard drives for virtualization solutions that require persistent store to place configuration data',
'memory' => 'Megabytes of memory the VM currently should be set to.',
'master' => 'The name of a master image, if any, this virtual machine is linked to. This is generally set by clonevm and indicates the deletion of a master that would invalidate the storage of this virtual machine',
'cpus' => 'Number of CPUs the node should see.',
@ -774,7 +774,8 @@ passed as argument rather than by table value',
otherpkglist => 'The fully qualified name of the file that stores non-distro package lists that will be included in the image. It could be set to multiple paths. The multiple paths must be separated by ",".',
otherpkgdir => 'The base directory where the non-distro packages are stored. Only 1 local directory supported at present.',
exlist => 'The fully qualified name of the file that stores the file names and directory names that will be excluded from the image during packimage command. It is used for diskless image only.',
postinstall => 'Only supported in diskless image only. The fully qualified name of the scripts running in non-chroot mode after the package installation but before initrd generation during genimage. If multiple scripts are specified, they should be speperated with comma ",". A set of osimage attributes are exported as the environment variables to be used in the postinstall scripts:
postinstall => 'Supported in diskless image only. The fully qualified name of the scripts running in non-chroot mode after the package installation but before initrd generation during genimage. If multiple scripts are specified, they should be seperated with comma ",". A set of osimage attributes are exported as the environment variables to be used in the postinstall scripts:
IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"),
IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"),
IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"),
@ -795,8 +796,15 @@ passed as argument rather than by table value',
permission => 'The mount permission of /.statelite directory is used, its default value is 755',
dump => qq{The NFS directory to hold the Linux kernel dump file (vmcore) when the node with this image crashes, its format is "nfs://<nfs_server_ip>/<kdump_path>". If you want to use the node's "xcatmaster" (its SN or MN), <nfs_server_ip> can be left blank. For example, "nfs:///<kdump_path>" means the NFS directory to hold the kernel dump file is on the node's SN, or MN if there's no SN.},
crashkernelsize => 'the size that assigned to the kdump kernel. If the kernel size is not set, 256M will be the default value.',
partitionfile => 'The path of the configuration file which will be used to partition the disk for the node. For stateful osimages,two types of files are supported: "<partition file absolute path>" which contains a partitioning definition that will be inserted directly into the generated autoinst configuration file and must be formatted for the corresponding OS installer (e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). "s:<partitioning script absolute path>" which specifies a shell script that will be run from the OS installer configuration file %pre section; the script must write the correct partitioning definition into the file /tmp/partitionfile on the node which will be included into the configuration file during the install process. For statelite osimages, partitionfile should specify "<partition file absolute path>"; see the xCAT Statelite documentation for the xCAT defined format of this configuration file.For Ubuntu, besides "<partition file absolute path>" or "s:<partitioning script absolute path>", the disk name(s) to partition must be specified in traditional, non-devfs format, delimited with space, it can be specified in 2 forms: "d:<the absolute path of the disk name file>" which contains the disk name(s) to partition and "s:d:<the absolute path of the disk script>" which runs in pressed/early_command and writes the disk names into the "/tmp/xcat.install_disk" . To support other specific partition methods such as RAID or LVM in Ubuntu, some additional preseed values should be specified, these values can be specified with "c:<the absolute path of the additional pressed config file>" which contains the additional pressed entries in "d-i ..." form and "s:c:<the absolute path of the additional pressed config script>" which runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma "," ',
driverupdatesrc => 'The source of the drivers which need to be loaded during the boot. Two types of driver update source are supported: Driver update disk and Driver rpm package. The value for this attribute should be comma separated sources. Each source should be the format tab:full_path_of_srouce_file. The tab keyword can be: dud (for Driver update disk) and rpm (for driver rpm). If missing the tab, the rpm format is the default. e.g. dud:/install/dud/dd.img,rpm:/install/rpm/d.rpm',
partitionfile => 'Only available for diskful osimages and statelite osimages(localdisk enabled). The full path of the partition file or the script to generate the partition file. The valid value includes:
"<the absolute path of the parititon file>": For diskful osimages, the partition file contains the partition definition that will be inserted directly into the template file for os installation. The syntax and format of the partition file should confirm to the corresponding OS installer of the Linux distributions(e.g. kickstart for RedHat, autoyast for SLES, pressed for Ubuntu). For statelite osimages, when the localdisk is enabled, the partition file with specific syntax and format includes the partition scheme of the local disk, please refer to the statelite documentation for details.
"s:<the absolute path of the partition script>": a shell script to generate the partition file "/tmp/partitionfile" inside the installer before the installation start.
"d:<the absolute path of the disk name file>": only available for ubuntu osimages, includes the name(s) of the disks to partition in traditional, non-devfs format(e.g, /dev/sdx, not e.g. /dev/discs/disc0/disc), and be delimited with space. All the disks involved in the partition file should be specified.
"s:d:<the absolute path of the disk script>": only available for ubuntu osimages, a script to generate the disk name file "/tmp/xcat.install_disk" inside the debian installer. This script is run in the "pressed/early_command" section.
"c:<the absolute path of the additional pressed config file>": only availbe for ubuntu osimages, contains the additional pressed entries in "d-i ..." form. This can be used to specify some additional preseed options to support RAID or LVM in Ubuntu.
"s:c:<the absolute path of the additional pressed config script>": only available for ubuntu osimages, runs in pressed/early_command and set the preseed values with "debconf-set". The multiple values should be delimited with comma ","
',
driverupdatesrc => 'The source of the drivers which need to be loaded during the boot. Two types of driver update source are supported: Driver update disk and Driver rpm package. The value for this attribute should be comma separated sources. Each source should be the format tab:full_path_of_source_file. The tab keyword can be: dud (for Driver update disk) and rpm (for driver rpm). If missing the tab, the rpm format is the default. e.g. dud:/install/dud/dd.img,rpm:/install/rpm/d.rpm',
comments => 'Any user-written notes.',
disable => "Set to 'yes' or '1' to comment out this row.",
},
@ -1005,7 +1013,7 @@ passed as argument rather than by table value',
" dnshandler: Name of plugin that handles DNS setup for makedns.\n\n" .
" domain: The DNS domain name used for the cluster.\n\n" .
" forwarders: The DNS servers at your site that can provide names outside of the cluster.\n" .
" The makedns command will configure the DNS on the management node to foward\n" .
" The makedns command will configure the DNS on the management node to forward\n" .
" requests it does not know to these servers. Note that the DNS servers on the\n" .
" service nodes will ignore this value and always be configured to forward \n" .
" to the management node.\n\n" .

View File

@ -1,4 +1,4 @@
%define version 2.12
%define version %%REPLACE_CURRENT_VERSION%%
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
%ifarch i386 i586 i686 x86
@ -17,13 +17,11 @@ BuildArch: noarch
%define __prelink_undo_cmd %{nil}
# To fix the issue error: Arch dependent binaries in noarch package, the following line is needed on Fedora 23 ppc64
%define _binaries_in_noarch_packages_terminate_build 0
Epoch: 1
Epoch: 2
AutoReq: false
Prefix: /opt/xcat
AutoProv: false
Name: %{name}
Group: System/Utilities
License: Various (see individual packages for details)

View File

@ -40,4 +40,10 @@ cd -
%Files
%defattr(-,root,root)
%doc LICENSE.html
/opt/xcat/share/xcat/netboot/genesis/builder
%dir %{prefix}
%dir %{prefix}/share
%dir %{prefix}/share/xcat
%dir %{prefix}/share/xcat/netboot
%dir %{prefix}/share/xcat/netboot/genesis
%dir %{prefix}/share/xcat/netboot/genesis/builder
%{prefix}/share/xcat/netboot/genesis/builder/*

View File

@ -514,8 +514,8 @@ sub configBMC {
$ret_text .= "Changeing SNMP PEF policy for IPMI nodes $noderange:\n $result\n";
}
} elsif ($action == 1) {
print "XCATBYPASS=Y rspconfig $noderange alert=en\n";
my $result = `XCATBYPASS=Y rspconfig $noderange alert=en 2>&1`;
print "XCATBYPASS=Y rspconfig $noderange alert=en community=public\n";
my $result = `XCATBYPASS=Y rspconfig $noderange alert=en community=public 2>&1`;
if ($?) {
$ret_val = 1;
xCAT::MsgUtils->message('S', "[mon]: Changeing SNMP PEF policy for IPMI nodes $noderange:\n $result\n");

View File

@ -1924,6 +1924,11 @@ sub do_rflash_process {
# child
elsif ($pid == 0) {
unless (setpgrp()) {
xCAT::SvrUtils::sendmsg([ 1, "Faild to run setgprp for $$ process" ],
$callback, $node);
exit(1);
}
my $extra = $_[8];
my @exargs = @$extra;
my $programe = \$0;

View File

@ -2215,6 +2215,10 @@ sub copycd
if ($ret[0] != 0) {
$callback->({ data => "Error when updating the osimage tables for stateless: " . $ret[1] });
}
my @ret=xCAT::SvrUtils->update_tables_with_diskless_image($distname, $arch, undef, "statelite",$path,$osdistroname);
if ($ret[0] != 0) {
$callback->({data => "Error when updating the osimage tables for statelite: " . $ret[1]});
}
}
}

View File

@ -41,7 +41,7 @@ fi
mount -t tmpfs rw $NEWROOT/$RWDIR
mkdir -p $NEWROOT/$RWDIR/tmpfs
ME=`hostname`
ME=`hostname -s`
if [ ! -z $NODE ]; then
ME=$NODE
fi
@ -66,7 +66,7 @@ if [ ! -z $SNAPSHOTSERVER ]; then
/bin/sh
exit
fi
RS= $(( $RANDOM % 20 ))
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
sleep $RS
done
@ -83,7 +83,7 @@ if [ ! -z $SNAPSHOTSERVER ]; then
/bin/sh
exit
fi
RS= $(( $RANDOM % 20 ))
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
sleep $RS
done
@ -98,7 +98,7 @@ if [ ! -z $SNAPSHOTSERVER ]; then
/bin/sh
exit
fi
RS= $(( $RANDOM % 20 ))
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
sleep $RS
done

View File

@ -6,7 +6,7 @@ RWDIR=.statelite
. /lib/dracut-lib.sh
XCAT="$(getarg XCAT=)"
XCATMASTER=$XCAT
STATEMNT="$(getarg STATEMNT=)"
rootlimit="$(getarg rootlimit=)"
getarg nonodestatus
@ -160,7 +160,7 @@ elif [ -r /rootimg-statelite.gz ]; then
mount -t tmpfs rw $NEWROOT/$RWDIR
mkdir -p $NEWROOT/$RWDIR/tmpfs
ME=`hostname`
ME=`hostname -s`
if [ ! -z $NODE ]; then
ME=$NODE
fi
@ -212,7 +212,7 @@ elif [ -r /rootimg-statelite.gz ]; then
/bin/sh
exit
fi
RS= $(( $RANDOM % 20 ))
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
sleep $RS
done
@ -227,7 +227,7 @@ elif [ -r /rootimg-statelite.gz ]; then
/bin/sh
exit
fi
RS= $(( $RANDOM % 20 ))
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
sleep $RS
done

View File

@ -270,9 +270,6 @@ switchdiscover_range_z
switchdiscover_range_z_V
makentp_v
makentp_h
makentp_V
makentp
makentp_a
nodeset_check_warninginfo
runcmdinstaller_h
runcmdinstaller_command

View File

@ -275,9 +275,6 @@ switchdiscover_range_z
switchdiscover_range_z_V
makentp_v
makentp_h
makentp_V
makentp
makentp_a
nodeset_check_warninginfo
runcmdinstaller_h
runcmdinstaller_command

View File

@ -275,9 +275,6 @@ switchdiscover_range_z
switchdiscover_range_z_V
makentp_v
makentp_h
makentp_V
makentp
makentp_a
nodeset_check_warninginfo
runcmdinstaller_h
runcmdinstaller_command

View File

@ -275,9 +275,6 @@ switchdiscover_range_z
switchdiscover_range_z_V
makentp_v
makentp_h
makentp_V
makentp
makentp_a
nodeset_check_warninginfo
runcmdinstaller_h
runcmdinstaller_command

View File

@ -257,9 +257,6 @@ switchdiscover_range_z
switchdiscover_range_z_V
makentp_v
makentp_h
makentp_V
makentp
makentp_a
nodeset_check_warninginfo
xcatconfig_u_check_xcatsslversion_rhels_sles
reg_linux_diskless_installation_flat

View File

@ -5,7 +5,9 @@ cmd:copycds $$ISO
check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p ;mkvm $$CN -s 20G; fi;fi
#comment for vm debug
#cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p ;mkvm $$CN -s 20G; fi;fi
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
check:rc==0
cmd:makedns -n
check:rc==0
@ -15,6 +17,9 @@ cmd:makedhcp -a
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -d /install/custom/netboot/sles ]; then mkdir -p /install/custom/netboot/sles; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -d /install/custom/netboot/rh ]; then mkdir -p /install/custom/netboot/rh; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -d /install/custom/netboot/ubuntu ]; then mkdir -p /install/custom/netboot/ubuntu; fi; fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -e /install/custom/netboot/sles/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/sles/compute.synclist; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -e /install/custom/netboot/rh/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/rh/compute.synclist; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -e /install/custom/netboot/ubuntu/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/ubuntu/compute.synclist;fi; fi
@ -59,4 +64,7 @@ check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0
end

View File

@ -13,6 +13,7 @@
"ALL","/etc/resolv.conf.predhclient","tmpfs",,
"ALL","/etc/sysconfig/","tmpfs",,
"ALL","/etc/ssh/","tmpfs",,
"ALL","/etc/systemd/system/multi-user.target.wants/","tmpfs",,
"ALL","/tmp/","tmpfs",,
"ALL","/var/","tmpfs",,
"ALL","/opt/xcat/","tmpfs",,

1 #image file options comments disable
13 ALL /etc/resolv.conf.predhclient tmpfs
14 ALL /etc/sysconfig/ tmpfs
15 ALL /etc/ssh/ tmpfs
16 ALL /etc/systemd/system/multi-user.target.wants/ tmpfs
17 ALL /tmp/ tmpfs
18 ALL /var/ tmpfs
19 ALL /opt/xcat/ tmpfs

View File

@ -129,6 +129,4 @@ check:rc==0
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0
cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute
check:rc==0
end

View File

@ -93,6 +93,4 @@ check:output=~compute/rootimg on / type nfs
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi
check:rc==0
cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute
check:rc==0
end

View File

@ -95,6 +95,4 @@ check:output=~rootfs on / type
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0
cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute
check:rc==0
end

View File

@ -5,7 +5,9 @@ cmd:copycds $$ISO
check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc=0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi
#comment for vm debug
#cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p ;mkvm $$CN -s 20G; fi;fi
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
check:rc=0
cmd:makedns -n
check:rc==0
@ -15,7 +17,7 @@ cmd:makedhcp -a
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/x86_64/compute
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi
check:rc==0
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
@ -42,4 +44,6 @@ check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0
end

View File

@ -7,7 +7,7 @@ description:update xCAT from $$MIGRATION1_VERSION to $$LATEST_VERSION, these two
#check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n
@ -118,7 +118,7 @@ stop:yes
#check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n

View File

@ -7,7 +7,7 @@ description:update xCAT from $$MIGRATION1_VERSION to $$LATEST_VERSION, these two
#check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n
@ -120,7 +120,7 @@ description:update xCAT from $$MIGRATION22VERSION to $$LATEST_VERSION, these two
#check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n