2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-05 17:58:14 +00:00

Merge tag '2.16.0' into lenovobuild

This commit is contained in:
Jarrod Johnson
2020-06-22 11:07:17 -04:00
127 changed files with 1192 additions and 781 deletions

View File

@@ -1 +1 @@
2.15.1
2.16

View File

@@ -1,132 +0,0 @@
DNS,hostname and alias Q/A list
-------------------------------
Q: When there are multiple NICs, how to generate ``/etc/hosts`` records?
````````````````````````````````````````````````````````````````````````
When there are multiple NICs, and you want to use ``confignetwork`` to configure these NICs, suggest to use ``hosts`` table to configure installnic and use ``nics`` table to configure secondary NICs. You can refer to the following best practice example to generate ``/etc/hosts`` records.
**Best practice example**:
* There are 2 networks in different domains: ``mgtnetwork`` and ``pubnetwork``
* ``mgtnetwork`` is xCAT management network
* There are 2 adapters in system node1: ``eth0`` and ``eth1``
* Add installnic ``eth0`` ``10.5.106.101`` record in ``/etc/hosts``, its alias is ``mgtnic``
* hostnames ``node1-pub`` and ``node1.public.com`` are for nic ``eth1``, ip is ``192.168.30.101``
**Steps**:
#. Add networks entry in ``networks`` table: ::
chdef -t network mgtnetwork net=10.0.0.0 mask=255.0.0.0 domain=cluster.com
chdef -t network pubnetwork net=192.168.30.0 mask=255.255.255.0 domain=public.com
#. Create ``node1`` with installnic ip ``10.5.106.101``, its alias is ``mgtnic``: ::
chdef node1 ip=10.5.106.101 hostnames=mgtnic groups=all
#. Configure ``eth1`` in ``nics`` table: ::
chdef node1 nicips.eth1=192.168.30.101 nichostnamesuffixes.eth1=-pub nicaliases.eth1=node1.public.com nictypes.eth1=Ethernet nicnetworks.eth1=pubnetwork
#. Check ``node1`` definition: ::
lsdef node1
Object name: node1
groups=all
ip=10.5.106.101
hostnames=mgtnic
nicaliases.eth1=node1.public.com
nichostnamesuffixes.eth1=-pub
nicips.eth1=192.168.30.101
nicnetworks.eth1=pubnetwork
nictypes.eth1=Ethernet
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles
#. Execute ``makehosts -n`` to generate ``/etc/hosts`` records: ::
makehosts -n
#. Check results in ``/etc/hosts``: ::
10.5.106.101 node1 node1.cluster.com mgtnic
192.168.30.101 node1-pub node1.public.com
#. Edit ``/etc/resolv.conf``, xCAT management node ip like ``10.5.106.2`` is nameserver: ::
search cluster.com public.com
nameserver 10.5.106.2
#. Execute ``makedns -n`` to configure DNS
Q: How to configure aliases?
````````````````````````````
There are 3 methods to configure aliases:
#. Use ``hostnames`` in ``hosts`` table to configure aliases for the installnic.
#. If you want to use script ``confignetwork`` to configure secondary NICs, suggest to use ``aliases`` in ``nics`` table to configure aliases, you can refer to :doc:`Configure Aliases <../guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_aliases>`
#. If you want to generate aliases records in ``/etc/hosts`` for secondary NICs, and don't want to use script ``confignetwork`` to configure these NICs, suggest to use ``otherinterfaces`` in ``hosts`` table to configure aliases. You can refer to following example:
* If you want to add ``node1-hd`` ``20.1.1.1`` in ``hosts`` table, and don't use ``confignetwork`` to configure it, you can add ``otherinterfaces`` like this: ::
chdef node1 otherinterfaces="node1-hd:20.1.1.1"
* After executing ``makehosts -n``, you can get records in ``/etc/hosts`` like following: ::
20.1.1.1 node1-hd
**Note**: If suffixes or aliases for the same IP are configured in both ``hosts`` table and ``nics`` table, will cause conflicts. ``makehosts`` will use values from ``nics`` table. The values from ``nics`` table will over-write that from ``hosts`` table to create ``/etc/hosts`` records.
Q: How to handle the same short hostname in different domains?
``````````````````````````````````````````````````````````````
You can follow the best practice example.
**Best practice example**:
* There are 2 networks in different domains: ``mgtnetwork`` and ``pubnetwork``
* ``mgtnetwork`` is xCAT management network
* Generate 2 records with the same hostname in ``/etc/hosts``, like: ::
10.5.106.101 node1.cluster.com
192.168.20.101 node1.public.com
* Nameserver is xCAT management node IP
**Steps**:
#. Add networks entry in ``networks`` table: ::
chdef -t network mgtnetwork net=10.0.0.0 mask=255.0.0.0 domain=cluster.com
chdef -t network pubnetwork net=192.168.30.0 mask=255.255.255.0 domain=public.com
#. Create ``node1`` with ``ip=10.5.106.101``, xCAT can manage and install this node: ::
chdef node1 ip=10.5.106.101 groups=all
#. Create ``node1-pub`` with ``ip=192.168.30.101``, this node is only used to generate ``/etc/hosts`` records for public network, can use ``_unmanaged`` group name to label it: ::
chdef node1-pub ip=192.168.30.101 hostnames=node1.public.com groups=_unmanaged
#. Execute ``makehosts -n`` to generate ``/etc/hosts`` records: ::
makehosts -n
#. Check results in ``/etc/hosts``: ::
10.5.106.101 node1 node1.cluster.com
192.168.30.101 node1-pub node1.public.com
#. Edit ``/etc/resolv.conf``, for example, xCAT management node IP is 10.5.106.2 : ::
search cluster.com public.com
nameserver 10.5.106.2
#. Execute ``makedns -n`` to configure DNS
Q: When to use ``hosts`` table and ``nics`` table?
``````````````````````````````````````````````````
``hosts`` table is used to store IP addresses and hostnames of nodes. ``makehosts`` use these data to create ``/etc/hosts`` records. ``nics`` table is used to stores secondary NICs details. Some scripts like ``confignetwork`` use data from ``nics`` table to configure secondary NICs. ``makehosts`` also use these data to create ``/etc/hosts`` records for each NIC.

View File

@@ -301,7 +301,7 @@ nicips example: ::
NOTE: The management interface **(eth0)**, that the **compute02** IP is configured on, is not included in the list of additional nics. Although adding it to the list of nics would do no harm.
This **nicips** value indicates that there are two additional interfaces to be configured on node compute02,eth1 and eth2. The **eth1** interface will get the IP address **11.10.1.2**. The **eth2** interface will get two IP addresses, **"80.0.0.2" and "70.0.0.2"**.
This **nicips** value indicates that there are two additional interfaces to be configured on node compute02, eth1 and eth2. The **eth1** interface will get the IP address **11.10.1.2**. The **eth2** interface will get two IP addresses, **"80.0.0.2" and "70.0.0.2"**.
nichostnamesuffixes example: ::
@@ -329,7 +329,7 @@ nicnetworks example: ::
chdef -t node -o compute02 nicnetworks.eth1=clstrnet11 nicnetworks.eth2='clstrnet80|clstrnet-lab'
In this example we are saying that the IP address of "eth0" (ie. compute02-eth1 -> 11.10.1.2) is part of the xCAT network named **"clstrnet11"**. **"compute02-eth2"** is in network **"clstrnet80"** and **"compute02-eth2-lab"** is in **"clstrnet-lab"**.
In this example we are saying that the IP address of **"eth1"** (ie. compute02-eth1 -> 11.10.1.2) is part of the xCAT network named **"clstrnet11"**. **"compute02-eth2"** is in network **"clstrnet80"** and **"compute02-eth2-lab"** is in **"clstrnet-lab"**.
By default the xCAT code will attempt to match the interface IP to one of the xCAT network definitions.

View File

@@ -499,13 +499,13 @@ The operating system is installed on the internal disks.
#. Create file systems on shared disks
Run the ``mkfs.ext3`` command on the primary management node to create file systems on the shared disk that will contain the xCAT data. For example: ::
Run the ``mkfs.ext4`` command on the primary management node to create file systems on the shared disk that will contain the xCAT data. For example: ::
mkfs.ext3 -v /dev/sdc1
mkfs.ext3 -v /dev/sdc2
mkfs.ext3 -v /dev/sdc3
mkfs.ext3 -v /dev/sdc4
mkfs.ext3 -v /dev/sdc5
mkfs.ext4 -v /dev/sdc1
mkfs.ext4 -v /dev/sdc2
mkfs.ext4 -v /dev/sdc3
mkfs.ext4 -v /dev/sdc4
mkfs.ext4 -v /dev/sdc5
If you place entries for the disk in ``/etc/fstab``, which is not required, ensure that the entries do not have the system automatically mount the disk.

View File

@@ -3,7 +3,7 @@ Define Service Nodes
This next part shows how to configure a xCAT Hierarchy and provision xCAT service nodes from an existing xCAT cluster.
*The document assumes that the compute nodes that are part of your cluster have already been defined into the xCAT database and you have successfully provisioned the compute nodes using xCAT*
.. note:: The document assumes that the compute nodes that are part of your cluster have already been defined into the xCAT database and you have successfully provisioned the compute nodes using xCAT
The following table illustrates the cluster being used in this example:
@@ -42,7 +42,7 @@ The following table illustrates the cluster being used in this example:
chdef -t node -o r1n01,r2n01 -p groups=service
#. When ``copycds`` was run against the ISO image, several osimages are created into the ``osimage`` table. The ones named ``*-service`` are provided by easily help provision xCAT service nodes. ::
#. When ``copycds`` was run against the ISO image, several osimages were created into the ``osimage`` table. The ones named ``*-service`` are provided to easily help provision xCAT service nodes. ::
# lsdef -t osimage | grep rhels7.1
rhels7.1-ppc64le-install-compute (osimage)
@@ -58,14 +58,14 @@ The following table illustrates the cluster being used in this example:
setupconserver=2
**Tips/Hint**
* Even if you do not want xCAT to configure any services, you must define the service nodes in the ``servicenode`` table with at least one attribute, set to 0, otherwise xCAT will not recognize the node as a service node
* Even if you do not want xCAT to configure any services, you must define the service nodes in the ``servicenode`` table with at least one attribute, set to ``0``, otherwise xCAT will not recognize the node as a service node
* See the ``setup*`` attributes in the node definition man page for the list of available services: ``man node``
* For clusters with subnetted management networks, you might want to set ``setupupforward=1``
* For clusters with subnetted management networks, you might want to set ``setupipforward=1``
* For the ``setupconserver`` attribute, if ``conserver`` is used, set to ``1``, if ``goconserver`` is used, set to ``2``
#. Add additional postscripts for Service Nodes (optional)
By default, xCAT will execute the ``servicenode`` postscript when installed or diskless booted. This postscript will set up the necessary credentials and installs the xCAT software on the Service Nodes. If you have additional postscripts that you want to execute on the service nodes, copy to ``/install/postscripts`` and run the following: ::
By default, xCAT will execute the ``servicenode`` postscript when installed or diskless booted. This postscript will set up the necessary credentials and install the xCAT software on the Service Nodes. If you have additional postscripts that you want to execute on the service nodes, copy to ``/install/postscripts`` and run the following: ::
chdef -t group -o service -p postscripts=<mypostscript>
@@ -76,21 +76,21 @@ The following table illustrates the cluster being used in this example:
* ``servicenode`` - defines which Service Node the **Management Node** should send commands to (e.g ``xdsh``) and should be set to the hostname or IP address of the service node that the management node can contact it by.
* ``xcatmaster`` - defines which Service Node the **Compute Node** should boot from and should be set to the hostname or IP address of the service node that the compute node can contact it by.
You must set both ``servicenode`` and ``xcatmaster`` regardless of whether or not you are using service node pools, for most scenarios, the value will be identical. ::
You must set both ``servicenode`` and ``xcatmaster`` regardless of whether or not you are using service node pools. For most scenarios, the value will be identical. ::
chdef -t group -o rack1 servicenode=r1n01 xcatmaster=r1n01
chdef -t group -o rack2 servicenode=r2n01 xcatmaster=r2n01
#. Set the conserver and monserver attributes
#. Set the ``conserver`` and ``monserver`` attributes
Set which service node should run the conserver (console) and monserver (monitoring) daemon for the nodes in the group. The most typical setup is to have the service node also ad as it's conserver and monserver. ::
Set which service node should run the conserver (console) and monserver (monitoring) daemon for the nodes in the group. The most typical setup is to have the service node also act as it's conserver and monserver. ::
chdef -t group -o rack1 conserver=r1n01 monserver=r1n01
chdef -t group -o rack2 conserver=r2n01 monserver=r2n01
#. Choose location of ``/install`` and ``/tftpboot`` directories (optional).
The ``site`` table attributes ``installloc`` and ``sharedtftp`` control mounting of ``/install`` and ``/tftpboot`` directories from Management Node to Service node.
The ``site`` table attributes ``installloc`` and ``sharedtftp`` control mounting of ``/install`` and ``/tftpboot`` directories from Management Node to Service Node.
To mount ``/install`` and ``/tftpboot`` directories from Management node to each Service Node: ::

View File

