diff --git a/README.rst b/README.rst
index f813c12c5..12c854a1f 100644
--- a/README.rst
+++ b/README.rst
@@ -8,6 +8,8 @@ Documentation
Latest xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/
+`document for xCAT 2.14.1 `_
+
`document for xCAT 2.14 `_
`document for xCAT 2.13.11 `_
diff --git a/Version b/Version
index b70ae75a8..7243b12cf 100644
--- a/Version
+++ b/Version
@@ -1 +1 @@
-2.14.1
+2.14.2
diff --git a/build-ubunturepo b/build-ubunturepo
index 97ce0a1c1..a44c886c8 100755
--- a/build-ubunturepo
+++ b/build-ubunturepo
@@ -69,7 +69,7 @@ for i in $*; do
done
# Supported distributions
-dists="saucy trusty utopic xenial"
+dists="saucy trusty utopic xenial bionic"
c_flag= # xcat-core (trunk-delvel) path
d_flag= # xcat-dep (trunk) path
@@ -335,7 +335,7 @@ __EOF__
echo "GPGSIGN=$GPGSIGN specified, the repo will not be signed"
echo "" >> conf/distributions
else
- echo "SignWith: yes" >> conf/distributions
+ echo "SignWith: 5619700D" >> conf/distributions
echo "" >> conf/distributions
fi
done
@@ -462,7 +462,7 @@ __EOF__
echo "GPGSIGN=$GPGSIGN specified, the repo will not be signed"
echo "" >> conf/distributions
else
- echo "SignWith: yes" >> conf/distributions
+ echo "SignWith: 5619700D" >> conf/distributions
echo "" >> conf/distributions
fi
diff --git a/docs/source/advanced/confluent/client/confluent_client.rst b/docs/source/advanced/confluent/client/confluent_client.rst
index 1c1bfe5b2..335ed8c6c 100644
--- a/docs/source/advanced/confluent/client/confluent_client.rst
+++ b/docs/source/advanced/confluent/client/confluent_client.rst
@@ -14,15 +14,15 @@ It's recommenteed to create a non root user to use to connect to confetty
#. Create a non-root user on the management node: ::
- useradd -m vhu
+ useradd -m xcat
#. As root, create a non-root user in confetty: ::
- /opt/confluent/bin/confetty create users/vhu
+ /opt/confluent/bin/confetty create users/xcat
#. Set the password for the non-root user: ::
- /opt/confluent/bin/confetty set users/vhu password="mynewpassword"
+ /opt/confluent/bin/confetty set users/xcat password="mynewpassword"
password="********"
@@ -40,13 +40,19 @@ If you want to use the xCAT Keys, you can simple copy them into ``/etc/confluent
cp /etc/xcat/cert/server-key.pem /etc/confluent/privkey.pem
cp /etc/xcat/cert/server-cert.pem /etc/confluent/srvcert.pem
+The user and password may alternatively be provided via environment variables: ::
+
+ CONFLUENT_USER=xcat
+ CONFLUENT_PASSPHRASE="mynewpassword"
+ export CONFLUENT_USER CONFLUENT_PASSPHRASE
Start confetty, specify the server IP address: ::
- confetty -s 127.0.0.1
+ confetty -s
+If you want to run a confluent command against another host, could set the CONFLUENT_HOST variable: ::
-
-TODO: Add text for exporting user/pass into environment
+ CONFLUENT_HOST=
+ export CONFLUENT_HOST
diff --git a/docs/source/advanced/confluent/server/confluent_server.rst b/docs/source/advanced/confluent/server/confluent_server.rst
index 8591055ee..6eccd2d71 100644
--- a/docs/source/advanced/confluent/server/confluent_server.rst
+++ b/docs/source/advanced/confluent/server/confluent_server.rst
@@ -2,33 +2,11 @@
Getting Started
===============
-For xCAT 2.9.1 and later, confluent is intended to be used in conjunction with xCAT.
+Confluent is intended to be used in conjunction with xCAT.
The following documentation assumes that xCAT is already installed and configured on the management node.
-Download
-========
-
-confluent
----------
-
-rpms
-~~~~
-
-The latest confluent rpms are built and provided for your convenience: `confluent rpms `_. However, the rpms are not built on a regular release schedule. To use the latest code base, consider building the rpms from :ref:`label_confluent_source`.
-
-The following example downloads the confluent tar package and creates a local repository on your management node::
-
- mkdir ~/confluent
- cd ~/confluent
- wget https://path-to-confluent/confluent-X.X-repo.tbz2
- tar jxvf confluent-X.X-repo.tbz2
- cd confluent-X.X
- ./mklocalrepo.sh
-
-.. _label_confluent_source:
-
-source
-~~~~~~
+Download confluent
+==================
To build from source, ensure your machine has the correct development packages to build rpms, then execute the following:
@@ -42,33 +20,26 @@ To build from source, ensure your machine has the correct development packages t
cd confluent/confluent_client ; ./buildrpm ; cd -
-confluent-dep
--------------
-
-The latest confluent dependency packages are provided for your convenience: `confluent-deps `_
-
-The following example describes the steps for **rhels7.1** on **ppc64le**::
-
- mkdkir ~/confluent
- cd ~/confluent
- wget https://path/to/confluent-dep/rh7/ppc64le/confluent-dep-rh7-ppc64le.tar.bz2
- tar -jxvf confluent-dep-rh7-ppc64le.tar.bz2
- cd confluent-dep-rh7-ppc64le/
- ./mklocalrepo.sh
-
-.. note:: If the OS/architecture you are looking for is not provided under confluent-dep, send an email to the xcat-user mailing list: xcat-user@lists.sourceforge.net
-
-
Install
=======
-*confluent and confluent-deps must be downloaded to the management node before installing*
+dependency
+----------
-xCAT 2.9.1 began shipping a new rpm ``xCAT-confluent``.
+The following example describes the steps for **rhels7.5** on **ppc64le**::
-Installing ``xCAT-confluent`` via yum will pull in the confluent dependencies::
+ yum install libffi-devel.ppc64le
+ yum install openssl-devel
+ pip install crypto pyasn1 pycrypto eventlet pyparsing netifaces scrapy pysnmp paramiko pyghmi pyte
- yum install xCAT-confluent
+
+confluent
+---------
+
+Installing ``xCAT-confluent`` via rpm::
+
+ rpm -ivh /root/rpmbuild/RPMS/noarch/confluent_server-*.noarch.rpm --nodeps
+ rpm -ivh /root/rpmbuild/RPMS/noarch/confluent_client-*.noarch.rpm --nodeps
You may find it helpful to add the confluent paths into your system path::
@@ -76,6 +47,7 @@ You may find it helpful to add the confluent paths into your system path::
export PATH=$CONFLUENTROOT/bin:$PATH
export MANPATH=$CONFLUENTROOT/share/man:$MANPATH
+
Configuration
=============
@@ -92,7 +64,8 @@ To stop confluent::
If you want confluent daemon to start automatically at bootup, add confluent service to ``chkconfig``::
- chkconfig --add confluent
+ chkconfig confluent on
+
Replacing conserver with confluent
----------------------------------
@@ -111,11 +84,6 @@ Use ``rcons`` as before to start the console session.::
rcons
- # If using confluent, a timestamp will be shown on the
- # console title next to the node name
- [15:05]
-
-
Web Browser access
==================
@@ -124,31 +92,29 @@ Confluent-api and confluent-consoles are able to be accessed from the browser.
It is **highly** recommended that you create a non-root user to access the sessions::
Create the non-root user on the management node
- # useradd -m vhu
+ # useradd -m xcat
Create a non-root user in confetty
- # /opt/confluent/bin/confetty create users/vhu
+ # /opt/confluent/bin/confetty create users/xcat
Set the password for the non-root user
- # /opt/confluent/bin/confetty set users/vhu password="mynewpassword"
+ # /opt/confluent/bin/confetty set users/xcat password="mynewpassword"
password="********"
Rest Explorer
=============
-TODO: some intro text
-
Configure the httpd configuration for confluent-api by creating a ``confluent.conf`` file under ``/etc/httpd/conf.d/`` directory::
The example uses server ip: 10.2.5.3 and port 4005
- cat /etc/httpd/conf.d/confluent.conf
+ # cat /etc/httpd/conf.d/confluent.conf
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyPass http://10.2.5.3:4005
-
- #restart httpd
+
+ # restart httpd
service httpd restart
Now point your browser to: ``http://:`` and log in with the non-root user and password created above.
diff --git a/docs/source/advanced/security/security.rst b/docs/source/advanced/security/security.rst
index 32d9b9c4e..e47ca74e9 100644
--- a/docs/source/advanced/security/security.rst
+++ b/docs/source/advanced/security/security.rst
@@ -136,6 +136,15 @@ Here is an example about how to store a MD5 encrypted password for root in ``pas
tabch key=system passwd.username=root passwd.password=`openSSL passwd -1 `
+During the provisioning, the root password will be set on the compute nodes. By default, xCAT stores the encrypted hash of password into installation files directly for better performance.
+
+For example, ``/etc/shadow`` in stateless image for stateless nodes or installation files ( ``/install/autoinst/`` ) for stateful nodes.
+
+You can enable **secureroot** feature for more secure consideration. ::
+
+ chdef -t site secureroot=1
+
+Then, after the new ``packimage`` or ``nodeset`` command, the root password hash can only be acquired on-the-fly with strict security control.
Nodes Inter-Access in The Cluster
diff --git a/docs/source/conf.py b/docs/source/conf.py
index b51055b4e..834fc0065 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -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.1'
+release = '2.14.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst
index a7dbc54ec..6de3688dd 100644
--- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst
+++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst
@@ -3,7 +3,7 @@ Select or Create an osimage Definition
Before creating an image on xCAT, the distro media should be prepared ahead. That can be ISOs or DVDs.
-XCAT use 'copycds' command to create an image which will be available to install nodes. "copycds" will copy all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory, and create several relevant osimage definitions by default.
+XCAT use 'copycds' command to create an image which will be available to install nodes. ``copycds`` will copy all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory, and create several relevant osimage definitions by default.
If using an ISO, copy it to (or NFS mount it on) the management node, and then run: ::
@@ -81,15 +81,16 @@ In this way, if you need to install some additional RPMs into your MN later, you
**[Tips 2]**
-You can create/modify an osimage definition easily based on the default osimage definition. The general steps are:
+You can create/modify an osimage definition easily with any existing osimage definition, the command is ::
+
+ mkdef -t osimage -o --template [=, ...]
-* lsdef -t osimage -z --install-compute > .stanza
-* modify .stanza according to your requirements
-* cat .stanza| mkdef -z
+Except the specified attributes **, the attributes of ** will inherit the values of template osimage **.
-For example, if you need to change the osimage name to your favorite name, this command may be helpful: ::
+As an example, the following command creates a new osimage "myosimage.rh7.compute.netboot" based on the existing osimage "rhels7.4-ppc64le-netboot-compute" with some customized attributes ::
+
+ mkdef -t osimage -o myosimage.rh7.compute.netboot --template rhels7.4-ppc64le-netboot-compute synclists=/tmp/synclist otherpkgdir=/install/custom/osimage/myosimage.rh7.compute.netboot/3rdpkgs/ otherpkglist=/install/custom/osimage/myosimage.rh7.compute.netboot/3rd.pkglist
- chdef -t osimage rhels6.2-x86_64-install-compute -n rhels6.2_myimage
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst
index 3d516d760..01150949d 100644
--- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst
@@ -29,3 +29,32 @@ The manually defined node will be like this::
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles
primarynic=mac
+
+
+``mkdef --template`` can be used to create node definitions easily from the typical node definition templates or existing node definitions, some examples:
+
+* creating node definition "cn2" with an existing node definition "cn1" ::
+
+ # mkdef -t node -o cn2 --template cn1 mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2
+ 1 object definitions have been created or modified.
+
+ except the attributes specified(``mac``, ``ip`` and ``bmc`` attribute here), other attibutes of the newly created node "cn2" inherit the values of template node "cn1"
+
+* creating a node definition "cn2" with the template "ppc64le-openbmc-template"(openbmc controlled ppc64le node) shipped by xCAT ::
+
+ # mkdef -t node -o cn2 --template ppc64le-openbmc-template mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 bmcpassword=USERID bmcusername=PASSW0RD
+ 1 object definitions have been created or modified.
+
+ the unspecified attributes of newly created node "cn2" will be assigned with the default values in the template
+
+ to list all the node definition templates available in xCAT, run ::
+
+ # lsdef -t node --template
+
+ to display the full definition of template "ppc64le-openbmc-template", run ::
+
+ # lsdef -t node --template ppc64le-openbmc-template
+
+ the mandatory attributes, which must be specified while creating definitions with templates, are denoted with the value ``MANDATORY:`` in template definition.
+
+ the optional attributes, which can be specified optionally, are denoted with the value ``OPTIONAL:`` in template definition
diff --git a/docs/source/guides/admin-guides/references/man1/nodestat.1.rst b/docs/source/guides/admin-guides/references/man1/nodestat.1.rst
index 8d3afd684..9264a0232 100644
--- a/docs/source/guides/admin-guides/references/man1/nodestat.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/nodestat.1.rst
@@ -19,7 +19,7 @@ Name
****************
-\ **nodestat**\ [\ *noderange*\ ] [\ **-m | -**\ **-usemon**\ ] [\ **-p | -**\ **-powerstat**\ ] [\ **-f**\ ] [\ **-u | -**\ **-updatedb**\ ]
+\ **nodestat**\ [\ *noderange*\ ] [\ **-m | -**\ **-usemon**\ ] [\ **-p | -**\ **-powerstat**\ ] [\ **-f | -**\ **-usefping**\ ] [\ **-u | -**\ **-updatedb**\ ]
\ **nodestat**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ]
@@ -86,7 +86,7 @@ For the command specified by 'dcmd', no input is needed, the output can be a str
-\ **-f**\
+\ **-f | -**\ **-usefping**\
Uses fping instead of nmap even if nmap is available. If you seem to be having a problem with false negatives, fping can be more forgiving, but slower.
diff --git a/docs/source/guides/admin-guides/references/man1/rcons.1.rst b/docs/source/guides/admin-guides/references/man1/rcons.1.rst
index df8e0853f..394edb226 100644
--- a/docs/source/guides/admin-guides/references/man1/rcons.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/rcons.1.rst
@@ -35,7 +35,7 @@ multiple read-only instances of the console, plus console logging.
If \ *conserver-host*\ is specified, the conserver daemon on that host will be contacted, instead of on the local host.
-To exit the console session, enter: e c .
+To exit the console session, enter: 'ctrl-e c .' (3 characters: ctrl-e, 'c' and '.').
***************
diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst
index b43e6a12f..b77143fd2 100644
--- a/docs/source/guides/admin-guides/references/man5/site.5.rst
+++ b/docs/source/guides/admin-guides/references/man5/site.5.rst
@@ -295,6 +295,9 @@ site Attributes:
for each node, and put them in a directory of tftpdir(such as: /tftpboot)
If no, it will not generate the mypostscript file in the tftpdir.
+ secureroot: If set to 1, xCAT will use secure mode to transfer root password hash
+ during the installation. Default is 0.
+
setinstallnic: Set the network configuration for installnic to be static.
sharedtftp: Set to 0 or no, xCAT should not assume the directory
diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst
index ee7b62dfd..517a5433e 100644
--- a/docs/source/overview/xcat2_release.rst
+++ b/docs/source/overview/xcat2_release.rst
@@ -14,6 +14,12 @@ xCAT 2.14.x
|xCAT |New OS |New |New Feature |
|Version | |Hardware | |
+=================================+===============+=============+==================================+
+|| xCAT 2.14.2 2018/7/13 |- ubuntu18.04 | | |
+|| | | | |
+| `2.14.2 Release Notes `_ | | | |
++---------------------------------+---------------+-------------+----------------------------------+
|| xCAT 2.14.1 |- RHV4.2 + | |- OpenBMC in python enhance: |
|| 2018/6/1 | RHEL7.5 + p8 | | |
|| | | | rinv enhance,issue #5176 |
diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst
index ec1f19ce7..70c74418e 100644
--- a/docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst
+++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst
@@ -8,5 +8,4 @@ A new RPM is created that contains the Python code: ``xCAT-openbmc-py``. The Py
:maxdepth: 2
rpm.rst
- pip.rst
disable.rst
diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/pip.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/pip.rst
deleted file mode 100644
index 344b7e7c4..000000000
--- a/docs/source/references/coral/cluster_mgmt/scalability/python/install/pip.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-Using pip
-=========
-
-A alternative method for installing the Python dependencies is using ``pip``.
-
-#. Download ``pip`` using one of the following methods:
-
- #. ``pip`` is provided in the EPEL repo as: ``python2-pip``
-
- #. Follow the instructions to install from here: https://pip.pypa.io/en/stable/installing/
-
-#. Use ``pip`` to install the following Python libraries: ::
-
- pip install gevent docopt requests paramiko scp
-
-
-#. Install ``xCAT-openbmc-py`` using ``rpm`` with ``--nodeps``: ::
-
- cd xcat-core
- rpm -ihv xCAT-openbmc-py*.rpm --nodeps
-
-
diff --git a/docs/source/references/coral/ha/ha_mgmt_node_with_shared_data.rst b/docs/source/references/coral/ha/ha_mgmt_node_with_shared_data.rst
new file mode 100644
index 000000000..0d62646ee
--- /dev/null
+++ b/docs/source/references/coral/ha/ha_mgmt_node_with_shared_data.rst
@@ -0,0 +1,206 @@
+.. _ha_mgmt_node_with_shared_data:
+
+
+HA Solution Overview
+====================
+
+While a xCAT management node ``xcatmn1`` is running as a primary management node, another node - ``xcatmn2`` can be configured to act as primary management node in case ``xcatmn1`` becomes unavailable. The process is manual and requires disabling primary ``xcatmn1`` and activating backup ``xcatmn2``. Both nodes require access to shared storage described below. Use of Virtual IP is also requred.
+
+An interactive sample script `xcatha.py `_ is availabe to guide through the steps of disabling and activation of xCAT management nodes. ``Dryrun`` option in that scrip allows viewing the actions without executing them.
+
+Configure and Activate Primary xCAT Management Node
+===================================================
+
+Disable And Stop All Related Services on Primary xCAT Management Node
+`````````````````````````````````````````````````````````````````````
+
+Before configuring Virtual IP and shared data, make sure to stop related services. Since primary management node may become unavailable at any time, all related services should be configured to not auto start at boot time.
+
+Use ``xcatha.py -d`` to disable and stop all related services: ::
+
+ ./xcatha.py -d
+ 2018-06-22 03:43:51,600 - INFO - [xCAT] Shutting down services:
+ ... goconserver
+ ... conserver
+ ... ntpd
+ ... dhcpd
+ ... named
+ ... xcatd
+ ... postgresql
+ Continue? [[Y]es/[N]o/[D]ryrun]:
+ Y
+ ... ...
+ [xCAT] Disabling services from starting on reboot:
+ ... goconserver
+ ... conserver
+ ... ntpd
+ ... dhcpd
+ ... named
+ ... xcatd
+ ... postgresql
+ Continue? [[Y]es/[N]o/[D]ryrun]:
+ Y
+
+Configure Virtual IP
+````````````````````
+
+Existing xCAT management node IP should be configured as Virtual IP address, the Virtual IP address should be non-persistent, it needs to be re-configured right after the management node is rebooted. This non-persistent Virtual IP address is designed to avoid ip address conflict when the original primary management node is recovered with this Virtual IP address configured. Since the Virtual IP is non-persistent, the network interface should have a persistent IP address.
+
+#. Configure another IP on primary management node for network interface as static IP, for example, ``10.5.106.70``:
+
+ #. Configure ``10.5.106.70`` as static IP::
+
+ ip addr add 10.5.106.70/8 dev eth0
+
+ #. Edit ``ifcfg-eth0`` file as::
+
+ DEVICE="eth0"
+ BOOTPROTO="static"
+ NETMASK="255.0.0.0"
+ IPADDR="10.5.106.70"
+ ONBOOT="yes"
+
+ #. If want to take new static ip effect immediately, login ``xcatmn1`` using ``10.5.106.70``, and restart network service, then add original static IP on primary management node ``10.5.106.7`` as Virtual IP ::
+
+ ssh 10.5.106.70 -l root
+ service network restart
+ ip addr add 10.5.106.7/8 brd + dev eth0 label eth0:0
+
+#. Add ``10.5.106.70`` into ``postgresql`` configuration file on primary management node
+
+ #. Add ``10.5.106.70`` into ``/var/lib/pgsql/data/pg_hba.conf``::
+
+ host all all 10.5.106.7/32 md5
+
+ #. Add ``10.5.106.70`` into ``listen_addresses`` variable in ``/var/lib/pgsql/data/postgresql.conf``::
+
+ listen_addresses = 'localhost,10.5.106.7,10.5.106.70'
+
+#. Modify provision network entry ``mgtifname`` as ``eth0:0`` on primary management node::
+
+ tabedit networks
+ "10_0_0_0-255_0_0_0","10.0.0.0","255.0.0.0","eth0:0","10.0.0.103",,"",,,,,,,,,,,"1500",,
+
+Configure Shared Data
+`````````````````````
+
+The following xCAT directory structure should be accessible from primary xCAT management node::
+
+ /etc/xcat
+ /install
+ ~/.xcat
+ /var/lib/pgsql
+ /tftpboot
+
+Synchronize ``/etc/hosts``
+``````````````````````````
+
+Since the ``/etc/hosts`` is used by xCAT commands, the ``/etc/hosts`` should be synchronized between the primary management node and bakup management node.
+
+Synchronize Clock
+`````````````````
+
+It is recommended that the clocks are synchrinized between the primary management node and bakup management node.
+
+Activate Primary xCAT Management Node
+`````````````````````````````````````
+
+Use ``xcatha.py`` interactive activate ``xcatmn1``::
+
+ ./xcatha.py -a
+ [Admin] Verify VIP 10.5.106.7 is configured on this node
+ Continue? [[Y]es/[N]o]:
+ Y
+ [Admin] Verify that the following is configured to be saved in shared storage and accessible from this node:
+ ... /install
+ ... /etc/xcat
+ ... /root/.xcat
+ ... /var/lib/pgsql
+ ... /tftpboot
+ Continue? [[Y]es/[N]o]:
+ Y
+ [xCAT] Starting up services:
+ ... postgresql
+ ... xcatd
+ ... named
+ ... dhcpd
+ ... ntpd
+ ... conserver
+ ... goconserver
+ Continue? [[Y]es/[N]o/[D]ryrun]:
+ Y
+ 2018-06-24 22:13:09,428 - INFO - ===> Start all services stage <===
+ 2018-06-24 22:13:10,559 - DEBUG - systemctl start postgresql [Passed]
+ 2018-06-24 22:13:13,298 - DEBUG - systemctl start xcatd [Passed]
+ domain=cluster.com
+ 2018-06-24 22:13:13,715 - DEBUG - lsdef -t site -i domain|grep domain [Passed]
+ Handling bybc0607 in /etc/hosts.
+ Handling localhost in /etc/hosts.
+ Handling bybc0609 in /etc/hosts.
+ Handling localhost in /etc/hosts.
+ Getting reverse zones, this may take several minutes for a large cluster.
+ Completed getting reverse zones.
+ Updating zones.
+ Completed updating zones.
+ Restarting named
+ Restarting named complete
+ Updating DNS records, this may take several minutes for a large cluster.
+ Completed updating DNS records.
+ DNS setup is completed
+ 2018-06-24 22:13:17,320 - DEBUG - makedns -n [Passed]
+ Renamed existing dhcp configuration file to /etc/dhcp/dhcpd.conf.xcatbak
+
+ Warning: No dynamic range specified for 10.0.0.0. If hardware discovery is being used, a dynamic range is required.
+ 2018-06-24 22:13:17,811 - DEBUG - makedhcp -n [Passed]
+ 2018-06-24 22:13:18,746 - DEBUG - makedhcp -a [Passed]
+ 2018-06-24 22:13:18,800 - DEBUG - systemctl start ntpd [Passed]
+ 2018-06-24 22:13:19,353 - DEBUG - makeconservercf [Passed]
+ 2018-06-24 22:13:19,449 - DEBUG - systemctl start conserver [Passed]
+
+Activate Backup xCAT Management Node to be Primary Management Node
+==================================================================
+
+#. Install xCAT on backup xCAT management node ``xcatmn2`` with local disk
+
+#. Switch to ``PostgreSQL`` database
+
+#. Disable and deactivate services using ``xcatha.py -d`` on both ``xcatmn2`` and ``xcatmn1``
+
+#. Remove Virtual IP from primary xCAT Management Node ``xcatmn1``::
+
+ ip addr del 10.5.106.7/8 dev eth0:0
+
+#. Configure Virtual IP on ``xcatmn2``
+
+#. Add Virtual IP into ``/etc/hosts`` file ::
+
+ 10.5.106.7 xcatmn1 xcatmn1.cluster.com
+
+#. Connect the following xCAT directories to shared data on ``xcatmn2``::
+
+ /etc/xcat
+ /install
+ ~/.xcat
+ /var/lib/pgsql
+ /tftpboot
+
+#. Add static management node network interface IP ``10.5.106.5`` into ``PostgreSQL`` configuration file
+
+ #. Add ``10.5.106.5`` into ``/var/lib/pgsql/data/pg_hba.conf``::
+
+ host all all 10.5.106.5/32 md5
+
+ #. Add ``10.5.106.5`` into ``listen_addresses`` variable in ``/var/lib/pgsql/data/postgresql.conf``::
+
+ listen_addresses = 'localhost,10.5.106.7,10.5.106.70,10.5.105.5'
+
+#. Use ``xcatha.py -a`` to start all related services on ``xcatmn2``
+
+#. Modify provision network entry ``mgtifname`` as ``eth0:0``::
+
+ tabedit networks
+ "10_0_0_0-255_0_0_0","10.0.0.0","255.0.0.0","eth0:0","10.0.0.103",,"",,,,,,,,,,,"1500",,
+
+Unplanned failover: primary xCAT management node is not accessible
+``````````````````````````````````````````````````````````````````
+If primary xCAT management node becomes not accessible before being deactivated and backup xCAT management node is activated, it is recommended that the primary node is disconnected from the network before being rebooted. This will ensure that when services are started on reboot, they do not interfere with the same services running on the backup xCAT management node.
diff --git a/docs/source/references/coral/ha/index.rst b/docs/source/references/coral/ha/index.rst
new file mode 100644
index 000000000..93e8d663c
--- /dev/null
+++ b/docs/source/references/coral/ha/index.rst
@@ -0,0 +1,7 @@
+HA
+==
+
+.. toctree::
+ :maxdepth: 2
+
+ ha_mgmt_node_with_shared_data.rst
diff --git a/docs/source/references/coral/index.rst b/docs/source/references/coral/index.rst
index 58de81eac..c89735c71 100644
--- a/docs/source/references/coral/index.rst
+++ b/docs/source/references/coral/index.rst
@@ -8,6 +8,7 @@ CORAL stands for Collaboration of Oak Ridge, Argonne, and Livermore and is solut
:maxdepth: 2
cluster_mgmt/index.rst
- known_issues/index.rst
+ known_issues/index.rst
+ ha/index.rst
.. mn/index.rst
.. discovery/index.rst
diff --git a/docs/source/security/2018/20180612_openssl.rst b/docs/source/security/2018/20180612_openssl.rst
new file mode 100644
index 000000000..e11dc06b0
--- /dev/null
+++ b/docs/source/security/2018/20180612_openssl.rst
@@ -0,0 +1,21 @@
+2018-06-12 - OpenSSL Vulnerabilities
+====================================
+
+*Jun 12, 2018*, OpenSSL announced the following security advisories: https://www.openssl.org/news/secadv/20180612.txt
+
+
+Advisory CVEs
+-------------
+
+* CVE-2018-0732 - **Client DoS due to large DH parameter** (Severity: Low)
+
+Please see the security bulletin above for patch, upgrade, or suggested work around information.
+
+Action
+------
+
+xCAT uses OpenSSL for client-server communication but **does not** ship it.
+
+It is highly recommended to keep your OpenSSL levels up-to-date with the indicated versions in the security bulletins to prevent any potential security threats. Obtain the updated software packages from your Operating system distribution channels.
+
+
diff --git a/docs/source/security/2018/index.rst b/docs/source/security/2018/index.rst
new file mode 100644
index 000000000..eb736ccb8
--- /dev/null
+++ b/docs/source/security/2018/index.rst
@@ -0,0 +1,7 @@
+2018 Notices
+============
+
+.. toctree::
+ :maxdepth: 1
+
+ 20180612_openssl.rst
diff --git a/docs/source/security/index.rst b/docs/source/security/index.rst
index 911c9ec62..c97f5e61c 100644
--- a/docs/source/security/index.rst
+++ b/docs/source/security/index.rst
@@ -4,6 +4,7 @@ Security Notices
.. toctree::
:maxdepth: 2
+ 2018/index.rst
2017/index.rst
2016/index.rst
2015/index.rst
diff --git a/makerpm b/makerpm
index 359f35289..e0bc3d3c5 100755
--- a/makerpm
+++ b/makerpm
@@ -13,7 +13,6 @@ function xcat_probe_copy {
# xCAT-probe uses some functions shipped with xCAT, copying for the following reasons:
# 1. make xCAT-probe code be self-contained
# 2. do not maintain two files for each script
- # 3. symbolic link can't work during packaging
RPMNAME=${1}
if [ $RPMNAME = "xCAT-probe" ]; then
mkdir -p ${RPMNAME}/lib/perl/xCAT/
diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm
index 6a55227e7..e742289c5 100644
--- a/perl-xCAT/xCAT/Client.pm
+++ b/perl-xCAT/xCAT/Client.pm
@@ -1132,14 +1132,18 @@ sub handle_response {
}
my $msgsource = "";
+ $msgsource = $rsp->{xcatdsource}->[0] if ($rsp->{xcatdsource});
+
+ # To determine if the INFO msg need to be added with source server name. For ERROR/WARN, it always is shown.
+ my $showsource = 0;
+ if ($rsp->{host}) {
+ $showsource = 1;
+ }
if ($ENV{'XCATSHOWSVR'}) {
unless ($rsp->{NoSvrPrefix}) { # some plugins could disable the prefix forcely by seting the flag in response.
- $msgsource = $rsp->{xcatdsource}->[0] if ($rsp->{xcatdsource});
+ $showsource = 1;
}
}
- if ($rsp->{host}) {
- $msgsource = $rsp->{xcatdsource}->[0] if ($rsp->{xcatdsource});
- }
#print "in handle_response\n";
# Handle errors
@@ -1160,14 +1164,14 @@ sub handle_response {
if (ref($rsp->{error}) eq 'ARRAY') {
foreach my $text (@{ $rsp->{error} }) {
my $desc = "$text";
- $desc = "[$msgsource]: $desc" if ($msgsource && $desc);
+ $desc = "[$msgsource]: $desc" if ($desc && $msgsource);
$desc = "Error: $desc" unless ($rsp->{NoErrorPrefix});
print STDERR "$desc\n";
}
}
else {
my $desc = $rsp->{error};
- $desc = "[$msgsource]: $desc" if ($msgsource && $desc);
+ $desc = "[$msgsource]: $desc" if ($desc && $msgsource);
$desc = "Error: $desc" unless ($rsp->{NoErrorPrefix});
print STDERR "$desc\n";
}
@@ -1178,14 +1182,14 @@ sub handle_response {
if (ref($rsp->{warning}) eq 'ARRAY') {
foreach my $text (@{ $rsp->{warning} }) {
my $desc = "$text";
- $desc = "[$msgsource]: $desc" if ($msgsource && $desc);
+ $desc = "[$msgsource]: $desc" if ($desc && $msgsource);
$desc = "Warning: $desc" unless ($rsp->{NoWarnPrefix});
print STDERR "$desc\n";
}
}
else {
my $desc = $rsp->{warning};
- $desc = "[$msgsource]: $desc" if ($msgsource && $desc);
+ $desc = "[$msgsource]: $desc" if ($desc && $msgsource);
$desc = "Warning: $desc" unless ($rsp->{NoWarnPrefix});
print STDERR "$desc\n";
}
@@ -1195,13 +1199,13 @@ sub handle_response {
if (ref($rsp->{info}) eq 'ARRAY') {
foreach my $text (@{ $rsp->{info} }) {
my $desc = "$text";
- $desc = "[$msgsource]: $desc" if ($msgsource && $desc);
+ $desc = "[$msgsource]: $desc" if ($showsource && $desc && $msgsource);
print "$desc\n";
}
}
else {
my $desc = $rsp->{info};
- $desc = "[$msgsource]: $desc" if ($msgsource && $desc);
+ $desc = "[$msgsource]: $desc" if ($showsource && $desc && $msgsource);
print "$desc\n";
}
}
@@ -1236,11 +1240,7 @@ sub handle_response {
} else {
$desc = $node->{name};
}
- if ($desc) {
- $desc = "$desc: [$msgsource]" if ($msgsource);
- } else {
- $desc = "[$msgsource]" if ($msgsource);
- }
+
if ($node->{errorcode}) {
if (ref($node->{errorcode}) eq 'ARRAY') {
foreach my $ecode (@{ $node->{errorcode} }) {
@@ -1252,14 +1252,29 @@ sub handle_response {
} # assume it is a non-reference scalar
}
if ($node->{error}) {
+ if ($desc) {
+ $desc = "$desc: [$msgsource]" if ($msgsource);
+ } else {
+ $desc = "[$msgsource]" if ($msgsource);
+ }
$desc .= ": Error: " . $node->{error}->[0];
$errflg = 1;
}
if ($node->{warning}) {
+ if ($desc) {
+ $desc = "$desc: [$msgsource]" if ($msgsource);
+ } else {
+ $desc = "[$msgsource]" if ($msgsource);
+ }
$desc .= ": Warning: " . $node->{warning}->[0];
$errflg = 1;
}
if ($node->{data}) {
+ if ($desc) {
+ $desc = "$desc: [$msgsource]" if ($showsource && $msgsource);
+ } else {
+ $desc = "[$msgsource]" if ($showsource && $msgsource);
+ }
if (ref(\($node->{data})) eq 'SCALAR') {
$desc = $desc . ": " . $node->{data};
} elsif (ref($node->{data}) eq 'HASH') {
@@ -1324,7 +1339,7 @@ sub handle_response {
}
}
if ($desc) {
- $desc = "[$msgsource]: $desc" if ($msgsource);
+ $desc = "[$msgsource]: $desc" if ($showsource && $msgsource);
print "$desc\n";
}
}
diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm
index 85693ec22..631b412c2 100644
--- a/perl-xCAT/xCAT/DSHCLI.pm
+++ b/perl-xCAT/xCAT/DSHCLI.pm
@@ -804,6 +804,46 @@ sub fork_fanout_dcp
my @dcp_command;
my $rsyncfile;
+
+ my %envardict;
+ foreach my $varstr (split(',',$$target_properties{'envar'})){
+ if($varstr =~ m/(.*)=(.*)/){
+ my ($myvar,$myvalue)=($1,$2);
+ $envardict{$myvar}=$myvalue;
+ }
+ }
+
+ if(%envardict){
+ my $dest_srcdict=$$options{'destDir_srcFile'}{$user_target};
+ for my $dest (keys %{$dest_srcdict}){
+ my $newdest=$dest;
+ $newdest=xCAT::Utils->varsubinline($newdest,\%envardict);
+ for my $label(keys %{$$dest_srcdict{$dest}}){
+ my $myref;
+ if('ARRAY' eq ref($$dest_srcdict{$dest}{$label})){
+ for my $path(@{$$dest_srcdict{$dest}{$label}}){
+ $path=xCAT::Utils->varsubinline($path,\%envardict);
+ }
+ }elsif('HASH' eq ref($$dest_srcdict{$dest}{$label})){
+ for my $path(keys(%{$$dest_srcdict{$dest}{$label}})){
+ my $newpath=$path;
+ $newpath=xCAT::Utils->varsubinline($newpath,\%envardict);
+ if($newpath ne $path){
+ $$dest_srcdict{$dest}{$label}{$newpath}=$$dest_srcdict{$dest}{$label}{$path};
+ delete $$dest_srcdict{$dest}{$label}{$path};
+ }
+ }
+ }
+ }
+ if($newdest ne $dest){
+ $$dest_srcdict{$newdest}=$$dest_srcdict{$dest};
+ delete $$dest_srcdict{$dest};
+ }
+
+ }
+ }
+
+
if (!$$target_properties{'localhost'}) # this is to a remote host
{
my $target_type = $$target_properties{'type'};
@@ -3293,6 +3333,13 @@ sub bld_resolve_nodes_hash
$rsp->{info}->[0] = "Command: $cmd failed. Continuing...";
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
}
+
+
+ my $ostab = xCAT::Table->new('nodetype');
+ my %oents = %{ $ostab->getNodesAttribs(\@target_list, [qw(provmethod)]) };
+
+
+
foreach my $target (@target_list)
{
@@ -3306,12 +3353,27 @@ sub bld_resolve_nodes_hash
if (($mname eq $target) || ($localhostname eq $target)) {
$localhost = $target;
}
+
+ my $envar=undef;
+ my $ent = $oents{$target}->[0];
+ if ($ent and $ent->{provmethod} and \
+ ($ent->{provmethod} ne 'install') and ($ent->{provmethod} ne 'netboot') and ($ent->{provmethod} ne 'statelite')) {
+
+ my $imagename = $ent->{provmethod};
+ my $osimagetab = xCAT::Table->new('osimage', -create => 1);
+ (my $ref) = $osimagetab->getAttribs({ imagename => $imagename }, 'environvar');
+ if($ref){
+ $envar=$ref->{'environvar'};
+ }
+ }
+
my %properties = (
'hostname' => $hostname,
'ip-address' => $ip_address,
'localhost' => $localhost,
'user' => $user,
'context' => $context,
+ 'envar' => $envar,
'unresolved' => $target
);
@@ -4405,6 +4467,7 @@ sub parse_and_run_dcp
$::XCATROOT = "/opt/xcat";
}
+
# parse the arguments
Getopt::Long::Configure("posix_default");
Getopt::Long::Configure("no_gnu_compat");
@@ -4914,6 +4977,15 @@ sub rsync_to_image
my ($input_file, $image) = @_;
my $rc = 0;
+
+ my %osimgenv;
+ if($ENV{'XCAT_OSIMAGE_ENV'}){
+ foreach my $myenv(split(',',$ENV{'XCAT_OSIMAGE_ENV'})){
+ if($myenv =~ /\s*(\S+)\s*=\s*(\S+)\s*/) {
+ $osimgenv{$1}=$2;
+ }
+ }
+ }
open(INPUTFILE, "< $input_file") || die "File $input_file does not exist\n";
while (my $line = )
{
@@ -4923,6 +4995,8 @@ sub rsync_to_image
next;
}
+ $line=xCAT::Utils->varsubinline($line,\%osimgenv);
+
# process no more lines, do not exec
# do not execute postscripts when syncing images
if (($line =~ /EXECUTE:/) || ($line =~ /EXECUTEALWAYS:/)
diff --git a/perl-xCAT/xCAT/MsgUtils.pm b/perl-xCAT/xCAT/MsgUtils.pm
index 4e3bf292c..d4876281e 100644
--- a/perl-xCAT/xCAT/MsgUtils.pm
+++ b/perl-xCAT/xCAT/MsgUtils.pm
@@ -897,42 +897,24 @@ sub trace() {
if (($level eq "I") || ($level eq "i")) { $prefix = "INFO"; }
if (($level eq "D") || ($level eq "d")) { $prefix = "DEBUG"; }
- if (($level eq "E")
- || ($level eq "e")
- || ($level eq "I")
- || ($level eq "i")
- || ($level eq "W")
- || ($level eq "w")) {
- my $msg = $prefix . " " . $logcontent;
- eval {
- openlog("xcat", "nofatal,pid", "local4");
- syslog("$prefix", $msg);
- closelog();
- };
- if ($@) {
- print "Error: Unable to log to syslog: $@\n";
- print "$msg\n";
- }
- return;
+ return unless ($prefix); #unknown level, do nothing.
+
+ if (($verbose == 0) && ($prefix eq "DEBUG")) {
+ my @tmp = xCAT::TableUtils->get_site_attribute("xcatdebugmode");
+ my $xcatdebugmode = $tmp[0];
+ return unless (($xcatdebugmode == 1) || ($xcatdebugmode == 2));
}
- my @tmp = xCAT::TableUtils->get_site_attribute("xcatdebugmode");
- my $xcatdebugmode = $tmp[0];
- if (($level eq "D")
- || ($level eq "d")) {
- if (($verbose == 1) || ($xcatdebugmode eq "1") || ($xcatdebugmode eq "2")) {
- my $msg = $prefix . " " . $logcontent;
- eval {
- openlog("xcat", "nofatal,pid", "local4");
- syslog("$prefix", $msg);
- closelog();
- };
- if ($@) {
- print "Error: Unable to log to syslog: $@\n";
- print "$msg\n";
- }
- }
+ eval {
+ openlog("xcat", "nofatal,pid", "local4");
+ syslog("$prefix", $logcontent);
+ closelog();
+ };
+ if ($@) {
+ print "Error: Unable to log to syslog: $@\n";
+ print "$prefix . $logcontent\n";
}
+
}
#------------------------------------------------------------------
diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm
index e3871e3f4..7dba4a965 100755
--- a/perl-xCAT/xCAT/NetworkUtils.pm
+++ b/perl-xCAT/xCAT/NetworkUtils.pm
@@ -2156,7 +2156,7 @@ sub isIpaddr
return 0;
}
- if ($1 > 255 || $1 == 0 || $2 > 255 || $3 > 255 || $4 > 255)
+ if ($1 > 255 || $1 =~ /^0/ || $2 > 255 || $2 =~ /^0\d/ || $3 > 255 || $3 =~ /^0\d/ || $4 > 255 || $4 =~ /^0\d/)
{
return 0;
}
diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm
index 310e565bd..dc053e541 100755
--- a/perl-xCAT/xCAT/Schema.pm
+++ b/perl-xCAT/xCAT/Schema.pm
@@ -768,7 +768,7 @@ passed as argument rather than by table value',
},
},
osimage => {
- cols => [qw(imagename groups profile imagetype description provmethod rootfstype osdistroname osupdatename cfmdir osname osvers osarch synclists postscripts postbootscripts serverrole isdeletable kitcomponents comments disable)],
+ cols => [qw(imagename groups profile imagetype description provmethod rootfstype osdistroname osupdatename cfmdir osname osvers osarch synclists postscripts postbootscripts serverrole isdeletable kitcomponents environvar comments disable)],
keys => [qw(imagename)],
tablespace => 'XCATTBS32K',
table_desc => 'Basic information about an operating system image that can be used to deploy cluster nodes.',
@@ -795,6 +795,7 @@ passed as argument rather than by table value',
serverrole => 'The role of the server created by this osimage. Default roles: mgtnode, servicenode, compute, login, storage, utility.',
isdeletable => 'A flag to indicate whether this image profile can be deleted. This attribute is only used by PCM.',
kitcomponents => 'List of Kit Component IDs assigned to this OS Image definition.',
+ environvar => 'Comma delimited environment variables for the osimage',
comments => 'Any user-written notes.',
disable => "Set to 'yes' or '1' to comment out this row.",
},
@@ -1178,6 +1179,8 @@ passed as argument rather than by table value',
" all of the nodes passed into the cmd and create the mypostscript file\n" .
" for each node, and put them in a directory of tftpdir(such as: /tftpboot)\n" .
" If no, it will not generate the mypostscript file in the tftpdir.\n\n" .
+" secureroot: If set to 1, xCAT will use secure mode to transfer root password hash\n" .
+" during the installation. Default is 0.\n\n" .
" setinstallnic: Set the network configuration for installnic to be static.\n\n" .
" sharedtftp: Set to 0 or no, xCAT should not assume the directory\n" .
" in tftpdir is mounted on all on Service Nodes. Default is 1/yes.\n" .
@@ -3476,6 +3479,10 @@ push(@{ $defspec{node}->{'attrs'} }, @nodeattrs);
tabentry => 'nimimage.comments',
access_tabentry => 'nimimage.imagename=attr:imagename',
},
+ { attr_name => 'environvar',
+ tabentry => 'osimage.environvar',
+ access_tabentry => 'osimage.imagename=attr:imagename',
+ },
);
#########################
diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm
index 89593b3ee..f767133cc 100755
--- a/perl-xCAT/xCAT/Usage.pm
+++ b/perl-xCAT/xCAT/Usage.pm
@@ -495,7 +495,7 @@ my %usage = (
renergy noderange [-V] { cappingstatus={on | enable | off | disable} | {cappingwatt|cappingvalue}=watt }
OpenPOWER server specific :
- renergy noderange [ powerusage | temperature]
+ renergy noderange { powerusage | temperature }
",
"updatenode" =>
"Usage:
diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm
index 4130b3397..7b76bcb9c 100644
--- a/perl-xCAT/xCAT/Utils.pm
+++ b/perl-xCAT/xCAT/Utils.pm
@@ -5004,4 +5004,32 @@ sub console_sleep {
sleep($time);
}
-1;
+
+# replace the variables in $line with the values in dict ref $refvardict
+# return the substitued $line
+sub varsubinline{
+ my $class=shift;
+ my $line=shift;
+ my $refvardict=shift;
+
+ my @varsinline= $line =~ /\$\{?(\w+)\}?/g;
+ my @unresolvedvars;
+ foreach my $var(@varsinline){
+ if(exists $refvardict->{$var}){
+ $line=~ s/\$\{$var\}/$refvardict->{$var}/g;
+ $line=~ s/\$$var/$refvardict->{$var}/g;
+ }else{
+ push @unresolvedvars,$var;
+ }
+ }
+
+ return $line;
+}
+
+#remove the left and right white spaces from string
+sub strim{
+ my $class=shift;
+ my $str=shift;
+ $str =~ s/^\s+|\s+$//g;
+ return $str;
+}
diff --git a/travis.pl b/travis.pl
index d35f0a8ad..7dc5ea8de 100644
--- a/travis.pl
+++ b/travis.pl
@@ -272,7 +272,7 @@ sub send_back_comment{
sub build_xcat_core{
my @output;
my @cmds = ("gpg --list-keys",
- "sed -i '/SignWith: yes/d' $ENV{'PWD'}/build-ubunturepo");
+ "sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo");
foreach my $cmd (@cmds){
print "[build_xcat_core] running $cmd\n";
@output = runcmd("$cmd");
diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup
index b8936aa30..36a39b86c 100755
--- a/xCAT-client/bin/mysqlsetup
+++ b/xCAT-client/bin/mysqlsetup
@@ -338,6 +338,7 @@ if ((($odbconly == 0) && ($::xcatrunningmysql == 0)) || $::UPDATE || $::SETUPLL)
}
# initial setup request, if not already running mysql
+my $hostfile_configured=0;
if (($::INIT) && ($::xcatrunningmysql == 0))
{
# MySQL not running, then initialize the database
@@ -443,6 +444,12 @@ if (($::INIT) && ($::xcatrunningmysql == 0))
#
&createcfgloc;
+ if ($::HOSTFILE)
+ {
+ &addhosts;
+ $hostfile_configured=1
+ }
+
#
# Restore backed up database into MySQL
#
@@ -481,7 +488,7 @@ if ($::SETUPLL)
# if input a list of hosts to add to the database, to give access to MySQL
-if ($::HOSTFILE)
+if (($::HOSTFILE) && ($hostfile_configured == 0))
{
&addhosts;
diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh
index 89e4ff0a6..666f51d97 100644
--- a/xCAT-client/bin/xdsh
+++ b/xCAT-client/bin/xdsh
@@ -13,7 +13,7 @@ use File::Basename;
use Cwd;
use Socket;
-#use Data::Dumper;
+use Data::Dumper;
use Getopt::Long;
require xCAT::MsgUtils;
require xCAT::DSHCLI;
@@ -195,6 +195,11 @@ if ($ENV{'DSH_VERIFY'})
push(@{ $cmdref->{env} }, "DSH_VERIFY=$ENV{'DSH_VERIFY'}");
}
+if ($ENV{'XCAT_OSIMAGE_ENV'})
+{
+ push(@{ $cmdref->{env} }, "XCAT_OSIMAGE_ENV=$ENV{'XCAT_OSIMAGE_ENV'}");
+}
+
xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response);
exit $xCAT::Client::EXITCODE;
diff --git a/xCAT-client/pods/man1/nodestat.1.pod b/xCAT-client/pods/man1/nodestat.1.pod
index fd964a3c9..e7a82a232 100644
--- a/xCAT-client/pods/man1/nodestat.1.pod
+++ b/xCAT-client/pods/man1/nodestat.1.pod
@@ -4,7 +4,7 @@ B - display the running status of each node in a noderange
=head1 B
-B [I] [B<-m>|B<--usemon>] [B<-p>|B<--powerstat>] [B<-f>] [B<-u>|B<--updatedb>]
+B [I] [B<-m>|B<--usemon>] [B<-p>|B<--powerstat>] [B<-f>|B<--usefping>] [B<-u>|B<--updatedb>]
B [B<-h>|B<--help>|B<-v>|B<--version>]
@@ -57,7 +57,7 @@ For the command specified by 'dcmd', no input is needed, the output can be a str
=over 10
-=item B<-f>
+=item B<-f>|B<--usefping>
Uses fping instead of nmap even if nmap is available. If you seem to be having a problem with false negatives, fping can be more forgiving, but slower.
diff --git a/xCAT-client/pods/man1/rcons.1.pod b/xCAT-client/pods/man1/rcons.1.pod
index 06c21f3f5..1ecd3e409 100644
--- a/xCAT-client/pods/man1/rcons.1.pod
+++ b/xCAT-client/pods/man1/rcons.1.pod
@@ -16,7 +16,7 @@ multiple read-only instances of the console, plus console logging.
If I is specified, the conserver daemon on that host will be contacted, instead of on the local host.
-To exit the console session, enter: e c .
+To exit the console session, enter: 'ctrl-e c .' (3 characters: ctrl-e, 'c' and '.').
For confluent backed consoles, an extended outage of connectivity to the endpoint will result in an automated retry
of a randomized interval between 2 to 4 minutes. You can either close and reopen the console to force a quicker
diff --git a/xCAT-probe/lib/perl/probe_utils.pm b/xCAT-probe/lib/perl/probe_utils.pm
index d9e93a84c..f8c1b2209 100644
--- a/xCAT-probe/lib/perl/probe_utils.pm
+++ b/xCAT-probe/lib/perl/probe_utils.pm
@@ -179,6 +179,24 @@ sub is_static_ip {
my $os = get_os();
my $rst = 0;
+ `which nmcli > /dev/null 2>&1`;
+ unless ($?) {
+ my $device_connection = `nmcli device show $nic 2>&1 | grep GENERAL.CONNECTION`;
+ my $net_name;
+ if ($device_connection =~ /GENERAL.CONNECTION:\s*(.+)/) {
+ $net_name = $1;
+ }
+ if ($net_name) {
+ my $ipv4_method = `nmcli con show "$net_name" 2>&1 | grep -E 'ipv4.method'`;
+ unless ($?) {
+ if ($ipv4_method =~ /manual/) {
+ $rst = 1;
+ }
+ return $rst;
+ }
+ }
+ }
+
if ($os =~ /redhat/) {
my $output1 = `cat /etc/sysconfig/network-scripts/ifcfg-$nic 2>&1 |grep -i IPADDR`;
my $output2 = `cat /etc/sysconfig/network-scripts/ifcfg-$nic 2>&1 |grep -i BOOTPROTO`;
diff --git a/xCAT-probe/subcmds/switch_macmap b/xCAT-probe/subcmds/switch_macmap
index 2b4757177..ef4db81bc 100755
--- a/xCAT-probe/subcmds/switch_macmap
+++ b/xCAT-probe/subcmds/switch_macmap
@@ -53,13 +53,6 @@ if ($help) {
exit 0;
}
-if (!-d "$currdir/bin") {
- mkpath("$currdir/bin/");
-}
-if (!-e "$currdir/bin/switchprobe") {
- link("$::XCATROOT/bin/xcatclient", "$currdir/bin/switchprobe");
-}
-
if ($test) {
`$currdir/bin/switchprobe -h`;
if ($?) {
diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn
index 2cabc7013..b4735a5bd 100755
--- a/xCAT-probe/subcmds/xcatmn
+++ b/xCAT-probe/subcmds/xcatmn
@@ -13,20 +13,20 @@ use File::Copy;
use Data::Dumper;
use Getopt::Long qw(:config no_ignore_case);
-my $help = 0; #command line attribute '-h', get usage information
-my $test = 0; #command line attribute '-T'
-my $hierarchy = 0;
-my $verbose = 0; #command line attribute '-V'
-my $noderange; #command line attribute '-n'
-my $output = "stdout"; #used by probe_utils->send_msg("$output", "o", "xxxxxxxxxx"); print output to STDOUT
-my $rst = 0; #the exit code of current command
-my $terminal = 0; #means get INT signal from STDIN
+my $help = 0; #command line attribute '-h', get usage information
+my $test = 0; #command line attribute '-T'
+my $hierarchy = 0;
+my $verbose = 0; #command line attribute '-V'
+my $noderange; #command line attribute '-n'
+my $output = "stdout"; #used by probe_utils->send_msg("$output", "o", "xxxxxxxxxx"); print output to STDOUT
+my $rst = 0; #the exit code of current command
+my $terminal = 0; #means get INT signal from STDIN
my $installnic;
-#save all output from commands running on SNs and MN
-# one example:
-# $summaryoutput{mn} = @mn_output_history
-# $summaryoutput{SN1} = @SN1_output_history
+# Save all output from commands running on SNs and MN
+# Example:
+# $summaryoutput{mn} = @mn_output_history
+# $summaryoutput{SN1} = @SN1_output_history
my %summaryoutput;
my $is_sn;
@@ -1134,12 +1134,26 @@ sub check_network_parameter {
return ($rst, $rst_type);
}
+sub get_attribute_value {
+ my $table = shift;
+ my $attr = shift;
+
+ my $cmd_value = "";
+ my $command_info = `lsdef -t $table -i $attr -c 2>&1`;
+ if ($command_info =~ /$attr=(\d+)/) {
+ $cmd_value = $1
+ }
+ print_check_result("Checking $table table attribute... $attr=$cmd_value", 0, 0, \@error);
+ return $cmd_value
+}
+
+
sub check_daemon_attributes {
my $checkpoint_ref = shift;
my $error_ref = shift;
my $rst = 0;
$rst_type = "w";
-
+ my $node_limit = 500;
$$checkpoint_ref = "Checking xCAT daemon attributes configuration...";
@$error_ref = ();
@@ -1147,27 +1161,20 @@ sub check_daemon_attributes {
chomp($node_num);
my $xcatmaxconnections = 64;
my $xcatmaxbatchconnections = 50;
-
- my @site_max_info = `lsdef -t site -i xcatmaxconnections,xcatmaxbatchconnections -c 2>&1`;
- foreach my $site_max (@site_max_info) {
- if ($site_max =~ /xcatmaxconnections=(\d+)/) {
- $xcatmaxconnections_site = $1;
- }
- if ($site_max =~ /xcatmaxbatchconnections=(\d+)/) {
- $xcatmaxbatchconnections_site = $1;
+ my $xcatmaxconnections_site = get_attribute_value("site","xcatmaxconnections");
+ my $xcatmaxbatchconnections_site = get_attribute_value("site","xcatmaxbatchconnections");
+ if ($xcatmaxconnections_site != "" and $xcatmaxbatchconnections_site != "") {
+ if ($xcatmaxbatchconnections_site > $xcatmaxconnections_site) {
+ push @$error_ref, "Error: xcatmaxbatchconnections > xcatmaxconnections";
+ $rst = 1;
+ $rst_type = "f";
+ } elsif ($xcatmaxconnections_site < $xcatmaxconnections or
+ $xcatmaxbatchconnections_site < $xcatmaxbatchconnections and
+ $node_num >= $node_limit) {
+ push @$error_ref, "Detected >= $node_limnit nodes, refer to xCAT documentation for xCAT daemon tuning recommendations.";
+ $rst = 1;
}
}
-
- if ($xcatmaxconnections_site <= $xcatmaxbatchconnections_site) {
- push @$error_ref, "Attribute xcatmaxbatchconnections must be less than xcatmaxconnections.";
- $rst = 1;
- $rst_type = "f";
- } elsif ($xcatmaxconnections_site < $xcatmaxconnections or
- $xcatmaxbatchconnections_site < $xcatmaxbatchconnections and
- $node_num >= 500) {
- push @$error_ref, "Management nodes are more than 500, please tuning xCAT daemon attributes as document";
- $rst = 1;
- }
return ($rst, $rst_type);
}
diff --git a/xCAT-probe/xCAT-probe.spec b/xCAT-probe/xCAT-probe.spec
index c46700694..d2cd0243f 100644
--- a/xCAT-probe/xCAT-probe.spec
+++ b/xCAT-probe/xCAT-probe.spec
@@ -61,5 +61,18 @@ rm -rf $RPM_BUILD_ROOT
- "Create xCAT probe package"
%post
+if [ -e %{prefix}/probe/subcmds/bin/switchprobe ]; then
+ rm -rf %{prefix}/probe/subcmds/bin/switchprobe
+else
+ mkdir -p %{prefix}/probe/subcmds/bin/
+fi
+cd %{prefix}/probe/subcmds/bin/
+if [ -e %{prefix}/bin/xcatclient ]; then
+ ln -s %{prefix}/bin/xcatclient switchprobe
+fi
%preun
+#remove the bin directory if not on upgrade
+if [ "$1" != "1" ]; then
+ rm -rf %{prefix}/probe/subcmds/bin/
+fi
diff --git a/xCAT-server/lib/perl/xCAT/AGENT.pm b/xCAT-server/lib/perl/xCAT/AGENT.pm
new file mode 100644
index 000000000..f62125615
--- /dev/null
+++ b/xCAT-server/lib/perl/xCAT/AGENT.pm
@@ -0,0 +1,198 @@
+#!/usr/bin/perl
+## IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html
+
+package xCAT::AGENT;
+
+BEGIN
+{
+ $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
+}
+use lib "$::XCATROOT/lib/perl";
+use strict;
+use warnings "all";
+
+use JSON;
+use Time::HiRes qw(sleep time);
+use File::Path;
+use Fcntl ":flock";
+use IO::Socket::UNIX qw( SOCK_STREAM );
+use xCAT_monitoring::monitorctrl;
+use xCAT::TableUtils;
+
+my $LOCK_DIR = "/var/lock/xcat/";
+my $LOCK_PATH = "/var/lock/xcat/agent.lock";
+my $AGENT_SOCK_PATH = "/var/run/xcat/agent.sock";
+my $PYTHON_LOG_PATH = "/var/log/xcat/agent.log";
+my $PYTHON_AGENT_FILE = "/opt/xcat/lib/python/agent/agent.py";
+my $MSG_TYPE = "message";
+my $DB_TYPE = "db";
+my $lock_fd;
+
+my %module_type = (
+ "openbmc" => "OpenBMC",
+ "redfish" => "Redfish",
+);
+
+sub acquire_lock {
+ my $ppid = shift;
+ $ppid = shift if (($ppid) && ($ppid =~ /AGENT/));
+
+ mkpath($LOCK_DIR);
+ # always create a new lock file
+ if ($ppid) {
+ $LOCK_PATH = "$LOCK_PATH.$ppid";
+ $AGENT_SOCK_PATH = "$AGENT_SOCK_PATH.$ppid";
+ }
+ unlink($LOCK_PATH);
+ open($lock_fd, ">>", $LOCK_PATH) or return undef;
+ flock($lock_fd, LOCK_EX) or return undef;
+ return $lock_fd;
+}
+
+sub exists_python_agent {
+ if ( -e $PYTHON_AGENT_FILE) {
+ return 1;
+ }
+ return 0;
+}
+
+sub python_agent_reaper {
+ unlink($LOCK_PATH);
+ unlink($AGENT_SOCK_PATH);
+}
+
+sub start_python_agent {
+ my $ppid = shift;
+ $ppid = shift if (($ppid) && ($ppid =~ /AGENT/));
+
+ if (!defined(acquire_lock($ppid))) {
+ xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to acquire lock");
+ return undef;
+ }
+
+ my $fd;
+ my $pid = fork;
+ if (!defined $pid) {
+ xCAT::MsgUtils->message("S", "start_python_agent() Error: Unable to fork process");
+ return undef;
+ } elsif ($pid){
+ open($fd, '>', $AGENT_SOCK_PATH) && close($fd);
+ $SIG{INT} = $SIG{TERM} = \&python_agent_reaper;
+ return $pid;
+ }
+
+ $SIG{CHLD} = 'DEFAULT';
+ if (!$pid) {
+ # child
+ open($fd, ">>", $PYTHON_LOG_PATH) && close($fd);
+ open(STDOUT, '>>', $PYTHON_LOG_PATH) or die("open: $!");
+ open(STDERR, '>>&', \*STDOUT) or die("open: $!");
+ my @args = ( "$PYTHON_AGENT_FILE --sock $AGENT_SOCK_PATH --lockfile $LOCK_PATH" );
+ my $ret = exec @args;
+ if (!defined($ret)) {
+ xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to start the xCAT Python agent.");
+ exit(1);
+ }
+ }
+}
+
+sub handle_message {
+ my ($data, $callback) = @_;
+ if($data->{type} eq $MSG_TYPE) {
+ my $msg = $data->{msg};
+ if ($msg->{type} eq 'info') {
+ xCAT::MsgUtils->message("I", { data => [$msg->{data}] }, $callback);
+ } elsif ($msg->{type} eq 'warning') {
+ xCAT::MsgUtils->message("W", { data => [$msg->{data}] }, $callback);
+ } elsif ($msg->{type} eq 'error'){
+ xCAT::SvrUtils::sendmsg([ 1, $msg->{data} ], $callback, $msg->{node});
+ } elsif ($msg->{type} eq 'syslog'){
+ xCAT::MsgUtils->message("S", $msg->{data});
+ }
+ } elsif ($data->{type} eq $DB_TYPE) {
+ my $attribute = $data->{attribute};
+ if ($attribute->{name} eq 'status' and $attribute->{method} eq 'set' and $attribute->{type} eq 'node') {
+ my %new_status = ($attribute->{value} => [$attribute->{node}]);
+ xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%new_status, 1)
+ }
+ }
+}
+
+sub submit_agent_request {
+ my ($pid, $req, $module, $nodeinfo, $callback) = @_;
+ my $sock;
+ my $retry = 0;
+ while($retry < 30) {
+ $sock = IO::Socket::UNIX->new(Peer => $AGENT_SOCK_PATH, Type => SOCK_STREAM, Timeout => 10, Blocking => 1);
+ if (!defined($sock)) {
+ sleep(0.1);
+ } else {
+ last;
+ }
+ $retry++;
+ }
+ if (!defined($sock)) {
+ xCAT::MsgUtils->message("E", { data => ["$module_type{$module} management is using a Python framework. An error has occurred when trying to create socket $AGENT_SOCK_PATH."] }, $callback);
+ kill('TERM', $pid);
+ return;
+ }
+ my $xcatdebugmode = 0;
+ if ($::XCATSITEVALS{xcatdebugmode}) { $xcatdebugmode = $::XCATSITEVALS{xcatdebugmode} }
+ my %env_hash = ();
+ $env_hash{debugmode} = $xcatdebugmode;
+ my ($data, $sz, $ret, $buf);
+ $data->{module} = $module;
+ $data->{command} = $req->{command}->[0];
+ $data->{args} = $req->{arg};
+ $data->{cwd} = $req->{cwd};
+ $data->{nodes} = $req->{node};
+ $data->{nodeinfo} = $nodeinfo;
+ $data->{envs} = \%env_hash;
+ $buf = encode_json($data);
+ $sz = pack('i', length($buf));
+ # send length of data first
+ $ret = $sock->send($sz);
+ if (!$ret) {
+ xCAT::MsgUtils->message("E", { data => ["Failed to send message to the agent"] }, $callback);
+ $sock->close();
+ kill('TERM', $pid);
+ return;
+ }
+ # send data
+ $ret = $sock->send($buf);
+ if (!$ret) {
+ xCAT::MsgUtils->message("E", { data => ["Failed to send message to the agent"] }, $callback);
+ $sock->close();
+ kill('TERM', $pid);
+ return;
+ }
+ while(1) {
+ $ret = $sock->recv($buf, 4);
+ if (!$ret) {
+ last;
+ }
+ # receive the length of data
+ $sz = unpack('i', $buf);
+ # read data with length is $sz
+ $ret = $sock->recv($buf, $sz);
+ if (!$ret) {
+ xCAT::MsgUtils->message("E", { data => ["receive data from python agent unexpectedly"] }, $callback);
+ last;
+ }
+ $data = decode_json($buf);
+ handle_message($data, $callback);
+ }
+ # no message received, the socket on the agent side should be closed.
+ $sock->close();
+}
+
+sub wait_agent {
+ my ($pid, $callback) = @_;
+ waitpid($pid, 0);
+ if ($? >> 8 != 0) {
+ xCAT::MsgUtils->message("E", { data => ["Agent exited unexpectedly. See $PYTHON_LOG_PATH for details."] }, $callback);
+ }
+ python_agent_reaper();
+}
+
+1;
diff --git a/xCAT-server/lib/perl/xCAT/OPENBMC.pm b/xCAT-server/lib/perl/xCAT/OPENBMC.pm
index 2061a191a..83ceafed2 100644
--- a/xCAT-server/lib/perl/xCAT/OPENBMC.pm
+++ b/xCAT-server/lib/perl/xCAT/OPENBMC.pm
@@ -19,19 +19,10 @@ use Data::Dumper;
use Time::HiRes qw(sleep time);
use JSON;
use File::Path;
-use Fcntl ":flock";
-use IO::Socket::UNIX qw( SOCK_STREAM );
use xCAT_monitoring::monitorctrl;
use xCAT::TableUtils;
-my $LOCK_DIR = "/var/lock/xcat/";
-my $LOCK_PATH = "/var/lock/xcat/agent.lock";
-my $AGENT_SOCK_PATH = "/var/run/xcat/agent.sock";
-my $PYTHON_LOG_PATH = "/var/log/xcat/agent.log";
my $PYTHON_AGENT_FILE = "/opt/xcat/lib/python/agent/agent.py";
-my $MSG_TYPE = "message";
-my $DB_TYPE = "db";
-my $lock_fd;
my $header = HTTP::Headers->new('Content-Type' => 'application/json');
@@ -59,172 +50,6 @@ sub send_request {
return $id;
}
-# if lock is released unexpectedly, python side would aware of the error after
-# getting this lock
-sub acquire_lock {
- my $ppid = shift;
- $ppid = shift if (($ppid) && ($ppid =~ /OPENBMC/));
-
- mkpath($LOCK_DIR);
- # always create a new lock file
- if ($ppid) {
- $LOCK_PATH = "$LOCK_PATH.$ppid";
- $AGENT_SOCK_PATH = "$AGENT_SOCK_PATH.$ppid";
- }
- unlink($LOCK_PATH);
- open($lock_fd, ">>", $LOCK_PATH) or return undef;
- flock($lock_fd, LOCK_EX) or return undef;
- return $lock_fd;
-}
-
-sub exists_python_agent {
- if ( -e $PYTHON_AGENT_FILE) {
- return 1;
- }
- return 0;
-}
-sub python_agent_reaper {
- unlink($LOCK_PATH);
- unlink($AGENT_SOCK_PATH);
-}
-sub start_python_agent {
-
- my $ppid = shift;
- $ppid = shift if (($ppid) && ($ppid =~ /OPENBMC/));
-
- if (!defined(acquire_lock($ppid))) {
- xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to acquire lock");
- return undef;
- }
-
- my $fd;
- my $pid = fork;
- if (!defined $pid) {
- xCAT::MsgUtils->message("S", "start_python_agent() Error: Unable to fork process");
- return undef;
- } elsif ($pid){
-
- open($fd, '>', $AGENT_SOCK_PATH) && close($fd);
- $SIG{INT} = $SIG{TERM} = \&python_agent_reaper;
- return $pid;
- }
-
- $SIG{CHLD} = 'DEFAULT';
- if (!$pid) {
- # child
- open($fd, ">>", $PYTHON_LOG_PATH) && close($fd);
- open(STDOUT, '>>', $PYTHON_LOG_PATH) or die("open: $!");
- open(STDERR, '>>&', \*STDOUT) or die("open: $!");
- my @args = ( "$PYTHON_AGENT_FILE --sock $AGENT_SOCK_PATH --lockfile $LOCK_PATH" );
- my $ret = exec @args;
- if (!defined($ret)) {
- xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to start the xCAT Python agent.");
- exit(1);
- }
- }
-
-}
-
-sub handle_message {
- my ($data, $callback) = @_;
- if($data->{type} eq $MSG_TYPE) {
- my $msg = $data->{msg};
- if ($msg->{type} eq 'info') {
- xCAT::MsgUtils->message("I", { data => [$msg->{data}] }, $callback);
- } elsif ($msg->{type} eq 'warning') {
- xCAT::MsgUtils->message("W", { data => [$msg->{data}] }, $callback);
- } elsif ($msg->{type} eq 'error'){
- xCAT::SvrUtils::sendmsg([ 1, $msg->{data} ], $callback, $msg->{node});
- } elsif ($msg->{type} eq 'syslog'){
- xCAT::MsgUtils->message("S", $msg->{data});
- }
- } elsif ($data->{type} eq $DB_TYPE) {
- my $attribute = $data->{attribute};
- if ($attribute->{name} eq 'status' and $attribute->{method} eq 'set' and $attribute->{type} eq 'node') {
- my %new_status = ($attribute->{value} => [$attribute->{node}]);
- xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%new_status, 1)
- }
- }
-}
-
-sub submit_agent_request {
- my ($pid, $req, $nodeinfo, $callback) = @_;
- my $sock;
- my $retry = 0;
- while($retry < 30) {
- $sock = IO::Socket::UNIX->new(Peer => $AGENT_SOCK_PATH, Type => SOCK_STREAM, Timeout => 10, Blocking => 1);
- if (!defined($sock)) {
- sleep(0.1);
- } else {
- last;
- }
- $retry++;
- }
- if (!defined($sock)) {
- xCAT::MsgUtils->message("E", { data => ["OpenBMC management is using a Python framework. An error has occurred when trying to create socket $AGENT_SOCK_PATH."] }, $callback);
- kill('TERM', $pid);
- return;
- }
- my $xcatdebugmode = 0;
- if ($::XCATSITEVALS{xcatdebugmode}) { $xcatdebugmode = $::XCATSITEVALS{xcatdebugmode} }
- my %env_hash = ();
- $env_hash{debugmode} = $xcatdebugmode;
- my ($data, $sz, $ret, $buf);
- $data->{module} = 'openbmc';
- $data->{command} = $req->{command}->[0];
- $data->{args} = $req->{arg};
- $data->{cwd} = $req->{cwd};
- $data->{nodes} = $req->{node};
- $data->{nodeinfo} = $nodeinfo;
- $data->{envs} = \%env_hash;
- $buf = encode_json($data);
- $sz = pack('i', length($buf));
- # send length of data first
- $ret = $sock->send($sz);
- if (!$ret) {
- xCAT::MsgUtils->message("E", { data => ["Failed to send message to the agent"] }, $callback);
- $sock->close();
- kill('TERM', $pid);
- return;
- }
- # send data
- $ret = $sock->send($buf);
- if (!$ret) {
- xCAT::MsgUtils->message("E", { data => ["Failed to send message to the agent"] }, $callback);
- $sock->close();
- kill('TERM', $pid);
- return;
- }
- while(1) {
- $ret = $sock->recv($buf, 4);
- if (!$ret) {
- last;
- }
- # receive the length of data
- $sz = unpack('i', $buf);
- # read data with length is $sz
- $ret = $sock->recv($buf, $sz);
- if (!$ret) {
- xCAT::MsgUtils->message("E", { data => ["receive data from python agent unexpectedly"] }, $callback);
- last;
- }
- $data = decode_json($buf);
- handle_message($data, $callback);
- }
- # no message received, the socket on the agent side should be closed.
- $sock->close();
-}
-
-sub wait_agent {
- my ($pid, $callback) = @_;
- waitpid($pid, 0);
- if ($? >> 8 != 0) {
- xCAT::MsgUtils->message("E", { data => ["Agent exited unexpectedly. See $PYTHON_LOG_PATH for details."] }, $callback);
- xCAT::MsgUtils->message("I", { data => ["To revert to Perl framework: chdef -t site clustersite openbmcperl=ALL"] }, $callback);
- }
- python_agent_reaper();
-}
-
#--------------------------------------------------------------------------------
=head3 run_cmd_in_perl
diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm
index 7fe50d925..553892415 100644
--- a/xCAT-server/lib/perl/xCAT/Postage.pm
+++ b/xCAT-server/lib/perl/xCAT/Postage.pm
@@ -18,6 +18,7 @@ use xCAT::Template;
use xCAT::SvrUtils;
use xCAT::Zone;
+use Data::Dumper;
use File::Basename;
use Socket;
use strict;
@@ -319,7 +320,7 @@ sub makescript {
#%image_hash is used to store the attributes in linuximage and nimimage tabs
my %image_hash;
- getImage(\%image_hash);
+ getImage(\%image_hash);
# get postscript and postscript from postscripts and osimage tabs
my $script_hash = xCAT::Postage::getScripts($nodes, \%image_hash);
@@ -512,6 +513,16 @@ sub makescript {
$osimgname = $provmethod;
}
+
+ if($image_hash{$osimgname}{'environvar'}){
+ my $myenvstr=$image_hash{$osimgname}{'environvar'};
+ foreach my $myenv(split(',',$myenvstr)){
+ if($myenv =~ /\s*(\S+)\s*=\s*(\S+)\s*/) {
+ $ENV{$1}=$2;
+ }
+ }
+ }
+
my $osimage_vars;
$osimage_vars = getImageitems_for_node($node, \%image_hash, $nodesetstate);
@@ -1114,7 +1125,7 @@ sub getImage
if ($^O =~ /^linux/i) {
my $linuximagetab = xCAT::Table->new('linuximage', -create => 1);
- my @et2 = $linuximagetab->getAllAttribs('imagename', 'pkglist', 'pkgdir', 'otherpkglist', 'otherpkgdir');
+ my @et2 = $linuximagetab->getAllAttribs('imagename', 'pkglist', 'pkgdir', 'otherpkglist', 'otherpkgdir','environvar');
if (@et2) {
foreach my $tmp_et2 (@et2) {
my $imagename = $tmp_et2->{imagename};
@@ -1122,6 +1133,7 @@ sub getImage
$image_hash->{$imagename}->{pkgdir} = $tmp_et2->{pkgdir};
$image_hash->{$imagename}->{otherpkglist} = $tmp_et2->{otherpkglist};
$image_hash->{$imagename}->{otherpkgdir} = $tmp_et2->{otherpkgdir};
+ $image_hash->{$imagename}->{environvar} = $tmp_et2->{environvar};
}
}
}
@@ -1190,6 +1202,11 @@ sub getImageitems_for_node
$result .= "export OTHERPKGDIR\n";
}
}
+ if ($ref1->{'environvar'}){
+ foreach my $myenvar(split(',',$ref1->{'environvar'})){
+ $result .='export '.$myenvar."\n";
+ }
+ }
}
}
else
@@ -1813,6 +1830,8 @@ sub includefile
my $file = shift;
my $idir = shift;
my @text = ();
+
+ $file=xCAT::Utils->varsubinline($file,\%ENV);
unless ($file =~ /^\//)
{
$file = $idir . "/" . $file;
@@ -1948,7 +1967,7 @@ sub getScripts
$script_hash{default_postboot} = $et->{'postbootscripts'};
- my @et2 = $ostab->getAllAttribs('imagename', 'postscripts', 'postbootscripts', 'osvers', 'osarch', 'profile', 'provmethod', 'synclists', 'kitcomponents');
+ my @et2 = $ostab->getAllAttribs('imagename', 'postscripts', 'postbootscripts', 'osvers', 'osarch', 'profile', 'provmethod', 'synclists', 'kitcomponents','environvar');
if (@et2) {
foreach my $tmp_et2 (@et2) {
my $imagename = $tmp_et2->{imagename};
@@ -1959,6 +1978,7 @@ sub getScripts
$image_hash->{$imagename}->{profile} = $tmp_et2->{profile};
$image_hash->{$imagename}->{provmethod} = $tmp_et2->{provmethod};
$image_hash->{$imagename}->{synclists} = $tmp_et2->{synclists};
+ $image_hash->{$imagename}->{environvar} = $tmp_et2->{environvar};
$image_hash->{$imagename}->{kitcomponents} = $tmp_et2->{kitcomponents} if ($tmp_et2->{kitcomponents});
}
}
diff --git a/xCAT-server/lib/perl/xCAT/SvrUtils.pm b/xCAT-server/lib/perl/xCAT/SvrUtils.pm
index 37dab6083..a82c7d422 100755
--- a/xCAT-server/lib/perl/xCAT/SvrUtils.pm
+++ b/xCAT-server/lib/perl/xCAT/SvrUtils.pm
@@ -452,37 +452,59 @@ sub get_file_name {
#usally there're only 4 arguments passed for this function
#the $genos is only used for the Redhat family
- my $dotpos = rindex($os, ".");
- my $osbase = substr($os, 0, $dotpos);
#handle the following ostypes: sles10.2, sles11.1, rhels5.3, rhels5.4, etc
if (-r "$searchpath/$profile.$os.$arch.$extension") {
return "$searchpath/$profile.$os.$arch.$extension";
}
- elsif (-r "$searchpath/$profile.$os.$extension") {
+ if (-r "$searchpath/$profile.$os.$extension") {
return "$searchpath/$profile.$os.$extension";
}
- elsif (($genos) && (-r "$searchpath/$profile.$genos.$arch.$extension")) {
+ if (($genos) && (-r "$searchpath/$profile.$genos.$arch.$extension")) {
return "$searchpath/$profile.$genos.$arch.$extension";
}
- elsif (($genos) && (-r "$searchpath/$profile.$genos.$extension")) {
+ if (($genos) && (-r "$searchpath/$profile.$genos.$extension")) {
return "$searchpath/$profile.$genos.$extension";
}
+
+ my $dotpos = rindex($os, ".");
+ my $osbase = substr($os, 0, $dotpos);
# If the osimge name was specified with -n, the name might contain multiple "."
# Chop them off one at a time until filename match is found
- else {
- while ($dotpos > 0) {
+ while ($dotpos > 0) {
+ if (-r "$searchpath/$profile.$osbase.$arch.$extension") {
+ return "$searchpath/$profile.$osbase.$arch.$extension";
+ }
+ if (-r "$searchpath/$profile.$osbase.$extension") {
+ return "$searchpath/$profile.$osbase.$extension";
+ }
+ # Chop off "." from the end and try again
+ $dotpos = rindex($osbase, ".");
+ $osbase = substr($osbase, 0, $dotpos);
+ }
- if (-r "$searchpath/$profile.$osbase.$arch.$extension") {
- return "$searchpath/$profile.$osbase.$arch.$extension";
- }
- elsif (-r "$searchpath/$profile.$osbase.$extension") {
- return "$searchpath/$profile.$osbase.$extension";
- }
- # Chop off "." from the end and try again
- $dotpos = rindex($osbase, ".");
- $osbase = substr($osbase, 0, $dotpos);
+ #if there are no '.', pick the two numbers follow by leading string, like sles11
+ #then pick one number follow by leading string, like centos7, rhels7
+ if ($os =~ m/([a-zA-Z]+\d\d)/)
+ {
+ $osbase=$1;
+ if (-r "$searchpath/$profile.$osbase.$arch.$extension") {
+ return "$searchpath/$profile.$osbase.$arch.$extension";
+ }
+ if (-r "$searchpath/$profile.$osbase.$extension") {
+ return "$searchpath/$profile.$osbase.$extension";
+ }
+ }
+
+ if ($os =~ m/([a-zA-Z]+\d)/)
+ {
+ $osbase = $1;
+ if (-r "$searchpath/$profile.$osbase.$arch.$extension") {
+ return "$searchpath/$profile.$osbase.$arch.$extension";
+ }
+ if (-r "$searchpath/$profile.$osbase.$extension") {
+ return "$searchpath/$profile.$osbase.$extension";
}
}
@@ -490,12 +512,11 @@ sub get_file_name {
if (-r "$searchpath/$profile.$arch.$extension") {
return "$searchpath/$profile.$arch.$extension";
}
- elsif (-r "$searchpath/$profile.$extension") {
+ if (-r "$searchpath/$profile.$extension") {
return "$searchpath/$profile.$extension";
}
- else {
- return undef;
- }
+
+ return undef;
}
sub get_tmpl_file_name {
@@ -541,24 +562,60 @@ sub get_postinstall_file_name {
if (-x "$searchpath/$profile.$os.$arch.$extension") {
return "$searchpath/$profile.$os.$arch.$extension";
}
- elsif (-x "$searchpath/$profile.$osbase.$arch.$extension") {
+ if (-x "$searchpath/$profile.$osbase.$arch.$extension") {
return "$searchpath/$profile.$osbase.$arch.$extension";
}
- elsif (-x "$searchpath/$profile.$os.$extension") {
+ if (-x "$searchpath/$profile.$os.$extension") {
return "$searchpath/$profile.$os.$extension";
}
- elsif (-x "$searchpath/$profile.$osbase.$extension") {
+ if (-x "$searchpath/$profile.$osbase.$extension") {
return "$searchpath/$profile.$osbase.$extension";
}
- elsif (-x "$searchpath/$profile.$arch.$extension") {
+ # If the osimge name was specified with -n, the name might contain multiple "."
+ # Chop them off one at a time until filename match is found
+ while ($dotpos > 0) {
+ if (-x "$searchpath/$profile.$osbase.$arch.$extension") {
+ return "$searchpath/$profile.$osbase.$arch.$extension";
+ }
+ if (-x "$searchpath/$profile.$osbase.$extension") {
+ return "$searchpath/$profile.$osbase.$extension";
+ }
+ # Chop off "." from the end and try again
+ $dotpos = rindex($osbase, ".");
+ $osbase = substr($osbase, 0, $dotpos);
+ }
+
+ #if there are no '.', pick the two numbers follow by leading string, like sles11
+ #then pick one number follow by leading string, like centos7, rhels7
+ if ($os =~ m/([a-zA-Z]+\d\d)/)
+ {
+ $osbase=$1;
+ if (-x "$searchpath/$profile.$osbase.$arch.$extension") {
+ return "$searchpath/$profile.$osbase.$arch.$extension";
+ }
+ if (-x "$searchpath/$profile.$osbase.$extension") {
+ return "$searchpath/$profile.$osbase.$extension";
+ }
+ }
+
+ if ($os =~ m/([a-zA-Z]+\d)/)
+ {
+ $osbase = $1;
+ if (-x "$searchpath/$profile.$osbase.$arch.$extension") {
+ return "$searchpath/$profile.$osbase.$arch.$extension";
+ }
+ if (-x "$searchpath/$profile.$osbase.$extension") {
+ return "$searchpath/$profile.$osbase.$extension";
+ }
+ }
+
+ if (-x "$searchpath/$profile.$arch.$extension") {
return "$searchpath/$profile.$arch.$extension";
}
- elsif (-x "$searchpath/$profile.$extension") {
+ if (-x "$searchpath/$profile.$extension") {
return "$searchpath/$profile.$extension";
}
- else {
- return undef;
- }
+ return undef;
}
diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm
index 1d311e20c..5ae850494 100644
--- a/xCAT-server/lib/perl/xCAT/Template.pm
+++ b/xCAT-server/lib/perl/xCAT/Template.pm
@@ -1491,6 +1491,7 @@ sub includefile
#2 means pattern list, pattern list starts with @,
#3 means remove package list, packages to be removed start with -.
my $text = "";
+ $file=xCAT::Utils->varsubinline($file,\%ENV);
unless ($file =~ /^\//) {
$file = $idir . "/" . $file;
}
@@ -1600,6 +1601,7 @@ sub crydb
};
$kp = $get_query_map->($key);
return undef if (!defined($kp));
+ return '*' if ($::XCATSITEVALS{secureroot} eq "1");
return xCAT::PasswordUtils::crypt_system_password($table, $kp, \@fields);
}
diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm
index fd2cd39ee..cc55830c2 100644
--- a/xCAT-server/lib/xcat/plugins/anaconda.pm
+++ b/xCAT-server/lib/xcat/plugins/anaconda.pm
@@ -18,7 +18,6 @@ use xCAT::MsgUtils;
use xCAT::SvrUtils;
use xCAT::Yum;
-#use Data::Dumper;
use Getopt::Long;
Getopt::Long::Configure("bundling");
Getopt::Long::Configure("pass_through");
@@ -959,12 +958,13 @@ sub mkinstall
if (!$osimagetab) {
$osimagetab = xCAT::Table->new('osimage', -create => 1);
}
- (my $ref) = $osimagetab->getAttribs({ imagename => $imagename }, 'osvers', 'osarch', 'profile', 'provmethod', 'osupdatename');
+ (my $ref) = $osimagetab->getAttribs({ imagename => $imagename }, 'osvers', 'osarch', 'profile', 'provmethod', 'osupdatename','environvar');
if ($ref) {
$img_hash{$imagename}->{osver} = $ref->{'osvers'};
$img_hash{$imagename}->{osarch} = $ref->{'osarch'};
$img_hash{$imagename}->{profile} = $ref->{'profile'};
$img_hash{$imagename}->{provmethod} = $ref->{'provmethod'};
+ $img_hash{$imagename}->{environvar} = $ref->{'environvar'};
if (!$linuximagetab) {
$linuximagetab = xCAT::Table->new('linuximage', -create => 1);
}
@@ -1177,6 +1177,15 @@ sub mkinstall
} else {
$tmperr = "Unable to find template in /install/custom/install/$platform or $::XCATROOT/share/xcat/install/$platform (for $profile/$os/$arch combination)";
}
+
+ if($img_hash{$imagename}->{environvar}){
+ foreach my $myenv(split(',',$img_hash{$imagename}->{'environvar'})){
+ if($myenv =~ /\s*(\S+)\s*=\s*(\S+)\s*/) {
+ $ENV{$1}=$2;
+ }
+ }
+ }
+
if (-r "$tmplfile")
{
$tmperr =
diff --git a/xCAT-server/lib/xcat/plugins/credentials.pm b/xCAT-server/lib/xcat/plugins/credentials.pm
index f613f0152..f046deaeb 100644
--- a/xCAT-server/lib/xcat/plugins/credentials.pm
+++ b/xCAT-server/lib/xcat/plugins/credentials.pm
@@ -33,6 +33,7 @@ use IO::Socket::INET;
use Time::HiRes qw(sleep);
use xCAT::Utils;
+use xCAT::PasswordUtils;
use xCAT::MsgUtils;
use Getopt::Long;
@@ -316,6 +317,16 @@ sub process_request
}
$tfilename = "/etc/xcatdockerca/cert/dockerhost-cert.pem";
+ } elsif ($parm =~ /xcat_secure_pw:/) {
+ xCAT::MsgUtils->trace(0, 'I', "credentials: sending $parm to $client");
+ my @users=split(/:/,$parm);
+ if (defined($users[1]) and $users[1] eq 'root') {
+ my $pass = xCAT::PasswordUtils::crypt_system_password();
+ if ($pass) {
+ push @{$rsp->{'data'}}, { content => [ $pass ], desc => [ $parm ] };
+ }
+ }
+ next;
} else {
xCAT::MsgUtils->trace(0, 'W', "credentials: Not supported type: $parm");
next;
diff --git a/xCAT-server/lib/xcat/plugins/ddns.pm b/xCAT-server/lib/xcat/plugins/ddns.pm
index 2b6a1b2e3..f7d575a38 100644
--- a/xCAT-server/lib/xcat/plugins/ddns.pm
+++ b/xCAT-server/lib/xcat/plugins/ddns.pm
@@ -437,6 +437,10 @@ sub process_request {
xCAT::SvrUtils::sendmsg(":Ignoring line $_ in /etc/hosts, address seems malformed.", $callback);
next;
}
+ if ($addr =~ /(?:^|\.)0+(?=\d)/ and $addr !~ /^[abcdef0123456789:]+$/) {
+ xCAT::SvrUtils::sendmsg(":Ignoring line $_ in /etc/hosts, ip address octets can not contain leading zeroes.", $callback);
+ next;
+ }
unless ($names =~ /^[a-z0-9\. \t\n-]+$/i) {
xCAT::SvrUtils::sendmsg(":Ignoring line $_ in /etc/hosts, names $names contain invalid characters (valid characters include a through z, numbers and the '-', but not '_'", $callback);
next;
diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm
index 7fde6382a..370b270ad 100644
--- a/xCAT-server/lib/xcat/plugins/debian.pm
+++ b/xCAT-server/lib/xcat/plugins/debian.pm
@@ -768,7 +768,8 @@ sub mkinstall {
next;
}
- if ($arch =~ /ppc64/i and !(-e "$pkgdir/install/netboot/initrd.gz")) {
+ if ($arch =~ /ppc64/i and !(-e "$pkgdir/install/netboot/initrd.gz") and
+ !(-e "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz")) {
xCAT::MsgUtils->report_node_error($callback, $node,
"The network boot initrd.gz is not found in $pkgdir/install/netboot. This is provided by Ubuntu, please download and retry."
);
@@ -804,10 +805,16 @@ sub mkinstall {
)
) or (
$arch =~ /ppc64/i and (
- -r "$pkgdir/install/vmlinux"
- and $kernpath = "$pkgdir/install/vmlinux"
- and -r "$pkgdir/install/netboot/initrd.gz"
- and $initrdpath = "$pkgdir/install/netboot/initrd.gz"
+ (-r "$pkgdir/install/netboot/ubuntu-installer/$darch/vmlinux"
+ and $kernpath = "$pkgdir/install/netboot/ubuntu-installer/$darch/vmlinux"
+ and -r "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz"
+ and $initrdpath = "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz"
+ ) or
+ (-r "$pkgdir/install/vmlinux"
+ and $kernpath = "$pkgdir/install/vmlinux"
+ and -r "$pkgdir/install/netboot/initrd.gz"
+ and $initrdpath = "$pkgdir/install/netboot/initrd.gz"
+ )
)
)
)
diff --git a/xCAT-server/lib/xcat/plugins/genimage.pm b/xCAT-server/lib/xcat/plugins/genimage.pm
index c98a05720..69d0c4c6d 100644
--- a/xCAT-server/lib/xcat/plugins/genimage.pm
+++ b/xCAT-server/lib/xcat/plugins/genimage.pm
@@ -73,6 +73,7 @@ sub process_request {
my $dryrun;
my $ignorekernelchk;
my $noupdate;
+ my $envar;
GetOptions(
'a=s' => \$arch,
@@ -138,7 +139,7 @@ sub process_request {
return 1;
}
- (my $ref_osimage_tab) = $osimagetab->getAttribs({ imagename => $imagename }, 'osvers', 'osarch', 'profile', 'provmethod');
+ (my $ref_osimage_tab) = $osimagetab->getAttribs({ imagename => $imagename }, 'osvers', 'osarch', 'profile', 'provmethod','environvar');
unless ($ref_osimage_tab) {
$callback->({ error => ["Cannot find image \'$imagename\' from the osimage table."], errorcode => [1] });
return 1;
@@ -153,6 +154,7 @@ sub process_request {
$osver = $ref_osimage_tab->{'osvers'};
$arch = $ref_osimage_tab->{'osarch'};
$profile = $ref_osimage_tab->{'profile'};
+ $envar = $ref_osimage_tab->{'environvar'};
my $provmethod = $ref_osimage_tab->{'provmethod'}; # TODO: not necessary, and need to update both statelite and stateless modes
unless ($osver and $arch and $profile and $provmethod) {
@@ -318,7 +320,7 @@ sub process_request {
if ($kerneldir) { $cmd .= " --kerneldir $kerneldir"; }
if ($interactive) { $cmd .= " --interactive" }
if ($onlyinitrd) { $cmd .= " --onlyinitrd" }
-
+ if ($envar) { $cmd .= " --env $envar"; }
if ($srcdir) { $cmd .= " --srcdir \"$srcdir\""; }
if ($pkglist) { $cmd .= " --pkglist $pkglist"; }
if ($srcdir_otherpkgs) { $cmd .= " --otherpkgdir \"$srcdir_otherpkgs\""; }
diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm
index 2a8e563c7..80b71e6e2 100644
--- a/xCAT-server/lib/xcat/plugins/ipmi.pm
+++ b/xCAT-server/lib/xcat/plugins/ipmi.pm
@@ -50,6 +50,7 @@ my $xcatdebugmode = 0;
my $IPMIXCAT = "/opt/xcat/bin/ipmitool-xcat";
my $NON_BLOCK = 1;
+my $BIG_DATA_MACHINE_MODELS = "8001-22C|9006-22C|5104-22C|8001-12C|9006-12C";
use constant RFLASH_LOG_DIR => "/var/log/xcat/rflash";
if (-d RFLASH_LOG_DIR) {
chmod 0700, RFLASH_LOG_DIR;
@@ -1983,7 +1984,7 @@ sub do_firmware_update {
# P9 Boston (9006-22C, 9006-12C, 5104-22C) or P8 Briggs (8001-22C)
# firmware update is done using pUpdate utility expected to be in the
# specified data directory along with the update files .bin for BMC or .pnor for Host
- if ($output =~ /8001-22C|9006-22C|5104-22C|9006-12C/) {
+ if ($output =~ /$BIG_DATA_MACHINE_MODELS/) {
# Verify valid data directory was specified
if (defined $directory_name) {
unless (File::Spec->file_name_is_absolute($directory_name)) {
@@ -2045,6 +2046,7 @@ sub do_firmware_update {
$exit_with_error_func->($sessdata->{node}, $callback,
"At least one update file (.bin or .pnor) needs to be in data directory $pUpdate_directory.");
}
+
# All checks are done, run pUpdate utility on each of the update files found in
# the specified data directory
xCAT::SvrUtils::sendmsg("rflash started, Please wait...", $callback, $sessdata->{node});
@@ -2110,13 +2112,28 @@ sub do_firmware_update {
}
$exit_with_success_func->($sessdata->{node}, $callback, "Firmware updated, powering chassis on to populate FRU information...");
+ } else {
+
+ # The target machine is *NOT* IBM Power S822LC for Big Data (Supermicro)
+ # Only .hpm files is supported for such machine, no directory option is supported
+ if (defined $directory_name and $output =~ /Chassis Part Number\s*:\s*(\S*)/) {
+ my $model = $1;
+ $exit_with_error_func->($sessdata->{node}, $callback, "Flashing of $model is not supported with pUpdate, supported Model Types: $BIG_DATA_MACHINE_MODELS");
+ }
}
- if (($hpm_data_hash{deviceID} ne $sessdata->{device_id}) ||
- ($hpm_data_hash{productID} ne $sessdata->{prod_id}) ||
- ($hpm_data_hash{manufactureID} ne $sessdata->{mfg_id})) {
- $exit_with_error_func->($sessdata->{node}, $callback,
- "The image file doesn't match this machine");
+ # If we fall through here, it is *NOT* IBM Power S822LC for Big Data (Supermicro) and we expact some data in hpm_data_hash.
+ # Verify hpm_data_hash has some values
+
+
+ if (!exists($hpm_data_hash{deviceID})
+ || !exists($hpm_data_hash{manufactureID})
+ || !exists($hpm_data_hash{productID})) {
+ $exit_with_error_func->($sessdata->{node}, $callback, "Extract data from .hpm update file failed, no deviceID, productID or manufactureID got");
+ } elsif (($hpm_data_hash{deviceID} ne $sessdata->{device_id}) ||
+ ($hpm_data_hash{productID} ne $sessdata->{prod_id}) ||
+ ($hpm_data_hash{manufactureID} ne $sessdata->{mfg_id})) {
+ $exit_with_error_func->($sessdata->{node}, $callback, "The image file doesn't match target machine: \n$output");
}
# check for 8335-GTB Firmware above 1610A release. If below, exit
diff --git a/xCAT-server/lib/xcat/plugins/nodediscover.pm b/xCAT-server/lib/xcat/plugins/nodediscover.pm
index d65bb9d8a..5b226da91 100644
--- a/xCAT-server/lib/xcat/plugins/nodediscover.pm
+++ b/xCAT-server/lib/xcat/plugins/nodediscover.pm
@@ -456,9 +456,25 @@ sub process_request {
$callback->({ error => ["The node [$node] should have a correct IP address which belongs to the management network."], errorcode => ["1"] });
return;
}
+
+ my $bmc_node = undef;
+ if (defined($request->{bmc_node}) and defined($request->{bmc_node}->[0])) {
+ $bmc_node = $request->{bmc_node}->[0];
+ }
+
+ if (-x "/usr/bin/goconserver") {
+ xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: remove gocons session for $bmc_node");
+ require xCAT::Goconserver;
+ if (xCAT::Goconserver::is_goconserver_running()) {
+ my $api_url = "https://localhost:". xCAT::Goconserver::get_api_port();
+ xCAT::Goconserver::delete_nodes($api_url, {"$bmc_node" => 1}, 1, $callback);
+ }
+ } else {
+ xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: After discovery done, please use 'makeconservercf -C' to clean up undefined nodes from conserver");
+ }
+
if (defined($request->{bmcinband})) {
- if (defined($request->{bmc_node}) and defined($request->{bmc_node}->[0])) {
- my $bmc_node = $request->{bmc_node}->[0];
+ if (defined($bmc_node)) {
xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: Removing discovered BMC nodes definition: $bmc_node...");
my $rmcmd = "rmdef $bmc_node";
xCAT::Utils->runcmd($rmcmd, 0);
@@ -470,8 +486,7 @@ sub process_request {
}
}
} else {
- if (defined($request->{bmc_node}) and defined($request->{bmc_node}->[0])) {
- my $bmc_node = $request->{bmc_node}->[0];
+ if (defined($bmc_node)) {
if ($bmc_node =~ /\,/) {
xCAT::MsgUtils->message("W", "Multiple BMC nodes matched with no bmcinband specified, please remove manually");
} else {
@@ -481,7 +496,7 @@ sub process_request {
}
}
}
-
+
my $restartstring = "restart";
if (scalar @forcenics > 0) {
diff --git a/xCAT-server/lib/xcat/plugins/nodestat.pm b/xCAT-server/lib/xcat/plugins/nodestat.pm
index b2d674b96..f50729423 100644
--- a/xCAT-server/lib/xcat/plugins/nodestat.pm
+++ b/xCAT-server/lib/xcat/plugins/nodestat.pm
@@ -920,7 +920,7 @@ sub process_request {
if (ref $request->{arg}) {
@ARGV = @{ $request->{arg} };
GetOptions(
- 'f' => \$usefping
+ 'f|useping' => \$usefping
);
}
@@ -1225,7 +1225,7 @@ sub usage
my $retcode=shift;
my $rsp = {};
$rsp->{data}->[0] = "Usage:";
- $rsp->{data}->[1] = " nodestat [noderange] [-m|--usemon] [-p|powerstat] [-u|--updatedb] [-f|--usefping]";
+ $rsp->{data}->[1] = " nodestat [noderange] [-m|--usemon] [-p|powerstat] [-f|--usefping] [-u|--updatedb]";
$rsp->{data}->[2] = " nodestat [-h|--help|-v|--version]";
if($retcode){
$rsp->{errorcode}->[0]=$retcode;
diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm
index 3f1e22886..66d955d6b 100644
--- a/xCAT-server/lib/xcat/plugins/openbmc2.pm
+++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm
@@ -16,6 +16,7 @@ use Getopt::Long;
use xCAT::Usage;
use xCAT::SvrUtils;
use xCAT::OPENBMC;
+use xCAT::AGENT;
#-------------------------------------------------------
@@ -134,7 +135,7 @@ sub process_request {
my $request = shift;
$callback = shift;
- if (!xCAT::OPENBMC::exists_python_agent()) {
+ if (!xCAT::AGENT::exists_python_agent()) {
xCAT::MsgUtils->message("E", { data => ["The xCAT Python agent does not exist. Check if xCAT-openbmc-py package is installed on management node and service nodes."] }, $callback);
return;
}
@@ -149,14 +150,14 @@ sub process_request {
return unless(%node_info);
# If we can't start the python agent, exit immediately
- my $pid = xCAT::OPENBMC::start_python_agent($$);
+ my $pid = xCAT::AGENT::start_python_agent($$);
if (!defined($pid)) {
xCAT::MsgUtils->message("E", { data => ["Failed to start the xCAT Python agent. Check /var/log/xcat/cluster.log for more information."] }, $callback);
return;
}
- xCAT::OPENBMC::submit_agent_request($pid, $request, \%node_info, $callback);
- xCAT::OPENBMC::wait_agent($pid, $callback);
+ xCAT::AGENT::submit_agent_request($pid, $request, "openbmc", \%node_info, $callback);
+ xCAT::AGENT::wait_agent($pid, $callback);
}
my @rsp_common_options = qw/autoreboot bootmode powersupplyredundancy powerrestorepolicy timesyncmethod
diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm
index 26f7ec81c..99303bcbb 100755
--- a/xCAT-server/lib/xcat/plugins/packimage.pm
+++ b/xCAT-server/lib/xcat/plugins/packimage.pm
@@ -99,6 +99,7 @@ sub process_request {
my $imagename;
my $dotorrent;
my $provmethod;
+ my $envars;
my $help;
my $version;
my $lock;
@@ -158,7 +159,7 @@ sub process_request {
$callback->({ error => ["The linuximage table cannot be opened."], errorcode => [1] });
return 1;
}
- (my $ref) = $osimagetab->getAttribs({ imagename => $imagename }, 'osvers', 'osarch', 'profile', 'provmethod', 'synclists');
+ (my $ref) = $osimagetab->getAttribs({ imagename => $imagename }, 'osvers', 'osarch', 'profile', 'provmethod', 'synclists','environvar');
unless ($ref) {
$callback->({ error => ["Cannot find image \'$imagename\' from the osimage table."], errorcode => [1] });
return 1;
@@ -174,6 +175,7 @@ sub process_request {
$profile = $ref->{'profile'};
$syncfile = $ref->{'synclists'};
$provmethod = $ref->{'provmethod'};
+ $envars = $ref->{'environvar'};
unless ($osver and $arch and $profile and $provmethod) {
$callback->({ error => ["osimage.osvers, osimage.osarch, osimage.profile and osimage.provmethod must be specified for the image $imagename in the database."], errorcode => [1] });
@@ -399,11 +401,15 @@ sub process_request {
system("umount $rootimg_dir/proc");
copybootscript($installroot, $rootimg_dir, $osver, $arch, $profile, $callback);
+
my $pass = xCAT::PasswordUtils::crypt_system_password();
if (!defined($pass)) {
$pass = 'cluster';
}
-
+ my @secure_root = xCAT::TableUtils->get_site_attribute("secureroot");
+ if ($secure_root[0] == 1) {
+ $pass = '*';
+ }
my $oldmask = umask(0077);
my $shadow;
open($shadow, "<", "$rootimg_dir/etc/shadow");
@@ -423,8 +429,12 @@ sub process_request {
# sync fils configured in the synclist to the rootimage
$syncfile = xCAT::SvrUtils->getsynclistfile(undef, $osver, $arch, $profile, "netboot", $imagename);
if ( defined($syncfile) && -f $syncfile && -d $rootimg_dir) {
+ my $myenv='';
+ if($envars){
+ $myenv.=" XCAT_OSIMAGE_ENV=$envars";
+ }
print "Syncing files from $syncfile to root image dir: $rootimg_dir\n";
- system("$::XCATROOT/bin/xdcp -i $rootimg_dir -F $syncfile");
+ system("$myenv $::XCATROOT/bin/xdcp -i $rootimg_dir -F $syncfile");
}
} else {
print "Bypass of syncfiles requested, will not sync files to root image directory.\n";
diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm
index 2d76a55b8..42b1715c3 100644
--- a/xCAT-server/lib/xcat/plugins/statelite.pm
+++ b/xCAT-server/lib/xcat/plugins/statelite.pm
@@ -469,7 +469,7 @@ sub process_request {
$verbose && $callback->({ info => ["put the statelite rc file to $rootimg_dir/etc/init.d/"] });
# rh5,rh6.1 to rh6.4 use rc.statelite.ppc.redhat, otherwise use rc.statelite
- if (($osver =~ m/^rh[a-zA-Z]*5/) or ($osver =~ m/^rh[a-zA-Z]*6(\.)?[1-4]/) and $arch eq "ppc64") { # special case for redhat5/6.x on PPC64
+ if (($osver =~ m/^rh[a-zA-Z]*5/) or ($osver =~ m/^rh[a-zA-Z]*6(\.)?[1-4]$/) and $arch eq "ppc64") { # special case for redhat5/6.x on PPC64
system("cp -a $::XCATROOT/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat $rootimg_dir/etc/init.d/statelite");
} else {
system("cp -a $::XCATROOT/share/xcat/netboot/add-on/statelite/rc.statelite $rootimg_dir/etc/init.d/statelite");
diff --git a/xCAT-server/lib/xcat/plugins/switchdiscover.pm b/xCAT-server/lib/xcat/plugins/switchdiscover.pm
index 07b88b26a..35c792a52 100644
--- a/xCAT-server/lib/xcat/plugins/switchdiscover.pm
+++ b/xCAT-server/lib/xcat/plugins/switchdiscover.pm
@@ -981,8 +981,14 @@ sub get_snmpvendorinfo {
push @comm_list, 'public';
foreach $comms(@comm_list) {
- #get sysDescr.0";
- my $ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.1.1";
+ #for pdu: get vendor info from sysDescr
+ #for switches: get vendor info from entPhysicalDescr
+ my $ccmd;
+ if (exists($globalopt{pdu})) {
+ $ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.1.1";
+ } else {
+ $ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.47.1.1.1.1.2.1";
+ }
if (exists($globalopt{verbose})) {
send_msg($request, 0, "Process command: $ccmd\n");
}
diff --git a/xCAT-server/lib/xcat/plugins/updatehwinv.pm b/xCAT-server/lib/xcat/plugins/updatehwinv.pm
new file mode 100644
index 000000000..d91460804
--- /dev/null
+++ b/xCAT-server/lib/xcat/plugins/updatehwinv.pm
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html
+
+package xCAT_plugin::updatehwinv;
+
+BEGIN
+{
+ $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
+}
+use lib "$::XCATROOT/lib/perl";
+use strict;
+use warnings "all";
+use xCAT::Table;
+use xCAT::Utils;
+use xCAT::NodeRange;
+
+#-------------------------------------------------------
+
+=head3 handled_commands
+
+ Return list of commands handled by this plugin
+
+=cut
+
+#-------------------------------------------------------
+sub handled_commands {
+ return {
+ updatehwinv => 'updatehwinv',
+ };
+}
+
+sub process_request {
+ my $req = shift;
+ my $callback = shift;
+
+ if ($req->{command}->[0] eq "updatehwinv") {
+ update_hw_inv($req);
+ }
+}
+
+sub update_hw_inv {
+ my $request = shift;
+ my $tmp_node = $request->{'_xcat_clienthost'}->[0];
+ my @valid_node = xCAT::NodeRange::noderange($tmp_node);
+
+ unless (@valid_node) {
+ xCAT::MsgUtils->message("S", "xcat.hwinv: Received invalid node $tmp_node hwinv info, ignore...");
+ return;
+ }
+
+ my $node = $valid_node[0];
+
+ my @nodefs;
+ my $basicdata;
+
+ my @hwinv_info = ("cpucount", "cputype", "memory", "disksize");
+
+ foreach my $hwinv_type (@hwinv_info) {
+ if (defined($request->{$hwinv_type}) and $request->{$hwinv_type}->[0]) {
+ $basicdata->{$hwinv_type} = $request->{$hwinv_type}->[0];
+ } else {
+ push @nodefs, $hwinv_type;
+ }
+ }
+
+ if ($basicdata) {
+ my $hwinv_tab = xCAT::Table->new("hwinv", -create => 1);
+ xCAT::MsgUtils->message("S", "xcat.hwinv: Update hwinv for $node");
+ $hwinv_tab->setNodeAttribs($node, $basicdata);
+ }
+ if (@nodefs) {
+ my $nodef = join(",", @nodefs);
+ xCAT::MsgUtils->message("E", "xcat.hwinv: No valid hwinv info $nodef received from $node");
+ }
+}
+
+1;
diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm
index b6c726302..bd9f1dc4c 100644
--- a/xCAT-server/lib/xcat/plugins/xnba.pm
+++ b/xCAT-server/lib/xcat/plugins/xnba.pm
@@ -105,11 +105,20 @@ sub setstate {
my %machash = %{ shift() };
my %iscsihash = %{ shift() };
my $tftpdir = shift;
- my %linuximghash = ();
my $linuximghashref = shift;
- if (ref $linuximghashref) { %linuximghash = %{$linuximghashref}; }
- my $imgaddkcmdline = ($linuximghash{'boottarget'}) ? undef : $linuximghash{'addkcmdline'};
+
my $kern = $bphash{$node}->[0];
+ my $imgaddkcmdline = $linuximghashref->{'addkcmdline'};
+ my $imgboottarget = $linuximghashref->{'boottarget'};
+
+ # get kernel and initrd from boottarget table
+ my $bttab;
+ my $btentry;
+ if ($imgboottarget) {
+ $bttab = xCAT::Table->new('boottarget');
+ $btentry = $bttab->getAttribs({ 'bprofile' => $imgboottarget }, 'kernel', 'initrd', 'kcmdline');
+ }
+
unless ($::XNBA_addkcmdlinehandled->{$node}) { #Tag to let us know the plugin had a special syntax implemented for addkcmdline
if ($kern->{addkcmdline} or ($imgaddkcmdline)) {
@@ -171,6 +180,18 @@ sub setstate {
}
}
+
+ #fill in kernel, intrd and kcmdline from boottarget table if not available
+ unless ($kern->{kernel}) {
+ $kern->{kernel} = $btentry->{kernel};
+ }
+ unless ($kern->{initrd}) {
+ $kern->{initrd} = $btentry->{initrd};
+ }
+ unless ($kern->{kcmdline}) {
+ $kern->{kcmdline} = $btentry->{kcmdline};
+ }
+
my $elilokcmdline = $kern->{kcmdline}; #track it separate, since vars differ
my $pxelinuxkcmdline = $kern->{kcmdline}; #track it separate, since vars differ
if ($kern->{kcmdline} =~ /!myipfn!/) {
diff --git a/xCAT-server/sbin/chtab b/xCAT-server/sbin/chtab
index e6a6d0a99..9a2bff905 100755
--- a/xCAT-server/sbin/chtab
+++ b/xCAT-server/sbin/chtab
@@ -63,6 +63,12 @@ unless ($target) {
exit(1);
}
+my $current_userid = getpwuid($>);
+if ($current_userid ne "root")
+{
+ print "WARNING: chtab bypasses xcatd and does not enforce xCAT policy tables. Consider using tabch instead.\n";
+}
+
my %keyhash = ();
my @keypairs = split(/,/, $target);
if ($keypairs[0] !~ /([^\.\=]+)\.([^\.\=]+)\=(.+)/) {
diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd
index d31862816..f5d6f4dac 100755
--- a/xCAT-server/sbin/xcatd
+++ b/xCAT-server/sbin/xcatd
@@ -844,14 +844,14 @@ sub do_udp_service { # This function opens up a UDP port
#notify the client that its request is been processing
my $ret=xCAT::NetworkUtils->send_tcp_msg($clientip,3001,"processing");
if($ret){
- xCAT::MsgUtils->message("S", "INFO xcatd: fail to notify $clientip that its 'findme' request is been processing");
+ xCAT::MsgUtils->message("S", "xcatd: fail to notify $clientip that its 'findme' request is been processing");
}
} elsif ($data =~ /^ $data, sockaddr => $clientip, sport => $sport }, $discoctl);
#notify the client that its request is been processing
my $ret=xCAT::NetworkUtils->send_tcp_msg($clientip,3001,"processing");
if($ret){
- xCAT::MsgUtils->message("S", "INFO xcatd: fail to notify $clientip that its 'findme' request is been processing");
+ xCAT::MsgUtils->message("S", "xcatd: fail to notify $clientip that its 'findme' request is been processing");
}
} else { # for *now*, we'll do a tiny YAML subset
@@ -1212,7 +1212,7 @@ unless ($cmdlog_svrpid) {
if ($clientsock) { close($clientsock); }
if (-e $cmdlogservicefile) { unlink("$cmdlogservicefile"); }
if ($cmdlogsvrlistener) { close($cmdlogsvrlistener); }
- xCAT::MsgUtils->message("S", "INFO xcatd: 'Command log writer' process $$ is terminated by USR2 signal");
+ xCAT::MsgUtils->message("S", "xcatd: 'Command log writer' process $$ is terminated by USR2 signal");
exit(0);
};
@@ -1222,7 +1222,7 @@ unless ($cmdlog_svrpid) {
if ($clientsock) { close($clientsock); }
if (-e $cmdlogservicefile) { unlink("$cmdlogservicefile"); }
if ($cmdlogsvrlistener) { close($cmdlogsvrlistener); }
- xCAT::MsgUtils->message("S", "INFO xcatd: 'Command log writer' process $$ is terminated by TERM or INT signal");
+ xCAT::MsgUtils->message("S", "xcatd: 'Command log writer' process $$ is terminated by TERM or INT signal");
exit(0);
};
@@ -1246,10 +1246,10 @@ unless ($cmdlog_svrpid) {
$cmdlogfileswitch = 1;
}
if (!$trytime) {
- xCAT::MsgUtils->message("S", "INFO xcatd: 'Command log writer' process $$ get HUP signal, reopen commands.log file failed, send TERM signal to kill itself");
+ xCAT::MsgUtils->message("S", "xcatd: 'Command log writer' process $$ get HUP signal, reopen commands.log file failed, send TERM signal to kill itself");
kill 'INT', $$;
} else {
- xCAT::MsgUtils->message("S", "INFO xcatd: 'Command log writer' process $$ get HUP signal, reopen commands.log file");
+ xCAT::MsgUtils->message("S", "xcatd: 'Command log writer' process $$ get HUP signal, reopen commands.log file");
}
};
@@ -1260,7 +1260,7 @@ unless ($cmdlog_svrpid) {
Listen => 8192);
if (not $cmdlogsvrlistener and open($cmdlogpidfile, "<", "$cmdlogservicefile")) {
- xCAT::MsgUtils->message("S", "INFO xcatd: 'Command log writer' process $$ is trying to get port $cmdlog_port");
+ xCAT::MsgUtils->message("S", "xcatd: 'Command log writer' process $$ is trying to get port $cmdlog_port");
my $pid = <$cmdlogpidfile>;
if ($pid) {
kill 'USR2', $pid;
@@ -1319,7 +1319,7 @@ unless ($cmdlog_svrpid) {
if ($cmdlogfile) { close($cmdlogfile); }
if ($cmdlogsvrlistener) { close($cmdlogsvrlistener); }
- xCAT::MsgUtils->message("S", "INFO xcatd: 'Command log writer' process $$ stop");
+ xCAT::MsgUtils->message("S", "xcatd: 'Command log writer' process $$ stop");
}
# ----used for command log end---------
diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu.common b/xCAT-server/share/xcat/install/scripts/post.ubuntu.common
index c937a7273..cd592757e 100755
--- a/xCAT-server/share/xcat/install/scripts/post.ubuntu.common
+++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu.common
@@ -9,39 +9,32 @@ echo "post scripts" >/root/post.log
[ $MASTER_IP ] || export MASTER_IP="#ENV:MASTER_IP#"
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
-export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic#
-if [ "$PRINIC" == "mac" ]
+export PRINIC="#TABLEBLANKOKAY:noderes:THISNODE:primarynic#"
+if [ "$PRINIC" == "mac" ] || [ -z "$PRINIC" ]
then
export PRINIC='#GETPRINICMAC:THISNODE#'
fi
-if [ -z "$PRINIC" ]
+if [ -n "$PRINIC" ] && [[ "$(echo "$PRINIC" | grep -sqE ^[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+$ ;echo $?)" == "0" ]]
then
- export PRINIC=eth0
-elif [[ `echo "$PRINIC" | grep -sqE ^[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+$ ;echo $?` == "0" ]]; then
- #export PRINIC=`ifconfig -a | grep -i "HWaddr $PRINIC" | awk '{print $1}'`
- export PRINIC=`ip -o link|grep -i "$PRINIC" |awk '{print $2}'|sed s/://`
+ export PRINIC="$(ip -o link | grep -i "$PRINIC" | awk '{print $2}' | sed 's/://')"
fi
-#IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}')
-IP=$(ip -4 -o a sh dev $PRINIC | awk '/inet/{print $4}' | head -n 1 | awk -F '/' '{print $1}')
-if [ -z $IP ]
+IP="$(ip -4 -o a sh dev "$PRINIC" | awk '/inet/{print $4}' | head -n 1 | awk -F '/' '{print $1}')"
+if [ -z "$IP" ]
then
- dhclient $PRINIC
- #IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}')
- IP=$(ip -4 -o a sh dev $PRINIC | awk '/inet/{print $4}' | head -n 1 | awk -F '/' '{print $1}')
+ dhclient "$PRINIC"
+ IP=$(ip -4 -o a sh dev "$PRINIC" | awk '/inet/{print $4}' | head -n 1 | awk -F '/' '{print $1}')
fi
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
msgutil_r "$MASTER_IP" "debug" "PRINIC=$PRINIC,IP=$IP" "/var/log/xcat/xcat.log"
fi
-
-
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
msgutil_r "$MASTER_IP" "debug" "generating /etc/resolv.conf" "/var/log/xcat/xcat.log"
fi
echo "search #TABLE:site:key=domain:value#" >/etc/resolv.conf
-for i in $(echo #TABLE:site:key=nameservers:value# | tr ',' ' ')
+for i in $(echo "#TABLE:site:key=nameservers:value#" | tr ',' ' ')
do
echo "nameserver $i"
done >>/etc/resolv.conf
diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.ppc64el.pkglist b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.ppc64el.pkglist
new file mode 100644
index 000000000..80a145e6a
--- /dev/null
+++ b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.ppc64el.pkglist
@@ -0,0 +1,14 @@
+bash
+ifupdown
+nfs-common
+openssl
+isc-dhcp-client
+libc-bin
+openssh-server
+openssh-client
+wget
+vim
+rsync
+busybox-static
+gawk
+dnsutils
diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.ppc64le.pkglist b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.ppc64le.pkglist
new file mode 120000
index 000000000..450fee27f
--- /dev/null
+++ b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.ppc64le.pkglist
@@ -0,0 +1 @@
+compute.ubuntu18.04.ppc64el.pkglist
\ No newline at end of file
diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.x86_64.pkglist b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.x86_64.pkglist
new file mode 100644
index 000000000..80a145e6a
--- /dev/null
+++ b/xCAT-server/share/xcat/install/ubuntu/compute.ubuntu18.04.x86_64.pkglist
@@ -0,0 +1,14 @@
+bash
+ifupdown
+nfs-common
+openssl
+isc-dhcp-client
+libc-bin
+openssh-server
+openssh-client
+wget
+vim
+rsync
+busybox-static
+gawk
+dnsutils
diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk
index 0e39ef125..d83d4ffb1 100755
--- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk
+++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk
@@ -68,9 +68,9 @@ xCATCmd () {
# $2 is the command
ARCH=`uname -m`
if [ x$ARCH = x"ppc64" -a x$OS = x"rh" ]; then
- echo "\n${2}\n" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
+ echo "\n${2}\n" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 $(/usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -help 2>&1 | grep -m 1 -o -- -no_ssl2) -connect ${1} -rand /bin/nice 2>/dev/null
else
- echo "\n${2}\n" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
+ echo "\n${2}\n" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 $(LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -help 2>&1 | grep -m 1 -o -- -no_ssl2) -connect ${1} -rand /bin/nice 2>/dev/null
fi
}
diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite
index 6199919fd..56e39f60b 100755
--- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite
+++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite
@@ -128,7 +128,7 @@ GetSyncInfo () {
xCATCmd () {
# $1 is the xCAT server
# $2 is the command
- echo "\n${2}\n" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
+ echo "\n${2}\n" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 $(LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -help 2>&1 | grep -m 1 -o -- -no_ssl2) -connect ${1} -rand /bin/nice 2>/dev/null
}
diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat
index 2ea270de6..fafd5ebaf 100755
--- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat
+++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat
@@ -128,7 +128,7 @@ GetSyncInfo () {
xCATCmd () {
# $1 is the xCAT server
# $2 is the command
- echo "\n${2}\n" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 -no_ssl2 -connect ${1} -rand /bin/nice 2>/dev/null
+ echo "\n${2}\n" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 $(/usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -help 2>&1 | grep -m 1 -o -- -no_ssl2) -connect ${1} -rand /bin/nice 2>/dev/null
}
diff --git a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm
index 71aae5185..e8cc25445 100644
--- a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm
+++ b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm
@@ -10,6 +10,24 @@ use File::Basename;
use File::Path;
use Cwd qw(realpath);
+sub varsubinline{
+ my $line=shift;
+ my $refvardict=shift;
+
+ my @varsinline= $line =~ /\$\{?(\w+)\}?/g;
+ my @unresolvedvars;
+ foreach my $var(@varsinline){
+ if(exists $refvardict->{$var}){
+ $line=~ s/\$\{$var\}/$refvardict->{$var}/g;
+ $line=~ s/\$$var/$refvardict->{$var}/g;
+ }else{
+ push @unresolvedvars,$var;
+ }
+ }
+
+ return $line;
+}
+
sub get_profile_def_filename {
my $osver = shift;
my $profile = shift;
@@ -54,6 +72,8 @@ sub include_file
my $file = shift;
my $idir = shift;
my @text = ();
+
+ $file=varsubinline($file,\%ENV);
unless ($file =~ /^\//) {
$file = $idir . "/" . $file;
}
@@ -117,7 +137,6 @@ sub get_package_names {
$pkgtext =~ s/#INCLUDE:([^#^\n]+)#/include_file($1,$idir)/eg;
}
}
-
#print "\n\npkgtext=$pkgtext\n\n";
my @tmp = split(',', $pkgtext);
my $pass = 1;
@@ -169,7 +188,6 @@ sub get_package_names {
}
}
}
-
return %pkgnames;
}
diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot
index f6701aa78..12888ba79 100755
--- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot
+++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot
@@ -10,7 +10,7 @@ XCATMASTER=$XCAT
STATEMNT="$(getarg STATEMNT=)"
rootlimit="$(getarg rootlimit=)"
xcatdebugmode="$(getarg xcatdebugmode=)"
-
+rflags="$(getarg rootflags=)"
getarg nonodestatus
NODESTATUS=$?
@@ -77,10 +77,14 @@ if [ -r /rootimg.sfs ]; then
elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then
logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..."
echo Setting up RAM-root tmpfs.
- if [ -z $rootlimit ];then
- mount -t tmpfs -o mode=755 rootfs $NEWROOT
+ rootopts="mode=755"
+ if [ -n "$rflags" ]; then
+ rootopts="$rootopts","$rflags"
+ fi
+ if [ -z "$rootlimit" ];then
+ mount -t tmpfs -o $rootopts rootfs $NEWROOT
else
- mount -t tmpfs -o mode=755,size=$rootlimit rootfs $NEWROOT
+ mount -t tmpfs -o "$rootopts",size=$rootlimit rootfs $NEWROOT
fi
cd $NEWROOT
diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage
index 80f243861..8d3fe9042 100755
--- a/xCAT-server/share/xcat/netboot/rh/genimage
+++ b/xCAT-server/share/xcat/netboot/rh/genimage
@@ -69,7 +69,7 @@ my $prompt;
my $ignorekernelchk;
my $noupdate;
my $lock;
-
+my $envar;
sub xdie {
@@ -186,6 +186,7 @@ GetOptions(
'onlyinitrd' => \$onlyinitrd,
'ignorekernelchk' => \$ignorekernelchk,
'noupdate' => \$noupdate,
+ 'env=s' => \$envar,
);
if (@ARGV > 0) {
@@ -376,6 +377,11 @@ unless ($onlyinitrd) {
exit 1;
}
+ my @envarlist=split(',',$envar);
+ foreach my $entry (@envarlist){
+ my ($key,$value)=split('=',$entry);
+ $ENV{xCAT::Utils->strim($key)}=xCAT::Utils->strim($value);
+ }
mount_chroot($rootimg_dir);
my %pkg_hash = imgutils::get_package_names($pkglist);
@@ -784,6 +790,7 @@ if ($postinstall_filename) {
$ENV{IMG_OTHERPKGLIST}=$otherpkglist if("" ne $otherpkglist);
$ENV{IMG_OTHERPKGDIR}=$srcdir_otherpkgs if("" ne $srcdir_otherpkgs);
$ENV{IMG_ROOTIMGDIR}=$rootimg_dir if("" ne $rootimg_dir);
+
foreach my $postinstall (split /,/, $postinstall_filename) {
if (!-x $postinstall) {
@@ -1944,7 +1951,6 @@ sub generic_post { #This function is meant to leave the image in a state approxi
print $cfgfile "tmpfs /dev/shm tmpfs defaults 0 0\n";
print $cfgfile "proc /proc proc defaults 0 0\n";
print $cfgfile "sysfs /sys sysfs defaults 0 0\n";
-
if (!&using_systemd($osver)) {
if ($tmplimit) {
print $cfgfile "tmpfs /tmp tmpfs defaults,size=$tmplimit 0 2\n";
diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist
new file mode 100644
index 000000000..583d62ad1
--- /dev/null
+++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist
@@ -0,0 +1,18 @@
+bash
+ifupdown
+nfs-common
+openssl
+isc-dhcp-client
+libc-bin
+linux-image-generic
+openssh-server
+openssh-client
+wget
+vim
+rsync
+busybox-static
+gawk
+dnsutils
+tar
+gzip
+xz-utils
diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64le.pkglist
new file mode 120000
index 000000000..450fee27f
--- /dev/null
+++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64le.pkglist
@@ -0,0 +1 @@
+compute.ubuntu18.04.ppc64el.pkglist
\ No newline at end of file
diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist
new file mode 100644
index 000000000..583d62ad1
--- /dev/null
+++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist
@@ -0,0 +1,18 @@
+bash
+ifupdown
+nfs-common
+openssl
+isc-dhcp-client
+libc-bin
+linux-image-generic
+openssh-server
+openssh-client
+wget
+vim
+rsync
+busybox-static
+gawk
+dnsutils
+tar
+gzip
+xz-utils
diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat
index 4ae3f65cc..6fe87e9a2 100755
--- a/xCAT-server/share/xcat/tools/go-xcat
+++ b/xCAT-server/share/xcat/tools/go-xcat
@@ -2,7 +2,7 @@
#
# go-xcat - Install xCAT automatically.
#
-# Version 1.0.27
+# Version 1.0.28
#
# Copyright (C) 2016, 2017, 2018 International Business Machines
# Eclipse Public License, Version 1.0 (EPL-1.0)
@@ -438,7 +438,12 @@ function check_package_version_deb()
do
if [[ "$1" = "${name[i]}" ]]
then
- echo "${ver[i]}"
+ if [[ -n "${ver[i]}" ]]
+ then
+ echo "${ver[i]}"
+ else
+ echo "(not installed)"
+ fi
unset "name[${i}]" "ver[${i}]"
shift && continue 2
fi
diff --git a/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle
index 34517a629..909d022ac 100644
--- a/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle
+++ b/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle
@@ -215,12 +215,12 @@ switchdiscover_range_z_V
nodeset_shell
nodeset_cmdline
nodeset_runimg
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
xcatconfig_u_check_xcatsslversion_rhels_sles
sles_migration1
sles_migration2
diff --git a/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle b/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle
index 8d738fa2e..732813702 100644
--- a/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle
+++ b/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle
@@ -212,12 +212,12 @@ nodeset_shell
nodeset_cmdline
nodeset_runimg
nodeset_check_warninginfo
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
xcatconfig_u_check_xcatsslversion_rhels_sles
sles_migration1
sles_migration2
diff --git a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle
index 8d500bc10..96783dcb4 100644
--- a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle
+++ b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle
@@ -227,12 +227,12 @@ switchdiscover_range_r
switchdiscover_range_x
switchdiscover_range_z
switchdiscover_range_z_V
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
xcatconfig_u_check_xcatsslversion_rhels_sles
xcatconfig_c
bmcdiscover_help
diff --git a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle
index 0b7a4d19a..17d4379c4 100644
--- a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle
+++ b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle
@@ -225,12 +225,12 @@ switchdiscover_range_x
switchdiscover_range_z
switchdiscover_range_z_V
nodeset_check_warninginfo
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
xcatconfig_u_check_xcatsslversion_rhels_sles
xcatconfig_c
bmcdiscover_help
diff --git a/xCAT-test/autotest/bundle/sles12_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12_ppc64le.bundle
index 4189d2a14..90f286d24 100644
--- a/xCAT-test/autotest/bundle/sles12_ppc64le.bundle
+++ b/xCAT-test/autotest/bundle/sles12_ppc64le.bundle
@@ -198,12 +198,12 @@ switchdiscover_range_z_V
nodeset_shell
nodeset_cmdline
nodeset_runimg
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
sles_migration1
sles_migration2
reg_linux_statelite_installation_flat
diff --git a/xCAT-test/autotest/bundle/sles12_x86_64.bundle b/xCAT-test/autotest/bundle/sles12_x86_64.bundle
index 91afe00d7..43c40e086 100644
--- a/xCAT-test/autotest/bundle/sles12_x86_64.bundle
+++ b/xCAT-test/autotest/bundle/sles12_x86_64.bundle
@@ -203,12 +203,12 @@ nodeset_shell
nodeset_cmdline
nodeset_runimg
nodeset_check_warninginfo
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
reg_linux_diskless_installation_flat
reg_linux_statelite_installation_flat
SN_setup_case
diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle
index 59b57f4ae..e48e451f9 100644
--- a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle
+++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle
@@ -258,12 +258,12 @@ switchdiscover_range_r
switchdiscover_range_x
switchdiscover_range_z
switchdiscover_range_z_V
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
xcatconfig_u_check_xcatsslversion_ubuntu
xcatconfig_c
bmcdiscover_help
diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle
index 9cb6f996c..14e69dc79 100644
--- a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle
+++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle
@@ -262,12 +262,12 @@ switchdiscover_range_r
switchdiscover_range_x
switchdiscover_range_z
switchdiscover_range_z_V
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
nodeset_check_warninginfo
xcatconfig_u_check_xcatsslversion_ubuntu
xcatconfig_c
diff --git a/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle
index fe8341451..5d8b1e49f 100644
--- a/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle
+++ b/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle
@@ -233,12 +233,12 @@ switchdiscover_range_r
switchdiscover_range_x
switchdiscover_range_z
switchdiscover_range_z_V
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
nodeset_shell
nodeset_cmdline
nodeset_runimg
diff --git a/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle
index 3f79a8fc5..10eeb89e6 100644
--- a/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle
+++ b/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle
@@ -243,10 +243,10 @@ switchdiscover_range_z_V
nodeset_shell
nodeset_cmdline
nodeset_runimg
-xcatd_start_systemd
-xcatd_stop_systemd
-xcatd_restart_systemd
-run_command_with_XCATBYPASS_systemd
-disable_root_permission_in_policy_table_systemd
-assign_certain_command_permission_systemd
+xcatd_start
+xcatd_stop
+xcatd_restart
+run_command_with_XCATBYPASS
+disable_root_permission_in_policy_table
+assign_certain_command_permission
nodeset_check_warninginfo
diff --git a/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0
index 64bf22eb4..448eb3435 100644
--- a/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0
+++ b/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0
@@ -2,6 +2,7 @@ start:reventlog_resolved_parse_error1
description: Do not pass in any logs to clear
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved
check:rc==1
check:output=~Error: (\[.*?\]: )?Usage error. Provide a comma separated
@@ -11,6 +12,7 @@ start:reventlog_resolved_parse_error2
description: Do not pass in any logs to clear, include = sign
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=
check:rc==1
check:output=~Error: (\[.*?\]: )?Usage error. Provide a comma separated
@@ -20,6 +22,7 @@ start:reventlog_resolved_parse_error3
description: forgot the = sign
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved 1,2,3
check:rc==1
check:output=~Error: (\[.*?\]: )?Usage error. Provide a comma separated
@@ -29,6 +32,7 @@ start:reventlog_resolved_parse_error4
description: Pass in a negative number
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=-1
check:rc==1
check:output=~Error: (\[.*?\]: )?Invalid ID=
@@ -38,6 +42,7 @@ start:reventlog_resolved_parse_error5
description: Pass in a string
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=abc
check:rc==1
check:output=~Error: (\[.*?\]: )?Invalid ID=
@@ -47,6 +52,7 @@ start:reventlog_resolved_list
description: Pass in a list of ids
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=100,101
check:rc==0
check:output=~Attempting to resolve the following log entries: 100,101...
@@ -56,6 +62,7 @@ start:reventlog_resolved_LED
description: Pass in a LED keyword
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN resolved=Led
check:rc==0
check:output=~Attempting to resolve the following log entries: Led...
diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0
index 8f4eadb75..9cff4f9ef 100644
--- a/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0
+++ b/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0
@@ -2,6 +2,7 @@ start:rflash_check
description: Make sure the --check option works
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN --check
check:rc==0
check:output=~$$CN: BMC Firmware Product
@@ -12,6 +13,7 @@ start:rflash_invalid_activate
description: Provide an invalid option for activte, file does not end in .tar
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash $$CN -a /tmp/abc123.tz
check:rc==1
check:output=~Error: (\[.*?\]: )?Invalid firmware specified with -a
@@ -21,6 +23,7 @@ start:rflash_invalid_activate_and_delete
description: Cannot specify -a and --delete at the same time
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash $$CN -a 123 --delete 123
check:rc==1
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
@@ -30,6 +33,7 @@ start:rflash_invalid_id
description: Passing an invalid ID to activate
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash $$CN -a 123
check:rc==1
check:output=~Error: (\[.*?\]: )?Invalid ID provided to activate
@@ -39,6 +43,7 @@ start:rflash_invalid_multiple_id_3
description: Code does not currently support multiple IDs to activate
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash $$CN -a 123 abc asdbas
check:rc==1
check:output=~Error: (\[.*?\]: )?More than one firmware specified is not supported
@@ -48,6 +53,7 @@ start:rflash_invalid_multiple_id_2
description: Code does not currently support multiple IDs to activate
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash $$CN -a asdbas 123
check:rc==1
check:output=~Error: (\[.*?\]: )?More than one firmware specified is not supported
@@ -57,6 +63,7 @@ start:rflash_invalid_node
description: Activate a valid ID hash but forget to put in a node range
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash -a 221d9020
check:rc==1
check:output=~Error: (\[.*?\]: )?Invalid nodes and/or groups in noderange: 221d9020
@@ -66,6 +73,7 @@ start:rflash_invalid_delete_2
description: Attempt to delete more than 1 ID from the FW
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash $$CN --delete 221d9020 221d9020
check:rc==1
check:output=~Error: (\[.*?\]: )?More than one firmware specified is not supported
@@ -75,6 +83,7 @@ start:rflash_delete_active_bmc
description: Attempt to delete the active BMC firmware
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rflash $$CN -l | grep \* | grep BMC | awk '{print $2}' | xargs -i{} rflash $$CN --delete {}
check:rc==1
check:output=~$$CN: (\[.*?\]: )?Error: Deleting currently active BMC firmware is not supported
diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0
index 2faa0d1e4..44bc46855 100644
--- a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0
+++ b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0
@@ -1,6 +1,7 @@
start:rinv_record_firmware_level
description: Record the firmware level for the start of each testcase
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rinv $$CN firm
check:rc==0
end
@@ -8,6 +9,7 @@ end
start:rinv_check_active_fw_count
description: Ensure that there is only 2 active firmware, one for bmc and one for pnor
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rinv $$CN firm | tee /tmp/xcattest.rinv_check_active_fw_count.output
check:rc==0
cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l
@@ -23,6 +25,7 @@ end
start:rinv_check_active_fw_count_verbose
description: Ensure that there is only 2 active firmware, one for bmc and one for pnor (in verbose mode) (Issue #4236)
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rinv $$CN firm -V | tee /tmp/xcattest.rinv_check_active_fw_count_verbose.output
check:rc==0
cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count_verbose.output| grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l
diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0
index 8004c3605..750516a15 100644
--- a/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0
+++ b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0
@@ -1,6 +1,7 @@
start:rspconfig_record_firmware_level
description: Record the firmware level for the start of each testcase
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rinv $$CN firm
check:rc==0
end
@@ -9,6 +10,7 @@ start:rspconfig_get_all
description: Check that we can get all the attributes from the BMC
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ip netmask gateway hostname vlan
check:rc==0
check:output=~$$CN: BMC IP:
@@ -21,6 +23,7 @@ end
start:rspconfig_get_all_error
description: Check the parsing code for rspconfig (error cases)
hcp: openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN ip,netmask,gateway,hostname,vlan
check:rc==1
check:output=~Error: (\[.*?\]: )?Unsupported command
@@ -29,6 +32,7 @@ end
start:rspconfig_get_set_error
description: Check the parsing code for rspconfig (error cases) - Cannot get/set in same line
hcp: openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rspconfig $$CN ip netmask=255.0.0.0
check:rc==1
check:output=~Error: (\[.*?\]: )?Can not set and query OpenBMC information at the same time
@@ -38,6 +42,7 @@ start:rspconfig_get_and_set_hostname
description: Test setting and getting hostname on the BMC
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
# Save the hostname to a file....
cmd:rspconfig $$CN hostname | tee /tmp/xcattest.rspconfig.hostname
check:rc==0
diff --git a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0
index 5e5cc23f3..9567dbf35 100644
--- a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0
+++ b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0
@@ -2,6 +2,7 @@ start:supported_cmds_rpower
description: Make sure the rpower command works ...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rpower $$CN state
check:rc==0
check:output=~$$CN:
@@ -14,6 +15,7 @@ start:supported_cmds_rinv
description: Make sure that the rinv command works...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rinv $$CN
check:rc==0
check:output=~$$CN:
@@ -39,6 +41,7 @@ start:supported_cmds_rvitals
description: Make sure that the rvitals command works...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: rvitals $$CN
check:rc==0
check:output=~$$CN:
@@ -71,6 +74,7 @@ start:supported_cmds_rbeacon
description: Make sure the rbeacon command works ...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rbeacon $$CN on
check:rc==0
check:output=~$$CN: on
@@ -83,6 +87,7 @@ start:supported_cmds_reventlog
description: Make sure the reventlog command works ...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN
check:rc==0
check:output=~$$CN:
@@ -98,6 +103,7 @@ start:supported_cmds_rflash
description: Make sure the rflash command works ...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -c
check:rc==0
check:output=~$$CN: BMC Firmware Product:
@@ -111,6 +117,7 @@ start:supported_cmds_rsetboot
description: Make sure the rsetboot command works ...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rsetboot $$CN stat
check:rc==0
check:output=~$$CN:
@@ -120,6 +127,7 @@ start:supported_cmds_rspconfig
description: Make sure the rspconfig command works ...
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ipsrc
check:rc==0
check:output=~$$CN: BMC IP Source:
diff --git a/xCAT-test/autotest/testcase/analyze_log/case0 b/xCAT-test/autotest/testcase/analyze_log/case0
index 3f39c38a1..2640bbbaa 100644
--- a/xCAT-test/autotest/testcase/analyze_log/case0
+++ b/xCAT-test/autotest/testcase/analyze_log/case0
@@ -1,6 +1,6 @@
start:check_mn_cluster_log_file
-os:Linux
description:check known error message in /var/log/xcat/cluster.log file. Only for redhat and sles.
+label:mn_only
cmd:cat /var/log/xcat/cluster.log | grep "xcatd: Error happened when receiving data from DB access"
check:output!~xcatd: Error happened when receiving data from DB access
cmd:cat /var/log/xcat/cluster.log | grep "Undefined subroutine &main"
diff --git a/xCAT-test/autotest/testcase/chdef/cases0 b/xCAT-test/autotest/testcase/chdef/cases0
index f0e32c59c..d32f8d31b 100644
--- a/xCAT-test/autotest/testcase/chdef/cases0
+++ b/xCAT-test/autotest/testcase/chdef/cases0
@@ -1,11 +1,13 @@
start:chdef_null
description:chdef without any flag
+label:mn_only,db
cmd:chdef
check:output=~Usage
end
start:chdef_t_node
description:chdef -t node
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:chdef -t node -o testnode groups=aix
@@ -34,6 +36,7 @@ end
start:chdef_t_network
description:chdef -t network
+label:mn_only,db
cmd:chdef -t network -o testnetwork net=111.222.33.0 mask=255.255.255.254
check:rc==0
cmd:lsdef -t network -l testnetwork
@@ -52,6 +55,7 @@ end
start:chdef_p
description:chdef -p -t node
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:chdef -p -t node -o testnode groups=aix
@@ -63,6 +67,7 @@ end
start:chdef_m
description:chdef -m -t node
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all,testgroup
check:rc==0
cmd:chdef -m -t node -o testnode groups=testgroup
@@ -74,6 +79,7 @@ end
start:chdef_z
description:chdef -z
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:lsdef testnode -z > /tmp/testnode.stanza
@@ -91,6 +97,7 @@ end
start:chdef_group
description:chdef with node group
+label:mn_only,db
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx
@@ -127,6 +134,7 @@ end
start:chdef_group_p
+label:mn_only,db
cmd:chdef abcnode1 -p groups=abc
check:rc==0
cmd:chdef abcnode2 -p groups=abcabc
@@ -144,6 +152,7 @@ end
start:chdef_dynamic_group
description:chdef with dynamic node group
+label:mn_only,db
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t node -o testnode3-testnode4 mgt=hmc cons=ipmi groups=all,systemx
@@ -190,6 +199,7 @@ end
start:chdef_multiple_keys
description:mkdef support for multiple keys in a table, such as ppcdirect
+label:mn_only,db
cmd: mkdef -t node -o testfsp mgt=fsp cons=fsp groups=all,fsp nodetype=fsp passwd.HMC=abc123 passwd.general=abc123 passwd.admin=abc123
check:rc==0
cmd:lsdef testfsp
@@ -210,6 +220,7 @@ end
start:chdef_n
description:chdef -n
+label:mn_only,db
cmd:mkdef -t node -o testnode1 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:chdef testnode1 -n testnode2
@@ -228,6 +239,7 @@ end
start:chdef_t_o_error
description:chdef -t wrongtype
+label:mn_only,db
cmd:chdef -t wrongtype -o testnode groups=all,aix
check:rc!=0
check:output=~not a valid
@@ -235,8 +247,8 @@ end
start:chdef_template
-os:linux
description:try to change a template, a new node is created according to chdef.
+label:mn_only,db
cmd:result=`lsdef | grep switch-template`; if [[ $result =~ "switch-template" ]]; then echo $result; noderm switch-template; fi
cmd:chdef -t node -o switch-template groups=test
check:output=~1 object definitions have been created or modified
@@ -249,8 +261,10 @@ check:rc==0
cmd:noderm switch-template
check:rc==0
end
+
start:chdef_site_check
description:This case is use to check site table could be changed successfully
+label:mn_only,db
cmd:var=`lsdef -t site clustersite -i dhcplease|grep 'dhcplease=' |awk -F= '{print $2}'`;echo $var>/tmp/sitevalue;chdef -t site clustersite dhcplease=300
check:rc==0
check:output=~1 object definitions have been created or modified.
diff --git a/xCAT-test/autotest/testcase/chkosimage/cases0 b/xCAT-test/autotest/testcase/chkosimage/cases0
deleted file mode 100644
index a5f312a6f..000000000
--- a/xCAT-test/autotest/testcase/chkosimage/cases0
+++ /dev/null
@@ -1,44 +0,0 @@
-start:chkosimage_h
-description:chkosimage -h and --help
-os:AIX
-cmd:chkosimage -h
-check:output=~usage|Usage
-cmd:chkosimage --help
-check:output=~usage|Usage
-end
-
-
-start:chkosimage_imagename
-description: chkosimage autotest
-os:AIX
-cmd:mknimimage -V -s $$SOURCE autotest
-check:rc==0
-cmd:lsnim | grep autotest
-check:rc==0
-check:output=~lpp_source
-check:output=~spot
-check:output=~bosinst_data
-cmd:nim -o update -a packages=all -a source=$$SSHPKG autotest_lpp_source
-check:rc==0
-cmd:mkdir -p /install/nim/installp_bundle
-cmd:cp $$SSHPKG/xCATaixCN71.bnd /install/nim/installp_bundle/
-check:rc==0
-cmd:nim -o define -t installp_bundle -a server=master -a location=/install/nim/installp_bundle/xCATaixCN71.bnd xCATaixCN71
-cmd:chdef -t osimage -o autotest installp_bundle="xCATaixCN71"
-check:rc==0
-cmd:chkosimage autotest
-check:rc==0
-end
-
-start:chkosimage_V_c_imagename
-description:chkosimage -V -c autotest
-os:AIX
-cmd:lsnim | grep autotest
-check:rc==0
-check:output=~lpp_source
-check:output=~spot
-check:output=~bosinst_data
-cmd:chkosimage -V -c autotest
-check:rc==0
-end
-
diff --git a/xCAT-test/autotest/testcase/chtab/cases0 b/xCAT-test/autotest/testcase/chtab/cases0
index cedb96420..769bd1f91 100644
--- a/xCAT-test/autotest/testcase/chtab/cases0
+++ b/xCAT-test/autotest/testcase/chtab/cases0
@@ -1,5 +1,6 @@
start:chtab_null
description:Check chtab with no attr
+label:mn_only,db
cmd:chtab
check:rc!=0
check:output=~Usage
@@ -8,6 +9,7 @@ end
start:chtab_d
description:check chtab -d
+label:mn_only,db
cmd:chtab key=rsh_test site.value=/opt/xcat/bin/rcp site.comments="the rcp command" site.disable=no
check:rc==0
cmd:tabdump site | grep rsh_test
@@ -21,6 +23,7 @@ end
start:chtab_modify_node
description:test chtab with node=XXX
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:chtab node=testnode nodelist.groups=all
@@ -33,6 +36,7 @@ end
start:chtab_modify_key
description:check chtab with key=xxx
+label:mn_only,db
cmd:chtab key=rsh_test site.value=/opt/xcat/bin/rcp site.comments="the rcp command"
check:rc==0
cmd:tabdump site | grep rsh_test
@@ -52,6 +56,7 @@ end
start:chtab_err_symble
description: check chtab with error attr
+label:mn_only,db
cmd:chtab -t
check:output=~Usage
end
@@ -59,6 +64,7 @@ end
start:chtab_err_table
description:chtab with error table
+label:mn_only,db
cmd:chtab error=error site.comment=error
check:rc!=0
check:output=~no such column|column \"error\" does not exist
@@ -67,6 +73,7 @@ end
start:chtab_h
description:chtab -h and --help
+label:mn_only,db
cmd:chtab -h
check:output=~Usage
cmd:chtab --help
@@ -76,6 +83,7 @@ end
start:chtab_v
description:chtab -v and -version
+label:mn_only,db
cmd:chtab -v
check:output=~Version
cmd:chtab -version
diff --git a/xCAT-test/autotest/testcase/chvm/cases0 b/xCAT-test/autotest/testcase/chvm/cases0
index b177591e5..eccd82b47 100644
--- a/xCAT-test/autotest/testcase/chvm/cases0
+++ b/xCAT-test/autotest/testcase/chvm/cases0
@@ -4,8 +4,10 @@
#check:rc!=0
#check:output=~Usage
#end
+
start:chvm_p
hcp:hmc
+label:others,virtualization
cmd:mkdef -t node -o testnode mgt=hmc groups=all
cmd:mkvm testnode -i $$MaxLparID -l $$CN
check:rc==0
@@ -26,8 +28,10 @@ check:output=~__GETNODEATTR($$CN, pprofile)__
cmd:rmvm testnode
cmd:rm -f /tmp/autotest.profile
end
+
start:chvm_attr
hcp:hmc
+label:others,virtualization
cmd:mkdef -t node -o testnode mgt=hmc groups=all
cmd:mkvm testnode -i $$MaxLparID -l $$CN
check:rc==0
@@ -38,12 +42,16 @@ cmd:lsvm testnode
check:output=~min_mem=1024
cmd:rmvm testnode
end
+
start:chvm_node
+label:mn_only,virtualization
cmd:chvm $$CN
check:rc!=0
check:output=~Usage
end
+
start:chvm_err_node
+label:mn_only,virtualization
cmd:dir="/tmp/chvm_err_node";echo ${dir}".old";if [ -d "${dir}" ];then mv ${dir} ${dir}".old"; fi; mkdir -p $dir
check:rc==0
cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/chvm_err_node/bogusnode.stanza ;rmdef bogusnode;fi
diff --git a/xCAT-test/autotest/testcase/dumpxCATdb/cases0 b/xCAT-test/autotest/testcase/dumpxCATdb/cases0
index d82ffa5c4..232ba7dd5 100644
--- a/xCAT-test/autotest/testcase/dumpxCATdb/cases0
+++ b/xCAT-test/autotest/testcase/dumpxCATdb/cases0
@@ -1,5 +1,6 @@
start:dumpxCATdb_h
description:dumpxCATdb -h
+label:mn_only,db
cmd:dumpxCATdb -h
check:rc==0
check:output=~dumpxCATdb
@@ -7,6 +8,7 @@ end
start:dumpxCATdb_v
description:Command Version
+label:mn_only,db
cmd:dumpxCATdb -v
check:rc==0
check:output=~Version
@@ -14,6 +16,7 @@ end
start:dumpxCATdb_p_nullskiptables
description:dumpxCATdb -p path,not skiptables
+label:mn_only,db
cmd:chtab key=skiptables site.value=""
check:rc==0
cmd:dumpxCATdb -p /tmp/db
@@ -29,6 +32,7 @@ end
start:dumpxCATdb_a_p_nullskiptables
description:dump all,without this flag the eventlog and auditlog will be skipped
+label:mn_only,db
cmd:chtab key=skiptables site.value=""
check:rc==0
cmd:dumpxCATdb -a -p /tmp/db.all
@@ -43,6 +47,7 @@ end
start:dumpxCATdb_p_skiptables
description:To have dumpxCATdb not backup the hosts or passwd table
+label:mn_only,db
cmd:chtab key=skiptables site.value="hosts,passwd"
check:rc==0
cmd:dumpxCATdb -p /tmp/db.skiptables
@@ -56,6 +61,7 @@ end
start:dumpxCATdb_a_p_skiptables
description:To have dumpxCATdb all but not backup the hosts or passwd table
+label:mn_only,db
cmd:chtab key=skiptables site.value="hosts,passwd"
check:rc==0
cmd:dumpxCATdb -a -p /tmp/db.skiptables
@@ -70,6 +76,7 @@ end
start:dumpxCATdb_p_nullskiptables_V
description:test verbose and -p
+label:mn_only,db
cmd:chtab key=skiptables site.value=""
check:rc==0
cmd:dumpxCATdb -p /tmp/db -V
@@ -83,6 +90,7 @@ end
start:dumpxCATdb_a_p_nullskiptables_V
description:test -V and -a
+label:mn_only,db
cmd:chtab key=skiptables site.value=""
check:rc==0
cmd:dumpxCATdb -a -p /tmp/db -V
@@ -95,6 +103,7 @@ end
start:dumpxCATdb_p_V
description:test -p -V
+label:mn_only,db
cmd:chtab key=skiptables site.value="passwd"
check:rc==0
cmd:dumpxCATdb -p /tmp/db -V
diff --git a/xCAT-test/autotest/testcase/gettab/cases0 b/xCAT-test/autotest/testcase/gettab/cases0
index 1f12d14d8..ce4b1bea4 100644
--- a/xCAT-test/autotest/testcase/gettab/cases0
+++ b/xCAT-test/autotest/testcase/gettab/cases0
@@ -1,4 +1,5 @@
start:gettab_key_table
+label:mn_only,db
cmd:gettab key=xcatdport site.value
check:rc==0
check:output==3001
@@ -7,6 +8,7 @@ end
start:gettab_H
description:gettab -H and --with-fieldname
+label:mn_only,db
cmd:gettab -H key=master site.value
check:rc==0
check:output=~site.value:
@@ -17,6 +19,7 @@ end
start:gettab_err
description:gettab with error symble ,error key ,error attr.
+label:mn_only,db
cmd:gettab -c
check:rc!=0
check:output=~Usage
@@ -30,6 +33,7 @@ end
start:gettab_h
description:gettab -h and -? and --help
+label:mn_only,db
cmd:gettab -h
check:output=~Usage
cmd:gettab -?
diff --git a/xCAT-test/autotest/testcase/go-xcat/bionic-ppc64el.sources.list b/xCAT-test/autotest/testcase/go-xcat/bionic-ppc64el.sources.list
new file mode 100644
index 000000000..e29184320
--- /dev/null
+++ b/xCAT-test/autotest/testcase/go-xcat/bionic-ppc64el.sources.list
@@ -0,0 +1,3 @@
+deb http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe
+deb http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted universe
+deb http://ports.ubuntu.com/ubuntu-ports bionic-security main restricted universe
diff --git a/xCAT-test/autotest/testcase/go-xcat/bionic-x86_64.sources.list b/xCAT-test/autotest/testcase/go-xcat/bionic-x86_64.sources.list
new file mode 100644
index 000000000..1af261f7a
--- /dev/null
+++ b/xCAT-test/autotest/testcase/go-xcat/bionic-x86_64.sources.list
@@ -0,0 +1,3 @@
+deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
+deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
+deb http://archive.ubuntu.com/ubuntu bionic-security main restricted universe
diff --git a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le
deleted file mode 100644
index 95cfd0751..000000000
--- a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le
+++ /dev/null
@@ -1,60 +0,0 @@
-start:Diskless_installation_flat_p8_le
-os:Linux
-
-cmd:copycds $$ISO
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:makedhcp -n
-check:rc==0
-cmd:makedhcp -a
-check:rc==0
-cmd:makeconservercf $$CN
-check:rc==0
-cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi
-check:rc==0
-
-cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -d /install/custom/netboot/sles ]; then mkdir -p /install/custom/netboot/sles; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -d /install/custom/netboot/rh ]; then mkdir -p /install/custom/netboot/rh; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -d /install/custom/netboot/ubuntu ]; then mkdir -p /install/custom/netboot/ubuntu; fi; fi
-check:rc==0
-cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -e /install/custom/netboot/sles/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/sles/compute.synclist; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -e /install/custom/netboot/rh/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/rh/compute.synclist; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -e /install/custom/netboot/ubuntu/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/ubuntu/compute.synclist;fi; fi
-check:rc==0
-cmd:if cat /etc/*release |grep SUSE >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/install/custom/netboot/sles/compute.synclist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/install/custom/netboot/rh/compute.synclist;elif cat /etc/*release |grep "Ubuntu" >/dev/null; then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists=/install/custom/netboot/ubuntu/compute.synclist;fi
-check:rc==0
-cmd:if [ ! -d /tmp/mountoutput ]; then mkdir -p /tmp/mountoutput; fi
-cmd:mount |sort > /tmp/mountoutput/file.org
-cmd:cat /tmp/mountoutput/file.org
-cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
-check:rc==0
-cmd:mount |sort > /tmp/mountoutput/file.new
-cmd:cat /tmp/mountoutput/file.new
-cmd:diff /tmp/mountoutput/file.org /tmp/mountoutput/file.new
-check:rc==0
-cmd:rm -rf /tmp/mountoutput
-cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
-check:rc==0
-cmd:chdef $$CN status=
-check:rc==0
-cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
-check:rc==0
-check:output=~Provision node\(s\)\: $$CN
-cmd:sleep 200
-cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 100 ];then break;fi done
-cmd:lsdef -l $$CN | grep status
-check:output=~booted
-cmd:xdsh $$CN date
-check:rc==0
-check:output=~\d\d:\d\d:\d\d
-cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
-cmd:rinstall $$CN osimage
-check:rc==0
-cmd:sleep 200
-cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 100 ];then break;fi done
-cmd:lsdef -l $$CN | grep status
-check:output=~booted
-cmd:xdsh $$CN date
-check:rc==0
-check:output=~\d\d:\d\d:\d\d
-cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
-cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
-check:rc==0
-end
diff --git a/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le
deleted file mode 100644
index c7d72b166..000000000
--- a/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le
+++ /dev/null
@@ -1,46 +0,0 @@
-start:Full_installation_flat_p8_le
-os:Linux
-
-cmd:copycds $$ISO
-check:rc==0
-cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi
-check:rc==0
-cmd:chtab key=extntpservers site.value=""
-check:rc==0
-cmd:chtab key=ntpservers site.value=""
-check:rc==0
-cmd:makentp
-check:rc==0
-cmd:makedhcp -n
-check:rc==0
-cmd:makedhcp -a
-check:rc==0
-cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:makeconservercf $$CN
-check:rc==0
-cmd:cat /etc/conserver.cf | grep $$CN
-check:output=~$$CN
-cmd:if [ "__GETNODEATTR($$CN,os)__" != "sles12.1" ];then chdef -t node -o $$CN postscripts=setupntp; fi
-cmd:lsdef -l $$CN
-check:rc==0
-cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
-check:rc==0
-check:output=~Provision node\(s\)\: $$CN
-cmd:sleep 600
-cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 60;((a++));if [ $a -gt 50 ];then break;fi done
-cmd:ping $$CN -c 3
-check:output=~64 bytes from $$CN
-cmd:lsdef -l $$CN | grep status
-check:output=~booted
-cmd:xdsh $$CN date
-check:rc==0
-check:output=~\d\d:\d\d:\d\d
-#comment for futher discussion.
-#cmd:xdsh $$CN service ntpd status
-#check:rc==0
-#check:output=~running
-cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
-end
diff --git a/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case b/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case
index 4184572fc..574ab5307 100644
--- a/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case
+++ b/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case
@@ -1,6 +1,7 @@
start:SN_diskless_setup_case
description:this case is used to test diskless service node installation
os:Linux
+label:sn_diskless,provision
#stop:yes
cmd:fdisk -l
cmd:df -T
diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case
index 0853c7cd3..4b3e5f1ee 100644
--- a/xCAT-test/autotest/testcase/installation/SN_setup_case
+++ b/xCAT-test/autotest/testcase/installation/SN_setup_case
@@ -1,5 +1,6 @@
start:SN_setup_case
os:Linux
+label:sn_diskful,provision
#stop:yes
cmd:fdisk -l
cmd:df -T
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy
deleted file mode 100644
index b79e4e9fd..000000000
--- a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy
+++ /dev/null
@@ -1,99 +0,0 @@
-start:reg_linux_SN_installation_hierarchy
-os:Linux
-
-cmd:chtab key=nameservers site.value=""
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:makeconservercf
-check:rc==0
-cmd:cat /etc/conserver.cf | grep $$SN
-check:output=~$$SN
-cmd:sleep 20
-cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "ppc64" ]]; then getmacs -D $$SN; fi
-check:rc==0
-cmd:makedhcp -n
-check:rc==0
-cmd:makedhcp -a
-check:rc==0
-cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$SN);[ $? -ne 0 ] && exit 1;echo $output|grep $$SN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
-check:rc==0
-cmd:chdef -t node $$SN groups=service,all
-check:rc==0
-cmd:chdef -t group -o service profile=service primarynic=mac installnic=mac
-check:rc==0
-cmd:chdef -t group -o service setupnfs=1 setupdhcp=1 setuptftp=1 setupnameserver=1 setupconserver=1
-check:rc==0
-cmd:chdef -t group -o service nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN monserver=$$MN
-check:rc==0
-cmd:chtab node=service postscripts.postscripts="servicenode"
-check:rc==0
-
-cmd:copycds $$ISO
-check:rc==0
-
-cmd:chdef -t site clustersite installloc="/install"
-check:rc==0
-
-cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo .
-check:rc==0
-#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/sles$ver/__GETNODEATTR($$SN,arch)__ && createrepo . ;elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/rh$ver/__GETNODEATTR($$SN,arch)__ && createrepo . ;fi
-#check:rc==0
-
-cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__
-check:rc==0
-#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
-#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.__GETNODEATTR($$SN,os).__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
-#check:rc==0
-
-cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "7.0" |grep "Red Hat">/dev/null;then chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.__GETNODEATTR($$SN,os)__.ppc64.otherpkgs.pkglist;elif cat /etc/*release |grep "Red Hat" |grep "6.5">/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
-
-check:rc==0
-
-#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;for i in mysql-client libmysqlclient_r15 libqt4-sql-mysql libmysqlclient15 perl-DBD-mysql mysql; do cat /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; fi done; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;for i in mysql; do cat /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist; fi done;fi
-#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;for i in mariadb-devel-5.5.35-3.el7 mariadb-libs-5.5.35-3.el7 mariadb-server-5.5.35-3.el7 mariadb-bench-5.5.35-3.el7 mariadb-5.5.35-3.el7 perl-DBD-MySQL mysql-connector-odbc unixODBC; do cat /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; fi done; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=__GETNODEATTR($$SN,os)__;for i in mysql; do cat /opt/xcat/share/xcat/install/rh/service.$ver.ppc64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.$ver.ppc64.pkglist; fi done;fi
-check:rc==0
-#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.pkglist;fi
-check:rc==0
-cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkgdir="/install/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__"
-check:rc==0
-
-cmd:rinstall $$SN osimage=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service
-check:rc==0
-check:output=~Provision node\(s\)\: $$SN
-
-cmd:sleep 600
-cmd:a=0;while ! `lsdef -l $$SN|grep status|grep booted >/dev/null`; do sleep 60;((a++));if [ $a -gt 70 ];then break;fi done
-
-cmd:ping $$SN -c 3
-check:rc==0
-check:output=~64 bytes from $$SN
-cmd:lsdef -l $$SN | grep status
-check:rc==0
-check:output=~booted
-cmd:xdsh $$SN date
-check:rc==0
-check:output=~\d\d:\d\d:\d\d
-cmd:xdsh $$SN "ps -ef |grep xcatd"
-check:rc==0
-check:output=~xcatd:
-cmd:xdsh $$SN "lsdef"
-check:rc==0
-check:output=~$$SN: $$SN
-cmd:xdsh $$SN "tabdump site"
-check:rc==0
-check:output=~tftpdir
-cmd:xdsh $$SN "mount"
-check:rc==0
-check:output=~/install on /install
-cmd:xdsh $$SN "mount"
-check:rc==0
-check:output=~/tftpboot on /tftpboot
-#cmd:xdsh $$SN "nslookup $$CN"
-#check:rc==0
-#check:output!~server can't find $$CN
-
-cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if cat /etc/*release |grep SUSE >/dev/null;then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif cat /etc/*release |grep "Red Hat" >/dev/null;then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
-check:rc==0
-cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
-end
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat
index be95f5d86..0df3cf3dd 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat
@@ -1,5 +1,6 @@
start:reg_linux_diskfull_installation_flat
os:Linux
+label:flat_cn_diskful,provision
#stop:yes
cmd:fdisk -l
cmd:df -T
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed
index 713b04959..5d6d45f87 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed
@@ -2,7 +2,7 @@ start:reg_linux_diskfull_installation_flat_postscripts_failed
description:This case is for postscripts failed the status will return failed during diskfull installation.
attribute:$$CN-The operation object of diskfull installation.
os:Linux
-
+label:others,postscripts,invoke_provison
cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
cmd:MINIISO=NUll;if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]] && [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi
check:rc==0
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy
index a21b71002..2dc2af6ac 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy
@@ -1,5 +1,6 @@
start:reg_linux_diskfull_installation_hierarchy
os:Linux
+label:hierarchy_cn_diskful,provision
#stop:yes
cmd:xdsh $$SN fdisk -l
cmd:xdsh $$SN df -T
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat
index 6fde471d5..f183bba92 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat
@@ -1,5 +1,6 @@
start:reg_linux_diskless_installation_flat
os:Linux
+label:flat_cn_diskless,provision
#stop:yes
cmd:fdisk -l
cmd:df -T
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed
index 37f3d0d0f..0121d2249 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed
@@ -2,6 +2,7 @@ start:reg_linux_diskless_installation_flat_postscripts_failed
description:This case is for postscripts failed the status will return failed during diskless installation.
attribute:$$CN-The operation object of diskless installation.
os:Linux
+label:others,postscripts,invoke_provison
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
check:rc==0
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy
index d846fca5a..23354bf69 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy
@@ -1,6 +1,7 @@
start:reg_linux_diskless_installation_hierarchy
os:Linux
#stop:yes
+label:hierarchy_cn_diskless,provision
cmd:xdsh $$SN fdisk -l
cmd:xdsh $$SN df -T
cmd:xdsh $$SN "echo "test"> /test.hierarchy"
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat
index de1331b54..2b3c37a7b 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat
@@ -1,5 +1,6 @@
start:reg_linux_statelite_installation_flat
os:Linux
+label:others,provision,statelite
#stop:yes
cmd:fdisk -l
cmd:df -T
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs
index 802491f64..7fdbd8707 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs
@@ -1,5 +1,6 @@
start:reg_linux_statelite_installation_hierarchy_by_nfs
os:Linux
+label:others,provision,statelite
#stop:yes
cmd:xdsh $$SN fdisk -l
cmd:xdsh $$SN df -T
diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk
index c61e15ac2..822c68b58 100644
--- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk
+++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk
@@ -1,5 +1,6 @@
start:reg_linux_statelite_installation_hierarchy_by_ramdisk
os:Linux
+label:others,provision,statelite
#stop:yes
cmd:xdsh $$SN fdisk -l
cmd:xdsh $$SN df -T
diff --git a/xCAT-test/autotest/testcase/installation/switch_to_dns_forward_mode b/xCAT-test/autotest/testcase/installation/switch_to_dns_forward_mode
index 62197d18c..bded58aa9 100644
--- a/xCAT-test/autotest/testcase/installation/switch_to_dns_forward_mode
+++ b/xCAT-test/autotest/testcase/installation/switch_to_dns_forward_mode
@@ -1,7 +1,7 @@
start:switch_to_dns_forward_mode
description:The test case is used to switch the whole testing cluster to run in dns forward mode. This test case should run after service node deployment.
os:Linux
-
+label:others,dns
##
# Check if everything is fine
##
diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm
deleted file mode 100644
index 107cca3dc..000000000
--- a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm
+++ /dev/null
@@ -1,50 +0,0 @@
-start:Ubuntu_diskless_installation_flat_x86_vm
-os:Linux
-
-cmd:copycds $$ISO
-check:rc==0
-cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
-check:rc=0
-#comment for vm debug
-#cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p ;mkvm $$CN -s 20G; fi;fi
-cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi
-check:rc=0
-cmd:makedns -n
-check:rc==0
-cmd:makedhcp -n
-check:rc==0
-cmd:makedhcp -a
-check:rc==0
-cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
-check:rc==0
-cmd:makeconservercf $$CN
-check:rc==0
-cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi
-check:rc==0
-cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
-check:rc==0
-cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
-check:rc==0
-cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
-check:rc==0
-check:output=~Provision node\(s\)\: $$CN
-cmd:sleep 200
-cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
-cmd:lsdef -l $$CN | grep status
-check:output=~booted
-cmd:xdsh $$CN date
-check:rc==0
-check:output=~\d\d:\d\d:\d\d
-cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
-cmd:rinstall $$CN osimage
-check:rc==0
-cmd:sleep 200
-cmd:lsdef -l $$CN | grep status
-check:output=~booted
-cmd:xdsh $$CN date
-check:rc==0
-check:output=~\d\d:\d\d:\d\d
-cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
-cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
-check:rc==0
-end
diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm
deleted file mode 100644
index 35f0dd22b..000000000
--- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm
+++ /dev/null
@@ -1,32 +0,0 @@
-start:Ubuntu_full_installation_flat_x86_vm
-os:Linux
-
-cmd:copycds $$ISO
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:sleep 60
-cmd:makedhcp -n
-check:rc==0
-cmd:makedhcp -a
-check:rc==0
-cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
-check:rc==0
-cmd:makeconservercf $$CN
-check:rc==0
-cmd:cat /etc/conserver.cf | grep $$CN
-check:output=~$$CN
-cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
-check:rc==0
-check:output=~Provision node\(s\)\: $$CN
-cmd:sleep 300
-cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
-cmd:ping $$CN -c 3
-check:output=~64 bytes from $$CN
-cmd:lsdef -l $$CN | grep status
-check:output=~booted
-cmd:xdsh $$CN date
-check:rc==0
-check:output=~\d\d:\d\d:\d\d
-cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
-end
diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker
index fb47e1044..590853fe4 100644
--- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker
+++ b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker
@@ -1,5 +1,6 @@
start:Full_installation_flat_docker
os:Linux
+label:others,docker,invoke_provison
cmd:copycds $$ISO
check:rc==0
cmd:makedns -n
diff --git a/xCAT-test/autotest/testcase/lsdef/cases0 b/xCAT-test/autotest/testcase/lsdef/cases0
index eeae5f910..731065f5f 100644
--- a/xCAT-test/autotest/testcase/lsdef/cases0
+++ b/xCAT-test/autotest/testcase/lsdef/cases0
@@ -1,5 +1,6 @@
start:lsdef_null
description: lsdef without any flag
+label:mn_only,db
cmd:mkdef -t node -o testnodell groups=all
check:rc==0
cmd:lsdef
@@ -11,6 +12,7 @@ end
start:lsdef_a
description: lsdef -a and lsdef --all
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
@@ -35,6 +37,7 @@ end
start:lsdef_t_o_l
description: lsdef -o -l
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
@@ -56,6 +59,7 @@ end
start:lsdef_t_o_l_z
description: lsdef -l -z
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
@@ -76,6 +80,7 @@ end
start:lsdef_t
description: lsdef -t
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
@@ -90,6 +95,7 @@ end
start:lsdef_t_i_o
description: lsdef -i
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:lsdef -t node -o testnode -i groups
@@ -107,6 +113,7 @@ cmd:rmdef -t network testnetwork
end
start:lsdef_t_w
+label:mn_only,db
cmd:mkdef -t node -o testnode11,testnode21 cons=hmc groups=all
check:rc==0
cmd:mkdef -t node -o testnode31,testnode41 cons=ipmi groups=linux
@@ -137,6 +144,7 @@ end
start:lsdef_s
description: lsdef -s
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all
check:rc==0
cmd:lsdef -s testnode
@@ -147,6 +155,7 @@ end
start:lsdef_t_auditlog
description:lsdef -t auditlog
+label:mn_only,db
cmd:tabprune auditlog -a
check:rc==0
cmd:lsdef -t auditlog
@@ -156,6 +165,7 @@ end
start:lsdef_t_eventlog
description:lsdef -t eventlog
+label:mn_only,db
cmd:tabprune eventlog -a
check:rc==0
cmd:lsdef -t eventlog
@@ -165,6 +175,7 @@ end
start:lsdef_t_policy
description:lsdef -t policy
+label:mn_only,db
cmd:lsdef -t policy
check:rc==0
check:output=~1\s+\(policy\)
@@ -175,6 +186,7 @@ end
start:lsdef_t_site
description:lsdef -t site
+label:mn_only,db
cmd:lsdef -t site
check:rc==0
check:output=~clustersite
@@ -185,6 +197,7 @@ end
start:lsdef_t_err
description:lsdef -t wrongtype -o
+label:mn_only,db
cmd:lsdef -t wrongtype -o test
check:rc!=0
check:output=~Error
@@ -192,6 +205,7 @@ end
start:lsdef_t_h_i
description:lsdef -t node -h -i status
+label:mn_only,db
cmd:lsdef -t node -h -i status
check:rc==0
check:output=~status
@@ -199,6 +213,7 @@ end
start:lsdef_nics
description:lsdef --nics
+label:mn_only,db
cmd:mkdef -t node -o testnode1 groups=all mgt=ipmi nicips.eth0=1.1.1.1
check:rc==0
cmd:lsdef testnode1 --nics
@@ -211,8 +226,8 @@ check:output=~Could not find
end
start:lsdef_template
-os:linux
description:check xCAT supported template
+label:mn_only,db
cmd:lsdef --template
check:rc==0
check:output=~hmc\-template \(node\)
@@ -224,8 +239,8 @@ check:output=~x86_64kvmguest\-template \(node\)
end
start:lsdef_template_switch_template
-os:linux
description:check xCAT supported template for switch template
+label:mn_only,db
cmd:lsdef --template switch-template
check:rc==0
check:output=~Object name\: switch-template
@@ -241,7 +256,7 @@ check:output=~switchtype\=OPTIONAL\:The type of switch
end
start:lsdef_template_with_invalid_name
-os:linux
+label:mn_only,db
description:lsdef --template with invalid template name
cmd:result=`lsdef | grep test_with_invalid_name`; if [[ $result =~ "test_with_invalid_name" ]]; then noderm test_with_invalid_name; fi
cmd:lsdef --template "test_with_invalid_name"
diff --git a/xCAT-test/autotest/testcase/lsxcatd/cases0 b/xCAT-test/autotest/testcase/lsxcatd/cases0
index 54568165f..59f0f5bfa 100644
--- a/xCAT-test/autotest/testcase/lsxcatd/cases0
+++ b/xCAT-test/autotest/testcase/lsxcatd/cases0
@@ -1,11 +1,13 @@
start:lsxcatd_null
description:lsxcatd without any flag
+label:mn_only,xcatd
cmd:lsxcatd
check:output=~lsxcatd
end
start:lsxcatd_h
description:lsxcatd -h
+label:mn_only,xcatd
cmd:lsxcatd -h
check:rc==0
check:output=~lsxcatd
@@ -13,6 +15,7 @@ end
start:lsxcatd_d
description:lsxcatd -d
+label:mn_only,xcatd
cmd:lsxcatd -d
check:rc==0
check:output=~(cfgloc|dbengine|dbinstance|dbname|dbloc)
@@ -20,6 +23,7 @@ end
start:lsxcatd_a
description:lsxcatd -a
+label:mn_only,xcatd
cmd:lsxcatd -a
check:rc==0
check:output=~Version
diff --git a/xCAT-test/autotest/testcase/makeconservercf/cases0 b/xCAT-test/autotest/testcase/makeconservercf/cases0
index 963dbb695..219778d81 100644
--- a/xCAT-test/autotest/testcase/makeconservercf/cases0
+++ b/xCAT-test/autotest/testcase/makeconservercf/cases0
@@ -3,9 +3,9 @@ cmd:chdef -t node -o testnodetmp cons=hmc groups=all
cmd:makeconservercf testnodetmp
check:rc==0
cmd:cat /etc/conserver.cf
-check:output=~console testnodetmp {
+check:output=~console testnodetmp \{
check:output=~ /opt/xcat/share/xcat/cons/hmc testnodetmp;
-check:output=~}
+check:output=~\}
cmd:rmdef -t node testnodetmp
end
@@ -14,9 +14,9 @@ cmd:chdef -t node -o testnodetmp cons=hmc groups=all
cmd:makeconservercf testnodetmp
check:rc==0
cmd:cat /etc/conserver.cf
-check:output=~console testnodetmp {
+check:output=~console testnodetmp \{
check:output=~ /opt/xcat/share/xcat/cons/hmc testnodetmp;
-check:output=~}
+check:output=~\}
cmd:rmdef -t node testnodetmp
end
diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0
index d676640ba..c522ef2a3 100644
--- a/xCAT-test/autotest/testcase/makedhcp/cases0
+++ b/xCAT-test/autotest/testcase/makedhcp/cases0
@@ -1,5 +1,7 @@
start:makedhcp_n
+description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on
os:Linux
+label:mn_only,dhcp
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
cmd:makedhcp -n
check:rc==0
@@ -16,6 +18,7 @@ end
start:makedhcp_h
description:help
+label:mn_only,dhcp
cmd:makedhcp -h
check:rc==0
check:output=~Usage
@@ -23,6 +26,7 @@ end
start:makedhcp_help
description:help
+label:mn_only,dhcp
cmd:makedhcp -h
check:rc==0
check:output=~Usage
@@ -42,22 +46,10 @@ check:output=~dhcpd
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
end
-start:makedhcp_n_aix
-description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on
-os:Aix
-cmd:mv -f /etc/dhcpsd.cnf /etc/dhcpsd.conf.bak
-cmd:makedhcp -n
-check:rc==0
-cmd:ls /etc/dhcpsd.cnf
-check:rc==0
-cmd:ps -e | grep dhcpd
-check:rc==0
-check:output=~dhcpd
-end
-
start:makedhcp_a_linux
description:Define all nodes to the DHCP server. (Will only add nodes that can be reached, network-wise, by this DHCP server.) The dhcp daemon does not have to be restarted after this.
os:Linux
+label:mn_only,dhcp
cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64
cmd:chdef -t node -o testnode1 netboot=yaboot tftpserver=192.16.10.0 nfsserver=192.16.10.0 monserver=192.16.10.0 xcatmaster=192.16.10.0 installnic="mac" primarynic="mac"
cmd:lsdef -l testnode1 -z > /tmp/CN.stanza
@@ -76,6 +68,7 @@ end
start:makedhcp_a_d_linux
os:Linux
+label:mn_only,dhcp
cmd:lsdef -t node -l -z > /tmp/all.nodes
cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64
cmd:mkdef -t node -o testnode2 groups=compute mac=11:22:33:55:66:99 arch=ppc64
@@ -94,12 +87,13 @@ check:output=~testnode2
cmd:cat /tmp/all.nodes | chdef -z
cmd:rmdef testnode1
cmd:rmdef testnode2
-#cmd:rm -f /tmp/1 /tmp/2
+cmd:rm -f /tmp/1 /tmp/2
end
start:makedhcp_d_linux
description:Delete all node entries, added by xCAT, in the noderange from the DHCP server configuration.
os:Linux
+label:mn_only,dhcp
cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64
cmd:chdef -t node -o testnode1 netboot=yaboot tftpserver=192.16.10.0 nfsserver=192.16.10.0 monserver=192.16.10.0 xcatmaster=192.16.10.0 installnic="mac" primarynic="mac"
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
@@ -122,6 +116,7 @@ end
start:makedhcp_a
os:Linux
+label:cn_os_ready,dhcp
cmd:lsdef -l $$CN -z > /tmp/$$CN.stanza
cmd:chdef -t node -o $$CN mac=11:22:33:44:55:66
cmd:makedhcp -a
@@ -133,8 +128,10 @@ check:output=~11:22:33:44:55:66
cmd:chdef -t node -o $$CN mac=
cmd:cat /tmp/$$CN.stanza | chdef -z
end
+
start:makedhcp_a_ubuntu
-os:Linux
+os:ubuntu
+label:cn_os_ready,dhcp
cmd:lsdef -l $$CN -z > /tmp/$$CN.stanza
cmd:chdef -t node -o $$CN mac=11:22:33:44:55:66
cmd:makedhcp -a
@@ -148,6 +145,7 @@ end
start:makedhcp_a_d
os:Linux
+label:cn_os_ready,dhcp
cmd:makedhcp -a -d
check:rc==0
cmd:service dhcpd restart
@@ -156,8 +154,10 @@ check:rc==0
check:output!~$$CN
cmd:makedhcp -a
end
+
start:makedhcp_a_d_ubuntu
-os:Linux
+os:ubuntu
+label:cn_os_ready,dhcp
cmd:makedhcp -a -d
check:rc==0
cmd:service isc-dhcp-server restart
@@ -168,6 +168,7 @@ end
start:makedhcp_d
os:Linux
+label:cn_os_ready,dhcp
cmd:makedhcp -d $$CN
check:rc==0
cmd:service dhcpd restart
@@ -178,6 +179,8 @@ end
start:makedhcp_remote_network
descriptiion:This case is to test when there is mgtifname='!remote!', makedhcp could work correctly and create entrys in dhcp lease file.
+os:linux
+label:mn_only,dhcp
cmd:mkdef -t network -o testnetwork net=100.100.100.0 mask=255.255.255.0 mgtifname='!remote!eth0' gateway=100.100.100.1
check:rc==0
cmd:lsdef -t network
diff --git a/xCAT-test/autotest/testcase/makedns/cases0 b/xCAT-test/autotest/testcase/makedns/cases0
index e39a35857..bc4f6aa96 100644
--- a/xCAT-test/autotest/testcase/makedns/cases0
+++ b/xCAT-test/autotest/testcase/makedns/cases0
@@ -1,5 +1,6 @@
start:makedns_h
description:help
+label:mn_only,dns
cmd:makedns -h
check:rc==0
cmd:makedns --help
@@ -9,6 +10,7 @@ end
start:makedns_d_node
description:makedns -d noderange
+label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:chdef -t node -o dnstestnode groups=all ip=100.100.100.1
@@ -35,6 +37,7 @@ end
start:makedns_node
description:makedns noderange
+label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:chdef -t node -o dnstestnode groups=all ip=100.100.100.1
@@ -61,6 +64,8 @@ end
start:makedns_ubuntu_n
description:makedns -n
+os:ubuntu
+label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@@ -90,8 +95,11 @@ cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output~=(server can't find dnstestnode)
end
+
start:makedns_n
description:makedns -n
+os:rhels,sles
+label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@@ -124,6 +132,7 @@ end
start:makedns
description:makedns
+label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:makedns -n
@@ -171,6 +180,7 @@ end
start:makedns_environment_check_forworder_mode
description:check basic environment of makedns in hierarchical arch and sn acts forworder
os:rhels
+label:cn_os_ready,dns
cmd:chtab key=nameservers site.value=""
check:rc==0
cmd:chdef service setupnameserver=1 setupdhcp=1
@@ -237,6 +247,7 @@ end
start:makedns_environment_check_forworder_mode
description:check basic environment of makedns in hierarchical arch and sn acts forworder
os:sles
+label:cn_os_ready,dns
cmd:chtab key=nameservers site.value=""
check:rc==0
cmd:chdef service setupnameserver=1 setupdhcp=1
@@ -301,88 +312,10 @@ check:output~=running
end
-start:makedns_environment_check_forworder_mode
-description:check basic environment of makedns in hierarchical arch and sn acts forworder
-os:AIX
-cmd:chtab key=nameservers site.value=""
-check:rc==0
-cmd:chdef service setupnameserver=1 setupdhcp=1
-check:rc==0
-cmd:tabdump servicenode
-check:rc==0
-cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
-check:rc==0
-cmd:cp /etc/hosts /etc/hosts.testbak
-check:rc==0
-cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-cmd:more /etc/resolv.conf|grep nameserver
-check:rc==0
-cmd:xdsh $$SN "more /etc/resolv.conf|grep nameserver"
-check:rc==0
-cmd:xdsh $$CN "more /etc/resolv.conf|grep nameserver"
-cmd:tabdump site|grep nameservers
-check:rc==0
-cmd:tabdump networks
-check:rc==0
-cmd:lsdef $$SN -i setupnameserver|grep setupnameserver
-check:rc==0
-check:output~=1
-cmd:lsdef $$SN -i setupdhcp|grep setupdhcp
-check:rc==0
-check:output~=1
-cmd:lssrc -s named
-check:output~=active
-cmd:nslookup dnstestnode $$MN
-check:output~=Server: $$MN
-check:output!~(server can't find dnstestnode)
-cmd:xdsh $$SN "lssrc -s named"
-check:output~=active
-cmd:xdsh $$SN "more /etc/named.conf"
-check:rc==0
-check:output~=forward only
-cmd:nslookup $$SN $$MN
-check:output~=Server: $$MN
-check:output!~(server can't find $$SN)
-cmd:nslookup dnstestnode $$SN
-check:output~=Server: $$SN
-check:output!~(server can't find dnstestnode)
-cmd:rm -f /etc/hosts
-check:rc==0
-cmd:mv /etc/hosts.testbak /etc/hosts
-check:rc==0
-cmd:chtab -d netname=testnetwork networks
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-end
-
-
start:makedns_environment_check_master_slave_mode
description:check basic environment of makedns in hierarchical arch and sn acts slave
os:rhels
+label:cn_os_ready,dns
cmd:chtab key=nameservers site.value=",$$MNIP"
check:rc==0
cmd:chdef service setupnameserver=2 setupdhcp=1
@@ -453,6 +386,7 @@ end
start:makedns_environment_check_master_slave_mode
description:check basic environment of makedns in hierarchical arch and sn acts slave
os:sles
+label:cn_os_ready,dns
cmd:chtab key=nameservers site.value=",$$MNIP"
check:rc==0
cmd:chdef service setupnameserver=2 setupdhcp=1
@@ -520,88 +454,12 @@ cmd:xdsh $$SN "service xcatd status"
check:output~=running
end
-start:makedns_environment_check_master_slave_mode
-description:check basic environment of makedns in hierarchical arch and sn acts slave
-os:AIX
-cmd:chtab key=nameservers site.value=",$$MNIP"
-check:rc==0
-cmd:chdef service setupnameserver=2 setupdhcp=1
-check:rc==0
-cmd:tabdump servicenode
-check:rc==0
-cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
-check:rc==0
-cmd:cp /etc/hosts /etc/hosts.testbak
-check:rc==0
-cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-cmd:more /etc/resolv.conf|grep nameserver
-check:rc==0
-cmd:xdsh $$SN "more /etc/resolv.conf|grep nameserver"
-check:rc==0
-cmd:xdsh $$CN "more /etc/resolv.conf|grep nameserver"
-cmd:tabdump site|grep nameservers
-check:rc==0
-cmd:tabdump networks
-check:rc==0
-cmd:lsdef $$SN -i setupnameserver|grep setupnameserver
-check:rc==0
-check:output~=2
-cmd:lsdef $$SN -i setupdhcp|grep setupdhcp
-check:rc==0
-check:output~=1
-cmd:lssrc -s named
-check:output~=active
-cmd:nslookup dnstestnode $$MN
-check:output~=Server: $$MN
-check:output!~(server can't find dnstestnode)
-cmd:xdsh $$SN "lssrc -s named"
-check:output~=active
-cmd:xdsh $$SN "more /etc/named.conf"
-check:rc==0
-check:output~=type slave
-cmd:nslookup $$SN $$MN
-check:output~=Server: $$MN
-check:output!~(server can't find $$SN)
-cmd:nslookup dnstestnode $$SN
-check:output~=Server: $$SN
-check:output!~(server can't find dnstestnode)
-cmd:rm -f /etc/hosts
-check:rc==0
-cmd:mv /etc/hosts.testbak /etc/hosts
-check:rc==0
-cmd:chtab -d netname=testnetwork networks
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-end
#---------------------------------------------------------------------
start:makedns_when_nameserver_on_mn_down
description:when nameserver on mn down, nameserver on sn should provide service
os:rhels
+label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@@ -660,6 +518,7 @@ end
start:makedns_when_nameserver_on_mn_down
description:when nameserver on mn down, nameserver on sn should provide service
os:sles
+label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@@ -711,76 +570,11 @@ cmd:xdsh $$SN "service xcatd status"
check:output~=running
end
-start:makedns_when_nameserver_on_mn_down
-description:when nameserver on mn down, nameserver on sn should provide service
-os:AIX
-cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
-check:rc==0
-cmd:cp /etc/hosts /etc/hosts.testbak
-check:rc==0
-cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:lssrc -s named
-check:output~=active
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-cmd:nslookup dnstestnode $$MN
-check:output~=Server: $$MN
-check:output!~(server can't find dnstestnode)
-cmd:sleep 5
-cmd:nslookup dnstestnode $$SN
-check:output~=Server: $$SN
-check:output!~(server can't find dnstestnode)
-cmd:stopsrc -s named
-check:rc==0
-cmd:sleep 3
-cmd:lssrc -s named
-check:output~=inoperative
-cmd:nslookup dnstestnode $$MN
-check:output~=Server: $$MN
-check:output~=(server can't find dnstestnode)
-cmd:sleep 5
-cmd:nslookup dnstestnode $$SN
-check:output~=Server: $$SN
-check:output!~(server can't find dnstestnode)
-cmd:startsrc -s named
-check:rc==0
-cmd:lssrc -a |grep named
-check:rc==0
-check:output~=active
-cmd:rm -f /etc/hosts
-check:rc==0
-cmd:mv /etc/hosts.testbak /etc/hosts
-check:rc==0
-cmd:chtab -d netname=testnetwork networks
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-end
start:makedns_when_nameserver_on_sn_down
description:when nameserver on sn down, nameserver on mn should provide service
os:rhels
+label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@@ -841,6 +635,7 @@ end
start:makedns_when_nameserver_on_sn_down
description:when nameserver on sn down, nameserver on mn should provide service
os:sles
+label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@@ -893,78 +688,11 @@ check:rc==0
check:output~=running
end
-
-start:makedns_when_nameserver_on_sn_down
-description:when nameserver on sn down, nameserver on mn should provide service
-os:AIX
-cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
-check:rc==0
-cmd:cp /etc/hosts /etc/hosts.testbak
-check:rc==0
-cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:lssrc -s named
-check:output~=active
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-cmd:nslookup dnstestnode $$MN
-check:output~=Server: $$MN
-check:output!~(server can't find dnstestnode)
-cmd:sleep 10
-cmd:nslookup dnstestnode $$SN
-check:output~=Server: $$SN
-check:output!~(server can't find dnstestnode)
-cmd:xdsh $$SN "stopsrc -s named"
-check:rc==0
-cmd:xdsh $$SN "lssrc -s named"
-check:rc==0
-check:output~=inoperative
-cmd:nslookup dnstestnode $$MN
-check:output~=Server: $$MN
-check:output!~(server can't find dnstestnode)
-cmd:sleep 5
-cmd:nslookup dnstestnode $$SN
-check:output~=Server: $$SN
-check:output~=(server can't find dnstestnode)
-cmd:xdsh $$SN "startsrc -s named"
-check:rc==0
-cmd:xdsh $$SN "lssrc -s named"
-check:rc==0
-check:output~=active
-cmd:rm -f /etc/hosts
-check:rc==0
-cmd:mv /etc/hosts.testbak /etc/hosts
-check:rc==0
-cmd:chtab -d netname=testnetwork networks
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-end
-
#999999999999999999999999999
start:makedns_nameserver_on_sn_sync_db
description:when nameserver's db on mn was changed, nameserver's db on sn should be synchronized
os:Linux
+label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:makedns -n
@@ -1004,67 +732,9 @@ check:rc==0
end
-start:makedns_nameserver_on_sn_sync_db
-description:when nameserver's db on mn was changed, nameserver's db on sn should be synchronized
-os:AIX
-cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-cmd:chdef -t node -o dnstestnode groups=all ip=100.100.100.2
-check:rc==0
-cmd:makedns dnstestnode
-check:rc==0
-cmd:nslookup dnstestnode $$MN
-check:rc==0
-check:output~=Server: $$MN
-check:output!~(server can't find dnstestnode)
-cmd:sleep 2
-cmd:nslookup dnstestnode $$SN
-check:rc==0
-check:output~=Server: $$SN
-check:output!~(server can't find dnstestnode)
-cmd:makedns -d dnstestnode
-check:rc==0
-cmd:nslookup dnstestnode $$MN
-check:output~=Server: $$MN
-check:output~=(server can't find dnstestnode)
-cmd:sleep 2
-cmd:nslookup dnstestnode $$SN
-check:output~=Server: $$SN
-check:output~=(server can't find dnstestnode)
-cmd:rmdef -t node dnstestnode
-check:rc==0
-cmd:chtab -d netname=testnetwork networks
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-
-end
-
start:makedns_nameserver_on_sn_sync_conf
description:when nameserver's conf file on mn was changed, nameserver's conf file on sn should be synchronized when xcatd restart
-os:Linux
+label:cn_os_ready,dns,
cmd:makedns -n
check:rc==0
cmd:cat /etc/named.conf
@@ -1105,68 +775,11 @@ check:rc==0
check:output!~=zone "100.100.100.IN-ADDR.ARPA."
end
-start:makedns_nameserver_on_sn_sync_conf
-description:when nameserver's conf file on mn was changed, nameserver's conf file on sn should be synchronized when xcatd restart
-os:AIX
-cmd:makedns -n
-check:rc==0
-cmd:cat /etc/named.conf
-check:rc==0
-check:output!~zone "100.100.100.IN-ADDR.ARPA."
-cmd:xdsh $$SN "cat /etc/named.conf"
-check:rc==0
-check:output!~zone "100.100.100.IN-ADDR.ARPA."
-cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:cat /etc/named.conf
-check:rc==0
-check:output~=zone "100.100.100.IN-ADDR.ARPA."
-cmd:xdsh $$SN "cat /etc/named.conf"
-check:rc==0
-check:output!~zone "100.100.100.IN-ADDR.ARPA."
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-cmd:xdsh $$SN "cat /etc/named.conf"
-check:rc==0
-check:output~=zone "100.100.100.IN-ADDR.ARPA."
-cmd:chtab -d netname=testnetwork networks
-check:rc==0
-cmd:makedns -n
-check:rc==0
-cmd:cat /etc/named.conf
-check:rc==0
-check:output!~zone "100.100.100.IN-ADDR.ARPA."
-cmd:xdsh $$SN "cat /etc/named.conf"
-check:rc==0
-check:output~=zone "100.100.100.IN-ADDR.ARPA."
-cmd:xdsh $$SN "stopsrc -s xcatd"
-check:rc==0
-cmd:sleep 5
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=inoperative
-cmd:xdsh $$SN "startsrc -s xcatd"
-check:rc==0
-cmd:sleep 10
-cmd:xdsh $$SN "lssrc -s xcatd"
-check:output~=active
-cmd:xdsh $$SN "cat /etc/named.conf"
-check:rc==0
-check:output!~=zone "100.100.100.IN-ADDR.ARPA."
-end
start:makedns_nameserver_on_sn_sync_db_when_sn_down
description:when nameserver's db on mn was changed and name server on SN down at the same time, when name server on SN restart, it should sync the latest name server db on MN
os:rhels
+label:cn_os_ready,dns
cmd:makedns -n
check:rc==0
cmd:service named status
@@ -1221,6 +834,7 @@ end
start:makedns_n_noderange
description:to verify makedns -n noderange works as design. add case for bug #2572. Test case bug number is #2826.
+label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:chdef -t node -o dnstestnode[1-10] groups=dnsnode ip="|dnstestnode(\d+)|100.100.100.(\$1+0)|"
diff --git a/xCAT-test/autotest/testcase/makehosts/cases0 b/xCAT-test/autotest/testcase/makehosts/cases0
index b0387aedd..077fd4db9 100644
--- a/xCAT-test/autotest/testcase/makehosts/cases0
+++ b/xCAT-test/autotest/testcase/makehosts/cases0
@@ -1,4 +1,5 @@
start:makehosts_h
+label:mn_only,dns
description:makehosts -h
cmd:makehosts -h
check:rc==0
@@ -6,6 +7,7 @@ check:output=~Usage
end
start:makehosts_help
+label:mn_only,dns
description:makehosts --help
cmd:makehosts --help
check:rc==0
@@ -14,6 +16,7 @@ end
start:makehosts_null
description:makehosts
+label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@@ -35,6 +38,7 @@ cmd:mv -f /etc/hosts.xcatbakautotest /etc/hosts
end
start:makehosts_l
+label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@@ -56,6 +60,7 @@ cmd:rm -rf /tmp/hosts
end
start:makehosts_d
+label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@@ -78,6 +83,7 @@ cmd:rm -f /tmp/1 /tmp/2
end
start:makehosts_n
+label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@@ -102,6 +108,7 @@ cmd:rm -rf /tmp/hosts
end
start:makehosts_n_noderange
+label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@@ -126,6 +133,7 @@ cmd:rm -rf /tmp/hosts
end
start:makehost_n_r
+label:mn_only,dns
descriptions:modify makehosts testcases according to special node name eg:s01 and s01r* . for issue #2717 and #2683
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:lsdef s01;if [ $? -eq 0 ]; then lsdef -l s01 -z >/tmp/s01.standa ;rmdef s01;fi
@@ -173,6 +181,7 @@ cmd:mv -f /etc/hosts.xcatbakautotest /etc/hosts
end
start:makehosts_regex
+label:mn_only,dns
description:this case is to test if makehosts support regex. This case is for bug 2578.
cmd:cp /etc/hosts /etc/hosts.bak
cmd:if lsdef -z sn4b;then lsdef -z sn4b|tee /tmp/sn4bdef;noderm sn4b;fi
diff --git a/xCAT-test/autotest/testcase/makenetworks/cases0 b/xCAT-test/autotest/testcase/makenetworks/cases0
index 11d24da82..def304fe6 100644
--- a/xCAT-test/autotest/testcase/makenetworks/cases0
+++ b/xCAT-test/autotest/testcase/makenetworks/cases0
@@ -19,19 +19,6 @@ check:rc==0
check:output=~Version
end
-start:makenetworks_d
-os:AIX
-cmd:makenetworks -d > /tmp/mynetworksstanzas
-check:rc==0
-cmd:echo "auto-testnetworks:\n objtype=network\n gateway=1.2.3.0\n mask=255.255.255.0\n net=1.2.3.1\n" >> /tmp/mynetworksstanzas
-cmd:cat /tmp/mynetworksstanzas | chdef -z
-check:rc==0
-cmd:tabdump networks
-check:output=~("auto-testnetworks","1.2.3.1","255.255.255.0",,"1.2.3.0",,,,,,,,,,,,)
-cmd:chtab -d netname=auto-testnetworks networks
-cmd:rm -f /tmp/mynetworksstanzas
-end
-
start:makenetworks_d
os:Linux
cmd:makenetworks -d > /tmp/mynetworksstanzas
diff --git a/xCAT-test/autotest/testcase/mkdef/cases0 b/xCAT-test/autotest/testcase/mkdef/cases0
index 968783972..6ed8a06b7 100644
--- a/xCAT-test/autotest/testcase/mkdef/cases0
+++ b/xCAT-test/autotest/testcase/mkdef/cases0
@@ -1,11 +1,13 @@
start:mkdef_null
description:mkdef without any flag
+label:mn_only,db
cmd:mkdef
check:output=~Usage
end
start:mkdef_node
description:mkdef -t node
+label:mn_only,db
cmd:mkdef -t node -o testnode,testnode1 groups=all,aix
check:rc==0
cmd:lsdef -i groups testnode
@@ -19,6 +21,7 @@ end
start:mkdef_f
description:mkdef -f
+label:mn_only,db
cmd:mkdef -t node -o testnode groups=all,aix
check:rc==0
cmd:mkdef -f -t node -o testnode nodetype=lpar,osi groups=all
@@ -32,6 +35,7 @@ end
start:mkdef_z
description:mkdef -z
+label:mn_only,db
cmd:mkdef -t node -o orignode mgt=fsp cons=hmc pprofile=orignode groups=lpar,all
check:rc==0
cmd:lsdef -l orignode -z > /tmp/orignode.stanza
@@ -51,6 +55,7 @@ end
start:mkdef_group
description: mkdef static node group
+label:mn_only,db
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx
@@ -89,6 +94,7 @@ end
start:mkdef_dynamic_group
description:mkdef with dynamic node group
+label:mn_only,db
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx
@@ -125,6 +131,7 @@ end
start:mkdef_multiple_keys
description:mkdef support for multiple keys in a table, such as ppcdirect
+label:mn_only,db
cmd: mkdef -t node -o testfsp mgt=fsp cons=fsp groups=all,fsp nodetype=fsp passwd.HMC=abc123 passwd.general=abc123 passwd.admin=abc123
check:rc==0
cmd:lsdef testfsp
@@ -138,6 +145,7 @@ end
start:mkdef_t_network
description: mkdef -t network
+label:mn_only,db
cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0 gateway=1.2.3.1
check:rc==0
cmd:lsdef -t network
@@ -153,6 +161,7 @@ end
start:mkdef_t_o_error
description:mkdef -t wrongtype
+label:mn_only,db
cmd:mkdef -t wrongtype -o testnode groups=all,aix
check:rc!=0
check:output=~not a valid
@@ -160,8 +169,8 @@ end
start:mkdef_template_switch_template_without_attribute
-os:linux
description:create a node with swtich template without any attributes
+label:mn_only,db
cmd:result=`lsdef | grep auto_test_node_1`; if [[ $result =~ "auto_test_node_1" ]]; then echo $result; noderm auto_test_node_1; fi
cmd:mkdef -t node -o auto_test_node_1 --template switch-template
check:rc==0
@@ -183,8 +192,8 @@ check:rc==0
end
start:mkdef_template_cec_template_without_remainder
-os:linux
description:create a node with cec template once
+label:mn_only,db
cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test
check:rc==0
@@ -206,8 +215,8 @@ check:rc==0
end
start:mkdef_template_invalid_template
-os:linux
description:create a node with invalid template
+label:mn_only,db
cmd:result=`lsdef | grep auto_test_node`; if [[ $result =~ "auto_test_node" ]]; then echo $result; noderm auto_test_node; fi
cmd:result=`lsdef | grep auto_test_invalid_template`; if [[ $result =~ "auto_test_invalid_template" ]]; then echo $result; noderm auto_test_invalid_template; fi
cmd:lsdef --template auto_test_invalid_template
@@ -219,8 +228,8 @@ check:output=~Error\: (\[.*?\]: )?Could not find the template object named \'aut
end
start:mkdef_node_with_a_node_template
-os:linux
description:create a node with a node template, using cec template to create node at beginning
+label:mn_only,db
cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi
cmd:result=`lsdef | grep auto_test_cec_node_2`; if [[ $result =~ "auto_test_cec_node_2" ]]; then echo $result; noderm auto_test_cec_node_2; fi
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test groups=test_template
@@ -250,8 +259,8 @@ check:rc==0
end
start:mkdef_template_cec_template_step_by_step
-os:linux
description:create a node with cec template step by step
+label:mn_only,db
cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi
cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template
check:rc==1
@@ -282,8 +291,8 @@ check:rc==0
end
start:check_mkdef_node_with_template_priority
-os:linux
description:create node named cec-template with cec template at beginning, the node is priority high than tempalate to create a new node
+label:mn_only,db
cmd:result=`lsdef | grep cec-template`; if [[ $result =~ "cec-template" ]]; then echo $result; noderm cec-template; fi
cmd:result=`lsdef | grep auto_test_cec_node`; if [[ $result =~ "auto_test_cec_node" ]]; then echo $result; noderm auto_test_cec_node; fi
cmd:mkdef -t node -o cec-template --template cec-template serial=test mtm=test hcp=test groups=test_template_priority
@@ -312,8 +321,8 @@ check:rc==0
end
start:mkdef_template_diskless_osimage_rootimgdir
-os:linux
description:check rootimgdir warning message after make new osimage with mkdef --template
+label:cn_os_ready,db
cmd:mkdef -t osimage -o test-osimage_with_template --template __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
output=~1 object definitions have been created or modified
@@ -324,9 +333,10 @@ check:output=~__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-comput
cmd:rmdef -t osimage -o test-osimage_with_template
check:rc==0
end
+
start:mkdef_rhels73
-os:linux
description:create rhels7.3 osimage
+label:mn_only,db
cmd:mkdef -t osimage -o rhels7.3-test-osimage --template __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
output=~1 object definitions have been created or modified
diff --git a/xCAT-test/autotest/testcase/mkdef/cases1 b/xCAT-test/autotest/testcase/mkdef/cases1
index b4db39f83..95cad5f8e 100644
--- a/xCAT-test/autotest/testcase/mkdef/cases1
+++ b/xCAT-test/autotest/testcase/mkdef/cases1
@@ -1,5 +1,6 @@
start:mkdef_github_issue2582
description:Verify github issue 2582
+label:mn_only,db
cmd:mkdef -t group -o doubletrouble bmc='|\z|-imm|' mgt=ipmi
check:rc==0
cmd:mkdef mgt02 groups=doubletrouble
@@ -12,6 +13,7 @@ end
start:mkdef_regex_bmc
description:The second example in xCAT document Using Regular Expressions in the xCAT Tables
+label:mn_only,db
cmd:chtab node=compute 'ipmi.bmc=/\z/-bmc/'
check:rc==0
cmd:mkdef com02 groups=compute mgt=ipmi
@@ -26,6 +28,7 @@ end
start:mkdef_regex_ip
description:The third example in xCAT document Using Regular Expressions in the xCAT Tables
+label:mn_only,db
cmd:chtab node=compute 'hosts.ip=|node(\d+)|10.0.0.($1+0)|'
check:rc==0
cmd:mkdef node254 groups=compute
@@ -40,6 +43,7 @@ end
start:mkdef_regex_kvm
description:The fourth example in xCAT document Using Regular Expressions in the xCAT Tables
+label:mn_only,db
cmd:chtab node=kvms 'vm.host=|\D+(\d+)\D+(\d+)\D+(\d+)\D+(\d+)|c($1)f($2)x($3)|' 'vm.storage=|\D+(\d+)\D+(\d+)\D+(\d+)\D+(\d+)|dir:///install/vms/vm($4+0)|' vm.memory=3072 vm.cpus=2 vm.nics=virbr2 vm.nicmodel=virtio
check:rc==0
cmd:mkdef -t node -o c01f02x03v04 groups=kvms mgt=kvm
@@ -64,6 +68,7 @@ end
start:mkdef_regex_nicsip
description:Verify the GitHub issue #3047.
+label:mn_only,db
cmd:rmdef xcattest_tmp_node_sn[01-16]
cmd:rmdef -t group -o xcattest_tmp_group_regex
cmd:mkdef -t group -o xcattest_tmp_group_regex
diff --git a/xCAT-test/autotest/testcase/mkdsklsnode/cases0 b/xCAT-test/autotest/testcase/mkdsklsnode/cases0
deleted file mode 100644
index 5aee012b6..000000000
--- a/xCAT-test/autotest/testcase/mkdsklsnode/cases0
+++ /dev/null
@@ -1,114 +0,0 @@
-start:mkdsklsnode_h
-os:AIX
-cmd:mkdsklsnode -h
-check:rc==0
-check:output=~Usage
-end
-
-start:mkdsklsnode_i_f
-os:AIX
-cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
-check:rc==0
-cmd:mkdsklsnode -i autotestdsklsimage $$CN -f
-check:rc==0
-check:output=~Initializing NIM machine '$$CN'
-check:output=~AIX/NIM diskless nodes were initialized
-cmd:lsnim -l $$CN
-check:rc==0
-cmd:rmdsklsnode $$CN
-cmd:nim -o remove autotestdsklsimage
-cmd:nim -o remove autotestdsklsimage_lpp_source
-cmd:nim -o remove autotestdsklsimage_shared_root
-cmd:nim -o remove autotestdsklsimage_paging
-cmd:chtab -d imagename=autotestdsklsimage osimage
-cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
-cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
-cmd:rm -rf /install/nim/spot/autotestdsklsimage
-cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
-end
-
-start:mkdsklsnode_i_f_V
-os:AIX
-cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
-check:rc==0
-cmd:mkdsklsnode -i autotestdsklsimage $$CN -f
-check:rc==0
-check:output=~$$MN: AIX/NIM diskless nodes were initialized
-check:output=~Initializing NIM machine '$$CN'
-check:output=~AIX/NIM diskless nodes were initialized
-cmd:lsnim -l $$CN
-check:rc==0
-cmd:rmdsklsnode $$CN
-cmd:nim -o remove autotestdsklsimage
-cmd:nim -o remove autotestdsklsimage_lpp_source
-cmd:nim -o remove autotestdsklsimage_shared_root
-cmd:nim -o remove autotestdsklsimage_paging
-cmd:chtab -d imagename=autotestdsklsimage osimage
-cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
-cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
-cmd:rm -rf /install/nim/spot/autotestdsklsimage
-cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
-end
-
-
-start:mkdsklsnode_n_i
-os:AIX
-cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
-check:rc==0
-cmd:mkdsklsnode -n -i autotestdsklsimage $$CN
-check:rc==0
-cmd:lsnim |grep $$CN|sed -e 's/_/ /g'|cut -d" " -f2 |grep ^autotestdsklsimage$
-check:rc==0
-cmd:rmdsklsnode -i autotestdsklsimage $$CN
-cmd:nim -o remove autotestdsklsimage
-cmd:nim -o remove autotestdsklsimage_lpp_source
-cmd:nim -o remove autotestdsklsimage_shared_root
-cmd:nim -o remove autotestdsklsimage_paging
-cmd:chtab -d imagename=autotestdsklsimage osimage
-cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
-cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
-cmd:rm -rf /install/nim/spot/autotestdsklsimage
-cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
-end
-
-start:mkdsklsnode_node
-os:AIX
-cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
-check:rc==0
-cmd:mkdsklsnode $$CN
-check:rc==0
-check:output=~Initializing NIM machine '$$CN'
-cmd:lsnim -l $$CN
-check:rc==0
-cmd:rmdsklsnode $$CN
-cmd:nim -o remove autotestdsklsimage
-cmd:nim -o remove autotestdsklsimage_lpp_source
-cmd:nim -o remove autotestdsklsimage_shared_root
-cmd:nim -o remove autotestdsklsimage_paging
-cmd:chtab -d imagename=autotestdsklsimage osimage
-cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
-cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
-cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
-cmd:rm -rf /install/nim/spot/autotestdsklsimage
-end
-
-start:mkdsklsnode_i_psize_sparse_paging
-os:AIX
-cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
-check:rc==0
-cmd:mkdsklsnode -i autotestdsklsimage $$CN psize=128 sparse_paging=yes
-check:rc==0
-cmd:lsnim -l $$CN
-check:rc==0
-cmd:rmdsklsnode $$CN
-cmd:nim -o remove autotestdsklsimage
-cmd:nim -o remove autotestdsklsimage_lpp_source
-cmd:nim -o remove autotestdsklsimage_shared_root
-cmd:nim -o remove autotestdsklsimage_paging
-cmd:chtab -d imagename=autotestdsklsimage osimage
-cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
-cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
-cmd:rm -rf /install/nim/spot/autotestdsklsimage
-cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
-end
-
diff --git a/xCAT-test/autotest/testcase/mknimimage/cases0 b/xCAT-test/autotest/testcase/mknimimage/cases0
deleted file mode 100644
index f3400ef1a..000000000
--- a/xCAT-test/autotest/testcase/mknimimage/cases0
+++ /dev/null
@@ -1,113 +0,0 @@
-start:mknimimage_h
-description:mknimimage -h and --help
-os:AIX
-cmd:mknimimage -h
-check:output=~Usage|usage
-cmd:mknimimage --help
-check:output=~Usage|usage
-end
-
-start:mknimimage_s
-description:mknimimage -s source imagename
-os:AIX
-cmd:mknimimage -s $$SOURCE testimage
-check:rc==0
-check:output=~lpp_source=testimage_lpp_source
-check:output=~bosinst_data=testimage_bosinst_data
-check:output=~testimage
-cmd:lsnim |grep testimage
-check:rc==0
-check:output=~testimage
-check:output=~testimage_lpp_source
-check:output=~testimage_bosinst_data
-cmd:nim -o remove testimage
-cmd:nim -o remove testimage_lpp_source
-cmd:nim -o remove testimage_bosinst_data
-cmd:chtab -d imagename=testimage osimage
-cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
-cmd:rm -rf /install/nim/bosinst_data/testimage_bosinst_data
-cmd:rm -rf /install/nim/spot/testimage
-end
-
-start:mknimimage_s_iamgename_attr
-description:mknimimage -s source imagename attr=val
-os:AIX
-cmd:mknimimage -s $$SOURCE testimage installp_bundle=mybndlres
-check:rc==0
-check:output=~installp_bundle=mybndlres
-check:output=~lpp_source=testimage_lpp_source
-check:output=~bosinst_data=testimage_bosinst_data
-check:output=~testimage
-cmd:lsnim |grep testimage
-check:rc==0
-check:output=~testimage
-check:output=~testimage_lpp_source
-check:output=~testimage_bosinst_data
-cmd:nim -o remove testimage
-cmd:nim -o remove testimage_lpp_source
-cmd:nim -o remove testimage_bosinst_data
-cmd:chtab -d imagename=testimage osimage
-cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
-cmd:rm -rf /install/nim/bosinst_data/testimage_bosinst_data
-cmd:rm -rf /install/nim/spot/testimage
-end
-
-start:mknimimage_t_s
-description:mknimimage -t diskless -s source imagename
-os:AIX
-cmd:mknimimage -t diskless -s $$SOURCE testimage
-check:rc==0
-check:output=~lpp_source=testimage_lpp_source
-check:ouput=~nimtype=diskless
-check:output=~testimage
-cmd:lsnim |grep testimage
-check:rc==0
-check:output=~testimage
-check:output=~testimage_lpp_source
-cmd:nim -o remove testimage
-cmd:nim -o remove testimage_lpp_source
-cmd:nim -o remove testimage_bosinst_data
-cmd:nim -o remove testimage_paging
-cmd:chtab -d imagename=testimage osimage
-cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
-cmd:rm -rf /install/nim/paging/testimage_paging
-cmd:rm -rf /install/nim/spot/testimage
-end
-
-
-start:mknimimage_t_i
-description:mknimimage -t diskless -i imagename imagename
-os:AIX
-cmd:mknimimage -s $$SOURCE testimage
-check:rc==0
-check:output=~lpp_source=testimage_lpp_source
-check:output=~bosinst_data=testimage_bosinst_data
-check:output=~testimage
-cmd:mknimimage -t diskless -i testimage testimage_updt
-check:rc==0
-check:output=~spot=testimage_updt
-check:output=~root=testimage_updt_root
-check:output=~testimage_updt
-cmd:lsnim |grep testimage_updt
-ckeck:rc==0
-check:output=~testimage_updt
-check:output=~testimage_updt_root
-cmd:nim -o remove testimage
-cmd:nim -o remove testimage_lpp_source
-cmd:nim -o remove testimage_bosinst_data
-cmd:nim -o remove testimage_updt
-cmd:nim -o remove testimage_root
-cmd:nim -o remove testimage_updt_root
-cmd:chtab -d imagename=testimage osimage
-cmd:chtab -d imagename=testimage_updt osimage
-cmd:rm -rf /install/nim/lpp_source/testimage_lpp_source
-cmd:rm -rf /install/nim/paging/testimage_paging
-cmd:rm -rf /install/nim/spot/testimage
-cmd:rm -rf /install/nim/lpp_source/testimage_updt_lpp_source
-cmd:rm -rf /install/nim/paging/testimage_updt_paging
-cmd:rm -rf /install/nim/spot/testimage_updt
-cmd:rm -rf /install/nim/bosinst_data/testimage_bosinst_data
-end
-
-
-
diff --git a/xCAT-test/autotest/testcase/nodeadd/cases0 b/xCAT-test/autotest/testcase/nodeadd/cases0
index 53d7114cc..f36dc6749 100644
--- a/xCAT-test/autotest/testcase/nodeadd/cases0
+++ b/xCAT-test/autotest/testcase/nodeadd/cases0
@@ -1,10 +1,12 @@
start:nodeadd_null
description:nodeadd without any flag
+label:mn_only,db
cmd:nodeadd
check:output=~Usage
end
start:nodeadd_noderange
+label:mn_only,db
cmd:nodeadd testnode1-testnode2 groups="lpar,all" nodetype.nodetype="lpar,osi"
check:rc==0
cmd:lsdef -i groups,nodetype testnode1
@@ -21,6 +23,7 @@ cmd:rmdef -t node -o testnode1-testnode2
end
start:nodeadd_noderange_nodetype
+label:mn_only,db
cmd:nodeadd testnode1-testnode2 groups=all,rhel5 nodetype.os=rhel5
check:rc=0
cmd:lsdef -i groups,os testnode1
@@ -36,16 +39,19 @@ cmd:rmdef -t node -o testnode1-testnode2
end
start:nodeadd_v
+label:mn_only,db
cmd:nodeadd -v
check:output=~Version
end
start:nodeadd_h
+label:mn_only,db
cmd:nodeadd -h
check:output=~Usage
end
start:nodeadd_err_symbol
+label:mn_only,db
cmd:nodeadd testnode magt=unknown
check:rc!=0
check:output=~Error
diff --git a/xCAT-test/autotest/testcase/nodech/cases0 b/xCAT-test/autotest/testcase/nodech/cases0
index 8529b4a8c..58b6345bf 100644
--- a/xCAT-test/autotest/testcase/nodech/cases0
+++ b/xCAT-test/autotest/testcase/nodech/cases0
@@ -1,5 +1,6 @@
start:nodech_noderange_table
description:nodech testnode groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
+label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.4
check:rc==0
cmd:nodech testnode groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
@@ -14,6 +15,7 @@ end
start:nodech_noderange_table_comma
description:nodech testnode groups,=rhels5.5.Check nodech command with ,=.
+label:mn_only,db
cmd:chdef -t node -o testnode groups=all
check:rc==0
cmd:nodech testnode groups,=rhels5.5
@@ -25,6 +27,7 @@ end
start:nodech_noderange_table_arrow
+label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.5
check:rc==0
cmd:nodech testnode groups^=rhels5.5
@@ -37,6 +40,7 @@ end
start:nodech_noderange_table_comma_arrow
description:nodech testnode groups^=rhels5.5 groups,=rhels5.4 . Check nodech command with both ^= and ,=.
+label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.5
check:rc==0
cmd:nodech testnode groups^=rhels5.5 groups,=rhels5.4
@@ -48,6 +52,7 @@ end
start:nodech_noderanage_table_at
description:nodech testnode nodetype.os=@=helloworld.Check nodech command with =@=.
+label:mn_only,db
cmd:chdef -t node -o testnode os=hello groups=all
check:rc==0
cmd:nodech testnode nodetype.os=@=helloworld
@@ -60,6 +65,7 @@ end
start:nodech_noderange_table_include
description:nodech groups=~rh4.123456789 groups=rhels5.5.The command nodech with =~.
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.123456789
check:rc==0
cmd:nodech groups=~rh4.123456789 groups=rhels5.5
@@ -71,6 +77,7 @@ end
start:nodech_noderange_table_uninclude
description:nodech testnode1-testnode2 nodelist.groups\!~rhels5.5 nodelist.groups=rhels5.5,all.The command nodech with !~.
+label:mn_only,db
cmd:chdef -t node -o testnode1 groups=rhels5.5,all
check:rc==0
cmd:chdef -t node -o testnode2 groups=rhels5.4,all
@@ -85,6 +92,7 @@ end
start:nodech_noderange_table_equal
description:nodech groups==rh4.123456789 groups=rhels5.5.The command nodech with ==.
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.123456789
check:rc==0
cmd:nodech groups==rh4.123456789 groups=rhels5.5
@@ -97,6 +105,7 @@ end
start:nodech_noderange_table_unequal
description::nodech testnode1-testnode2 groups!=rhels5.5 groups=rhels5.5.The command nodech with !=.
+label:mn_only,db
cmd:chdef -t node -o testnode1 groups=rhels5.5
check:rc==0
cmd:chdef -t node -o testnode2 groups=rhels5.4
@@ -110,6 +119,7 @@ end
start:nodech_noderange_shortname_groups
description:nodech testnode groups=rhels5.4.The nodech use shortname groups
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:nodech testnode groups=rhels5.4
@@ -122,6 +132,7 @@ end
start:nodech_noderange_shortname_tags
description:nodech testnode tags=rhels5.4.The nodech use shortname tags
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:nodech testnode tags=rhels5.4
@@ -134,6 +145,7 @@ end
start:nodech_noderange_shortname_mgt
description:nodech testnode mgt=hmc.The nodech use shortname mgt
+label:mn_only,db
cmd:chdef -t node -o testnode mgt=blade groups=all
check:rc==0
cmd:nodech testnode mgt=hmc
@@ -145,6 +157,7 @@ end
start:nodech_delete
description:nodech -d
+label:mn_only,db
cmd:chdef -t node -o testnode os=hello groups=all
check:rc==0
cmd:nodech -d testnode nodetype
@@ -156,6 +169,7 @@ end
start:nodech_h
description:nodech -h
+label:mn_only,db
cmd:nodech -h
check:output=~Usage
cmd:nodech -?
@@ -166,6 +180,7 @@ end
start:nodech_v
description:nodech -v
+label:mn_only,db
cmd:nodech -v
check:output=~Version
end
@@ -173,6 +188,7 @@ end
start:nodech_d_error
description:nodech --delete
+label:mn_only,db
cmd:chdef -t node -o testnode os=hello groups=test
check:rc==0
cmd:nodech --delete
@@ -187,6 +203,7 @@ end
start:nodech_error_node
description: nodech error noderange,nodech testnode1 groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
+label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.4
check:rc==0
cmd:nodech testnode1 groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
@@ -198,6 +215,7 @@ end
start:nodech_error_table
description: nodech error table.
+label:mn_only,db
cmd:chdef -t node -o testnode groups=all,rhels5.4
check:rc==0
cmd:nodech testnode groups=all,rhels5.5 nodetypes.os=rhels5.5 nodehm.mgt=hmc
diff --git a/xCAT-test/autotest/testcase/nodegrpch/cases0 b/xCAT-test/autotest/testcase/nodegrpch/cases0
index f1ccf68e8..0ae5ff69e 100644
--- a/xCAT-test/autotest/testcase/nodegrpch/cases0
+++ b/xCAT-test/autotest/testcase/nodegrpch/cases0
@@ -1,5 +1,6 @@
start:nodegrpch_v
description:nodegrpch -v and --version
+label:mn_only,db
cmd:nodegrpch -v
check:output=~Version
cmd:nodegrpch --version
@@ -8,6 +9,7 @@ end
start:nodegrpch_h
description:nodegrpch -? and -h --help
+label:mn_only,db
cmd:nodegrpch -h
check:output=~Usage
cmd:nodegrpch -?
@@ -19,6 +21,7 @@ end
start:nodegrpch_groups
description:nodegrpch rh4.1234567890 mgt=hmc
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.1234567890 mgt=blade
check:rc==0
cmd:nodegrpch rh4.1234567890 mgt=hmc
@@ -32,6 +35,7 @@ end
start:nodegrpch_err
description:
+label:mn_only,db
cmd:nodegrpch -c
check:rc!=0
check:output=~Usage
diff --git a/xCAT-test/autotest/testcase/nodels/cases0 b/xCAT-test/autotest/testcase/nodels/cases0
index 7c87abf05..cb3ebeeaf 100644
--- a/xCAT-test/autotest/testcase/nodels/cases0
+++ b/xCAT-test/autotest/testcase/nodels/cases0
@@ -1,5 +1,6 @@
start:nodels_null
description:nodels | grep testnode
+label:mn_only,db
cmd:chdef -t node -o testnode groups="all,aix"
check:rc==0
cmd:nodels | grep testnode
@@ -11,6 +12,7 @@ end
start:nodels_noderange_shortname_groups
description:The nodels use shortname groups
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:nodels testnode groups
@@ -22,6 +24,7 @@ end
start:nodels_noderange_shortname_tags
description:The nodels use shortname tags
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:nodels testnode tags
@@ -33,6 +36,7 @@ end
start:nodels_noderange_shortname_mgt
description:The nodels use shortname mgt
+label:mn_only,db
cmd:chdef -t node -o testnode mgt=blade groups=all
check:rc==0
cmd:nodels testnode mgt
@@ -43,6 +47,7 @@ end
start:nodels_table_include
description:Check the command nodels with =~.
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.123456789
check:rc==0
cmd:nodels groups=~rh4.123456789
@@ -54,6 +59,7 @@ end
start:nodels_noderange_table_uninclude
description:Check the command nodels with !~.
+label:mn_only,db
cmd:chdef -t node -o testnode1 groups=rhels5.5,all
check:rc==0
cmd:chdef -t node -o testnode2 groups=rhels5.4,all
@@ -67,6 +73,7 @@ end
start:nodels_noderange_table_equal
description:Check the command nodels with ==.
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.123456789
check:rc==0
cmd:nodels groups==rh4.123456789
@@ -78,6 +85,7 @@ end
start:nodels_noderange_table_unequal
description:Check the command nodels with !=.
+label:mn_only,db
cmd:chdef -t node -o testnode1 groups=rhels5.5
check:rc==0
cmd:chdef -t node -o testnode2 groups=rhels5.4
@@ -90,6 +98,7 @@ end
start:nodels_b
description:nodels -b and nodels --blame
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rhels5.5
check:rc==0
cmd:nodels testnode -b groups
@@ -103,6 +112,7 @@ end
start:nodels_S
description:nodels -S
+label:mn_only,db
cmd:chdef -t node -o testnode hidden=1 groups=rhels5.5
check:rc==0
cmd:nodels -S
@@ -114,6 +124,7 @@ end
start:nodels_H
description:nodels -H all groups mgt | grep testnode
+label:mn_only,db
cmd:chdef -t node -o testnode groups="all,aix" mgt="hmc"
check:rc==0
cmd:nodels -H all groups mgt | grep testnode
@@ -125,6 +136,7 @@ end
start:nodels_noderange
description:nodels testnode
+label:mn_only,db
cmd:chdef -t node -o testnode groups="all,aix"
check:rc==0
cmd:nodels testnode
@@ -136,6 +148,7 @@ end
start:nodels_noderange_table
description:nodels testnode nodelist
+label:mn_only,db
cmd:chdef -t node -o testnode groups=all
check:rc==0
cmd:nodels testnode nodelist
@@ -147,6 +160,7 @@ end
start:nodels_tablevalue
description:nodels rh4.1234567890
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.1234567890
check:rc==0
cmd:nodels rh4.1234567890
@@ -158,28 +172,13 @@ end
start:nodels_tablevalue_tablecolumn
description:nodels rh4.1234567890 mgt
+label:mn_only,db
cmd:chdef -t node -o testnode groups=rh4.1234567890 mgt=hmc
check:rc==0
cmd:nodels rh4.1234567890 mgt
check:rc==0
check:output=~testnode:\s*hmc
cmd:rmdef -t node testnode
-end
-
-
-start:nodels_noderange_tablecolumn
-description:nodels testnode nodehm.mgt
-cmd:chdef -t node -o testnode mgt=hmc groups=all
-check:rc==0
-cmd:nodels testnode nodehm.mgt
-check:rc==0
-check:output=~testnode:\s*hmc
-cmd:rmdef -t node testnode
-end
-
-
-start:nodels_tablevalue_tablecolumn
-description:nodels groups==rh4.1234567890 mgt
cmd:chdef -t node -o testnode1-testnode4 groups=rh4.1234567890 mgt=hmc
check:rc==0
cmd:nodels groups==rh4.1234567890 mgt
@@ -192,8 +191,23 @@ cmd:rmdef -t node testnode1-testnode4
end
+start:nodels_noderange_tablecolumn
+description:nodels testnode nodehm.mgt
+label:mn_only,db
+cmd:chdef -t node -o testnode mgt=hmc groups=all
+check:rc==0
+cmd:nodels testnode nodehm.mgt
+check:rc==0
+check:output=~testnode:\s*hmc
+cmd:rmdef -t node testnode
+end
+
+
+
+
start:nodels_h
description:nodels -h and nodels -? and nodels --help
+label:mn_only,db
cmd:nodels -h
check:output=~Usage
cmd:nodels -?
@@ -204,6 +218,7 @@ end
start:nodels_v
+label:mn_only,db
cmd:nodels -v
check:output=~Version
cmd:nodels --version
@@ -212,12 +227,14 @@ end
start:nodels_err_symbol
+label:mn_only,db
cmd:nodels -H all unknown
check:rc!=0
check:output=~Error
end
start:nodels_err_noderange
+label:mn_only,db
cmd:nodels douniwan
check:rc!=0
check:output=~Error
diff --git a/xCAT-test/autotest/testcase/noderange/cases0 b/xCAT-test/autotest/testcase/noderange/cases0
index 59b401628..8a4d2e4cb 100644
--- a/xCAT-test/autotest/testcase/noderange/cases0
+++ b/xCAT-test/autotest/testcase/noderange/cases0
@@ -1,5 +1,6 @@
start:noderange_individual_node
description: noderange individual node
+label:mn_only,db
cmd:mkdef -t node -o testnode01 -f groups=all
cmd:nodels testnode01
check:rc==0
@@ -9,6 +10,7 @@ end
start:noderange_individual_grp
description: noderange individual group
+label:mn_only,db
cmd:mkdef -t node -o testnode01,testnode02 groups=nrtestgrp
cmd:nodels nrtestgrp
check:rc==0
@@ -20,6 +22,7 @@ end
start:noderange_node01-node10
description: noderange node01-node10
+label:mn_only,db
cmd:mkdef -t node -o nrtestnode01-nrtestnode10 groups=all
check:rc==0
cmd:nodels nrtestnode01-nrtestnode10
@@ -33,6 +36,7 @@ end
start:noderange_node_01-10
description: noderange node[01-10]
+label:mn_only,db
cmd:mkdef -t node -o nrtestnode[01-10] groups=all
check:rc==0
cmd:nodels nrtestnode[01-10]
@@ -46,6 +50,7 @@ end
start:noderange_node01_10
description: noderange node[01:10]
+label:mn_only,db
cmd:mkdef -t node -o nrtestnode[01:10] groups=all
check:rc==0
cmd:nodels nrtestnode[01:10]
@@ -59,6 +64,7 @@ end
start:noderange_f1-f2_n1-n3
description: noderange f[1-2]n[1-3]
+label:mn_only,db
cmd:mkdef -t node -o f[1-2]n[1-3] groups=all
check:rc==0
cmd:nodels f[1-2]n[1-3]
@@ -75,6 +81,7 @@ end
start:noderange_group1-group3
description: noderange group1-group3
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups=nrtestgrp1
cmd:mkdef -t node -o testnode02 groups=nrtestgrp2
cmd:mkdef -t node -o testnode03 groups=nrtestgrp3
@@ -89,6 +96,7 @@ end
#start:noderange_node001-node200
#description: noderange node001-node200
+#label:mn_only,db
#cmd:mkdef -t node -o nrtestnode001-nrtestnode200 groups=all
#check:rc==0
#cmd:nodels nrtestnode001-nrtestnode200
@@ -103,6 +111,7 @@ end
start:noderange_node10_plus_3
description: noderange node10+3
+label:mn_only,db
cmd:mkdef -t node -o nrtestnode10+3 groups=all
check:rc==0
cmd:nodels nrtestnode10+3
@@ -117,6 +126,7 @@ end
start:noderange_10-20
description: noderange 10-20
+label:mn_only,db
cmd:mkdef -t node -o 10-20 groups=all
check:rc==0
cmd:nodels 10-20
@@ -132,18 +142,21 @@ end
start:noderange_XCAT_NODE_PREFIX
description: noderange XCAT_NODE_PREFIX
+label:mn_only,db
cmd: XCAT_NODE_PREFIX=abc XCATBYPASS=1 nodels 10-20
check:output=~abc10,abc11,abc12,abc13,abc14,abc15,abc16,abc17,abc18,abc19,abc20
end
start:noderange_XCAT_NODE_SUFFIX
description: noderange XCAT_NODE_SUFFIX
+label:mn_only,db
cmd: XCAT_NODE_PREFIX=abc XCAT_NODE_SUFFIX=def XCATBYPASS=1 nodels 10-20
check:output=~abc10def,abc11def,abc12def,abc13def,abc14def,abc15def,abc16def,abc17def,abc18def,abc19def,abc20def
end
start:noderange_slash_urtestnode_dot_star
description: noderange /nrtestnode.*
+label:mn_only,db
cmd:mkdef -t node -o nrtestnode1-nrtestnode3 groups=all
check:rc==0
cmd:nodels /nrtestnode.*
@@ -157,6 +170,7 @@ end
start:noderange_dir_tmp-nodelistfile
description: noderange ^/tmp/nodelistfile
+label:mn_only,db
#cmd:echo #testnode1 > /tmp/nodelist
cmd:mkdef -t node -o nrnode1,nrnode2 groups=all
cmd:echo nrnode1 > /tmp/nodelist
@@ -171,6 +185,7 @@ end
start:noderange_exclusion
description: noderange exnode1-exnode5,-exnode3,-exnode4
+label:mn_only,db
cmd:mkdef -t node -o exnode1-exnode5 groups=all
check:rc==0
cmd:nodels exnode1-exnode5,-exnode3,-exnode4
@@ -186,6 +201,7 @@ end
start:noderange_group_intersection
description: noderange group1@group2
+label:mn_only,db
cmd:mkdef -t node -o nrtestnode1-nrtestnode3 groups=group1
check:rc==0
cmd:chdef -t node -o nrtestnode1 -p groups=group2
diff --git a/xCAT-test/autotest/testcase/noderm/cases0 b/xCAT-test/autotest/testcase/noderm/cases0
index c8a0cb4a4..31e5f386e 100644
--- a/xCAT-test/autotest/testcase/noderm/cases0
+++ b/xCAT-test/autotest/testcase/noderm/cases0
@@ -1,5 +1,6 @@
start:noderm_noderange
description:noderm testnode1,testnode2
+label:mn_only,db
cmd:nodeadd testnode1,testnode2 groups=all
check:rc==0
cmd:lsdef -t node testnode1,testnode2
@@ -14,6 +15,7 @@ end
start:noderm_h
description:noderm -h
+label:mn_only,db
cmd:noderm -h
check:output=~Usage
cmd:noderm --help
@@ -22,12 +24,14 @@ end
start:noderm_null
description:noderm
+label:mn_only,db
cmd:noderm
check:output=~Usage
end
start:noderm_err_node
description:noderm err
+label:mn_only,db
cmd:rmdef -t node testnode
cmd:noderm testnode
check:rc!=0
diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0
index c95fbec9c..ae13c016f 100644
--- a/xCAT-test/autotest/testcase/nodeset/cases0
+++ b/xCAT-test/autotest/testcase/nodeset/cases0
@@ -473,3 +473,21 @@ check:output=~$$CN:\s*install
cmd:imagename=`cat /tmp/imagename`;osversion=`lsdef -t osimage -o $imagename |grep osvers|awk -F= '{print $2}'`;versionnum=`echo $osversion |sed 's:[a-zA-Z]::g'`;grep -w -A10 "$$CN" /var/lib/dhcpd/dhcpd.leases | grep "/install/$osversion/armel/cumulus-linux-$versionnum-bcm-armel.bin"
check:rc==0
end
+
+start:nodeset_secureroot
+os: rhels
+description: Test nodeset could generate right installation files when site.secureroot=1
+label: others,security
+cmd: chdef -t site secureroot=1
+cmd: myimage=__GETNODEATTR($$CN,provmethod)__; osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute; cn=$$CN
+test -f /install/autoinst/$cn && mv -f /install/autoinst/$cn /install/autoinst/$cn.secureroot
+nodeset $cn osimage=$osimage
+myresult=$?
+chdef $cn provmethod=$myimage
+test $myresult -eq 0
+check:rc==0
+cmd: cat /install/autoinst/$$CN | grep '^rootpw --iscrypted \*' > /dev/null
+check:rc==0
+cmd: chdef -t site secureroot=
+cmd: test -f /install/autoinst/$$CN.secureroot && mv -f /install/autoinst/$$CN.secureroot /install/autoinst/$$CN
+end
diff --git a/xCAT-test/autotest/testcase/packimg/cases_secure_protect b/xCAT-test/autotest/testcase/packimg/cases_secure_protect
new file mode 100644
index 000000000..0b4bd2c8d
--- /dev/null
+++ b/xCAT-test/autotest/testcase/packimg/cases_secure_protect
@@ -0,0 +1,42 @@
+start:packimage_nosyncfiles
+os:Linux
+description: Test packimage with --nosyncfiles
+label: others,security
+cmd: myimage=$$OSIMAGE
+lsdef -t osimage -o $myimage -z > /tmp/packimage_nosyncfiles.osimage && \
+chdef -t osimage -o "$myimage" rootimgdir=/tmp/packimage_nosyncfiles/rootimgdir && \
+chdef -t osimage -o "$myimage" synclists=/tmp/packimage_nosyncfiles.sensitive.$$ && \
+touch /tmp/packimage_nosyncfiles.sensitive && \
+echo "/tmp/packimage_nosyncfiles.sensitive -> /etc/sensitive.xcattesting" > /tmp/packimage_nosyncfiles.sensitive.$$ && \
+genimage "$myimage" && \
+packimage "$myimage" --nosyncfiles
+if [ $? = 0 ]; then
+ test ! -e /tmp/packimage_nosyncfiles/rootimgdir/rootimg/etc/sensitive.xcattesting
+else
+ false
+fi
+check:rc==0
+cmd: test -e /tmp/packimage_nosyncfiles.osimage && cat /tmp/packimage_nosyncfiles.osimage | mkdef -t osimage $$OSIMAGE -f
+cmd: rm -rf /tmp/packimage_nosyncfiles*
+end
+
+start:packimage_secureroot
+os:Linux
+description: Test packimage with site.secureroot=1
+label: others,security
+cmd: chdef -t site secureroot=1
+cmd: myimage=$$OSIMAGE
+lsdef -t osimage $myimage -z > /tmp/packimage_secureroot.osimage && \
+chdef -t osimage -o "$myimage" rootimgdir=/tmp/packimage_secureroot/rootimgdir && \
+genimage "$myimage" && \
+packimage "$myimage" --nosyncfiles
+if [ $? = 0 ]; then
+ grep '^root\:\*\:' /tmp/packimage_secureroot/rootimgdir/rootimg/etc/shadow
+else
+ false
+fi
+check:rc==0
+cmd: test -e /tmp/packimage_secureroot.osimage && cat /tmp/packimage_secureroot.osimage | mkdef -t osimage $$OSIMAGE -f
+cmd: rm -rf /tmp/packimage_secureroot*
+cmd: chdef -t site secureroot=
+end
diff --git a/xCAT-test/autotest/testcase/rbeacon/cases0 b/xCAT-test/autotest/testcase/rbeacon/cases0
index b202d46bc..6b007bfe1 100644
--- a/xCAT-test/autotest/testcase/rbeacon/cases0
+++ b/xCAT-test/autotest/testcase/rbeacon/cases0
@@ -2,6 +2,7 @@ start:rbeacon_null
description: this case is to test rbeacon usage
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rbeacon
check:rc==0
check:output=~Usage
@@ -11,6 +12,7 @@ start:rbeacon_stat
description: this case is to test rbeacon CN stat
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rbeacon $$CN stat
check:rc==0
check:output=~$$CN\s*:\s*Front:Off Rear:Off|Front:On Rear:On|Front:Off Rear:On|Front:On Rear:Off|Front:Blink Rear:Blink
@@ -20,6 +22,7 @@ start:rbeacon_help
description: this case is to test rbeacon -h and --help output
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rbeacon -h
check:rc==0
check:output=~Usage
@@ -34,6 +37,7 @@ start:rbeacon_version
description: this case is to test rbeacon -v and --version output
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rbeacon -v
check:rc==0
check:output=~Version
@@ -48,6 +52,7 @@ start:rbeacon_false
description: this case is to test rbeacon could process false input
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rbeacon $$CN abc
check:rc!=0
check:output=~$$CN\s*:\s*Error:\s*Only \'on\', \'off\' or \'stat\' is supported
diff --git a/xCAT-test/autotest/testcase/regnotif/case0 b/xCAT-test/autotest/testcase/regnotif/case0
index 84767bc01..2fcb65d2a 100644
--- a/xCAT-test/autotest/testcase/regnotif/case0
+++ b/xCAT-test/autotest/testcase/regnotif/case0
@@ -1,5 +1,6 @@
start:regnotif_null
description:regnotif with no argument
+label:mn_only,db
cmd:regnotif
check:rc==0
check:output=~Usage
@@ -7,6 +8,7 @@ end
start:regnotif_o
description:regnotif with normal argument
+label:mn_only,db
cmd:echo "hello,world" > test.pm
check:rc==0
cmd:regnotif test.pm nodelist -o a,d
@@ -18,9 +20,9 @@ cmd:unregnotif test.pm
cmd:rm -f test.pm
end
-
start:regnotif_err
description:regnotif with error arguments
+label:mn_only,db
cmd:echo "hello,world" > test.pm
check:rc==0
cmd:regnotif test.pm -o a,d
@@ -32,10 +34,9 @@ check:output=~Usage
cmd:rm -f test.pm
end
-
-
start:regnotif_h
description:regnotif -h and --help
+label:mn_only,db
cmd:regnotif -h
check:rc==0
check:output=~Usage
@@ -47,6 +48,7 @@ end
start:regnotif_v
description:regnotif -v and --version
+label:mn_only,db
cmd:regnotif -v
check:rc==0
check:output=~Version|version
diff --git a/xCAT-test/autotest/testcase/renergy/case_8233-E8B b/xCAT-test/autotest/testcase/renergy/case_8233-E8B
deleted file mode 100644
index 9dfddf719..000000000
--- a/xCAT-test/autotest/testcase/renergy/case_8233-E8B
+++ /dev/null
@@ -1,405 +0,0 @@
-
-start:query_8233-E8B_reset
-description:Reset the value of power saving and capping to a default one
-type:8233-E8B-E8B
-cmd:renergy $$CN savingstatus=off
-check:rc==0
-check:output=~Set savingstatus succeeded
-cmd:renergy $$CN dsavingstatus=off
-check:rc==0
-check:output=~Set dsavingstatus succeeded
-cmd:renergy $$CN cappingstatus=off
-check:rc==0
-check:output=~Set cappingstatus succeeded
-cmd:renergy $$CN cappingwatt=2000
-check:rc==0
-end
-
-start:query_8233-E8B_all
-description:query all the attributes of the node
-type:8233-E8B
-cmd:renergy $$CN all
-check:rc==0
-check:output=~savingstatus: off
-check:output=~cappingstatus: off
-check:output=~dsavingstatus: off
-check:output=~cappingmin: 1716
-check:output=~cappingmax: 2121
-check:output=~cappingvalue: 2000
-check:output=~cappingsoftmin: 304
-check:output=~averageAC: na
-check:output~~averageDC: 681
-check:output~~ambienttemp: 22
-check:output~~ exhausttemp: 38
-check:output~~CPUspeed: 3556
-check:output=~syssbpower: na
-check:output~~sysIPLtime: 900
-end
-
-start:query_8233-E8B_savingstatus
-description:
-type:8233-E8B
-cmd:renergy $$CN savingstatus
-check:rc==0
-check:output=~savingstatus: off
-check:output!~dsavingstatus
-check:output!~cappingstatus
-end
-
-start:query_8233-E8B_dsavingstatus
-description:
-type:8233-E8B
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: off
-check:output!~: savingstatus
-check:output!~cappingstatus
-end
-
-start:query_8233-E8B_cappingstatus
-description:
-type:8233-E8B
-cmd:renergy $$CN cappingstatus
-check:rc==0
-check:output=~cappingstatus: off
-check:output!~dsavingstatus
-check:output!~savingstatus
-end
-
-start:query_8233-E8B_cappingmaxmin
-description:
-type:8233-E8B
-cmd:renergy $$CN cappingmaxmin
-check:rc==0
-check:output=~cappingmin: 1716
-check:output=~cappingmax: 2121
-check:output!~cappingvalue
-check:output!~cappingsoftmin
-end
-
-start:query_8233-E8B_cappingvalue
-description:
-type:8233-E8B
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 2000
-check:output!~cappingmin
-check:output!~cappingmax
-check:output!~cappingsoftmin
-end
-
-start:query_8233-E8B_cappingsoftmin
-description:
-type:8233-E8B
-cmd:renergy $$CN cappingsoftmin
-check:rc==0
-check:output=~cappingsoftmin: 304
-check:output!~cappingmin
-check:output!~cappingmax
-check:output!~cappingvalue
-end
-
-start:query_8233-E8B_averageAC
-description:
-type:8233-E8B
-cmd:renergy $$CN averageAC
-check:rc==0
-check:output=~averageAC: na
-check:output!~averageDC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~CPUspeed
-end
-
-start:query_8233-E8B_averageDC
-description:
-type:8233-E8B
-cmd:renergy $$CN averageDC
-check:rc==0
-check:output~~averageDC: 620
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~CPUspeed
-end
-
-start:query_8233-E8B_ambienttemp
-description:
-type:8233-E8B
-cmd:renergy $$CN ambienttemp
-check:rc==0
-check:output~~ambienttemp: 22
-check:output!~averageAC
-check:output!~averageDC
-check:output!~exhausttemp
-check:output!~CPUspeed
-end
-
-start:query_8233-E8B_exhausttemp
-description:
-type:8233-E8B
-cmd:renergy $$CN exhausttemp
-check:rc==0
-check:output~~exhausttemp: 38
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~averageDC
-check:output!~CPUspeed
-end
-
-start:query_8233-E8B_CPUspeed
-description:
-type:8233-E8B
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3556
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~averageDC
-end
-
-start:query_8233-E8B_syssbpower
-description:
-type:8233-E8B
-cmd:renergy $$CN syssbpower
-check:rc==0
-check:output=~syssbpower: na
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~averageDC
-check:output!~sysIPLtime
-end
-
-start:query_8233-E8B_sysIPLtime
-description:
-type:8233-E8B
-cmd:renergy $$CN sysIPLtime
-check:rc==0
-check:output=~sysIPLtime: 900
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~averageDC
-check:output!~syssbpower
-end
-
-start:set_8233-E8B_savingstatus
-description:
-type:8233-E8B
-cmd:renergy $$CN savingstatus=on
-check:rc==0
-check:output=~Set savingstatus succeeded
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set savingstatus failed.
-cmd:sleep 60
-
-cmd:renergy $$CN savingstatus
-check:rc==0
-check:output=~savingstatus: on
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 2492
-
-cmd:renergy $$CN savingstatus=onxx
-check:rc!=0
-check:output=~Usage:
-
-cmd:renergy $$CN dsavingstatus=on-norm
-check:rc!=0
-check:output=~Cannot enable static and dynamic power
-check:output=~Set dsavingstatus failed.
-
-cmd:renergy $$CN savingstatus=off
-check:rc==0
-check:output=~Set savingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set savingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN savingstatus
-check:rc==0
-check:output=~savingstatus: off
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3556
-end
-
-
-start:set_8233-E8B_dsavingstatus
-description:
-type:8233-E8B
-cmd:renergy $$CN dsavingstatus=on
-check:rc!=0
-check:output=~ Usage:
-
-cmd:renergy $$CN dsavingstatus=on-norm
-check:rc==0
-check:output=~Set dsavingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set dsavingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: on-norm
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 1652
-
-cmd:renergy $$CN savingstatus=on
-check:rc!=0
-check:output=~Cannot enable static and dynamic power
-check:output=~Set savingstatus failed.
-
-cmd:renergy $$CN dsavingstatus=onxx
-check:rc!=0
-check:output=~ Usage:
-
-cmd:renergy $$CN dsavingstatus=on-maxp
-check:rc==0
-check:output=~Set dsavingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set dsavingstatus failed.
-
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: on-maxp
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3864
-
-cmd:renergy $$CN dsavingstatus=off
-check:rc==0
-check:output=~Set dsavingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set dsavingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: off
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3556
-end
-
-start:set_8233-E8B_cappingstatus
-description:
-type:8233-E8B
-cmd:renergy $$CN cappingstatus=on
-check:rc==0
-check:output=~Set cappingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set cappingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN cappingstatus
-check:rc==0
-check:output=~cappingstatus: on
-
-cmd:renergy $$CN cappingstatus=onxx
-check:rc!=0
-check:output=~Usage:
-
-cmd:renergy $$CN cappingstatus=off
-check:rc==0
-check:output=~Set cappingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set cappingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN cappingstatus
-check:rc==0
-check:output=~cappingstatus: off
-end
-
-start:set_8233-E8B_cappingwatt
-description:
-type:8233-E8B
-cmd:renergy $$CN cappingwatt=2050
-check:rc==0
-check:output=~Set cappingwatt succeeded.
-check:output=~cappingvalue: 2050
-check:output!~Set cappingwatt failed.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 2050
-
-cmd:renergy $$CN cappingwatt=100
-check:rc!=0
-check:output!~Set cappingwatt succeeded.
-check:output=~Set cappingwatt failed.
-check:output=~Invalid value for cappingwatt.
-
-cmd:renergy $$CN cappingwatt=3000
-check:rc!=0
-check:output!~Set cappingwatt succeeded.
-check:output=~Set cappingwatt failed.
-check:output=~Invalid value for cappingwatt.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 2050
-
-cmd:renergy $$CN cappingwatt=2000
-check:rc==0
-check:output=~Set cappingwatt succeeded.
-check:output=~cappingvalue: 2000
-check:output!~Set cappingwatt failed.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 2000
-end
-
-start:set_8233-E8B_cappingperc
-description:
-type:8233-E8B
-cmd:renergy $$CN cappingperc=0
-check:rc==0
-check:output=~Set cappingperc succeeded.
-check:output=~cappingvalue: 1716
-check:output!~Set cappingperc failed.
-
-cmd:renergy $$CN cappingperc=50
-check:rc==0
-check:output=~Set cappingperc succeeded.
-check:output=~cappingvalue: 1918
-check:output!~Set cappingperc failed.
-
-cmd:renergy $$CN cappingperc=100
-check:rc==0
-check:output=~Set cappingperc succeeded.
-check:output=~cappingvalue: 2121
-check:output!~Set cappingperc failed.
-
-cmd:renergy $$CN cappingperc=110
-check:rc!=0
-check:output!~Set cappingperc succeeded.
-check:output=~Invalid value for cappingperc.
-check:output=~Set cappingperc failed.
-
-cmd:renergy $$CN cappingwatt=2000
-check:rc==0
-check:output=~Set cappingwatt succeeded.
-check:output=~cappingvalue: 2000
-check:output!~Set cappingwatt failed.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 2000
-
-end
diff --git a/xCAT-test/autotest/testcase/renergy/case_9125-F2C b/xCAT-test/autotest/testcase/renergy/case_9125-F2C
deleted file mode 100644
index f82300796..000000000
--- a/xCAT-test/autotest/testcase/renergy/case_9125-F2C
+++ /dev/null
@@ -1,534 +0,0 @@
-
-start:query_9125-F2C_reset
-description:Reset the value of power saving and capping to a default one
-type:9125-F2C
-cmd:renergy $$CN savingstatus=off
-check:rc==0
-check:output=~Set savingstatus succeeded
-cmd:renergy $$CN dsavingstatus=off
-check:rc==0
-check:output=~Set dsavingstatus succeeded
-cmd:renergy $$CN cappingstatus=off
-check:rc==0
-check:output=~Set cappingstatus succeeded
-cmd:renergy $$CN fsavingstatus=off
-check:rc==0
-check:output=~Set fsavingstatus succeeded
-cmd:renergy $$CN ffovalue=3000
-check:rc==0
-cmd:renergy $$CN cappingwatt=14555
-check:rc==0
-end
-
-start:query_9125-F2C_all
-description:query all the attributes of the node
-type:9125-F2C
-cmd:renergy $$CN all
-check:rc==0
-check:output=~savingstatus: off
-check:output=~cappingstatus: off
-check:output=~dsavingstatus: off
-check:output=~cappingmin: 14505
-check:output=~cappingmax: 14585
-check:output=~cappingvalue: 14555
-check:output=~cappingsoftmin: 5556
-check:output=~averageAC: na
-check:output~~averageDC: 6976
-check:output~~ambienttemp: 24
-check:output~~ exhausttemp: 24
-check:output~~CPUspeed: 3836
-check:output=~syssbpower: na
-check:output~~sysIPLtime: 900
-check:output=~fsavingstatus: off
-check:output=~ffoMin: 2856 MHz
-check:output=~ffoVmin: 2856 MHz
-check:output=~ffoTurbo: 3836 MHz
-check:output=~ffoNorm: 3836 MHz
-check:output=~ffovalue: 3000 MHz
-end
-
-start:query_9125-F2C_savingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN savingstatus
-check:rc==0
-check:output=~savingstatus: off
-check:output!~dsavingstatus
-check:output!~cappingstatus
-end
-
-start:query_9125-F2C_dsavingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: off
-check:output!~: savingstatus
-check:output!~cappingstatus
-end
-
-start:query_9125-F2C_cappingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN cappingstatus
-check:rc==0
-check:output=~cappingstatus: off
-check:output!~dsavingstatus
-check:output!~savingstatus
-end
-
-start:query_9125-F2C_cappingmaxmin
-description:
-type:9125-F2C
-cmd:renergy $$CN cappingmaxmin
-check:rc==0
-check:output=~cappingmin: 14505
-check:output=~cappingmax: 14585
-check:output!~cappingvalue
-check:output!~cappingsoftmin
-end
-
-start:query_9125-F2C_cappingvalue
-description:
-type:9125-F2C
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 14555
-check:output!~cappingmin
-check:output!~cappingmax
-check:output!~cappingsoftmin
-end
-
-start:query_9125-F2C_cappingsoftmin
-description:
-type:9125-F2C
-cmd:renergy $$CN cappingsoftmin
-check:rc==0
-check:output=~cappingsoftmin: 5556
-check:output!~cappingmin
-check:output!~cappingmax
-check:output!~cappingvalue
-end
-
-start:query_9125-F2C_averageAC
-description:
-type:9125-F2C
-cmd:renergy $$CN averageAC
-check:rc==0
-check:output=~averageAC: na
-check:output!~averageDC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~CPUspeed
-end
-
-start:query_9125-F2C_averageDC
-description:
-type:9125-F2C
-cmd:renergy $$CN averageDC
-check:rc==0
-check:output~~averageDC: 6976
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~CPUspeed
-end
-
-start:query_9125-F2C_ambienttemp
-description:
-type:9125-F2C
-cmd:renergy $$CN ambienttemp
-check:rc==0
-check:output~~ambienttemp: 24
-check:output!~averageAC
-check:output!~averageDC
-check:output!~exhausttemp
-check:output!~CPUspeed
-end
-
-start:query_9125-F2C_exhausttemp
-description:
-type:9125-F2C
-cmd:renergy $$CN exhausttemp
-check:rc==0
-check:output~~exhausttemp: 24
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~averageDC
-check:output!~CPUspeed
-end
-
-start:query_9125-F2C_CPUspeed
-description:
-type:9125-F2C
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3836
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~averageDC
-end
-
-start:query_9125-F2C_syssbpower
-description:
-type:9125-F2C
-cmd:renergy $$CN syssbpower
-check:rc==0
-check:output=~syssbpower: 20 W
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~averageDC
-check:output!~sysIPLtime
-end
-
-start:query_9125-F2C_sysIPLtime
-description:
-type:9125-F2C
-cmd:renergy $$CN sysIPLtime
-check:rc==0
-check:output=~sysIPLtime: 900
-check:output!~averageAC
-check:output!~ambienttemp
-check:output!~exhausttemp
-check:output!~averageDC
-check:output!~syssbpower
-end
-
-start:query_9125-F2C_fsavingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN fsavingstatus
-check:rc==0
-check:output=~fsavingstatus: off
-check:output!~dsavingstatus
-check:output!~cappingstatus
-end
-
-start:query_9125-F2C_ffoMin
-description:
-type:9125-F2C
-cmd:renergy $$CN ffoMin
-check:rc==0
-check:output=~ffoMin: 2856 MHz
-check:output!~ffoVmin
-check:output!~ffoTurbo
-check:output!~ffoNorm
-check:output!~ffovalue
-end
-
-start:query_9125-F2C_ffoVmin
-description:
-type:9125-F2C
-cmd:renergy $$CN ffoVmin
-check:rc==0
-check:output=~ffoVmin: 2856 MHz
-check:output!~ffomin
-check:output!~ffoTurbo
-check:output!~ffoNorm
-check:output!~ffovalue
-end
-
-start:query_9125-F2C_ffoTurbo
-description:
-type:9125-F2C
-cmd:renergy $$CN ffoTurbo
-check:rc==0
-check:output=~ffoTurbo: 3836 MHz
-check:output!~ffomin
-check:output!~ffoVmin
-check:output!~ffoNorm
-check:output!~ffovalue
-end
-
-start:query_9125-F2C_ffoNorm
-description:
-type:9125-F2C
-cmd:renergy $$CN ffoNorm
-check:rc==0
-check:output=~ffoNorm: 3836 MHz
-check:output!~ffomin
-check:output!~ffoVmin
-check:output!~ffoTurbo
-check:output!~ffovalue
-end
-
-start:query_9125-F2C_ffovalue
-description:
-type:9125-F2C
-cmd:renergy $$CN ffovalue
-check:rc==0
-check:output=~ffovalue: 3000 MHz
-check:output!~ffomin
-check:output!~ffoVmin
-check:output!~ffoTurbo
-check:output!~ffoNorm
-end
-
-start:set_9125-F2C_savingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN savingstatus=on
-check:rc==0
-check:output=~Set savingstatus succeeded
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set savingstatus failed.
-cmd:sleep 60
-
-cmd:renergy $$CN savingstatus
-check:rc==0
-check:output=~savingstatus: on
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 2856
-
-cmd:renergy $$CN savingstatus=onxx
-check:rc!=0
-check:output=~Usage:
-
-cmd:renergy $$CN dsavingstatus=on-norm
-check:rc!=0
-check:output=~Cannot enable static and dynamic power
-check:output=~Set dsavingstatus failed.
-
-cmd:renergy $$CN savingstatus=off
-check:rc==0
-check:output=~Set savingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set savingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN savingstatus
-check:rc==0
-check:output=~savingstatus: off
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3836
-end
-
-
-start:set_9125-F2C_dsavingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN dsavingstatus=on
-check:rc!=0
-check:output=~ Usage:
-
-cmd:renergy $$CN dsavingstatus=on-norm
-check:rc==0
-check:output=~Set dsavingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set dsavingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: on-norm
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3836
-
-cmd:renergy $$CN savingstatus=on
-check:rc!=0
-check:output=~Cannot enable static and dynamic power
-check:output=~Set savingstatus failed.
-
-cmd:renergy $$CN dsavingstatus=onxx
-check:rc!=0
-check:output=~ Usage:
-
-cmd:renergy $$CN dsavingstatus=on-maxp
-check:rc==0
-check:output=~Set dsavingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set dsavingstatus failed.
-
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: on-maxp
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3836
-
-cmd:renergy $$CN dsavingstatus=off
-check:rc==0
-check:output=~Set dsavingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set dsavingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN dsavingstatus
-check:rc==0
-check:output=~dsavingstatus: off
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3836
-end
-
-start:set_9125-F2C_cappingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN cappingstatus=on
-check:rc==0
-check:output=~Set cappingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set cappingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN cappingstatus
-check:rc==0
-check:output=~cappingstatus: on
-
-cmd:renergy $$CN cappingstatus=onxx
-check:rc!=0
-check:output=~Usage:
-
-cmd:renergy $$CN cappingstatus=off
-check:rc==0
-check:output=~Set cappingstatus succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set cappingstatus failed.
-
-cmd:sleep 60
-
-cmd:renergy $$CN cappingstatus
-check:rc==0
-check:output=~cappingstatus: off
-end
-
-start:set_9125-F2C_cappingwatt
-description:
-type:9125-F2C
-cmd:renergy $$CN cappingwatt=14560
-check:rc==0
-check:output=~Set cappingwatt succeeded.
-check:output=~cappingvalue: 14560
-check:output!~Set cappingwatt failed.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 14560
-
-cmd:renergy $$CN cappingwatt=100
-check:rc!=0
-check:output!~Set cappingwatt succeeded.
-check:output=~Set cappingwatt failed.
-check:output=~Invalid value for cappingwatt.
-
-cmd:renergy $$CN cappingwatt=15000
-check:rc!=0
-check:output!~Set cappingwatt succeeded.
-check:output=~Set cappingwatt failed.
-check:output=~Invalid value for cappingwatt.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 14560
-
-cmd:renergy $$CN cappingwatt=14555
-check:rc==0
-check:output=~Set cappingwatt succeeded.
-check:output=~cappingvalue: 14555
-check:output!~Set cappingwatt failed.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 14555
-end
-
-start:set_9125-F2C_cappingperc
-description:
-type:9125-F2C
-cmd:renergy $$CN cappingperc=0
-check:rc==0
-check:output=~Set cappingperc succeeded.
-check:output=~cappingvalue: 14505
-check:output!~Set cappingperc failed.
-
-cmd:renergy $$CN cappingperc=50
-check:rc==0
-check:output=~Set cappingperc succeeded.
-check:output=~cappingvalue: 14545
-check:output!~Set cappingperc failed.
-
-cmd:renergy $$CN cappingperc=100
-check:rc==0
-check:output=~Set cappingperc succeeded.
-check:output=~cappingvalue: 14585
-check:output!~Set cappingperc failed.
-
-cmd:renergy $$CN cappingperc=110
-check:rc!=0
-check:output!~Set cappingperc succeeded.
-check:output=~Invalid value for cappingperc.
-check:output=~Set cappingperc failed.
-
-cmd:renergy $$CN cappingwatt=14555
-check:rc==0
-check:output=~Set cappingwatt succeeded.
-check:output=~cappingvalue: 14555
-check:output!~Set cappingwatt failed.
-
-cmd:renergy $$CN cappingvalue
-check:rc==0
-check:output=~cappingvalue: 14555
-
-end
-
-
-start:set_9125-F2C_fsavingstatus
-description:
-type:9125-F2C
-cmd:renergy $$CN fsavingstatus=on
-check:rc==0
-check:output=~Set fsavingstatus succeeded.
-check:output!~Set fsavingstatus failed.
-
-cmd:renergy $$CN fsavingstatus
-check:rc==0
-check:output=~fsavingstatus: on
-
-cmd:renergy $$CN fsavingstatus=onxx
-check:rc!=0
-check:output=~ Usage:
-
-cmd:renergy $$CN ffovalue=3100
-check:rc==0
-check:output=~Set ffovalue succeeded.
-check:output=~This setting may need several minutes to take effect.
-check:output!~Set ffovalue failed.
-
-cmd:sleep 90
-
-cmd:renergy $$CN CPUspeed
-check:rc==0
-check:output~~CPUspeed: 3100
-
-cmd:renergy $$CN ffovalue=2000
-check:rc!=0
-check:output=~Set ffovalue failed.
-check:output=~Invalid value for ffovalue
-check:output!~Set ffovalue succeeded.
-
-cmd:renergy $$CN fsavingstatus=off
-check:rc==0
-check:output=~Set fsavingstatus succeeded.
-check:output!~Set fsavingstatus failed.
-
-cmd:renergy $$CN fsavingstatus
-check:rc==0
-check:output=~fsavingstatus: off
-
-end
-
-
diff --git a/xCAT-test/autotest/testcase/restartxcatd/cases0 b/xCAT-test/autotest/testcase/restartxcatd/cases0
deleted file mode 100644
index 83dd70a6a..000000000
--- a/xCAT-test/autotest/testcase/restartxcatd/cases0
+++ /dev/null
@@ -1,32 +0,0 @@
-start:restartxcatd_v
-os:AIX
-cmd:restartxcatd -v
-check:rc==0
-check:output=~Version
-end
-
-start:restartxcatd_h
-os:AIX
-cmd:restartxcatd -h
-check:rc==0
-cmd:restartxcatd --help
-check:rc==0
-end
-
-start:restartxcatd
-os:AIX
-cmd:restartxcatd
-check:rc==0
-check:output=~The xcatd Subsystem was requested to stop
-check:output=~The xcatd Subsystem has been started. Subsystem PID is \d+
-end
-
-start:restartxcatd_V
-os:AIX
-cmd:restartxcatd -V
-check:output=~Stopped the xcatd subsystem
-check:output=~The xcatd Subsystem has been started
-check:output=~Running command on
-check:output=~Started the xcatd subsystem
-end
-
diff --git a/xCAT-test/autotest/testcase/restorexCATdb/cases0 b/xCAT-test/autotest/testcase/restorexCATdb/cases0
index eeb8c87e3..f2cc5c43f 100644
--- a/xCAT-test/autotest/testcase/restorexCATdb/cases0
+++ b/xCAT-test/autotest/testcase/restorexCATdb/cases0
@@ -1,10 +1,12 @@
start:restorexCAT_h
+label:mn_only,db
cmd:restorexCATdb -h
check:rc==0
check:output=~restorexCATdb
end
start:restorexCATdb_v
+label:mn_only,db
cmd:restorexCATdb -v
check:rc==0
check:output=~Version
@@ -12,6 +14,7 @@ end
start:restorexcatdb_p
description:restore the xcat database from the /tmp/db
+label:mn_only,db
cmd:chtab key=skiptables site.value=""
check:rc==0
cmd:dumpxCATdb -p /tmp/db1
@@ -33,6 +36,7 @@ cmd:rm -rf /tmp/db1 /tmp/db2 /tmp/db.1 /tmp/db.2
end
start:restorexCATdb_p_V
+label:mn_only,db
cmd:chtab key=skiptables site.value=""
check:rc==0
cmd:dumpxCATdb -a -p /tmp/db
@@ -47,6 +51,7 @@ cmd:rm -rf /tmp/db
end
start:restorexCATdb_a_p_V
+label:mn_only,db
cmd:chtab key=skiptables site.value=""
check:rc==0
cmd:dumpxCATdb -a -p /tmp/db
@@ -60,6 +65,7 @@ cmd:rm -rf /tmp/db
end
start:restorexCATdb_wrongpath
+label:mn_only,db
cmd:restorexCATdb -p /tmp/testpath
check:rc!=0
end
diff --git a/xCAT-test/autotest/testcase/reventlog/cases0 b/xCAT-test/autotest/testcase/reventlog/cases0
index db17b616b..b07293b9d 100644
--- a/xCAT-test/autotest/testcase/reventlog/cases0
+++ b/xCAT-test/autotest/testcase/reventlog/cases0
@@ -1,22 +1,26 @@
start:reventlog_null
+label:mn_only,hctrl_general
cmd:reventlog
check:rc==0
check:output=~Usage
end
start:reventlog_all
+label:cn_bmc_ready,hctrl_general
cmd:reventlog $$CN all
check:rc==0
check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+|No attributes returned from the BMC
end
start:reventlog_clear
+label:cn_bmc_ready,hctrl_general
cmd:reventlog $$CN clear
check:rc==0
check:output=~$$CN\s*:\s*Logs cleared|SEL cleared
end
start:reventlog_numofentries
+label:cn_bmc_ready,hctrl_general
cmd:reventlog $$CN 5
check:rc==0
check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+|$$CN: no SEL entries|Entry|No attributes returned from the BMC
@@ -26,6 +30,7 @@ start:reventlog_s_openbmc
description: For openbmc, reventlog has dropped option s
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:reventlog $$CN 10 -s
check:output=~The -s option is not supported for OpenBMC
check:rc!=0
diff --git a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0
index b1a1c77f6..4853e8dfa 100644
--- a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0
+++ b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0
@@ -2,6 +2,7 @@ start:rflash_option_c_without_specify_noderange
description: basic usage check for option c. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rflash -c
check:output=~Usage:
cmd:rflash -c 1.tar
@@ -13,6 +14,7 @@ start:rflash_option_l_without_specify_noderange
description: basic usage check for option l. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rflash -l
check:output=~Usage:
end
@@ -21,6 +23,7 @@ start:rflash_option_a_without_specify_noderange
description: basic usage check for option a. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rflash -a
check:output=~Usage:
cmd:rflash -a 1.tar
@@ -35,6 +38,7 @@ start:rflash_option_u_without_specify_noderange
description: basic usage check for option u. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rflash -u
check:output=~Usage:
cmd:rflash -u 1.tar
@@ -46,10 +50,11 @@ start:rflash_option_d_without_specify_noderange
description: basic usage check for option d. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rflash -d
check:output=~Usage:
cmd:rflash -d /1234
-check:Usage:
+check:output=~Usage:
cmd:rflash --delete 1234abc
check:rc != 0
check:output=~Error: (\[.*?\]: )?Invalid nodes and/or groups in noderange
@@ -59,6 +64,7 @@ start:rflash_without_option
description: basic usage check, if without option, should throw out a error
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN 1.tar
check:rc != 0
check:output=~Error: (\[.*?\]: )?Invalid option specified when a file is provided:
@@ -68,6 +74,7 @@ start:rflash_unsupport_multiple_option_a_u
description: basic usage check. If specify multiple options a+u, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -a 1.tz -u
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -77,6 +84,7 @@ start:rflash_unsupport_multiple_option_a_c
description: basic usage check. If specify multiple options a+c, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -a 1.tz -c
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -86,6 +94,7 @@ start:rflash_unsupport_multiple_option_a_l
description: basic usage check. If specify multiple options a+l, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -a 1.tz -l
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -95,6 +104,7 @@ start:rflash_unsupport_multiple_option_a_d
description: basic usage check. If specify multiple options a+d, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -a 1.tz -d
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -104,6 +114,7 @@ start:rflash_unsupport_multiple_option_c_l
description: basic usage check. If specify multiple options c+l, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -c 1.tz -l
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -113,6 +124,7 @@ start:rflash_unsupport_multiple_option_c_u
description: basic usage check. If specify multiple options c+u, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -c 1.tz -u
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -122,6 +134,7 @@ start:rflash_unsupport_multiple_option_c_d
description: basic usage check. If specify multiple options c+d, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -c 1.tz -d
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -131,6 +144,7 @@ start:rflash_unsupport_multiple_option_l_d
description: basic usage check. If specify multiple options l+d, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -l -d
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -140,6 +154,7 @@ start:rflash_unsupport_multiple_option_l_u
description: basic usage check. If specify multiple options l+u, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -l -u
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -149,6 +164,7 @@ start:rflash_unsupport_multiple_option_u_d
description: basic usage check. If specify multiple options u+d, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -u -d
check:output=~Error: (\[.*?\]: )?Multiple options are not supported
check:rc != 0
@@ -158,6 +174,7 @@ start:rflash_option_c_file_not_exist
description: basic usage check for option c. if the file does not exist, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -c /tmp/abc123.tz
check:output=~Error: (\[.*?\]: )?Invalid firmware specified with
check:rc != 0
@@ -182,6 +199,7 @@ start:rflash_option_c_with_multiple_values
description: basic usage check for option c. if there are multiple value assigned to c option, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -c /tmp/abc123.tz /tmp/abc124.tz
check:output=~Error: (\[.*?\]: )?Invalid firmware specified with
check:rc != 0
@@ -200,6 +218,7 @@ start:rflash_option_c_against_node
description: Make sure the -c option against node works
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -c |tee /tmp/rflash_option_c.output
check:rc == 0
cmd:grep -i ibm /tmp/rflash_option_c.output |grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l
@@ -216,6 +235,7 @@ start:rflash_option_check_with_V_against_node
description: Make sure the --check option with V works
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN --check -V |tee /tmp/rflash_option_check_with_V.output
check:rc == 0
cmd:grep -i ibm /tmp/rflash_option_check_with_V.output |grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l
@@ -233,6 +253,7 @@ start:rflash_option_l_with_value
description: basic usage check for option l. if there is value for l option, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -l /tmp/abc123.tz
check:output=~Error: (\[.*?\]: )?Invalid option
check:rc != 0
@@ -245,6 +266,7 @@ start:rflash_option_l
description: Make sure the -l option works
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -l |tee /tmp/rflash_option_l.output
check:rc == 0
cmd:grep -i ' bmc ' /tmp/rflash_option_l.output | grep -i 'Active(\*)' | wc -l
@@ -262,6 +284,7 @@ start:rflash_option_u_file_not_exist
description: basic usage check for option u. if the file does not exist, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -u /tmp/abc123.tz
check:output=~Error: (\[.*?\]: )?Invalid firmware specified with
check:output!~Attempting to
@@ -292,6 +315,7 @@ start:rflash_option_u_with_multiple_values
description: basic usage check for option u. if there are multiple value assigned to u option, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -u /tmp/abc123.tz /tmp/abc124.tz
check:output=~Error: (\[.*?\]: )?Invalid firmware specified with
check:output!~Attempting to
@@ -314,6 +338,7 @@ start:rflash_option_a_file_not_exist
description: basic usage check for option a. if the file does not exist, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -a /tmp/abc123.tz
check:output=~rror: Invalid firmware specified with
check:output!~Attempting to
@@ -344,6 +369,7 @@ start:rflash_option_a_with_multiple_values
description: basic usage check for option a. if there are multiple value assigned to a option, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -a /tmp/abc123.tz /tmp/abc124.tz
check:output=~Error: (\[.*?\]: )?Invalid firmware specified with
check:output!~Attempting to
@@ -375,6 +401,7 @@ start:rflash_option_a_with_non_existent_id
description: basic usage check for option a. if active a non-existent firmware ID, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -a 1234567
check:output=~Error: (\[.*?\]: )?Invalid ID provided to activate
check:rc != 0
@@ -387,6 +414,7 @@ start:rflash_option_delete_with_multiple_values
description: basic usage check for option delete. if there are multiple value assigned to delete option, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN --delete 1234567 2345678
check:output=~Error: (\[.*?\]: )?More than one firmware specified is not supported
check:output!~Attempting to delete
@@ -405,6 +433,7 @@ start:rflash_option_delete_with_non_existent_id
description: basic usage check for option --delete. if delete a non-existent firmware ID, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN --delete 1234567
check:output=~Error: (\[.*?\]: )?Invalid ID provided to delete
check:rc != 0
@@ -417,6 +446,7 @@ start:rflash_option_d_with_multiple_values
description: basic usage check for option d. if there are multiple value assigned to d option, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rflash $$CN -d /123/ /234/
check:output=~Error: (\[.*?\]: )?More than one
check:output!~Attempting to
@@ -436,6 +466,7 @@ start:rflash_option_d_with_non_existent_dir
description: basic usage check for option -d. if try to oprate non-existent dir by d option, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rm -rf /tmp/bogus123
check:rc == 0
cmd:rflash $$CN -d /tmp/bogus123
@@ -471,6 +502,7 @@ start:rflash_usage
description:checke the usage of rflash for openbmc
os:Linux
hcp:openbmc
+label:mn_only,hctrl_openbmc
cmd:rflash -h
check:output =~Usage:
check:output =~OpenPOWER OpenBMC specific:
@@ -483,6 +515,7 @@ start:rflash_delete_no_active
description:this case is to check if --delete is not allowed to be used for the active state firmware. This case is for issue 4770.
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:activenum=`rflash $$CN -l |grep -w "Host\s*Active(\*)" |awk '{print $2}'`;rflash $$CN $activenum --delete
check:rc != 0
check:output =~$$CN\s*:\s*(\[.*?\]: )?Error: Deleting currently active firmware on powered on host is not supported
diff --git a/xCAT-test/autotest/testcase/rinv/cases0 b/xCAT-test/autotest/testcase/rinv/cases0
index 25709872f..38634c382 100644
--- a/xCAT-test/autotest/testcase/rinv/cases0
+++ b/xCAT-test/autotest/testcase/rinv/cases0
@@ -4,22 +4,28 @@
#check:rc!=0
#check:output=~Usage
#end
+
start:rinv_h
description:show help information for rinv
+label:mn_only,hctrl_general
cmd:rinv -h
check:rc==0
check:output=~Usage
check:output=~rinv
end
+
start:rinv_help
description:show help information for rinv
+label:mn_only,hctrl_general
cmd:rinv --help
check:rc==0
check:output=~Usage
check:output=~rinv
end
+
start:rinv_v
description:show version for Version
+label:mn_only,hctrl_general
cmd:rinv -v
check:rc==0
check:output=~Version
@@ -28,76 +34,100 @@ end
start:rinv_bus
description:rinv list all buses for each I/O slot
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_fsp
cmd:rinv $$CN bus
check:rc==0
check:output=~I/O Bus Information
end
+
start:rinv_config
description:Retrieves number of processors, speed, total memory, and DIMM locations.
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_fsp
cmd:rinv $$CN config
check:rc==0
check:output=~Machine Configuration Info
check:output=~Number of Processors:\s*\d+
check:output=~Total Memory \(\w+\):\s*\d+
end
+
start:rinv_serial
description:Retrieves serial number.
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN serial
check:rc==0
end
+
start:rinv_model
description:Retrieves serial number.
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN model
check:rc==0
end
+
start:rinv_firm
description:Retrieves firmware versions.
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN firm
check:rc==0
end
+
start:rinv_all
description:get serial,model
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN all
check:rc==0
end
+
start:rinv_cpu
description:get cpu information
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN cpu
check:rc==0
end
+
start:rinv_dimm
description:get dimm information
Attribute: $$CN-The operation object of rinv command
+hcp:openbmc
+arch:ppc64le
+label:cn_bmc_ready,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN dimm
check:rc==0
end
+
start:rinv_uuid
description:get uuid information
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_openpower_ipmi
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN uuid
check:rc==0
end
+
start:rinv_vpd
description:get vpd information
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_openpower_ipmi
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN vpd
check:rc==0
end
start:rinv_noderange_err
+label:mn_only,hctrl_general
cmd:rinv testnode
check:rc!=0
check:output=~Error
end
+
start:rinv_mixnode
description:get mixnode information,one is invalid node
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_general
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:chdef testnode groups=test mgt=__GETNODEATTR($$CN,mgt)__
@@ -112,9 +142,11 @@ check:rc==0
cmd:rmdef testnode;if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi
check:rc==0
end
+
start:rinv_wrongbmcpasswd
description:get right return if bmc's passwd wrong
Attribute: $$CN-The operation object of rinv command
+label:cn_bmc_ready,hctrl_openpower_ipmi,hctrl_fsp,hctrl_openbmc
cmd:lsdef -l $$CN -z >/tmp/testnode.stanza
check:rc==0
cmd:chdef $$CN bmcpassword=test
@@ -125,8 +157,10 @@ check:output=~$$CN: (\[.*?\]: )?Error:.+Invalid username or password|Error: (\[.
cmd:cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza
check:rc==0
end
+
start:rinv_errorcommand
description:get right return if input error command
+label:cn_bmc_ready,hctrl_general
cmd:rinv $$CN dafds
check:rc==1
check:output=~Unsupported command|Error: (\[.*?\]: )?Usage:
diff --git a/xCAT-test/autotest/testcase/rinv/cases2 b/xCAT-test/autotest/testcase/rinv/cases2
index 388ae6ce5..45f2b071b 100644
--- a/xCAT-test/autotest/testcase/rinv/cases2
+++ b/xCAT-test/autotest/testcase/rinv/cases2
@@ -2,6 +2,7 @@ start:rinv_mprom
description:this case is to test mprom option for rinv on x86_64 servers.
hcp:ipmi
arch:x86_64
+label:cn_bmc_ready,hctrl_bmc_ipmi
cmd:rinv $$CN mprom
check:rc==0
check:output=~BMC Firmware:\s*\w+.\w+
@@ -11,6 +12,7 @@ start:rinv_guid
description:this case is to test guid option for rinv on x86_64 servers.
hcp:ipmi
arch:x86_64
+label:cn_bmc_ready,hctrl_bmc_ipmi
cmd:rinv $$CN guid
check:rc==0
check:output=~UUID/GUID:\s*\w+-\w+-\w+-\w+-\w+
@@ -20,6 +22,7 @@ start:rinv_dimm
description:this case is to test dimm option for rinv on x86_64 servers.
hcp:ipmi
arch:x86_64
+label:cn_bmc_ready,hctrl_bmc_ipmi
cmd:rinv $$CN dimm
check:rc==0
check:output=~DIMM 1 :\s*\w+
diff --git a/xCAT-test/autotest/testcase/rmdef/cases0 b/xCAT-test/autotest/testcase/rmdef/cases0
index 5133ae8aa..e84a5365a 100644
--- a/xCAT-test/autotest/testcase/rmdef/cases0
+++ b/xCAT-test/autotest/testcase/rmdef/cases0
@@ -1,11 +1,13 @@
start:rmdef_null
description:rmdef without any flag
+label:mn_only,db
cmd:rmdef
check:output=~Usage
end
start:rmdef_t_o_node
description:rmdef -t node -o
+label:mn_only,db
cmd:mkdef -t node -o testnode,testnode1 groups=all,aix
check:rc==0
cmd:lsdef -t node testnode,testnode1
@@ -20,6 +22,7 @@ end
start:rmdef_t_node
description:rmdef -t node
+label:mn_only,db
cmd:mkdef -t node -o testnode,testnode1 groups=all,aix
check:rc==0
cmd:lsdef -t node testnode,testnode1
@@ -34,6 +37,7 @@ end
start:rmdef_node
description:rmdef nodename
+label:mn_only,db
cmd:mkdef -t node -o testnode,testnode1 groups=all,aix
check:rc==0
cmd:lsdef -t node testnode,testnode1
@@ -48,6 +52,7 @@ end
start:rmdef_t_o_network
description:rmdef -t network
+label:mn_only,db
cmd:mkdef -t network -o testnet net=1.2.3.0 mask=255.0.0.0 gateway=1.2.3.1
check:rc==0
cmd:lsdef -t network
@@ -60,6 +65,7 @@ end
start:rmdef_group
description:rmdef to remove static node group
+label:mn_only,db
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t group -o testgrp members=testnode1,testnode2
@@ -81,6 +87,7 @@ end
start:rmdef_dynamic_group
description:rmdef to remove dynamic node group
+label:mn_only,db
cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp
check:rc==0
cmd:mkdef -t group -o dyngrp -d -w mgt==hmc -w cons==hmc -w groups==all,systemp
@@ -124,17 +131,18 @@ end
start:rmdef_t_err
description:rmdef -t wrongtype
+label:mn_only,db
cmd:rmdef -t wrongtype -o testnode
check:rc!=0
check:output=~not a valid
end
start:rmdef_template
-os:linux
description:try to delete a template, then error messages appear
+label:mn_only,db
cmd:result=`lsdef | grep switch-template`; if [[ $result =~ "switch-template" ]]; then echo $result; noderm switch-template; fi
cmd:rmdef switch-template
check:rc==1
-check:output=~Error\: Could not find an object named \'switch-template\' of type \'node\'
+check:output=~Error\: (\[.*?\]: )?Could not find an object named \'switch-template\' of type \'node\'
check:output=~No objects have been removed from the xCAT database.
end
diff --git a/xCAT-test/autotest/testcase/rmdsklsnode/cases0 b/xCAT-test/autotest/testcase/rmdsklsnode/cases0
deleted file mode 100644
index ea1abf740..000000000
--- a/xCAT-test/autotest/testcase/rmdsklsnode/cases0
+++ /dev/null
@@ -1,57 +0,0 @@
-start:rmdsklsnode_h
-os:AIX
-cmd:rmdsklsnode -h
-check:rc==0
-check:output=~Usage
-end
-
-start:rmdsklsnode_node
-os:AIX
-cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
-check:rc==0
-cmd:mkdsklsnode -i autotestdsklsimage $$CN -f
-check:rc==0
-check:output=~Initializing NIM machine '$$CN'
-check:output=~AIX/NIM diskless nodes were initialized
-cmd:lsnim -l $$CN
-check:rc==0
-cmd:rmdsklsnode $$CN
-check:rc==0
-cmd:lsnim |grep $$CN
-check:rc!=0
-check:output!~$$CN
-cmd:nim -o remove autotestdsklsimage
-cmd:nim -o remove autotestdsklsimage_lpp_source
-cmd:nim -o remove autotestdsklsimage_shared_root
-cmd:nim -o remove autotestdsklsimage_paging
-cmd:chtab -d imagename=autotestdsklsimage osimage
-cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
-cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
-cmd:rm -rf /install/nim/spot/autotestdsklsimage
-cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
-end
-
-
-start:rmdsklsnode_i
-os:AIX
-cmd:mknimimage -r -t diskless -s $$SOURCE autotestdsklsimage
-check:rc==0
-cmd:mkdsklsnode -n -i autotestdsklsimage $$CN
-check:rc==0
-cmd:lsnim |grep $$CN|sed -e 's/_/ /g'|cut -d" " -f2 |grep ^autotestdsklsimage$
-check:rc==0
-cmd:rmdsklsnode -i autotestdsklsimage $$CN -V
-check:rc==0
-cmd:lsnim |grep $$CN|sed -e 's/_/ /g'|cut -d" " -f2 |grep ^autotestdsklsimage$
-check:rc!=0
-cmd:nim -o remove autotestdsklsimage
-cmd:nim -o remove autotestdsklsimage_lpp_source
-cmd:nim -o remove autotestdsklsimage_shared_root
-cmd:nim -o remove autotestdsklsimage_paging
-cmd:chtab -d imagename=autotestdsklsimage osimage
-cmd:rm -rf /install/nim/lpp_source/autotestdsklsimage_lpp_source
-cmd:rm -rf /install/nim/paging/autotestdsklsimage_paging
-cmd:rm -rf /install/nim/spot/autotestdsklsimage
-cmd:rm -rf /install/nim/shared_root/autotestdsklsimage_shared_root
-end
-
diff --git a/xCAT-test/autotest/testcase/rmnimimage/cases0 b/xCAT-test/autotest/testcase/rmnimimage/cases0
deleted file mode 100644
index 1bfa1de20..000000000
--- a/xCAT-test/autotest/testcase/rmnimimage/cases0
+++ /dev/null
@@ -1,59 +0,0 @@
-start:rmnimimage_imagename
-description:rmnimimage testimage
-os:AIX
-cmd:mknimimage -s $$SOURCE testimage
-check:rc==0
-check:output=~lpp_source=testimage_lpp_source
-check:output=~bosinst_data=testimage_bosinst_data
-check:output=~testimage
-cmd:rmnimimage testimage
-check:rc==0
-cmd:lsnim
-check:output!~testimage_bosinst_data
-check:output=~testimage_lpp_source
-cmd:rmdef -t osimage -o testimage
-end
-
-start:rmnimimage_d_imagename
-description:rmnimimage -d imagename
-os:AIX
-cmd:mknimimage -s $$SOURCE testimage
-check:rc==0
-check:output=~lpp_source=testimage_lpp_source
-check:output=~bosinst_data=testimage_bosinst_data
-check:output=~testimage
-cmd:rmnimimage -d testimage
-check:rc==0
-cmd:lsnim
-check:output!~testimage
-cmd:tabdump osimage
-check:output=~testimage
-cmd:rmdef -t osimage -o testimage
-end
-
-start:rmnimimage_x_imagename
-os:AIX
-cmd:mknimimage -s $$SOURCE testimage
-check:rc==0
-check:output=~lpp_source=testimage_lpp_source
-check:output=~bosinst_data=testimage_bosinst_data
-check:output=~testimage
-cmd:rmnimimage testimage
-check:rc==0
-cmd:tabdump osimage
-check:output=~testimage
-cmd:rmnimimage -x testimage
-ckeck:rc==0
-cmd:tabdump osimage
-ckeck:output!~testimage
-end
-
-start:rmnimimage_h
-description:rmnimimage -h and --help
-os:AIX
-cmd:rmnimimage -h
-check:output=~usage|Usage
-cmd:rmnimimage --help
-check:output=~usage|Usage
-end
-
diff --git a/xCAT-test/autotest/testcase/rpower/cases0 b/xCAT-test/autotest/testcase/rpower/cases0
index 78310d253..399ab93a3 100644
--- a/xCAT-test/autotest/testcase/rpower/cases0
+++ b/xCAT-test/autotest/testcase/rpower/cases0
@@ -1,6 +1,7 @@
start:rpower_off
description:This case is to test off option could remote power off nodes
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN on
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
check:ouptut=~Running|on
@@ -14,6 +15,7 @@ end
start:rpower_stat
description:This case is to test stat option could show the power status of nodes
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN on
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 5 ];then break;fi done
cmd:rpower $$CN stat
@@ -35,6 +37,7 @@ end
start:rpower_boot
description:This case is to test boot option could power on the nodes if nodes in off state. Or could hard reset the nodes if they are on.
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN off
cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN stat
@@ -49,6 +52,7 @@ end
start:rpower_status
description:This case is to test status option could show the power status of nodes
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN off
cmd:a=0;while ! `rpower $$CN status|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN status
@@ -63,6 +67,7 @@ end
start:rpower_state
description:This case is to test state option could show the power status of nodes
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN off
cmd:a=0;while ! `rpower $$CN state|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN state
@@ -77,6 +82,7 @@ end
start:rpower_on
description:This case is to test on option could remote power on nodes
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN off
cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN stat
@@ -91,6 +97,7 @@ end
start:rpower_reset
description:This case is to test reset option could hard reset nodes when nodes are in on state.
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:stat=`rpower $$CN stat`;if ([[ $stat =~ on ]] || [[ $stat =~ Running ]]) ;then rpower $$CN reset;sleep 300;stat1=`rpower $$CN stat`;if ([[ $stat1 =~ on ]] || [[ $stat1 =~ Running ]]);then exit 0;else exit 1;fi;else rpower $$CN reset;sleep 300;stat1=`rpower $$CN stat`;if ([[ $stat1 =~ off ]] || [[ $stat1 =~ "Not Activated" ]]);then exit 0;else exit 1;fi;fi
check:rc==0
end
@@ -98,6 +105,7 @@ end
start:rpower_noderange
description:This case is to test rpower could process error usage and return help information.
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN
check:rc!=0
check:output=~Unsupported|Usage|Please enter an action
@@ -106,6 +114,7 @@ end
start:rpower_noderange_nodeps
description:This case is to test rpower could process error usage and return help information.
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_general
cmd:rpower $$CN --nodeps
check:rc!=0
check:output=~Unsupported|Usage
@@ -114,6 +123,7 @@ end
start:rpower_err_noderange
description:This case is to test rpower could process error usage and return help information.
Attribute:N/A
+label:mn_only,hctrl_general
cmd:rpower testnode stat
check:rc!=0
check:output=~Error
@@ -122,6 +132,7 @@ end
start:rpower_softoff
description:This case is to test softoff option could remote shutdown nodes
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_fsp,hctrl_openbmc
cmd:rpower $$CN on
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
check:ouptut=~Running|on
@@ -135,6 +146,7 @@ end
start:rpower_onstandby
description:This case is to test onstandby option could bring server to standby state
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_fsp
arch:ppc64
cmd:rpower $$CN off
check:rc==0
@@ -149,6 +161,7 @@ end
start:rpower_wrongpasswd
description:rpower ipmi and openbmc using wrong passwd
Attribute: $$CN-The operation object of rpower command
+label:cn_bmc_ready,hctrl_openpower_ipmi
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rpower/rpower_wrongpasswd_test.sh -pt $$CN $$bmcpasswd $$bmcusername
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rpower/rpower_wrongpasswd_test.sh -c $$CN
@@ -160,30 +173,34 @@ check:rc==0
end
start:rpower_suspend_OpenpowerBmc
-hcp:openbmc
+hcp:openbmc,ipmi
+label:cn_bmc_ready,hctrl_openpower_ipmi,hctrl_openbmc
cmd:rpower $$CN suspend
-check:output=~Error: (\[.*?\]: )?Unsupported command: rpower suspend
+check:output=~Error: (\[.*?\]: )?[Uu]nsupported command[:]* rpower suspend
check:rc==1
end
start:rpower_wake_OpenpowerBmc
-hcp:openbmc
+hcp:openbmc,ipmi
+label:cn_bmc_ready,hctrl_openpower_ipmi,hctrl_openbmc
cmd:rpower $$CN wake
-check:output=~Error: (\[.*?\]: )?Unsupported command: rpower wake
+check:output=~Error: (\[.*?\]: )?[Uu]nsupported command[:]* rpower wake
check:rc==1
end
start:rpower_errorcommand_OpenpowerBmc
-hcp:openbmc
+hcp:openbmc,ipmi
+label:cn_bmc_ready,hctrl_openpower_ipmi,hctrl_openbmc
cmd:rpower $$CN ddd
-check:output=~Error: (\[.*?\]: )?Unsupported command: rpower ddd
+check:output=~Error: (\[.*?\]: )?[Uu]nsupported command[:]* rpower ddd
check:rc==1
end
start:rpower_bmcreboot_perl_python_output
description:record the output for rpower bmcreboot and compare the output for perl and python version.
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/UT_openbmc/scripts/bmcreboot.sh $$CN /tmp/xcattest.rpower.bmcstate.perl.out PERL
check:rc==0
cmd: grep "Login to BMC failed: 500" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l
diff --git a/xCAT-test/autotest/testcase/rsetboot/cases0 b/xCAT-test/autotest/testcase/rsetboot/cases0
index 1520b3699..20e563ee5 100644
--- a/xCAT-test/autotest/testcase/rsetboot/cases0
+++ b/xCAT-test/autotest/testcase/rsetboot/cases0
@@ -1,6 +1,7 @@
start:rsetboot_hd_statcheck
description:set the boot device from hd
Attribute: $$CN-The operation object of rsetboot command.
+label:cn_bmc_ready,hctrl_openbmc
cmd:if [[ -f /tmp/rsetboot.stat ]];then mv -f /tmp/rsetboot.stat /tmp/rsetboot.stat.bak;fi; rsetboot $$CN state > /tmp/rsetboot.stat;
check:rc==0
cmd:rsetboot $$CN hd
@@ -18,6 +19,7 @@ end
start:rsetboot_net_statcheck
description:set the boot device from net
Attribute: $$CN-The operation object of rsetboot command.
+label:cn_bmc_ready,hctrl_openbmc,hctrl_bmc_ipmi
cmd:if [[ -f /tmp/rsetboot.stat ]];then mv -f /tmp/rsetboot.stat /tmp/rsetboot.stat.bak;fi; rsetboot $$CN state > /tmp/rsetboot.stat;
check:rc==0
cmd:rsetboot $$CN net
@@ -35,6 +37,7 @@ end
start:rsetboot_cd_statcheck
description:set the boot device from CD/DVD
Attribute: $$CN-The operation object of rsetboot command.
+label:cn_bmc_ready,hctrl_openbmc,hctrl_bmc_ipmi
cmd:if [[ -f /tmp/rsetboot.stat ]];then mv -f /tmp/rsetboot.stat /tmp/rsetboot.stat.bak;fi; rsetboot $$CN state > /tmp/rsetboot.stat;
check:rc==0
cmd:rsetboot $$CN cd
@@ -52,6 +55,7 @@ end
start:rsetboot_default_statcheck
description:set the boot device default
Attribute: $$CN-The operation object of rsetboot command.
+label:cn_bmc_ready,hctrl_openbmc,hctrl_bmc_ipmi
cmd:if [[ -f /tmp/rsetboot.stat ]];then mv -f /tmp/rsetboot.stat /tmp/rsetboot.stat.bak;fi; rsetboot $$CN state > /tmp/rsetboot.stat;
check:rc==0
cmd:rsetboot $$CN default
@@ -68,6 +72,7 @@ end
start:rsetboot_h
description:get rsetboot help information
+label:mn_only,hctrl_general
cmd:rsetboot -h
check:rc==0
check:output=~Usage: rsetboot
@@ -75,6 +80,7 @@ end
start:rsetboot_help
description:get rsetboot help information using rsetboot help
+label:mn_only,hctrl_general
cmd:rsetboot -help
check:rc==0
check:output=~Usage: rsetboot
@@ -82,12 +88,15 @@ end
start:rsetboot_v
desription:get rsetboot version
+label:mn_only,hctrl_general
cmd:rsetboot -v
check:rc==0
check:output=~Version
end
+
start:rsetboot_node_invalidnode
desription:rsetboot using invalidenode
+label:mn_only,hctrl_general
cmd:rsetboot testnode boot
check:rc!=0
end
@@ -95,6 +104,7 @@ end
start:rsetboot_noderange_net
description:rsetboot noderange net
Attribute: $$CN-The operation object of rsetboot command.
+label:cn_bmc_ready,hctrl_openbmc,hctrl_bmc_ipmi
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:chdef testnode groups=test mgt=__GETNODEATTR($$CN,mgt)__
@@ -118,6 +128,7 @@ end
start:rsetboot_node_invalidaction
description:rsetboot node using invalidaction
Attribute: $$CN-The operation object of rsetboot command.
+label:cn_bmc_ready,hctrl_openbmc,hctrl_bmc_ipmi
cmd:rsetboot $$CN dsdf
check:rc!=0
check:output=~Error: (\[.*?\]: )?unsupported command|Unsupported command
@@ -126,6 +137,7 @@ end
start:rsetboot_group_net
description:rsetboot group node
Attribute: $$CN-The operation object of rsetboot command.
+label:cn_bmc_ready,hctrl_openbmc,hctrl_bmc_ipmi
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:if [[ -f /tmp/rsetboot.stat ]];then mv -f /tmp/rsetboot.stat /tmp/rsetboot.stat.bak;fi; rsetboot $$CN state > /tmp/rsetboot.stat;
diff --git a/xCAT-test/autotest/testcase/rspconfig/cases0 b/xCAT-test/autotest/testcase/rspconfig/cases0
index 431c7e5fe..9d6578b5d 100644
--- a/xCAT-test/autotest/testcase/rspconfig/cases0
+++ b/xCAT-test/autotest/testcase/rspconfig/cases0
@@ -1,12 +1,15 @@
#Need to test later
start:rspconfig_autopower
hcp:fsp
+label:cn_bmc_ready,hctrl_fsp
cmd:rspconfig $$CEC autopower
check:rc==0
check:output=~$$CEC: autopower: \w+
end
+
start:rspconfig_iocap
hcp:fsp
+label:cn_bmc_ready,hctrl_fsp
cmd:rspconfig $$CEC iocap
check:rc==0
check:output=~$$CEC: iocap: \w+
@@ -14,18 +17,23 @@ end
start:rspconfig_time
hcp:fsp
+label:cn_bmc_ready,hctrl_fsp
cmd:rspconfig $$CEC time
check:rc==0
check:output=~$$CEC: Time: \d\d:\d\d:\d\d
end
+
start:rspconfig_date
hcp:fsp
+label:cn_bmc_ready,hctrl_fsp
cmd:rspconfig $$CEC date
check:rc==0
check:output=~$$CEC: Date: \d\d-\d\d-\d\d\d\d
end
+
start:rspconfig_decfg
hcp:fsp
+label:cn_bmc_ready,hctrl_fsp
cmd:rspconfig $$CEC decfg
check:rc==0
check:output=~$$CEC
@@ -34,8 +42,10 @@ check:output=~predictive
check:output=~system bus
check:output=~functional
end
+
start:rspconfig_sshcfg
hcp:hmc
+label:cn_bmc_ready,hctrl_hmc,hctrl_openbmc
cmd:rspconfig __GETNODEATTR($$CN,hcp)__ sshcfg
check:rc==0
check:output=~__GETNODEATTR($$CN,hcp)__: \w+
@@ -44,6 +54,7 @@ end
start:rspconfig_list_ntpservers
description: rspconfig list ntpservers info
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ntpservers
check:rc==0
check:output=~$$CN: BMC NTP Servers
@@ -52,6 +63,7 @@ end
start:rspconfig_set_ntpservers
description: rspconfig set ntpservers
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig_ntp.sh $$CN $$MN
check:rc==0
end
@@ -61,6 +73,7 @@ description:To test change openbmc ip separately by rspconfig. should not suppor
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ip=__GETNODEATTR($$CN,bmc)__
check:output=~Error: (\[.*?\]: )?IP, netmask and gateway must be configured together.
check:rc!=0
@@ -71,6 +84,7 @@ description:rspconfig could not change openbmc ip using invalid ip
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ip=ddd gateway=0.0.0.0 netmask=255.255.0.0
check:output=~Error: (\[.*?\]: )?Invalid parameter for option ip
check:rc!=0
@@ -81,6 +95,7 @@ description:rspconfig could not set ip to null
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ip=
check:output=~Invalid parameter for option ip
check:rc!=0
@@ -94,6 +109,7 @@ description:To test change openbmc netmask separately by rspconfig. should not s
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN netmask=255.255.0.0
check:output=~Error: (\[.*?\]: )?IP, netmask and gateway must be configured together.
check:rc!=0
@@ -102,6 +118,7 @@ end
start:rspconfig_netmask_invalid
despcription:rspconfig could not change openbmc netmask using invalid netmask
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN netmask=ddd
check:output=~Error: (\[.*?\]: )?Invalid parameter for option netmask
check:rc!=0
@@ -118,6 +135,7 @@ description:To test change openbmc gateway by rspconfig. should not support and
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN gateway=0.0.0.0
check:output=~Error: (\[.*?\]: )?IP, netmask and gateway must be configured together.
check:rc!=0
@@ -126,6 +144,7 @@ end
start:rspconfig_set_vlan
description:rspconfig change openbmc gateway
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN vlan=0
check:output=~Error: (\[.*?\]: )?Invalid parameter for option vlan|Error: (\[.*?\]: )?VLAN must be configured with IP, netmask and gateway
check:rc!=0
@@ -137,6 +156,7 @@ end
start:rspconfig_set_all
description:rspconfig change openbmc ip/netmask/gateway/vlan
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -a $$CN
check:rc==0
end
@@ -146,6 +166,7 @@ despcription:rspconfig could not change openbmc gatway using invalid gateway
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN gateway=ddd
check:output=~Error: (\[.*?\]: )?Invalid parameter for option gateway
check:rc!=0
@@ -162,6 +183,7 @@ despcription:rspconfig could not change openbmc gatway using invalid vlan
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN vlan=dddsdsdfs
check:output=~Error: (\[.*?\]: )?VLAN must be configured with IP, netmask and gateway
check:rc!=0
@@ -172,6 +194,7 @@ despcription:rspconfig could not change openbmc gatway using invalid vlan
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ip=dsd gateway=ooo netmask=asfsf vlan=dddsdsdfs
check:output=~Error: (\[.*?\]: )?Invalid parameter
check:rc!=0
@@ -181,6 +204,7 @@ start:rspconfig_node_invalid
despcription:rspconfig could not do any action using invalid node
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:rspconfig testnode ip
@@ -194,6 +218,7 @@ start:rspconfig_noderange_invalid
despcription:rspconfig could not do any action using invalid node
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:rspconfig testnode,$$CN ip
@@ -205,6 +230,7 @@ end
start:rspconfig_list_ip
despcription:rspconfig list bmc ip
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openbmc
cmd:rspconfig $$CN ip
check:rc==0
check:output=~__GETNODEATTR($$CN,bmc)__
@@ -214,6 +240,7 @@ start:rspconfig_list_gateway
hcp:openbmc
description:rspconfig list openbmc gateway
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openbmc
cmd:rspconfig $$CN gateway
check:output=~$$CN: BMC Gateway:
check:rc==0
@@ -223,6 +250,7 @@ start:rspconfig_list_netmask
hcp:openbmc
description:rspconfig list openbmc netmask
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openbmc
cmd:rspconfig $$CN netmask
check:rc==0
check:output=~$$CN: BMC Netmask:
@@ -231,6 +259,7 @@ end
start:rspconfig_list_vlan
description:rspconfig list openbmc vlan
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openbmc
cmd: rspconfig $$CN vlan
check:rc==0
check:output=~$$CN: BMC VLAN ID:
@@ -239,6 +268,7 @@ end
start:rspconfig_list_all
description:rspconfig list openbmc ip gateway netmask vlan
Attribute: $$CN-The operation object of rspconfig command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openbmc
cmd: rspconfig $$CN ip gateway netmask vlan
check:rc==0
check:output=~$$CN: BMC VLAN ID:
@@ -252,6 +282,7 @@ start:rspconfig_set_hostname_equal_star_with_bmc_is_ip
description:when bmc=, rspconfig hostname=* should throw out error
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
#in automation environment, bmc is ip by default.
cmd:lsdef $$CN -i bmc -c
check:rc == 0
@@ -266,6 +297,7 @@ start:rspconfig_set_hostname_equal_star_with_bmc_is_hostname
description:when bmc=, rspconfig hostname=* should set bmc_hostname into bmc
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:mkdir -p /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname
check:rc == 0
cmd:lsdef $$CN -z > /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/$$CN.stanza
@@ -299,6 +331,7 @@ start:rspconfig_get_hostname
description:To test get bmc hostname by rspconfig.
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:mkdir -p /tmp/rspconfig_get_hostname
check:rc == 0
cmd:rspconfig $$CN sshcfg
@@ -322,6 +355,7 @@ start:rspconfig_hostname_with_error_input
description: To test with error input, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN hostname bogus
check:output =~Error: (\[.*?\]: )?Unsupported command
check:rc != 0
@@ -337,6 +371,7 @@ start:rspconfig_set_hostname
description:To test set bmc hostname by rspconfig
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:mkdir -p /tmp/rspconfig_set_hostname
check:rc == 0
cmd:rspconfig $$CN sshcfg
@@ -363,6 +398,7 @@ start:rspconfig_set_admin_passwd_with_error_input
description: To test "rspconfig admin_passwd=xxx,yyy". If the format of "xxx,yyy" is wrong, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN admin_passwd=cluster,
check:output =~Error: (\[.*?\]: )?Invalid parameter for option admin_passwd
check:rc != 0
@@ -383,6 +419,7 @@ start:rspconfig_set_admin_passwd_with_error_origin_password
description: To test "rspconfig admin_passwd=xxx,yyy". If the original password is wrong, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN admin_passwd=bogus__GETNODEATTR($$CN,bmcpassword)__,cluster
check:output =~Current BMC password is incorrect
#check:rc != 0
@@ -392,6 +429,7 @@ start:rspconfig_sshcfg_with_error_input
description: To test "rspconfig sshcfg" with error input, should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN sshcfg aaa
check:output =~Error: (\[.*?\]: )?Configure sshcfg must be issued without other options.
check:rc != 0
diff --git a/xCAT-test/autotest/testcase/rspconfig/cases1 b/xCAT-test/autotest/testcase/rspconfig/cases1
index 5eade2cb5..1900c1ebf 100644
--- a/xCAT-test/autotest/testcase/rspconfig/cases1
+++ b/xCAT-test/autotest/testcase/rspconfig/cases1
@@ -2,6 +2,7 @@ start:rspconfig_ipsrc
description: To test "rspconfig ipsrc",to get the IP source for OpenBMC
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ipsrc
check:output=~$$CN\s*:\s*BMC IP Source: Static|BMC IP Source: Dynamic
check:rc == 0
@@ -14,6 +15,7 @@ start:rspconfig_dump_list
description: To test "rspconfig dump -l" and "rspconfig dump --list"
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN dump -l
check:output =~$$CN:\s*No attributes returned from the BMC.|\s*\[\d+\]\s* Generated:
check:rc == 0
@@ -26,6 +28,7 @@ start:rspconfig_dump_generate
description: To test "rspconfig dump -g" and "rspconfig dump --generate"
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN dump -l|tee /tmp/dumplistold
check:output =~$$CN:\s*No attributes returned from the BMC.|\s*\[\d+\]\s* Generated:
check:rc == 0
@@ -60,6 +63,7 @@ start:rspconfig_dump_clear
description: To test "rspconfig dump -c" and "rspconfig dump --clear"
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN dump -g |tee /tmp/dumpgenerate
check:rc == 0
check:output =~$$CN:\s*\[\d+\]\s* success
@@ -100,6 +104,7 @@ start:rspconfig_dump_download
description: To test rspconfig dump -d" and "rspconfig dump --download"
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN dump -g |tee /tmp/dumpgenerate
check:rc == 0
check:output =~$$CN:\s*\[\d+\]\s* success
@@ -133,6 +138,7 @@ start:rspconfig_dump_no_option
description: To test "rspconfig dump"
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN dump
check:rc == 0
check:output =~$$CN:\s*Dump requested
@@ -148,6 +154,7 @@ start:rspconfig_gard
description: To test "rspconfig gard -c"
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN gard -c
check:output =~$$CN:\s*GARD cleared
check:rc == 0
@@ -160,6 +167,7 @@ start:rspconfig_ntpserver
description: To test "rspconfig ntpservers" to show the ntp server of the node
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN ntpservers
check:output =~$$CN:\s*BMC NTP Servers:\s*None|\s*\d+.\d+.\d+.\d+
check:rc == 0
@@ -169,6 +177,7 @@ start:rspconfig_powerrestorepolicy
description: To test "rspconfig powerrestorepolicy" to show the policy
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN powerrestorepolicy |tee /tmp/powerrestorepolicy
check:output =~$$CN:\s*BMC PowerRestorePolicy:\s*AlwaysOff|AlwaysOn|Restore
check:rc == 0
@@ -202,6 +211,7 @@ start:rspconfig_powersupplyredundancy
description: To test "rspconfig powersupplyredundancy" to show the powersupplyredundancy state
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN powersupplyredundancy |tee /tmp/powersupplyredundancy
check:output =~$$CN:\s*BMC PowerSupplyRedundancy:\s*Enabled|Disabled
check:rc == 0
@@ -229,6 +239,7 @@ start:rspconfig_timesyncmethod
description: To test "rspconfig timesyncmethod" to show the timesyncmethod
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN timesyncmethod |tee /tmp/timesyncmethod
check:output =~$$CN:\s*BMC TimeSyncMethod:\s*NTP|Manual
check:rc == 0
@@ -256,6 +267,7 @@ start:rspconfig_bootmode
description: To test "rspconfig bootmode" to show and change bootmode
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN bootmode|tee /tmp/bootmode
check:output =~$$CN:\s*BMC BootMode:\s*Regular|Safe|Setup
check:rc == 0
@@ -289,6 +301,7 @@ start:rspconfig_autoreboot
description: To test "rspconfig autoreboot" to show and change autoreboot
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN autoreboot|tee /tmp/autoreboot
check:output =~$$CN:\s*BMC AutoReboot:\s*1|0
check:rc == 0
@@ -316,6 +329,7 @@ start:rspconfig_invalid
description: To test "rspconfig invalid_value" should throw out error message
os:Linux
hcp:openbmc
+label:cn_bmc_ready,hctrl_openbmc
cmd:rspconfig $$CN aaa
check:output =~Error: (\[.*?\]: )?Unsupported command: rspconfig aaa
check:rc != 0
diff --git a/xCAT-test/autotest/testcase/rvitals/cases0 b/xCAT-test/autotest/testcase/rvitals/cases0
index 4a40f6b5c..ecc4276ff 100644
--- a/xCAT-test/autotest/testcase/rvitals/cases0
+++ b/xCAT-test/autotest/testcase/rvitals/cases0
@@ -1,6 +1,6 @@
start:rvitals_h
description:get rvitals's usage
-Attribute: $$CN-The operation object of rvitals command
+label:mn_only,hctrl_general
cmd:rvitals -h
check:rc==0
check:output=~Usage:
@@ -9,7 +9,7 @@ end
start:rvitals_v
description:get rvitals's version
-Attribute: $$CN-The operation object of rvitals command
+label:mn_only,hctrl_general
cmd:rvitals -v
check:rc==0
check:output=~Version
@@ -18,6 +18,7 @@ end
start:rvitals_temp
description:Retrieves temperatures
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN temp
check:rc==0
end
@@ -27,6 +28,7 @@ description:Retrieves disk temperatures
Attribute: $$CN-The operation object of rvitals command
arch:ppc64le
hcp:ipmi
+label:cn_bmc_ready,hctrl_openpower_ipmi
cmd:rvitals $$CN disktemp
check:rc==0
check:output=~Ambient Temp
@@ -37,6 +39,7 @@ description:Retrieves cpu temperatures
Attribute: $$CN-The operation object of rvitals command
arch:ppc64le
hcp:ipmi
+label:cn_bmc_ready,hctrl_openpower_ipmi
cmd:rvitals $$CN cputemp
check:rc==0
check:output=~Ambient Temp
@@ -45,6 +48,7 @@ end
start:rvitals_voltage
description:Retrieves power supply and VRM voltage readings
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN voltage
check:rc==0
end
@@ -52,6 +56,7 @@ end
start:rvitals_power
description:Retrieves power status
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openpower_ipmi,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN power
check:rc==0
end
@@ -59,6 +64,7 @@ end
start:rvitals_state
description:Retrieves the system state.
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready
cmd:rvitals $$CN state
check:rc==0
check:output=~System State:
@@ -68,6 +74,7 @@ start:rvitals_lcds
description:Retrieves LCDs status
Attribute: $$CN-The operation object of rvitals command
hcp:hmc,ivm,fsp,ipmi
+label:cn_bmc_ready,hctrl_fsp
cmd:rvitals $$CN lcds
check:rc==0
check:output=~Current LCD
@@ -76,6 +83,7 @@ end
start:rvitals_all
description:Retrieves all status
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN all
check:rc==0
end
@@ -83,6 +91,7 @@ end
start:rvitals_leds
description:Retrieves leds status
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openpower_ipmi,hctrl_openbmc
cmd:rvitals $$CN leds
check:rc==0
check:output=~LED
@@ -91,28 +100,37 @@ end
start:rvitals_fanspeed
description:Retrieves fan speeds.
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openpower_ipmi,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN fanspeed
check:rc==0
end
+
start:rvitals_wattage
description:Retrieves wattage readings.
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_bmc_ipmi,hctrl_openpower_ipmi,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN wattage
check:rc==0
end
+
start:rvitals_altitude
description:Retrieves altitude readings.
Attribute: $$CN-The operation object of rvitals command
+label:cn_bmc_ready,hctrl_openbmc
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN altitude
check:rc==0
end
+
start:rvitals_noderange_err
description:using not defined node
+label:mn_only,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals testnode
check:rc!=0
end
+
start:rvitals_errorcommand
description:using wrong command
+label:cn_bmc_ready,hctrl_general
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN errorcommand
check:rc!=0
end
diff --git a/xCAT-test/autotest/testcase/rvitals/cases1 b/xCAT-test/autotest/testcase/rvitals/cases1
index f18dca405..0e73ebe2b 100644
--- a/xCAT-test/autotest/testcase/rvitals/cases1
+++ b/xCAT-test/autotest/testcase/rvitals/cases1
@@ -1,5 +1,6 @@
start:rvitals_outputs_format_checking
description: Check the output formats of rvitals
+label:cn_bmc_ready,hctrl_general
cmd:rvitals $$CN | grep -v -E '^[^:]+:[^:]+:[^:]+$'
check:rc==1
end
diff --git a/xCAT-test/autotest/testcase/tabdump/cases0 b/xCAT-test/autotest/testcase/tabdump/cases0
index db16cf431..0652fe1bf 100644
--- a/xCAT-test/autotest/testcase/tabdump/cases0
+++ b/xCAT-test/autotest/testcase/tabdump/cases0
@@ -1,11 +1,13 @@
start:tabdump_null
description:display table list
+label:mn_only,db
cmd:tabdump
check:rc==0
check:output=~site
end
start:tabdump_table
+label:mn_only,db
cmd:tabdump site | grep xcatiport
check:rc==0
check:output=="xcatiport","3002",,
@@ -13,6 +15,7 @@ end
start:tabdump_v
description:version
+label:mn_only,db
cmd:tabdump -v
check:rc==0
check:output=~Version
@@ -20,6 +23,7 @@ end
start:tabdump_h
description:usage
+label:mn_only,db
cmd:tabdump -h
check:rc==0
check:output=~Usage
@@ -27,6 +31,7 @@ end
start:tabdump_help
description:usage
+label:mn_only,db
cmd:tabdump -?
check:rc==0
check:output=~Usage
@@ -36,6 +41,7 @@ end
start:tabdump_w_match
description:-w flags to specify the selection string,Select nodes where the attribute value matches the SQL LIKE value.
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups="all,aix"
check:rc==0
cmd:mkdef -t node -o testnode02 groups="aix"
@@ -50,6 +56,7 @@ end
start:tabdump_w_equal
description:-w flags to specify the selection string,Select nodes where the attribute value is exactly this value
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups="all,aix"
check:rc==0
cmd:mkdef -t node -o testnode02 groups="aix"
@@ -63,6 +70,7 @@ cmd:rmdef testnode02
end
start:tabdump_w_ne
+label:mn_only,db
cmd:mkdef -t node -o testnode01,testnode02,testnode03 groups="aix"
check:rc==0
cmd:mkdef -t node -o testnode04 groups="linux"
@@ -80,6 +88,7 @@ cmd:rmdef testnode04
end
start:tabdump_w_notmatch
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups="all"
check:rc==0
cmd:mkdef -t node -o testnode02 groups="aix"
@@ -94,6 +103,7 @@ end
start:tabdump_w_gt
description:Select nodes where the attribute value is greater than this specific value
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19
check:rc==0
cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18
@@ -106,6 +116,7 @@ end
start:tabdump_w_ge
description:Select nodes where the attribute value is greater than this specific value
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19
check:rc==0
cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18
@@ -119,6 +130,7 @@ end
start:tabdump_w_lt
description:Select nodes where the attribute value is greater than this specific value
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19
check:rc==0
cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18
@@ -130,8 +142,8 @@ cmd:rmdef -t node testnode01-testnode02
end
start:tabdump_w_le
-description:Select nodes where the attribute value is greater than this specifi
-c value
+description:Select nodes where the attribute value is greater than this specific value
+label:mn_only,db
cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19
check:rc==0
cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18
@@ -145,12 +157,14 @@ end
start:tabdump_d
+label:mn_only,db
cmd:tabdump -d |grep site
check:rc==0
check:output=~site:
end
start:tabdump_f_d
+label:mn_only,db
cmd:tabdump -f /tmp/table -d site|grep site
check:rc==0
check:output=~site
@@ -158,6 +172,7 @@ cmd:rm -f /tmp/table
end
start:tabdump_d_nodehm
+label:mn_only,db
cmd:tabdump -d site | grep xcatiport
check:rc==0
check:output=~xcatiport
diff --git a/xCAT-test/autotest/testcase/tabgrep/cases0 b/xCAT-test/autotest/testcase/tabgrep/cases0
index b0c2d8cbb..e9fbac170 100644
--- a/xCAT-test/autotest/testcase/tabgrep/cases0
+++ b/xCAT-test/autotest/testcase/tabgrep/cases0
@@ -1,5 +1,6 @@
start:tabgrep_null
description: tabgrep with no argument
+label:mn_only,db
cmd:tabgrep
check:output=~Usage
end
@@ -8,6 +9,7 @@ end
start:tabgrep_h
description:tabgrep -h an d -? and --help
+label:mn_only,db
cmd:tabgrep -h
check:output=~Usage
cmd:tabgrep -?
@@ -18,6 +20,7 @@ end
start:tabgrep_node
+label:mn_only,db
cmd:mkdef -t node testnode groups=all
check:rc==0
cmd:tabgrep testnode
@@ -29,6 +32,7 @@ end
start:tabgrep_err
description:tabgrep with error noderange
+label:mn_only,db
cmd:rmdef -t node testnode
cmd:tabgrep testnode
check:rc!=0
diff --git a/xCAT-test/autotest/testcase/tabprune/cases0 b/xCAT-test/autotest/testcase/tabprune/cases0
index 79b646035..b0154bf41 100644
--- a/xCAT-test/autotest/testcase/tabprune/cases0
+++ b/xCAT-test/autotest/testcase/tabprune/cases0
@@ -1,5 +1,6 @@
start:tabprune_h
description:tabprune -h
+label:mn_only,db
cmd:tabprune -h
check:rc==0
check:output=~Usage
@@ -7,6 +8,7 @@ end
start:tabprune_v
description:tabprune -v
+label:mn_only,db
cmd:tabprune -v
check:rc==0
check:output=~Version
@@ -14,6 +16,7 @@ end
start:tabprune_a_eventlog
description:tabprune eventlog -a
+label:mn_only,db
cmd:tabprune eventlog -a
check:rc==0
check:output!~not a valid xCAT object type
@@ -21,6 +24,7 @@ end
start:tabprune_V_a_eventlog
description:tabprune eventlog -V -a > /tmp/eventlog.csv
+label:mn_only,db
cmd:tabprune eventlog -V -a > /tmp/eventlog.csv
check:rc==0
cmd:ls /tmp/eventlog.csv
@@ -31,6 +35,7 @@ end
start:tabprune_p_auditlog
description:to remove 50% of the auditlog table,if the original number is odd number,the final result is 1;or else the final number is 0;
+label:mn_only,db
#cmd:n1=`lsdef -t auditlog|wc -l`;tabprune auditlog -p 50;n2=`lsdef -t auditlog|wc -l`;echo $((n1-($n2-2)*2))
cmd:n1=`lsdef -t auditlog|wc -l`;tabprune auditlog -p 50;n2=`lsdef -t auditlog|wc -l`;echo $($n2 /tmp/site.csv
check:rc==0
cmd:chtab key=db2installloc site.value=/test
@@ -20,12 +22,14 @@ cmd:rm -f /tmp/site.csv /tmp/site1.csv
end
start:tabrestore_h
+label:mn_only,db
cmd:tabrestore -h
check:output=~Usage
end
start:tabrestore_err
description:tabrestore wrong.csv
+label:mn_only,db
cmd:tabrestore wrong.csv
check:rc!=0
check:output=~Error
diff --git a/xCAT-test/autotest/testcase/unregnotif/case0 b/xCAT-test/autotest/testcase/unregnotif/case0
index 180ae9fac..4c146386d 100644
--- a/xCAT-test/autotest/testcase/unregnotif/case0
+++ b/xCAT-test/autotest/testcase/unregnotif/case0
@@ -1,5 +1,6 @@
start:unregnotif_null
description:unregnotif with no argument
+label:mn_only,db
cmd:unregnotif
check:output=~Usage
end
@@ -7,6 +8,7 @@ end
start:unregnotif_f
description:unregnotif with a argument filename
+label:mn_only,db
cmd:echo "hello" > test.pm
check:rc==0
cmd:regnotif test.pm nodelist -o a,d
@@ -24,6 +26,7 @@ end
start:unregnotif_h
description:unregnotif -h and -help
+label:mn_only,db
cmd:unregnotif -h
check:output=~Usage
cmd:unregnotif -help
@@ -32,6 +35,7 @@ end
start:unregnotif_v
description:unregnotif -v and -version
+label:mn_only,db
cmd:unregnotif -v
check:output=~version|Version
cmd:unregnotif -version
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment
new file mode 100644
index 000000000..f0c269173
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment
@@ -0,0 +1,122 @@
+start:import_osimage_with_environments_in_yaml
+description:this case is to verify if osimage import could support environment variables.
+os:Linux
+label:others,xcat_inventory,invoke_provison
+cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
+check:rc==0
+
+cmd:makedns -n
+check:rc==0
+cmd:sleep 20
+cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi
+check:rc==0
+cmd:makedhcp -n
+check:rc==0
+cmd:makedhcp -a
+check:rc==0
+cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done
+check:rc==0
+cmd:copycds $$ISO
+check:rc==0
+
+cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi
+check:rc==0
+cmd:export GITREPO="/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo";export SWDIR="/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir";xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml
+check:output=~Importing object: test.environments.osimage
+check:output=~Inventory import successfully!
+check:rc==0
+cmd:lsdef -t osimage -o test.environments.osimage
+check:rc==0
+cmd:genimage test.environments.osimage
+check:rc==0
+cmd:packimage test.environments.osimage
+check:rc==0
+
+cmd:rinstall $$CN osimage=test.environments.osimage
+check:rc==0
+check:output=~Provision node\(s\)\: $$CN
+
+cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi
+cmd:cat /tmp/mountoutput/file.org
+cmd:sleep 300
+cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done
+
+cmd:ping $$CN -c 3
+check:rc==0
+check:output=~64 bytes from $$CN
+cmd:lsdef -l $$CN | grep status
+check:rc==0
+check:output=~booted
+cmd:xdsh $$CN date
+check:rc==0
+check:output=~\d\d:\d\d:\d\d
+cmd:xdsh $$CN mount
+check:rc==0
+check:output=~on / type tmpfs
+cmd:sleep 120
+cmd:ping $$CN -c 3
+check:rc==0
+check:output=~64 bytes from $$CN
+
+cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
+check:rc==0
+cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
+cmd:xdsh $$CN "cat /tmp/synclist"
+check:rc==0
+cmd:xdsh $$CN "cat /tmp/test1.postinstall"
+check:rc==0
+check:output=~test postisntall
+cmd:xdsh $$CN "cat /tmp/test2.postinstall"
+check:rc==0
+check:output=~test postisntall
+cmd:xdsh $$CN "rpm -qa |grep -i conserver-xcat"
+check:rc==0
+cmd:xdsh $$CN "rpm -qa |grep -i perl-Net-Telnet"
+check:rc==0
+cmd:xdsh $$CN "rpm -qa |grep -i tftp"
+check:rc==0
+cmd:xdsh $$CN "rpm -qa |grep -w dhcp"
+check:rc==0
+end
+
+start:export_osimage_with_environments
+description:this case is to verify if osimage export could support environment variables.
+os:Linux
+label:others,xcat_inventory
+cmd:lsdef -t osimage -o test.environments.osimage >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o test.environments.osimage -z >/tmp/test.environments.osimage_image.stanza ;rmdef -t osimage -o test.environments.osimage;fi
+check:rc==0
+cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
+cmd:export GITREPO="/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo";export SWDIR="/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir";xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml
+check:output=~Importing object: test.environments.osimage
+check:output=~Inventory import successfully!
+check:rc==0
+cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.yaml.stanza
+check:rc==0
+cmd:diff -y /tmp/export/test.environments.osimage.yaml.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza
+check:rc==0
+cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.yaml --format yaml
+check:rc==0
+check:output=~The inventory data has been dumped to /tmp/export/test.environments.osimage.yaml
+cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml /tmp/export/test.environments.osimage.yaml --ignore-blank-lines -I "^#"
+check:rc==0
+cmd:rmdef -t osimage -o test.environments.osimage
+check:rc==0
+cmd:export GITREPO="/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo";export SWDIR="/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir";xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json
+check:output=~Importing object: test.environments.osimage
+check:output=~Inventory import successfully!
+check:rc==0
+cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.json.stanza
+check:rc==0
+cmd:diff -y /tmp/export/test.environments.osimage.json.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza
+check:rc==0
+cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json
+check:rc==0
+cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json /tmp/export/test.environments.osimage.json --ignore-blank-lines -I "^#"
+check:rc==0
+cmd:dir="/tmp/export"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi
+cmd: rmdef -t osimage -o test.environments.osimage
+check:rc==0
+cmd: if [ -e /tmp/test.environments.osimage.stanza ]; then cat /tmp/test.environments.osimage.stanza |mkdef -z;fi
+end
+
+
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.include b/xCAT-test/autotest/testcase/xcat-inventory/cases.include
new file mode 100644
index 000000000..b38e40f49
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.include
@@ -0,0 +1,42 @@
+start:export_import_osimage_with_INCLUDE_in_file
+description:This case is used to test xcat-inventory export and import one linux osimage definition which has INCLUDE in the attribute's specified files. The attributes are pkglist, otherpkglist,exlist,synclists,template,postinstall and partitionfile.
+label:others,xcat_inventory
+cmd:dir="/tmp/imagedata/";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
+check:rc==0
+cmd:dir="/tmp/imagedata/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
+check:rc==0
+cmd:cp -rf /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage /tmp/imagedata
+check:rc==0
+cmd:lsdef -t osimage -o test_osimage >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o test_osimage -z >/tmp/imagedata/test_osimage.org.stanza ;rmdef -t osimage -o test_osimage;fi
+check:rc==0
+cmd:cat /tmp/imagedata/test_osimage/test_osimage.stanza |mkdef -z
+check:rc==0
+cmd:rm -rf /tmp/imagedata/test_osimage/test_osimage.stanza
+cmd:lsdef -t osimage -o test_osimage
+check:rc==0
+cmd:xcat-inventory export -t osimage -o test_osimage -d /tmp/imagedata/export
+check:output=~The osimage objects has been exported to directory /tmp/imagedata/export
+cmd:ls -lFR /tmp/imagedata/export
+cmd:diff -r /tmp/imagedata/test_osimage /tmp/imagedata/export/test_osimage/tmp/imagedata/test_osimage/
+check:output=~Only in /tmp/imagedata/test_osimage: file7
+cmd:diff -y /etc/hosts /tmp/imagedata/export/test_osimage/etc/hosts
+check:rc==0
+cmd:ls -l /tmp/imagedata/export/test_osimage/tmp/imagedata/test_osimage/file7
+check:rc!=0
+cmd: rmdef -t osimage -o test_osimage
+check:rc==0
+cmd:rm -rf /tmp/imagedata/test_osimage
+cmd:xcat-inventory import -t osimage -d /tmp/imagedata/export
+check:rc==0
+check:output=~Importing object: test_osimage
+check:output=~Inventory import successfully!
+check:output=~The object test_osimage has been imported
+cmd:lsdef -t osimage -o test_osimage
+check:rc==0
+cmd:diff -r /tmp/imagedata/export/test_osimage/tmp/imagedata/test_osimage/ /tmp/imagedata/test_osimage
+check:rc==0
+cmd: rmdef -t osimage -o test_osimage
+check:rc==0
+cmd:dir="/tmp/imagedata"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi
+cmd: if [ -e /tmp/imagedata/test_osimage.org.stanza ]; then cat /tmp/imagedata/test_osimage.org.stanza |mkdef -z;fi
+end
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage
index 0567e79c5..27df1ce48 100644
--- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage
+++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage
@@ -1255,3 +1255,34 @@ cmd:file="/opt/xcat/share/xcat/install/rh/template"; rm -rf $file; if [ -d ${fil
cmd:for file in /tmp/osimages/*.stanza; do cat $file|mkdef -z; done
cmd:if [ -e /tmp/osimages.bak ]; then mv -f /tmp/osimages.bak /tmp/osimages; fi
end
+
+start:export_import_osimages_by_dir_with_c
+description:This case is used to test xcat-inventory export and import linux osimage definition witch -c option.
+label:others,xcat_inventory
+cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
+cmd:imgdir='/tmp/export';for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done
+check:rc==0
+cmd:for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done
+check:rc==0
+cmd:chdef -t osimage -o test_myimage1,test_myimage2,test_myimage3 imagetype=linux provmethod=install
+check:rc==0
+cmd:xcat-inventory export -t osimage -o test_myimage1,test_myimage2 -d /tmp/export
+check:rc==0
+check:output=~The osimage objects has been exported to directory /tmp/export
+cmd:ls -lFR /tmp/export
+cmd: xcat-inventory import -t osimage -d /tmp/export -c
+check:rc==0
+check:output=~Importing object: test_myimage1
+check:output=~Inventory import successfully!
+check:output=~The object test_myimage1 has been imported
+check:output=~Importing object: test_myimage2
+check:output=~Inventory import successfully!
+check:output=~The object test_myimage2 has been imported
+cmd:lsdef -t osimage -o test_myimage1,test_myimage2
+check:rc==0
+cmd:lsdef -t osimage -o test_myimage3
+check:rc!=0
+cmd:rmdef -t osimage -o test_myimage1,test_myimage2
+cmd:for file in /tmp/export/*.stanza; do cat $file|mkdef -z; done
+cmd:dir="/tmp/export"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi
+end
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist
new file mode 100644
index 000000000..2209b1f9f
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist
@@ -0,0 +1 @@
+conserver-xcat
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist
new file mode 100644
index 000000000..7abe5bf95
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist
@@ -0,0 +1 @@
+perl-Net-Telnet
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist
new file mode 100644
index 000000000..72ab18f1e
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist
@@ -0,0 +1 @@
+dhcp
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist
new file mode 100644
index 000000000..63cfc228d
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist
@@ -0,0 +1 @@
+tftp
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall
new file mode 100755
index 000000000..979d03cf4
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall
@@ -0,0 +1,52 @@
+#!/bin/sh
+#-- Do not remove following line if you want to make use of CVS version tracking
+#-- $Id: compute.postinstall,v 1.21 2008/09/04 12:05:45 sikorsky Exp $
+#-- jurij.sikorsky@t-systems.cz
+#--
+#-- this script is run after all packages from $profile.pkglist are installed
+#--
+#-- it gets these arguments:
+#--
+#-- $1 = install root (chroot directory for profile)
+#-- $2 = OS version
+#-- $3 = architecture
+#-- $4 = profile name
+#-- $5 = work dir (where genimage is located)
+#--
+#--
+installroot=$1
+osver=$2
+arch=$3
+profile=$4
+workdir=$5
+
+#-- Example how /etc/fstab can be automatically generated during image generation:
+cat <$installroot/etc/fstab
+proc /proc proc rw 0 0
+sysfs /sys sysfs rw 0 0
+devpts /dev/pts devpts rw,gid=5,mode=620 0 0
+END
+
+
+#-- Uncomment the line contains "cons" in /etc/inittab
+#cons:12345:respawn:/sbin/smart_agetty -L 38400 console
+echo "co:2345:respawn:/sbin/agetty -L 38400 console" >> $installroot/etc/inittab
+
+#-- Disable SELinux in the rootimg
+#-- Redhat 7.3 will install selinux-policy and selinux is enabled by default
+#-- Need to disable selinux, otherwise, the booting will hang on "Loading selinux policy"
+if [ -f "$installroot/etc/selinux/config" ]
+then
+ sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config
+fi
+
+#-- Example of booted image versioning
+#-- We want to know, with what configuration (version of the image) each node was booted.
+#-- Hence, we keep image definition files and postscripts in CVS. During image generation we create file /etc/IMGVERSION and fill it with CVS "$Id$" of files with image definition (.pkglist, .exlist, .repolist, .postinstall). Then, during boot, each "CVS enabled" postscript (see /install/postscripts/cvs_template.sh and /install/postscripts/cvs_template.pl) adds one line to /etc/IMGVERSION. Then you can determine in any time what image you are running and what postscipts in which versions were run.
+#cat /dev/null > $installroot/etc/IMGVERSION
+#for ext in pkglist exlist postinstall repolist; do
+# [ -r $workdir/$profile.$ext ] && cat $workdir/$profile.$ext | grep -E '^[[:space:]]*#.*[[:space:]]\$Id' >> $installroot/etc/IMGVERSION
+#done
+echo "test postisntall" >> $installroot/tmp/test1.postinstall
+${GITREPO}/postinstall/test2.postinstall
+
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test2.postinstall b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test2.postinstall
new file mode 100755
index 000000000..45f8697f7
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test2.postinstall
@@ -0,0 +1,5 @@
+#Test for postinstall script
+installroot=$1
+echo "test postisntall" >> $installroot/tmp/test2.postinstall
+
+
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist
new file mode 100644
index 000000000..8200a7bbe
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist
@@ -0,0 +1 @@
+${GITREPO}/syncfiles/synclist -> /tmp/synclist
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm
new file mode 100644
index 000000000..226980702
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm
new file mode 100644
index 000000000..09084bc0e
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz
new file mode 100644
index 000000000..dec901f2f
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2
new file mode 100644
index 000000000..3c6a60ae0
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz
new file mode 100644
index 000000000..c88e0dad1
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2
new file mode 100644
index 000000000..1b6b9ceac
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz
new file mode 100644
index 000000000..8d8db7544
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2
new file mode 100644
index 000000000..9cd72d121
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml
new file mode 100644
index 000000000..69b1fb968
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml
@@ -0,0 +1,55 @@
+
+
+ 1529054651
+
+ 2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3
+ eca64f042d41d524c9c40e6fe48c1e21afa2d31a09f82dd478002056931b52f0
+
+ 1529054651
+ 664
+ 2941
+
+
+ 8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8
+ 623db61f62a982b63ead5171a5fa6b04ab09f19975df695b4f6d3ac3b7b3fa92
+
+ 1529054651
+ 1667
+ 4726
+
+
+ 98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56
+ 2cae2914ab3574b7d97a4a971f7556282a0bfbecd9ef3ebc3ba0836c6126cc7c
+
+ 1529054653
+ 10
+ 3376
+ 23552
+
+
+ 771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1
+ b539bc27136e110f6147ea3265153dda8096f11987a1383adb6c991471d05b7b
+
+ 1529054652
+ 10
+ 1359
+ 8192
+
+
+ bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede
+ 9e9e4f10ecd14f0a067bf48948b241e9b83d0d73619864d5185d0d4bafdf95f8
+
+ 1529054651
+ 729
+ 2108
+
+
+ e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8
+ 4d88f10b76e7bf9ff1e25aa53c8415e6959d6f1cc3a1371ee424ee2d8459cfcb
+
+ 1529054652
+ 10
+ 1628
+ 9216
+
+
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm
new file mode 100644
index 000000000..157c12951
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2
new file mode 100644
index 000000000..a0da9408f
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz
new file mode 100644
index 000000000..7b6d9d48a
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz
new file mode 100644
index 000000000..91358e449
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2
new file mode 100644
index 000000000..d2b4c5f40
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz
new file mode 100644
index 000000000..d64c515f3
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2
new file mode 100644
index 000000000..36c15fcd6
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml
new file mode 100644
index 000000000..412881f05
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml
@@ -0,0 +1,55 @@
+
+
+ 1528961260
+
+ 4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397
+ bcff832273199f571ac15e62d127f4eb8df6a51100a949f68213ba70330c3fe9
+
+ 1528961260
+ 527
+ 1805
+
+
+ 75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65
+ 7701b889349f89e485ec68b1346a636853fb7554069f0ac92f104d498c54f767
+
+ 1528961260
+ 1269
+ 3406
+
+
+ e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373
+ af8b49cdc4a0219f531fcbd559cb19808aea1055f010aea9b41cb66dd94ebd5d
+
+ 1528961262
+ 10
+ 2967
+ 21504
+
+
+ 811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1
+ bcf276a03b51aad62cb750782f5ffd6d20d4eb327d6bf6bb1ec329fde9f63b78
+
+ 1528961261
+ 10
+ 1388
+ 8192
+
+
+ 9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b
+ 336bfd6337f648db1b6ba085a94b88bc79c20e1be056d1c168a88b6d62c15c0e
+
+ 1528961260
+ 749
+ 2026
+
+
+ 2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931
+ 36d40a93865269f7f5d5fa69ac32b2eb2090061451adbcb57ccde1dbd15bc5e4
+
+ 1528961261
+ 10
+ 1482
+ 7168
+
+
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm
new file mode 100644
index 000000000..2208047d1
Binary files /dev/null and b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm differ
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza
new file mode 100644
index 000000000..903363536
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza
@@ -0,0 +1,21 @@
+#
+
+test.environments.osimage:
+ objtype=osimage
+ environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir
+ imagetype=linux
+ osarch=ppc64le
+ osdistroname=rhels7.5-alternate-ppc64le
+ osname=Linux
+ osvers=rhels7.5-alternate
+ otherpkgdir=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/
+ otherpkglist=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist,
+ permission=755
+ pkgdir=/install/rhels7.5-alternate/ppc64le,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/
+ pkglist=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist
+ postinstall=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall
+ profile=compute
+ provmethod=netboot
+ rootimgdir=/install/custom/test.environments.osimage
+ synclists=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist
+ usercomment=rhels7.5,test_environment_variables
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json
new file mode 100644
index 000000000..68752808b
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json
@@ -0,0 +1,50 @@
+{
+ "osimage": {
+ "test.environments.osimage": {
+ "basic_attributes": {
+ "arch": "ppc64le",
+ "distribution": "rhels7.5-alternate",
+ "osdistro": "rhels7.5-alternate-ppc64le",
+ "osname": "Linux"
+ },
+ "deprecated": {
+ "comments": "rhels7.5,test_environment_variables"
+ },
+ "filestosync": [
+ "{{GITREPO}}/syncfiles/synclist"
+ ],
+ "genimgoptions": {
+ "permission": "755",
+ "postinstall": [
+ "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall",
+ "{{GITREPO}}/postinstall/test1.postinstall"
+ ],
+ "rootimgdir": "/install/custom/test.environments.osimage"
+ },
+ "imagetype": "linux",
+ "package_selection": {
+ "otherpkgdir": [
+ "{{SWDIR}}/otherpkgdir/"
+ ],
+ "otherpkglist": [
+ "{{GITREPO}}/otherpkglist/test1.otherpkglist",
+ "{{GITREPO}}/otherpkglist/test2.otherpkglist",
+ ""
+ ],
+ "pkgdir": [
+ "/install/rhels7.5-alternate/ppc64le",
+ "{{SWDIR}}/pkgdir/"
+ ],
+ "pkglist": [
+ "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist",
+ "{{GITREPO}}/pkglist/test1.pkglist",
+ "{{GITREPO}}/pkglist/test2.pkglist"
+ ]
+ },
+ "provision_mode": "netboot",
+ "role": "compute"
+ }
+ },
+ "schema_version": "1.0"
+}
+#Version 2.14.2 (git commit 09f0772835afdc0f962c9e7fe8cef862e9505ad7, built Tue Jun 19 01:58:56 EDT 2018)
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml
new file mode 100644
index 000000000..c4f10968e
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml
@@ -0,0 +1,35 @@
+osimage:
+ test.environments.osimage:
+ basic_attributes:
+ arch: ppc64le
+ distribution: rhels7.5-alternate
+ osdistro: rhels7.5-alternate-ppc64le
+ osname: Linux
+ deprecated:
+ comments: rhels7.5,test_environment_variables
+ filestosync:
+ - '{{GITREPO}}/syncfiles/synclist'
+ genimgoptions:
+ permission: '755'
+ postinstall:
+ - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall
+ - '{{GITREPO}}/postinstall/test1.postinstall'
+ rootimgdir: /install/custom/test.environments.osimage
+ imagetype: linux
+ package_selection:
+ otherpkgdir:
+ - '{{SWDIR}}/otherpkgdir/'
+ otherpkglist:
+ - '{{GITREPO}}/otherpkglist/test1.otherpkglist'
+ - '{{GITREPO}}/otherpkglist/test2.otherpkglist'
+ - ''
+ pkgdir:
+ - /install/rhels7.5-alternate/ppc64le
+ - '{{SWDIR}}/pkgdir/'
+ pkglist:
+ - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist
+ - '{{GITREPO}}/pkglist/test1.pkglist'
+ - '{{GITREPO}}/pkglist/test2.pkglist'
+ provision_mode: netboot
+ role: compute
+schema_version: '1.0'
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml
new file mode 100644
index 000000000..89a511b21
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml
@@ -0,0 +1,23 @@
+osimage:
+ test.environments.osimage:
+ basic_attributes:
+ arch: ppc64le
+ distribution: rhels7.5-alternate
+ osdistro: rhels7.5-alternate-ppc64le
+ osname: Linux
+ filestosync: {{GITREPO}}/syncfiles/synclist
+ deprecated:
+ comments: rhels7.5,test_environment_variables
+ genimgoptions:
+ permission: '755'
+ postinstall: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,{{GITREPO}}/postinstall/test1.postinstall
+ rootimgdir: /install/custom/test.environments.osimage
+ imagetype: linux
+ package_selection:
+ otherpkgdir: {{SWDIR}}/otherpkgdir/
+ otherpkglist: {{GITREPO}}/otherpkglist/test1.otherpkglist,{{GITREPO}}/otherpkglist/test2.otherpkglist,
+ pkgdir: /install/rhels7.5-alternate/ppc64le,{{SWDIR}}/pkgdir/
+ pkglist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,{{GITREPO}}/pkglist/test1.pkglist,{{GITREPO}}/pkglist/test2.pkglist
+ provision_mode: netboot
+ role: compute
+schema_version: '1.0'
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/exlist b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/exlist
new file mode 100644
index 000000000..0aca75548
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/exlist
@@ -0,0 +1,2 @@
+#Test file for exlist
+#INCLUDE: /tmp/imagedata/test_osimage/file1.1#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file1.1 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file1.1
new file mode 100644
index 000000000..198b31359
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file1.1
@@ -0,0 +1,2 @@
+###Test file without INCLUDE
+AAA
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.1 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.1
new file mode 100644
index 000000000..ed12e0334
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.1
@@ -0,0 +1,2 @@
+###Test file with one INCLUDE in the file
+AAA
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.2
new file mode 100644
index 000000000..2949f7bbc
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.2
@@ -0,0 +1,2 @@
+###Test file with one INCLUDE in the file
+BBB
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.3 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.3
new file mode 100644
index 000000000..a76a6b1d3
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.3
@@ -0,0 +1,2 @@
+###Test file with one INCLUDE in the file
+CCC
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.1 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.1
new file mode 100644
index 000000000..182513e3c
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.1
@@ -0,0 +1,2 @@
+###Test file with serverl INCLUDE in the file
+#INCLUDE:/tmp/imagedata/test_osimage/file3.2#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.2
new file mode 100644
index 000000000..1bfa29cff
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.2
@@ -0,0 +1,2 @@
+###Test file with serverl INCLUDE in the file
+#INCLUDE:/tmp/imagedata/test_osimage/file3.3#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.3 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.3
new file mode 100644
index 000000000..19896eaa9
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.3
@@ -0,0 +1,2 @@
+###Test file with serverl INCLUDE in the file
+AAA
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.1 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.1
new file mode 100644
index 000000000..d3d2ee784
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.1
@@ -0,0 +1,2 @@
+#Test file for INCLUDE nesting file
+#INCLUDE:/tmp/imagedata/test_osimage/file4.2#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.2 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.2
new file mode 100644
index 000000000..71b777ed2
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.2
@@ -0,0 +1,2 @@
+#Test file for INCLUDE nesting file
+#INCLUDE:/tmp/imagedata/test_osimage/file4.3#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.3 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.3
new file mode 100644
index 000000000..6685ac51a
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.3
@@ -0,0 +1,2 @@
+#Test file for INCLUDE nesting file
+#INCLUDE:/tmp/imagedata/test_osimage/file4.1#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file5 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file5
new file mode 100644
index 000000000..e1d35691b
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file5
@@ -0,0 +1,2 @@
+#Test file for INCLUDE nesting file
+#INCLUDE:/etc/hosts#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file6 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file6
new file mode 100644
index 000000000..c08a94e4f
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file6
@@ -0,0 +1,2 @@
+#Test file for INCLUDE nesting file
+AAA
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7 b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7
new file mode 100644
index 000000000..c08a94e4f
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7
@@ -0,0 +1,2 @@
+#Test file for INCLUDE nesting file
+AAA
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/otherpkglist b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/otherpkglist
new file mode 100644
index 000000000..918a6c0e8
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/otherpkglist
@@ -0,0 +1,4 @@
+#Test file for otherpkglist
+#INCLUDE: /tmp/imagedata/test_osimage/file2.1#
+#INCLUDE: /tmp/imagedata/test_osimage/file2.2#
+#INCLUDE: /tmp/imagedata/test_osimage/file2.3#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/partitionfile b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/partitionfile
new file mode 100644
index 000000000..03f9f6229
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/partitionfile
@@ -0,0 +1,2 @@
+#Test file for otherpkglist
+#INCLUDE: /tmp/imagedata/test_osimage/file3.1#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/pkglist b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/pkglist
new file mode 100644
index 000000000..f94989176
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/pkglist
@@ -0,0 +1,2 @@
+#Test file for otherpkglist
+#INCLUDE: /tmp/imagedata/test_osimage/file4.1#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/postinstall b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/postinstall
new file mode 100644
index 000000000..e3c718393
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/postinstall
@@ -0,0 +1,2 @@
+#Test file for otherpkglist
+#INCLUDE: /tmp/imagedata/test_osimage/file5#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/synclists b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/synclists
new file mode 100644
index 000000000..10e4cb8f8
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/synclists
@@ -0,0 +1,2 @@
+#Test file for synclists
+#INCLUDE: ./file6#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl
new file mode 100644
index 000000000..75bca79e0
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl
@@ -0,0 +1,2 @@
+#Test file for template
+#INCLUDE: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7#
diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/test_osimage.stanza b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/test_osimage.stanza
new file mode 100644
index 000000000..04ea48c78
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/test_osimage.stanza
@@ -0,0 +1,13 @@
+#
+
+test_osimage:
+ objtype=osimage
+ exlist=/tmp/imagedata/test_osimage/exlist
+ imagetype=linux
+ otherpkglist=/tmp/imagedata/test_osimage/otherpkglist
+ partitionfile=/tmp/imagedata/test_osimage/partitionfile
+ pkglist=/tmp/imagedata/test_osimage/pkglist
+ postinstall=/tmp/imagedata/test_osimage/postinstall
+ provmethod=install
+ synclists=/tmp/imagedata/test_osimage/synclists
+ template=/tmp/imagedata/test_osimage/template.tmpl
diff --git a/xCAT-test/autotest/testcase/xcat2nim/cases0 b/xCAT-test/autotest/testcase/xcat2nim/cases0
deleted file mode 100644
index 42875b943..000000000
--- a/xCAT-test/autotest/testcase/xcat2nim/cases0
+++ /dev/null
@@ -1,48 +0,0 @@
-start:xcat2nim_h
-description:xcat2nim -h and --help
-os:AIX
-cmd:xcat2nim -h
-check:output=~usage|Usage
-cmd:xcat2nim --help
-check:output=~usage|Usage
-end
-
-
-start:xcat2nim_t_f_o_V_att
-description:xcat2nim -f -t node -o CN -V att=
-os:AIX
-cmd:xcat2nim -t node -f -o $$CN -V netboot_kernel=mp
-check:rc==0
-cmd:lsnim -l $$CN
-check:output=~netboot_kernel = mp
-cmd:xcat2nim -t node -f -o $$CN -V
-end
-
-
-start:xcat2nim_l
-description:xcat2nim -l CN
-os:AIX
-cmd:xcat2nim -l $$CN
-check:rc==0
-check:output=~$$CN:
-end
-
-start:xcat2nim_r
-description:xcat2nim -r CN
-os:AIX
-cmd:xcat2nim -r $$CN
-check:rc==0
-cmd:lsnim
-check:output!~$$CN
-cmd:xcat2nim -t node -o $$CN
-end
-
-start:xcat2nim_u
-description:xcat2nim -u CN
-os:AIX
-cmd:lsnim
-check:output=~$$CN
-cmd:xcat2nim -u $$CN
-check:rc==0
-end
-
diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0
index 8b33d036e..275e720c4 100644
--- a/xCAT-test/autotest/testcase/xcatconfig/case0
+++ b/xCAT-test/autotest/testcase/xcatconfig/case0
@@ -1,11 +1,12 @@
start:testtest
+label:mn_only,db
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcatconfig/change_site_table_values
check:rc==0
end
start:xcatconfig_null
description:xcatconfig with no argument
-os:Linux
+label:mn_only
cmd:xcatconfig
check:output=~No parameters were supplied on the xcatconfig command. Run xcatconfig -h
check:rc!=0
@@ -13,7 +14,7 @@ end
start:xcatconfig_h
description:xcatconfig -h and --help
-os:Linux
+label:mn_only
cmd:xcatconfig -h
check:rc==0
check:output=~Usage
@@ -24,7 +25,7 @@ end
start:xcatconfig_v
description:xcatconfig -v and --version
-os:Linux
+label:mn_only
cmd:xcatconfig -v
check:rc==0
check:output=~version|Version
@@ -35,7 +36,7 @@ end
start:xcatconfig_k
description:To regenerate root's ssh keys
-os:Linux
+label:mn_only
#step1:backup /root/.ssh
cmd:cp -rf /root/.ssh /root/sshbak
check:rc==0
@@ -56,13 +57,12 @@ cmd:mv -f /root/sshbak/* /root/.ssh
check:rc==0
cmd:rm -rf /root/sshbak
check:rc==0
-
end
start:xcatconfig_k_c
description:To regenerate root's ssh keys and cretials
-os:Linux
+label:mn_only
#step1:backup /root/.ssh
cmd:cp -rf /root/.ssh /root/sshbak
check:rc==0
@@ -93,7 +93,7 @@ end
start:xcatconfig_c
description:To regenerate cretials
-os:Linux
+label:mn_only
#step1:backup: /etc/xcat/ca /etc/xcat/cert
cmd:cp -r /etc/xcat/ca /etc/xcat/cabak;cp -r /etc/xcat/cert /etc/xcat/certbak
#step2:run command and check the output
@@ -117,7 +117,7 @@ end
start:xcatconfig_s
description:To regenerate node host ssh keys
-os:Linux
+label:mn_only
#step1:backup: /etc/xcat/hostkeys /install/postscripts/hostkeys
cmd:cp -rf /etc/xcat/hostkeys /etc/xcat/hostkeysbak
check:rc==0
@@ -147,7 +147,7 @@ end
start:xcatconfig_s_c
description:To regenerate node host ssh keys and credentials
-os:Linux
+label:mn_only
#step1:backup: /etc/xcat/hostkeys /install/postscripts/hostkeys
cmd:cp -rf /etc/xcat/hostkeys /etc/xcat/hostkeysbak
check:rc==0
@@ -181,7 +181,7 @@ end
start:xcatconfig_d_V
description:This -d option will reinitialize the basic xCAT database table setup
-os:Linux
+label:mn_only
#step1:backup database and prepare test data
cmd:dumpxCATdb -p /tmp/xcatconfigtest
check:rc==0
@@ -210,8 +210,8 @@ end
start:xcatconfig_i
-os:Linux
description:Initial the xCAT installation in Management Node, only node host key regenerated, xcatd restart; xCAT credentials, database and the ssh key are not changed
+label:mn_only
#step1:backup test environment and prepare test data
#backup test environment, including database, /root/.ssh/, /etc/xcat/hostkey/, install/postscripts/hostkeys
cmd:dumpxCATdb -p /tmp/xcatconfigtest
@@ -265,8 +265,8 @@ end
start:xcatconfig_u
-os:Linux
description:Update xCAT in Management Node, xcatd restart; database, xCAT credentials, node ssh key and root ssh key are not changed
+label:mn_only
#step1:backup test environment and prepare test data
#backup test environment, including database, /root/.ssh/, /etc/xcat/hostkey/, install/postscripts/hostkeys
cmd:dumpxCATdb -p /tmp/xcatconfigtest
@@ -317,8 +317,9 @@ check:rc==0
end
start:xcatconfig_u_check_xcatsslversion_rhels_sles
-os:rhels,sles
description:after xcatconfig -u the site.xcatsslversion will not be changed
+os:rhels,sles
+label:mn_only
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$'
check:rc==0
cmd:chtab key=xcatsslversion site.value=TLSv12
@@ -337,6 +338,7 @@ end
start:xcatconfig_u_check_xcatsslversion_ubuntu
description:after xcatconfig -u the site.xcatsslversion will not be changed
os:ubuntu
+label:mn_only
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$'
check:rc==0
cmd:chtab key=xcatsslversion site.value=TLSv1_2
diff --git a/xCAT-test/autotest/testcase/xcatd/case0 b/xCAT-test/autotest/testcase/xcatd/case0
index dd9c72a65..8876f1f1b 100644
--- a/xCAT-test/autotest/testcase/xcatd/case0
+++ b/xCAT-test/autotest/testcase/xcatd/case0
@@ -1,10 +1,11 @@
start:xcatd_start
description:stop then start xcatd daemon, and check all the 6 processes are running
-os:linux
+label:mn_only,xcatd
cmd:if [ -d "/tmp/xcatd_start" ]; then mv /tmp/xcatd_start /tmp/xcatd_start.org; fi; mkdir -p /tmp/xcatd_start
check:rc==0
cmd:service xcatd status
check:rc==0
+check:output=~xcatd service|xcatd.service
check:output=~Active: active \(running\)|xcatd service is running
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/original_xcatd_processes_status
check:rc==0
@@ -22,6 +23,7 @@ check:rc==0
cmd:sleep 3
cmd:service xcatd status
check:rc==0
+check:output=~xcatd service|xcatd.service
check:output=~Active: active \(running\)|xcatd service is running
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/after_start_xcatd_processes_status
check:rc==0
@@ -43,61 +45,20 @@ cmd: rm -rf /tmp/xcatd_start; if [ -d "/tmp/xcatd_start.org" ]; then mv /tmp/xca
check:rc==0
end
-start:xcatd_start_systemd
-description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,stop then start xcatd daemon, and check all the 6 processes are running
-os:linux
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-check:output=~/system.slice/xcatd.service
-check:output=~xcatd: SSL
-check:output=~xcatd: DB
-check:output=~xcatd: UDP
-check:output=~xcatd: install
-check:output=~xcatd: Discovery
-check:output=~xcatd: Command log
-cmd:service xcatd stop
-check:rc==0
-cmd:sleep 3
-cmd:service xcatd status
-check:rc!=0
-check:output=~xcatd.service
-check:output=~inactive \(dead\)
-cmd:service xcatd start
-check:rc==0
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-cmd:result=`ps -ef | grep "xcatd: SSL listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
-check:output=~only one process
-cmd:result=`ps -ef | grep "xcatd: DB Access" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
-check:output=~only one process
-cmd:result=`ps -ef | grep "xcatd: UDP listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
-check:output=~only one process
-cmd:result=`ps -ef | grep "xcatd: install monitor" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
-check:output=~only one process
-cmd:result=`ps -ef | grep "xcatd: Discovery worke" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
-check:output=~only one process
-cmd:result=`ps -ef | grep "xcatd: Command log writer" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi
-check:output=~only one process
-end
-
start:xcatd_stop
description:stop xcatd daemon, then check all the 6 processes are stopped
-os:linux
+label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
-check:output=~xcatd service is running
+check:output=~xcatd service|xcatd.service
+check:output=~xcatd service is running|active \(running\)
cmd:service xcatd stop
check:rc==0
-check:output=~Stopping x(cat|CAT)d
-check:output=~[ OK ]
cmd:sleep 3
cmd:service xcatd status
-check:output=~xcatd service is not running
+check:output=~xcatd service|xcatd.service
+check:output=~xcatd service is not running|inactive \(dead\)
cmd:ps -ef | grep xcatd
check:output!~"xcatd: SSL listener"
check:output!~"xcatd: DB Access"
@@ -109,111 +70,39 @@ cmd:service xcatd start
check:rc==0
end
-start:xcatd_stop_systemd
-description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,stop xcatd daemon, then check all the 6 processes are stopped
-os:linux
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-check:output=~/system.slice/xcatd.service
-check:output=~xcatd: SSL
-check:output=~xcatd: DB
-check:output=~xcatd: UDP
-check:output=~xcatd: install
-check:output=~xcatd: Discovery
-check:output=~xcatd: Command log
-cmd:service xcatd stop
-check:rc==0
-cmd:sleep 3
-cmd:service xcatd status
-check:rc!=0
-check:output=~xcatd.service
-check:output=~inactive \(dead\)
-cmd:ps -ef | grep xcatd
-check:output!~"xcatd: SSL"
-check:output!~"xcatd: DB"
-check:output!~"xcatd: UDP"
-check:output!~"xcatd: install"
-check:output!~"xcatd: Discovery"
-check:output!~"xcatd: Command log"
-cmd:service xcatd start
-check:rc==0
-end
start:xcatd_restart
description:restart xcatd daemon
-os:linux
+label:mn_only,xcatd
cmd:service xcatd status
-check:output=~xcatd service is running
+check:output=~xcatd service|xcatd.service
+check:output=~xcatd service is running|active \(running\)
check:rc==0
cmd:times=10; while [ $times -gt 0 ]; do service xcatd restart; if [ "$?" -ne "0" ]; then break; fi; ((times--)); done; if [ $times -gt 0 ]; then $?=1; fi
check:rc==0
cmd:service xcatd status
-check:output=~xcatd service is running
+check:output=~xcatd service|xcatd.service
+check:output=~xcatd service is running|active \(running\)
check:rc==0
end
-start:xcatd_restart_systemd
-description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,restart xcatd daemon
-os:linux
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-cmd:times=10; while [ $times -gt 0 ]; do service xcatd restart; if [ "$?" -ne "0" ]; then break; fi; ((times--)); done; if [ $times -gt 0 ]; then $?=1; fi
-check:rc==0
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-end
start:run_command_with_XCATBYPASS
description:with XCATBYPASS=YES, the command works either xcatd deamon running or not
-os:linux
+label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
-check:output=~xcatd service is running
-cmd:XCATBYPASS=YES tabdump site
-check:rc==0
-cmd:service xcatd stop
-check:rc==0
-check:output=~Stopping x(cat|CAT)d
-check:output=~[ OK ]
-cmd:sleep 3
-cmd:service xcatd status
-check:output=~xcatd service is not running
-cmd:tabdump site
-check:rc!=0
-cmd:XCATBYPASS=YES tabdump site
-check:rc==0
-cmd:service xcatd start
-check:rc==0
-check:output=~Starting x(cat|CAT)d
-check:output=~[ OK ]
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd service is running
-end
-
-start:run_command_with_XCATBYPASS_systemd
-description:wis is the test case when xcat service is managed by systemd,on sles12* and ubuntu16.04, the output of service xcatd changes,with XCATBYPASS=YES, the command works either xcatd deamon running or not
-os:linux
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
+check:output=~xcatd service|xcatd.service
+check:output=~xcatd service is running|active \(running\)
cmd:XCATBYPASS=YES tabdump site
check:rc==0
cmd:service xcatd stop
check:rc==0
cmd:sleep 3
cmd:service xcatd status
-eck:rc!=0
-check:output=~xcatd.service
-check:output=~inactive \(dead\)
+check:output=~xcatd service|xcatd.service
+check:output=~xcatd service is not running|inactive \(dead\)
cmd:tabdump site
check:rc!=0
cmd:XCATBYPASS=YES tabdump site
@@ -222,23 +111,17 @@ cmd:service xcatd start
check:rc==0
cmd:service xcatd status
check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-check:output=~/system.slice/xcatd.service
-check:output=~xcatd: SSL
-check:output=~xcatd: DB
-check:output=~xcatd: UDP
-check:output=~xcatd: install
-check:output=~xcatd: Discovery
-check:output=~xcatd: Command log
+check:output=~xcatd service|xcatd.service
+check:output=~xcatd service is running|active \(running\)
end
start:disable_root_permission_in_policy_table
description:disable root permission, only with XCATBYPASS=YES, the command works
-os:linux
+label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
-check:output=~xcatd service is running
+check:output=~ xcatd service|xcatd.service
+check:output=~xcatd service is running|active \(running\)
cmd:chtab name=root policy.rule=disable
check:rc==0
cmd:lsdef
@@ -251,31 +134,14 @@ cmd:lsdef
check:rc==0
end
-start:disable_root_permission_in_policy_table_systemd
-description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,disable root permission, only with XCATBYPASS=YES, the command works
-os:linux
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-cmd:chtab name=root policy.rule=disable
-check:rc==0
-cmd:lsdef
-check:output=~Error: (\[.*?\]: )?Permission denied for request
-cmd:XCATBYPASS=YES lsdef
-check:rc==0
-cmd:XCATBYPASS=YES chtab name=root policy.rule=allow
-check:rc==0
-cmd:lsdef
-check:rc==0
-end
start:assign_certain_command_permission
description:assign root permission to certain command, only this command works
-os:linux
+label:mn_only,xcatd
cmd:service xcatd status
check:rc==0
-check:output=~xcatd service is running
+check:output=~ xcatd service |xcatd.service
+check:output=~xcatd service is running|active \(running\)
cmd:lsdef
check:rc==0
cmd:tabdump policy
@@ -290,24 +156,4 @@ cmd:chtab name=root policy.commands= policy.rule=allow
check:rc==0
end
-start:assign_certain_command_permission_systemd
-description:this is the test case when xcat service is managed by systemd on sles12* and ubuntu16.04, the output of service xcatd changes,assign root permission to certain command, only this command works
-os:linux
-cmd:service xcatd status
-check:rc==0
-check:output=~xcatd.service
-check:output=~active \(running\)
-cmd:lsdef
-check:rc==0
-cmd:tabdump policy
-check:rc==0
-cmd:chtab name=root policy.commands=lsdef policy.rule=allow
-check:rc==0
-cmd:lsdef
-check:rc==0
-cmd:tabdump policy
-check:output=~Error: (\[.*?\]: )?Permission denied for request
-cmd:chtab name=root policy.commands= policy.rule=allow
-check:rc==0
-end
diff --git a/xCAT-test/autotest/testcase/xcatsnap/cases0 b/xCAT-test/autotest/testcase/xcatsnap/cases0
index 3c336f61c..52607b868 100644
--- a/xCAT-test/autotest/testcase/xcatsnap/cases0
+++ b/xCAT-test/autotest/testcase/xcatsnap/cases0
@@ -1,5 +1,6 @@
start:xcatsnap_null
description:xcatsnap with no argument
+label:mn_only
cmd:xcatsnap
check:rc==0
check:output=~Send .* to IBM Support
@@ -8,6 +9,7 @@ end
start:xcatsnap_b_d
description:xcatsnap -B -d
+label:mn_only
cmd:xcatsnap -B -d /tmp/testdir
check:rc==0
check:output=~Send .* to IBM Support
@@ -18,6 +20,7 @@ end
start:xcatsnap_h
description:xcatsnap -h and --help
+label:mn_only
cmd:xcatsnap -h
check:output=~Usage
cmd:xcatsnap --help
@@ -27,6 +30,7 @@ end
start:xcatsnap_v
description:xcatsnap -v and --version
+label:mn_only
cmd:xcatsnap -v
check:output=~version|Version
cmd:xcatsnap --version
diff --git a/xCAT-test/autotest/testcase/xcatstanzafile/cases0 b/xCAT-test/autotest/testcase/xcatstanzafile/cases0
index d8b672a8b..b671c668c 100644
--- a/xCAT-test/autotest/testcase/xcatstanzafile/cases0
+++ b/xCAT-test/autotest/testcase/xcatstanzafile/cases0
@@ -1,6 +1,6 @@
start:xcatstanzafile_normal
-os:Linux
description:xcatstanzafile in normal format
+label:mn_only,db
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|chdef -z
@@ -13,24 +13,10 @@ cmd:rmdef -t node testnode
cmd:rm -f testfile
end
-start:xcatstanzafile_normal
-os:Aix
-description:xcatstanzafile in normal format
-cmd:echo "default-node:\n groups=all,compute\n testnode:\n objtype=node\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
-check:rc==0
-cmd:cat testfile|chdef -z
-check:rc==0
-cmd:lsdef testnode
-check:output=~(groups=all,compute)
-check:output=~xcatmaster=MS02.ppd.pok.com
-check:output=~nfsserver=IS227.ppd.pok.com
-cmd:rmdef -t node testnode
-cmd:rm -f testfile
-end
-
start:xcatstanzafile_colon
description:xcatstanzafile's header without colon
+label:mn_only,db
cmd:echo -e "default-node:\n groups=all,compute\ntestnode\n objtype=node\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|chdef -z
@@ -44,6 +30,7 @@ end
start:xcatstanzafile_attribute
description:xcatstanzafile with error attribute line
+label:mn_only,db
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmasterMS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|chdef -z
@@ -69,6 +56,7 @@ end
start:xcatstanzafile_objtype
description:xcatstanzafile,a stanza without objtype definition
+label:mn_only,db
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|mkdef -z
@@ -80,6 +68,7 @@ end
#start:xcatstanzafile_comment
#description:xcatstanzafile,a stanza without objtype definition
+#label:mn_only,db
#cmd:echo -ne "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster=MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
#check:rc==0
#cmd:echo '#abc' >> testfile
@@ -91,8 +80,8 @@ end
start:xcatstanzafile_tab
-os:Linux
description:xcatstanzafile,line with tab and space
+label:mn_only,db
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster = MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|mkdef -z
@@ -101,21 +90,9 @@ cmd:rmdef -t node testnode
cmd:rm -f testfile
end
-start:xcatstanzafile_tab
-os:Aix
-description:xcatstanzafile,line with tab and space
-cmd:echo "default-node:\n groups=all,compute\n testnode:\n objtype=node\n xcatmaster = MS02.ppd.pok.com\n nfsserver=IS227.ppd.pok.com" > testfile
-check:rc==0
-cmd:cat testfile|mkdef -z
-check:rc==0
-cmd:rmdef -t node testnode
-cmd:rm -f testfile
-end
-
-
start:xcatstanzafile_multattr
-os:Linux
description:xcatstanzafile,line with multiple attribute
+label:mn_only,db
cmd:echo -e "default-node:\n groups=all,compute\ntestnode:\n objtype=node\n xcatmaster= MS02.ppd.pok.com nfsserver=IS227.ppd.pok.com" > testfile
check:rc==0
cmd:cat testfile|mkdef -z
@@ -126,24 +103,10 @@ cmd:rmdef -t node testnode
cmd:rm -f testfile
end
-start:xcatstanzafile_multattr
-os:Aix
-description:xcatstanzafile,line with multiple attribute
-cmd:echo "default-node:\n groups=all,compute\n testnode:\n objtype=node\n xcatmaster= MS02.ppd.pok.com nfsserver=IS227.ppd.pok.com" > testfile
-check:rc==0
-cmd:cat testfile|mkdef -z
-check:rc==0
-cmd:lsdef testnode
-check:output=~\s*xcatmaster=MS02.ppd.pok.com\s*nfsserver=IS227.ppd.pok.com
-cmd:rmdef -t node testnode
-cmd:rm -f testfile
-end
-
-
start:xcatstanzafile_defaultvalue
-os:Linux
description:xcatstanzafile,If the header name is ``default-