mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
Merge pull request #5929 from xcat2/master
Merge master branch to rhels8 branch
This commit is contained in:
commit
b53100a59f
@ -1,10 +1,10 @@
|
||||
os: linux
|
||||
dist: trusty
|
||||
dist: xenial
|
||||
sudo: required
|
||||
before_install:
|
||||
- sudo apt-get install -y git reprepro devscripts debhelper libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common
|
||||
- sudo apt-get install -y git fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common
|
||||
- perl -v
|
||||
- echo "yes" | sudo cpan -f -i Capture::Tiny
|
||||
#- echo "yes" | sudo cpan -f -i Capture::Tiny
|
||||
|
||||
script:
|
||||
- echo $TRAVIS_BUILD_ID
|
||||
|
1
_config.yml
Normal file
1
_config.yml
Normal file
@ -0,0 +1 @@
|
||||
theme: jekyll-theme-cayman
|
33
builddep.sh
33
builddep.sh
@ -19,6 +19,13 @@
|
||||
# of the FRS area.
|
||||
# VERBOSE=1 - Set to 1 to see more VERBOSE output
|
||||
|
||||
# This script should only be run on RPM based machines
|
||||
# This test is not foolproof, but at least tries to detect
|
||||
if [ `/bin/rpm -q -f /bin/rpm >/dev/null 2>&1; echo $?` != 0 ]; then
|
||||
echo "ERROR: This script should only be executed on a RPM based Operation System."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# you can change this if you need to
|
||||
USER=xcat
|
||||
TARGET_MACHINE=xcat.org
|
||||
@ -49,6 +56,16 @@ if [ ! -d $GSA ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REQPKG=("rpm-sign" "createrepo")
|
||||
for pkg in ${REQPKG[*]}; do
|
||||
if [ `rpm -q $pkg >> /dev/null; echo $?` != 0 ]; then
|
||||
echo "ERROR: $pkg is required to successfully create the xcat-deps package. Install and rerun."
|
||||
exit 1
|
||||
else
|
||||
echo "Checking for package=$pkg ..."
|
||||
fi
|
||||
done
|
||||
|
||||
# set grep to quiet by default
|
||||
GREP="grep -q"
|
||||
if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then
|
||||
@ -58,14 +75,10 @@ if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then
|
||||
fi
|
||||
|
||||
# this is needed only when we are transitioning the yum over to frs
|
||||
# YUMREPOURL1="http://xcat.org/yum"
|
||||
# YUMREPOURL2="http://xcat.org/files/yum"
|
||||
if [ "$FRSYUM" != 0 ]; then
|
||||
YUMDIR="$FRS/repos"
|
||||
# YUMREPOURL="$YUMREPOURL2"
|
||||
else
|
||||
YUMDIR=htdocs
|
||||
# YUMREPOURL="$YUMREPOURL1"
|
||||
fi
|
||||
|
||||
cd `dirname $0`
|
||||
@ -127,18 +140,6 @@ if [ "$OSNAME" != "AIX" ]; then
|
||||
|
||||
# Modify xcat-dep.repo files to point to the correct place
|
||||
echo "===> Modifying the xcat-dep.repo files to point to the correct location..."
|
||||
# 10/01/2015 - vkhu
|
||||
# The URLs have been updated in GSA, this section is not needed at the moment
|
||||
#
|
||||
#if [ "$FRSYUM" != 0 ]; then
|
||||
# newurl="$YUMREPOURL2"
|
||||
# oldurl="$YUMREPOURL1"
|
||||
#else
|
||||
# newurl="$YUMREPOURL1"
|
||||
# oldurl="$YUMREPOURL2"
|
||||
#fi
|
||||
#
|
||||
#sed -i -e "s|=$oldurl|=$newurl|g" `find . -name "xcat-dep.repo" `
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "AIX" ]; then
|
||||
|
@ -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.14.4'
|
||||
release = '2.14.5'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -4,9 +4,9 @@ Installing a New Kernel in the Diskless Image
|
||||
|
||||
Note: This procedure assumes you are using xCAT 2.6.1 or later.
|
||||
|
||||
The kerneldir attribute in linuximage table can be used to assign a directory containing kernel RPMs that can be installed into diskless images. The default for kernerdir is /install/kernels. To add a new kernel, create a directory named <kernelver> under the kerneldir, and genimage will pick them up from there.
|
||||
To add a new kernel, create a directory named <kernelver> under ``/install/kernels`` directory, and ``genimage`` will pick them up from there.
|
||||
|
||||
The following examples assume you have the kernel RPM in /tmp and is using the default value for kerneldir (/install/kernels).
|
||||
The following examples assume you have the kernel RPM in ``/tmp`` and is using a new kernel in the directory ``/install/kernels/<kernelver>``.
|
||||
|
||||
|
||||
The RPM names below are only examples, substitute your specific level and architecture.
|
||||
@ -20,6 +20,9 @@ For example, kernel-3.10.0-229.ael7b.ppc64le.rpm means kernelver=3.10.0-229.ael7
|
||||
mkdir -p /install/kernels/3.10.0-229.ael7b.ppc64le
|
||||
cp /tmp/kernel-3.10.0-229.ael7b.ppc64le.rpm /install/kernels/3.10.0-229.ael7b.ppc64le
|
||||
createrepo /install/kernels/3.10.0-229.ael7b.ppc64le/
|
||||
|
||||
Append kernel directory ``/install/kernels/<kernelver>`` in ``pkgdir`` of specific osimage. ::
|
||||
|
||||
chdef -t osimage <imagename> -p pkgdir=/install/kernels/3.10.0-229.ael7b.ppc64le/
|
||||
|
||||
Run genimage/packimage to update the image with the new kernel.
|
||||
@ -45,6 +48,9 @@ The "4.6.ppc64le" is replaced with "4-ppc64le": ::
|
||||
cp /tmp/kernel-default-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/
|
||||
cp /tmp/kernel-default-base-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/
|
||||
cp /tmp/kernel-default-devel-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/
|
||||
|
||||
Append kernel directory ``/install/kernels/<kernelver>`` in ``pkgdir`` of specific osimage. ::
|
||||
|
||||
chdef -t osimage <imagename> -p pkgdir=/install/kernels/3.12.28-4-ppc64le/
|
||||
|
||||
Run genimage/packimage to update the image with the new kernel.
|
||||
|
@ -6,7 +6,7 @@ The synclist file
|
||||
.. _The_Format_of_synclist_file_label:
|
||||
|
||||
The Format of synclist file
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The synclist file contains the configuration entries that specify where the files should be synced to. In the synclist file, each line is an entry which describes the location of the source files and the destination location of files on the target node.
|
||||
|
||||
The basic entry format looks like following: ::
|
||||
@ -21,9 +21,9 @@ The ``path_of_dst_file*`` should be the full path of the destination file on tar
|
||||
|
||||
The ``path_of_dst_directory`` should be the full path of the destination directory. Make ``sure path_of_dst_directory`` is not a existing file on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail.
|
||||
|
||||
Since the synclist file is for common purpose, the target node need not be configured in it.
|
||||
If no target node is specified, the files will be synced to all nodes in the cluster. See "Support nodes in synclist file" below for how to specify a noderange.
|
||||
|
||||
Example: the following synclist formats are supported:
|
||||
The following synclist formats are supported:
|
||||
|
||||
sync file **/etc/file2** to the file **/etc/file2** on the node (with same file name) ::
|
||||
|
||||
@ -52,9 +52,7 @@ sync all files in **/home/mikev** to directory **/home/mikev** on the node ::
|
||||
Note: Don't try to sync files to the read only directory on the target node.
|
||||
|
||||
An example of synclist file
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Assume a user wants to sync files to a node as following, the corresponding entries should be added in a synclist file.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Sync the file **/etc/common_hosts** to the two places on the target node: put one to the **/etc/hosts**, the other to the **/tmp/etc/hosts**. Following configuration entries should be added ::
|
||||
|
||||
@ -80,7 +78,7 @@ Sample synclist file ::
|
||||
/tmp/* -> /tmp/
|
||||
/etc/testfile -> /etc/
|
||||
|
||||
If the above syncfile is performed by the **updatenode/xdcp** commands, or performed in a node installation process, the following files will exist on the target node with the following contents. ::
|
||||
If the above syncfile is used by the **updatenode/xdcp** commands, or used in a node installation process, the following files will exist on the target node with the following contents. ::
|
||||
|
||||
/etc/hosts(It has the same content with /etc/common_hosts on the MN)
|
||||
/tmp/etc/hosts(It has the same content with /etc/common_hosts on the MN)
|
||||
@ -93,18 +91,18 @@ If the above syncfile is performed by the **updatenode/xdcp** commands, or perfo
|
||||
Support nodes in synclist file
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Note: From xCAT 2.9.2 on AIX and from xCAT 2.12 on Linux, xCAT support a new format for syncfile. The new format is ::
|
||||
Starting with xCAT 2.9.2 on AIX and with xCAT 2.12 on Linux, xCAT supports a new format for syncfile. The new format is ::
|
||||
|
||||
file -> (noderange for permitted nodes) file
|
||||
|
||||
The noderange would have several format. Following examples show that /etc/hosts file is synced to the nodes which is specified before the file name ::
|
||||
The noderange can have several formats. Following examples show that **/etc/hosts** file is synced to the nodes which are specified before the file name ::
|
||||
|
||||
/etc/hosts -> (node1,node2) /etc/hosts # The /etc/hosts file is synced to node1 and node2
|
||||
/etc/hosts -> (node1-node4) /etc/hosts # The /etc/hosts file is synced to node1,node2,node3 and node4
|
||||
/etc/hosts -> (node[1-4]) /etc/hosts # The /etc/hosts file is synced to node1, node2, node3 and node4
|
||||
/etc/hosts -> (node1,node[2-3],node4) /etc/hosts # The /etc/hosts file is synced to node1, node2, node3 and node4
|
||||
/etc/hosts -> (group1) /etc/hosts # The /etc/hosts file is synced to nodes in group1
|
||||
/etc/hosts -> (group1,group2) /etc/hosts # The /etc/hosts file is synced to nodes in group1 and group2
|
||||
/etc/hosts -> (group1,group2) /etc/hosts # The /etc/hosts file is synced to nodes in group1 and group2
|
||||
|
||||
postscript support
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
@ -112,13 +110,19 @@ postscript support
|
||||
Putting the filename.post in the **rsyncfile** to ``rsync`` to the node is required for hierarchical clusters. It is optional for non-hierarchical cluster.
|
||||
|
||||
Advanced synclist file features
|
||||
''''''''''''''''''''''''''''''''''
|
||||
'''''''''''''''''''''''''''''''
|
||||
|
||||
After you define the files to rsync in the syncfile, you can add an **EXECUTEALWAYS** clause in the syncfile. The **EXECUTEALWAYS** clause will list all the postscripts you would always like to run after the files are sync'd, whether or not any file is actually updated. The files in this list must be added to the list of files to rsync, if hierarchical.
|
||||
**EXECUTE**
|
||||
|
||||
For example, your rsyncfile may look like this.
|
||||
.. note:: the path to the file to EXECUTE, is the location of the *.post file on the MN**. ::
|
||||
The **EXECUTE** clause is used to list all the postscripts you would like to run after the files are sync'd, only if the file is updated. The files in this list must be added to the list of files to rsync. If noderange is used in the synclistfor the file listed in the **EXECUTE** clause, the script will only be exectuted on the nodes in that noderange.
|
||||
|
||||
**EXECUTEALWAYS**
|
||||
|
||||
The **EXECUTEALWAYS** clause is used to list all the postscripts you would like to run after the files are sync'd, whether or not any file is actually updated. The files in this list must be added to the list of files to rsync. If noderange is used in the synclist for the file listed in the **EXECUTEALWAYS** clause, the script will only be exectuted on the nodes in that noderange.
|
||||
|
||||
.. note:: The path to the file to EXECUTE or EXECUTEALWAYS, is the location of the file on the MN.
|
||||
|
||||
For example, your rsyncfile may look like this.::
|
||||
|
||||
/tmp/share/file2 -> /tmp/file2
|
||||
/tmp/share/file2.post -> /tmp/file2.post (required for hierarchical clusters)
|
||||
@ -126,7 +130,7 @@ For example, your rsyncfile may look like this.
|
||||
/tmp/share/file3.post -> /tmp/file3.post (required for hierarchical clusters)
|
||||
/tmp/myscript1 -> /tmp/myscript1
|
||||
/tmp/myscript2 -> /tmp/myscript2
|
||||
# the below are postscripts
|
||||
# Postscripts
|
||||
EXECUTE:
|
||||
/tmp/share/file2.post
|
||||
/tmp/share/file3.post
|
||||
@ -136,7 +140,7 @@ For example, your rsyncfile may look like this.
|
||||
|
||||
If **/tmp/file2** is updated on the node in **/tmp/file2**, then **/tmp/file2**.post is automatically run on that node. If **/tmp/file3** is updated on the node in **/tmp/filex**, then **/tmp/file3**.post is automatically run on that node.
|
||||
|
||||
You can add an **APPEND** clause to your syncfile.
|
||||
**APPEND**
|
||||
|
||||
The **APPEND** clause is used to append the contents of the input file to an existing file on the node. The file to be appended must already exist on the node and not be part of the synclist that contains the **APPEND** clause.
|
||||
|
||||
@ -147,7 +151,7 @@ For example, your synclist file may look like this: ::
|
||||
/tmp/share/file3 -> /tmp/filex
|
||||
/tmp/share/file3.post -> /tmp/file3.post
|
||||
/tmp/myscript -> /tmp/myscript
|
||||
# the below are postscripts
|
||||
# Postscripts
|
||||
EXECUTE:
|
||||
/tmp/share/file2.post
|
||||
/tmp/share/file3.post
|
||||
@ -157,15 +161,13 @@ For example, your synclist file may look like this: ::
|
||||
/etc/myappenddir/appendfile -> /etc/mysetup/setup
|
||||
/etc/myappenddir/appendfile2 -> /etc/mysetup/setup2
|
||||
|
||||
When you use the **APPEND** clause, the file (left) of the arrow is appended to the file right of the arrow. In this example, **/etc/myappenddir/appendfile** is appended to **/etc/mysetup/setup** file, which must already exist on the node. The **/opt/xcat/share/xcat/scripts/xdcpappend.sh** is used to accomplish this.
|
||||
When you use the **APPEND** clause, the source file to the left of the arrow is appended to the file to the right of the arrow. In this example, **/etc/myappenddir/appendfile** is appended to **/etc/mysetup/setup** file, which must already exist on the node. The **/opt/xcat/share/xcat/scripts/xdcpappend.sh** is used to accomplish this.
|
||||
|
||||
The script creates a backup of the original file on the node in the directory defined by the site table nodesyncfiledir attribute, which is **/var/xcat/node/syncfiles** by default. To update the original file when using the function, you need to rsync a new original file to the node, removed the old original from the **/var/xcat/node/syncfiles/org** directory. If you want to cleanup all the files for the append function on the node, you can use the ``xdsh -c`` flag. See man page for ``xdsh``.
|
||||
The script creates a backup of the original file on the node in the directory defined by the site table `nodesyncfiledir` attribute, which is **/var/xcat/node/syncfiles** by default. To update the original file when using the function, you need to rsync a new original file to the node, removed the old original from the **/var/xcat/node/syncfiles/org** directory. If you want to cleanup all the files for the append function on the node, you can use ``xdsh -c`` flag. See man page for ``xdsh``.
|
||||
|
||||
.. note:: no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS and APPEND** clause fall in the synclist file.
|
||||
**MERGE** (supported on Linux only).
|
||||
|
||||
You can add an **MERGE** clause to your syncfile. This is only supported on Linux.
|
||||
|
||||
The **MERGE** clause is used to append the contents of the input file to either the **/etc/passwd**, **/etc/shadow** or **/etc/group** files. They are the only supported files. You must not put the **/etc/passwd**, **/etc/shadow**, **/etc/group** files in an **APPEND** clause if using a **MERGE** clause. For these three file you should use a **MERGE** clause. The **APPEND** will add the information to the end of the file. The **MERGE** will add or replace the information and insure that there are no duplicate entries in these files.
|
||||
The **MERGE** clause is used to append the contents of the input file to either the **/etc/passwd**, **/etc/shadow** or **/etc/group** files. They are the only supported files. You must not put the **/etc/passwd**, **/etc/shadow**, **/etc/group** files in an **APPEND** clause if using a **MERGE** clause. For these three files you should use the **MERGE** clause. The **APPEND** will add the information to the end of the file. The **MERGE** will add or replace the information and insure that there are no duplicate entries in these files.
|
||||
|
||||
For example, your synclist file may look like this ::
|
||||
|
||||
@ -174,7 +176,7 @@ For example, your synclist file may look like this ::
|
||||
/tmp/share/file3 -> /tmp/filex
|
||||
/tmp/share/file3.post -> /tmp/file3.post
|
||||
/tmp/myscript -> /tmp/myscript
|
||||
# the below are postscripts
|
||||
# Postscripts
|
||||
EXECUTE:
|
||||
/tmp/share/file2.post
|
||||
/tmp/share/file3.post
|
||||
@ -185,20 +187,21 @@ For example, your synclist file may look like this ::
|
||||
/etc/mydir/mergeshadow -> /etc/shadow
|
||||
/etc/mydir/mergegroup -> /etc/group
|
||||
|
||||
When you use the **MERGE** clause, the file (left) of the arrow is merged into the file right of the arrow. It will replace any common userid's found in those files and add new userids. The **/opt/xcat/share/xcat/scripts/xdcpmerge.sh** is used to accomplish this.
|
||||
When you use the **MERGE** clause, the source file to the left of the arrow is merged into the file to the right of the arrow. It will replace any common userid's found in those files and add new userids. The **/opt/xcat/share/xcat/scripts/xdcpmerge.sh** is used to accomplish this.
|
||||
|
||||
.. note:: no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS,APPEND and MERGE** clause fall in the synclist file.
|
||||
.. note:: no order of execution may be assumed by the order of **EXECUTE, EXECUTEALWAYS, APPEND and MERGE** clauses in the synclist file.
|
||||
|
||||
.. _the_localtion_of_synclist_file_for_updatenode_label:
|
||||
|
||||
The location of synclist file for updatenode and install process
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In the installation process or updatenode process, xCAT needs to figure out the location of the synclist file automatically, so the synclist should be put into the specified place with the proper name.
|
||||
In the installation process or **updatenode** process, xCAT needs to figure out the location of the synclist file automatically, so the synclist should be put into the specified place with the proper name.
|
||||
|
||||
If the provisioning method for the node is an osimage name, then the path to the synclist will be read from the osimage definition synclists attribute. You can display this information by running the following command, supplying your osimage name. ::
|
||||
If the provisioning method for the node is an osimage name, then the path to the synclist will be read from the osimage definition `synclists` attribute. You can display this information by running the following command, supplying your osimage name. ::
|
||||
|
||||
lsdef -t osimage -l <os>-<arch>-netboot-compute
|
||||
|
||||
Object name: <os>-<arch>-netboot-compute
|
||||
exlist=/opt/xcat/share/xcat/netboot/<os>/compute.exlist
|
||||
imagetype=linux
|
||||
@ -213,24 +216,25 @@ If the provisioning method for the node is an osimage name, then the path to the
|
||||
rootimgdir=/install/netboot/<os>/<arch>/compute
|
||||
**synclists=/install/custom/netboot/compute.synclist**
|
||||
|
||||
You can set the synclist path using the following command ::
|
||||
You can set the `synclist` path using the following command ::
|
||||
|
||||
chdef -t osimage -o <os>-<arch>-netboot-compute synclists="/install/custom/netboot/compute.synclist
|
||||
|
||||
If the provisioning method for the node is install,or netboot then the path to the synclist should be of the following format ::
|
||||
If the provisioning method for the node is `install`, or `netboot` then the path to the synclist should be in the following format ::
|
||||
|
||||
/install/custom/<inst_type>/<distro>/<profile>.<os>.<arch>.synclist
|
||||
|
||||
<inst_type>: "install", "netboot"
|
||||
<distro>: "rh", "centos", "fedora", "sles"
|
||||
<profile>,<os>and <arch> are what you set for the node
|
||||
<profile>, <os> and <arch> are what you set for the node
|
||||
|
||||
For example:
|
||||
The location of synclist file for the diskful installation of <os> with 'compute' as the profile ::
|
||||
The location of synclist file for the diskful installation of RedHat 7.5 with 'compute' as the profile ::
|
||||
|
||||
/install/custom/<inst_type>/<distro>/<profile>.<os>.synclist
|
||||
/install/custom/install/rh/compute.rhels7.5.synclist
|
||||
|
||||
The location of synclist file for the diskless netboot of <os> with '<profile>' as the profile ::
|
||||
The location of synclist file for the diskless netboot of SLES 12.3 with 'service' as the profile ::
|
||||
|
||||
/install/custom/<inst_type>/<distro>/<profile>.<os>.synclist
|
||||
/install/custom/netboot/sles/service.sles12.3.synclist
|
||||
|
||||
|
||||
|
@ -48,13 +48,13 @@ OPTIONS
|
||||
|
||||
\ **-**\ **-range**\
|
||||
|
||||
Specify one or more IP ranges acceptable to nmap. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return.
|
||||
Specify one or more IP ranges acceptable to \ **nmap**\ . IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return.
|
||||
|
||||
|
||||
|
||||
\ **-**\ **-sn**\
|
||||
|
||||
Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, bmcdiscover will be dispatched to the specified SNs. Then, the nodename of the service node that 'bmcdiscover' is running on will be set to the 'servicenode' attribute of the discovered BMC node.
|
||||
Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, \ **bmcdiscover**\ will be dispatched to the specified SNs. Then, the nodename of the service node that \ **bmcdiscover**\ is running on will be set to the 'servicenode' attribute of the discovered BMC node.
|
||||
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ Output is similar to:
|
||||
conserver=sn01
|
||||
|
||||
|
||||
4. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console:
|
||||
4. Discover the BMCs and write the discovered node definitions into the xCAT database and write out the stanza format to the console:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
@ -21,13 +21,13 @@ SYNOPSIS
|
||||
|
||||
\ **lsdef**\ [\ **-h | -**\ **-help**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-i**\ \ *attr-list*\ ]
|
||||
|
||||
\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-l | -**\ **-long**\ ] [\ **-s | -**\ **-short**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ]
|
||||
[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ **-i**\ \ *attr-list*\ ]
|
||||
\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ]
|
||||
[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]]
|
||||
[\ **-c | -**\ **-compress**\ ] [\ **-**\ **-osimage**\ ] [\ **-**\ **-nics**\ ] [[\ **-w**\ \ *attr*\ ==\ *val*\ ]
|
||||
[\ **-w**\ \ *attr*\ =~\ *val*\ ] ...] [\ *noderange*\ ]
|
||||
|
||||
\ **lsdef**\ [\ **-l | -**\ **-long**\ ] [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ]
|
||||
[\ **-i**\ \ *attr-list*\ ] [\ **-**\ **-template**\ [\ *template-object-name*\ ]]
|
||||
\ **lsdef**\ [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ]
|
||||
[\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-**\ **-template**\ [\ *template-object-name*\ ]]
|
||||
|
||||
|
||||
***********
|
||||
@ -49,15 +49,15 @@ OPTIONS
|
||||
|
||||
Display all definitions.
|
||||
For performance consideration, the auditlog and eventlog objects will not be listed.
|
||||
To list auditlog or eventlog objects, use lsdef -t auditlog or lsdef -t eventlog instead.
|
||||
To list auditlog or eventlog objects, use \ **lsdef -t auditlog**\ or \ **lsdef -t eventlog**\ instead.
|
||||
|
||||
|
||||
|
||||
\ **-c|-**\ **-compress**\
|
||||
|
||||
Display information in compressed mode, each output line has format "<object name>: <data>".
|
||||
The output can be passed to command xcoll or xdshbak for formatted output.
|
||||
The -c flag must be used with -i flag.
|
||||
The output can be passed to command \ **xcoll**\ or \ **xdshbak**\ for formatted output.
|
||||
The \ **-c**\ flag must be used with \ **-i**\ flag.
|
||||
|
||||
|
||||
|
||||
@ -136,13 +136,18 @@ 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. 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. 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.
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
== 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.
|
||||
|
||||
@ -150,7 +155,7 @@ OPTIONS
|
||||
|
||||
\ **-z|-**\ **-stanza**\
|
||||
|
||||
Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
|
||||
Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files.
|
||||
|
||||
|
||||
|
||||
@ -191,8 +196,6 @@ EXAMPLES
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
lsdef
|
||||
OR
|
||||
lsdef -a
|
||||
|
||||
|
||||
@ -350,7 +353,7 @@ EXAMPLES
|
||||
|
||||
15.
|
||||
|
||||
To list the nodes status and use xcoll to format the output.
|
||||
To list the nodes status and use \ **xcoll**\ to format the output.
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
@ -21,6 +21,8 @@ SYNOPSIS
|
||||
|
||||
\ **xcatperftest**\ [\ **-?|-h**\ ]
|
||||
|
||||
[\ **PERF_DRYRUN**\ =y] \ **xcatperftest run**\ [\ *command-list-file*\ ]
|
||||
|
||||
[\ **PERF_DRYRUN**\ =y] [\ **PERF_NOCREATE**\ =y] \ **xcatperftest**\ <total> [\ *command-list-file*\ ]
|
||||
|
||||
|
||||
@ -29,23 +31,23 @@ DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
The xcatperftest command runs commandes defined in a command list file and get their execution response time baseline for performance purpose.
|
||||
The xcatperftest command is part of the xCAT package xCAT-test, and you can run it standalone or leverage it to build up your automation test cases.
|
||||
The \ **xcatperftest**\ command runs commands defined in a command list file and get their execution response time baseline for performance purpose.
|
||||
The \ **xcatperftest**\ command is part of the xCAT package \ **xCAT-test**\ , and you can run it standalone or leverage it to build up your automation test cases.
|
||||
|
||||
Any commands could be defined in the command list file, however, it is recommended that the one-time initial configuration are well prepared prior to run xcatperftest command.
|
||||
For example, the network object, osdistor and osimage image objects.
|
||||
Any command could be defined in the command list file, however, it is recommended that the one-time initial configuration is well prepared prior to running \ **xcatperftest**\ command.
|
||||
For example, the network object, osdistro and osimage image objects.
|
||||
|
||||
Follow the below steps to run xcatperftest command:
|
||||
Follow the steps below to run \ **xcatperftest**\ command:
|
||||
|
||||
1, Install xCAT-test on a xCAT management nodes.
|
||||
1. Install \ **xCAT-test**\ on a xCAT management node.
|
||||
|
||||
2, Prepare a command list in which the commands are what you want to messure.
|
||||
2. Prepare a command list with the commands you want to measure.
|
||||
|
||||
3, Prepare the initial configuration based on the command list to make sure all commands could be executed in techinal.
|
||||
3. Prepare the initial configuration based on the command list to make sure all commands could be executed in techinal.
|
||||
|
||||
4, Run xcatperftest with the total fake nodes number and the above command list file.
|
||||
4. Run \ **xcatperftest**\ with the total fake nodes number and the above command list file.
|
||||
|
||||
Node: It is suggested to run the command in background as it normally takes long time to finish all the performanc testing with large amount of fake nodes.
|
||||
Node: It is suggested to run the command in background as it normally takes long time to finish all the performance testing with large amount of fake nodes.
|
||||
|
||||
|
||||
*******
|
||||
@ -60,7 +62,7 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
<command-list-file>
|
||||
\ *command-list-file*\
|
||||
|
||||
Specifies the command list file with full-path. xCAT supports an example command file: /opt/xcat/share/xcat/tools/autotest/perfcmds.lst
|
||||
|
||||
@ -88,7 +90,7 @@ COMMAND LIST FILE
|
||||
*****************
|
||||
|
||||
|
||||
The command list file is in flat text format, the testing framework will parse the file line by line, here is an example of the commannd list file:
|
||||
The command list file is in flat text format, the testing framework will parse the file line by line, here is an example of the command list file:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
@ -110,13 +112,13 @@ The command list file is in flat text format, the testing framework will parse t
|
||||
|
||||
|
||||
\ **Note**\ : Each line defines one command, and the commands dependency should be handled by the line order.
|
||||
If you define a node range series line (started with #SERIES#) in this file, xcatperftest will run the command for each node range defined in series line.
|
||||
If you define a node range series line (started with \ **#SERIES#**\ ) in this file, xcatperftest will run the command for each node range defined in series line.
|
||||
|
||||
\ **#SERIES#**\ To define a node range series, and the series should be an comma split incremental number sequence.
|
||||
|
||||
\ **#STANZ#**\ It will be replaced with real stanz file path when this command line runs.
|
||||
|
||||
\ **#NODES#**\ It will be replaced with real node range defined in #SERIES# line when this command line runs. If no series line, the node group will be used.
|
||||
\ **#NODES#**\ It will be replaced with real node range defined in \ **#SERIES#**\ line when this command line runs. If no series line, the node group will be used.
|
||||
|
||||
\ **#PERFGRP#**\ It will be replaced with node group when this command line runs.
|
||||
|
||||
@ -126,7 +128,7 @@ ENVIRONMENT VARIABLE
|
||||
********************
|
||||
|
||||
|
||||
The xcatperftest command supports be customized by some environment variables.
|
||||
The \ **xcatperftest**\ command supports customization by some environment variables.
|
||||
|
||||
\ **FAKE_NODE_PREFIX**\
|
||||
|
||||
@ -148,15 +150,15 @@ It must be a string like 'A.B' and no need to be defined in 'networks' table.
|
||||
|
||||
\ **PERF_NODETEMPL**\
|
||||
|
||||
Optional, The node template name used for generating fake nodes. By default, it will be auto-detected according to the current arch.
|
||||
Optional, the node template name used for generating fake nodes. By default, it will be auto-detected according to the current arch.
|
||||
|
||||
\ **PERF_DRYRUN**\
|
||||
|
||||
Optional, Indicate no real commands will be executed if the environment variable is set.
|
||||
Optional, indicate no real commands will be executed if the environment variable is set.
|
||||
|
||||
\ **PERF_NOCREATE**\
|
||||
|
||||
Optional, Indicate no new fake nodes will be created if the environment variable is set.
|
||||
Optional, indicate no new fake nodes will be created if the environment variable is set.
|
||||
|
||||
|
||||
********
|
||||
@ -201,6 +203,18 @@ EXAMPLES
|
||||
|
||||
|
||||
|
||||
4.
|
||||
|
||||
To run the performance testing for the commands defined in /tmp/cmd.lst in existing xCAT environment:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
xcatperftest run /tmp/cmd.lst
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*****
|
||||
FILES
|
||||
|
@ -269,7 +269,7 @@ site Attributes:
|
||||
genpasswords: Automatically generate random passwords for BMCs when configuring
|
||||
them.
|
||||
|
||||
installdir: The local directory name used to hold the node deployment packages.
|
||||
installdir: The local directory name used to hold the node deployment packages(obsoleted).
|
||||
|
||||
installloc: The location from which the service nodes should mount the
|
||||
deployment packages in the format hostname:/path. If hostname is
|
||||
|
@ -14,6 +14,16 @@ xCAT 2.14.x
|
||||
|xCAT |New OS |New |New Feature |
|
||||
|Version | |Hardware | |
|
||||
+=================================+===============+=============+==================================+
|
||||
|| xCAT 2.14.5 2018/12/07 |- RHEL7.6 | |- syslog tag refine |
|
||||
|| | | | |
|
||||
| `2.14.5 Release Notes <https:// | | |- site:httpport support |
|
||||
| github.com/xcat2/xcat-core/wiki | | | |
|
||||
| /XCAT_2.14.5_Release_Notes>`_ | | |- localdisk GPT partition support |
|
||||
| | | | |
|
||||
| | | |- goconserver v0.3.2 |
|
||||
| | | | |
|
||||
| | | |- xcat-inventory 0.1.6 |
|
||||
+---------------------------------+---------------+-------------+----------------------------------+
|
||||
|| xCAT 2.14.4 2018/10/19 |- UBT18.04.1 | | |
|
||||
|| | | | |
|
||||
| `2.14.4 Release Notes <https:// | | | |
|
||||
|
@ -1037,6 +1037,11 @@ sub populate_site_hash {
|
||||
foreach (@records) {
|
||||
$::XCATSITEVALS{ $_->{key} } = $_->{value};
|
||||
}
|
||||
|
||||
unless (exists($::XCATSITEVALS{'httpport'}) and ($::XCATSITEVALS{'httpport'} ne "")){
|
||||
$::XCATSITEVALS{'httpport'}="80";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,19 +92,20 @@ sub getObjectsOfType
|
||||
}
|
||||
|
||||
# if this is type "group" we need to check the nodelist table
|
||||
my @nodeGroupList = ();
|
||||
if ($type eq 'group') {
|
||||
my $table = "nodelist";
|
||||
my %ext_groups = ();
|
||||
my @TableRowArray = xCAT::DBobjUtils->getDBtable($table);
|
||||
foreach (@TableRowArray) {
|
||||
my @tmplist = split(',', $_->{'groups'});
|
||||
push(@nodeGroupList, @tmplist);
|
||||
}
|
||||
foreach my $n (@nodeGroupList) {
|
||||
if (!grep(/^$n$/, @objlist)) {
|
||||
push(@objlist, $n);
|
||||
foreach my $r (@TableRowArray) {
|
||||
my @tmplist = split(',', $r->{'groups'});
|
||||
foreach (@tmplist) {
|
||||
$ext_groups{$_} = 1 unless exists($ext_groups{$_}) ;
|
||||
}
|
||||
}
|
||||
foreach (@objlist) {
|
||||
$ext_groups{$_} = 1 unless exists($ext_groups{$_}) ;
|
||||
}
|
||||
@objlist = sort keys %ext_groups;
|
||||
}
|
||||
|
||||
@{ $::saveObjList{$type} } = @objlist;
|
||||
@ -142,7 +143,6 @@ sub getobjattrs
|
||||
my $class = shift;
|
||||
my $ref_hash = shift;
|
||||
my @attrs;
|
||||
|
||||
# The $attrs is an optional argument
|
||||
if (ref $_[0]) {
|
||||
@attrs = @{ shift() };
|
||||
@ -164,35 +164,18 @@ sub getobjattrs
|
||||
# go through each object type and look up all the info for each object
|
||||
foreach my $objtype (keys %objtypelist) {
|
||||
|
||||
# only do node type for now
|
||||
if ($objtype eq 'node') {
|
||||
|
||||
# only do node and nodegroup type for now
|
||||
if ($objtype eq 'node' || $objtype eq 'group') {
|
||||
# find the list of tables and corresponding attrs
|
||||
# - for this object type
|
||||
# get the object type decription from Schema.pm
|
||||
my $datatype = $xCAT::Schema::defspec{$objtype};
|
||||
foreach my $this_attr (@{ $datatype->{'attrs'} }) {
|
||||
my $attr = $this_attr->{attr_name};
|
||||
if (scalar(@attrs) > 0) { # Only query specific attributes
|
||||
if (!grep(/^$attr$/, @attrs)) {
|
||||
next; # This attribute is not needed
|
||||
}
|
||||
}
|
||||
|
||||
# table_attr is the attr that actually appears in the
|
||||
# table which could possibly be different then the attr
|
||||
# used in the node def
|
||||
# ex. 'nodetype.arch'
|
||||
my ($lookup_table, $table_attr) = split('\.', $this_attr->{tabentry});
|
||||
if (!grep(/^$table_attr$/, @{ $tableattrs{$lookup_table} })) {
|
||||
push @{ $tableattrs{$lookup_table} }, $table_attr;
|
||||
}
|
||||
}
|
||||
# get the object type description from Schema.pm
|
||||
my %tableattrs = xCAT::DBobjUtils->gettbldesc($objtype, \@attrs);
|
||||
my @objlist = @{ $objtypelist{$objtype} };
|
||||
|
||||
# foreach table look up the list of attrs for this
|
||||
# list of object names
|
||||
foreach my $table (keys %tableattrs) {
|
||||
|
||||
next if ($table eq 'nodegroup'); #getNodesAttribs cannot handle this table now
|
||||
# open the table
|
||||
# with autocommit => 0, it does not work on Ubuntu running mysql
|
||||
my $thistable = xCAT::Table->new($table, -create => 1, -autocommit => 1);
|
||||
@ -203,9 +186,14 @@ sub getobjattrs
|
||||
next;
|
||||
}
|
||||
|
||||
my @objlist = @{ $objtypelist{$objtype} };
|
||||
|
||||
my $rec = $thistable->getNodesAttribs(\@objlist, @{ $tableattrs{$table} });
|
||||
my $rec;
|
||||
if ($objtype eq 'node') {
|
||||
$rec = $thistable->getNodesAttribs(\@objlist, @{$tableattrs{$table}});
|
||||
} else {
|
||||
my %options = ();
|
||||
$options{keep_raw} = 1;
|
||||
$rec = $thistable->getNodesAttribs(\@objlist, \@{$tableattrs{$table}}, %options);
|
||||
}
|
||||
|
||||
# fill in %tabhash with any values that are set
|
||||
foreach my $n (@objlist) {
|
||||
@ -232,6 +220,62 @@ sub getobjattrs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head3 gettbldesc
|
||||
|
||||
Get required table and columns from the Schema for specified definition type.
|
||||
|
||||
$objtype: definition type
|
||||
$attrs_ref: only get the specific attributes,
|
||||
this can be useful especially for performance considerations
|
||||
Arguments:
|
||||
Returns:
|
||||
undef - error
|
||||
hash ref - $tblattrshash{tablename} = [col1, col2]
|
||||
Globals:
|
||||
Error:
|
||||
Example:
|
||||
|
||||
To get the table attributes for object type
|
||||
ex.
|
||||
|
||||
xCAT::DBobjUtils->gettbldesc('node', @attr);
|
||||
|
||||
Comments:
|
||||
|
||||
=cut
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
sub gettbldesc {
|
||||
my ($class, $objtype) = @_;
|
||||
my @attrs;
|
||||
# The $attrs is an optional argument
|
||||
if (ref $_[0]) {
|
||||
@attrs = @{ shift() };
|
||||
}
|
||||
my %tableattrs = ();
|
||||
my $datatype = $xCAT::Schema::defspec{$objtype};
|
||||
foreach my $this_attr (@{ $datatype->{'attrs'} }) {
|
||||
my $attr = $this_attr->{attr_name};
|
||||
if (scalar(@attrs) > 0) { # Only query specific attributes
|
||||
if (!grep(/^$attr$/, @attrs)) {
|
||||
next; # This attribute is not needed
|
||||
}
|
||||
}
|
||||
|
||||
# table_attr is the attr that actually appears in the
|
||||
# table which could possibly be different then the attr
|
||||
# used in the node def
|
||||
# ex. 'nodetype.arch'
|
||||
my ($lookup_table, $table_attr) = split('\.', $this_attr->{tabentry});
|
||||
if (!grep(/^$table_attr$/, @{ $tableattrs{$lookup_table} })) {
|
||||
push @{ $tableattrs{$lookup_table} }, $table_attr;
|
||||
}
|
||||
}
|
||||
return %tableattrs;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head3 getobjdefs
|
||||
|
||||
Get object definitions from the DB.
|
||||
@ -263,13 +307,14 @@ sub getobjattrs
|
||||
sub getobjdefs
|
||||
{
|
||||
my ($class, $hash_ref, $verbose, $attrs_ref, $chname_ref) = @_;
|
||||
my %objhash;
|
||||
|
||||
my %typehash = %$hash_ref;
|
||||
my %tabhash;
|
||||
my @attrs;
|
||||
my @attrs; # required attributes
|
||||
if (ref($attrs_ref)) {
|
||||
@attrs = @$attrs_ref;
|
||||
}
|
||||
my %objhash; # fetched result will be stored in this hash
|
||||
my %tabhash; # used to cache the some result for node/group
|
||||
|
||||
@::foundTableList = ();
|
||||
|
||||
@ -283,40 +328,7 @@ sub getobjdefs
|
||||
return %objhash;
|
||||
}
|
||||
|
||||
# see if we need to get any objects of type 'node'
|
||||
my $getnodes = 0;
|
||||
foreach my $objname (keys %typehash) {
|
||||
if ($typehash{$objname} eq 'node') {
|
||||
$getnodes = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# if so then get node info from tables now
|
||||
# still may need to look up values in some tables using
|
||||
# other keys - also need to figure out what tables to take
|
||||
# values from when using 'only_if' - see below
|
||||
# - but this saves lots of time
|
||||
if ($getnodes) {
|
||||
if (scalar(@attrs) > 0) { # Only get specific attributes of the node
|
||||
# find the onlyif key for the attributes
|
||||
REDO: my $datatype = $xCAT::Schema::defspec{'node'};
|
||||
foreach my $this_attr (@{ $datatype->{'attrs'} }) {
|
||||
my $attr = $this_attr->{attr_name};
|
||||
if (exists($this_attr->{only_if})) {
|
||||
my ($onlyif_key, $onlyif_value) = split('\=', $this_attr->{only_if});
|
||||
if (!grep (/^$onlyif_key$/, @attrs)) {
|
||||
push @attrs, $onlyif_key;
|
||||
goto REDO;
|
||||
}
|
||||
}
|
||||
}
|
||||
%tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash, \@attrs);
|
||||
} else {
|
||||
%tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash);
|
||||
}
|
||||
}
|
||||
|
||||
# Classify the nodes with type
|
||||
# Classify the objects with type, for example, {'node' => ['cn1', 'cn2']}
|
||||
my %type_obj = ();
|
||||
foreach my $objname (keys %typehash) {
|
||||
push @{ $type_obj{ $typehash{$objname} } }, $objname;
|
||||
@ -422,10 +434,38 @@ sub getobjdefs
|
||||
# get the object type decription from Schema.pm
|
||||
my $datatype = $xCAT::Schema::defspec{$objtype};
|
||||
|
||||
# if so then get objects info from tables now
|
||||
# still may need to look up values in some tables using
|
||||
# other keys - also need to figure out what tables to take
|
||||
# values from when using 'only_if' - see below
|
||||
# - but this saves lots of time
|
||||
if ($objtype eq 'node' or $objtype eq 'group') {
|
||||
if (scalar(@attrs) > 0) {
|
||||
# Only get specific attributes of the object
|
||||
# find the onlyif key for the attributes
|
||||
REDO:
|
||||
foreach my $this_attr (@{$datatype->{'attrs'}}) {
|
||||
my $attr = $this_attr->{attr_name};
|
||||
if (exists($this_attr->{only_if})) {
|
||||
my ($onlyif_key, $onlyif_value) = split('\=', $this_attr->{only_if});
|
||||
if (!grep (/^$onlyif_key$/, @attrs)) {
|
||||
push @attrs, $onlyif_key;
|
||||
goto REDO;
|
||||
}
|
||||
}
|
||||
}
|
||||
%tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash, \@attrs);
|
||||
}
|
||||
else {
|
||||
%tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash);
|
||||
}
|
||||
}
|
||||
|
||||
# get the key to look for, for this object type
|
||||
my $objkey = $datatype->{'objkey'};
|
||||
# go through the list of valid attrs
|
||||
foreach my $this_attr (@{ $datatype->{'attrs'} }) {
|
||||
|
||||
my $ent;
|
||||
my $attr = $this_attr->{attr_name};
|
||||
|
||||
@ -435,7 +475,7 @@ sub getobjdefs
|
||||
}
|
||||
|
||||
# skip the attributes that does not needed for node type
|
||||
if ($getnodes) {
|
||||
if ($objtype eq 'node') {
|
||||
if (scalar(@attrs) > 0 && !grep(/^$attr$/, @attrs)) {
|
||||
next;
|
||||
}
|
||||
@ -449,33 +489,33 @@ sub getobjdefs
|
||||
# ex. noderes.nfsdir
|
||||
my ($tab, $tabattr) = split('\.', $this_attr->{tabentry});
|
||||
|
||||
foreach my $objname (sort @{ $type_obj{$objtype} }) {
|
||||
my $check_attr = undef;
|
||||
my $check_value = undef;
|
||||
if (exists $this_attr->{only_if}) {
|
||||
($check_attr, $check_value) = split('\=', $this_attr->{only_if});
|
||||
}
|
||||
|
||||
foreach my $objname (sort @{ $type_obj{$objtype} }) {
|
||||
# get table lookup info from Schema.pm
|
||||
# !!!! some tables depend on the value of certain attrs
|
||||
# we need to look up attrs in the correct order or we will
|
||||
# not be able to determine what tables to look
|
||||
# in for some attrs.
|
||||
if (exists($this_attr->{only_if})) {
|
||||
my ($check_attr, $check_value) = split('\=', $this_attr->{only_if});
|
||||
|
||||
if (defined($check_attr) && defined($check_value)) {
|
||||
# if the object value is not the value we need
|
||||
# to match then try the next only_if value
|
||||
next if (!($objhash{$objname}{$check_attr} =~ /\b$check_value\b/));
|
||||
}
|
||||
|
||||
|
||||
$objhash{$objname}{'objtype'} = $objtype;
|
||||
my %tabentry = ();
|
||||
|
||||
my %tabentry = ();
|
||||
# def commands need to support multiple keys in one table
|
||||
# the subroutine parse_access_tabentry is used for supporting multiple keys
|
||||
my $rc = xCAT::DBobjUtils->parse_access_tabentry($objname,
|
||||
$this_attr->{access_tabentry}, \%tabentry);
|
||||
my $rc = xCAT::DBobjUtils->parse_access_tabentry($objname, $this_attr->{access_tabentry}, \%tabentry);
|
||||
if ($rc != 0) {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"access_tabentry \'$this_attr->{access_tabentry}\' is not valid.";
|
||||
$rsp->{data}->[0] = "access_tabentry \'$this_attr->{access_tabentry}\' is not valid.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
next;
|
||||
}
|
||||
@ -490,7 +530,8 @@ sub getobjdefs
|
||||
# The %tabhash is for performance considerations
|
||||
my $tabspec = $xCAT::Schema::tabspec{$lookup_table};
|
||||
my $nodecol = $tabspec->{'nodecol'} if defined($tabspec->{'nodecol'});
|
||||
if (($lookup_attr eq 'node' && $objtype eq 'node') || (defined($nodecol) && $objtype eq 'node' && $lookup_table ne 'ppcdirect')) {
|
||||
if (($lookup_attr eq 'node' && ($objtype eq 'node' || $objtype eq 'group')) ||
|
||||
(defined($nodecol) && ($objtype eq 'node' || $objtype eq 'group') && $lookup_table ne 'ppcdirect')) {
|
||||
if (defined($tabhash{$lookup_table}{$objname}{$tabattr})) {
|
||||
if ($verbose == 1) {
|
||||
$objhash{$objname}{$attr} = "$tabhash{$lookup_table}{$objname}{$tabattr}\t(Table:$lookup_table - Key:$lookup_attr - Column:$tabattr)";
|
||||
@ -509,7 +550,6 @@ sub getobjdefs
|
||||
$notsearched = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# Not in tabhash,
|
||||
# Need to lookup the table
|
||||
if ($intabhash == 0 && $notsearched == 1) {
|
||||
@ -580,7 +620,8 @@ sub getDBtable
|
||||
|
||||
# save this table info - in case this subr gets called multiple times
|
||||
# --nocache flag specifies not to use cahe
|
||||
if (grep(/^$table$/, @::foundTableList) && !$::opt_nc) {
|
||||
#if (grep(/^$table$/, @::foundTableList) && !$::opt_nc) {
|
||||
if (exists $::TableHash{$table} && !$::opt_nc) {
|
||||
|
||||
# already have this
|
||||
@rows = @{ $::TableHash{$table} };
|
||||
@ -600,7 +641,7 @@ sub getDBtable
|
||||
|
||||
# keep track of the fact that we checked this table
|
||||
# - even if it's empty!
|
||||
push(@::foundTableList, $thistable->{tabname});
|
||||
#push(@::foundTableList, $thistable->{tabname});
|
||||
|
||||
@{ $::TableHash{$table} } = @rows;
|
||||
|
||||
|
@ -110,7 +110,7 @@ sub execute_dcp
|
||||
if (!scalar(%resolved_targets))
|
||||
{
|
||||
my $rsp = {};
|
||||
$rsp->{error}->[0] = "No hosts in node list 1";
|
||||
$rsp->{error}->[0] = "DCP: No hosts in node list 1";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
|
||||
return ++$result;
|
||||
}
|
||||
@ -368,7 +368,7 @@ sub execute_dsh
|
||||
if (!scalar(%resolved_targets))
|
||||
{
|
||||
my $rsp = {};
|
||||
$rsp->{error}->[0] = " No hosts in node list 2";
|
||||
$rsp->{error}->[0] = " DSH: No hosts in node list 2";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
|
||||
return ++$result;
|
||||
}
|
||||
@ -6300,6 +6300,7 @@ sub run_always_rsync_postscripts
|
||||
my @hosts = @$hostnames;
|
||||
my @newoutput = ();
|
||||
my $dshparms;
|
||||
|
||||
foreach my $postsfile (@::alwayspostscripts) {
|
||||
my $tmppostfile = $postsfile;
|
||||
|
||||
@ -6310,17 +6311,34 @@ sub run_always_rsync_postscripts
|
||||
}
|
||||
|
||||
foreach my $host (@hosts) {
|
||||
|
||||
# build xdsh queue
|
||||
# build host and all scripts to execute
|
||||
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
|
||||
}
|
||||
}
|
||||
# EXECUTEALWAYS will only execute the syncfile in the syncfile list
|
||||
foreach my $key (keys %{$$options{'destDir_srcFile'}{$host}}) {
|
||||
foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}->{$key} }) {
|
||||
my $index = 0;
|
||||
my $key1_ref = $$options{'destDir_srcFile'}{$host}->{$key}->{$key1};
|
||||
if (ref $key1_ref eq 'ARRAY') { #stored as ARRAY for same_dest_name
|
||||
while (my $src_file =$key1_ref->[$index] ) {
|
||||
if ($src_file eq $tmppostfile) {
|
||||
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
} else { #stroed as hash table for diff_dest_name
|
||||
foreach my $src_file (keys %{$key1_ref}) {
|
||||
if ($src_file eq $tmppostfile) {
|
||||
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
|
||||
}
|
||||
}
|
||||
} #end else
|
||||
} #end foreach key1
|
||||
} #end foreach key
|
||||
} #end foreach host
|
||||
} #end foreach postsfile
|
||||
|
||||
# now if we have postscripts to run, run xdsh
|
||||
my $out;
|
||||
|
||||
|
||||
foreach my $ps (keys %{ $$dshparms{'postscripts'} }) {
|
||||
my @nodes;
|
||||
|
||||
|
@ -8,7 +8,6 @@ use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR);
|
||||
use xCAT::PPCpower;
|
||||
use xCAT::FSPUtils;
|
||||
use xCAT::GlobalDef;
|
||||
use xCAT_monitoring::monitorctrl;
|
||||
|
||||
#use Data::Dumper;
|
||||
|
||||
@ -183,6 +182,7 @@ sub powercmd_boot {
|
||||
}
|
||||
}
|
||||
if (%newnodestatus) {
|
||||
require xCAT_monitoring::monitorctrl;
|
||||
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1);
|
||||
}
|
||||
return (\@output);
|
||||
@ -364,6 +364,7 @@ sub powercmd {
|
||||
}
|
||||
|
||||
if (%newnodestatus) {
|
||||
require xCAT_monitoring::monitorctrl;
|
||||
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1);
|
||||
}
|
||||
return (\@output);
|
||||
|
@ -614,6 +614,7 @@ sub rnetboot {
|
||||
my $newstat = $::STATUS_POWERING_ON;
|
||||
my %newnodestatus = ();
|
||||
$newnodestatus{$newstat} = [$node];
|
||||
require xCAT_monitoring::monitorctrl;
|
||||
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1);
|
||||
return ([ [ $node, "Success", $Rc ] ]);
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ use xCAT::MsgUtils;
|
||||
use xCAT::FSPpower;
|
||||
|
||||
use xCAT::GlobalDef;
|
||||
use xCAT_monitoring::monitorctrl;
|
||||
|
||||
##########################################################################
|
||||
# Parse the command line for options and operands
|
||||
@ -301,6 +300,7 @@ sub powercmd_boot {
|
||||
}
|
||||
}
|
||||
|
||||
require xCAT_monitoring::monitorctrl;
|
||||
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1);
|
||||
return (\@output);
|
||||
}
|
||||
@ -423,6 +423,7 @@ sub powercmd {
|
||||
}
|
||||
}
|
||||
}
|
||||
require xCAT_monitoring::monitorctrl;
|
||||
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1);
|
||||
return (\@result);
|
||||
}
|
||||
|
@ -1159,7 +1159,7 @@ passed as argument rather than by table value',
|
||||
" prefix (e.g. 00:11:aa)\n\n" .
|
||||
" genpasswords: Automatically generate random passwords for BMCs when configuring\n" .
|
||||
" them.\n\n" .
|
||||
" installdir: The local directory name used to hold the node deployment packages.\n\n" .
|
||||
" installdir: The local directory name used to hold the node deployment packages(obsoleted).\n\n" .
|
||||
" installloc: The location from which the service nodes should mount the \n" .
|
||||
" deployment packages in the format hostname:/path. If hostname is\n" .
|
||||
" omitted, it defaults to the management node. The path must\n" .
|
||||
|
@ -2797,20 +2797,21 @@ sub getNodeAttribs
|
||||
unless (scalar keys %{ $data[0] }) {
|
||||
return undef;
|
||||
}
|
||||
my $attrib;
|
||||
foreach $datum (@data) {
|
||||
foreach $attrib (@attribs)
|
||||
{
|
||||
unless (defined $datum->{$attrib}) {
|
||||
|
||||
#skip undefined values, save time
|
||||
next;
|
||||
}
|
||||
my $retval;
|
||||
if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) {
|
||||
$datum->{$attrib} = $retval;
|
||||
} else {
|
||||
delete $datum->{$attrib};
|
||||
if (!exists($options{keep_raw})){
|
||||
my $attrib;
|
||||
foreach $datum (@data) {
|
||||
foreach $attrib (@attribs) {
|
||||
unless (defined $datum->{$attrib}) {
|
||||
#skip undefined values, save time
|
||||
next;
|
||||
}
|
||||
my $retval;
|
||||
if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) {
|
||||
$datum->{$attrib} = $retval;
|
||||
}
|
||||
else {
|
||||
delete $datum->{$attrib};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2984,6 +2985,9 @@ sub getNodeAttribs_nosub_returnany
|
||||
}
|
||||
@results = $self->getAttribs({ $nodekey => $node }, @attribs);
|
||||
|
||||
# return the DB without any rendering, this is for fetch attributes of group
|
||||
return @results if (exists($options{keep_raw}));
|
||||
|
||||
my %attribsToDo;
|
||||
for (@attribs) {
|
||||
$attribsToDo{$_} = 0
|
||||
@ -4326,8 +4330,10 @@ sub delimitcol {
|
||||
#--------------------------------------------------------------------------------
|
||||
sub buildWhereClause {
|
||||
my $attrvalstr = shift; # array of atr<op>val strings
|
||||
my $getkeysonly = shift;
|
||||
my $whereclause; # Where Clause
|
||||
my $firstpass = 1;
|
||||
my @gotkeys = ();
|
||||
foreach my $m (@{$attrvalstr})
|
||||
{
|
||||
my $attr;
|
||||
@ -4368,6 +4374,9 @@ sub buildWhereClause {
|
||||
($attr, $val) = split />/, $m, 2;
|
||||
$operator = ' > ';
|
||||
} else {
|
||||
if (defined($getkeysonly)) {
|
||||
return "Unsupported operator:$m on -w flag input";
|
||||
}
|
||||
xCAT::MsgUtils->message("S", "Unsupported operator:$m on -w flag input, could not build a Where Clause.");
|
||||
$whereclause = "";
|
||||
return $whereclause;
|
||||
@ -4382,7 +4391,12 @@ sub buildWhereClause {
|
||||
|
||||
#$whereclause .="\')";
|
||||
$whereclause .= "\'";
|
||||
|
||||
if (defined($getkeysonly)) {
|
||||
push @gotkeys, $attr;
|
||||
}
|
||||
}
|
||||
if (defined($getkeysonly)) {
|
||||
return \@gotkeys;
|
||||
}
|
||||
return $whereclause;
|
||||
|
||||
|
90
travis.pl
90
travis.pl
@ -271,19 +271,19 @@ sub send_back_comment{
|
||||
#--------------------------------------------------------
|
||||
sub build_xcat_core{
|
||||
my @output;
|
||||
my @cmds = ("gpg --list-keys",
|
||||
"sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo");
|
||||
foreach my $cmd (@cmds){
|
||||
print "[build_xcat_core] running $cmd\n";
|
||||
@output = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print "[build_xcat_core] $cmd ....[Failed]\n";
|
||||
send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#my @cmds = ("gpg --list-keys",
|
||||
# "sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo");
|
||||
#foreach my $cmd (@cmds){
|
||||
# print "[build_xcat_core] running $cmd\n";
|
||||
# @output = runcmd("$cmd");
|
||||
# if($::RUNCMD_RC){
|
||||
# print "[build_xcat_core] $cmd ....[Failed]\n";
|
||||
# send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information");
|
||||
# return 1;
|
||||
# }
|
||||
#}
|
||||
|
||||
my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1";
|
||||
my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1 GPGSIGN=0";
|
||||
@output = runcmd("$cmd");
|
||||
print ">>>>>Dumper the output of '$cmd'\n";
|
||||
print Dumper \@output;
|
||||
@ -321,8 +321,8 @@ sub install_xcat{
|
||||
|
||||
my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh",
|
||||
"sudo chmod 777 /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list",
|
||||
"sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -",
|
||||
"sudo apt-get -qq update");
|
||||
my @output;
|
||||
@ -339,7 +339,7 @@ sub install_xcat{
|
||||
}
|
||||
}
|
||||
|
||||
my $cmd = "sudo apt-get install xcat --force-yes";
|
||||
my $cmd = "sudo apt-get install xcat --allow-remove-essential --allow-unauthenticated";
|
||||
@output = runcmd("$cmd");
|
||||
#print ">>>>>Dumper the output of '$cmd'\n";
|
||||
#print Dumper \@output;
|
||||
@ -448,7 +448,7 @@ sub check_syntax{
|
||||
# Return code:
|
||||
#--------------------------------------------------------
|
||||
sub run_fast_regression_test{
|
||||
my $cmd = "sudo apt-get install xcat-test --force-yes";
|
||||
my $cmd = "sudo apt-get install xcat-test --allow-remove-essential --allow-unauthenticated";
|
||||
my @output = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
|
||||
@ -488,43 +488,20 @@ sub run_fast_regression_test{
|
||||
@output = runcmd("cat $conf_file");
|
||||
print Dumper \@output;
|
||||
|
||||
$cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"ci_test\" -l'";
|
||||
my @caseslist = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
|
||||
print "[run_fast_regression_test] error dumper:\n";
|
||||
print Dumper \@caseslist;
|
||||
return 1;
|
||||
}else{
|
||||
print "[run_fast_regression_test] $cmd .....:\n";
|
||||
print Dumper \@caseslist;
|
||||
}
|
||||
|
||||
# $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"mn_only-wait_fix\" -l'";
|
||||
# my @caseslist = runcmd("$cmd");
|
||||
# if($::RUNCMD_RC){
|
||||
# print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
|
||||
# print "[run_fast_regression_test] error dumper:\n";
|
||||
# print Dumper \@caseslist;
|
||||
# return 1;
|
||||
# }else{
|
||||
# print "[run_fast_regression_test] $cmd .....:\n";
|
||||
# print Dumper \@caseslist;
|
||||
# }
|
||||
#
|
||||
# #This is a black list for CI test
|
||||
# #It is useful for debug or development
|
||||
# #please ignore during common work
|
||||
## {
|
||||
## sub array_filter {
|
||||
## my $src_array_ref = shift;
|
||||
## my $filter_array_ref = shift;
|
||||
##
|
||||
## my @left_array;
|
||||
## foreach my $item (@{$src_array_ref}) {
|
||||
## my $hit = 0;
|
||||
## foreach my $f (@{$filter_array_ref}) {
|
||||
## $hit = 1 if ($f eq $item);
|
||||
## }
|
||||
## push @left_array, $item unless ($hit);
|
||||
## }
|
||||
## @$src_array_ref = @left_array;
|
||||
## }
|
||||
##
|
||||
## #my @filter_cases=("testtest");
|
||||
## #array_filter(\@caseslist, \@filter_cases);
|
||||
## }
|
||||
|
||||
my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'");
|
||||
#my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'");
|
||||
my $casenum = @caseslist;
|
||||
my $x = 0;
|
||||
my @failcase;
|
||||
@ -613,6 +590,17 @@ my @disk = runcmd("df -h");
|
||||
print "Disk information:\n";
|
||||
print Dumper \@disk;
|
||||
|
||||
# Hacking the netmask. Not sure if we need to recover it after finish xcattest
|
||||
# Note: Here has an assumption from Travis VM: only 1 UP Ethernet interface available (CHANGEME if it not as is)
|
||||
my @intfinfo = runcmd("ip -o link |grep 'link/ether'|grep 'state UP' |awk -F ':' '{print \$2}'|head -1");
|
||||
foreach my $nic (@intfinfo) {
|
||||
print "Hacking the netmask length to 16 if it is 32: $nic\n";
|
||||
runcmd("ip -4 addr show $nic|grep 'inet'|grep -q '/32' && sudo ip addr add \$(hostname -I|awk '{print \$1}')/16 dev $nic");
|
||||
}
|
||||
my @ipinfo = runcmd("ip addr");
|
||||
print "Networking information:\n";
|
||||
print Dumper \@ipinfo;
|
||||
|
||||
#Start to check the format of pull request
|
||||
$last_func_start = timelocal(localtime());
|
||||
print GREEN "\n------ Checking Pull Request Format ------\n";
|
||||
|
@ -27,11 +27,11 @@ Note: The scan method currently support is B<nmap>.
|
||||
|
||||
=item B<--range>
|
||||
|
||||
Specify one or more IP ranges acceptable to nmap. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B<bmcdiscover> command may take a long time to return.
|
||||
Specify one or more IP ranges acceptable to B<nmap>. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B<bmcdiscover> command may take a long time to return.
|
||||
|
||||
=item B<--sn>
|
||||
|
||||
Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, bmcdiscover will be dispatched to the specified SNs. Then, the nodename of the service node that 'bmcdiscover' is running on will be set to the 'servicenode' attribute of the discovered BMC node.
|
||||
Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, B<bmcdiscover> will be dispatched to the specified SNs. Then, the nodename of the service node that B<bmcdiscover> is running on will be set to the 'servicenode' attribute of the discovered BMC node.
|
||||
|
||||
=item B<-s>
|
||||
|
||||
@ -101,7 +101,7 @@ Output is similar to:
|
||||
servicenode=sn01
|
||||
conserver=sn01
|
||||
|
||||
4. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console:
|
||||
4. Discover the BMCs and write the discovered node definitions into the xCAT database and write out the stanza format to the console:
|
||||
|
||||
bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z
|
||||
|
||||
|
@ -6,13 +6,13 @@ B<lsdef> - Use this command to list xCAT data object definitions.
|
||||
|
||||
B<lsdef> [B<-h>|B<--help>] [B<-t> I<object-types>] [B<-i> I<attr-list>]
|
||||
|
||||
B<lsdef> [B<-V>|B<--verbose>] [B<-l>|B<--long>] [B<-s>|B<--short>] [B<-a>|B<--all>] [B<-S>]
|
||||
[B<-t> I<object-types>] [B<-o> I<object-names>] [B<-z>|B<--stanza>] [B<-i> I<attr-list>]
|
||||
B<lsdef> [B<-V>|B<--verbose>] [B<-a>|B<--all>] [B<-S>]
|
||||
[B<-t> I<object-types>] [B<-o> I<object-names>] [B<-z>|B<--stanza>] [B<-i> I<attr-list> | [B<-l>|B<--long>] | [B<-s>|B<--short>]]
|
||||
[B<-c>|B<--compress>] [B<--osimage>] [B<--nics>] [[B<-w> I<attr>==I<val>]
|
||||
[B<-w> I<attr>=~I<val>] ...] [I<noderange>]
|
||||
|
||||
B<lsdef> [B<-l>|B<--long>] [B<-a>|B<--all>] [B<-t> I<object-types>] [B<-z>|B<--stanza>]
|
||||
[B<-i> I<attr-list>] [B<--template> [I<template-object-name>]]
|
||||
B<lsdef> [B<-a>|B<--all>] [B<-t> I<object-types>] [B<-z>|B<--stanza>]
|
||||
[B<-i> I<attr-list> | [B<-l>|B<--long>] | [B<-s>|B<--short>]] [B<--template> [I<template-object-name>]]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@ -28,13 +28,13 @@ in the xCAT database and xCAT object definition templates shipped in xCAT.
|
||||
|
||||
Display all definitions.
|
||||
For performance consideration, the auditlog and eventlog objects will not be listed.
|
||||
To list auditlog or eventlog objects, use lsdef -t auditlog or lsdef -t eventlog instead.
|
||||
To list auditlog or eventlog objects, use B<lsdef -t auditlog> or B<lsdef -t eventlog> instead.
|
||||
|
||||
=item B<-c|--compress>
|
||||
|
||||
Display information in compressed mode, each output line has format "<object name>: <data>".
|
||||
The output can be passed to command xcoll or xdshbak for formatted output.
|
||||
The -c flag must be used with -i flag.
|
||||
The output can be passed to command B<xcoll> or B<xdshbak> for formatted output.
|
||||
The B<-c> flag must be used with B<-i> flag.
|
||||
|
||||
=item B<-h|--help>
|
||||
|
||||
@ -87,9 +87,10 @@ 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. 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 ==, !=, =~ and !~ are available. 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.
|
||||
@ -99,7 +100,7 @@ Note: if the "val" fields includes spaces or any other characters that will be p
|
||||
|
||||
=item B<-z|--stanza>
|
||||
|
||||
Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
|
||||
Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files. And default is to list complete object definition, use B<-i> to specify the attribute scope.
|
||||
|
||||
=back
|
||||
|
||||
@ -126,8 +127,6 @@ when defining an xCAT node.
|
||||
|
||||
To get a list of all the objects that have been defined.
|
||||
|
||||
lsdef
|
||||
OR
|
||||
lsdef -a
|
||||
|
||||
=item 3.
|
||||
@ -211,7 +210,7 @@ The hidden nodes are FSP/BPAs.
|
||||
|
||||
=item 15.
|
||||
|
||||
To list the nodes status and use xcoll to format the output.
|
||||
To list the nodes status and use B<xcoll> to format the output.
|
||||
|
||||
lsdef -t node -i status -c | xcoll
|
||||
|
||||
|
@ -9,6 +9,7 @@ from gevent.subprocess import Popen, PIPE
|
||||
import requests
|
||||
import urllib3
|
||||
urllib3.disable_warnings()
|
||||
from requests.auth import AuthBase
|
||||
|
||||
import exceptions as xcat_exception
|
||||
|
||||
@ -17,6 +18,7 @@ class RestSession(object):
|
||||
def __init__(self):
|
||||
self.session = requests.Session()
|
||||
self.cookies = None
|
||||
self.auth = None
|
||||
|
||||
def request(self, method, url, headers, data=None, timeout=30):
|
||||
|
||||
@ -24,6 +26,7 @@ class RestSession(object):
|
||||
response = self.session.request(method, url,
|
||||
data=data,
|
||||
headers=headers,
|
||||
auth=self.auth,
|
||||
verify=False,
|
||||
timeout=timeout)
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
@ -60,6 +63,9 @@ class RestSession(object):
|
||||
if not self.cookies:
|
||||
self.cookies = requests.utils.dict_from_cookiejar(self.session.cookies)
|
||||
|
||||
if not self.auth and 'X-Auth-Token' in response.headers:
|
||||
self.auth = XTokenAuth(response.headers['X-Auth-Token'])
|
||||
|
||||
return response
|
||||
|
||||
def extract_server_and_port(self, message_string, format="STRING"):
|
||||
@ -127,3 +133,13 @@ class RestSession(object):
|
||||
raise SelfServerException(error)
|
||||
|
||||
return response
|
||||
|
||||
class XTokenAuth(AuthBase):
|
||||
|
||||
def __init__(self,authToken):
|
||||
|
||||
self.authToken=authToken
|
||||
|
||||
def __call__(self, auth):
|
||||
auth.headers['X-Auth-Token']=self.authToken
|
||||
return(auth)
|
||||
|
@ -379,6 +379,8 @@ rmdir \"/tmp/$userid\" \n")
|
||||
except (SelfServerException, SelfClientException) as e:
|
||||
self.callback.error(e.message, node)
|
||||
|
||||
self.callback.info("%s: BMC password changed. Update 'bmcpasswd' for the node or the 'passwd' table with the new password." % node)
|
||||
|
||||
def _set_apis_values(self, key, value, **kw):
|
||||
node = kw['node']
|
||||
obmc = openbmc.OpenBMCRest(name=node, nodeinfo=kw['nodeinfo'], messager=self.callback,
|
||||
@ -430,8 +432,8 @@ rmdir \"/tmp/$userid\" \n")
|
||||
|
||||
def _print_bmc_netinfo(self, node, ip, netmask, gateway, vlan):
|
||||
|
||||
self.callback.info('%s: BMC IP: %s'% (node, ip))
|
||||
self.callback.info('%s: BMC Netmask: %s' % (node, netmask))
|
||||
self.callback.info('%s: BMC IP: %s' % (node, ip))
|
||||
self.callback.info('%s: BMC Netmask: %s' % (node, netmask))
|
||||
self.callback.info('%s: BMC Gateway: %s' % (node, gateway))
|
||||
if vlan:
|
||||
self.callback.info('%s: BMC VLAN ID: %s' % (node, vlan))
|
||||
@ -440,6 +442,7 @@ rmdir \"/tmp/$userid\" \n")
|
||||
|
||||
node = kw['node']
|
||||
node_info = kw['nodeinfo']
|
||||
zeroconf = "Unknown"
|
||||
obmc = openbmc.OpenBMCRest(name=node, nodeinfo=node_info, messager=self.callback,
|
||||
debugmode=self.debugmode, verbose=self.verbose)
|
||||
|
||||
@ -451,7 +454,7 @@ rmdir \"/tmp/$userid\" \n")
|
||||
return
|
||||
|
||||
if not netinfo:
|
||||
return self.callback.error("No network information get", node)
|
||||
return self.callback.error("Can not get network information", node)
|
||||
if 'error' in netinfo:
|
||||
return self.callback.info('%s: %s' % (node, netinfo['error']))
|
||||
|
||||
@ -470,6 +473,7 @@ rmdir \"/tmp/$userid\" \n")
|
||||
|
||||
origin_type = netinfo[origin_nic]['ipsrc']
|
||||
origin_ip_obj = netinfo[origin_nic]['ipobj']
|
||||
zeroconf = netinfo[origin_nic]['zeroconf']
|
||||
|
||||
if vlan:
|
||||
pre_nic = nic.split('_')[0]
|
||||
@ -482,6 +486,8 @@ rmdir \"/tmp/$userid\" \n")
|
||||
nic = pre_nic + '_' + vlan
|
||||
|
||||
try:
|
||||
# Display Zero Config information in case IP setting fails or set IP is not accessible
|
||||
self.callback.info('%s: Setting BMC IP configuration... [Zero Config IP: %s]' % (node, zeroconf))
|
||||
obmc.set_netinfo(nic, ip, prefix, gateway)
|
||||
sleep( 5 )
|
||||
nic_netinfo = obmc.get_nic_netinfo(nic)
|
||||
@ -490,7 +496,7 @@ rmdir \"/tmp/$userid\" \n")
|
||||
return
|
||||
|
||||
if not nic_netinfo:
|
||||
return self.callback.error('Did not get info for NIC %s' % nic, node)
|
||||
return self.callback.error('Can not get info for NIC %s' % nic, node)
|
||||
|
||||
set_success = False
|
||||
for net_id, attr in nic_netinfo.items():
|
||||
@ -500,7 +506,7 @@ rmdir \"/tmp/$userid\" \n")
|
||||
set_success = True
|
||||
|
||||
if not set_success:
|
||||
return self.callback.error('Config BMC IP failed', node)
|
||||
return self.callback.error('Setting BMC IP configuration failed. [Zero Config IP: %s]' % zeroconf, node)
|
||||
|
||||
try:
|
||||
if origin_type == 'DHCP':
|
||||
@ -508,7 +514,7 @@ rmdir \"/tmp/$userid\" \n")
|
||||
elif origin_type == 'Static':
|
||||
obmc.delete_ip_object(origin_nic, origin_ip_obj)
|
||||
else:
|
||||
self.callback.error('Get wrong Origin type %s for NIC %s IP object %s' % (origin_type, nic, origin_ip_obj), node)
|
||||
self.callback.error('Got wrong origin type %s for NIC %s IP object %s' % (origin_type, nic, origin_ip_obj), node)
|
||||
except (SelfServerException, SelfClientException) as e:
|
||||
self.callback.error(e.message, node)
|
||||
|
||||
@ -525,7 +531,7 @@ rmdir \"/tmp/$userid\" \n")
|
||||
self.callback.error(e.message, node)
|
||||
return
|
||||
if not netinfo:
|
||||
return self.callback.error("No network information get", node)
|
||||
return self.callback.error("Can not get network information", node)
|
||||
defaultgateway = "n/a"
|
||||
bmchostname = ""
|
||||
if 'defaultgateway' in netinfo:
|
||||
|
@ -60,7 +60,7 @@ class OpenBMCInventoryTask(ParallelNodesCommand):
|
||||
continue
|
||||
|
||||
firm_info.append('%s Firmware Product: %s (%s)%s' %
|
||||
(firm_obj_dict[key].purpose,
|
||||
(firm_obj_dict[key].purpose.upper(),
|
||||
firm_obj_dict[key].version,
|
||||
firm_obj_dict[key].active,
|
||||
flag))
|
||||
@ -70,7 +70,7 @@ class OpenBMCInventoryTask(ParallelNodesCommand):
|
||||
for extended in extendeds:
|
||||
firm_info.append('%s Firmware Product: ' \
|
||||
'-- additional info: %s' % \
|
||||
(firm_obj_dict[key].purpose, extended))
|
||||
(firm_obj_dict[key].purpose.upper(), extended))
|
||||
|
||||
return firm_info
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python
|
||||
###############################################################################
|
||||
# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
###############################################################################
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
from __future__ import print_function
|
||||
import gevent
|
||||
import time
|
||||
|
||||
from common.task import ParallelNodesCommand
|
||||
from common.exceptions import SelfClientException, SelfServerException
|
||||
from hwctl import redfish_client as redfish
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger('xcatagent')
|
||||
|
||||
class RedfishPowerTask(ParallelNodesCommand):
|
||||
"""Executor for power-related actions."""
|
||||
|
||||
def get_state(self, **kw):
|
||||
|
||||
node = kw['node']
|
||||
rf = redfish.RedfishRest(name=node, nodeinfo=kw['nodeinfo'], messager=self.callback,
|
||||
debugmode=self.debugmode, verbose=self.verbose)
|
||||
|
||||
state = 'Unknown'
|
||||
try:
|
||||
rf.login()
|
||||
self.callback.info('%s: %s' % (node, state))
|
||||
except (SelfServerException, SelfClientException) as e:
|
||||
self.callback.error(e.message, node)
|
||||
|
||||
return state
|
@ -900,13 +900,15 @@ class OpenBMCRest(object):
|
||||
continue
|
||||
dev,match,netid = k.partition("/ipv4/")
|
||||
if netid:
|
||||
if 'LinkLocal' in v["Origin"] or v["Address"].startswith("169.254"):
|
||||
msg = "Found LinkLocal address %s for interface %s, Ignoring..." % (v["Address"], dev)
|
||||
self._print_record_log(msg, 'get_netinfo')
|
||||
continue
|
||||
nicid = dev.split('/')[-1]
|
||||
if nicid not in netinfo:
|
||||
netinfo[nicid] = {}
|
||||
if 'LinkLocal' in v["Origin"] or v["Address"].startswith("169.254"):
|
||||
msg = "Found LinkLocal address %s for interface %s, Ignoring..." % (v["Address"], dev)
|
||||
self._print_record_log(msg, 'get_netinfo')
|
||||
# Save Zero Conf information
|
||||
netinfo[nicid]["zeroconf"] = v["Address"]
|
||||
continue
|
||||
if 'ip' in netinfo[nicid]:
|
||||
msg = "%s: Another valid ip %s found." % (node, v["Address"])
|
||||
self._print_record_log(msg, 'get_netinfo')
|
||||
|
129
xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py
Normal file
129
xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py
Normal file
@ -0,0 +1,129 @@
|
||||
#!/usr/bin/env python
|
||||
###############################################################################
|
||||
# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
###############################################################################
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
import time
|
||||
|
||||
from common import utils, rest
|
||||
from common.exceptions import SelfClientException, SelfServerException
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger('xcatagent')
|
||||
|
||||
HTTP_PROTOCOL = "https://"
|
||||
PROJECT_URL = "/redfish/v1"
|
||||
|
||||
SESSION_URL = PROJECT_URL + "/SessionService/Sessions"
|
||||
|
||||
class RedfishRest(object):
|
||||
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
|
||||
def __init__(self, name, **kwargs):
|
||||
|
||||
self.name = name
|
||||
self.username = None
|
||||
self.password = None
|
||||
|
||||
if 'nodeinfo' in kwargs:
|
||||
for key, value in kwargs['nodeinfo'].items():
|
||||
setattr(self, key, value)
|
||||
if not hasattr(self, 'bmcip'):
|
||||
self.bmcip = self.name
|
||||
|
||||
self.verbose = kwargs.get('debugmode')
|
||||
self.messager = kwargs.get('messager')
|
||||
|
||||
self.session = rest.RestSession()
|
||||
self.root_url = HTTP_PROTOCOL + self.bmcip
|
||||
|
||||
def _print_record_log (self, msg, cmd, error_flag=False):
|
||||
|
||||
if self.verbose or error_flag:
|
||||
localtime = time.asctime( time.localtime(time.time()) )
|
||||
log = self.name + ': [redfish_debug] ' + cmd + ' ' + msg
|
||||
if self.verbose:
|
||||
self.messager.info(localtime + ' ' + log)
|
||||
logger.debug(log)
|
||||
|
||||
def _print_error_log (self, msg, cmd):
|
||||
|
||||
self._print_record_log(msg, cmd, True)
|
||||
|
||||
def _log_request (self, method, url, headers, data=None, files=None, file_path=None, cmd=''):
|
||||
|
||||
header_str = ' '.join([ "%s: %s" % (k, v) for k,v in headers.items() ])
|
||||
msg = 'curl -k -X %s -H \"%s\" ' % (method, header_str)
|
||||
|
||||
if cmd != 'login':
|
||||
msg += '-H \"X-Auth-Token: xxxxxx\" '
|
||||
|
||||
if data:
|
||||
if cmd == 'login':
|
||||
data = data.replace('"Password": "%s"' % self.password, '"Password": "xxxxxx"')
|
||||
data = '-d \'%s\'' % data
|
||||
msg += '%s %s -v' % (url, data)
|
||||
else:
|
||||
msg += url
|
||||
|
||||
self._print_record_log(msg, cmd)
|
||||
return msg
|
||||
|
||||
def request (self, method, resource, headers=None, payload=None, timeout=30, cmd=''):
|
||||
|
||||
httpheaders = headers or RedfishRest.headers
|
||||
url = resource
|
||||
if not url.startswith(HTTP_PROTOCOL):
|
||||
url = self.root_url + resource
|
||||
|
||||
data = None
|
||||
if payload:
|
||||
data=json.dumps(payload)
|
||||
|
||||
self._log_request(method, url, httpheaders, data=data, cmd=cmd)
|
||||
|
||||
try:
|
||||
response = self.session.request(method, url, headers=httpheaders, data=data, timeout=timeout)
|
||||
return self.handle_response(response, cmd=cmd)
|
||||
except SelfServerException as e:
|
||||
if cmd == 'login':
|
||||
e.message = "Login to BMC failed: Can't connect to {0} {1}.".format(e.host_and_port, e.detail_msg)
|
||||
else:
|
||||
e.message = 'BMC did not respond. ' \
|
||||
'Validate BMC configuration and retry the command.'
|
||||
self._print_error_log(e.message, cmd)
|
||||
raise
|
||||
except ValueError:
|
||||
error = 'Received wrong format response: %s' % response
|
||||
self._print_error_log(error, cmd)
|
||||
raise SelfServerException(error)
|
||||
|
||||
def handle_response (self, resp, cmd=''):
|
||||
|
||||
data = resp.json()
|
||||
code = resp.status_code
|
||||
|
||||
if code != requests.codes.ok and code != requests.codes.created:
|
||||
|
||||
description = ''.join(data['error']['@Message.ExtendedInfo'][0]['Message'])
|
||||
error = '[%d] %s' % (code, description)
|
||||
self._print_error_log(error, cmd)
|
||||
raise SelfClientException(error, code)
|
||||
|
||||
if cmd == 'login' and not 'X-Auth-Token' in resp.headers:
|
||||
raise SelfServerException('Login Failed: Did not get Session Token from response')
|
||||
|
||||
self._print_record_log('%s %s' % (code, data['Name']), cmd)
|
||||
return data
|
||||
|
||||
def login(self):
|
||||
|
||||
payload = { "UserName": self.username, "Password": self.password }
|
||||
self.request('POST', SESSION_URL, payload=payload, timeout=20, cmd='login')
|
||||
|
@ -2,7 +2,8 @@ from common import utils
|
||||
import gevent
|
||||
from gevent.pool import Pool
|
||||
|
||||
MODULE_MAP = {"openbmc": "OpenBMCManager"}
|
||||
MODULE_MAP = {"openbmc": "OpenBMCManager",
|
||||
"redfish": "RedfishManager"}
|
||||
|
||||
class BaseManager(object):
|
||||
def __init__(self, messager, cwd):
|
||||
|
77
xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py
Normal file
77
xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py
Normal file
@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env python
|
||||
###############################################################################
|
||||
# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
###############################################################################
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
import os
|
||||
import gevent
|
||||
import re
|
||||
import sys
|
||||
from docopt import docopt,DocoptExit
|
||||
|
||||
from common import utils
|
||||
from common import exceptions as xcat_exception
|
||||
from hwctl.executor.redfish_power import RedfishPowerTask
|
||||
from hwctl.power import DefaultPowerManager
|
||||
|
||||
from xcatagent import base
|
||||
import logging
|
||||
logger = logging.getLogger('xcatagent')
|
||||
try:
|
||||
if not logger.handlers:
|
||||
utils.enableSyslog('xcat.agent')
|
||||
except:
|
||||
pass
|
||||
|
||||
DEBUGMODE = False
|
||||
VERBOSE = False
|
||||
|
||||
# global variables of rpower
|
||||
POWER_REBOOT_OPTIONS = ('boot', 'reset')
|
||||
POWER_SET_OPTIONS = ('on', 'off', 'bmcreboot', 'softoff')
|
||||
POWER_GET_OPTIONS = ('bmcstate', 'state', 'stat', 'status')
|
||||
|
||||
class RedfishManager(base.BaseManager):
|
||||
def __init__(self, messager, cwd, nodes=None, envs=None):
|
||||
super(RedfishManager, self).__init__(messager, cwd)
|
||||
self.nodes = nodes
|
||||
self.debugmode = (envs and envs.get('debugmode')) or None
|
||||
#TODO, remove the global variable DEBUGMODE
|
||||
global DEBUGMODE
|
||||
DEBUGMODE = envs['debugmode']
|
||||
|
||||
if self.debugmode:
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
def rpower(self, nodesinfo, args):
|
||||
|
||||
# 1, parse args
|
||||
rpower_usage = """
|
||||
Usage:
|
||||
rpower [-V|--verbose] [boot|bmcreboot|bmcstate|off|on|reset|softoff|stat|state|status]
|
||||
|
||||
Options:
|
||||
-V --verbose rpower verbose mode.
|
||||
"""
|
||||
|
||||
try:
|
||||
opts=docopt(rpower_usage, argv=args)
|
||||
|
||||
self.verbose=opts.pop('--verbose')
|
||||
action=[k for k,v in opts.items() if v][0]
|
||||
except Exception as e:
|
||||
# It will not be here as perl has validation for args
|
||||
self.messager.error("Failed to parse arguments for rpower: %s" % args)
|
||||
return
|
||||
|
||||
# 2, validate the args
|
||||
if action not in (POWER_GET_OPTIONS + POWER_SET_OPTIONS + POWER_REBOOT_OPTIONS):
|
||||
self.messager.error("Not supported subcommand for rpower: %s" % action)
|
||||
return
|
||||
|
||||
# 3, run the subcommands
|
||||
runner = RedfishPowerTask(nodesinfo, callback=self.messager, debugmode=self.debugmode, verbose=self.verbose)
|
||||
DefaultPowerManager().get_power_state(runner)
|
||||
|
@ -290,16 +290,17 @@ sub is_http_ready {
|
||||
my $installdir = shift;
|
||||
my $errormsg_ref = shift;
|
||||
|
||||
my $http_status = `netstat -tunlp | grep -e "httpd" -e "apache" | grep "LISTEN" 2>&1`;
|
||||
my $http_status = `netstat -tnlp | grep -e "httpd" -e "apache" 2>&1`;
|
||||
if (!$http_status) {
|
||||
$$errormsg_ref = "No HTTP listening status get by command 'netstat'";
|
||||
return 0;
|
||||
} elsif ($http_status !~ /\S*\s+\S*\s+\S*\s+\S*$httpport\s+.+/) {
|
||||
} elsif ($http_status !~ /\S*\s+\S*\s+\S*\s+\S*:$httpport\s+.+/) {
|
||||
$$errormsg_ref = "The port defined in 'site' table HTTP is not listening";
|
||||
return 0;
|
||||
}
|
||||
my $test_file = "efibootmgr";
|
||||
|
||||
my $http = "http://$mnip:$httpport/$installdir/postscripts/syslog";
|
||||
my $http = "http://$mnip:$httpport/$installdir/postscripts/$test_file";
|
||||
my %httperror = (
|
||||
"400" => "The request $http could not be understood by the server due to malformed syntax",
|
||||
"401" => "The request requires user authentication.",
|
||||
@ -330,12 +331,12 @@ sub is_http_ready {
|
||||
$$errormsg_ref = "Prepare test environment error: $!";
|
||||
return 0;
|
||||
}
|
||||
my @outputtmp = `wget -O $tmpdir/syslog $http 2>&1`;
|
||||
my @outputtmp = `wget -O $tmpdir/$test_file $http 2>&1`;
|
||||
my $rst = $?;
|
||||
$rst = $rst >> 8;
|
||||
|
||||
if ((!$rst) && (-e "$tmpdir/syslog")) {
|
||||
unlink("$tmpdir/syslog");
|
||||
if ((!$rst) && (-e "$tmpdir/$test_file")) {
|
||||
unlink("$tmpdir/$test_file");
|
||||
rmdir ("$tmpdir");
|
||||
return 1;
|
||||
} elsif ($rst == 4) {
|
||||
@ -355,7 +356,7 @@ sub is_http_ready {
|
||||
$$errormsg_ref = "Unknown return code of wget <$returncode>.";
|
||||
}
|
||||
}
|
||||
unlink("$tmpdir/syslog");
|
||||
unlink("$tmpdir/$test_file");
|
||||
if(! rmdir ("$tmpdir")){
|
||||
$$errormsg_ref .= " Clean test environment error(rmdir $tmpdir): $!";
|
||||
}
|
||||
|
@ -1169,10 +1169,11 @@ sub handle_cluster_msg {
|
||||
my $log_msg = $log_ref->{msg};
|
||||
my @split_log = split(/\s+/, $log_msg);
|
||||
|
||||
if ($split_log[1] eq "Allowing") {
|
||||
my $command = $split_log[2];
|
||||
my $nodes_str = $split_log[4];
|
||||
my $sub_command = $split_log[5];
|
||||
# As xcat log message will in both messages.log and cluster.log, need to filter one to avoid the duplication
|
||||
if ($split_log[1] eq "xCAT:" && $split_log[2] eq "Allowing") {
|
||||
my $command = $split_log[3];
|
||||
my $nodes_str = $split_log[5];
|
||||
my $sub_command = $split_log[6];
|
||||
|
||||
if ($command eq "rinstall" or $command eq "rnetboot" or ($command eq "rpower" and $sub_command =~ /on|boot|reset/) or ($command eq "xdsh" and $log_msg =~ /reboot|shutdown -r/)) {
|
||||
my @nodes = probe_utils->parse_node_range($nodes_str);
|
||||
@ -1188,7 +1189,7 @@ sub handle_cluster_msg {
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif ($log_ref->{msg} =~ /(.+)\s+status:\s+(.+)\s+statustime:/) {
|
||||
} elsif ($log_ref->{msg} =~ /INFO xcat.updatestatus - (.+):\s+changing status=(.+)/) {
|
||||
my $nodes = $1;
|
||||
my $status = $2;
|
||||
my $record = "Node status is changed to $status";
|
||||
|
@ -139,7 +139,14 @@ sub subvars {
|
||||
}
|
||||
$ENV{INSTALLDIR} = $installroot;
|
||||
|
||||
my $httpport;
|
||||
$httpport = xCAT::TableUtils->get_site_attribute("httpport");
|
||||
if (!defined($httpport)) {
|
||||
$httpport = "80";
|
||||
}
|
||||
$ENV{HTTPPORT} = $httpport;
|
||||
|
||||
my $httpportsuffix=":$httpport";
|
||||
#replace the env with the right value so that correct include files can be found
|
||||
$inc =~ s/#ENV:([^#]+)#/envvar($1)/eg;
|
||||
my $res;
|
||||
@ -282,6 +289,7 @@ sub subvars {
|
||||
$inc =~ s/#INCLUDE:([^#^\n]+)#/includefile($1, 0, 0)/eg;
|
||||
}
|
||||
|
||||
|
||||
#support multiple paths of osimage in rh/sles diskfull installation
|
||||
my @pkgdirs;
|
||||
if (defined($media_dir)) {
|
||||
@ -295,11 +303,11 @@ sub subvars {
|
||||
if ($c == 0) {
|
||||
# After some tests, if we put the repo in pre scripts in the kickstart like for rhels6.x
|
||||
# the rhels5.9 will not be installed successfully. So put in kickstart directly.
|
||||
$source_in_pre .= "echo 'url --url http://'\$nextserver'/$pkgdir' >> /tmp/repos";
|
||||
$source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #For rhels5.9
|
||||
$source_in_pre .= "echo 'url --url http://'\$nextserver'$httpportsuffix/$pkgdir' >> /tmp/repos";
|
||||
$source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir\n"; #For rhels5.9
|
||||
} else {
|
||||
$source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver'/$pkgdir' >> /tmp/repos";
|
||||
$source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #for rhels5.9
|
||||
$source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver'$httpportsuffix/$pkgdir' >> /tmp/repos";
|
||||
$source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir\n"; #for rhels5.9
|
||||
}
|
||||
my $distrepofile="/install/postscripts/repos/$pkgdir/local-repository.tmpl";
|
||||
if( -f "$distrepofile"){
|
||||
@ -309,13 +317,13 @@ sub subvars {
|
||||
open($repofd,"<","$distrepofile");
|
||||
$repo_in_post = <$repofd>;
|
||||
close($repofd);
|
||||
$repo_in_post =~ s#baseurl=#baseurl=http://$master/#g;
|
||||
$repo_in_post =~ s#baseurl=#baseurl=http://$master$httpportsuffix/#g;
|
||||
$writerepo .= "\ncat >/etc/yum.repos.d/local-repository-$c.repo << 'EOF'\n";
|
||||
$writerepo .="$repo_in_post\n";
|
||||
$writerepo .="EOF\n";
|
||||
}
|
||||
} elsif ($platform =~ /^(sles|suse)/) {
|
||||
my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$pkgdir";
|
||||
my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir";
|
||||
$source .= " <listentry>
|
||||
<media_url>$http</media_url>
|
||||
<product>SuSE-Linux-pkg$c</product>
|
||||
@ -323,7 +331,7 @@ sub subvars {
|
||||
<ask_on_error config:type=\"boolean\">false</ask_on_error> <!-- available since openSUSE 11.0 -->
|
||||
<name>SuSE-Linux-pkg$c</name> <!-- available since openSUSE 11.1/SLES11 (bnc#433981) -->
|
||||
</listentry>";
|
||||
$source_in_pre .= "<listentry><media_url>http://'\$nextserver'$pkgdir</media_url><product>SuSE-Linux-pkg$c</product><product_dir>/</product_dir><ask_on_error config:type=\"boolean\">false</ask_on_error><name>SuSE-Linux-pkg$c</name></listentry>";
|
||||
$source_in_pre .= "<listentry><media_url>http://'\$nextserver'$httpportsuffix$pkgdir</media_url><product>SuSE-Linux-pkg$c</product><product_dir>/</product_dir><ask_on_error config:type=\"boolean\">false</ask_on_error><name>SuSE-Linux-pkg$c</name></listentry>";
|
||||
} elsif ($platform =~ /^sle15*/) {
|
||||
if ( -d "$pkgdir") {
|
||||
opendir(DIR,$pkgdir);
|
||||
@ -339,7 +347,7 @@ sub subvars {
|
||||
$product_name=$subdir;
|
||||
}
|
||||
if (defined($product_name) && defined($product_dir)){
|
||||
$source .="<listentry><media_url>http://XCATNEXTSERVERHOOK$pkgdir</media_url><product>$product_name</product><product_dir>/$product_dir</product_dir></listentry>";
|
||||
$source .="<listentry><media_url>http://XCATNEXTSERVERHOOK$httpportsuffix$pkgdir</media_url><product>$product_name</product><product_dir>/$product_dir</product_dir></listentry>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -383,6 +391,7 @@ sub subvars {
|
||||
$inc =~ s/#SHORTNAME#/$shortname/g;
|
||||
$inc =~ s/#GETNODEDOMAIN:([^#]+)#/get_node_domain($1)/eg;
|
||||
$inc =~ s/#GETPRINICMAC:([^#]+)#/xCAT::Utils::parseMacTabEntry(tabdb("mac",$1,"mac"),$1)/eg;
|
||||
$inc =~ s/#COLONHTTPPORT#/$httpportsuffix/eg;
|
||||
|
||||
if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) {
|
||||
$inc =~ s/#UNCOMMENTOENABLEDEBUGPORT#/ /g;
|
||||
@ -392,7 +401,7 @@ sub subvars {
|
||||
$inc =~ s/#UNCOMMENTOENABLESSH#/ /g;
|
||||
}
|
||||
|
||||
my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver} . $media_dir . "/sdk1";
|
||||
my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver}.$httpportsuffix . $media_dir . "/sdk1";
|
||||
|
||||
$inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg;
|
||||
|
||||
@ -531,7 +540,7 @@ sub subvars {
|
||||
}
|
||||
}
|
||||
elsif ("ubuntu" eq $platform) {
|
||||
my $default_script = " wget http://`cat /tmp/xcatserver`" . $ENV{INSTALLDIR} . "/autoinst/getinstdisk; chmod u+x getinstdisk; ./getinstdisk;";
|
||||
my $default_script = " wget http://`cat /tmp/xcatserver`".':'.$ENV{HTTPPORT} . $ENV{INSTALLDIR} . "/autoinst/getinstdisk; chmod u+x getinstdisk; ./getinstdisk;";
|
||||
$inc =~ s/#INCLUDE_GET_INSTALL_DISK_SCRIPT#/$default_script/;
|
||||
}
|
||||
else {
|
||||
@ -1117,7 +1126,7 @@ sub mirrorspec {
|
||||
if (!$pkgdir) {
|
||||
$pkgdir = $_;
|
||||
} else {
|
||||
my $osuurl = "http://" . $masternode . $_ . " ./";
|
||||
my $osuurl = "http://" . $masternode.':'.$ENV{httpport} . $_ . " ./";
|
||||
push @mirrors, $osuurl;
|
||||
}
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ sub getNodeStatusFromNodesetState {
|
||||
Arguments:
|
||||
status -- a hash pointer of the node status. A key is a status string. The value is
|
||||
an array pointer of nodes that have the same status.
|
||||
for example: {alive=>["node1", "node1"], unreachable=>["node5","node100"]}
|
||||
for example: {alive=>["node1", "node2"], unreachable=>["node5","node100"]}
|
||||
force -- 1 force the input values to be set.
|
||||
-- 0 make sure if the input value is the next valid value.
|
||||
Returns:
|
||||
@ -637,7 +637,7 @@ sub getNodeStatusFromNodesetState {
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
sub setNodeStatusAttributes {
|
||||
print "monitorctrl::setNodeStatusAttributes called\n";
|
||||
#print "monitorctrl::setNodeStatusAttributes called\n";
|
||||
my $temp = shift;
|
||||
if ($temp =~ /xCAT_monitoring::monitorctrl/) {
|
||||
$temp = shift;
|
||||
@ -703,8 +703,12 @@ sub setNodeStatusAttributes {
|
||||
if (@$nodes > 0) {
|
||||
$updates{'status'} = $_;
|
||||
$updates{'statustime'} = $currtime;
|
||||
my $nodestate = "@$nodes status: $updates{'status'} statustime: $updates{'statustime'}";
|
||||
xCAT::MsgUtils->message('S', "$nodestate");
|
||||
#my $nodestate = "@$nodes status: $updates{'status'} statustime: $updates{'statustime'}";
|
||||
foreach my $node (@$nodes) {
|
||||
# To make the log clear, iterate for each node. This might be potential performance issue!
|
||||
my $nodestate = "xcat.updatestatus - $node: changing status=$updates{'status'}";
|
||||
xCAT::MsgUtils->message('S', "$nodestate");
|
||||
}
|
||||
my $where_clause;
|
||||
my $dbname = xCAT::Utils->get_DBName();
|
||||
|
||||
|
@ -759,7 +759,7 @@ sub configSwitch {
|
||||
my $table = xCAT::Table->new('switches', -create => 0);
|
||||
if ($table) {
|
||||
my @tmp1 = $table->getAllAttribs(('switch'));
|
||||
if (defined(@tmp1) && (@tmp1 > 0)) {
|
||||
if (scalar @tmp1 > 0) {
|
||||
foreach (@tmp1) {
|
||||
my @switches_tmp = noderange($_->{switch});
|
||||
if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; }
|
||||
@ -1360,7 +1360,7 @@ sub getNodesMonServers
|
||||
my $table = xCAT::Table->new('switches', -create => 0);
|
||||
if ($table) {
|
||||
my @tmp1 = $table->getAllAttribs(('switch'));
|
||||
if (defined(@tmp1) && (@tmp1 > 0)) {
|
||||
if (scalar @tmp1 > 0) {
|
||||
foreach (@tmp1) {
|
||||
my @switches_tmp = noderange($_->{switch});
|
||||
if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; }
|
||||
|
@ -1709,9 +1709,11 @@ sub defmk
|
||||
$objTypeListsHash{$objk}{$obj} = 1;
|
||||
}
|
||||
}
|
||||
my $numobjrequest = 0;
|
||||
|
||||
OBJ: foreach my $obj (keys %::FINALATTRS)
|
||||
{
|
||||
$numobjrequest++;
|
||||
|
||||
my $type = $::FINALATTRS{$obj}{objtype};
|
||||
# check to make sure we have type
|
||||
@ -2034,16 +2036,19 @@ sub defmk
|
||||
if ($error)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions.";
|
||||
$rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT object definitions.";
|
||||
$rsp->{numofnodes}->[0] = $numobjrequest;
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
my $nodenum = 0;
|
||||
my $totalnumobj = 0;
|
||||
my $ret = 0;
|
||||
my @nodes_updated = ();
|
||||
foreach my $node (keys %::FINALATTRS) {
|
||||
$totalnumobj++;
|
||||
if ($::FINALATTRS{$node}{updated}) {
|
||||
$nodenum++;
|
||||
push @nodes_updated, $node;
|
||||
@ -2065,6 +2070,7 @@ sub defmk
|
||||
$rsp->{data}->[$n] = "$o";
|
||||
$n++;
|
||||
}
|
||||
$rsp->{numofnodes}->[0] = $totalnumobj;
|
||||
if ($n > 1) {
|
||||
# Some objects were created ($n was increased), report as success
|
||||
$rsp->{data}->[0] = "The database was updated for the following objects:";
|
||||
@ -2078,9 +2084,9 @@ sub defmk
|
||||
}
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "$nodenum object definitions have been created or modified.";
|
||||
$rsp->{numofnodes}->[0] = $totalnumobj;
|
||||
if ($nodenum > 0) {
|
||||
# Some objects were created, report as success
|
||||
$rsp->{numofnodes}->[0] = $nodenum;
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
else {
|
||||
@ -2385,9 +2391,10 @@ sub defch
|
||||
}
|
||||
my $nodewithdomain;
|
||||
my $invalidobjname = ();
|
||||
my $numobjrequest = 0;
|
||||
foreach my $obj (keys %::FINALATTRS)
|
||||
{
|
||||
|
||||
$numobjrequest++;
|
||||
my $isDefined = 0;
|
||||
my $type = $::FINALATTRS{$obj}{objtype};
|
||||
my %attrhash;
|
||||
@ -2919,7 +2926,8 @@ sub defch
|
||||
if ($error)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions.";
|
||||
$rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT object definitions.";
|
||||
$rsp->{numofnodes}->[0] = $numobjrequest;
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
@ -2928,7 +2936,9 @@ sub defch
|
||||
my $nodenum = 0;
|
||||
my $ret = 0;
|
||||
my @nodes_updated = ();
|
||||
my $totalnumobj = 0;
|
||||
foreach my $node (keys %::FINALATTRS) {
|
||||
$totalnumobj++;
|
||||
if ($::FINALATTRS{$node}{updated}) {
|
||||
$nodenum++;
|
||||
push @nodes_updated, $node;
|
||||
@ -2955,6 +2965,7 @@ sub defch
|
||||
} else {
|
||||
$rsp->{data}->[0] = "No database was updated";
|
||||
}
|
||||
$rsp->{numofnodes}->[0] = $totalnumobj;
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
else
|
||||
@ -2963,10 +2974,10 @@ sub defch
|
||||
|
||||
if ($nodenum) {
|
||||
$rsp->{data}->[0] = "$nodenum object definitions have been created or modified.";
|
||||
$rsp->{numofnodes}->[0] = $nodenum;
|
||||
} else {
|
||||
$rsp->{data}->[0] = "No object definitions have been created or modified.";
|
||||
}
|
||||
$rsp->{numofnodes}->[0] = $totalnumobj;
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
if (scalar(keys %newobjects) > 0)
|
||||
{
|
||||
@ -3263,7 +3274,7 @@ sub defls
|
||||
|
||||
|
||||
# do we want just the object names or all the attr=val
|
||||
if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_template)
|
||||
if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_z || $::opt_template)
|
||||
{
|
||||
|
||||
# assume we want the the details - not just the names
|
||||
@ -3286,7 +3297,7 @@ sub defls
|
||||
|
||||
# is -i then just get the ones in the list
|
||||
$::ATTRLIST = $::opt_i;
|
||||
} elsif (@::noderange || $::opt_o) {
|
||||
} elsif (@::noderange || $::opt_o || $::opt_z) {
|
||||
|
||||
# if they gave a list of objects then they must want more
|
||||
# than the object names!
|
||||
@ -3786,6 +3797,8 @@ sub defls
|
||||
my $numobjects = 0; # keep track of how many object we want to display
|
||||
# for each type
|
||||
|
||||
my $totalnumobj = 0;
|
||||
|
||||
foreach my $type (@::clobjtypes)
|
||||
{
|
||||
# Check if -i specifies valid attributes
|
||||
@ -3904,6 +3917,7 @@ sub defls
|
||||
# for each object
|
||||
foreach my $obj (sort keys %defhash)
|
||||
{
|
||||
$totalnumobj++; # include all the obj
|
||||
|
||||
unless ($obj)
|
||||
{
|
||||
@ -4157,8 +4171,15 @@ sub defls
|
||||
|
||||
# Display the definition of objects
|
||||
if (defined($rsp_info->{data}) && scalar(@{ $rsp_info->{data} }) > 0) {
|
||||
$rsp_info->{numofnodes}->[0] = $numobjects;
|
||||
$rsp_info->{numofnodes}->[0] = $totalnumobj;
|
||||
xCAT::MsgUtils->message("I", $rsp_info, $::callback);
|
||||
} else {
|
||||
if ( $totalnumobj > 0) {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "No object definitions have been found";
|
||||
$rsp->{numofnodes}->[0] = $totalnumobj;
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -4306,9 +4327,11 @@ sub defrm
|
||||
# the memberlist nodes must be updated.
|
||||
|
||||
my $numobjects = 0;
|
||||
my $totalnumobj = 0;
|
||||
my %objTypeLists;
|
||||
foreach my $obj (keys %objhash)
|
||||
{
|
||||
$totalnumobj++;
|
||||
my $objtype = $objhash{$obj};
|
||||
if (!defined($objTypeLists{$objtype})) # Do no call getObjectsOfType for the same objtype more than once.
|
||||
{
|
||||
@ -4504,11 +4527,11 @@ sub defrm
|
||||
{
|
||||
if ($numobjects > 0)
|
||||
{
|
||||
my $rsp;
|
||||
if ($::verbose)
|
||||
{
|
||||
|
||||
# give results
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "The following objects were removed:";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
|
||||
@ -4518,16 +4541,14 @@ sub defrm
|
||||
$rsp->{data}->[$n] = "$o";
|
||||
$n++;
|
||||
}
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
my $nodenum = scalar(keys %objhash);
|
||||
$rsp->{data}->[0] = "$nodenum object definitions have been removed.";
|
||||
$rsp->{numofnodes}->[0] = $nodenum;
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
$rsp->{numofnodes}->[0] = $totalnumobj;
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
|
||||
# Give a warning message to the user to remove the children of the node.
|
||||
for my $tn (keys %objhash) {
|
||||
@ -4541,6 +4562,7 @@ sub defrm
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{numofnodes}->[0] = $totalnumobj;
|
||||
$rsp->{data}->[0] = "No objects have been removed from the xCAT database.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
|
@ -322,22 +322,29 @@ sub bmcdiscovery_processargs {
|
||||
######################################
|
||||
# check if there is nmap or not
|
||||
######################################
|
||||
if (-x '/usr/bin/nmap')
|
||||
{
|
||||
if (-x '/usr/bin/nmap') {
|
||||
$nmap_path = "/usr/bin/nmap";
|
||||
}
|
||||
elsif (-x '/usr/local/bin/nmap')
|
||||
{
|
||||
elsif (-x '/usr/local/bin/nmap') {
|
||||
$nmap_path = "/usr/local/bin/nmap";
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
my $rsp;
|
||||
push @{ $rsp->{data} }, "\tThere is no nmap in /usr/bin/ or /usr/local/bin/. \n ";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
######################################
|
||||
# check if there is ipmitool-xcat or not
|
||||
######################################
|
||||
unless (-x '/opt/xcat/bin/ipmitool-xcat') {
|
||||
my $rsp;
|
||||
push @{ $rsp->{data} }, "\tThere is no ipmitool-xcat in /opt/xcat/bin/, make sure that package ipmitool-xcat is installed successfully.\n ";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ($::opt_T) {
|
||||
my $msg = "The -t option is deprecated and will be ignored";
|
||||
my $rsp = {};
|
||||
|
@ -872,7 +872,7 @@ sub mkinstall {
|
||||
my $kcmdline = "nofb utf8 auto url=http://" . $instserver . ":$httpport/install/autoinst/" . $node;
|
||||
|
||||
$kcmdline .= " xcatd=" . $instserver;
|
||||
$kcmdline .= " mirror/http/hostname=" . $instserver;
|
||||
$kcmdline .= " mirror/http/hostname=" . $instserver.":$httpport";
|
||||
if ($maxmem) {
|
||||
$kcmdline .= " mem=$maxmem";
|
||||
}
|
||||
@ -973,6 +973,7 @@ sub mknetboot
|
||||
my $xcatdport = "3001";
|
||||
my $xcatiport = "3002";
|
||||
my $nodestatus = "y";
|
||||
my $httpport="80";
|
||||
my @myself = xCAT::NetworkUtils->determinehostname();
|
||||
my $myname = $myself[ (scalar @myself) - 1 ];
|
||||
|
||||
@ -1003,6 +1004,12 @@ sub mknetboot
|
||||
{
|
||||
$nodestatus = $ref->{value};
|
||||
}
|
||||
($ref) = $sitetab->getAttribs({ key => 'httpport' }, 'value');
|
||||
if ($ref and $ref->{value})
|
||||
{
|
||||
$httpport = $ref->{value};
|
||||
}
|
||||
|
||||
}
|
||||
my %donetftp = ();
|
||||
my %oents = %{ $ostab->getNodesAttribs(\@nodes, [qw(os arch profile provmethod)]) };
|
||||
|
@ -2677,7 +2677,7 @@ sub addnet
|
||||
}
|
||||
}
|
||||
#for cumulus ZTP process
|
||||
push @netent, " option cumulus-provision-url \"http://$tftp.':' . $httpport/install/postscripts/cumulusztp\";\n";
|
||||
push @netent, " option cumulus-provision-url \"http://$tftp:$httpport/install/postscripts/cumulusztp\";\n";
|
||||
|
||||
my $ddnserver = $nameservers;
|
||||
$ddnserver =~ s/,.*//;
|
||||
@ -2717,9 +2717,9 @@ sub addnet
|
||||
# $lstatements = 'if exists gpxe.bus-id { filename = \"\"; } else if exists client-architecture { filename = \"xcat/xnba.kpxe\"; } '.$lstatements;
|
||||
push @netent, " if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { #x86, xCAT Network Boot Agent\n";
|
||||
push @netent, " always-broadcast on;\n";
|
||||
push @netent, " filename = \"http://$tftp.':' . $httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . "\";\n";
|
||||
push @netent, " filename = \"http://$tftp:$httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . "\";\n";
|
||||
push @netent, " } else if option user-class-identifier = \"xNBA\" and option client-architecture = 00:09 { #x86, xCAT Network Boot Agent\n";
|
||||
push @netent, " filename = \"http://$tftp.':' . $httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . ".uefi\";\n";
|
||||
push @netent, " filename = \"http://$tftp:$httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . ".uefi\";\n";
|
||||
push @netent, " } else if option client-architecture = 00:00 { #x86\n";
|
||||
push @netent, " filename \"xcat/xnba.kpxe\";\n";
|
||||
push @netent, " } else if option vendor-class-identifier = \"Etherboot-5.4\" { #x86\n";
|
||||
@ -2735,10 +2735,10 @@ sub addnet
|
||||
push @netent, " filename \"elilo.efi\";\n";
|
||||
push @netent,
|
||||
" } else if option client-architecture = 00:0e { #OPAL-v3\n ";
|
||||
push @netent, " option conf-file = \"http://$tftp.':' . $httpport/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n";
|
||||
push @netent, " option conf-file = \"http://$tftp:$httpport/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n";
|
||||
push @netent,
|
||||
" } else if substring (option vendor-class-identifier,0,11) = \"onie_vendor\" { #for onie on cumulus switch\n";
|
||||
push @netent, " option www-server = \"http://$tftp.':' . $httpport/install/onie/onie-installer\";\n";
|
||||
push @netent, " option www-server = \"http://$tftp:$httpport/install/onie/onie-installer\";\n";
|
||||
push @netent,
|
||||
" } else if substring(filename,0,1) = null { #otherwise, provide yaboot if the client isn't specific\n ";
|
||||
push @netent, " filename \"/yaboot\";\n";
|
||||
|
@ -253,6 +253,10 @@ sub process_request {
|
||||
copy("/usr/lib/syslinux/pxelinux.0", "$tftpdir/pxelinux.0");
|
||||
} elsif (-r "/usr/share/syslinux/pxelinux.0") {
|
||||
copy("/usr/share/syslinux/pxelinux.0", "$tftpdir/pxelinux.0");
|
||||
} elsif ("/usr/lib/PXELINUX/pxelinux.0") {
|
||||
copy("/usr/lib/PXELINUX/pxelinux.0", "$tftpdir/pxelinux.0");
|
||||
} else {
|
||||
copy("/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0", "$tftpdir/pxelinux.0");
|
||||
}
|
||||
if (-r "$tftpdir/pxelinux.0") {
|
||||
chmod(0644, "$tftpdir/pxelinux.0");
|
||||
|
@ -1230,7 +1230,7 @@ sub parse_args {
|
||||
my $option_s;
|
||||
GetOptions( 's' => \$option_s );
|
||||
return ([ 1, "The -s option is not supported for OpenBMC." ]) if ($option_s);
|
||||
if ( "resolved" ~~ @ARGV) {
|
||||
if ( "resolved=" ~~ @ARGV) {
|
||||
return ([ 1, "$usage_errormsg $reventlog_no_id_resolved_errormsg" ]);
|
||||
}
|
||||
return ([ 1, "Only one option is supported at the same time for $command" ]);
|
||||
@ -1243,7 +1243,7 @@ sub parse_args {
|
||||
|
||||
if ($command eq "rbeacon") {
|
||||
unless ($subcommand =~ /^on$|^off$|^stat$/) {
|
||||
return ([ 1, "Only 'on', 'off' or 'stat' are supported for OpenBMC managed nodes."]);
|
||||
return ([ 1, "Only 'on', 'off' and 'stat' are supported for OpenBMC managed nodes."]);
|
||||
}
|
||||
} elsif ($command eq "rpower") {
|
||||
unless ($subcommand =~ /^on$|^off$|^softoff$|^reset$|^boot$|^bmcreboot$|^bmcstate$|^status$|^stat$|^state$/) {
|
||||
@ -1291,6 +1291,22 @@ sub parse_args {
|
||||
if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) {
|
||||
return ([ 1, "Can not query $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{subcommand} information with other options at the same time" ]) if ($#ARGV > 1);
|
||||
# subcommand defined in the configured API hash, return from here, the RSPCONFIG_CONFIGURED_API_KEY is the key into the hash
|
||||
if ($subcommand =~ /(\w+)=(.*)/) {
|
||||
my $subcommand_key = $1;
|
||||
my $subcommand_value = $2;
|
||||
my $error_msg = "Invalid value '$subcommand_value' for '$subcommand_key'";
|
||||
my @valid_values = sort (keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} });
|
||||
if (!@valid_values) {
|
||||
if ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean") {
|
||||
@valid_values = (0, 1);
|
||||
} else {
|
||||
return ([1, "$error_msg"]);
|
||||
}
|
||||
}
|
||||
if (! grep { $_ eq $subcommand_value } @valid_values ) {
|
||||
return ([1, "$error_msg, Valid values: " . join(",", @valid_values)]);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
elsif ($subcommand =~ /^(\w+)=(.*)/) {
|
||||
@ -1729,14 +1745,16 @@ sub parse_command_status {
|
||||
}
|
||||
else {
|
||||
# Everything else is invalid
|
||||
xCAT::SvrUtils::sendmsg([1, "Invalid value '$subcommand_value' for '$subcommand_key'"], $callback);
|
||||
my $error_msg = "Invalid value '$subcommand_value' for '$subcommand_key'";
|
||||
my @valid_values = keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} };
|
||||
if (!@valid_values) {
|
||||
if ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean") {
|
||||
xCAT::SvrUtils::sendmsg([1, "Valid values: 0,1"], $callback);
|
||||
xCAT::SvrUtils::sendmsg([1, "$error_msg, Valid values: 0,1"], $callback);
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg([1, "$error_msg"], $callback);
|
||||
}
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg([1, "Valid values: " . join(",", @valid_values)], $callback);
|
||||
xCAT::SvrUtils::sendmsg([1, "$error_msg, Valid values: " . join(",", @valid_values)], $callback);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -1782,7 +1800,7 @@ sub parse_command_status {
|
||||
$next_status{RSPCONFIG_GET_REQUEST} = "RSPCONFIG_GET_RESPONSE";
|
||||
|
||||
$status_info{RSPCONFIG_SET_HOSTNAME_REQUEST}{data} = $1;
|
||||
$status_info{RSPCONFIG_SET_RESPONSE}{argv} = "Hostname";
|
||||
$status_info{RSPCONFIG_SET_RESPONSE}{argv} = "BMC Hostname";
|
||||
$status_info{RSPCONFIG_GET_RESPONSE}{argv} = "hostname";
|
||||
return 0;
|
||||
}
|
||||
@ -2530,7 +2548,7 @@ sub deal_with_response {
|
||||
$cur_url = $status_info{REVENTLOG_RESOLVED_REQUEST}{init_url};
|
||||
}
|
||||
my $log_id = (split ('/', $cur_url))[5];
|
||||
$error = "Invalid ID=$log_id provided to be resolved. [$::RESPONSE_FORBIDDEN]";
|
||||
$error = "Invalid ID: $log_id provided to be resolved. [$::RESPONSE_FORBIDDEN]";
|
||||
} else{
|
||||
$error = "$::RESPONSE_FORBIDDEN - Requested endpoint does not exist or may indicate function is not yet supported by OpenBMC firmware.";
|
||||
}
|
||||
@ -3320,7 +3338,7 @@ sub reventlog_response {
|
||||
}
|
||||
else {
|
||||
# Return if there are no entries with callout data
|
||||
xCAT::SvrUtils::sendmsg("There are no event log entries contributing to LED fault", $callback, $node);
|
||||
xCAT::SvrUtils::sendmsg([1, "No event log entries needed to be resolved"], $callback, $node);
|
||||
$wait_node_num--;
|
||||
return;
|
||||
}
|
||||
@ -3878,7 +3896,7 @@ sub rspconfig_api_config_response {
|
||||
my $last_component = $attr_value[-1];
|
||||
my @valid_values = values %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} };
|
||||
if ($value) {
|
||||
xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node);
|
||||
xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . ": $last_component", $callback, $node);
|
||||
my $found = grep(/$value/, @valid_values);
|
||||
if ($found eq 0) {
|
||||
# Received data value not expected
|
||||
@ -4113,7 +4131,7 @@ sub rspconfig_dump_response {
|
||||
if ($node_info{$node}{cur_status} eq "RSPCONFIG_DUMP_CLEAR_RESPONSE") {
|
||||
if ($response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
my $dump_id = $status_info{RSPCONFIG_DUMP_CLEAR_RESPONSE}{argv};
|
||||
xCAT::MsgUtils->message("I", { data => ["[$dump_id] clear"] }, $callback) unless ($next_status{ $node_info{$node}{cur_status} });
|
||||
xCAT::MsgUtils->message("I", { data => ["$node: [$dump_id] clear"] }, $callback) unless ($next_status{ $node_info{$node}{cur_status} });
|
||||
} else {
|
||||
my $error_msg = "Could not clear BMC diagnostics successfully (". $response_info->{'message'} . ")";
|
||||
xCAT::MsgUtils->message("W", { data => ["$node: $error_msg"] }, $callback) if ($next_status{ $node_info{$node}{cur_status} });
|
||||
|
@ -167,8 +167,8 @@ my %rsp_set_valid_values = (
|
||||
autoreboot => "0|1",
|
||||
bootmode => "regular|safe|setup",
|
||||
powersupplyredundancy => "disabled|enabled",
|
||||
powerrestorepolicy => "restore|always_on|always_off",
|
||||
timesyncmethod => "ntp|manual",
|
||||
powerrestorepolicy => "always_off|always_on|restore",
|
||||
timesyncmethod => "manual|ntp",
|
||||
);
|
||||
my @rspconfig_get_options = (@rsp_common_options, qw/ipsrc sshcfg gard dump/);
|
||||
#-------------------------------------------------------
|
||||
@ -202,7 +202,7 @@ sub parse_args {
|
||||
|
||||
if ($command eq "rbeacon") {
|
||||
unless ($subcommand =~ /^on$|^off$|^stat$/) {
|
||||
return ([ 1, "Only 'on', 'off' or 'stat' is supported for OpenBMC managed nodes."]);
|
||||
return ([ 1, "Only 'on', 'off' and 'stat' are supported for OpenBMC managed nodes."]);
|
||||
}
|
||||
} elsif ($command eq "rflash") {
|
||||
my ($activate, $check, $delete, $directory, $list, $upload) = (0) x 6;
|
||||
|
@ -478,24 +478,19 @@ sub process_request {
|
||||
}
|
||||
|
||||
#end prescripts code
|
||||
if (!-r "$tftpdir/pxelinux.0") {
|
||||
unless (-r "/usr/lib/syslinux/pxelinux.0" or -r "/usr/share/syslinux/pxelinux.0") {
|
||||
$::PXE_callback->({ error => ["Unable to find pxelinux.0 "], errorcode => [1] });
|
||||
return;
|
||||
my @pxelinuxpaths=("/usr/lib/syslinux/pxelinux.0","/usr/share/syslinux/pxelinux.0","/usr/lib/PXELINUX/pxelinux.0","/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0");
|
||||
foreach $path (@pxelinuxpaths) {
|
||||
if (-r "$path") {
|
||||
copy("$path","$globaltftpdir/pxelinux.0");
|
||||
chmod(0644, "$globaltftpdir/pxelinux.0");
|
||||
last;
|
||||
}
|
||||
if (-r "/usr/lib/syslinux/pxelinux.0") {
|
||||
copy("/usr/lib/syslinux/pxelinux.0", "$tftpdir/pxelinux.0");
|
||||
} else {
|
||||
copy("/usr/share/syslinux/pxelinux.0", "$tftpdir/pxelinux.0");
|
||||
}
|
||||
chmod(0644, "$tftpdir/pxelinux.0");
|
||||
}
|
||||
unless (-r "$tftpdir/pxelinux.0") {
|
||||
$::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux"], errorcode => [1] });
|
||||
unless (-r "$globaltftpdir/pxelinux.0") {
|
||||
$::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux or pxelinux"], errorcode => [1] });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$errored = 0;
|
||||
my %bphash;
|
||||
my $inittime = 0;
|
||||
|
@ -732,6 +732,18 @@ sub tabdump
|
||||
foreach my $w (@{$OPTW}) { # get each attr=val
|
||||
push @attrarray, $w;
|
||||
}
|
||||
my $keys = xCAT::Table::buildWhereClause(\@attrarray, "1");
|
||||
if (ref($keys) ne 'ARRAY') {
|
||||
$cb->({ error => ["$keys"], errorcode => [1] });
|
||||
return;
|
||||
} else {
|
||||
foreach my $k (@$keys) {
|
||||
unless (grep /$k/, @{ $xCAT::Schema::tabspec{$table}->{cols} }) {
|
||||
$cb->({ error => ["No column \"$k\" in table \"$table\""], errorcode => [1] });
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ents = $tabh->getAllAttribsWhere(\@attrarray, 'ALL');
|
||||
@$recs = ();
|
||||
foreach my $e (@ents) {
|
||||
@ -2370,6 +2382,16 @@ sub tabch {
|
||||
|
||||
}
|
||||
}
|
||||
my $err_found = 0;
|
||||
for my $k (keys %keyhash) {
|
||||
unless (grep /$k/, @{ $xCAT::Schema::tabspec{$table}->{cols} }) {
|
||||
$callback->({ error => ["No column \"$k\" in table \"$table\""], errorcode => [1] });
|
||||
$err_found = 1;
|
||||
}
|
||||
}
|
||||
if ($err_found) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#splice assignment
|
||||
if (grep /\+=/, $temp) {
|
||||
|
@ -509,7 +509,12 @@ sub do_installm_service {
|
||||
node => [$node],
|
||||
arg => ["$newstat"],
|
||||
);
|
||||
xCAT::MsgUtils->trace(0, "I", "xcatd: triggering \'updatenodestat $node $newstat\'...");
|
||||
# TODO, better to use constant here for the specified status
|
||||
if ($newstat eq 'installing') {
|
||||
xCAT::MsgUtils->trace(0, "I", "xcat.updatestatus - $node: provisioning detected...");
|
||||
} elsif ($newstat eq 'netbooting') {
|
||||
xCAT::MsgUtils->trace(0, "I", "xcat.updatestatus - $node: provisioning detected...");
|
||||
}
|
||||
# node should be blocked, race condition may occur otherwise
|
||||
#my $pid=xCAT::Utils->xfork();
|
||||
#unless ($pid) { # fork off the nodeset and potential slowness
|
||||
@ -2625,6 +2630,10 @@ sub populate_site_hash {
|
||||
foreach (@records) {
|
||||
$::XCATSITEVALS{ $_->{key} } = $_->{value};
|
||||
}
|
||||
|
||||
unless (exists($::XCATSITEVALS{'httpport'}) and ($::XCATSITEVALS{'httpport'} ne "")){
|
||||
$::XCATSITEVALS{'httpport'}="80";
|
||||
}
|
||||
}
|
||||
|
||||
sub populate_vpd_hash {
|
||||
|
@ -43,7 +43,6 @@ chmod 0755 /tmp/updateflag
|
||||
|
||||
cd /tmp
|
||||
log_label="xcat.deployment"
|
||||
msgutil_r "$MASTER_IP" "info" "=============deployment starting====================" "/var/log/xcat/xcat.log" "$log_label"
|
||||
msgutil_r "$MASTER_IP" "info" "Executing post.xcat to prepare for firstbooting ..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
|
||||
RAND=$(perl -e 'print int(rand(50)). "\n"')
|
||||
|
@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
export MASTER_IP="#ENV:MASTER_IP#"
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
|
||||
log_label="xcat.deployment"
|
||||
msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label"
|
||||
msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
if grep n8r /proc/cmdline > /dev/null 2>&1;
|
||||
then
|
||||
stty crtscts
|
||||
@ -183,7 +187,7 @@ fi
|
||||
#also, find first available block device (sda or vda likely)
|
||||
#TODO: pick a likely non-SAN target if possible
|
||||
shopt -s nullglob
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
#
|
||||
# The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu.
|
||||
# It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk
|
||||
@ -204,7 +208,7 @@ else
|
||||
fi
|
||||
BOOTFSTYPE=ext3
|
||||
EFIFSTYPE=vfat
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
if [ `uname -m` = "ppc64" ]; then
|
||||
echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile
|
||||
fi
|
||||
@ -227,7 +231,7 @@ echo "part / --size 1 --grow --ondisk $instdisk --fstype $FSTYPE" >> /tmp/partit
|
||||
echo "=================The Partition Scheme================"
|
||||
cat /tmp/partitionfile
|
||||
echo "====================================================="
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label"
|
||||
# The following code is to generate the repository for the installation
|
||||
cat /proc/cmdline
|
||||
|
||||
|
@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
export MASTER_IP="#ENV:MASTER_IP#"
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
|
||||
log_label="xcat.deployment"
|
||||
msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label"
|
||||
msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
if grep n8r /proc/cmdline > /dev/null 2>&1;
|
||||
then
|
||||
stty crtscts
|
||||
@ -38,7 +42,6 @@ sock.close()
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
cat >/tmp/foo.py <<EOF
|
||||
#!/usr/bin/python
|
||||
|
||||
@ -148,6 +151,7 @@ fi
|
||||
#TODO: pick a likely non-SAN target if possible
|
||||
shopt -s nullglob
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
#
|
||||
# The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu.
|
||||
# It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk
|
||||
@ -175,6 +179,12 @@ if uname -r|grep -q '^3.*el7'; then
|
||||
EFIFSTYPE=efi
|
||||
fi
|
||||
|
||||
#remove any exiting "xcatvg" VG to avoid fatal error
|
||||
vgs > /tmp/vgs 2>&1
|
||||
vgchange -a n xcatvg
|
||||
vgremove -f xcatvg
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
echo "ignoredisk --only-use=$instdisk" >> /tmp/partitionfile
|
||||
if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ]; then
|
||||
echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile
|
||||
@ -187,8 +197,8 @@ fi
|
||||
echo "part /boot --size 512 --fstype $BOOTFSTYPE --ondisk $instdisk" >> /tmp/partitionfile
|
||||
echo "part swap --recommended --ondisk $instdisk" >> /tmp/partitionfile
|
||||
echo "part pv.01 --size 1 --grow --ondisk $instdisk" >> /tmp/partitionfile
|
||||
echo "volgroup system pv.01" >> /tmp/partitionfile
|
||||
echo "logvol / --vgname=system --name=root --size 1 --grow --fstype $FSTYPE" >> /tmp/partitionfile
|
||||
echo "volgroup xcatvg pv.01" >> /tmp/partitionfile
|
||||
echo "logvol / --vgname=xcatvg --name=root --size 1 --grow --fstype $FSTYPE" >> /tmp/partitionfile
|
||||
|
||||
#specify "bootloader" configuration in "/tmp/partitionfile" if there is no user customized partition file
|
||||
BOOTLOADER="bootloader "
|
||||
@ -218,6 +228,7 @@ cat /tmp/partitionfile
|
||||
echo "====================================================="
|
||||
|
||||
# The following code is to generate the repository for the installation
|
||||
msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label"
|
||||
cat /proc/cmdline
|
||||
|
||||
NEXTSERVER=`cat /proc/cmdline | grep http | head -n 1`
|
||||
|
@ -5,7 +5,11 @@ case "$XCATDEBUGMODE" in
|
||||
set -x
|
||||
;;
|
||||
esac
|
||||
|
||||
export MASTER_IP="#ENV:MASTER_IP#"
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
|
||||
log_label="xcat.deployment"
|
||||
msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label"
|
||||
msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
if grep -q n8r /proc/cmdline >/dev/null 2>&1
|
||||
then
|
||||
stty crtscts
|
||||
@ -148,7 +152,7 @@ esac
|
||||
# also, find first available block device (sda or vda likely)
|
||||
# TODO: pick a likely non-SAN target if possible
|
||||
shopt -s nullglob
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
#
|
||||
# The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu.
|
||||
# It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk
|
||||
@ -162,7 +166,7 @@ fi
|
||||
BOOTFSTYPE=ext4
|
||||
FSTYPE=ext4
|
||||
EFIFSTYPE=efi
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
echo "ignoredisk --only-use=$instdisk" >>/tmp/partitionfile
|
||||
case "$(uname -m)" in
|
||||
"ppc64"|"ppc64le")
|
||||
@ -210,7 +214,7 @@ fi
|
||||
echo "================ The Partition Scheme ==============="
|
||||
cat /tmp/partitionfile
|
||||
echo "====================================================="
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label"
|
||||
# The following code is to generate the repository for the installation
|
||||
cat /proc/cmdline
|
||||
|
||||
|
@ -9,6 +9,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
{
|
||||
export MASTER_IP="#ENV:MASTER_IP#"
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
|
||||
log_label="xcat.deployment"
|
||||
msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label"
|
||||
msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
echo "Running AutoYaST Pre-Installation script..."
|
||||
|
||||
export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
@ -119,7 +124,7 @@ fi
|
||||
/tmp/foo.awk >/tmp/foo.log 2>&1 &
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
#
|
||||
# The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu.
|
||||
# It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk
|
||||
@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then
|
||||
instdisk=`cat /tmp/xcat.install_disk`
|
||||
fi
|
||||
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
sed -e 's!<device>XCATPARTITIONHOOK</device>!<device>'$instdisk'</device><partitions config:type="list"><partition><filesystem config:type="symbol">vfat</filesystem><mount>/boot/efi</mount><size>128mb</size></partition><partition><mount>swap</mount><size>auto</size></partition><partition><mount>/</mount><size>auto</size></partition></partitions>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
|
||||
else
|
||||
@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then
|
||||
sed -e '/<drive>/{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml
|
||||
sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml
|
||||
fi
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label"
|
||||
export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}`
|
||||
cp /tmp/profile/modified.xml /tmp/profile/modified1.xml
|
||||
sed -e 's!XCATNEXTSERVERHOOK!'$nextserver'!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml
|
||||
|
@ -9,6 +9,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
{
|
||||
export MASTER_IP="#ENV:MASTER_IP#"
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
|
||||
log_label="xcat.deployment"
|
||||
msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label"
|
||||
msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
echo "Running AutoYaST Pre-Installation script..."
|
||||
|
||||
export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
@ -119,7 +124,7 @@ fi
|
||||
/tmp/foo.awk >/tmp/foo.log 2>&1 &
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
#
|
||||
# The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu.
|
||||
# It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk
|
||||
@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then
|
||||
instdisk=`cat /tmp/xcat.install_disk`
|
||||
fi
|
||||
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label"
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
sed -e 's!<device>XCATPARTITIONHOOK</device>!<device>'$instdisk'</device><partitions config:type="list"><partition><filesystem config:type="symbol">vfat</filesystem><mount>/boot/efi</mount><size>128mb</size></partition><partition><mount>swap</mount><size>auto</size></partition><partition><mount>/</mount><size>auto</size></partition></partitions>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
|
||||
else
|
||||
@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then
|
||||
sed -e '/<drive>/{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml
|
||||
sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml
|
||||
fi
|
||||
|
||||
msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label"
|
||||
export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}`
|
||||
cp /tmp/profile/modified.xml /tmp/profile/modified1.xml
|
||||
sed -e 's!<software>!<add-on><add_on_products config:type="list">#INSTALL_SOURCES_IN_PRE#</add_on_products></add-on><software>!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml
|
||||
|
@ -5,11 +5,11 @@ fi
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
killall syslogd
|
||||
syslogd -R #XCATVAR:XCATMASTER#
|
||||
fi
|
||||
|
||||
killall syslogd
|
||||
syslogd -R #XCATVAR:XCATMASTER#
|
||||
log_label="xcat.deployment"
|
||||
logger -t $log_label -p "info" "============deployment starting============"
|
||||
logger -t $log_label -p "info" "Running preseeding early_command Installation script..."
|
||||
if [ ! -c /dev/vcs ]; then
|
||||
mknod /dev/vcs c 7 0
|
||||
fi
|
||||
@ -187,7 +187,7 @@ base64decode()
|
||||
))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\""
|
||||
done
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -5,11 +5,10 @@ fi
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
killall syslogd
|
||||
syslogd -R #XCATVAR:XCATMASTER#
|
||||
fi
|
||||
|
||||
killall syslogd
|
||||
syslogd -R #XCATVAR:XCATMASTER#
|
||||
logger -t $log_label -p "info" "============deployment starting============"
|
||||
logger -t $log_label -p "info" "Running preseeding early_command Installation script..."
|
||||
if [ ! -c /dev/vcs ]; then
|
||||
mknod /dev/vcs c 7 0
|
||||
fi
|
||||
@ -201,7 +200,7 @@ base64decode()
|
||||
))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\""
|
||||
done
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -124,7 +124,7 @@ xserver-xorg xserver-xorg/config/monitor/mode-list \
|
||||
d-i preseed/early_command string \
|
||||
{ \
|
||||
echo "Running preseeding early_command Installation script..."; \
|
||||
wget http://`cat /tmp/xcatserver`/install/autoinst/#HOSTNAME#.pre; \
|
||||
wget http://`cat /tmp/xcatserver`#COLONHTTPPORT#/install/autoinst/#HOSTNAME#.pre; \
|
||||
chmod u+x #HOSTNAME#.pre; \
|
||||
./#HOSTNAME#.pre; \
|
||||
umount /media || true; \
|
||||
@ -135,7 +135,7 @@ d-i preseed/late_command string \
|
||||
{ \
|
||||
cat /tmp/pre-install.log >> /target/var/log/xcat/xcat.log; \
|
||||
echo "Running preseeding late_command Installation script..."; \
|
||||
wget http://`cat /tmp/xcatserver`/install/autoinst/#HOSTNAME#.post; \
|
||||
wget http://`cat /tmp/xcatserver`#COLONHTTPPORT#/install/autoinst/#HOSTNAME#.post; \
|
||||
chmod u+x #HOSTNAME#.post; \
|
||||
cp ./#HOSTNAME#.post /target/root/post.script; \
|
||||
mount -o bind /proc /target/proc -t proc; \
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
echo $drivers
|
||||
dracut_install wget cpio gzip modprobe wc touch echo cut
|
||||
dracut_install grep ifconfig hostname awk egrep grep dirname expr
|
||||
dracut_install grep ifconfig hostname awk egrep grep dirname expr logger
|
||||
dracut_install parted mke2fs bc mkswap swapon chmod
|
||||
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
|
||||
inst_hook pre-mount 5 "$moddir/xcat-premount.sh"
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
#script to update nodelist.nodestatus during provision
|
||||
|
||||
XCAT="$(getarg XCAT=)"
|
||||
STATEMNT="$(getarg STATEMNT=)"
|
||||
MASTER=`echo $XCAT |awk -F: '{print $1}'`
|
||||
@ -14,6 +13,7 @@ XCATIPORT="3002"
|
||||
fi
|
||||
|
||||
log_label="xcat.deployment"
|
||||
xcatdebugmode="$(getarg xcatdebugmode=)"
|
||||
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting===================="
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..."
|
||||
|
@ -1,8 +1,13 @@
|
||||
#!/bin/sh
|
||||
log_label="xcat.deployment"
|
||||
NEWROOT=/sysroot
|
||||
SERVER=${SERVER%%/*}
|
||||
SERVER=${SERVER%:}
|
||||
RWDIR=.statelite
|
||||
XCAT="$(getarg XCAT=)"
|
||||
xcatdebugmode="$(getarg xcatdebugmode=)"
|
||||
XCATMASTER=$XCAT
|
||||
MASTER=`echo $XCATMASTER |awk -F: '{print $1}'`
|
||||
if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess
|
||||
SNAPSHOTSERVER=${STATEMNT%:*}
|
||||
SNAPSHOTROOT=${STATEMNT#*/}
|
||||
@ -14,7 +19,8 @@ if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other
|
||||
SNAPSHOTSERVER=
|
||||
fi
|
||||
fi
|
||||
|
||||
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcat-prepivot to set up statelite..."
|
||||
echo Setting up Statelite
|
||||
mkdir -p $NEWROOT
|
||||
|
||||
@ -25,15 +31,18 @@ MAXTRIES=7
|
||||
ITER=0
|
||||
if [ ! -e "$NEWROOT/$RWDIR" ]; then
|
||||
echo ""
|
||||
echo "This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... "
|
||||
msg="This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... "
|
||||
echo "$msg"
|
||||
echo ""
|
||||
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
|
||||
/bin/sh
|
||||
fi
|
||||
|
||||
if [ ! -e "$NEWROOT/etc/init.d/statelite" ]; then
|
||||
echo ""
|
||||
echo "$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode"
|
||||
msg="$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode"
|
||||
echo ""
|
||||
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
|
||||
/bin/sh
|
||||
fi
|
||||
|
||||
@ -57,15 +66,19 @@ if [ ! -z $SNAPSHOTSERVER ]; then
|
||||
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
|
||||
ITER=$(( ITER + 1 ))
|
||||
if [ "$ITER" == "$MAXTRIES" ]; then
|
||||
echo "Your are dead, rpower $ME boot to play again."
|
||||
echo "Possible problems:
|
||||
msg="Your are dead, rpower $ME boot to play again.
|
||||
Possible problems:
|
||||
1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ?
|
||||
2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER."
|
||||
echo "$msg"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
|
||||
/bin/sh
|
||||
exit
|
||||
fi
|
||||
RS= $(( $RANDOM % 20 ))
|
||||
echo "Trying again in $RS seconds..."
|
||||
msg="Trying again in $RS seconds..."
|
||||
echo "$msg"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
|
||||
sleep $RS
|
||||
done
|
||||
|
||||
@ -76,8 +89,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then
|
||||
while ! umount -l $NEWROOT/$RWDIR/persistent; do
|
||||
ITER=$(( ITER + 1 ))
|
||||
if [ "$ITER" == "$MAXTRIES" ]; then
|
||||
echo "Your are dead, rpower $ME boot to play again."
|
||||
echo "Cannot umount $NEWROOT/$RWDIR/persistent."
|
||||
msg="Your are dead, rpower $ME boot to play again.
|
||||
Cannot umount $NEWROOT/$RWDIR/persistent."
|
||||
echo "$msg"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
|
||||
/bin/sh
|
||||
exit
|
||||
fi
|
||||
@ -91,8 +106,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then
|
||||
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
|
||||
ITER=$(( ITER + 1 ))
|
||||
if [ "$ITER" == "$MAXTRIES" ]; then
|
||||
echo "Your are dead, rpower $ME boot to play again."
|
||||
echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
|
||||
msg="Your are dead, rpower $ME boot to play again.
|
||||
Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
|
||||
echo $msg
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
|
||||
/bin/sh
|
||||
exit
|
||||
fi
|
||||
@ -103,8 +120,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then
|
||||
fi
|
||||
|
||||
# TODO: handle the dhclient/resolv.conf/ntp, etc
|
||||
echo "Get to enable localdisk"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..."
|
||||
echo "Enable localdisk ..."
|
||||
$NEWROOT/etc/init.d/localdisk
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..."
|
||||
$NEWROOT/etc/init.d/statelite
|
||||
READONLY=yes
|
||||
export READONLY
|
||||
@ -175,3 +194,4 @@ fi
|
||||
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh
|
||||
# force udevsettle to break
|
||||
> $hookdir/initqueue/work
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Exit xcat-prepivot"
|
||||
|
@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
log_label="xcat.deployment"
|
||||
|
||||
NEWROOT=$3
|
||||
RWDIR=.statelite
|
||||
XCATMASTER=$XCAT
|
||||
|
||||
. /lib/dracut-lib.sh
|
||||
XCAT="$(getarg XCAT=)"
|
||||
XCATMASTER=$XCAT
|
||||
rootlimit="$(getarg rootlimit=)"
|
||||
|
||||
|
||||
@ -19,25 +20,27 @@ XCATIPORT="3002"
|
||||
fi
|
||||
|
||||
xcatdebugmode="$(getarg xcatdebugmode=)"
|
||||
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting===================="
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcatroot to prepare for netbooting (dracut_033)..."
|
||||
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "running xcatroot...."
|
||||
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "MASTER=$MASTER XCATIPORT=$XCATIPORT"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "MASTER=$MASTER XCATIPORT=$XCATIPORT"
|
||||
|
||||
if [ $NODESTATUS -ne 0 ];then
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "nodestatus: netbooting,reporting..."
|
||||
/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting"
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..."
|
||||
/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting"
|
||||
fi
|
||||
|
||||
if [ ! -z "$imgurl" ]; then
|
||||
if [ xhttp = x${imgurl%%:*} ]; then
|
||||
logger $SYSLOGHOST -t $log_label -p local4.info "Downloading rootfs image from $imgurl..."
|
||||
NFS=0
|
||||
FILENAME=${imgurl##*/}
|
||||
while [ ! -r "$FILENAME" ]; do
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "downloading $imgurl...."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "downloading $imgurl...."
|
||||
echo Getting $imgurl...
|
||||
if ! wget -nv $imgurl; then
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "downloading $imgurl failed,retrying...."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "downloading $imgurl failed,retrying...."
|
||||
rm -f $FILENAME
|
||||
sleep 27
|
||||
fi
|
||||
@ -68,7 +71,7 @@ if [ -r /rootimg.sfs ]; then
|
||||
mount --move /ro $NEWROOT/ro
|
||||
mount --move /rw $NEWROOT/rw
|
||||
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "rootimg downloaded,setting up RAM-root tmpfs...."
|
||||
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.
|
||||
if [ -z $rootlimit ];then
|
||||
mount -t tmpfs -o mode=755 rootfs $NEWROOT
|
||||
@ -77,7 +80,7 @@ elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
|
||||
fi
|
||||
|
||||
cd $NEWROOT
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Extracting root filesystem:"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Extracting root filesystem:"
|
||||
echo -n "Extracting root filesystem:"
|
||||
if [ -r /rootimg.cpio.gz ]; then
|
||||
if [ -x /bin/cpio ]; then
|
||||
@ -93,10 +96,10 @@ elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
|
||||
fi
|
||||
fi
|
||||
$NEWROOT/etc/init.d/localdisk
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Done...."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Done...."
|
||||
echo Done
|
||||
elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "rootimg downloaded,setting up RAM-root tmpfs...."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "rootimg downloaded,setting up RAM-root tmpfs...."
|
||||
echo Setting up RAM-root tmpfs.
|
||||
if [ -z $rootlimit ];then
|
||||
mount -t tmpfs -o mode=755 rootfs $NEWROOT
|
||||
@ -105,7 +108,7 @@ elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then
|
||||
fi
|
||||
|
||||
cd $NEWROOT
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Extracting root filesystem:"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Extracting root filesystem:"
|
||||
echo -n "Extracting root filesystem:"
|
||||
if [ -r /rootimg.tar.gz ]; then
|
||||
tar --selinux --xattrs-include='*' -zxf /rootimg.tar.gz
|
||||
@ -119,7 +122,7 @@ elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then
|
||||
fi
|
||||
fi
|
||||
$NEWROOT/etc/init.d/localdisk
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Done...."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Done...."
|
||||
echo Done
|
||||
elif [ -r /rootimg-statelite.gz ]; then
|
||||
echo Setting up RAM-root tmpfs for statelite mode.
|
||||
@ -244,18 +247,18 @@ elif [ -r /rootimg-statelite.gz ]; then
|
||||
mount -n --bind /sys $NEWROOT/sys
|
||||
|
||||
else
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Failed to download image, panicing in 5..."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Failed to download image, panicing in 5..."
|
||||
echo -n Failed to download image, panicing in 5...
|
||||
for i in 4 3 2 1 0; do
|
||||
/bin/sleep 1
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "$i..."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "$i..."
|
||||
echo -n $i...
|
||||
done
|
||||
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "You're dead. rpower nodename reset to play again."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "* Did you packimage with -m cpio, -m squashfs, or -m nfs?"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "You're dead. rpower nodename reset to play again."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "* Did you packimage with -m cpio, -m squashfs, or -m nfs?"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs"
|
||||
echo
|
||||
echo "You're dead. rpower nodename reset to play again.
|
||||
|
||||
@ -296,7 +299,7 @@ if [ -z $STATEMNT ]; then
|
||||
netif=${lf#*.}
|
||||
netif=${netif%.*}
|
||||
cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases"
|
||||
done
|
||||
|
||||
if [ ! -z "$ifname" ]; then
|
||||
@ -312,10 +315,10 @@ if [ -z $STATEMNT ]; then
|
||||
|
||||
if [ ! -z "$MACX" ] && [ ! -z "$ETHX" ]; then
|
||||
if [ ! -e $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX ]; then
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "creating $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "creating $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX"
|
||||
touch $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX
|
||||
fi
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "writing $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX: DEVICE=$ETHX;BOOTPROTO=dhcp;HWADDR=$MACX;ONBOOT=yes"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "writing $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX: DEVICE=$ETHX;BOOTPROTO=dhcp;HWADDR=$MACX;ONBOOT=yes"
|
||||
echo "DEVICE=$ETHX" > $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX
|
||||
echo "BOOTPROTO=dhcp" >> $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX
|
||||
echo "HWADDR=$MACX" >> $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX
|
||||
@ -323,18 +326,18 @@ if [ -z $STATEMNT ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "saving $NEWROOT/etc/resolv.conf"
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/etc/resolv.conf"
|
||||
cp /etc/resolv.conf "$NEWROOT/etc/"
|
||||
|
||||
if [ -d "$NEWROOT/etc/sysconfig" -a ! -e "$NEWROOT/etc/sysconfig/selinux" ]; then
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "disable selinux ..."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "disable selinux ..."
|
||||
echo "SELINUX=disabled" >> "$NEWROOT/etc/sysconfig/selinux"
|
||||
fi
|
||||
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "setting hostname..."
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "setting hostname..."
|
||||
echo `hostname` > $NEWROOT/etc/hostname
|
||||
|
||||
[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "exiting xcatroot..."
|
||||
logger $SYSLOGHOST -t $log_label -p debug "Exiting xcatroot..."
|
||||
|
||||
# inject new exit_if_exists
|
||||
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh
|
||||
|
@ -6,7 +6,6 @@ linux-image-generic-lts-xenial
|
||||
openssh-server
|
||||
openssh-client
|
||||
wget
|
||||
vim
|
||||
ntp
|
||||
rsyslog
|
||||
rsync
|
||||
|
@ -7,7 +7,6 @@ linux-image-generic
|
||||
openssh-server
|
||||
openssh-client
|
||||
wget
|
||||
vim
|
||||
ntp
|
||||
ntpdate
|
||||
rsync
|
||||
|
@ -7,7 +7,6 @@ linux-image-generic
|
||||
openssh-server
|
||||
openssh-client
|
||||
wget
|
||||
vim
|
||||
ntp
|
||||
ntpdate
|
||||
rsync
|
||||
|
@ -235,6 +235,11 @@ unless ($onlyinitrd) {
|
||||
my @pkgdir_internet; #Put all the http mirror in ths array, but only the first http mirror which will be used to create bootstrap
|
||||
my @pkgdir_local; #Put all directories except first in this array
|
||||
my $masternode = xCAT::TableUtils->get_site_Master();
|
||||
my $httpport="80";
|
||||
my @hports=xCAT::TableUtils->get_site_attribute("httpport");
|
||||
if ($hports[0]){
|
||||
$httpport=$hports[0];
|
||||
}
|
||||
$srcdir = undef;
|
||||
foreach my $dir (@srcdirs) {
|
||||
if ($dir =~ /^http.*/) {
|
||||
@ -246,7 +251,7 @@ unless ($onlyinitrd) {
|
||||
$srcdir = $dir;
|
||||
find(\&isaptdir, <$dir/>);
|
||||
} else { #set other directory to http url
|
||||
my $osuurl = "http://$masternode$dir ./";
|
||||
my $osuurl = "http://$masternode:$httpport$dir ./";
|
||||
push @pkgdir_local, $osuurl;
|
||||
}
|
||||
}
|
||||
@ -347,7 +352,7 @@ unless ($onlyinitrd) {
|
||||
open($aptconfig, ">", "$rootimg_dir/etc/apt/sources.list");
|
||||
|
||||
if ($srcdir) {
|
||||
print $aptconfig "deb http://$masternode$srcdir $dist main\n";
|
||||
print $aptconfig "deb http://$masternode:$httpport$srcdir $dist main\n";
|
||||
}
|
||||
|
||||
foreach (@pkgdir_internet) {
|
||||
@ -1023,7 +1028,7 @@ sub mkinitrd {
|
||||
NEWROOT="/sysroot"
|
||||
SHELL="/bin/sh"
|
||||
RWDIR=".statelite"
|
||||
|
||||
log_label="xcat.deployment"
|
||||
|
||||
# Define some colors
|
||||
RESET="\033[0m"
|
||||
@ -1229,17 +1234,16 @@ ifconfig lo up
|
||||
|
||||
XCATMASTER=`echo \$XCATSERVER|awk -F: '{print \$1}'`
|
||||
|
||||
if [ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]; then
|
||||
PORT="514"
|
||||
syslogd -R \$XCATMASTER:\$PORT
|
||||
fi
|
||||
|
||||
([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "running init script..."
|
||||
([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "MASTER=\$XCATMASTER XCATIPORT=\$XCATIPORT"
|
||||
PORT="514"
|
||||
syslogd -R \$XCATMASTER:\$PORT
|
||||
MASTER=`echo \$XCATMASTER |awk -F: '{print \$1}'`
|
||||
logger -t \$log_label -p info "=============deployment starting===================="
|
||||
logger -t \$log_label -p info "Executing init to prepare for netbooting"
|
||||
([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t \$log_label -p debug "MASTER=\$XCATMASTER XCATIPORT=\$XCATIPORT"
|
||||
|
||||
#update nodelist.nodestatus to "netbooting"
|
||||
if [ \$NODESTATUS != 'n' ]; then
|
||||
([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "nodestatus: netbooting,reporting..."
|
||||
logger -t \$log_label -p info "Sending request to \$XCATMASTER:\$XCATIPORT for changing status to netbooting..."
|
||||
/tmp/updateflag \$XCATMASTER \$XCATIPORT "installstatus netbooting"
|
||||
fi
|
||||
|
||||
@ -1256,10 +1260,10 @@ for i in `cat /proc/cmdline`; do
|
||||
MAXTRIES=5
|
||||
ITER=0
|
||||
while [ ! -r "\$FILENAME" ]; do
|
||||
([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "downloading \$VALUE..."
|
||||
logger -t \$log_label -p info "Downloading rootfs image from \$VALUE..."
|
||||
echo Getting \$VALUE...
|
||||
if ! /usr/bin/wget \$VALUE; then
|
||||
([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "downloading \$VALUE failed,retrying..."
|
||||
([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t \$log_label -p debug "downloading \$VALUE failed,retrying..."
|
||||
ST=`expr \$RANDOM % 5`
|
||||
sleep \$ST
|
||||
rm -f \$FILENAME
|
||||
@ -1338,6 +1342,7 @@ if [ "\$STATELITE" = "1" ]; then
|
||||
# for statelite mode on top of the ramdisk
|
||||
EOMS
|
||||
print $inifile " if [ -r /rootimg-statelite.gz ]; then\n";
|
||||
print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n";
|
||||
print $inifile " echo Setting up RAM-root tmpfs.\n";
|
||||
if ($rootlimit) {
|
||||
print $inifile " mount -o \"size=$rootlimit,mode=755\" -t tmpfs rootfs \$NEWROOT \n";
|
||||
@ -1463,7 +1468,7 @@ if [ -r /rootimg.sfs ]; then
|
||||
mount --move /rw \$NEWROOT/rw
|
||||
EOMS
|
||||
print $inifile "elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"rootimg downloaded,setting up RAM-root tmpfs...\"\n";
|
||||
print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n";
|
||||
print $inifile " echo Setting up RAM-root tmpfs.\n";
|
||||
if ($rootlimit) {
|
||||
print $inifile " mount -o \"size=$rootlimit,mode=755\" -t tmpfs rootfs \$NEWROOT\n";
|
||||
@ -1471,7 +1476,7 @@ EOMS
|
||||
print $inifile " mount -o mode=755 -t tmpfs rootfs \$NEWROOT\n";
|
||||
}
|
||||
print $inifile " cd \$NEWROOT\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Extracting root filesystem:\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Extracting root filesystem:\"\n";
|
||||
print $inifile " echo -n \"Extracting root filesystem:\"\n";
|
||||
print $inifile " if [ -r /rootimg.cpio.gz ]; then\n";
|
||||
print $inifile " if [ -x /bin/cpio ]; then\n";
|
||||
@ -1486,10 +1491,9 @@ EOMS
|
||||
print $inifile " xz -cd /rootimg.cpio.xz |cpio -idum\n";
|
||||
print $inifile " fi\n";
|
||||
print $inifile " fi\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Done...\"\n";
|
||||
print $inifile " echo Done\n";
|
||||
print $inifile "elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"rootimg downloaded,setting up RAM-root tmpfs...\"\n";
|
||||
print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n";
|
||||
print $inifile " echo Setting up RAM-root tmpfs.\n";
|
||||
|
||||
if ($rootlimit) {
|
||||
@ -1498,27 +1502,26 @@ EOMS
|
||||
print $inifile " mount -o mode=755 -t tmpfs rootfs \$NEWROOT\n";
|
||||
}
|
||||
print $inifile " cd \$NEWROOT\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Extracting root filesystem:\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Extracting root filesystem:\"\n";
|
||||
print $inifile " echo -n \"Extracting root filesystem:\"\n";
|
||||
print $inifile " if [ -r /rootimg.tar.gz ]; then\n";
|
||||
print $inifile " /bin/tar --selinux --xattrs --xattrs-include='*' -zxf /rootimg.tar.gz\n";
|
||||
print $inifile " elif [ -r /rootimg.tar.xz ]; then\n";
|
||||
print $inifile " /bin/tar --selinux --xattrs --xattrs-include='*' -Jxf /rootimg.tar.xz\n";
|
||||
print $inifile " fi\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Done...\"\n";
|
||||
print $inifile " echo Done\n";
|
||||
print $inifile "else\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Failed to download image, panicing in 5...\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Failed to download image, panicing in 5...\"\n";
|
||||
print $inifile " echo -n Failed to download image, panicing in 5...\n";
|
||||
print $inifile " for i in 4 3 2 1 0; do\n";
|
||||
print $inifile " /bin/sleep 5\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"\$i...\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"\$i...\"\n";
|
||||
print $inifile " echo -n \$i...\n";
|
||||
print $inifile " done\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"You're dead. rpower nodename reset to play again.\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"* Did you packimage with -m cpio, -m squashfs, or -m nfs?\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"You're dead. rpower nodename reset to play again.\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"* Did you packimage with -m cpio, -m squashfs, or -m nfs?\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop\"\n";
|
||||
print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs\"\n";
|
||||
print $inifile " echo\n";
|
||||
print $inifile <<EOMS;
|
||||
echo "You're dead. rpower nodename reset to play again.
|
||||
@ -1537,9 +1540,9 @@ EOMS
|
||||
print $inifile "fi\n";
|
||||
print $inifile "cd /\n";
|
||||
print $inifile "cp /etc/hostname \$NEWROOT/etc/hostname\n";
|
||||
print $inifile "([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"saving \$NEWROOT/etc/resolv.conf\"\n";
|
||||
print $inifile "([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"saving \$NEWROOT/etc/resolv.conf\"\n";
|
||||
print $inifile "rm -f \$NEWROOT/etc/resolv.conf; cp /etc/resolv.conf \$NEWROOT/etc/resolv.conf\n";
|
||||
print $inifile "([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"exiting init script...\"\n";
|
||||
print $inifile "logger -t \$log_label -p info \"Exiting init ...\"\n";
|
||||
print $inifile "mount --move /dev \$NEWROOT/dev \n";
|
||||
print $inifile "mount --move /proc \$NEWROOT/proc \n";
|
||||
print $inifile "mount --move /sys \$NEWROOT/sys \n";
|
||||
@ -1644,7 +1647,7 @@ EOMS
|
||||
}
|
||||
}
|
||||
|
||||
# add rsync for statelite
|
||||
# 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") {
|
||||
getlibs($_);
|
||||
push @filestoadd, $_;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
# To create certficate for docker host
|
||||
echo "$0 xcatdockerhost"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
# set up credentials for user to be able to run xCAT commands
|
||||
# Must be run by root
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# go-xcat - Install xCAT automatically.
|
||||
#
|
||||
# Version 1.0.32
|
||||
# Version 1.0.34
|
||||
#
|
||||
# Copyright (C) 2016, 2017, 2018 International Business Machines
|
||||
# Eclipse Public License, Version 1.0 (EPL-1.0)
|
||||
@ -171,8 +171,8 @@ GO_XCAT_INSTALL_LIST=(perl-xcat xcat xcat-buildkit xcat-client
|
||||
xcat-genesis-base-amd64 xcat-genesis-base-ppc64 xnba-undi)
|
||||
# The package list of all the packages should be installed
|
||||
GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}"
|
||||
goconserver xCAT-SoftLayer xCAT-confluent xCAT-csm xCAT-openbmc-py
|
||||
xCAT-probe xCAT-test xCAT-vlan xCATsn xCAT-UI-deps)
|
||||
goconserver xCAT-SoftLayer xCAT-confluent xCAT-csm xCAT-genesis-builder
|
||||
xCAT-openbmc-py xCAT-probe xCAT-test xCAT-vlan xCATsn xCAT-UI-deps)
|
||||
# For Debian/Ubuntu, it will need a sight different package list
|
||||
type dpkg >/dev/null 2>&1 &&
|
||||
GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}"
|
||||
@ -538,7 +538,7 @@ function check_package_version_rpm()
|
||||
else
|
||||
echo "${ver}"
|
||||
fi
|
||||
done < <(rpm -q --qf '%{version}-%{release}\n' "$@" 2>/dev/null)
|
||||
done < <(LC_ALL="C" rpm -q --qf '%{version}-%{release}\n' "$@" 2>/dev/null)
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -934,6 +934,31 @@ function add_repo_by_file_yum()
|
||||
cp "${tmp}" "/etc/yum.repos.d/${repo_id}.repo"
|
||||
}
|
||||
|
||||
# Dirty workaround on SLES11 SP4
|
||||
# For SLES11, set gpgcheck=0
|
||||
#
|
||||
# $1 repo file
|
||||
function github_issue_5503_workaround2()
|
||||
{
|
||||
[[ "${GO_XCAT_LINUX_DISTRO}" = "sles" ]] || return 0
|
||||
[[ "${GO_XCAT_LINUX_VERSION}" =~ ^11(\.[0-4]){0,1}$ ]] || return 0
|
||||
local repo_file="$1"
|
||||
local tmp="${TMP_DIR}/tmp_repo_file_${repo_id}.repo.$$"
|
||||
cp "${repo_file}" "${tmp}"
|
||||
exit_if_bad "$?" "Copy file failed \`${repo_file}' -> \`${tmp}'"
|
||||
while read -r
|
||||
do
|
||||
case "${REPLY}" in
|
||||
"gpgcheck=1")
|
||||
echo "gpgcheck=0"
|
||||
;;
|
||||
*)
|
||||
echo "${REPLY}"
|
||||
;;
|
||||
esac
|
||||
done <"${tmp}" >"${repo_file}"
|
||||
}
|
||||
|
||||
# $1 repo file
|
||||
# $2 repo id
|
||||
function add_repo_by_file_zypper()
|
||||
@ -954,6 +979,8 @@ function add_repo_by_file_zypper()
|
||||
echo "[${repo_id}]"
|
||||
grep -v '^\[' "${repo_file}"
|
||||
} >"${tmp}"
|
||||
# For SLES11, set gpgcheck=0
|
||||
github_issue_5503_workaround2 "${tmp}"
|
||||
remove_repo_zypper "${repo_id}" &&
|
||||
zypper addrepo "${tmp}" >/dev/null 2>&1
|
||||
}
|
||||
@ -1017,7 +1044,7 @@ function extract_archive()
|
||||
gzip -d -c "${archive}" | tar -t -f - | grep -v "^${repo_id}/"
|
||||
[[ "${PIPESTATUS[0]}" -eq 0 && "${PIPESTATUS[1]}" -eq 0 &&
|
||||
"${PIPESTATUS[2]}" -eq 1 ]]
|
||||
exit_if_bad "$?" "${archive}: bad gzipped tarball"
|
||||
exit_if_bad "$?" "${archive}: bad gzipped tarball" || return 1
|
||||
rm -rf "${install_path}/${repo_id}"
|
||||
gzip -d -c "${archive}" | ( cd "${install_path}" && tar -x -f - )
|
||||
;;
|
||||
@ -1085,7 +1112,7 @@ function add_repo_by_url_yum_or_zypper()
|
||||
name=${repo_id}
|
||||
baseurl=${url%/}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
gpgcheck=1
|
||||
gpgkey=${url%/}/repodata/repomd.xml.key
|
||||
EOF
|
||||
add_repo_by_file "${tmp}" "${repo_id}"
|
||||
@ -1121,9 +1148,17 @@ function add_repo_by_url_yum_or_zypper()
|
||||
name=${repo_id}
|
||||
baseurl=file://${url%/}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
gpgkey=file://${url%/}/repodata/repomd.xml.key
|
||||
EOF
|
||||
if [ -f "${url%/}/repodata/repomd.xml.asc" ]
|
||||
then
|
||||
echo "gpgcheck=1" >>"${tmp}"
|
||||
else
|
||||
echo "gpgcheck=0" >>"${tmp}"
|
||||
fi
|
||||
if [ -f "${url%/}/repodata/repomd.xml.key" ]
|
||||
then
|
||||
echo "gpgkey=file://${url%/}/repodata/repomd.xml.key" >>"${tmp}"
|
||||
fi
|
||||
add_repo_by_file "${tmp}" "${repo_id}"
|
||||
return "$?"
|
||||
fi
|
||||
@ -1182,7 +1217,8 @@ function add_repo_by_url_apt()
|
||||
[[ "${url:0:1}" = "/" ]] || url="${PWD}/${url}"
|
||||
# directory
|
||||
tmp="${TMP_DIR}/tmp_repo.list"
|
||||
echo "deb [arch=$(dpkg --print-architecture)] file://${url} ${codename} main" >"${tmp}"
|
||||
echo "deb [$([ ! -f "${url}/dists/${codename}/Release.gpg" ] &&
|
||||
echo "allow-insecure=yes ")arch=$(dpkg --print-architecture)] file://${url} ${codename} main" >"${tmp}"
|
||||
add_repo_by_file_apt "${tmp}" "${repo_id}"
|
||||
return "$?"
|
||||
fi
|
||||
@ -1522,6 +1558,26 @@ function remove_package()
|
||||
function_dispatch "${FUNCNAME}" "$@"
|
||||
}
|
||||
|
||||
# $1 -y
|
||||
function purge_package_apt()
|
||||
{
|
||||
type apt-get >/dev/null 2>&1 || return 255
|
||||
local -a yes=()
|
||||
[[ "$1" = "-y" ]] && yes=("-y") && shift
|
||||
apt-get --allow-unauthenticated purge "${yes[@]}" "$@"
|
||||
}
|
||||
|
||||
function purge_package_others()
|
||||
{
|
||||
remove_package "$@"
|
||||
}
|
||||
|
||||
# $1 -y
|
||||
function purge_package()
|
||||
{
|
||||
function_dispatch "${FUNCNAME}" "$@"
|
||||
}
|
||||
|
||||
# $1 -y
|
||||
function install_xcat()
|
||||
{
|
||||
@ -1608,6 +1664,16 @@ function trash_xcat()
|
||||
return 0
|
||||
}
|
||||
|
||||
function uninstall_xcat_completely()
|
||||
{
|
||||
purge_package -y "${GO_XCAT_UNINSTALL_LIST[@]}"
|
||||
|
||||
kill_xcat
|
||||
trash_xcat
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function list_xcat_packages()
|
||||
{
|
||||
GO_XCAT_CORE_PACKAGE_LIST=($(get_package_list xcat-core))
|
||||
@ -1715,7 +1781,13 @@ function test_case_000_version()
|
||||
local ver=""
|
||||
local -i ret=0
|
||||
|
||||
list_xcat_packages >/dev/null || return 1
|
||||
# Call function list_xcat_packages to fill up global array
|
||||
# GO_XCAT_CORE_PACKAGE_LIST
|
||||
# And the output will be logged into the debug log.
|
||||
#
|
||||
# Missing command `repoquery' may cause list_xcat_packages fail,
|
||||
# in that case, just skip this test.
|
||||
list_xcat_packages
|
||||
|
||||
while read -r
|
||||
do
|
||||
@ -1725,6 +1797,7 @@ function test_case_000_version()
|
||||
(( ret += $? ))
|
||||
done < <(check_package_version "${GO_XCAT_CORE_PACKAGE_LIST[@]}")
|
||||
|
||||
[ "${ret}" -ne "0" ] && echo
|
||||
warn_if_bad "${ret}" "xCAT packages version mismatch"
|
||||
|
||||
return "${ret}"
|
||||
@ -1985,14 +2058,10 @@ case "${GO_XCAT_ACTION}" in
|
||||
"away"|"uninstall")
|
||||
# Remove xCAT
|
||||
ask_to_continue "${GO_XCAT_YES[0]}" "xCAT is going to be ${GO_XCAT_ACTION/away/trash}ed."
|
||||
debug_trace uninstall_xcat -y
|
||||
boo_boo_if_bad "$?"
|
||||
|
||||
case "${GO_XCAT_ACTION}" in
|
||||
"away")
|
||||
# Do extra cleanup
|
||||
debug_trace kill_xcat
|
||||
debug_trace trash_xcat
|
||||
debug_trace uninstall_xcat_completely
|
||||
|
||||
debug_logger <<-EOF
|
||||
|
||||
@ -2000,6 +2069,9 @@ case "${GO_XCAT_ACTION}" in
|
||||
EOF
|
||||
;;
|
||||
"uninstall")
|
||||
debug_trace uninstall_xcat -y
|
||||
boo_boo_if_bad "$?"
|
||||
|
||||
debug_logger <<-EOF
|
||||
|
||||
xCAT has been uninstalled!
|
||||
@ -2069,6 +2141,8 @@ case "${GO_XCAT_ACTION}" in
|
||||
# xCAT has been installed and so far so good
|
||||
smoke_testing >/dev/null 2>&1
|
||||
RET="$?"
|
||||
[ "${RET}" -ne "0" ] && echo
|
||||
warn_if_bad "${RET}" "xCAT smoke testing failed."
|
||||
fi
|
||||
|
||||
boo_boo_if_bad "${RET}"
|
||||
|
@ -58,9 +58,9 @@ lsxcatd_a
|
||||
lsxcatd_d
|
||||
lsxcatd_h
|
||||
lsxcatd_null
|
||||
makeconservercf_d
|
||||
makeconservercf_noderange
|
||||
makeconservercf_null
|
||||
#makeconservercf_d
|
||||
#makeconservercf_noderange
|
||||
#makeconservercf_null
|
||||
#makedhcp_a_d_linux
|
||||
#makedhcp_a_linux
|
||||
#makedhcp_d_linux
|
||||
|
28
xCAT-test/autotest/bundle/non_default_http_port_test.bundle
Normal file
28
xCAT-test/autotest/bundle/non_default_http_port_test.bundle
Normal file
@ -0,0 +1,28 @@
|
||||
setup_vm
|
||||
genesis_work_with_non_default_http_80_port
|
||||
change_http_listen_port_from_80_to_8898_in_mn
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
updatenode_diskful_syncfiles
|
||||
updatenode_diskful_syncfiles_rename
|
||||
updatenode_diskful_syncfiles_dir
|
||||
updatenode_syncfile_EXECUTE
|
||||
updatenode_syncfile_EXECUTEALWAYS
|
||||
updatenode_P_script1
|
||||
updatenode_f_incompatible_flags
|
||||
updatenode_k_incompatible_flags
|
||||
updatenode_diskful_syncfiles_P_script1
|
||||
updatenode_script3
|
||||
updatenode_P_script1_script2
|
||||
SN_setup_case
|
||||
change_http_listen_port_from_80_to_8898_in_sn
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
updatenode_syncfile_APPEND
|
||||
updatenode_syncfile_MERGE
|
||||
updatenode_diskful_syncfiles_multi_files
|
||||
updatenode_P_script2
|
||||
reg_linux_diskless_installation_hierarchy
|
||||
reg_linux_statelite_installation_hierarchy_by_ramdisk
|
||||
change_http_listen_port_from_8898_to_80_in_sn
|
||||
change_http_listen_port_from_8898_to_80_in_mn
|
||||
clean_up_env
|
@ -269,8 +269,6 @@ makentp_v
|
||||
makentp_h
|
||||
nodeset_check_warninginfo
|
||||
runcmdinstaller_h
|
||||
runcmdinstaller_command
|
||||
get_xcat_postscripts_loginfo
|
||||
updatenode_postscripts_loginfo
|
||||
xcatd_start
|
||||
xcatd_stop
|
||||
@ -311,10 +309,6 @@ rmimage_diskless
|
||||
updatenode_diskful_syncfiles_failing
|
||||
xdcp_nonroot_user
|
||||
xdsh_permission_denied
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
confignetwork_vlan_false
|
||||
@ -322,6 +316,12 @@ confignetwork__bridge_false
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
runcmdinstaller_command
|
||||
get_xcat_postscripts_loginfo
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -17,6 +17,7 @@ updatenode_diskful_syncfiles_P_script1
|
||||
updatenode_script3
|
||||
updatenode_P_script1_script2
|
||||
updatenode_without_flag
|
||||
updatenode_without_options
|
||||
confignetwork_static_installnic
|
||||
confignetwork_secondarynic_nicnetworks_updatenode_false
|
||||
confignetwork_secondarynic_nicips_updatenode_false
|
||||
@ -272,8 +273,6 @@ makentp_v
|
||||
makentp_h
|
||||
nodeset_check_warninginfo
|
||||
runcmdinstaller_h
|
||||
runcmdinstaller_command
|
||||
get_xcat_postscripts_loginfo
|
||||
updatenode_postscripts_loginfo
|
||||
bmcdiscover_h
|
||||
bmcdiscover_nmap_range
|
||||
@ -312,12 +311,14 @@ updatenode_diskful_syncfiles_failing
|
||||
xdcp_nonroot_user
|
||||
xdsh_permission_denied
|
||||
reg_linux_diskless_installation_flat
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
runcmdinstaller_command
|
||||
get_xcat_postscripts_loginfo
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -234,10 +234,6 @@ updatenode_diskful_syncfiles_failing
|
||||
xdcp_nonroot_user
|
||||
xdsh_permission_denied
|
||||
reg_linux_diskless_installation_flat
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
confignetwork_vlan_false
|
||||
@ -245,6 +241,10 @@ confignetwork__bridge_false
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -17,6 +17,7 @@ updatenode_diskful_syncfiles_P_script1
|
||||
updatenode_script3
|
||||
updatenode_P_script1_script2
|
||||
updatenode_without_flag
|
||||
updatenode_without_options
|
||||
confignetwork_static_installnic
|
||||
confignetwork_secondarynic_nicnetworks_updatenode_false
|
||||
confignetwork_secondarynic_nicips_updatenode_false
|
||||
@ -315,8 +316,6 @@ makentp_v
|
||||
makentp_h
|
||||
nodeset_check_warninginfo
|
||||
runcmdinstaller_h
|
||||
runcmdinstaller_command
|
||||
get_xcat_postscripts_loginfo
|
||||
updatenode_postscripts_loginfo
|
||||
bmcdiscover_h
|
||||
bmcdiscover_nmap_range
|
||||
@ -356,12 +355,14 @@ updatenode_diskful_syncfiles_failing
|
||||
xdcp_nonroot_user
|
||||
xdsh_permission_denied
|
||||
reg_linux_diskless_installation_flat
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
runcmdinstaller_command
|
||||
get_xcat_postscripts_loginfo
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -20,6 +20,7 @@ updatenode_diskful_syncfiles_P_script1
|
||||
updatenode_script3
|
||||
updatenode_P_script1_script2
|
||||
updatenode_without_flag
|
||||
updatenode_without_options
|
||||
confignetwork_static_installnic
|
||||
confignetwork_s_installnic_secondarynic_updatenode
|
||||
confignetwork_secondarynic_updatenode
|
||||
@ -357,10 +358,6 @@ rmimage_diskless
|
||||
updatenode_diskful_syncfiles_failing
|
||||
xdcp_nonroot_user
|
||||
xdsh_permission_denied
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
confignetwork_vlan_false
|
||||
@ -368,6 +365,12 @@ confignetwork__bridge_false
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
runcmdinstaller_command
|
||||
get_xcat_postscripts_loginfo
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -38,10 +38,6 @@ packimage_o_p_a_m
|
||||
packimage_imagename
|
||||
packimage_h
|
||||
packimage_v
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
pping_h
|
||||
@ -298,6 +294,10 @@ confignetwork__bridge_false
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
|
@ -279,12 +279,12 @@ updatenode_diskful_syncfiles_failing
|
||||
xdcp_nonroot_user
|
||||
xdsh_permission_denied
|
||||
reg_linux_diskless_installation_flat
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -237,15 +237,15 @@ updatenode_diskful_syncfiles_failing
|
||||
xdcp_nonroot_user
|
||||
xdsh_permission_denied
|
||||
reg_linux_diskless_installation_flat
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -34,12 +34,6 @@ packimage_o_p_a_m
|
||||
packimage_imagename
|
||||
packimage_h
|
||||
packimage_v
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_pigz
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_pigz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
pping_h
|
||||
@ -254,6 +248,12 @@ xdsh_permission_denied
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_pigz
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_pigz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
sles_migration1
|
||||
sles_migration2
|
||||
reg_linux_statelite_installation_flat
|
||||
|
@ -253,14 +253,14 @@ nodeset_runimg
|
||||
sles_migration1
|
||||
sles_migration2
|
||||
reg_linux_diskless_installation_flat
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_pigz
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_pigz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
reg_linux_statelite_installation_flat
|
||||
SN_setup_case
|
||||
reg_linux_diskfull_installation_hierarchy
|
||||
|
@ -25,12 +25,6 @@ packimage_o_p_a_m
|
||||
packimage_imagename
|
||||
packimage_h
|
||||
packimage_v
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_pigz
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_pigz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
pping_h
|
||||
@ -242,6 +236,12 @@ xdsh_permission_denied
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_pigz
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_pigz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
ubuntu_migration1_p8le
|
||||
ubuntu_migration2_p8le
|
||||
|
||||
|
@ -21,12 +21,6 @@ packimage_o_p_a_m
|
||||
packimage_imagename
|
||||
packimage_h
|
||||
packimage_v
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_pigz
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_pigz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
packimage_m_invalid_archive_method
|
||||
packimage_m_invalid_compress_method
|
||||
pping_h
|
||||
@ -239,5 +233,11 @@ xdsh_permission_denied
|
||||
nodeset_shell
|
||||
nodeset_cmdline
|
||||
nodeset_runimg
|
||||
packimage_m_cpio_c_gzip
|
||||
packimage_m_cpio_c_pigz
|
||||
packimage_m_cpio_c_xz
|
||||
packimage_m_tar_c_pigz
|
||||
packimage_m_tar_c_gzip
|
||||
packimage_m_tar_c_xz
|
||||
ubuntu_migration1_vm
|
||||
ubuntu_migration2_vm
|
||||
|
@ -1,5 +1,6 @@
|
||||
#only support redhat and postgresql
|
||||
start:setup_2_new_HA_MN
|
||||
label:others,HA
|
||||
os:Linux
|
||||
#back up
|
||||
cmd:lsdef -z $$PRIMARYMN > /tmp/node.stanza
|
||||
@ -149,6 +150,7 @@ cmd:if [[ -f /install/postscripts/check_node_state.bak ]] ;then mv -f /install/p
|
||||
end
|
||||
|
||||
start:configure_exist_xCAT_MN_to_HA_MN
|
||||
label:others,HA
|
||||
os:Linux
|
||||
#back up
|
||||
cmd:lsdef -z $$PRIMARYMN > /tmp/node.stanza
|
||||
|
@ -27,7 +27,7 @@ check:rc==0
|
||||
check:output=~$$CN: SYSTEM SerialNumber
|
||||
cmd: rinv $$CN firm
|
||||
check:rc==0
|
||||
check:output=~$$CN: Host Firmware
|
||||
check:output=~$$CN: HOST Firmware
|
||||
check:output=~$$CN: BMC Firmware
|
||||
cmd: rinv $$CN cpu
|
||||
check:rc==0
|
||||
@ -53,13 +53,13 @@ check:rc==0
|
||||
check:output=~$$CN: Ps0 Input Voltage:
|
||||
cmd: rvitals $$CN wattage
|
||||
check:rc==0
|
||||
check:output=~$$CN: Total Power:
|
||||
check:output=~$$CN: Ps0 Input Power:
|
||||
cmd: rvitals $$CN fanspeed
|
||||
check:rc==0
|
||||
check:output=~$$CN: Fan
|
||||
cmd: rvitals $$CN power
|
||||
check:rc==0
|
||||
check:output=~$$CN: Total Power:
|
||||
check:output=~$$CN: Ps0 Input Power:
|
||||
cmd: rvitals $$CN leds
|
||||
check:rc==0
|
||||
check:output=~$$CN: LEDs Front
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:addkit_v
|
||||
label:others,KIT
|
||||
cmd:addkit -v
|
||||
check:rc==0
|
||||
check:output~=Version
|
||||
@ -7,6 +8,7 @@ check:output~=compatible_frameworks
|
||||
end
|
||||
|
||||
start:addkit_h
|
||||
label:others,KIT
|
||||
cmd:addkit -h
|
||||
check:rc==0
|
||||
check:output~=Usage
|
||||
@ -14,6 +16,7 @@ check:outpur!~error
|
||||
end
|
||||
|
||||
start:addkit_kit
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkit;buildkit create prodkit
|
||||
@ -35,6 +38,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit
|
||||
end
|
||||
|
||||
start:addkit_i
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkit;buildkit create prodkit
|
||||
@ -54,6 +58,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit
|
||||
end
|
||||
|
||||
start:addkit_multikit
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit
|
||||
@ -87,6 +92,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit
|
||||
end
|
||||
|
||||
start:addkit_p
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:addkitcomp_v
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:addkitcomp -v
|
||||
check:rc==0
|
||||
@ -13,6 +14,7 @@ check:output=~compatible_frameworks
|
||||
end
|
||||
|
||||
start:addkitcomp_h
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:addkitcomp -h
|
||||
check:rc==0
|
||||
@ -23,6 +25,7 @@ check:output=~ Usage
|
||||
end
|
||||
|
||||
start:addkitcomp_i
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/mykits
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp;buildkit create mykits
|
||||
@ -54,6 +57,7 @@ check:rc==0
|
||||
end
|
||||
|
||||
start:addkitcomp_f
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/mykits
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp;buildkit create mykits
|
||||
@ -84,6 +88,7 @@ check:rc==0
|
||||
end
|
||||
|
||||
start:addkitcomp_a
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA
|
||||
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA
|
||||
@ -126,6 +131,7 @@ check:rc==0
|
||||
end
|
||||
|
||||
start:addkitcomp_noscripts
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA
|
||||
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:bmcdiscover_q
|
||||
label:others,discovery
|
||||
os:linux
|
||||
decription:query usage for bmcdiscover
|
||||
cmd:bmcdiscover ?
|
||||
@ -10,6 +11,7 @@ check:output=~bmcdiscover \[-v|--version\]
|
||||
end
|
||||
|
||||
start:bmcdiscover_help
|
||||
label:others,discovery
|
||||
os:linux
|
||||
decription:show bmcdiscover help information
|
||||
cmd:bmcdiscover help
|
||||
@ -21,6 +23,7 @@ check:output=~bmcdiscover \[-v|--version\]
|
||||
end
|
||||
|
||||
start:bmcdiscover_version
|
||||
label:others,discovery
|
||||
os:linux
|
||||
description:show bmcdiscover version
|
||||
cmd:bmcdiscover --version
|
||||
@ -29,6 +32,7 @@ check:output=~bmcdiscover - xCAT Version
|
||||
end
|
||||
|
||||
start:bmcdiscover_h
|
||||
label:others,discovery
|
||||
os:Linux
|
||||
decription:help
|
||||
cmd:bmcdiscover -h
|
||||
@ -37,30 +41,35 @@ check:output=~Usage
|
||||
end
|
||||
|
||||
start:bmcdiscover_nmap_range
|
||||
label:others,discovery
|
||||
cmd:bmcdiscover -s nmap --range $$bmcrange -u $$bmcusername -p $$bmcpasswd
|
||||
check:rc==0
|
||||
check:output=~$$bmcrange
|
||||
end
|
||||
|
||||
start:bmcdiscover_v
|
||||
label:others,discovery
|
||||
cmd:bmcdiscover -v
|
||||
check:rc==0
|
||||
checkout:output=~xCAT Version
|
||||
end
|
||||
|
||||
start:bmcdiscover_check_paswd
|
||||
label:others,discovery
|
||||
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --check
|
||||
check:rc==1
|
||||
check:output=~is not supported
|
||||
end
|
||||
|
||||
start:bmcdiscover_get_ipsource
|
||||
label:others,discovery
|
||||
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --ipsource
|
||||
check:rc==1
|
||||
check:output=~is not supported
|
||||
end
|
||||
|
||||
start:bmcdiscover_range_w
|
||||
label:others,discovery
|
||||
cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -w
|
||||
check:rc==0
|
||||
check:output=~Writing node
|
||||
@ -69,6 +78,7 @@ end
|
||||
|
||||
|
||||
start:bmcdiscover_range_z
|
||||
label:others,discovery
|
||||
cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -z
|
||||
check:rc==0
|
||||
check:output=~bmc=$$bmcrange
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:buildkit_v
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:buildkit -v
|
||||
check:rc==0
|
||||
@ -13,6 +14,7 @@ check:output=~compatible_frameworks
|
||||
end
|
||||
|
||||
start:buildkit_h
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:buildkit -h
|
||||
check:rc==0
|
||||
@ -23,6 +25,7 @@ check:output=~ Usage
|
||||
end
|
||||
|
||||
start:buildkit_create
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
@ -44,6 +47,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
end
|
||||
|
||||
start:buildkit_create_l
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
@ -63,6 +67,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_all
|
||||
label:others,KIT
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -80,6 +85,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_all
|
||||
label:others,KIT
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -97,6 +103,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_all
|
||||
label:others,KIT
|
||||
os:ubuntu
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -114,6 +121,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_rhels
|
||||
label:others,KIT
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -131,6 +139,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_sles
|
||||
label:others,KIT
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -148,6 +157,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_ubuntu
|
||||
label:others,KIT
|
||||
os:ubuntu
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -165,6 +175,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleanrepo_all
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -181,6 +192,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleanrepo_rhels
|
||||
label:others,KIT
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -197,6 +209,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleanrepo_sles
|
||||
label:others,KIT
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -213,6 +226,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleanrepo_ubuntu
|
||||
label:others,KIT
|
||||
os:ubuntu
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -229,6 +243,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_listrepo
|
||||
label:others,KIT
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -244,6 +259,7 @@ end
|
||||
|
||||
|
||||
start:buildkit_listrepo
|
||||
label:others,KIT
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -258,6 +274,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_listrepo
|
||||
label:others,KIT
|
||||
os:ubuntu
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -272,6 +289,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_buildtar
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -291,6 +309,7 @@ end
|
||||
|
||||
|
||||
start:buildkit_cleantar
|
||||
label:others,KIT
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -312,6 +331,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleantar
|
||||
label:others,KIT
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -333,6 +353,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleantar
|
||||
label:others,KIT
|
||||
os:ubuntu
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -354,6 +375,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_partialkit
|
||||
label:others,KIT
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -377,6 +399,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_partialkit
|
||||
label:others,KIT
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -400,6 +423,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_partialkit_ubuntu
|
||||
label:others,KIT
|
||||
os:ubuntu
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -423,6 +447,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_partialkit_completekit
|
||||
label:others,KIT
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -454,6 +479,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_partialkit_completekit
|
||||
label:others,KIT
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
@ -485,6 +511,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_partialkit_completekit
|
||||
label:others,KIT
|
||||
os:ubuntu
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
|
@ -273,3 +273,46 @@ check:output=~300
|
||||
cmd:if [ -f /tmp/sitevalue ];then var=`cat /tmp/sitevalue`;chdef -t site clustersite dhcplease=$var;rm -rf /tmp/sitevalue;fi
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:chdef_network_not_exist
|
||||
description:This case is use to create a network, but not set net and mask.
|
||||
label:mn_only,db
|
||||
cmd:chdef -t network aaaaa_not_exist
|
||||
check:output=~No object definitions have been created or modified
|
||||
#check:rc!=0
|
||||
cmd:chdef -t network aaaaa_not_exist mtu=1500
|
||||
check:rc!=0
|
||||
check:output=~Net or mask value should not be empty
|
||||
cmd:chdef -t network aaaaa_not_exist mtu=1500 net=10.0.0.0
|
||||
check:rc!=0
|
||||
check:output=~Net or mask value should not be empty
|
||||
cmd:chdef -t network aaaaa_not_exist mtu=1500 mask=255.255.255.0
|
||||
check:rc!=0
|
||||
check:output=~Net or mask value should not be empty
|
||||
cmd:chdef -t network aaaaa_not_exist mask=255.255.255.0 net=100.0.0.0 mtu=1500
|
||||
check:rc==0
|
||||
check:output=~1 object definitions have been created or modified
|
||||
cmd:lsdef -t network aaaaa_not_exist
|
||||
check:rc==0
|
||||
cmd:chdef -t network aaaaa_not_exist gateway=10.0.0.101
|
||||
check:rc==0
|
||||
cmd:lsdef -t network aaaaa_not_exist -i gateway
|
||||
check:output=~10.0.0.101
|
||||
cmd:chdef -t network bbbbb_not_exist mask=255.255.255.0 net=100.0.0.0
|
||||
check:rc!=0
|
||||
check:output=~A network definition called 'aaaaa_not_exist' already exists
|
||||
cmd:echo '
|
||||
bbbbb_not_exist:
|
||||
objtype=network
|
||||
net=150.0.0.0
|
||||
' > /tmp/bbbbb_not_exist.def
|
||||
cmd:cat /tmp/bbbbb_not_exist.def |mkdef -z
|
||||
check:rc!=0
|
||||
check:output=~Net or mask value should not be empty
|
||||
cmd:lsdef -t network -o bbbbb_not_exist
|
||||
check:rc!=0
|
||||
cmd:rmdef -t network -o aaaaa_not_exist
|
||||
check:rc==0
|
||||
cmd:rm -rf /tmp/bbbbb_not_exist.def
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:chkkitcomp_v
|
||||
label:others,KIT
|
||||
cmd:chkkitcomp -v
|
||||
check:rc==0
|
||||
check:output~=Version
|
||||
@ -7,6 +8,7 @@ check:output~=compatible_frameworks
|
||||
end
|
||||
|
||||
start:chkkitcomp_h
|
||||
label:others,KIT
|
||||
cmd:addkit -h
|
||||
check:rc==0
|
||||
check:output~=Usage
|
||||
@ -14,6 +16,7 @@ check:outpur!~error
|
||||
end
|
||||
|
||||
start:chkkitcomp_V
|
||||
label:others,KIT
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/chkkitcomp/mykits
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/chkkitcomp;buildkit create mykits
|
||||
|
@ -1,5 +1,6 @@
|
||||
start: confignetwork_s_installnic_diskful
|
||||
description: this case is to test confignetwork -s could configure installnic successfully in diskful provision.
|
||||
label:others,network,invoke_provision
|
||||
cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
|
||||
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
|
||||
check:rc==0
|
||||
@ -31,7 +32,7 @@ check:output=~64 bytes from $$CN
|
||||
cmd:lsdef -l $$CN | grep status
|
||||
check:rc==0
|
||||
check:output=~booted
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
check:output!~dhcp
|
||||
@ -41,6 +42,7 @@ end
|
||||
|
||||
start:confignetwork_s_installnic_diskless
|
||||
description: this case is to test confignetwork -s could configure installnic successfully in diskless provision.
|
||||
label:others,network,invoke_provision
|
||||
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
|
||||
check:rc==0
|
||||
cmd:chdef -t node -o $$CN postbootscripts="confignetwork -s"
|
||||
@ -78,7 +80,7 @@ check:output=~64 bytes from $$CN
|
||||
cmd:lsdef -l $$CN | grep status
|
||||
check:rc==0
|
||||
check:output=~booted
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
check:output!~dhcp
|
||||
@ -89,6 +91,7 @@ end
|
||||
|
||||
start: confignetwork_secondarynic_diskless
|
||||
description: this case is to test confignetwork -s could config installnic and secondarynic at the same time successfully in diskless provision.
|
||||
label:others,network,invoke_provision
|
||||
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -130,11 +133,11 @@ check:output=~64 bytes from $$CN
|
||||
cmd:lsdef -l $$CN | grep status
|
||||
check:rc==0
|
||||
check:output=~booted
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
check:output!~dhcp
|
||||
cmd:secondarynic=`xdsh $$CN ip addr |grep 100.1.0.100|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$secondarynic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$secondarynic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:secondarynic=`xdsh $$CN ip addr |grep 100.1.0.100|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$secondarynic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$secondarynic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~100.1.0.100
|
||||
check:output!~dhcp
|
||||
@ -149,12 +152,13 @@ end
|
||||
|
||||
start:confignetwork_s_installnic_secondarynic_updatenode
|
||||
description: this case is to test confignetwork -s could configure installnic and secondarynic successfully with updatenode.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
@ -162,30 +166,31 @@ cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicne
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P "confignetwork -s"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
check:output!~dhcp
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
end
|
||||
|
||||
start:confignetwork_secondarynic_updatenode
|
||||
description: this case is to test confignetwork could configure secondarynic successfully with updatenode.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1496
|
||||
check:rc==0
|
||||
@ -193,28 +198,29 @@ cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicne
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep mtu /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep mtu /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~MTU=1496|mtu 1496
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
end
|
||||
|
||||
start: confignetwork_secondarynic_nicaliases_updatenode
|
||||
description: this case is to test confignetwork could config secondarynic nicaliases successfully with updatenode.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:cp -f /etc/hosts /etc/hosts.bak
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -230,33 +236,34 @@ check:output=~aliases1-1 aliases1-1-1
|
||||
check:output=~aliases1-2
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
check:output!~dhcp
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~12.1.0.100
|
||||
check:output!~dhcp
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:mv -f /etc/hosts.bak /etc/hosts
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
end
|
||||
|
||||
start:confignetwork_secondarynic_nicextraparams_updatenode
|
||||
description: this case is to test confignetwork could configure secondarynic nicextraparams successfully with updatenode.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:cp -f /etc/hosts /etc/hosts.bak
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -272,28 +279,29 @@ check:output=~$$CN-$$SECONDNIC-1
|
||||
check:output=~$$CN-$$SECONDNIC-2
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
check:output!~dhcp
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~12.1.0.100
|
||||
check:output=~CONNECTED_MODE=yes|CONNECTED_MODE yes
|
||||
check:output!~dhcp
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:mv -f /etc/hosts.bak /etc/hosts
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
end
|
||||
|
||||
start:confignetwork_secondarynic_nicnetworks_updatenode_false
|
||||
description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -310,6 +318,7 @@ end
|
||||
|
||||
start:confignetwork_secondarynic_nicips_updatenode_false
|
||||
description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -326,6 +335,7 @@ end
|
||||
|
||||
start:confignetwork_secondarynic_nictype_updatenode_false
|
||||
description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -343,6 +353,7 @@ end
|
||||
|
||||
start:confignetwork_disable_set_to_yes
|
||||
description: this case is to test if confignetwork could work correctly when disable is set to yes in nics table
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -353,7 +364,7 @@ cmd:chtab node=$$CN nics.disable=yes
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output!~11.1.0.100
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
check:rc==0
|
||||
@ -363,6 +374,7 @@ end
|
||||
|
||||
start:confignetwork_disable_set_to_1
|
||||
description: this case is to test if confignetwork could work correctly when disable is set to 1 in nics table
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -373,7 +385,7 @@ cmd:chtab node=$$CN nics.disable=1
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output!~11.1.0.100
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
check:rc==0
|
||||
@ -383,6 +395,7 @@ end
|
||||
|
||||
start:confignetwork_niccustomscripts
|
||||
description: this case is to test confignetwork could config secondarynic and envoke scripts to execute.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:echo "echo hello > /tmp/confignetwork_niccustomscript" > /tmp/script1
|
||||
@ -410,12 +423,13 @@ end
|
||||
|
||||
start:confignetwork_secondarynic_thirdnic_multiplevalue_updatenode
|
||||
description:this case is to verify if confignetwork could config serveral nics' multiple value at the same time.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
@ -440,21 +454,21 @@ check:output=~$$CN-$$THIRDNIC-1
|
||||
check:output=~$$CN-$$THIRDNIC-2
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~12.1.0.100
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~13.1.0.200
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~14.1.0.100
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 13_1_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 14_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC /etc/network/interfaces.d/$$THIRDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC /etc/network/interfaces.d/$$THIRDNIC:1";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC"
|
||||
@ -463,26 +477,27 @@ cmd:xdsh $$CN "ip addr del 14.1.0.100/16 dev $$THIRDNIC"
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:mv -f /etc/hosts.bak /etc/hosts
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
end
|
||||
|
||||
start:confignetwork_vlan_eth0
|
||||
description: this case is to verify if confignetwork could config vlan for CN.When CN has Ethernet nic eth0, user wants to confgure 2 vlans, Configure vlan eth0.6 60.5.106.9 and eth0.7 70.5.106.9 based on ethernet nic eth0
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC= nictypes.$$SECONDNIC= nicnetworks.$$SECONDNIC=
|
||||
check:rc==0
|
||||
@ -494,12 +509,12 @@ cmd:chdef $$CN nicnetworks.$$SECONDNIC.6="60_0_0_0-255_0_0_0" nicnetworks.$$SECO
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.6"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.6";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.6"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.6";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~60.5.106.9
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~70.5.106.9
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 60_0_0_0-255_0_0_0
|
||||
cmd:rmdef -t network -o 70_0_0_0-255_0_0_0
|
||||
@ -508,11 +523,11 @@ cmd:xdsh $$CN "ip addr del 70.5.106.9/8 dev $$SECONDNIC.7"
|
||||
cmd:xdsh $$CN "ip link del dev $$SECONDNIC.6"
|
||||
cmd:xdsh $$CN "ip link del dev $$SECONDNIC.7"
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC.6 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC.6 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
check:rc==0
|
||||
@ -520,20 +535,21 @@ end
|
||||
|
||||
start:confignetwork_vlan_false
|
||||
description:this case is to verify if confignetwork could process the false value when vlan nicdevice is not correctly set
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1500
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~11.1.0.100
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC= nictypes.$$SECONDNIC= nicnetworks.$$SECONDNIC=
|
||||
check:rc==0
|
||||
@ -552,11 +568,11 @@ cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 60_0_0_0-255_0_0_0
|
||||
cmd:rmdef -t network -o 70_0_0_0-255_0_0_0
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
check:rc==0
|
||||
@ -564,13 +580,14 @@ end
|
||||
|
||||
start:confignetwork_bond_eth2_eth3
|
||||
description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nics, eth2 and eth3, user configures bond bond0 using ethernet nic eth2 and eth3.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
@ -589,7 +606,7 @@ cmd:chdef $$CN nicnetworks.bond0=30_5_0_0-255_255_0_0 nictypes.$$SECONDNIC=ether
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-bond0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-bond0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~30.5.106.9
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "ls /sys/class/net"
|
||||
@ -597,20 +614,20 @@ check:output=~bond0
|
||||
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
|
||||
check:output=~bond0
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
|
||||
cmd:xdsh $$CN "ip addr del 30.5.106.9/16 dev bond0"
|
||||
cmd:xdsh $$CN "ip link del dev bond0"
|
||||
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
check:rc==0
|
||||
@ -618,13 +635,14 @@ end
|
||||
|
||||
start:confignetwork_bond_false
|
||||
description: this case is to verify if confignetwork could process when bond is not correctly set.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
@ -650,15 +668,15 @@ check:rc!=0
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC"
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
check:rc==0
|
||||
@ -666,13 +684,14 @@ end
|
||||
|
||||
start:confignetwork_vlan_bond
|
||||
description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nic eth2 and eth3, user wants to bond them to bond0, then make 2 vlan bond0.2 and bond0.3 for data network.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1500
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
@ -693,9 +712,9 @@ cmd:chdef $$CN nicdevices.bond0.2=bond0 nicdevices.bond0.3=bond0 nicips.bond0.2=
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-bond0.2"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.2"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/bond0.2";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-bond0.2"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.2"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/bond0.2";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~30.5.106.8
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/bond0.3";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/bond0.3";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~40.5.106.8
|
||||
cmd:xdsh $$CN "ls /sys/class/net"
|
||||
check:output=~bond0
|
||||
@ -704,10 +723,10 @@ check:output=~bond0.3
|
||||
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
|
||||
check:output=~bond0
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
|
||||
cmd:rmdef -t network -o 40_5_0_0-255_255_0_0
|
||||
@ -719,11 +738,11 @@ cmd:xdsh $$CN "ip link del dev bond0"
|
||||
cmd:xdsh $$CN "ip link del dev bond0.2"
|
||||
cmd:xdsh $$CN "ip link del dev bond0.3"
|
||||
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
check:rc==0
|
||||
@ -731,13 +750,14 @@ end
|
||||
|
||||
start:confignetwork_2eth_bridge_br0
|
||||
description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user want to configure bond bond0 using eth2 and eth3, creates bridge br0 based on bond0.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
@ -756,7 +776,7 @@ cmd:chdef $$CN nicnetworks.br0=30_5_0_0-255_255_0_0 nicdevices.br0=bond0 nictype
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-br0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-br0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~30.5.106.9
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "ls /sys/class/net"
|
||||
@ -764,10 +784,10 @@ check:output=~br0
|
||||
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
|
||||
check:output=~bond0
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
|
||||
cmd:xdsh $$CN "ip addr del 30.5.106.9/16 dev br0"
|
||||
@ -775,23 +795,24 @@ cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:xdsh $$CN "ip addr del 12.1.0.200/16 dev $$THIRDNIC"
|
||||
cmd:xdsh $$CN "ip link del dev br0"
|
||||
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-br0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-br0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
end
|
||||
|
||||
start:confignetwork_2eth_bridge_br22_br33
|
||||
description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user wants to bond them as bond0, then make vlan bond0.2 and bond0.3, using bond0.2 create bridge br22,using bond0.3 create bridge br33. Use confignetwork to configure bond bond0, create vlan bond0.2 and bond0.3, create bridge br22 and br33.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
@ -812,10 +833,10 @@ cmd:chdef $$CN nicdevices.br22=bond0.2 nicdevices.br33=bond0.3 nictypes.br22=bri
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P confignetwork
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~30.5.106.8
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~40.5.106.8
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "ls /sys/class/net"
|
||||
@ -824,10 +845,10 @@ check:output=~br33
|
||||
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
|
||||
check:output=~bond0
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
|
||||
cmd:xdsh $$CN "ip addr del 30.5.106.8/16 dev br22"
|
||||
@ -841,23 +862,24 @@ cmd:xdsh $$CN "ip link del dev bond0"
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC"
|
||||
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
end
|
||||
|
||||
start:confignetwork_installnic_2eth_bridge_br22_br33
|
||||
description:this case is to test if confignetwork could config installnic and 2 bridges at the same time
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
|
||||
@ -878,14 +900,14 @@ cmd:chdef $$CN nicdevices.br22=bond0.2 nicdevices.br33=bond0.3 nictypes.br22=bri
|
||||
check:rc==0
|
||||
cmd:updatenode $$CN -P "confignetwork -s"
|
||||
check:rc==0
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,ip)__
|
||||
check:output!~dhcp
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~30.5.106.8
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
check:output=~40.5.106.8
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "ls /sys/class/net"
|
||||
@ -894,10 +916,10 @@ check:output=~br33
|
||||
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
|
||||
check:output=~bond0
|
||||
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
|
||||
cmd:xdsh $$CN "ip addr del 30.5.106.8/16 dev br22"
|
||||
@ -910,23 +932,24 @@ cmd:xdsh $$CN "ip link del dev bond0.3"
|
||||
cmd:xdsh $$CN "ip link del dev bond0"
|
||||
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
|
||||
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC"
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
end
|
||||
|
||||
start:confignetwork__bridge_false
|
||||
description:this case is to test if confignetwork could process false value when the bridge is not correctly set.
|
||||
label:others,network
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
|
||||
cmd:mkdef -t network -o 30_5_0_0-255_255_0_0 net=30.5.0.0 mask=255.255.0.0
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 40_5_0_0-255_255_0_0 net=40.5.0.0 mask=255.255.0.0
|
||||
@ -946,17 +969,18 @@ cmd:xdsh $$CN "ip link del dev bond0.3"
|
||||
cmd:xdsh $$CN "ip link del dev bond0"
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
end
|
||||
|
||||
start:confignetwork_static_installnic
|
||||
description:Reconfigure installnic without dhclient lease file
|
||||
label:others,network
|
||||
cmd:lsdef $$CN -z && lsdef -l $$CN -z >/tmp/CN.stanza
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "mkdir -p /tmp/backupnet"
|
||||
check:rc==0
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN "ps -A --format pid,comm | awk '/dhclient/ { print \$1 }' | xargs -r -n 1 kill"
|
||||
cmd:xdsh $$CN "ps -A --format pid,comm | awk '/dhclient/ { print \$1 }' | xargs -r -n 1 kill -KILL"
|
||||
@ -968,7 +992,7 @@ cmd:xdsh $$CN date
|
||||
check:rc==0
|
||||
# Clean up
|
||||
cmd:test -e /tmp/CN.stanza && rmdef $$CN && mkdef -z </tmp/CN.stanza; rm -rf /tmp/CN.stanza
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
|
||||
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
|
||||
cmd:xdsh $$CN "if [ -f /etc/init.d/network ] ; then /etc/init.d/network restart ; elif [ -f /etc/init.d/networking ] ; then /etc/init.d/networking restart ; fi"
|
||||
end
|
||||
|
@ -1,5 +1,6 @@
|
||||
start:confignics_config_one_port_single_value
|
||||
description:confignics
|
||||
label:others,network,updatenode
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501
|
||||
@ -19,6 +20,7 @@ end
|
||||
|
||||
start:confignics_config_multiple_ports_single_value
|
||||
description:confignics
|
||||
label:others,network,updatenode
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501
|
||||
@ -49,6 +51,7 @@ end
|
||||
|
||||
start:confignics_config_multiple_ports_multiple_value
|
||||
description:confignics
|
||||
label:others,network,updatenode
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501
|
||||
@ -93,6 +96,7 @@ end
|
||||
|
||||
start:confignics_config_multiple_port_withnichostnamesuffixes_multiple_value
|
||||
description:confignics
|
||||
label:others,network,updatenode
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501
|
||||
@ -147,6 +151,7 @@ end
|
||||
|
||||
start:confignics_config_multiple_port_withnicaliases_multiple_value
|
||||
description:confignics
|
||||
label:others,network,updatenode
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
|
||||
@ -200,6 +205,7 @@ end
|
||||
|
||||
start:confignics_disable_set_to_yes
|
||||
description:confignics
|
||||
label:others,network,updatenode
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN ifdown $$SECONDNIC
|
||||
@ -222,6 +228,7 @@ end
|
||||
|
||||
start:confignics_disable_set_to_1
|
||||
description:confignics
|
||||
label:others,network,updatenode
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:xdsh $$CN ifdown $$SECONDNIC
|
||||
@ -244,6 +251,7 @@ end
|
||||
|
||||
start:confignics_s
|
||||
description:confignics_s
|
||||
label:others,network,updatenode
|
||||
cmd:tabdump networks > /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv
|
||||
check:rc==0
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/confignics/mtu_set_clean S 1496
|
||||
@ -268,6 +276,7 @@ check:rc==0
|
||||
end
|
||||
start:chdef_nicips
|
||||
description:nicip could be set to null
|
||||
label:others,network,updatenode
|
||||
Attribute: $$CN-The operation object of chdef command
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
|
@ -1,5 +1,6 @@
|
||||
start:copycds_iso
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:rm -rf /install/__GETNODEATTR($$CN,os)__
|
||||
#cmd:umount /mnt/xcat
|
||||
cmd:copycds $$ISO
|
||||
@ -11,6 +12,7 @@ check:rc==0
|
||||
end
|
||||
|
||||
start:lskmodules_o
|
||||
label:others
|
||||
cmd:lskmodules -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__
|
||||
check:rc==0
|
||||
check:output=~.ko(.xz):
|
||||
@ -19,6 +21,7 @@ end
|
||||
|
||||
start:copycds_n
|
||||
os:Linux
|
||||
label:others
|
||||
#cmd:umount /mnt/xca
|
||||
cmd:rm -rf /install/__GETNODEATTR($$CN,os)__
|
||||
cmd:copycds -n __GETNODEATTR($$CN,os)__ $$ISO
|
||||
@ -33,6 +36,7 @@ end
|
||||
|
||||
start:copycds_a
|
||||
os:Linux
|
||||
label:others
|
||||
#cmd:umount /mnt/xcat
|
||||
cmd:copycds -a __GETNODEATTR($$CN,arch)__ $$ISO
|
||||
check:rc==0
|
||||
@ -44,6 +48,7 @@ end
|
||||
|
||||
start:copycds_n_a
|
||||
os:Linux
|
||||
label:others
|
||||
#cmd:umount /mnt/xcat
|
||||
cmd:copycds -n __GETNODEATTR($$CN,os)__ -a __GETNODEATTR($$CN,arch)__ $$ISO
|
||||
check:rc==0
|
||||
@ -55,6 +60,7 @@ end
|
||||
|
||||
start:copycds_a_err
|
||||
os:Linux
|
||||
label:others
|
||||
#cmd:umount /mnt/xcat
|
||||
cmd:copycds -a 386 $$ISO
|
||||
check:output=~Error
|
||||
@ -62,6 +68,7 @@ end
|
||||
|
||||
start:copycds_n_err
|
||||
os:Linux
|
||||
label:others
|
||||
#cmd:umount /mnt/xcat
|
||||
cmd:copycds -n aix $$ISO
|
||||
check:rc!=0
|
||||
@ -70,6 +77,7 @@ end
|
||||
|
||||
start:copycds_p
|
||||
os:Linux
|
||||
label:others
|
||||
#cmd:umount /mnt/xcat
|
||||
cmd:mkdir -p /install/tmp
|
||||
cmd:copycds -p /install/tmp $$ISO
|
||||
@ -84,6 +92,7 @@ end
|
||||
|
||||
start:copycds_path
|
||||
os:Linux
|
||||
label:others
|
||||
#cmd:umount /mnt/xcat
|
||||
cmd:mkdir -p /install/tmp
|
||||
cmd:copycds --path /install/tmp $$ISO
|
||||
@ -99,6 +108,7 @@ end
|
||||
|
||||
start:copycds_i
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:copycds -i $$ISO
|
||||
check:rc==0
|
||||
check:output=~OS Image:$$ISO
|
||||
@ -109,6 +119,7 @@ end
|
||||
|
||||
start:copycds_inspection
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:copycds --inspection $$ISO
|
||||
check:rc==0
|
||||
check:output=~OS Image:$$ISO
|
||||
@ -119,6 +130,7 @@ end
|
||||
|
||||
start:copycds_o
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:copycds -o $$ISO
|
||||
check:rc==0
|
||||
check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__
|
||||
@ -129,6 +141,7 @@ end
|
||||
|
||||
start:copycds_noosimage
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:copycds --noosimage $$ISO
|
||||
check:rc==0
|
||||
check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__
|
||||
@ -139,6 +152,7 @@ end
|
||||
|
||||
start:copycds_w
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
cmd:copycds -w $$ISO
|
||||
@ -149,6 +163,7 @@ end
|
||||
|
||||
start:copycds_w2
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:rm -rf /install/__GETNODEATTR($$CN,os)__
|
||||
check:rc==0
|
||||
cmd:copycds -w $$ISO
|
||||
@ -159,6 +174,7 @@ end
|
||||
|
||||
start:copycds_nonoverwrite
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
cmd:copycds --nonoverwrite $$ISO
|
||||
@ -168,6 +184,7 @@ end
|
||||
|
||||
start:copycds_nonoverwrite2
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:rm -rf /install/__GETNODEATTR($$CN,os)__
|
||||
check:rc==0
|
||||
cmd:copycds --nonoverwrite $$ISO
|
||||
@ -178,6 +195,7 @@ end
|
||||
|
||||
start:copycds_p_newdir
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:if [ -e /install/newdir ];then mv /install/newdir /install/newdirbak; fi
|
||||
cmd:copycds $$ISO -p /install/newdir
|
||||
check:rc==0
|
||||
@ -191,6 +209,7 @@ end
|
||||
|
||||
start:copycds_p_noninstalldir
|
||||
os:Linux
|
||||
label:others
|
||||
cmd:if [ -e /noninstalldir ];then mv /noninstalldir /noninstaldirbak; fi
|
||||
cmd:copycds $$ISO -p /noninstalldir
|
||||
check:rc==0
|
||||
|
@ -1,5 +1,6 @@
|
||||
start:copycds_bogus_disc
|
||||
description: Test cases for the copycds with a bogus disc
|
||||
label:others
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/copycds/copycds_bogus_disc
|
||||
check:rc==0
|
||||
end
|
||||
|
@ -1,5 +1,6 @@
|
||||
start:bmc_discovery_only
|
||||
description: test the whole process of bmc discovery
|
||||
label:others,discovery
|
||||
Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service.
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --bmc_discovery_only
|
||||
check:rc==0
|
||||
|
@ -1,5 +1,6 @@
|
||||
start:mtms_based_node_discovery
|
||||
description: test the whole process of mtms_based node discovery
|
||||
label:others,discovery
|
||||
Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service.
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_mode mtms --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --osimage __GETNODEATTR($$NODE_DISCOVERY_TARGET,os)__-__GETNODEATTR($$NODE_DISCOVERY_TARGET,arch)__-install-compute
|
||||
check:rc==0
|
||||
|
@ -1,5 +1,6 @@
|
||||
start:switch_based_node_discovery
|
||||
description: test the whole process of switch_based node discovery
|
||||
label:others,discovery
|
||||
Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service.
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_mode switch --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --osimage __GETNODEATTR($$NODE_DISCOVERY_TARGET,os)__-__GETNODEATTR($$NODE_DISCOVERY_TARGET,arch)__-install-compute
|
||||
check:rc==0
|
||||
|
@ -1,5 +1,6 @@
|
||||
start:rpower_stop_docker
|
||||
description:stop a created docker instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -27,6 +28,7 @@ check:rc==0
|
||||
end
|
||||
start:rpower_start_docker
|
||||
description:start a created docker instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -52,6 +54,7 @@ end
|
||||
|
||||
start:rpower_state_docker
|
||||
description:get state of the instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -84,6 +87,7 @@ end
|
||||
|
||||
start:rpower_restart_docker
|
||||
description:restart a created docker instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -114,6 +118,7 @@ end
|
||||
|
||||
start:rpower_pause_docker
|
||||
decription:pause all processes in the instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -141,6 +146,7 @@ end
|
||||
|
||||
start:rpower_unpause_docker
|
||||
description:unpause all processes in the instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -167,12 +173,14 @@ check:rc==0
|
||||
end
|
||||
start:mkdocker_h
|
||||
description:output usage for mkdocker
|
||||
label:others,docker
|
||||
cmd:mkdocker -h
|
||||
check:rc==0
|
||||
check:output=~Usage: mkdocker
|
||||
end
|
||||
start:mkdocker_command
|
||||
description:create docker instance image should be ubuntu and command should be bash here
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -204,12 +212,14 @@ check:rc==0
|
||||
end
|
||||
start:rmdocker_h
|
||||
description:output usage for rmdocker
|
||||
label:others,docker
|
||||
cmd:rmdocker -h
|
||||
check:rc==0
|
||||
check:output=~Usage: rmdocker <noderage>
|
||||
end
|
||||
start:rmdocker_command
|
||||
description:remove docker instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -231,6 +241,7 @@ check:rc==0
|
||||
end
|
||||
start:rmdocker_f_command
|
||||
description:force to remove docker instance
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
@ -255,12 +266,14 @@ check:rc==0
|
||||
end
|
||||
start:lsdocker_h_command
|
||||
description:output usage for lsdocker
|
||||
label:others,docker
|
||||
cmd:lsdocker -h
|
||||
check:rc==0
|
||||
check:output=~Usage: lsdocker <noderange>
|
||||
end
|
||||
start:lsdocker_l_command
|
||||
description:list docker instance info
|
||||
label:others,docker
|
||||
cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker
|
||||
check:rc==0
|
||||
cmd:makehosts $$DOCKERCN
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:nodeset_shell
|
||||
label:others,genesis
|
||||
description: verify could log in genesis shell
|
||||
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g
|
||||
check:rc==0
|
||||
@ -10,6 +11,7 @@ cmd:cat /tmp/genesistestlog/*
|
||||
end
|
||||
|
||||
start:nodeset_cmdline
|
||||
label:others,genesis
|
||||
description:verify could run cmdline successfully
|
||||
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g
|
||||
check:rc==0
|
||||
@ -21,6 +23,7 @@ cmd:cat /tmp/genesistestlog/*
|
||||
end
|
||||
|
||||
start:nodeset_runimg
|
||||
label:others,genesis
|
||||
description:verify runimg could work
|
||||
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g
|
||||
check:rc==0
|
||||
@ -31,6 +34,7 @@ check:rc==0
|
||||
cmd:cat /tmp/genesistestlog/*
|
||||
end
|
||||
start:nodeset_shell_incorrectmasterip
|
||||
label:others,genesis
|
||||
description:very if computenode need to do nodeset shell in different net with master will success
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/genesis/test.sh --check xnba
|
||||
check:rc==0
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:genimage_h
|
||||
label:others,image
|
||||
os:Linux
|
||||
cmd:genimage -h
|
||||
check:output=~Usage
|
||||
@ -6,6 +7,7 @@ check:rc==0
|
||||
end
|
||||
|
||||
start:genimage_help
|
||||
label:others,image
|
||||
os:Linux
|
||||
cmd:genimage --help
|
||||
check:output=~Usage
|
||||
@ -13,6 +15,7 @@ check:rc==0
|
||||
end
|
||||
|
||||
start:genimage_stateless
|
||||
label:others,image
|
||||
os:Linux
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
@ -25,6 +28,7 @@ cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/c
|
||||
end
|
||||
|
||||
start:genimage_statelite
|
||||
label:others,image
|
||||
os:Linux
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
|
@ -1,4 +1,5 @@
|
||||
start:geninitrd_i_n_o_p
|
||||
label:others
|
||||
os:Linux
|
||||
cmd:copycds $$ISO
|
||||
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
|
||||
|
@ -1,6 +1,7 @@
|
||||
start:fresh_install_disk
|
||||
os:Linux
|
||||
description:check fresh install disk, usded for x86 multi disk only, and not check RH7.2 for RH os wwn isue.
|
||||
label:others,invoke_provision,install_disk
|
||||
|
||||
cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100"
|
||||
cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user