@@ -3,7 +3,7 @@ IB Network Configuration
xCAT provides a script ``configib`` to help configure the Infiniband adapters on the compute nodes.
The Infiniband adapter is considered an additional interface for xCAT. The process for configuring Infiniband adapters complies with the process of :doc:`Configure Additional Network Interfaces <../../../../guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_second_adapter>`.
The Infiniband adapter is considered an additional interface for xCAT. The process for configuring Infiniband adapters complies with the process of :doc:`Configure Additional Network Interfaces <../../../../guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_network_adapter>`.
Below are an simple example to configure Mellanox IB in Ubuntu 14.04.1 on Power8 LE
@@ -25,12 +25,12 @@ If your target Mellanox IB adapter has 2 ports, and you plan to give port ib0 4
* To configure during node installation ::
chdef <node> -p postscripts="confignics --ibaports=2"
chdef <node> -p postscripts="confignetwork --ibaports=2"
nodeset <node> osimage=<osimagename>
rsetboot <node> net
rpower <node> reset
* To configure on a node which has had operating system ::
updatenode <node> -P "confignics --ibaports=2"
updatenode <node> -P "confignetwork --ibaports=2"

View File

@@ -59,7 +59,7 @@ author = u'IBM Corporation'
# The short X.Y version.
version = '2'
# The full version, including alpha/beta/rc tags.
release = '2.15.1'
release = '2.15.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -36,7 +36,7 @@ The partition file must follow the partitioning syntax of the respective install
* SLES: `Autoyast documentation <https://doc.opensuse.org/projects/autoyast/configuration.html#CreateProfile.Partitioning>`_
* Use yast2 autoyast in GUI or CLI mode to customize the installation options and create autoyast file
* Use yast2 clone_system to create autoyast configuration file /root/autoinst.xml to clone an existing system
* Use yast2 clone_system to create autoyast configuration file ``/root/autoinst.xml`` to clone an existing system
* Ubuntu: `Preseed documentation <https://www.debian.org/releases/stable/i386/apbs04.en.html#preseed-partman>`_
@@ -107,7 +107,7 @@ Here is partition definition file example for SLES standard partition in X86_64
</partition>
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">ext3</filesystem>
<filesystem config:type="symbol">ext4</filesystem>
<format config:type="boolean">true</format>
<mount>/</mount>
<mountby config:type="symbol">path</mountby>
@@ -131,7 +131,7 @@ The following is an example of a partition definition file for a SLES LVM Partit
<partition>
<create config:type="boolean">true</create>
<crypt_fs config:type="boolean">false</crypt_fs>
<filesystem config:type="symbol">ext3</filesystem>
<filesystem config:type="symbol">ext4</filesystem>
<format config:type="boolean">true</format>
<loop_fs config:type="boolean">false</loop_fs>
<mountby config:type="symbol">device</mountby>
@@ -148,7 +148,7 @@ The following is an example of a partition definition file for a SLES LVM Partit
<partition>
<create config:type="boolean">true</create>
<crypt_fs config:type="boolean">false</crypt_fs>
<filesystem config:type="symbol">ext3</filesystem>
<filesystem config:type="symbol">ext4</filesystem>
<format config:type="boolean">true</format>
<loop_fs config:type="boolean">false</loop_fs>
<mount>/boot</mount>
@@ -211,7 +211,7 @@ The following is an example of a partition definition file for a SLES LVM Partit
<partition>
<create config:type="boolean">true</create>
<crypt_fs config:type="boolean">false</crypt_fs>
<filesystem config:type="symbol">ext3</filesystem>
<filesystem config:type="symbol">ext4</filesystem>
<format config:type="boolean">true</format>
<loop_fs config:type="boolean">false</loop_fs>
<lv_name>root</lv_name>
@@ -248,7 +248,7 @@ Here is partition definition file example for SLES standard partition in ppc64 m
<partition>
<create config:type="boolean">true</create>
<crypt_fs config:type="boolean">false</crypt_fs>
<filesystem config:type="symbol">ext3</filesystem>
<filesystem config:type="symbol">ext4</filesystem>
<format config:type="boolean">false</format>
<loop_fs config:type="boolean">false</loop_fs>
<mountby config:type="symbol">device</mountby>
@@ -274,7 +274,7 @@ Here is partition definition file example for SLES standard partition in ppc64 m
<partition>
<create config:type="boolean">true</create>
<crypt_fs config:type="boolean">false</crypt_fs>
<filesystem config:type="symbol">ext3</filesystem>
<filesystem config:type="symbol">ext4</filesystem>
<format config:type="boolean">true</format>
<fstopt>acl,user_xattr</fstopt>
<loop_fs config:type="boolean">false</loop_fs>
@@ -328,19 +328,19 @@ Here is partition definition file example for Ubuntu standard partition in x86_6
filesystem{ vfat }
mountpoint{ /boot/efi } .
256 256 512 ext3
256 256 512 ext4
$primary{ }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext3 }
filesystem{ ext4 }
mountpoint{ /boot } .
64 512 300% linux-swap
method{ swap }
format{ } .
512 1024 4096 ext3
512 1024 4096 ext4
$primary{ }
method{ format }
format{ }
@@ -348,7 +348,7 @@ Here is partition definition file example for Ubuntu standard partition in x86_6
filesystem{ ext4 }
mountpoint{ / } .
100 10000 1000000000 ext3
100 10000 1000000000 ext4
method{ format }
format{ }
use_filesystem{ }
@@ -376,13 +376,13 @@ To generate the configuration, run the ``nodeset`` command: ::
.. BEGIN_Partition_Definition_Script_overview
Create a shell script that will be run on the node during the install process to dynamically create the disk partitioning definition. This script will be run during the OS installer %pre script on RedHat or preseed/early_command on Unbuntu execution and must write the correct partitioning definition into the file /tmp/partitionfile on the node
Create a shell script that will be run on the node during the install process to dynamically create the disk partitioning definition. This script will be run during the OS installer %pre script on RedHat or preseed/early_command on Unbuntu execution and must write the correct partitioning definition into the file ``/tmp/partitionfile`` on the node
.. END_Partition_Definition_Script_overview
.. BEGIN_Partition_Definition_Script_Create_partition_script_content
The purpose of the partition script is to create the /tmp/partionfile that will be inserted into the kickstart/autoyast/preseed template, the script could include complex logic like select which disk to install and even configure RAID, etc
The purpose of the partition script is to create the ``/tmp/partionfile`` that will be inserted into the kickstart/autoyast/preseed template, the script could include complex logic like select which disk to install and even configure RAID, etc
**Note**: the partition script feature is not thoroughly tested on SLES, there might be problems, use this feature on SLES at your own risk.
@@ -403,7 +403,7 @@ Here is an example of the partition script on RedHat and SLES, the partitioning
else
FSTYPE=ext3
fi
BOOTFSTYPE=ext3
BOOTFSTYPE=ext4
EFIFSTYPE=vfat
if uname -r|grep ^3.*el7 > /dev/null; then
FSTYPE=xfs
@@ -429,21 +429,21 @@ Here is an example of the partition script on RedHat and SLES, the partitioning
.. BEGIN_Partition_Definition_Script_Create_partition_script_example_ubuntu
The following is an example of the partition script on Ubuntu, the partitioning script is /install/custom/my-partitions.sh: ::
The following is an example of the partition script on Ubuntu, the partitioning script is ``/install/custom/my-partitions.sh``: ::
if [ -d /sys/firmware/efi ]; then
echo "ubuntu-efi ::" > /tmp/partitionfile
echo " 512 512 1024 fat16" >> /tmp/partitionfile
echo " 512 512 1024 fat32" >> /tmp/partitionfile
echo ' $iflabel{ gpt } $reusemethod{ } method{ efi } format{ }' >> /tmp/partitionfile
echo " ." >> /tmp/partitionfile
else
echo "ubuntu-boot ::" > /tmp/partitionfile
echo "100 50 100 ext3" >> /tmp/partitionfile
echo ' $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ /boot }' >> /tmp/partitionfile
echo "100 50 100 ext4" >> /tmp/partitionfile
echo ' $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot }' >> /tmp/partitionfile
echo " ." >> /tmp/partitionfile
fi
echo "500 10000 1000000000 ext3" >> /tmp/partitionfile
echo " method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ / }" >> /tmp/partitionfile
echo "500 10000 1000000000 ext4" >> /tmp/partitionfile
echo " method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / }" >> /tmp/partitionfile
echo " ." >> /tmp/partitionfile
echo "2048 512 300% linux-swap" >> /tmp/partitionfile
echo " method{ swap } format{ }" >> /tmp/partitionfile
@@ -458,9 +458,9 @@ Run below commands to associate partition script with osimage: ::
chdef -t osimage <osimagename> partitionfile='s:/install/custom/my-partitions.sh'
nodeset <nodename> osimage=<osimage>
- The "s:" preceding the filename tells nodeset that this is a script.
- For RedHat, when nodeset runs and generates the /install/autoinst file for a node, it will add the execution of the contents of this script to the %pre section of that file. The nodeset command will then replace the #XCAT_PARTITION_START#...#XCAT_PARTITION_END# directives from the osimage template file with "%include /tmp/partitionfile" to dynamically include the tmp definition file your script created.
- For Ubuntu, when nodeset runs and generates the /install/autoinst file for a node, it will replace the "#XCA_PARTMAN_RECIPE_SCRIPT#" directive and add the execution of the contents of this script to the /install/autoinst/<node>.pre, the /install/autoinst/<node>.pre script will be run in the preseed/early_command.
- The ``s:`` preceding the filename tells nodeset that this is a script.
- For RedHat, when nodeset runs and generates the ``/install/autoinst`` file for a node, it will add the execution of the contents of this script to the %pre section of that file. The ``nodeset`` command will then replace the ``#XCAT_PARTITION_START#...#XCAT_PARTITION_END#`` directives from the osimage template file with ``%include /tmp/partitionfile`` to dynamically include the tmp definition file your script created.
- For Ubuntu, when nodeset runs and generates the ``/install/autoinst`` file for a node, it will replace the ``#XCA_PARTMAN_RECIPE_SCRIPT#`` directive and add the execution of the contents of this script to the ``/install/autoinst/<node>.pre``, the ``/install/autoinst/<node>.pre`` script will be run in the preseed/early_command.
.. END_Partition_Definition_Script_Associate_partition_script_with_osimage_common
@@ -477,14 +477,14 @@ If not specified, the default value will be used.
chdef -t osimage <osimagename> -p partitionfile='d:/install/custom/partitiondisk'
nodeset <nodename> osimage=<osimage>
- the 'd:' preceding the filename tells nodeset that this is a partition disk file.
- For Ubuntu, when nodeset runs and generates the /install/autoinst file for a node, it will generate a script to write the content of the partition disk file to /tmp/install_disk, this context to run the script will replace the #XCA_PARTMAN_DISK_SCRIPT# directive in /install/autoinst/<node>.pre.
- the ``d:`` preceding the filename tells nodeset that this is a partition disk file.
- For Ubuntu, when nodeset runs and generates the ``/install/autoinst`` file for a node, it will generate a script to write the content of the partition disk file to ``/tmp/install_disk``, this context to run the script will replace the ``#XCA_PARTMAN_DISK_SCRIPT#`` directive in ``/install/autoinst/<node>.pre``.
.. END_Partition_Disk_File_ubuntu_only
.. BEGIN_Partition_Disk_Script_ubuntu_only
The disk script contains a script to generate a partitioning disk file named "/tmp/install_disk". for example: ::
The disk script contains a script to generate a partitioning disk file named ``/tmp/install_disk``. for example: ::
rm /tmp/devs-with-boot 2>/dev/null || true;
for d in $(list-devices partition); do
@@ -512,8 +512,8 @@ If not specified, the default value will be used.
chdef -t osimage <osimagename> -p partitionfile='s:d:/install/custom/partitiondiskscript'
nodeset <nodename> osimage=<osimage>
- the 's:' prefix tells nodeset that is a script, the 's:d:' preceding the filename tells nodeset that this is a script to generate the partition disk file.
- For Ubuntu, when nodeset runs and generates the /install/autoinst file for a node, this context to run the script will replace the #XCA_PARTMAN_DISK_SCRIPT# directive in /install/autoinst/<node>.pre.
- the ``s:`` prefix tells ``nodeset`` that is a script, the ``s:d:`` preceding the filename tells ``nodeset`` that this is a script to generate the partition disk file.
- For Ubuntu, when nodeset runs and generates the ``/install/autoinst`` file for a node, this context to run the script will replace the ``#XCA_PARTMAN_DISK_SCRIPT#`` directive in ``/install/autoinst/<node>.pre``.
.. END_Partition_Disk_Script_ubuntu_only
@@ -522,7 +522,7 @@ If not specified, the default value will be used.
To support other specific partition methods such as RAID or LVM in Ubuntu, some additional preseed configuration entries should be specified.
If using file way, 'c:<the absolute path of the additional preseed config file>', the additional preseed config file contains the additional preseed entries in "d-i ..." syntax. When "nodeset", the #XCA_PARTMAN_ADDITIONAL_CFG# directive in /install/autoinst/<node> will be replaced with content of the config file. For example: ::
If using file way, ``c:<the absolute path of the additional preseed config file>``, the additional preseed config file contains the additional preseed entries in ``d-i ...`` syntax. When ``nodeset``, the ``#XCA_PARTMAN_ADDITIONAL_CFG#`` directive in ``/install/autoinst/<node>`` will be replaced with content of the config file. For example: ::
d-i partman-auto/method string raid
d-i partman-md/confirm boolean true

View File

@@ -40,7 +40,7 @@ An example ``localdisk`` configuration file: ::
[localspace]
dev=/dev/sda1
fstype=ext3
fstype=ext4
[swapspace]
dev=/dev/sda2
@@ -55,7 +55,7 @@ The ``[disk]`` section is used to configure how to partition a hard disk:
* dev: The path of the device file.
* clear: If set to ``yes`` it will clear all the existing partitions on this disk.
* ptype: The partition table type of the disk. For example, ``msdos`` or ``gpt``, and ``msdos`` is the default.
* fstype: The file system type for the new created partitions. ``ext3`` is the default.
* fstype: The file system type for the new created partitions. ``ext4`` is the default.
* parts: A comma separated list of space ranges, one for each partition that will be created on the device. The valid format for each space range is ``<startpoint>-<endpoint>`` or ``<percentage of the disk>``. For example, you could set it to ``100M-10G`` or ``50``. If set to ``50``, 50% of the disk space will be assigned to that partition.
The ``[localspace]`` section is used to specify which partition will be used as local storage for the node.

View File

@@ -86,4 +86,4 @@ The default driver list: ::
Note: With this approach, xCAT will search for the drivers in the rootimage. You need to make sure the drivers have been included in the rootimage before generating the initrd. You can install the drivers manually in an existing rootimage (using chroot) and run genimage again, or you can use a postinstall script to install drivers to the rootimage during your initial genimage run.
Use the driver rpm package to add new drivers from rpm packages to the diskless initrd. Refer to the :doc:`/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_second_adapter` for details.
Use the driver rpm package to add new drivers from rpm packages to the diskless initrd. Refer to the :doc:`/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_network_adapter` for details.

View File

@@ -5,9 +5,9 @@ The following example sets the xCAT properties for compute node ``cn1`` to creat
* Compute node ``cn1`` with two physical NICs: ``eth0`` and ``eth1``
* Management network is ``11.1.89.0``, application network is ``13.1.89.0``
* The install NIC is eth0, and application NIC is eth1
* Assign static ip ``11.1.89.7/24`` to eth0
* Assign static ip ``13.1.89.7/24`` to eth1
* The install NIC is ``eth0``, and application NIC is ``eth1``
* Assign static ip ``11.1.89.7/24`` to ``eth0``
* Assign static ip ``13.1.89.7/24`` to ``eth1``
Add/update networks into the xCAT DB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -22,11 +22,11 @@ Add/update additional networks ``net11`` and ``net13`` into ``networks`` table::
Define Adapters in the nics table
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#. Provision ip is coming from DHCP, there is no need to configure install nic into ``nics`` table. Provision ip can be configured in node definition, but it is not required. ::
#. The install NIC ``eth0`` on the management network will get an IP via DHCP, which will be the value of the ``ip`` attribute in the node definition. There is no need to configure install NIC into ``nics`` table. ::
chdef cn1 ip=11.1.89.7
#. Data NIC ``eth1`` is not install NIC, configure ``eth1`` into ``nics`` table ::
#. Application NIC ``eth1`` on the application network is different from install NIC ``eth0``, and will get its IP assigned from the ``eth1`` definition in the ``nics`` table ::
chdef cn1 nicips.eth1="13.1.89.7" nicnetworks.eth1="net13" nictypes.eth1="Ethernet" nichostnamesuffixes.eth1=-eth1
@@ -56,7 +56,7 @@ Configure adapters with static IPs
updatenode cn1 -P "confignetwork -s"
#. If install NIC is not configured in ``nics`` table, and only configure all other NIC's data defined in ``nics`` table, execute ``confignetwork`` without ``-s``
#. If install NIC is not configured in ``nics`` table, execute ``confignetwork`` without ``-s`` to only configure NICs defined in ``nics`` table
a. Add ``confignetwork`` into postscript list to execute on reboot ::
@@ -66,7 +66,7 @@ Configure adapters with static IPs
updatenode cn1 -P "confignetwork"
.. note:: Option ``-s`` writes the install NIC's information into configuration file for persistence. All other NIC's data defined in ``nics`` table will be written also. Without option ``-s``, ``confignetwork`` only configures all NIC's data defined in ``nics`` table.
.. note:: Option ``-s`` writes the install NIC's information into configuration file for persistence. All other NIC's data defined in ``nics`` table will be written also. Without option ``-s``, ``confignetwork`` only configures NIC's data defined in ``nics`` table.
Check result
~~~~~~~~~~~~

View File

@@ -9,7 +9,7 @@ Use ``nicextraparams`` to customize attributes in NIC configuration file. For ex
chdef cn1 nicextraparams.eth1="MTU=1456 ONBOOT=no"
#. After ``confignetwork`` is executed in ``cn1``, ``nicexraparams`` will overwrite the original value in ``/etc/sysconfig/network-scripts/ifcfg-eth1`` as ::
#. After ``confignetwork`` is executed in ``cn1``, ``nicextraparams`` will overwrite the original value in ``/etc/sysconfig/network-scripts/ifcfg-eth1`` as ::
DEVICE=eth1
IPADDR=13.1.89.7

View File

@@ -1,133 +0,0 @@
Configure Additional Network Interfaces old version - confignics - (deprecated)
===============================================================================
**"confignics" is deprecated, recommend using new version "confignetwork" instead.**
The **nics** table and the **confignics** postscript can be used to automatically configure additional network interfaces (multiple ethernets adapters, InfiniBand, etc) on the nodes as they are being deployed.
The way the confignics postscript decides what IP address to give the secondary adapter is by checking the nics table, in which the nic configuration information is stored.
To use the nics table and confignics postscript to define a secondary adapter on one or more nodes, follow these steps:
Define configuration information for the Secondary Adapters in the nics table
-----------------------------------------------------------------------------
There are 3 ways to complete this operation.
1. Using the ``mkdef`` and ``chdef`` commands ::
# mkdef cn1 groups=all nicips.eth1="11.1.89.7|12.1.89.7" nicnetworks.eth1="net11|net12" nictypes.eth1="Ethernet"
1 object definitions have been created or modified.
# chdef cn1 nicips.eth2="13.1.89.7|14.1.89.7" nicnetworks.eth2="net13|net14" nictypes.eth2="Ethernet"
1 object definitions have been created or modified.
2. Using an xCAT stanza file
- Prepare a stanza file ``<filename>.stanza`` with content similiar to the following: ::
# <xCAT data object stanza file>
cn1:
objtype=node
arch=x86_64
groups=kvm,vm,all
nichostnamesuffixes.eth1=-eth1-1|-eth1-2
nichostnamesuffixes.eth2=-eth2-1|-eth2-2
nicips.eth1=11.1.89.7|12.1.89.7
nicips.eth2=13.1.89.7|14.1.89.7
nicnetworks.eth1=net11|net12
nicnetworks.eth2=net13|net14
nictypes.eth1=Ethernet
nictypes.eth2=Ethernet
- Using the ``mkdef -z`` option, define the stanza file to xCAT: ::
# cat <filename>.stanza | mkdef -z
3. Using ``tabedit`` to edit the ``nics`` database table directly
The ``tabedit`` command opens the specified xCAT database table in a vi like editor and allows the user to edit any text and write the changes back to the database table.
*WARNING:* Using the ``tabedit`` command is not the recommended method because it is tedious and error prone.
After changing the content of the ``nics`` table, here is the result from ``tabdump nics`` ::
# tabdump nics
#node,nicips,nichostnamesuffixes,nictypes,niccustomscripts,nicnetworks,nicaliases,comments,disable
"cn1","eth1!11.1.89.7|12.1.89.7,eth2!13.1.89.7|14.1.89.7","eth1!-eth1-1|-eth1-2,eth2!-eth2-1|-eth2-2,"eth1!Ethernet,eth2!Ethernet",,"eth1!net11|net12,eth2!net13|net14",,,
After you have defined the configuration information in any of the ways above, run the ``makehosts`` command to add the new configuration to the ``/etc/hosts`` file. ::
# makehosts cn1
# cat /etc/hosts
11.1.89.7 cn1-eth1-1 cn1-eth1-1.ppd.pok.ibm.com
12.1.89.7 cn1-eth1-2 cn1-eth1-2.ppd.pok.ibm.com
13.1.89.7 cn1-eth2-1 cn1-eth2-1.ppd.pok.ibm.com
14.1.89.7 cn1-eth2-2 cn1-eth2-2.ppd.pok.ibm.com
Add confignics into the node's postscripts list
-----------------------------------------------
Use command below to add confignics into the node's postscripts list ::
chdef cn1 -p postscripts=confignics
**NOTE**: ``confignics`` is deprecated, you can also use ``chdef cn1 -p postscripts=confignetwork`` instead above ``chdef`` command.
By default, confignics does not configure the install nic. if need, using flag "-s" to allow the install nic to be configured. ::
chdef cn1 -p prostscripts="confignics -s"
Option "-s" writes the install nic's information into configuration file for persistence. All install nic's data defined in nics table will be written also.
**NOTE**: ``confignics`` is deprecated, you can also use ``chdef cn1 -p postscripts="confignetwork -s"`` instead above ``chdef`` command.
Add network object into the networks table
------------------------------------------
The ``nicnetworks`` attribute only defines the nic that uses the IP address.
Other information about the network should be defined in the ``networks`` table.
Use the ``tabedit`` command to add/modify the networks in the``networks`` table ::
tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
...
"net11", "11.1.89.0", "255.255.255.0", "eth1",,,,,,,,,,,,,,,,
"net12", "12.1.89.0", "255.255.255.0", "eth1",,,,,,,,,,,,,,,,
"net13", "13.1.89.0", "255.255.255.0", "eth2",,,,,,,,,,,,,,,,
"net14", "14.1.89.0", "255.255.255.0", "eth2",,,,,,,,,,,,,,,,
Option -r to remove the undefined NICS
--------------------------------------
If the compute node's nics were configured by ``confignics`` and the nics configuration changed in the nics table, user the ``confignics -r`` to remove the undefined nic.
For example, if on a compute node the ``eth0``, ``eth1``, and ``eth2`` nics were configured: ::
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e6
...
eth1 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e7
...
eth2 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e8
...
Delete the eth2 definition in nics table using the ``chdef`` command.
Then run the following to remove the undefined ``eth2`` nic on the compute node: ::
updatenode <noderange> -P "confignics -r"
The result should have ``eth2`` disabled: ::
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e6
...
eth1 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e7
...
Deleting the ``installnic`` will result in strange problems, so ``confignics -r`` will not delete the nic set as the ``installnic``.

View File

@@ -632,7 +632,7 @@ This is an example of the generated postscript for a servicenode install. It is
export NETMASK
GATEWAY=10.2.0.100
export GATEWAY
# NIC related attributes for the node for confignics postscript
# NIC related attributes for the node for confignetwork postscript
NICIPS=""
export NICIPS
NICHOSTNAMESUFFIXES=""

View File

@@ -90,7 +90,7 @@ Deploy Diskful Nodes with RAID1 Setup on SLES
xCAT provides one sample autoyast template files with the RAID1 settings ``/opt/xcat/share/xcat/install/sles/service.raid1.sles11.tmpl``. You can customize the template file and put it under ``/install/custom/install/<platform>/`` if the default one does not match your requirements.
Here is the RAID1 partitioning section in service.raid1.sles11.tmpl: ::
Here is the RAID1 partitioning section in ``service.raid1.sles11.tmpl``: ::
<partitioning config:type="list">
<drive>
@@ -188,13 +188,13 @@ The samples above created one 24MB PReP partition on each disk, one 2GB mirrored
Since the PReP partition can not be mirrored between the two disks, some additional postinstall commands should be run to make the second disk bootable, here the commands needed to make the second disk bootable: ::
# Set the second disk to be bootable for RAID1 setup
parted -s /dev/sdb mkfs 1 fat16
parted -s /dev/sdb mkfs 1 fat32
parted /dev/sdb set 1 type 6
parted /dev/sdb set 1 boot on
dd if=/dev/sda1 of=/dev/sdb1
bootlist -m normal sda sdb
The procedure listed above has been added to the file ``/opt/xcat/share/xcat/install/scripts/post.sles11.raid1`` to make it be automated. The autoyast template file service.raid1.sles11.tmpl will include the content of post.sles11.raid1, so no manual steps are needed here.
The procedure listed above has been added to the file ``/opt/xcat/share/xcat/install/scripts/post.sles11.raid1`` to make it be automated. The autoyast template file ``service.raid1.sles11.tmpl`` will include the content of ``post.sles11.raid1``, so no manual steps are needed here.
After the diskful nodes are up and running, you can check the RAID1 settings with the following commands:
@@ -230,9 +230,9 @@ The command mdadm can query the detailed configuration for the RAID partitions:
Disk Replacement Procedure
--------------------------
If any one disk fails in the RAID1 array, do not panic. Follow the procedure listed below to replace the failed disk and you will be fine.
If any one disk fails in the RAID1 array, do not panic. Follow the procedure listed below to replace the failed disk.
Faulty disks should appear marked with an (F) if you look at ``/proc/mdstat``: ::
Faulty disks should appear marked with an ``(F)`` if you look at ``/proc/mdstat``: ::
# cat /proc/mdstat
Personalities : [raid1]
@@ -248,7 +248,7 @@ Faulty disks should appear marked with an (F) if you look at ``/proc/mdstat``: :
unused devices: <none>
We can see that the first disk is broken because all the RAID partitions on this disk are marked as (F).
We can see that the first disk is broken because all the RAID partitions on this disk are marked as ``(F)``.
Remove the failed disk from RAID array
---------------------------------------
@@ -271,7 +271,7 @@ Here is the example of removing failed disk from the RAID1 array in the multipat
mdadm --manage /dev/md1 --remove /dev/dm-8
mdadm --manage /dev/md2 --remove /dev/dm-11
After the failed disk is removed from the RAID1 array, the partitions on the failed disk will be removed from ``/proc/mdstat`` and the "mdadm --detail" output also. ::
After the failed disk is removed from the RAID1 array, the partitions on the failed disk will be removed from ``/proc/mdstat`` and the ``mdadm --detail`` output also. ::
# cat /proc/mdstat
Personalities : [raid1]
@@ -332,7 +332,7 @@ For the multipath configuration, here is an example: ::
sfdisk -d /dev/dm-1 | sfdisk /dev/dm-0
If you got error message "sfdisk: I don't like these partitions - nothing changed.", you can add "--force" option to the sfdisk command: ::
If you got error message "sfdisk: I don't like these partitions - nothing changed.", you can add ``--force`` option to the ``sfdisk`` command: ::
sfdisk -d /dev/sdb | sfdisk /dev/sda --force
@@ -412,7 +412,7 @@ If the new disk does not have a PReP partition or the PReP partition has some pr
* **[SLES]**::
parted -s /dev/sda mkfs 1 fat16
parted -s /dev/sda mkfs 1 fat32
parted /dev/sda set 1 type 6
parted /dev/sda set 1 boot on
dd if=/dev/sdb1 of=/dev/sda1

View File

@@ -13,10 +13,9 @@ If configuring VLAN, BOND, or BRIDGES, ``nicdevices`` in ``nics`` table must be
The following scenarios are examples to configure Ethernet adapters/BOND/VLAN/Bridge.
#. Configure Ethernet adapters:
#. Configure static install or application Ethernet adapters:
* Scenario 1: :doc:`Configure Ethernet Network Interface <../../../../common/deployment/network/cfg_network_ethernet_nic>`
To configure Ethernet install NIC or other Ethernet network adapters as static
#. Configure BOND **[RHEL]**:

View File

@@ -1,2 +0,0 @@
.. include:: ../../../../common/deployment/network/cfg_second_adapter.rst

View File

@@ -7,5 +7,4 @@ This section describes how to configure network adapters with persistent configu
:maxdepth: 1
cfg_network_adapter.rst
cfg_second_adapter.rst
cfg_routes.rst

View File

@@ -13,10 +13,9 @@ If configuring VLAN, BOND, or BRIDGES, ``nicdevices`` in ``nics`` table must be
The following scenarios are examples to configure Ethernet adapters/BOND/VLAN/Bridge.
#. Configure Ethernet adapters:
#. Configure static install or application Ethernet adapters:
* Scenario 1: :doc:`Configure Ethernet Network Interface <../../../../common/deployment/network/cfg_network_ethernet_nic>`
To configure Ethernet install NIC or other Ethernet network adapters as static
#. Configure BOND **[RHEL]**:

View File

@@ -1,2 +0,0 @@
.. include:: ../../../../common/deployment/network/cfg_second_adapter.rst

View File

@@ -7,5 +7,4 @@ This section describes how to configure network adapters with persistent configu
:maxdepth: 1
cfg_network_adapter.rst
cfg_second_adapter.rst
cfg_routes.rst

View File

@@ -23,7 +23,7 @@ SYNOPSIS
\ **bmcdiscover**\ [\ **-v | -**\ **-version**\ ]
\ **bmcdiscover**\ \ **-**\ **-range**\ \ *ip_ranges*\ [\ **-**\ **-sn**\ \ *SN_nodename*\ ] [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ]
\ **bmcdiscover**\ \ **-**\ **-range**\ \ *ip_ranges*\ [\ **-**\ **-sn**\ \ *SN_nodename*\ ] [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-n**\ \ *new_bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ]
***********
@@ -37,7 +37,7 @@ The command uses \ **nmap**\ to scan active nodes over a specified IP range. T
\ **Note:**\ The scan method currently supported is \ **nmap**\ .
\ **Note:**\ Starting on January 1, 2020, some newly shipped systems will require the default BMC password to be changed before they can be managed by xCAT. \ **bmcdiscover**\ will not be able to discover such systems. Run \ */opt/xcat/share/xcat/scripts/BMC_change_password.sh*\ script to change the default password for BMCs in specified range, then rerun \ **bmcdiscover**\ with \ **-p "new bmc password"**\ flag to discover systems with the changed password.
\ **Note:**\ Starting on January 1, 2020, some newly shipped systems will require the default BMC password to be changed before they can be managed by xCAT. Use \ **bmcdiscover**\ with \ **-n**\ option to specify new BMC password.
*******
@@ -88,6 +88,12 @@ OPTIONS
\ **-n|-**\ **-newbmcpw**\
New BMC user password.
\ **-h|-**\ **-help**\
Display usage message
@@ -165,6 +171,14 @@ Output is similar to:
bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z
5. Discover the BMC with the specified IP address, change its default BMC password and display in xCAT stanza format:
.. code-block:: perl
bmcdiscover --range "10.4.22-23.100" -u root -p 0penBmc -n 0penBmc123 -z
********
SEE ALSO

View File

@@ -29,7 +29,7 @@ DESCRIPTION
***********
This command is used to create xCAT object definitions which are stored in the xCAT database. If the definition already exists it will return an error message. The force option may be used to re-create a definition. In this case the old definition will be remove and the new definition will be created.
The \ **mkdef**\ command is used to create xCAT object definitions which are stored in the xCAT database. If the definition already exists it will return an error message. The \ **-**\ **-force**\ option may be used to re-create a definition. In this case the old definition will be remove and the new definition will be created.
*******
@@ -40,15 +40,15 @@ OPTIONS
\ *attr=val [attr=val ...]*\
Specifies one or more "attribute equals value" pairs, separated by spaces. Attr=val pairs must be specified last on the command line. Use the help option to get a list of valid attributes for each object type.
Specifies one or more "attribute equals value" pairs, separated by spaces. \ *attr=val*\ pairs must be specified last on the command line. Use the \ **-**\ **-help**\ option to get a list of valid attributes for each object type.
Note: when creating node object definitions, the 'groups' attribute is required.
Note: when creating node object definitions, the \ **groups**\ attribute is required.
\ **-d|-**\ **-dynamic**\
Use the dynamic option to create dynamic node groups. This option must be used with -w option.
Use the dynamic option to create dynamic node groups. This option must be used with \ **-w**\ option.
@@ -66,7 +66,7 @@ OPTIONS
\ *noderange*\
A set of comma delimited node names and/or group names. (must be the first parameter) See the "noderange" man page for details on supported formats.
A set of comma delimited node names and/or group names. (must be the first parameter) See the <noderange> man page for details on supported formats.
@@ -78,7 +78,7 @@ OPTIONS
\ **-t**\ \ *object-types*\
A set of comma delimited object types. Use the help option to get a list of valid object types.
A set of comma delimited object types. Use the \ **-**\ **-help**\ option to get a list of valid object types.
@@ -96,30 +96,43 @@ OPTIONS
\ **-w**\ \ *attr==val*\ \ **-w**\ \ *attr=~val*\ ...
Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. For mkdef command, the -w flag only makes sense for creating dynamic node group. Use the help option to get a list of valid attributes for each object type.
Use one or multiple \ **-w**\ flags to specify the selection string that can be used to select objects. The operators \ **==**\ , \ **!=**\ , \ **=~**\ and \ **!~**\ are available. For \ **mkdef**\ command, the \ **-w**\ flag only makes sense for creating dynamic node group. Use the \ **-**\ **-help**\ option to get a list of valid attributes for each object type.
Operator descriptions:
== Select nodes where the attribute value is exactly this value.
!= Select nodes where the attribute value is not this specific value.
=~ Select nodes where the attribute value matches this regular expression.
!~ Select nodes where the attribute value does not match this regular expression.
Note: if the "val" fields includes spaces or any other characters that will be parsed by shell, the "attr<operator>val" needs to be quoted. If the operator is "!~", the "attr<operator>val" needs to be quoted using single quote.
\ **==**\ Select nodes where the attribute value is exactly this value.
\ **!=**\ Select nodes where the attribute value is not this specific value.
\ **=~**\ Select nodes where the attribute value matches this regular expression.
\ **!~**\ Select nodes where the attribute value does not match this regular expression.
Note: if the "val" field includes spaces or any other characters that will be parsed by shell, the "attr<operator>val" needs to be quoted. If the operator is \ **!~**\ , the "attr<operator>val" needs to be quoted using single quote.
\ **-z|-**\ **-stanza**\
Indicates that the file being piped to the command is in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
Indicates that the file being piped to the command is in stanza format. See the \ **xcatstanzafile**\ man page for details on using xCAT stanza files.
\ **-u**\
Fill in the attributes such as template file, pkglist file and otherpkglist file of osimage object based on the specified parameters. It will search "/install/custom/" directory first, and then "/opt/xcat/share/".
Fill in the attributes such as template file, pkglist file and otherpkglist file of osimage object based on the specified parameters. It will search \ **/install/custom/**\ directory first, and then \ **/opt/xcat/share/**\ .
The \ *provmethod*\ and \ *profile*\ must be specified. If \ *osvers*\ or \ *osarch*\ is not specified, the corresponding value of the management node will be used.
Note: this option only works for objtype \ **osimage**\ .
Note: this option only works for object type \ **osimage**\ .
@@ -310,6 +323,18 @@ EXAMPLES
15.
To create a dynamic group definition based on nodename, which will include all nodes named "fs2vm\*"
.. code-block:: perl
mkdef -t group mg_vms -d -w node=~"/fs2vm.*"
*****
FILES

View File

@@ -23,7 +23,7 @@ SYNOPSIS
\ **packimage [-v| -**\ **-version]**\
\ **packimage**\ [\ **-m | -**\ **-method**\ \ *cpio|tar*\ ] [\ **-c | -**\ **-compress**\ \ *gzip|pigz|xz*\ ] [\ **-**\ **-nosyncfiles**\ ] \ *imagename*\
\ **packimage**\ [\ **-m | -**\ **-method**\ \ **cpio|tar|squashfs**\ ] [\ **-c | -**\ **-compress**\ \ **gzip|pigz|xz**\ ] [\ **-**\ **-nosyncfiles**\ ] \ *imagename*\
***********
@@ -33,7 +33,7 @@ DESCRIPTION
Packs the stateless image from the chroot file system into a file to be sent to the node for a diskless boot.
Note: For an osimage that is deployed on a cluster, running packimage will overwrite the existing rootimage file and be unavailable to the compute nodes while packimage is running.
Note: For an osimage that is deployed on a cluster, running \ **packimage**\ will overwrite the existing rootimage file and be unavailable to the compute nodes while \ **packimage**\ is running.
**********
@@ -49,15 +49,36 @@ OPTIONS
*******
\ **-h**\ Display usage message.
\ **-v**\ Command Version.
\ **-h**\
Display usage message.
\ **-m| -**\ **-method**\ Archive Method (cpio,tar,squashfs, default is cpio)
\ **-c| -**\ **-compress**\ Compress Method (pigz,gzip,xz, default is pigz/gzip)
\ **-v**\
Command Version.
\ **-m| -**\ **-method**\
Archive Method (cpio, tar, squashfs (requires overlayFS or aufs modules during provisioning), default is cpio)
\ **-c| -**\ **-compress**\
Compress Method (pigz, gzip, xz, default is pigz/gzip)
\ **-**\ **-nosyncfiles**\
Bypass of syncfiles requested, will not sync files to root image directory
\ **-**\ **-nosyncfiles**\ Bypass of syncfiles requested, will not sync files to root image directory
************

View File

@@ -173,6 +173,11 @@ site Attributes:
the IP maps to your hostname of xCAT MN is not blocked since xCAT needs
to use this IP to communicate with the local NDS server on MN.
namedincludes: A comma-separated list of file paths that will be included in
named.conf, using named 'include' statement. This can allow users
to include local configuration options that will not be overwritten
by 'makedns -n'
-------------------------
HARDWARE CONTROL ATTRIBUTES
-------------------------

View File

@@ -0,0 +1,4 @@
Version,Release Date,New OS Supported,Release Notes
2.16.0,2020-06-17,,`2.16.0 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16_Release_Notes>`_
1 Version Release Date New OS Supported Release Notes
2 2.16.0 2020-06-17 `2.16.0 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16_Release_Notes>`_

View File

@@ -6,6 +6,15 @@ The following tables documents the xCAT release versions and release dates. For
.. tabularcolumns:: |p{1cm}|p{4cm}|p{7cm}|p{7cm}
xCAT 2.16.x
-----------
.. csv-table:: 2.16.x Release Information
:file: _files/2.16.x.csv
:header-rows: 1
:class: longtable
:widths: 1 1 1 1
xCAT 2.15.x
-----------

View File

@@ -4996,6 +4996,11 @@ sub rsync_to_image
next;
}
if ($line =~ /.+ -> \(.+\) .+/) # skip syncfile entries containing noderange
{
next;
}
$line=xCAT::Utils->varsubinline($line,\%osimgenv);
# process no more lines, do not exec

View File

@@ -1089,6 +1089,10 @@ passed as argument rather than by table value',
" NOTE: If using this attribute to block certain interfaces, make sure\n" .
" the IP maps to your hostname of xCAT MN is not blocked since xCAT needs\n" .
" to use this IP to communicate with the local NDS server on MN.\n\n" .
" namedincludes: A comma-separated list of file paths that will be included in\n" .
" named.conf, using named 'include' statement. This can allow users\n" .
" to include local configuration options that will not be overwritten\n" .
" by 'makedns -n'\n\n" .
" -------------------------\n" .
"HARDWARE CONTROL ATTRIBUTES\n" .
" -------------------------\n" .

View File

@@ -46,7 +46,9 @@ our %global_switch_type = (
Edgecore => "onie",
sLEN => "irpdu",
sIBM => "irpdu",
coral => "crpdu"
coral => "crpdu",
Dell => "Dell",
dell => "Dell"
);

View File

@@ -36,11 +36,17 @@ for parameter in $@; do
if [ $param_n -eq 2 ]; then
if [ "$parameter" != "-f" ] && [ "$parameter" != "-s" ]; then
CONSERVER=$parameter
# verify the specified CONSERVER can be resolved
host $CONSERVER > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error: cannot recognize parameter or conserver host \"$parameter\". Run \"rcons -h\" for usage."
exit 1
fi
fi
fi
if [ $param_n -ge 2 ]; then
if [ "$parameter" = "-f" ] || [ "$parameter" = "-s" ]; then
if [ "$parameter" == "-f" ] || [ "$parameter" == "-s" ]; then
if [ -z "$FORCE" ]; then
FORCE=$parameter
elif [ "$FORCE" != "$parameter" ]; then
@@ -52,7 +58,7 @@ for parameter in $@; do
if [ $param_n -ge 3 ]; then
if [ "$parameter" != "-f" ] && [ "$parameter" != "-s" ]; then
echo "Error: cannot recognize parameter \"$parameter\"."
echo "Error: cannot recognize parameter \"$parameter\". Run \"rcons -h\" for usage."
exit 1
fi
fi

View File

@@ -8,7 +8,7 @@ B<bmcdiscover> [B<-?>|B<-h>|B<--help>]
B<bmcdiscover> [B<-v>|B<--version>]
B<bmcdiscover> B<--range> I<ip_ranges> [B<--sn> I<SN_nodename>] [B<-s> I<scan_method>] [B<-u> I<bmc_user>] [B<-p> I<bmc_passwd>] [B<-z>] [B<-w>]
B<bmcdiscover> B<--range> I<ip_ranges> [B<--sn> I<SN_nodename>] [B<-s> I<scan_method>] [B<-u> I<bmc_user>] [B<-p> I<bmc_passwd>] [B<-n> I<new_bmc_passwd>] [B<-z>] [B<-w>]
=head1 DESCRIPTION
@@ -20,7 +20,7 @@ The command uses B<nmap> to scan active nodes over a specified IP range. The IP
B<Note:> The scan method currently supported is B<nmap>.
B<Note:> Starting on January 1, 2020, some newly shipped systems will require the default BMC password to be changed before they can be managed by xCAT. B<bmcdiscover> will not be able to discover such systems. Run I</opt/xcat/share/xcat/scripts/BMC_change_password.sh> script to change the default password for BMCs in specified range, then rerun B<bmcdiscover> with B<-p "new bmc password"> flag to discover systems with the changed password.
B<Note:> Starting on January 1, 2020, some newly shipped systems will require the default BMC password to be changed before they can be managed by xCAT. Use B<bmcdiscover> with B<-n> option to specify new BMC password.
=head1 OPTIONS
@@ -54,6 +54,10 @@ BMC user name.
BMC user password.
=item B<-n|--newbmcpw>
New BMC user password.
=item B<-h|--help>
Display usage message
@@ -102,6 +106,10 @@ Output is similar to:
bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z
5. Discover the BMC with the specified IP address, change its default BMC password and display in xCAT stanza format:
bmcdiscover --range "10.4.22-23.100" -u root -p 0penBmc -n 0penBmc123 -z
=head1 SEE ALSO
L<lsslp(1)|lsslp.1>

View File

@@ -11,7 +11,7 @@ B<mkdef> [B<-V>|B<--verbose>] [B<-t> I<object-types>] [B<--template> I<template-
=head1 DESCRIPTION
This command is used to create xCAT object definitions which are stored in the xCAT database. If the definition already exists it will return an error message. The force option may be used to re-create a definition. In this case the old definition will be remove and the new definition will be created.
The B<mkdef> command is used to create xCAT object definitions which are stored in the xCAT database. If the definition already exists it will return an error message. The B<--force> option may be used to re-create a definition. In this case the old definition will be remove and the new definition will be created.
=head1 OPTIONS
@@ -20,13 +20,13 @@ This command is used to create xCAT object definitions which are stored in the x
=item I<attr=val [attr=val ...]>
Specifies one or more "attribute equals value" pairs, separated by spaces. Attr=val pairs must be specified last on the command line. Use the help option to get a list of valid attributes for each object type.
Specifies one or more "attribute equals value" pairs, separated by spaces. I<attr=val> pairs must be specified last on the command line. Use the B<--help> option to get a list of valid attributes for each object type.
Note: when creating node object definitions, the 'groups' attribute is required.
Note: when creating node object definitions, the B<groups> attribute is required.
=item B<-d|--dynamic>
Use the dynamic option to create dynamic node groups. This option must be used with -w option.
Use the dynamic option to create dynamic node groups. This option must be used with B<-w> option.
=item B<-f|--force>
@@ -38,7 +38,7 @@ Display usage message.
=item I<noderange>
A set of comma delimited node names and/or group names. (must be the first parameter) See the "noderange" man page for details on supported formats.
A set of comma delimited node names and/or group names. (must be the first parameter) See the <noderange> man page for details on supported formats.
=item B<-o> I<object-names>
@@ -46,7 +46,7 @@ A set of comma delimited object names.
=item B<-t> I<object-types>
A set of comma delimited object types. Use the help option to get a list of valid object types.
A set of comma delimited object types. Use the B<--help> option to get a list of valid object types.
=item B<--template> I<template-object-name>
@@ -58,26 +58,34 @@ Verbose mode.
=item B<-w> I<attr==val> B<-w> I<attr=~val> ...
Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. For mkdef command, the -w flag only makes sense for creating dynamic node group. Use the help option to get a list of valid attributes for each object type.
Use one or multiple B<-w> flags to specify the selection string that can be used to select objects. The operators B<==>, B<!=>, B<=~> and B<!~> are available. For B<mkdef> command, the B<-w> flag only makes sense for creating dynamic node group. Use the B<--help> option to get a list of valid attributes for each object type.
Operator descriptions:
== Select nodes where the attribute value is exactly this value.
!= Select nodes where the attribute value is not this specific value.
=~ Select nodes where the attribute value matches this regular expression.
!~ Select nodes where the attribute value does not match this regular expression.
Note: if the "val" fields includes spaces or any other characters that will be parsed by shell, the "attr<operator>val" needs to be quoted. If the operator is "!~", the "attr<operator>val" needs to be quoted using single quote.
=over 3
=item B<==> Select nodes where the attribute value is exactly this value.
=item B<!=> Select nodes where the attribute value is not this specific value.
=item B<=~> Select nodes where the attribute value matches this regular expression.
=item B<!~> Select nodes where the attribute value does not match this regular expression.
=back
Note: if the "val" field includes spaces or any other characters that will be parsed by shell, the "attr<operator>val" needs to be quoted. If the operator is B<!~>, the "attr<operator>val" needs to be quoted using single quote.
=item B<-z|--stanza>
Indicates that the file being piped to the command is in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
Indicates that the file being piped to the command is in stanza format. See the B<xcatstanzafile> man page for details on using xCAT stanza files.
=item B<-u>
Fill in the attributes such as template file, pkglist file and otherpkglist file of osimage object based on the specified parameters. It will search "/install/custom/" directory first, and then "/opt/xcat/share/".
Fill in the attributes such as template file, pkglist file and otherpkglist file of osimage object based on the specified parameters. It will search B</install/custom/> directory first, and then B</opt/xcat/share/>.
The I<provmethod> and I<profile> must be specified. If I<osvers> or I<osarch> is not specified, the corresponding value of the management node will be used.
Note: this option only works for objtype B<osimage>.
Note: this option only works for object type B<osimage>.
=back
@@ -179,6 +187,12 @@ To create a node definition from an existing node definition "cn1"
mkdef -t node cn2 --template cn1 ip=1.1.1.2 mac=42:3d:0a:05:27:0c
=item 15.
To create a dynamic group definition based on nodename, which will include all nodes named "fs2vm*"
mkdef -t group mg_vms -d -w node=~"/fs2vm.*"
=back

View File

@@ -8,13 +8,13 @@ B<packimage [-h| --help]>
B<packimage [-v| --version]>
B<packimage> [B<-m>|B<--method> I<cpio|tar>] [B<-c>|B<--compress> I<gzip|pigz|xz>] [B<--nosyncfiles>] I<imagename>
B<packimage> [B<-m>|B<--method> B<cpio|tar|squashfs>] [B<-c>|B<--compress> B<gzip|pigz|xz>] [B<--nosyncfiles>] I<imagename>
=head1 DESCRIPTION
Packs the stateless image from the chroot file system into a file to be sent to the node for a diskless boot.
Note: For an osimage that is deployed on a cluster, running packimage will overwrite the existing rootimage file and be unavailable to the compute nodes while packimage is running.
Note: For an osimage that is deployed on a cluster, running B<packimage> will overwrite the existing rootimage file and be unavailable to the compute nodes while B<packimage> is running.
=head1 PARAMETERS
@@ -22,17 +22,29 @@ I<imagename> specifies the name of a OS image definition to be used. The specifi
=head1 OPTIONS
=over 10
B<-h> Display usage message.
=item B<-h>
B<-v> Command Version.
Display usage message.
B<-m| --method> Archive Method (cpio,tar,squashfs, default is cpio)
=item B<-v>
B<-c| --compress> Compress Method (pigz,gzip,xz, default is pigz/gzip)
Command Version.
B<--nosyncfiles> Bypass of syncfiles requested, will not sync files to root image directory
=item B<-m| --method>
Archive Method (cpio, tar, squashfs (requires overlayFS or aufs modules during provisioning), default is cpio)
=item B<-c| --compress>
Compress Method (pigz, gzip, xz, default is pigz/gzip)
=item B<--nosyncfiles>
Bypass of syncfiles requested, will not sync files to root image directory
=back
=head1 RETURN VALUE

View File

@@ -512,6 +512,15 @@ for user in $BMCUS; do
done
ipmitool raw 6 0x43 $(($LANCHAN|176)) $USERSLOT 4
TRIES=0
if [ "$CURRENTUSER" != "$user" ]; then
# Change the user name, if necessary
while ! ipmitool -d $idev user set name $USERSLOT "$user"; do
sleep 1
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then break; fi
done
fi
TRIES=0
# Last param in ipmitool user priv is the channel to set it on.
@@ -543,15 +552,6 @@ for user in $BMCUS; do
if [ $TRIES -gt $TIMEOUT ]; then break; fi
done
TRIES=0
if [ "$CURRENTUSER" != "$user" ]; then
# Change the user name, if necessary
while ! ipmitool -d $idev user set name $USERSLOT "$user"; do
sleep 1
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then break; fi
done
fi
let idev=idev-1
done

View File

@@ -49,14 +49,14 @@ my $bmc_pass;
my $openbmc_user;
my $openbmc_pass;
my $done_num = 0;
$::P9_WITHERSPOON_MFG_ID = "42817";
$::P9_WITHERSPOON_PRODUCT_ID = "16975";
$::P9_MIHAWK_MFG_ID = "42817";
$::P9_MIHAWK_PRODUCT_ID = "1";
$::P9_AC922_MFG_ID = "42817"; #Witherspoon
$::P9_AC922_PRODUCT_ID = "16975";
$::P9_IC922_MFG_ID = "42817"; #Mihawk
$::P9_IC922_PRODUCT_ID = "1";
$::CHANGE_PW_REQUIRED="The password provided for this account must be changed before access is granted";
$::NO_SESSION="Unable to establish IPMI v2 / RMCP";
$::CHANGE_PW_INSTRUCTIONS_1="Run script '/opt/xcat/share/xcat/scripts/BMC_change_password.sh' to change default password";
$::CHANGE_PW_INSTRUCTIONS_2="Rerun 'bmcdiscover' command with '-p new_bmc_password' flag";
$::CHANGE_PW_INSTRUCTIONS_1="Rerun 'bmcdiscover' command with '-p default_bmc_password -n new_bmc_password' flag";
$::PW_PAM_VALIDATION="password value failed PAM validation checks";
$::NO_MFG_OR_PRODUCT_ID="Zeros returned for Manufacturer id and Product id";
%::VPDHASH = ();
my %node_in_list = ();
@@ -203,7 +203,7 @@ sub bmcdiscovery_usage {
push @{ $rsp->{data} }, "Usage:";
push @{ $rsp->{data} }, "\tbmcdiscover [-?|-h|--help]";
push @{ $rsp->{data} }, "\tbmcdiscover [-v|--version]";
push @{ $rsp->{data} }, "\tbmcdiscover --range ip_range <ip_range> [--sn <SN_nodename>] [-s <scan_method>] [-u <bmc_user>] [-p <bmc_passwd>] [-z] [-w]\n";
push @{ $rsp->{data} }, "\tbmcdiscover --range ip_range <ip_range> [--sn <SN_nodename>] [-s <scan_method>] [-u <bmc_user>] [-p <bmc_passwd>] [-n <new_bmc_passwd>] [-z] [-w]\n";
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
return 0;
@@ -248,6 +248,7 @@ sub bmcdiscovery_processargs {
'check' => \$::opt_C,
'bmcuser|u=s' => \$::opt_U,
'bmcpasswd|p=s' => \$::opt_P,
'newbmcpw|n=s' => \$::opt_N,
'ipsource' => \$::opt_S,
'version|v' => \$::opt_v,
't' => \$::opt_T,
@@ -749,6 +750,7 @@ sub scan_process {
# Set child process default, if not the function runcmd may return error
$SIG{CHLD} = 'DEFAULT';
TRY_TO_DISCOVER:
my $bmcusername;
my $bmcpassword;
$bmcusername = "-U $bmc_user" if ($bmc_user);
@@ -767,8 +769,8 @@ sub scan_process {
}
if ($mc_info =~ /Manufacturer ID\s*:\s*(\d+)\s*Manufacturer Name.+\s*Product ID\s*:\s*(\d+)/) {
xCAT::MsgUtils->trace(0, "D", "$log_label Found ${$live_ip}[$i] Manufacturer ID: $1 Product ID: $2");
if (($1 eq $::P9_WITHERSPOON_MFG_ID and $2 eq $::P9_WITHERSPOON_PRODUCT_ID) or
($1 eq $::P9_MIHAWK_MFG_ID and $2 eq $::P9_MIHAWK_PRODUCT_ID)) {
if (($1 eq $::P9_AC922_MFG_ID and $2 eq $::P9_AC922_PRODUCT_ID) or
($1 eq $::P9_IC922_MFG_ID and $2 eq $::P9_IC922_PRODUCT_ID)) {
bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command,$parent_fd,$2);
$is_openbmc = 1;
$is_ipmi = 0;
@@ -781,8 +783,8 @@ sub scan_process {
}
else {
# System replied to mc info but not with either
# $::P9_WITHERSPOON_MFG_ID and $::P9_WITHERSPOON_PRODUCT_ID, or
# $::P9_MIHAWK_MFG_ID and $::P9_MIHAWK_PRODUCT_ID,
# $::P9_AC922_MFG_ID and $::P9_AC922_PRODUCT_ID, or
# $::P9_IC922_MFG_ID and $::P9_IC922_PRODUCT_ID,
# assume IPMI
$is_openbmc = 0;
$is_ipmi = 1;
@@ -804,10 +806,32 @@ sub scan_process {
my $redfish_session_cmd = "curl -sD - --data '{\"UserName\":\"$openbmc_user\",\"Password\":\"$openbmc_pass\"}' -k -X POST https://${$live_ip}[$i]/redfish/v1/SessionService/Sessions";
my $redfish_session_info = xCAT::Utils->runcmd($redfish_session_cmd, -1);
if ($redfish_session_info =~ /$::CHANGE_PW_REQUIRED/) {
# RedFish session replied that password change is needed. Print instructions and exit
# RedFish session replied that password change is needed.
xCAT::MsgUtils->message("I", { data => ["${$live_ip}[$i]: $::CHANGE_PW_REQUIRED"] }, $::CALLBACK);
xCAT::MsgUtils->message("I", { data => ["$::CHANGE_PW_INSTRUCTIONS_1"] }, $::CALLBACK);
xCAT::MsgUtils->message("I", { data => ["$::CHANGE_PW_INSTRUCTIONS_2"] }, $::CALLBACK);
if ($::opt_N) {
# New password was passed in, use it to change the default (AC922 or IC922)
my $password_change_cmd = "curl -s -u $openbmc_user:$openbmc_pass --data '{\"Password\":\"$::opt_N\"}' -k -X PATCH https://${$live_ip}[$i]/redfish/v1/AccountService/Accounts/$openbmc_user";
my $password_changed = xCAT::Utils->runcmd($password_change_cmd, -1);
if (! $password_changed) {
# No output from change password command, assume success
xCAT::MsgUtils->message("I", { data => ["${$live_ip}[$i]: Password changed."] }, $::CALLBACK);
$openbmc_pass = $::opt_N; # Set new password
$bmc_pass = $::opt_N; # Set new password
goto TRY_TO_DISCOVER; # Attempt discover with changed password
}
elsif ($password_changed =~ /$::PW_PAM_VALIDATION/) {
# Output from change password command indicates pw validation error
xCAT::MsgUtils->message("I", { data => ["Can not change password - $::PW_PAM_VALIDATION"] }, $::CALLBACK);
}
else {
# Some unexpected output changing the password - report error and show output
xCAT::MsgUtils->message("I", { data => ["Unable to change password - $password_changed"] }, $::CALLBACK);
}
}
else {
# New password was not passed in, print instruction message and exit
xCAT::MsgUtils->message("I", { data => ["$::CHANGE_PW_INSTRUCTIONS_1"] }, $::CALLBACK);
}
}
}
}
@@ -1357,7 +1381,11 @@ sub bmcdiscovery_openbmc{
$node_data .= ",$serial";
if ($::opt_P) {
if ($::opt_U) {
$node_data .= ",$::opt_U,$::opt_P";
if ($::opt_N) {
$node_data .= ",$::opt_U,$::opt_N"; # Display the new changed password
} else {
$node_data .= ",$::opt_U,$::opt_P";
}
} else {
$node_data .= ",,$::opt_P";
}

View File

@@ -790,6 +790,11 @@ sub donics
next;
}
# for example: nicaliases.ib0=|maestro-(\d+)$|m($1)-ib0|
if ($aliases =~ /^\|\S*\|$/) {
$aliases = xCAT::Table::transRegexAttrs($node, $aliases);
}
if ($aliases =~ /\|/) {
my @names = split(/\|/, $aliases);
my $index = 0;

View File

@@ -578,19 +578,27 @@ sub process_request {
chmod 0644, "$destdir/rootimg.$suffix";
umask $oldmask;
} elsif ($method =~ /squashfs/) {
my $flags;
if ($osver =~ /rhels/ && $osver !~ /rhels5/) {
$flags = "";
my $flags = "";
if ($osver =~ /rhels5/) {
if ($arch =~ /x86/) {
$flags = "-le";
} elsif ($arch =~ /ppc/) {
$flags = "-be";
}
}
if (!-x "/sbin/mksquashfs" && !-x "/usr/bin/mksquashfs") {
$callback->({ error => ["mksquashfs not found, squashfs-tools rpm should be installed on the management node"], errorcode => [1] });
if ($osver =~ /sle/) {
$callback->({ error => ["mksquashfs not found, squashfs rpm should be installed on the management node"], errorcode => [1] });
} else {
$callback->({ error => ["mksquashfs not found, squashfs-tools rpm should be installed on the management node"], errorcode => [1] });
}
return 1;
}
my $rc = system("mksquashfs $temppath ../rootimg.sfs $flags");
my $mksquashfs_command = "mksquashfs $temppath ../rootimg.sfs $flags";
my $rc = system("$mksquashfs_command");
if ($rc) {
$callback->({ error => ["mksquashfs could not be run successfully"], errorcode => [1] });
$callback->({ error => ["Command \"$mksquashfs_command\" failed"], errorcode => [1] });
return 1;
}
$rc = system("rm -rf $temppath");

View File

@@ -981,14 +981,9 @@ sub get_snmpvendorinfo {
push @comm_list, 'public';
foreach $comms(@comm_list) {
#for pdu: get vendor info from sysDescr
#for switches: get vendor info from entPhysicalDescr
# get vendor info from sysDescr
my $ccmd;
if (exists($globalopt{pdu})) {
$ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.1.1";
} else {
$ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.47.1.1.1.1.2.1";
}
$ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.1.1";
if (exists($globalopt{verbose})) {
send_msg($request, 0, "Process command: $ccmd\n");
}

View File

@@ -119,7 +119,7 @@ use IO::Handle;
use IO::Select;
use XML::Simple;
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
use XML::LibXML::Simple;
use XML::LibXML;
use xCAT::Table;
my $dbmaster;
use xCAT::ExtTab;

View File

@@ -36,7 +36,7 @@ key --skip
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -34,9 +34,9 @@ clearpart --all --initlabel
#XCAT_PARTITION_START#
#No RAID
part /boot --size 50 --ondisk sda --fstype ext3
part /boot --size 50 --ondisk sda --fstype ext4
part swap --size 1024 --ondisk sda
part / --size 6000 --grow --ondisk sda --fstype ext3
part / --size 6000 --grow --ondisk sda --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -39,7 +39,7 @@ iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:us
#No RAID
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -36,9 +36,9 @@ clearpart --all --initlabel
#XCAT_PARTITION_START#
#No RAID
part /boot --size 100 --ondisk sda --fstype ext3
part /boot --size 100 --ondisk sda --fstype ext4
part swap --size 2048 --ondisk sda
part / --size 6000 --grow --ondisk sda --fstype ext3
part / --size 6000 --grow --ondisk sda --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -36,7 +36,7 @@ clearpart --all --initlabel
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -44,15 +44,15 @@ d-i partman-md/device_remove_md boolean true
d-i partman-auto/expert_recipe string \
boot-root :: \
40 50 100 ext3 \
40 50 100 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
500 10000 1000000000 ext3 \
500 10000 1000000000 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
64 512 300% linux-swap \

View File

@@ -15,8 +15,8 @@ reboot
url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch#
zerombr yes
clearpart --all --initlabel --drives=sda
part /boot --fstype ext3 --size=100 --ondisk=sda
part / --fstype ext3 --size=2048 --ondisk=sda
part /boot --fstype ext4 --size=100 --ondisk=sda
part / --fstype ext4 --size=2048 --ondisk=sda
part swap --size=2048 --ondisk=sda
part None --fstype vmfs3 --size=900 --ondisk=sda --grow
part None --fstype vmkcore --size=100 --ondisk=sda

View File

@@ -36,9 +36,9 @@ clearpart --all --initlabel
#No RAID
#/boot really significant for this sort of setup nowadays?
part None --fstype "PPC PReP Boot" --size 8
part /boot --size 50 --fstype ext3
part /boot --size 50 --fstype ext4
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -37,7 +37,7 @@ clearpart --all --initlabel
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -39,7 +39,7 @@ iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:us
#No RAID
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -37,7 +37,7 @@ clearpart --all --initlabel
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -40,7 +40,7 @@ key --skip
part None --fstype "PPC PReP Boot" --size 8
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -39,7 +39,7 @@ key --skip
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -39,7 +39,7 @@ iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLEBLANKOKAY:iscsi:$NODE:us
#No RAID
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -42,9 +42,9 @@ key --skip
#XCAT_PARTITION_START#
#No RAID
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
#part /boot --size 50 --fstype ext4
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -39,7 +39,7 @@ part None --fstype "PPC PReP Boot" --size 8
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -37,7 +37,7 @@ key --skip
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
part / --size 1 --grow --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -36,9 +36,9 @@ clearpart --all --initlabel
#XCAT_PARTITION_START#
#No RAID
part /boot --size 100 --ondisk sda --fstype ext3
part /boot --size 100 --ondisk sda --fstype ext4
part swap --size 2048 --ondisk sda
part / --size 6000 --grow --ondisk sda --fstype ext3
part / --size 6000 --grow --ondisk sda --fstype ext4
#XCAT_PARTITION_END#
#RAID 0 /scr for performance

View File

@@ -145,7 +145,10 @@ then
/tmp/updateflag "$MASTER" "$XCATIPORT" "installstatus failed"
sleep infinity
fi
find /xcatpost -type f -maxdepth 1 -exec chmod 0755 {} +
# Add execute permision to all files recursively under /xcatpost.
chmod -R +x `find /xcatpost/ -maxdepth 1 -print | grep -E -v '^(/xcatpost/|/xcatpost/_xcat|/xcatpost/_ssh|/xcatpost/ca|/xcatpost/hostkeys)$'`
msgutil_r "$MASTER_IP" "info" "postscripts downloaded successfully" "/var/log/xcat/xcat.log" "$log_label"
# Get the precreated mypostscript file

View File

@@ -260,7 +260,7 @@ elif grep ext4 /proc/filesystems > /dev/null; then
else
FSTYPE=ext3
fi
BOOTFSTYPE=ext3
BOOTFSTYPE=ext4
EFIFSTYPE=vfat
msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label"
if [ `uname -m` = "ppc64" ]; then

View File

@@ -226,7 +226,7 @@ elif grep ext4 /proc/filesystems > /dev/null; then
else
FSTYPE=ext3
fi
BOOTFSTYPE=ext3
BOOTFSTYPE=ext4
EFIFSTYPE=vfat
if uname -r|grep -q '^3.*el7'; then

View File

@@ -273,11 +273,11 @@ DISKSIZE="$(getdisksize "${instdisk}")"
# TODO: Ondisk detection, /dev/disk/by-id/edd-int13_dev80 for legacy maybe, and no idea about efi. At least maybe blacklist SAN if mptsas/mpt2sas/megaraid_sas seen...
echo "part /boot --fstype=$BOOTFSTYPE --asprimary --ondisk=$instdisk --size=1024" >>/tmp/partitionfile
echo "part pv.000997 --grow --asprimary --ondisk=$instdisk --size=18432" >>/tmp/partitionfile
echo "part pv.000997 --grow --asprimary --ondisk=$instdisk --size=1024" >>/tmp/partitionfile
echo "volgroup xcatvg --pesize=4096 pv.000997" >>/tmp/partitionfile
echo "logvol swap --name=swap --vgname=xcatvg --recommended" >>/tmp/partitionfile
echo "logvol / --fstype=$FSTYPE --name=root --vgname=xcatvg --grow --size 1" >>/tmp/partitionfile
echo "logvol / --fstype=$FSTYPE --name=root --vgname=xcatvg --size=1024 --grow " >>/tmp/partitionfile
# Specify "bootloader" configuration in "/tmp/partitionfile" if there is no user customized partition file
BOOTLOADER="bootloader"

View File

@@ -190,17 +190,17 @@ base64decode()
logger -t $log_label -p "info" "Generate partition file..."
if [ -d /sys/firmware/efi ]; then
echo "ubuntu-efi ::" > /tmp/partitionfile
echo " 512 512 1024 fat16" >> /tmp/partitionfile
echo " 512 512 1024 fat32" >> /tmp/partitionfile
echo ' $iflabel{ gpt } $reusemethod{ } method{ efi } format{ }' >> /tmp/partitionfile
echo " ." >> /tmp/partitionfile
else
echo "ubuntu-boot ::" > /tmp/partitionfile
echo "256 256 512 ext3" >> /tmp/partitionfile
echo ' $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ /boot }' >> /tmp/partitionfile
echo "256 256 512 ext4" >> /tmp/partitionfile
echo ' $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot }' >> /tmp/partitionfile
echo " ." >> /tmp/partitionfile
fi
echo "500 10000 1000000000 ext3" >> /tmp/partitionfile
echo " method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ / }" >> /tmp/partitionfile
echo "500 10000 1000000000 ext4" >> /tmp/partitionfile
echo " method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / }" >> /tmp/partitionfile
echo " ." >> /tmp/partitionfile
echo "2048 512 300% linux-swap" >> /tmp/partitionfile
echo " method{ swap } format{ }" >> /tmp/partitionfile

View File

@@ -203,7 +203,7 @@ base64decode()
logger -t $log_label -p "info" "Generate partition file..."
if [ -d /sys/firmware/efi ]; then
echo "ubuntu-efi ::" > /tmp/partitionfile
echo " 512 512 1024 fat16" >> /tmp/partitionfile
echo " 512 512 1024 fat32" >> /tmp/partitionfile
echo ' $iflabel{ gpt } $reusemethod{ } method{ efi } format{ }' >> /tmp/partitionfile
echo " ." >> /tmp/partitionfile
else

View File

@@ -212,18 +212,18 @@ doconfigure () {
# create the filesystem
if [ x$fstype = x ]; then
fstype=ext3
fstype=ext4
fi
partnum=`expr $partnum + 1`
partdev=$dev$partnum
echo "Create filesystem $fstype on $partdev" >>$LOG
echo "mke2fs -q $partdev -t $fstype" >>$LOG
`mke2fs -q $partdev -t $fstype > /dev/null`
echo "mkfs.$fstype -f -q $partdev" >>$LOG
`mkfs.$fstype -f -q $partdev > /dev/null`
sleep 1
done
elif [ $localspace -eq 1 ]; then
if [ x$fstype = x ]; then
fstype=ext3
fstype=ext4
fi
echo "Mount $dev to $LOCAL with $fstype" >>$LOG
echo "mount -t $fstype $dev $MNTDIR$LOCAL" >>$LOG

View File

@@ -52,11 +52,20 @@ if [ -r /rootimg.sfs ]; then
mkdir -p /rw
mount -t squashfs /rootimg.sfs /ro
mount -t tmpfs rw /rw
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
modprobe overlay
if [ $? -eq 0 ]; then
echo "Mounting $NEWROOT with type overlay"
mkdir -p /rw/upper
mkdir -p /rw/work
mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot $NEWROOT
else
echo "Mounting $NEWROOT with type aufs"
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
fi
elif [ -r /rootimg.gz ]; then
echo Setting up RAM-root tmpfs.
if [ -z $rootlimit ];then

View File

@@ -12,3 +12,21 @@ python3
tar
bzip2
bc
dracut
dracut-network
rsyslog
hostname
e2fsprogs
ethtool
parted
openssl
dhclient
openssh-clients
bash
vim-minimal
rpm
iputils
gzip
grub2
grub2-tools
lsvpd

View File

@@ -12,3 +12,18 @@ python3
tar
bzip2
bc
dracut
dracut-network
rsyslog
hostname
e2fsprogs
ethtool
parted
openssl
dhclient
openssh-clients
bash
vim-minimal
rpm
iputils

View File

@@ -4,7 +4,7 @@ dracut_install wget tar cpio gzip dash modprobe touch echo cut wc xz
dracut_install -o ctorrent
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install mount.nfs
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst "$moddir/xcatroot" "/sbin/xcatroot"
inst_hook cmdline 10 "$moddir/xcat-cmdline.sh"

View File

@@ -3,7 +3,7 @@ echo $drivers
dracut_install wget tar cpio gzip dash modprobe wc touch echo cut
dracut_install -o ctorrent
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst_hook pre-mount 5 "$moddir/xcat-premount.sh"
inst_hook pre-pivot 5 "$moddir/xcat-prepivot.sh"

View File

@@ -62,11 +62,20 @@ if [ -r /rootimg.sfs ]; then
mkdir -p /rw
mount -t squashfs /rootimg.sfs /ro
mount -t tmpfs rw /rw
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
modprobe overlay
if [ $? -eq 0 ]; then
echo "Mounting $NEWROOT with type overlay"
mkdir -p /rw/upper
mkdir -p /rw/work
mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot $NEWROOT
else
echo "Mounting $NEWROOT with type aufs"
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
fi
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "rootimg downloaded,setting up RAM-root tmpfs...."
echo Setting up RAM-root tmpfs.

View File

@@ -3,7 +3,7 @@ echo $drivers
dracut_install wget tar cpio gzip modprobe touch echo cut wc xz
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install mount.nfs
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
dracut_install ethtool
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst "$moddir/xcatroot" "/sbin/xcatroot"

View File

@@ -2,7 +2,7 @@
echo $drivers
dracut_install wget cpio gzip modprobe wc touch echo cut
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
dracut_install ethtool
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst_hook pre-mount 5 "$moddir/xcat-premount.sh"

View File

@@ -69,11 +69,20 @@ if [ -r /rootimg.sfs ]; then
mkdir -p /rw
mount -t squashfs /rootimg.sfs /ro
mount -t tmpfs rw /rw
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
modprobe overlay
if [ $? -eq 0 ]; then
echo "Mounting $NEWROOT with type overlay"
mkdir -p /rw/upper
mkdir -p /rw/work
mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot $NEWROOT
else
echo "Mounting $NEWROOT with type aufs"
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
fi
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..."
echo Setting up RAM-root tmpfs.

View File

@@ -3,7 +3,7 @@ echo $drivers
dracut_install curl tar cpio gzip modprobe touch echo cut wc xz
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install mount.nfs
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
dracut_install ethtool
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst "$moddir/xcatroot" "/sbin/xcatroot"

View File

@@ -2,7 +2,7 @@
echo $drivers
dracut_install curl cpio gzip modprobe wc touch echo cut
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
dracut_install ethtool
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst_hook pre-mount 5 "$moddir/xcat-premount.sh"

View File

@@ -69,11 +69,20 @@ if [ -r /rootimg.sfs ]; then
mkdir -p /rw
mount -t squashfs /rootimg.sfs /ro
mount -t tmpfs rw /rw
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
modprobe overlay
if [ $? -eq 0 ]; then
echo "Mounting $NEWROOT with type overlay"
mkdir -p /rw/upper
mkdir -p /rw/work
mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot $NEWROOT
else
echo "Mounting $NEWROOT with type aufs"
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
fi
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..."
echo Setting up RAM-root tmpfs.

View File

@@ -8,9 +8,28 @@ rsync
tar
util-linux
wget
perl-DBD-MySQL
perl-DBD-Pg
python3
tar
bzip2
bc
dracut
dracut-network
rsyslog
hostname
e2fsprogs
ethtool
parted
openssl
dhclient
openssh-clients
bash
vim-minimal
rpm
iputils
gzip
grub2
grub2-tools
lsvpd
perl-DBD-MySQL
perl-DBD-Pg

View File

@@ -14,3 +14,18 @@ python3
tar
bzip2
bc
dracut
dracut-network
rsyslog
hostname
e2fsprogs
ethtool
parted
openssl
dhclient
openssh-clients
bash
vim-minimal
rpm
iputils

View File

@@ -3,7 +3,7 @@ echo $drivers
dracut_install wget tar cpio gzip modprobe touch echo cut wc xz
dracut_install grep ifconfig ip hostname awk egrep grep dirname expr
dracut_install mount.nfs
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst "$moddir/xcatroot" "/sbin/xcatroot"
inst_hook cmdline 10 "$moddir/xcat-cmdline.sh"

View File

@@ -2,7 +2,7 @@
echo $drivers
dracut_install wget cpio gzip modprobe wc touch echo cut
dracut_install grep ifconfig ip hostname awk egrep grep dirname expr logger
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install parted mke2fs bc mkswap swapon chmod mkfs mkfs.ext4 mkfs.xfs xfs_db
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst_hook pre-mount 5 "$moddir/xcat-premount.sh"
inst_hook pre-pivot 5 "$moddir/xcat-prepivot.sh"

View File

@@ -160,7 +160,7 @@ STARTMODE='auto'
EOF
if [ -f $NEWROOT/etc/hostname ]; then
echo `hostname -s` > $NEWROOT/etc/hostname
echo "$ME" > $NEWROOT/etc/hostname
fi
if [ ! -z "$ifname" ]; then

View File

@@ -65,11 +65,20 @@ if [ -r /rootimg.sfs ]; then
mkdir -p /rw
mount -t squashfs /rootimg.sfs /ro
mount -t tmpfs rw /rw
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
modprobe overlay
if [ $? -eq 0 ]; then
echo "Mounting $NEWROOT with type overlay"
mkdir -p /rw/upper
mkdir -p /rw/work
mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot $NEWROOT
else
echo "Mounting $NEWROOT with type aufs"
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
fi
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..."
echo Setting up RAM-root tmpfs.

View File

@@ -34,11 +34,20 @@ if [ -r /rootimg.sfs ]; then
mkdir -p /rw
mount -t squashfs /rootimg.sfs /ro
mount -t tmpfs rw /rw
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
modprobe overlay
if [ $? -eq 0 ]; then
echo "Mounting $NEWROOT with type overlay"
mkdir -p /rw/upper
mkdir -p /rw/work
mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot $NEWROOT
else
echo "Mounting $NEWROOT with type aufs"
mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT
mkdir -p $NEWROOT/ro
mkdir -p $NEWROOT/rw
mount --move /ro $NEWROOT/ro
mount --move /rw $NEWROOT/rw
fi
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
echo Setting up RAM-root tmpfs.
mount -t tmpfs -o mode=755 rootfs $NEWROOT

View File

@@ -199,9 +199,9 @@ if ($netdriver) {
}
} else {
if ($arch eq 'x86' or $arch eq 'x86_64') {
@ndrivers = qw/tg3 bnx2 bnx2x e1000 e1000e igb mlx4_en virtio_net/;
@ndrivers = qw/tg3 bnx2 bnx2x e1000 e1000e igb mlx_en virtio_net overlay/;
} elsif ($arch eq 'ppc64el') {
@ndrivers = qw/tg3 bnx2 bnx2x e1000 e1000e igb ibmveth ehea mlx_en mlx4_en virtio_net/;
@ndrivers = qw/tg3 bnx2 bnx2x e1000 e1000e igb ibmveth ehea mlx_en mlx4_en virtio_net overlay/;
} elsif ($arch eq 'ppc64') {
@ndrivers = qw/e1000 e1000e igb ibmveth ehea/;
} elsif ($arch eq 's390x') {
@@ -336,6 +336,11 @@ unless ($onlyinitrd) {
print "Run cmd [$aptcmd1 $aptcmd2] to create rootimage bootstraps\n";
my $rc = system("$aptcmd1 $aptcmd2");
if ($rc) {
my $os=xCAT::Utils->osver("os");
if ($os ne 'ubuntu') {
print "Error: Can not run genimage for Ubunty OS on a non-Ubunty system ($os)";
exit 1;
}
print "Error: Can not create bootstraps for rootimage. Make sure you specified full http mirror path.\n";
exit 1;
}
@@ -889,6 +894,11 @@ sub getlibs {
my @libs = split /\n/, $liblist;
my @return;
foreach (@libs) {
# vdso is a shared library that's embedded in the kernel
# automatically loaded whenever a new process is exec-ed
if ( $_ =~ /linux-vdso64/ ) {
next;
}
if (/statically linked/ or /not a dynamic executable/) {
return;
}
@@ -1152,7 +1162,6 @@ PATH="\$PATH:/usr/sbin:/sbin"
export PATH
echo "Creating device nodes with udev"
/sbin/udevd --daemon
if [ -f "/sbin/udevadm" ]
then
/sbin/udevadm trigger
@@ -1461,11 +1470,20 @@ if [ -r /rootimg.sfs ]; then
mkdir -p /rw
mount -t squashfs /rootimg.sfs /ro
mount -t tmpfs rw /rw
mount -t aufs -o dirs=/rw:/ro mergedroot \$NEWROOT
mkdir -p \$NEWROOT/ro
mkdir -p \$NEWROOT/rw
mount --move /ro \$NEWROOT/ro
mount --move /rw \$NEWROOT/rw
modprobe overlay
if [ $? -eq 0 ]; then
echo Mounting \$NEWROOT with type overlay
mkdir -p /rw/upper
mkdir -p /rw/work
mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot \$NEWROOT
else
echo Mounting \$NEWROOT with type aufs
mount -t aufs -o dirs=/rw:/ro mergedroot \$NEWROOT
mkdir -p \$NEWROOT/ro
mkdir -p \$NEWROOT/rw
mount --move /ro \$NEWROOT/ro
mount --move /rw \$NEWROOT/rw
fi
EOMS
print $inifile "elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then\n";
print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n";
@@ -1648,7 +1666,7 @@ EOMS
}
# add extra commands for initrd
foreach ("usr/bin/dig", "bin/busybox", "bin/bash", "sbin/mount.nfs", "usr/bin/rsync", "sbin/insmod", "sbin/udevd", "sbin/udevadm", "sbin/modprobe", "sbin/blkid", "sbin/depmod", "usr/bin/wget", "usr/bin/xz", "bin/gzip", "bin/tar") {
foreach ("usr/bin/dig", "bin/busybox", "bin/bash", "sbin/mount.nfs", "usr/bin/rsync", "sbin/insmod", "sbin/udevadm", "sbin/modprobe", "sbin/blkid", "sbin/depmod", "usr/bin/wget", "usr/bin/xz", "bin/gzip", "bin/tar") {
getlibs($_);
push @filestoadd, $_;
}

View File

@@ -22,6 +22,9 @@ if [ $# -le 3 ]; then
Change the default root or ADMIN password of the BMC to the one
specified by '-n' flag. Use the same password when discovering new
BMCs, by passing it with '[-p|--bmcpasswd]' option to 'bmcdiscover' command.
Note: Starting with xCAT 2.16, the changing of default BMC passwords
can also be done with '-n' option for 'bmcdiscover' command.
"
echo "Usage:"
echo " $0 -r <ip_ranges> -n <new BMC Password> "
@@ -63,8 +66,8 @@ UNAUTHORIZED="Unauthorized"
for name in `cat /tmp/$$.ip.list`
do
## Look for Witherspoon first
SYSTEM_TYPE="Witherspoon"
## Look for OpenBMC (Witherspoon or Mihawk) first
SYSTEM_TYPE="OpenBMC"
PasswordChangeNeeded=`curl -sD - --data '{"UserName":"'"$WITHERSPOON_DEFAULT_USER"'","Password":"'"$WITHERSPOON_DEFAULT_PW"'"}' -k -X POST https://$name/redfish/v1/SessionService/Sessions`
if [[ "$PasswordChangeNeeded" =~ "$CHANGE_PW_REQUIRED" ]]; then
@@ -74,7 +77,7 @@ do
echo "$name: Can not change password for $SYSTEM_TYPE system - $PW_PAM_VALIDATION"
elif [[ -z "$PasswordChanged" ]]; then
# If no output, password change was successful
echo "$name: Password for $SYSTEM_TYPE system changed. It might take up to 5 minutes for the BMC to update."
echo "$name: Password for $SYSTEM_TYPE system changed."
else
# Some unexpected output changing the password - report error and show output
echo "$name: Unable to change password for $SYSTEM_TYPE system - $PasswordChanged"
@@ -83,8 +86,8 @@ do
continue
fi
## Look for Boston next
SYSTEM_TYPE="Boston"
## Look for IPMI managed (Boston) next
SYSTEM_TYPE="IPMI"
PasswordChangeNeeded=`curl -sD - --data '{"UserName":"'"$BOSTON_DEFAULT_USER"'","Password":"'"$BOSTON_DEFAULT_PW"'"}' -k -X POST https://$name/redfish/v1/SessionService/Sessions`
if [[ "$PasswordChangeNeeded" =~ "$CHANGE_PW_REQUIRED" ]]; then
echo "$name: Password change needed for $SYSTEM_TYPE system"

View File

@@ -2,7 +2,7 @@
#
# go-xcat - Install xCAT automatically.
#
# Version 1.0.45
# Version 1.0.46
#
# Copyright (C) 2016 - 2019 International Business Machines
# Eclipse Public License, Version 1.0 (EPL-1.0)
@@ -29,8 +29,12 @@
# - Display a list of packages that could not be uninstalled
# 2019-11-05 Mark Gurevich <gurevich@us.ibm.com>
# - Display a list of packages that will be installed before "Continue?"
# 2020-5-7 Nic Mays <Nicolas.Mays@ibm.com>
# - Handles 'stable' as a flag to install latest version via the command:
# go-xcat --xcat-version=stable install
#
function usage()
{
local script="${0##*/}"
@@ -72,6 +76,7 @@ function usage()
${script} --yes install
${script} -x 2.12 -y install
${script} --xcat-version=devel install
${script} --xcat-version=stable install
${script} --xcat-core=/path/to/xcat-core.tar.bz2 \\
--xcat-dep=/path/to/xcat-dep.tar.bz2 install
${script} --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 \\
@@ -1285,7 +1290,7 @@ function remove_repo_zypper()
{
type zypper >/dev/null 2>&1 || return 255
local repo_id="$1"
zypper removerepo "${repo_id}"
zypper removerepo "${repo_id}" 2> /dev/null
case "${repo_id}" in
"xcat-core")
mv /etc/zypp/repos.d/xCAT-core.repo{,.nouse} 2>/dev/null
@@ -1322,6 +1327,7 @@ function add_xcat_core_repo_yum_or_zypper()
local ver="$2"
local tmp=""
[[ -z "${ver}" ]] && ver="latest"
if [[ -z "${url}" ]]
then
case "${ver}" in
@@ -1348,6 +1354,7 @@ function add_xcat_core_repo_apt()
local ver="$2"
local tmp=""
[[ -z "${ver}" ]] && ver="latest"
if [[ -z "${url}" ]]
then
# get the apt.key
@@ -1355,7 +1362,7 @@ function add_xcat_core_repo_apt()
local tmp="${TMP_DIR}/tmp_xcat.key"
download_file "${url}" "${tmp}"
warn_if_bad "$?" "download xcat apt key failed" || return 1
apt-key add "${tmp}" >/dev/null 2>&1
apt-key add "${tmp}"
warn_if_bad "$?" "import xcat apt key failed" || return 1
case "${ver}" in
"devel")
@@ -1382,6 +1389,7 @@ function add_xcat_dep_repo_yum_or_zypper()
local url="$1"
local ver="$2"
[[ -z "${ver}" ]] && ver="latest"
local tmp=""
local install_path="${GO_XCAT_DEFAULT_INSTALL_PATH}"
local distro="${GO_XCAT_LINUX_DISTRO}${GO_XCAT_LINUX_VERSION%%.*}"
@@ -1450,6 +1458,7 @@ function add_xcat_dep_repo_apt()
local url="$1"
local ver="$2"
[[ -z "${ver}" ]] && ver="latest"
[[ -z "${url}" ]] &&
url="${GO_XCAT_DEFAULT_BASE_URL}/apt/${ver}/xcat-dep"
add_repo_by_url_apt "${url}" "xcat-dep"
@@ -1992,6 +2001,10 @@ do
;;
"--xcat-version="*)
GO_XCAT_VERSION="${1##--xcat-version=}"
if [ "${GO_XCAT_VERSION}" = "stable" ];
then
GO_XCAT_VERSION="latest"
fi
;;
"-y"|"--yes")
GO_XCAT_YES=("-y")

View File

@@ -41,7 +41,7 @@ BuildArch: noarch
%if %s390x
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-XML-Parser
%else
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-XML-Parser perl-Digest-SHA1 perl(LWP::Protocol::https) perl-XML-LibXML-Simple
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-XML-Parser perl-Digest-SHA1 perl(LWP::Protocol::https) perl-XML-LibXML
%endif
Obsoletes: atftp-xcat
%endif

View File

@@ -1,5 +1,6 @@
SN_setup_case
reg_linux_diskless_installation_hierarchy
reg_linux_diskless_installation_hierarchy_squashfs
reg_linux_diskfull_installation_hierarchy
updatenode_P_script1
updatenode_P_script1_script2

View File

@@ -24,6 +24,7 @@ nodeset_runimg
nodeset_shell
reg_linux_diskfull_installation_flat
reg_linux_diskless_installation_flat
reg_linux_diskless_installation_flat_squashfs
reg_linux_statelite_installation_flat
rmimage_diskless
rpower_reset

View File

@@ -1,5 +1,6 @@
SN_setup_case
reg_linux_diskless_installation_hierarchy
reg_linux_diskless_installation_hierarchy_squashfs
reg_linux_diskfull_installation_hierarchy
updatenode_P_script1
updatenode_P_script1_script2

View File

@@ -24,6 +24,7 @@ nodeset_runimg
nodeset_shell
reg_linux_diskfull_installation_flat
reg_linux_diskless_installation_flat
reg_linux_diskless_installation_flat_squashfs
reg_linux_statelite_installation_flat
rmimage_diskless
rpower_reset

View File

@@ -1,5 +1,6 @@
SN_setup_case
reg_linux_diskless_installation_hierarchy
reg_linux_diskless_installation_hierarchy_squashfs
reg_linux_diskfull_installation_hierarchy
assign_certain_command_permission
bmcdiscover_help

View File

@@ -16,4 +16,5 @@ nodeset_runimg
nodeset_shell
reg_linux_diskfull_installation_flat
reg_linux_diskless_installation_flat
reg_linux_diskless_installation_flat_squashfs
reg_linux_statelite_installation_flat

View File

@@ -1,5 +1,6 @@
SN_setup_case
reg_linux_diskless_installation_hierarchy
reg_linux_diskless_installation_hierarchy_squashfs
reg_linux_diskfull_installation_hierarchy
assign_certain_command_permission
bmcdiscover_help

View File

@@ -16,4 +16,5 @@ nodeset_runimg
nodeset_shell
reg_linux_diskfull_installation_flat
reg_linux_diskless_installation_flat
reg_linux_diskless_installation_flat_squashfs
reg_linux_statelite_installation_flat

View File

@@ -1,4 +1,5 @@
reg_linux_diskless_installation_flat
reg_linux_diskless_installation_flat_squashfs
reg_linux_diskfull_installation_flat
assign_certain_command_permission
bmcdiscover_help
@@ -228,3 +229,5 @@ xdsh_permission_denied
xdsh_q
xdsh_regular_command
xdsh_t
go_xcat_devel_from_repo
go_xcat_stable_from_repo

View File

@@ -1,4 +1,5 @@
reg_linux_diskless_installation_flat
reg_linux_diskless_installation_flat_squashfs
reg_linux_diskfull_installation_flat
assign_certain_command_permission
bmcdiscover_help
@@ -228,3 +229,5 @@ xdsh_permission_denied
xdsh_q
xdsh_regular_command
xdsh_t
go_xcat_devel_from_repo
go_xcat_stable_from_repo

View File

@@ -6,25 +6,23 @@ declare -i tryreinstall=1
node=$1
osimage=$2
vmhost=`lsdef $node -i vmhost -c | cut -d '=' -f 2`
times=3
if [ $# -eq 3 ];
then
times=$3+1
echo "Try to rinstall for $3 times ......"
else
times=6
echo "Try to rinstall for 5 times ......"
times=$3
fi
echo "Try to rinstall for $times times ......"
for (( tryreinstall = 1 ; tryreinstall < $times ; ++tryreinstall ))
for (( tryreinstall = 1 ; tryreinstall <= $times ; ++tryreinstall ))
do
echo "[$tryreinstall] Trying to install $node with $osimage ..."
if [[ ! -z $vmhost ]];then
# Display memory and active VMs on VM host, when installing on VM
echo "Memory on vmhost $vmhost"
ssh $vmhost free -g
ssh $vmhost free -m
echo "Active VMs on vmhost $vmhost"
ssh $vmhost virsh list
fi

View File

@@ -250,6 +250,7 @@ sub testxdsh {
print "The input parameter is $value \n";
my $checkstring;
my $checkfile;
my $nodestatus;
if ($value == 1) {
#mean runcmd test using test scripts genesistest.pl writes
$checkstring = "testcmd";
@@ -261,13 +262,16 @@ sub testxdsh {
$checkstring = "destiny=shell";
$checkfile = "/proc/cmdline";
}
my $xdsh_command="xdsh $noderange -t 2 cat $checkfile 2>&1|grep $checkstring";
if (($value == 1) || ($value == 2) || ($value == 3)) {
`xdsh $noderange -t 2 cat $checkfile 2>&1|grep $checkstring `;
`$xdsh_command`;
if ($?) {
foreach (1 .. 10) {
my @i = (1..10);
for (@i) {
sleep 300;
send_msg(1,"try to run xdsh $noderange to check the results again");
`xdsh $noderange -t 2 cat $checkfile 2>&1| grep $checkstring `;
$nodestatus=`lsdef $noderange -i status -c 2>&1 | awk -F'=' '{print \$2}'`;
send_msg(1,"[$_] Running \"$xdsh_command\" to check results. Node status: $nodestatus");
`$xdsh_command`;
last if ($? == 0);
}
}

Some files were not shown because too many files have changed in this diff Show More