mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-08-04 08:26:59 +00:00
Merge pull request #3055 from xcat2/master
Merge master to 2.13 branch for 2.13.4 release
This commit is contained in:
+6
-1
@@ -8,7 +8,7 @@ Documentation
|
||||
|
||||
xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/
|
||||
|
||||
|docs_latest| |docs_2132| |docs_2131| |docs_2130| |docs_212| |docs_211|
|
||||
|docs_latest| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212| |docs_211|
|
||||
|
||||
Open Source License
|
||||
-------------------
|
||||
@@ -22,6 +22,11 @@ Developers
|
||||
Developers and prospective contributors are encouraged to read the `Developers Guide <http://xcat-docs.readthedocs.io/en/latest/developers/>`_
|
||||
In particular the `GitHub <http://xcat-docs.readthedocs.io/en/latest/developers/github/>`_ related subsection.
|
||||
|
||||
.. |docs_2133| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.3
|
||||
:alt: 2.13.3 documentation status
|
||||
:scale: 100%
|
||||
:target: http://xcat-docs.readthedocs.io/en/2.13.3/
|
||||
|
||||
.. |docs_2132| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.2
|
||||
:alt: 2.13.2 documentation status
|
||||
:scale: 100%
|
||||
|
||||
+9
-7
@@ -178,6 +178,7 @@ then
|
||||
build_time=`date`
|
||||
build_machine=`hostname`
|
||||
commit_id=`git rev-parse --short HEAD`
|
||||
commit_id_long=`git rev-parse HEAD`
|
||||
|
||||
package_dir_name=debs$REL
|
||||
#TODO: define the core path and tarball name
|
||||
@@ -362,14 +363,15 @@ __EOF__
|
||||
chmod 775 mklocalrepo.sh
|
||||
|
||||
#
|
||||
# Add a buildinfo file under xcat-core to track information about the build
|
||||
# Add a buildinfo file into the tar.bz2 file to track information about the build
|
||||
#
|
||||
buildinfo=$local_core_repo_path/buildinfo
|
||||
echo "VERSION=$ver" > $buildinfo
|
||||
echo "RELEASE=$xcat_release" >> $buildinfo
|
||||
echo "BUILD_TIME=$build_time" >> $buildinfo
|
||||
echo "BUILD_MACHINE=$build_machine" >> $buildinfo
|
||||
echo "COMMIT_ID=$commit_id" >> $buildinfo
|
||||
BUILDINFO=$local_core_repo_path/buildinfo
|
||||
echo "VERSION=$ver" > $BUILDINFO
|
||||
echo "RELEASE=$xcat_release" >> $BUILDINFO
|
||||
echo "BUILD_TIME=$build_time" >> $BUILDINFO
|
||||
echo "BUILD_MACHINE=$build_machine" >> $BUILDINFO
|
||||
echo "COMMIT_ID=$commit_id" >> $BUILDINFO
|
||||
echo "COMMIT_ID_LONG=$commit_id_long" >> $BUILDINFO
|
||||
|
||||
#create the xcat-core.list file
|
||||
|
||||
|
||||
+3
-1
@@ -189,6 +189,7 @@ function setversionvars {
|
||||
BUILD_TIME=`date`
|
||||
BUILD_MACHINE=`hostname`
|
||||
COMMIT_ID=`git rev-parse --short HEAD`
|
||||
COMMIT_ID_LONG=`git rev-parse HEAD`
|
||||
XCAT_RELEASE="snap$(date '+%Y%m%d%H%M')"
|
||||
echo "$XCAT_RELEASE" >Release
|
||||
}
|
||||
@@ -541,7 +542,7 @@ else
|
||||
fi
|
||||
|
||||
#
|
||||
# Add a VERSION file into the tar.bz2 file to track information about the build
|
||||
# Add a buildinfo file into the tar.bz2 file to track information about the build
|
||||
#
|
||||
BUILDINFO=$XCATCORE/buildinfo
|
||||
echo "VERSION=$VER" > $BUILDINFO
|
||||
@@ -549,6 +550,7 @@ echo "RELEASE=$XCAT_RELEASE" >> $BUILDINFO
|
||||
echo "BUILD_TIME=$BUILD_TIME" >> $BUILDINFO
|
||||
echo "BUILD_MACHINE=$BUILD_MACHINE" >> $BUILDINFO
|
||||
echo "COMMIT_ID=$COMMIT_ID" >> $BUILDINFO
|
||||
echo "COMMIT_ID_LONG=$COMMIT_ID_LONG" >> $BUILDINFO
|
||||
|
||||
echo "Creating $(dirname $DESTDIR)/$TARNAME ..."
|
||||
if [[ -e $TARNAME ]]; then
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
The latest docs are here: http://xcat-docs.readthedocs.io/en/latest/
|
||||
|
||||
Status:
|
||||
[](http://xcat-docs.readthedocs.io/en/latest/?badge=latest)
|
||||
[](http://xcat-docs.readthedocs.io/en/2.11/?badge=2.11)
|
||||
|
||||
|
||||
The documentation project is written in restructured text (.rst) using Sphinx and hosted on ReadTheDocs.
|
||||
|
||||
## Building Documentation
|
||||
|
||||
@@ -109,4 +109,39 @@ In order to utilize ``xcatprobe switch_macmap``, snmp needs to be enabled. To e
|
||||
|
||||
updatenode frame01sw1 -P enablesnmp
|
||||
|
||||
To configuring SNMPv3 after enable snmp, set user, authentication and/or encryption for the switches: ::
|
||||
|
||||
chdef frame01sw1 snmpauth=sha snmppassword=xcatpassw0rd snmpprivacy=DES snmpusername=xcatadmin
|
||||
|
||||
then execute the ``configonie`` command to add the snmp user for the switch: ::
|
||||
|
||||
/opt/xcat/share/xcat/scripts/configonie --switches frame01sw1 --snmp
|
||||
|
||||
To verify the SNMPv3 configuration, run ``xcatprobe switch_macmap`` command, will show following results: ::
|
||||
|
||||
#xcatprobe switch_macmap frame01sw1 -V
|
||||
<INFO>frame1sw1: Attempting to refresh switch information...
|
||||
<INFO>frame1sw1: Generate SNMP session with parameter:
|
||||
'UseNumeric' => '1'
|
||||
'SecName' => 'xcatadmin'
|
||||
'AuthPass' => 'xcatpassw0rd'
|
||||
'Version' => '3'
|
||||
'PrivProto' => 'DES'
|
||||
'DestHost' => '172.21.253.102'
|
||||
'SecLevel' => 'authPriv'
|
||||
'AuthProto' => 'SHA'
|
||||
'PrivPass' => 'xcatpassw0rd'
|
||||
<INFO>frame1sw1: SNMP Session query OID:".1.3.6.1.2.1.31.1.1.1.1"
|
||||
<INFO>frame1sw1: SNMP Session get data for OID:".1.3.6.1.2.1.31.1.1.1.1":
|
||||
'1' => 'lo'
|
||||
'2' => 'eth0'
|
||||
'3' => 'swp1'
|
||||
'4' => 'swp2'
|
||||
'5' => 'swp3'
|
||||
|
||||
...........................more output.....................
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,46 +3,45 @@ Configure passwords
|
||||
|
||||
#. Configure the system password for the ``root`` user on the compute nodes.
|
||||
|
||||
* Set using the :doc:`chtab </guides/admin-guides/references/man8/chtab.8>` command: (**Recommended**) ::
|
||||
* Set using the :doc:`chtab </guides/admin-guides/references/man8/chtab.8>` command: ::
|
||||
|
||||
chtab key=system passwd.username=root passwd.password=abc123
|
||||
chtab key=system passwd.username=root passwd.password=abc123
|
||||
|
||||
To encrypt the password using ``openssl``, use the following command: ::
|
||||
To encrypt the password using ``openssl``, use the following command: ::
|
||||
|
||||
chtab key=system passwd.username=root passwd.password=`openssl passwd -1 abc123`
|
||||
|
||||
* Directly edit the passwd table using the :doc:`tabedit </guides/admin-guides/references/man8/tabedit.8>` command.
|
||||
chtab key=system passwd.username=root passwd.password=`openssl passwd -1 abc123`
|
||||
|
||||
|
||||
#. Configure the passwords for Management modules of the compute nodes.
|
||||
|
||||
* For OpenBMC managed systems: ::
|
||||
|
||||
chtab key=openbmc passwd.username=root passwd.password=0penBmc
|
||||
|
||||
* For IPMI/BMC managed systems: ::
|
||||
|
||||
chtab key=ipmi passwd.username=USERID passwd.password=PASSW0RD
|
||||
chtab key=ipmi passwd.username=ADMIN passwd.password=admin
|
||||
|
||||
* For HMC managed systems: ::
|
||||
|
||||
chtab key=hmc passwd.username=hscroot passwd.password=abc123
|
||||
|
||||
The username and password for the HMC can be assigned directly to the HMC node object definition in xCAT. This is needed when the HMC username/password is different for each HMC. ::
|
||||
|
||||
mkdef -t node -o hmc1 groups=hmc,all nodetype=ppc hwtype=hmc mgt=hmc \
|
||||
username=hscroot password=hmcPassw0rd
|
||||
If the username/password is different for multiple HMCs, set the ``username`` and ``password`` attribute for each HMC node object in xCAT
|
||||
|
||||
* For Blade managed systems: ::
|
||||
|
||||
chtab key=blade passwd.username=USERID passwd.password=PASSW0RD
|
||||
|
||||
* For FSP/BPA (Flexible Service Processor/Bulk Power Assembly), if the passwords are set to the factory defaults, you must change them before running and commands to them. ::
|
||||
* For FSP/BPA (Flexible Service Processor/Bulk Power Assembly) the factory default passwords must be changed before running commands against them. ::
|
||||
|
||||
rspconfig frame general_passwd=general,<newpassword>
|
||||
rspconfig frame admin_passwd=admin,<newpassword>
|
||||
rspconfig frame HMC_passwd=,<newpassword>
|
||||
|
||||
|
||||
#. If the REST API is being used configure a user and set a policy rule in xCAT.
|
||||
#. If using the xCAT REST API
|
||||
|
||||
#. Create a non root user that will be used to make the REST API calls. ::
|
||||
#. Create a non-root user that will be used to make the REST API calls. ::
|
||||
|
||||
useradd xcatws
|
||||
passwd xcatws # set the password
|
||||
@@ -56,4 +55,4 @@ Configure passwords
|
||||
mkdef -t policy 6 name=xcatws rule=allow
|
||||
|
||||
|
||||
When making calls to the xCAT REST API, pass in the credentials using the following attributes: ``userName`` and ``userPW``
|
||||
When making calls to the xCAT REST API, pass in the credentials using the following attributes: ``userName`` and ``userPW``
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
IBM Power LE / OpenPOWER
|
||||
=========================
|
||||
|
||||
The following sections documents the procedures in managing IBM Power LE (Little Endian) / OpenPOWER servers in an xCAT cluster.
|
||||
These are machines use the IBM Power Architecture and is **IPMI** managed.
|
||||
Most of the content is general information for xCAT, the focus and examples are for management of IBM OpenPower servers.
|
||||
|
||||
IBM OpenPower Servers
|
||||
* based on Power8 Processor Technology is IPMI managed
|
||||
* based on Power9 Processor Technology is OpenBmc managed [**Alpha**]
|
||||
|
||||
|
||||
.. toctree::
|
||||
@@ -10,7 +13,7 @@ These are machines use the IBM Power Architecture and is **IPMI** managed.
|
||||
|
||||
configure/index.rst
|
||||
discovery/index.rst
|
||||
management.rst
|
||||
management/index.rst
|
||||
diskful/index.rst
|
||||
diskless/index.rst
|
||||
statelite/index.rst
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
Hardware Management
|
||||
===================
|
||||
|
||||
Basic Operation
|
||||
---------------
|
||||
|
||||
The Beacon Light
|
||||
````````````````
|
||||
|
||||
Most of modern enterprise level server machines have LEDs installed on their front panel and/or rear panel, which are called beacon lights. When this light has been turned on, the system administrator can use this light to indicate one physical machine out of a bunch of enclosures in a server frame. It makes life easier.
|
||||
|
||||
With xCAT, the end user can turn the beacon light on or off with the commands show below. ::
|
||||
|
||||
rbeacon cn1 on
|
||||
rbeacon cn1 off
|
||||
|
||||
The current state of the beacon light can not be queried remotely. As a workaround, one can always use the ``rbeacon`` command to turn all the beacon lights in one frame off, and then turn a particular beacon light on. ::
|
||||
|
||||
rbeacon a_group_of_cn off
|
||||
rbeacon cn5 on
|
||||
|
||||
Remote Power Control
|
||||
````````````````````
|
||||
|
||||
The next important thing is to control the power of a remote physical machine. For this purpose, ``rpower`` command is involved. ::
|
||||
|
||||
rpower cn1 on
|
||||
rpower cn1 off
|
||||
|
||||
In order to reboot a remote physical machine, run ::
|
||||
|
||||
rpower cn1 boot
|
||||
|
||||
Or do a hardware reset, run ::
|
||||
|
||||
rpower cn1 reset
|
||||
|
||||
Get the current rpower state of a machine, refer to the example below. ::
|
||||
|
||||
# rpower cn1 state
|
||||
cn1: Running
|
||||
|
||||
Remote Console
|
||||
``````````````
|
||||
|
||||
Most enterprise level servers do not have video adapters installed with the machine. Meaning, the end user can not connect a monitor to the machine and get display output. In most cases, the console can be viewed using the serial port or LAN port, through Serial-over-LAN. Serial cable or network cable are used to get a command line interface of the machine. From there, the end user can get the basic machine booting information, firmware settings interface, local command line console, etc.
|
||||
|
||||
In order to get the command line console remotely. xCAT provides the ``rcons`` command.
|
||||
|
||||
#. Make sure the ``conserver`` is configured by running ``makeconservercf``.
|
||||
|
||||
#. Check if the ``conserver`` is up and running ::
|
||||
|
||||
ps ax | grep conserver
|
||||
|
||||
#. If ``conserver`` is not running, start ::
|
||||
|
||||
[sysvinit] service conserver start
|
||||
[systemd] systemctl start conserver.service
|
||||
|
||||
or restart, if changes to the configuration were made ::
|
||||
|
||||
[sysvinit] service conserver restart
|
||||
[systemd] systemctl restart conserver.service
|
||||
|
||||
|
||||
#. After that, you can get the command line console for a specific machine with the ``rcons`` command ::
|
||||
|
||||
rcons cn1
|
||||
|
||||
Advanced operation
|
||||
------------------
|
||||
|
||||
Remote Hardware Inventory
|
||||
`````````````````````````
|
||||
|
||||
When you have a lot of physical machines in one place, the most important thing is identify which is which. Mapping the model type and/or serial number of a machine with its host name. Command ``rinv`` is involved in such a situation. With this command, most of the important information to distinct one machine from all the others can be obtained remotely.
|
||||
|
||||
To get all the hardware information, which including the model type, serial number, firmware version, detail configuration, et al. ::
|
||||
|
||||
rinv cn1 all
|
||||
|
||||
As an example, in order to get only the information of firmware version, the following command can be used. ::
|
||||
|
||||
rinv cn1 firm
|
||||
|
||||
Remote Hardware Vitals
|
||||
``````````````````````
|
||||
|
||||
Collect runtime information from running physical machine is also a big requirement for real life system administrators. This kind of information includes, temperature of CPU, internal voltage of particular socket, wattage with workload, speed of cooling fan, et al.
|
||||
|
||||
In order to get such information, use ``rvitals`` command. This kind of information varies among different model types of the machine. Thus, check the actual output of the ``rvitals`` command against your machine, to verify which kinds of information can be extracted. The information may change after the firmware update of the machine. ::
|
||||
|
||||
rvitals cn1 all
|
||||
|
||||
As an example, get only the temperature information of a particular machine. ::
|
||||
|
||||
rvitals cn1 temp
|
||||
|
||||
Firmware Updating
|
||||
`````````````````
|
||||
|
||||
For OpenPOWER machines, use the ``rflash`` command to update firmware.
|
||||
|
||||
Check firmware version of the node and the HPM file: ::
|
||||
|
||||
rflash cn1 -c /firmware/8335_810.1543.20151021b_update.hpm
|
||||
|
||||
Update node firmware to the version of the HPM file
|
||||
|
||||
::
|
||||
|
||||
rflash cn1 /firmware/8335_810.1543.20151021b_update.hpm
|
||||
|
||||
Configures Nodes' Service Processors
|
||||
````````````````````````````````````
|
||||
|
||||
Here comes the command, ``rspconfig``. It is used to configure the service processor of a physical machine. On a OpenPower system, the service processor is the BMC, Baseboard Management Controller. Various variables can be set through the command. Also notice, the actual configuration may change among different machine-model types.
|
||||
|
||||
Examples
|
||||
|
||||
To turn on SNMP alerts for cn5: ::
|
||||
|
||||
rspconfig cn5 alert=on
|
||||
@@ -0,0 +1,10 @@
|
||||
Advanced Operations
|
||||
===================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
rinv.rst
|
||||
rvitals.rst
|
||||
rflash.rst
|
||||
rspconfig.rst
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
``rflash`` - Remote Firmware Flashing
|
||||
=====================================
|
||||
|
||||
See :doc:`rflash manpage </guides/admin-guides/references/man1/rflash.1>` for more information.
|
||||
|
||||
The ``rflash`` command is provided to assist the system administrator in updating firmware.
|
||||
|
||||
To check the current firmware version on the node's BMC and the HPM file: ::
|
||||
|
||||
rflash <noderange> -c /firmware/8335_810.1543.20151021b_update.hpm
|
||||
|
||||
To update the firmware on the node's BMC to version in the HPM file: ::
|
||||
|
||||
rflash <noderange> /firmware/8335_810.1543.20151021b_update.hpm
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
``rinv`` - Remote Hardware Inventory
|
||||
====================================
|
||||
|
||||
See :doc:`rinv manpage </guides/admin-guides/references/man1/rinv.1>` for more information.
|
||||
|
||||
Use ``rinv`` command to remotely obtain inventory information of a physical machine. This will help to distinguish one machine from another and aid in mapping the model type and/or serial number of a machine with its host name.
|
||||
|
||||
To get all the hardware information for node ``cn1``: ::
|
||||
|
||||
rinv cn1 all
|
||||
|
||||
To get just the firmware information for ``cn1``: ::
|
||||
|
||||
rinv cn1 firm
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
``rspconfig`` - Remote Configuration of Service Processors
|
||||
==========================================================
|
||||
|
||||
See :doc:`rspconfig manpage </guides/admin-guides/references/man1/rspconfig.1>` for more information.
|
||||
|
||||
The ``rspconfig`` command can be used to configure the service processor, or Baseboard Management Controller (BMC), of a physical machine.
|
||||
|
||||
For example, to turn on SNMP alerts for node ``cn5``: ::
|
||||
|
||||
rspconfig cn5 alert=on
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
``rvitals`` - Remote Hardware Vitals
|
||||
====================================
|
||||
|
||||
See :doc:`rvitals manpage </guides/admin-guides/references/man1/rvitals.1>` for more information.
|
||||
|
||||
Collecting runtime information from a running physical machine is an important part of system administration. Data can be obtained from the service processor including temperature, voltage, cooling fans, etc.
|
||||
|
||||
Use the ``rvitals`` command to obtain this information. ::
|
||||
|
||||
rvitals <noderange> all
|
||||
|
||||
To only get the temperature information of machines in a particular noderange: ::
|
||||
|
||||
rvitals <noderange> temp
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
Basic Operations
|
||||
================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
rbeacon.rst
|
||||
rpower.rst
|
||||
rcons.rst
|
||||
@@ -0,0 +1,9 @@
|
||||
``rbeacon`` - Beacon Light
|
||||
==========================
|
||||
|
||||
See :doc:`rbeacon manpage </guides/admin-guides/references/man1/rbeacon.1>` for more information.
|
||||
|
||||
|
||||
Most enterprise level servers have LEDs on their front and/or rear panels, one of which is a beacon light. If turned on, this light can assist the system administrator in locating one physical machine in the cluster.
|
||||
|
||||
Using xCAT, administrators can turn on and off the beacon light using: ``rbeacon <node> on|off``
|
||||
@@ -0,0 +1,53 @@
|
||||
``rcons`` - Remote Console
|
||||
==========================
|
||||
|
||||
See :doc:`rcons manpage </guides/admin-guides/references/man1/rcons.1>` for more information.
|
||||
|
||||
Most enterprise servers do not have video adapters installed with the machine and often do not provide a method for attaching a physical monitor/keyboard/mouse to get the display output. For this purpose xCAT can assist the system administrator to view the console over a "Serial-over-LAN" (SOL) connection through the BMC.
|
||||
|
||||
Configure the correct console management by modifying the node definition:
|
||||
|
||||
* For OpenPower, **IPMI** managed server: ::
|
||||
|
||||
chdef -t node -o <noderange> cons=ipmi
|
||||
|
||||
* For OpenPower, **OpenBMC** managed servers: ::
|
||||
|
||||
chdef -t node -o <noderange> cons=openbmc
|
||||
|
||||
Open a console to ``compute1``: ::
|
||||
|
||||
rcons compute1
|
||||
|
||||
**Note:** The keystroke ``ctrl+e c .`` will disconnect you from the console.
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
General
|
||||
```````
|
||||
|
||||
The xCAT ``rcons`` command relies on conserver (http://www.conserver.com/). The ``conserver`` package should have been installed with xCAT as it's part of the xCAT dependency package. If you are having problems seeing the console, try the following.
|
||||
|
||||
#. Make sure ``conserver`` is configured by running ``makeconservercf``.
|
||||
|
||||
#. Check if ``conserver`` is up and running ::
|
||||
|
||||
[sysvinit] service conserver status
|
||||
[systemd] systemctl status conserver.service
|
||||
|
||||
#. If ``conserver`` is not running, start the service using: ::
|
||||
|
||||
[sysvinit] service conserver start
|
||||
[systemd] systemctl start conserver.service
|
||||
|
||||
#. After this, try invoking the console again: ``rcons <node>``
|
||||
|
||||
|
||||
OpenBMC Specific
|
||||
```````````````
|
||||
|
||||
#. For OpenBMC managed servers, the root user must be able to ssh passwordless to the BMC for the ``rcons`` function to work.
|
||||
|
||||
Copy the ``/root/.ssh/id_rsa.pub`` public key to the BMC's ``~/.ssh/authorized_keys`` file.
|
||||
@@ -0,0 +1,15 @@
|
||||
``rpower`` - Remote Power Control
|
||||
=================================
|
||||
|
||||
See :doc:`rpower manpage </guides/admin-guides/references/man1/rpower.1>` for more information.
|
||||
|
||||
Use the ``rpower`` command to remotely power on and off a single server or a range of servers. ::
|
||||
|
||||
rpower <noderange> on
|
||||
rpower <noderange> off
|
||||
|
||||
Other actions include:
|
||||
|
||||
* To get the current power state of a server: ``rpower <noderange> state``
|
||||
* To boot/reboot a server: ``rpower <noderange> boot``
|
||||
* To hardware reset a server: ``rpower <noderange> reset``
|
||||
@@ -0,0 +1,8 @@
|
||||
Hardware Management
|
||||
===================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
basic/index.rst
|
||||
advanced/index.rst
|
||||
@@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **clonevm**\ \ *noderange*\ [ \ **-t**\ \ *mastertobemade*\ | \ **-b**\ \ *master to base vms upon*\ ] \ **-d|-**\ **-detached -f|-**\ **-force**\
|
||||
\ **clonevm**\ \ *noderange*\ [ \ **-t**\ \ *master_to_be_made*\ | \ **-b**\ \ *master_to_base_vms_upon*\ ] [ \ **-d|-**\ **-detached**\ ] [\ **-f|-**\ **-force**\ ]
|
||||
|
||||
|
||||
***********
|
||||
@@ -31,15 +31,15 @@ Command to promote a VM's current configuration and storage to a master as well
|
||||
performing the converse operation of creating VMs based on a master.
|
||||
|
||||
By default, attempting to create a master from a running VM will produce an error.
|
||||
The force argument will request that a master be made of the VM anyway.
|
||||
The \ **-**\ **-force**\ argument will request that a master be made of the VM anyway.
|
||||
|
||||
Also, by default a VM that is used to create a master will be rebased as a thin
|
||||
clone of that master. If the force argument is used to create a master of a powered
|
||||
on vm, this will not be done. Additionally, the detached option can be used to
|
||||
clone of that master. If the \ **-**\ **-force**\ argument is used to create a master of a powered
|
||||
on vm, this will not be done. Additionally, the \ **-**\ **-detached**\ option can be used to
|
||||
explicitly request that a clone not be tethered to a master image, allowing the
|
||||
clones to not be tied to the health of a master, at the cost of additional storage.
|
||||
|
||||
When promoting a VM's current state to master, all rleated virtual disks will be
|
||||
When promoting a VM's current state to master, all related virtual disks will be
|
||||
copied and merged with any prerequisite images. A master will not be tethered to
|
||||
other masters.
|
||||
|
||||
@@ -49,19 +49,48 @@ OPTIONS
|
||||
*******
|
||||
|
||||
|
||||
\ **-h|-**\ **-help**\ Display usage message.
|
||||
|
||||
\ **-b**\ The master to base the clones upon
|
||||
\ **-h|-**\ **-help**\
|
||||
|
||||
Display usage message.
|
||||
|
||||
|
||||
\ **-t**\ The target master to copy a single VM's state to
|
||||
|
||||
\ **-d**\ Explicitly request that the noderange be untethered from any masters.
|
||||
\ **-b**\ \ *master_to_base_vms_upon*\
|
||||
|
||||
The master to base the clones upon
|
||||
|
||||
|
||||
\ **-f**\ Force cloning of a powered on VM. Implies -d if the VM is on.
|
||||
|
||||
\ **-v|-**\ **-version**\ Command Version.
|
||||
\ **-t**\ \ *master_to_be_made*\
|
||||
|
||||
The target master to copy a single VM's state to
|
||||
|
||||
|
||||
|
||||
\ **-d|-**\ **-detached**\
|
||||
|
||||
Explicitly request that the noderange be untethered from any masters.
|
||||
|
||||
|
||||
|
||||
\ **-f|-**\ **-force**\
|
||||
|
||||
Force cloning of a powered on VM. Implies \ **-d**\ if the VM is on.
|
||||
|
||||
|
||||
|
||||
\ **-v|-**\ **-version**\
|
||||
|
||||
Command Version.
|
||||
|
||||
|
||||
|
||||
\ **-V|-**\ **-verbose**\
|
||||
|
||||
Verbose output.
|
||||
|
||||
|
||||
\ **-V|-**\ **-verbose**\ Verbose output.
|
||||
|
||||
|
||||
************
|
||||
@@ -80,7 +109,7 @@ EXAMPLES
|
||||
|
||||
|
||||
|
||||
1. Creating a master named appserver from a node called vm1:
|
||||
1. Creating a master named \ *appserver*\ from a node called \ *vm1*\ :
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
@@ -90,7 +119,7 @@ EXAMPLES
|
||||
|
||||
|
||||
|
||||
2. Cleating 30 VMs from a master named appserver:
|
||||
2. Cleating 30 VMs from a master named \ *appserver*\ :
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
@@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **imgcapture**\ \ *node*\ \ **-t | -**\ **-type**\ {\ **diskless | sysclone**\ } \ **-o | -**\ **-osimage**\ \ *osimage*\ [\ **-V | -**\ **-verbose**\ ]
|
||||
\ **imgcapture**\ \ *node*\ \ **-t | -**\ **-type**\ {\ **diskless | sysclone**\ } \ **-o | -**\ **-osimage**\ \ *osimage*\ [\ **-i**\ \ *nodebootif*\ ] [\ **-n**\ \ *nodenetdrivers*\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
\ **imgcapture**\ [\ **-h**\ | \ **-**\ **-help**\ ] | [\ **-v**\ | \ **-**\ **-version**\ ]
|
||||
|
||||
@@ -31,9 +31,9 @@ DESCRIPTION
|
||||
|
||||
The \ **imgcapture**\ command will capture an image from one running diskful Linux node and create a diskless or diskful image for later use.
|
||||
|
||||
The \ **node**\ should be one diskful Linux node, managed by the xCAT MN, and the remote shell between MN and the \ **node**\ should have been configured. AIX is not supported.
|
||||
The \ **node**\ should be one diskful Linux node, managed by the xCAT MN, and the remote shell between MN and the \ **node**\ should have been configured. AIX is not supported. VMs are not supported.
|
||||
|
||||
The \ **imgcapture**\ command supports two image types: \ **diskless**\ and \ **sysclone**\ . For the \ **diskless**\ type, it will capture an image from one running diskful Linux node, prepares the rootimg directory, kernel and initial rmadisks for the \ **liteimg**\ /\ **packimage**\ command to generate the statelite/stateless rootimg. For the \ **sysclone**\ type, it will capture an image from one running diskful Linux node, create an osimage which can be used to clone other diskful Linux nodes.
|
||||
The \ **imgcapture**\ command supports two image types: \ **diskless**\ and \ **sysclone**\ . For the \ **diskless**\ type, it will capture an image from one running diskful Linux node, prepares the rootimg directory, kernel and initial ramdisks for the \ **liteimg**\ /\ **packimage**\ command to generate the statelite/stateless rootimg. For the \ **sysclone**\ type, it will capture an image from one running diskful Linux node, create an osimage which can be used to clone other diskful Linux nodes.
|
||||
|
||||
The \ **diskless**\ type:
|
||||
|
||||
@@ -80,15 +80,13 @@ OPTIONS
|
||||
|
||||
The network interface the diskless node will boot over (e.g. eth0), which is used by the \ **genimage**\ command to generate initial ramdisks.
|
||||
|
||||
This is optional.
|
||||
|
||||
|
||||
|
||||
\ **-n**\ \ *nodenetdrivers*\
|
||||
|
||||
The driver modules needed for the network interface, which is used by the \ **genimage**\ command to generate initial ramdisks.
|
||||
|
||||
This is optional. By default, the \ **genimage**\ command can provide drivers for the following network interfaces:
|
||||
By default, the \ **genimage**\ command can provide drivers for the following network interfaces:
|
||||
|
||||
For x86 or x86_64 platform:
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
The imgexport command will export an image that is being used by xCAT. To export images, you must have the images defined in the \ *osimage*\ table. All the columns in the \ *osimage*\ and \ *linuximage*\ tables will be exported. If kits are used in stateful or stateless images, \ *kit*\ , \ *kitcomponent*\ and \ *kitrepo*\ tables will be exported. In addition, the following files will also be exported.
|
||||
The \ **imgexport**\ command will export an image that is being used by xCAT. To export images, you must have the images defined in the \ *osimage*\ table. All the columns in the \ *osimage*\ and \ *linuximage*\ tables will be exported. If kits are used in stateful or stateless images, \ *kit*\ , \ *kitcomponent*\ and \ *kitrepo*\ tables will be exported. In addition, the following files will also be exported.
|
||||
|
||||
For stateful:
|
||||
x.pkglist
|
||||
@@ -61,7 +61,7 @@ For statelite:
|
||||
|
||||
where x is the name of the profile.
|
||||
|
||||
Any files specified by the -e flag will also be exported. If -p flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themsleves need to be manualy exported using -e flag.
|
||||
Any files specified by the \ **-e**\ flag will also be exported. If \ **-p**\ flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themsleves need to be manualy exported using \ **-e**\ flag.
|
||||
|
||||
For statelite, the litefile table settings for the image will also be exported. The litetree and statelite tables are not exported.
|
||||
|
||||
@@ -71,17 +71,42 @@ OPTIONS
|
||||
*******
|
||||
|
||||
|
||||
\ **-e|-**\ **-extra**\ \ *srcfile:destdir*\ Pack up extra files. If \ *destdir*\ is omitted, the destination directory will be the same as the source directory.
|
||||
|
||||
\ **-h|-**\ **-help**\ Display usage message.
|
||||
\ **-e|-**\ **-extra**\ \ *srcfile:destdir*\
|
||||
|
||||
Pack up extra files. If \ *destdir*\ is omitted, the destination directory will be the same as the source directory.
|
||||
|
||||
|
||||
\ **-p|-**\ **-postscripts**\ \ *node_name*\ Get the names of the postscripts and postbootscripts for the given node and pack them into the image.
|
||||
|
||||
\ **-v|-**\ **-verbose**\ Verbose output.
|
||||
\ **-h|-**\ **-help**\
|
||||
|
||||
Display usage message.
|
||||
|
||||
|
||||
\ *image_name*\ The name of the image. Use \ *lsdef -t*\ osimage to find out all the image names.
|
||||
|
||||
\ *destination*\ The output bundle file name.
|
||||
\ **-p|-**\ **-postscripts**\ \ *node_name*\
|
||||
|
||||
Get the names of the postscripts and postbootscripts for the given node and pack them into the image.
|
||||
|
||||
|
||||
|
||||
\ **-v|-**\ **-verbose**\
|
||||
|
||||
Verbose output.
|
||||
|
||||
|
||||
|
||||
\ *image_name*\
|
||||
|
||||
The name of the image. Use \ **lsdef -t osimage**\ to find out all the image names.
|
||||
|
||||
|
||||
|
||||
\ *destination*\
|
||||
|
||||
The output bundle file name.
|
||||
|
||||
|
||||
|
||||
|
||||
************
|
||||
|
||||
@@ -29,7 +29,7 @@ DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
The imgimport command will import an image that has been exported by \ *imgexport*\ from xCAT. This is the easiest way to transfer/backup/, change or share images created by xCAT whether they be stateless or stateful. The bundle file will be unpacked in the current working directory. The xCAT configuration such as \ *osimage*\ and \ *linuximage*\ tables will then be updated.
|
||||
The \ **imgimport**\ command will import an image that has been exported by \ **imgexport**\ from xCAT. This is the easiest way to transfer, backup, change or share images created by xCAT whether they be stateless or stateful. The bundle file will be unpacked in the current working directory. The xCAT configuration such as \ *osimage*\ and \ *linuximage*\ tables will then be updated.
|
||||
|
||||
For stateful, the following files will be copied to the appropriate directories.
|
||||
x.pkglist
|
||||
@@ -61,15 +61,15 @@ For statelite, the following files will be copied to the appropriate directories
|
||||
|
||||
where x is the profile name.
|
||||
|
||||
Any extra files, included by --extra flag in the imgexport command, will also be copied to the appropriate directories.
|
||||
Any extra files, included by \ **-**\ **-extra**\ flag in the \ **imgexport**\ command, will also be copied to the appropriate directories.
|
||||
|
||||
For statelite, the litefile table will be updated for the image. The litetree and statelite tables are not imported.
|
||||
|
||||
If -p flag is specified, the \ *postscripts*\ table will be updated with the postscripts and the postbootscripts names from the image for the nodes given by this flag.
|
||||
If \ **-p**\ flag is specified, the \ *postscripts*\ table will be updated with the postscripts and the postbootscripts names from the image for the nodes given by this flag.
|
||||
|
||||
If -f flag is not specified, all the files will be copied to the same directories as the source. If it is specified, the old profile name x will be changed to the new and the files will be copied to the appropriate directores for the new profiles. For example, \ */opt/xcat/share/xcat/netboot/sles/x.pkglist*\ will be copied to \ */install/custom/netboot/sles/compute_new.pkglist*\ and \ */install/netboot/sles11/ppc64/x/kernel*\ will be copied to \ */install/netboot/sles11/ppc64/compute_new/kernel*\ . This flag is commonly used when you want to copy the image on the same xCAT mn so you can make modification on the new one.
|
||||
If \ **-f**\ flag is not specified, all the files will be copied to the same directories as the source. If it is specified, the old profile name x will be changed to the new and the files will be copied to the appropriate directores for the new profiles. For example, \ */opt/xcat/share/xcat/netboot/sles/x.pkglist*\ will be copied to \ */install/custom/netboot/sles/compute_new.pkglist*\ and \ */install/netboot/sles11/ppc64/x/kernel*\ will be copied to \ */install/netboot/sles11/ppc64/compute_new/kernel*\ . This flag is commonly used when you want to copy the image on the same xCAT mn so you can make modification on the new one.
|
||||
|
||||
After this command, you can run the \ *nodeset*\ command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node depolyment.
|
||||
After this command, you can run the \ **nodeset**\ command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node depolyment.
|
||||
|
||||
For stateful:
|
||||
nodeset
|
||||
@@ -90,13 +90,30 @@ OPTIONS
|
||||
*******
|
||||
|
||||
|
||||
\ **-f|-**\ **-profile**\ \ *new_prof*\ Import the image with a new profile name.
|
||||
|
||||
\ **-h|-**\ **-help**\ Display usage message.
|
||||
\ **-f|-**\ **-profile**\ \ *new_profile*\
|
||||
|
||||
Import the image with a new profile name.
|
||||
|
||||
|
||||
\ **-p|-**\ **-postscripts**\ \ *nodelist*\ Import the postscripts. The postscripts contained in the image will be set in the postscripts table for \ *nodelist*\ .
|
||||
|
||||
\ **-v|-**\ **-verbose**\ Verbose output.
|
||||
\ **-h|-**\ **-help**\
|
||||
|
||||
Display usage message.
|
||||
|
||||
|
||||
|
||||
\ **-p|-**\ **-postscripts**\ \ *nodelist*\
|
||||
|
||||
Import the postscripts. The postscripts contained in the image will be set in the postscripts table for \ *nodelist*\ .
|
||||
|
||||
|
||||
|
||||
\ **-v|-**\ **-verbose**\
|
||||
|
||||
Verbose output.
|
||||
|
||||
|
||||
|
||||
|
||||
************
|
||||
|
||||
@@ -56,15 +56,15 @@ DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
The lsvm command lists all partition profiles defined for the partitions specified in noderange. If noderange is a CEC, all the partitions associated with that CEC are displayed.
|
||||
The \ **lsvm**\ command lists all partition profiles defined for the partitions specified in \ *noderange*\ . If \ *noderange*\ is a CEC, all the partitions associated with that CEC are displayed.
|
||||
|
||||
For PPC (using Direct FSP Management):
|
||||
======================================
|
||||
|
||||
|
||||
For Power 775(use option \ *--p775*\ to specify), lsvm lists all partition I/O slots information for the partitions specified in noderange. If noderange is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information.
|
||||
For Power 775 (use option \ **-**\ **-p775**\ to specify), \ **lsvm**\ lists all partition I/O slots information for the partitions specified in \ *noderange*\ . If \ *noderange*\ is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information.
|
||||
|
||||
For DFM-managed (short for Direct FSP Management mode) normal power machine, lsvm lists the processor, memory, physical I/O slots, hugepage and BSR info for the specified partitions or CEC.
|
||||
For DFM-managed (short for Direct FSP Management mode) normal power machine, \ **lsvm**\ lists the processor, memory, physical I/O slots, hugepage and BSR info for the specified partitions or CEC.
|
||||
|
||||
The pump mode value has the valid options:
|
||||
1 - Node Pump Mode
|
||||
@@ -83,9 +83,9 @@ For KVM and VMware
|
||||
==================
|
||||
|
||||
|
||||
The virtual machines that defined in the hypervisor \ *noderange*\ will be displayed. \ *noderange*\ can only be hypervisor.
|
||||
If \ *noderange*\ is a hypervisor, virtual machines defined on that hypervisor will be displayed. If \ *noderange*\ is a VM, details for that VM will be displayed.
|
||||
|
||||
Note: Only the virtual machine which is in power on state can be listed by lsvm command.
|
||||
Note: Only the virtual machine which is in power on state can be listed by \ **lsvm**\ command.
|
||||
|
||||
|
||||
For zVM:
|
||||
@@ -107,7 +107,7 @@ Display usage message.
|
||||
|
||||
\ **-v**\
|
||||
|
||||
Command Version.
|
||||
Command version.
|
||||
|
||||
\ **-V**\
|
||||
|
||||
@@ -157,7 +157,7 @@ Output is similar to:
|
||||
lpar3: name=lpar3,lpar_name=lpar3,lpar_id=4,lpar_env=aixlinux,all_resources=0,min_mem=512, desired_mem=2048, max_mem=3072,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,proc_mode=shared, min_proc_units=0.5,desired_proc_units=0.5,max_proc_units=0.5,min_procs=1,desired_procs=1,max_procs=1, sharing_mode=uncap,uncap_weight=128,shared_proc_pool_id=0,shared_proc_pool_name=DefaultPool,io_slots=none, lpar_io_pool_ids=none,max_virtual_slots=10, "virtual_serial_adapters=1/server/1/any//any/1,0/server/1/any//any/1", virtual_scsi_adapters=2/client/1/p6vios/4/1,virtual_eth_adapters=3/0/1//0/1,hca_adapters=none,boot_mode=norm,conn_monitoring=0,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0, bsr_arrays=0,lhea_logical_ports=none,lhea_capabilities=none,lpar_proc_compat_mode=default,electronic_err_reporting=null
|
||||
|
||||
|
||||
2.To list all IVM-managed partitions associated with CEC cec01, enter:
|
||||
2. To list all IVM-managed partitions associated with CEC cec01, enter:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
@@ -252,7 +252,7 @@ Output is similar to:
|
||||
OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
|
||||
|
||||
|
||||
6.To list the lparname of lpars, enter:
|
||||
6. To list the lparname of lpars, enter:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
@@ -360,9 +360,9 @@ Output is similar to:
|
||||
Available BSR array: 256
|
||||
|
||||
|
||||
Note: The lines list in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class discription)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicate a physical I/O resource in normal power machine.
|
||||
Note: The lines listed in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class discription)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicates a physical I/O resource in a normal power machine.
|
||||
|
||||
9.For DFM-managed partition on normal power machine, list out the detailed information:
|
||||
9. For DFM-managed partition on normal power machine, list out the detailed information:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
@@ -43,7 +43,7 @@ OPTIONS
|
||||
|
||||
\ **-a|-**\ **-all**\
|
||||
|
||||
Setup NTP servers for both management node and the service node.
|
||||
Setup NTP servers for both management node and the service node. If management node has SLES installed and used as \ *ntpservers*\ , it is recommanded to use the \ **setupntp**\ postscript to set up NTP server for service nodes.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,13 +28,20 @@ BMC/MPA specific:
|
||||
\ **rinv**\ \ *noderange*\ {\ **pci | model | serial | asset | vpd | mprom | deviceid | guid | firm | diag | dimm | bios | mparom | mac | all**\ }
|
||||
|
||||
|
||||
OpenPOWER server specific:
|
||||
==========================
|
||||
OpenPOWER (using ipmi) server specific:
|
||||
=======================================
|
||||
|
||||
|
||||
\ **rinv**\ \ *noderange*\ {\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | all**\ }
|
||||
|
||||
|
||||
OpenPOWER (using openbmc) server specific:
|
||||
==========================================
|
||||
|
||||
|
||||
\ **rinv**\ \ *noderange*\ {\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | cpu | dimm | all**\ }
|
||||
|
||||
|
||||
PPC (with HMC) specific:
|
||||
========================
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ SYNOPSIS
|
||||
|
||||
\ **rpower**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ]
|
||||
|
||||
BMC (using IPMI) specific:
|
||||
==========================
|
||||
BMC (using IPMI):
|
||||
=================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **on | off | softoff | reset | boot | stat | state | status | wake | suspend**\ [\ **-w**\ \ *timeout*\ ] [\ **-o**\ ] [\ **-r**\ ]]
|
||||
@@ -32,8 +32,17 @@ BMC (using IPMI) specific:
|
||||
\ **rpower**\ \ *noderange*\ [\ **pduon | pduoff | pdustat | pdureset**\ ]
|
||||
|
||||
|
||||
OpenBMC specific:
|
||||
=================
|
||||
OpenPower BMC (using IPMI):
|
||||
===========================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **on | off | reset | boot | stat | state | status**\ ]
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **pduon | pduoff | pdustat | pdureset**\ ]
|
||||
|
||||
|
||||
OpenPower OpenBMC:
|
||||
==================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **off | on | reset | boot | stat | state | status**\ ]
|
||||
@@ -97,6 +106,13 @@ Blade specific:
|
||||
\ **rpower**\ \ *noderange*\ [\ **cycle | softoff**\ ]
|
||||
|
||||
|
||||
Lenovo High-Density Server specific:
|
||||
====================================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **on | off | reset | boot | reseat**\ ]
|
||||
|
||||
|
||||
zVM specific:
|
||||
=============
|
||||
|
||||
@@ -270,6 +286,12 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
\ **reseat**\
|
||||
|
||||
For Lenovo high-density servers, simulates unplugging and replugging the node into the chassis.
|
||||
|
||||
|
||||
|
||||
\ **of**\
|
||||
|
||||
Boot the node to open firmware console mode.
|
||||
|
||||
@@ -38,11 +38,18 @@ BMC specific:
|
||||
=============
|
||||
|
||||
|
||||
\ **rspconfig**\ \ *noderange*\ {\ **vlan | ip | netmask | gateway | backupgateway | garp**\ }
|
||||
\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | backupgateway | garp | vlan**\ }
|
||||
|
||||
\ **rspconfig**\ \ *noderange*\ \ **garp**\ =\ *time*\
|
||||
|
||||
|
||||
OpenBMC specific:
|
||||
=================
|
||||
|
||||
|
||||
\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | vlan**\ }
|
||||
|
||||
|
||||
MPA specific:
|
||||
=============
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ OpenPOWER server specific:
|
||||
==========================
|
||||
|
||||
|
||||
\ **rvitals**\ \ *noderange*\ {\ **temp | voltage | wattage | fanspeed | power | leds | all**\ }
|
||||
\ **rvitals**\ \ *noderange*\ [\ **temp | voltage | wattage | fanspeed | power | leds | all**\ ]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
|
||||
##############
|
||||
xcatperftest.1
|
||||
##############
|
||||
|
||||
.. highlight:: perl
|
||||
|
||||
|
||||
****
|
||||
NAME
|
||||
****
|
||||
|
||||
|
||||
\ **xcatperftest**\ - Run xCAT command performance baseline testing on fake nodes.
|
||||
|
||||
|
||||
********
|
||||
SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **xcatperftest**\ [\ **-?|-h**\ ]
|
||||
|
||||
[\ **PERF_DRYRUN**\ =y] [\ **PERF_NOCREATE**\ =y] \ **xcatperftest**\ <total> [\ *command-list-file*\ ]
|
||||
|
||||
|
||||
***********
|
||||
DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
The xcatperftest command runs commandes defined in a command list file and get their execution response time baseline for performance purpose.
|
||||
The xcatperftest command is part of the xCAT package xCAT-test, and you can run it standalone or leverage it to build up your automation test cases.
|
||||
|
||||
Any commands could be defined in the command list file, however, it is recommended that the one-time initial configuration are well prepared prior to run xcatperftest command.
|
||||
For example, the network object, osdistor and osimage image objects.
|
||||
|
||||
Follow the below steps to run xcatperftest command:
|
||||
|
||||
1, Install xCAT-test on a xCAT management nodes.
|
||||
|
||||
2, Prepare a command list in which the commands are what you want to messure.
|
||||
|
||||
3, Prepare the initial configuration based on the command list to make sure all commands could be executed in techinal.
|
||||
|
||||
4, Run xcatperftest with the total fake nodes number and the above command list file.
|
||||
|
||||
Node: It is suggested to run the command in background as it normally takes long time to finish all the performanc testing with large amount of fake nodes.
|
||||
|
||||
|
||||
*******
|
||||
OPTIONS
|
||||
*******
|
||||
|
||||
|
||||
|
||||
\ **-?|-h**\
|
||||
|
||||
Display usage message.
|
||||
|
||||
|
||||
|
||||
<command-list-file>
|
||||
|
||||
Specifies the command list file with full-path. xCAT supports an example command file: /opt/xcat/share/xcat/tools/autotest/perfcmds.lst
|
||||
|
||||
|
||||
|
||||
<total>
|
||||
|
||||
Total number of fake nodes will be defined during the testing.
|
||||
|
||||
|
||||
|
||||
|
||||
************
|
||||
RETURN VALUE
|
||||
************
|
||||
|
||||
|
||||
0 The command completed successfully.
|
||||
|
||||
1 An error has occurred.
|
||||
|
||||
|
||||
*****************
|
||||
COMMAND LIST FILE
|
||||
*****************
|
||||
|
||||
|
||||
The command list file is in flat text format, the testing framework will parse the file line by line, here is an example of the commannd list file:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
#SERIES# 1,50,100,250,500,1000,2500,5000
|
||||
mkdef -z -f < #STANZ#
|
||||
lsdef #NODES#
|
||||
makehosts #NODES#
|
||||
makedns -n #NODES#
|
||||
makedhcp #NODES#
|
||||
makeknownhosts #NODES#
|
||||
nodech #NODES# groups,=group1
|
||||
nodels #NODES# noderes
|
||||
nodeset #NODES# osimage=rhels7.3-GA-ppc64le-install-compute
|
||||
chdef -t node -o #NODES# postscripts="fake" profile="install" netboot="grub2"
|
||||
rmdef -t node #PERFGRP#
|
||||
mkdef -z < #STANZ#
|
||||
noderm #PERFGRP#
|
||||
|
||||
|
||||
\ **Note**\ : Each line defines one command, and the commands dependency should be handled by the line order.
|
||||
If you define a node range series line (started with #SERIES#) in this file, xcatperftest will run the command for each node range defined in series line.
|
||||
|
||||
\ **#SERIES#**\ To define a node range series, and the series should be an comma split incremental number sequence.
|
||||
|
||||
\ **#STANZ#**\ It will be replaced with real stanz file path when this command line runs.
|
||||
|
||||
\ **#NODES#**\ It will be replaced with real node range defined in #SERIES# line when this command line runs. If no series line, the node group will be used.
|
||||
|
||||
\ **#PERFGRP#**\ It will be replaced with node group when this command line runs.
|
||||
|
||||
|
||||
********************
|
||||
ENVIRONMENT VARIABLE
|
||||
********************
|
||||
|
||||
|
||||
The xcatperftest command supports be customized by some environment variables.
|
||||
|
||||
\ **FAKE_NODE_PREFIX**\
|
||||
|
||||
Optional, the prefix of the fake compute node name. By default, the value is 'fake'
|
||||
|
||||
\ **FAKE_NODE_GROUP**\
|
||||
|
||||
# Optional, the group name of all the fake compute nodes. By default, the value is 'perftest'
|
||||
|
||||
\ **FAKE_NETWORK_PRO**\
|
||||
|
||||
Mandatory, the Provision network for all the fake compute nodes. By default, the value is '192.168'.
|
||||
It must be a string like 'A.B', and be matched with \`tabdump networks\`
|
||||
|
||||
\ **FAKE_NETWORK_BMC**\
|
||||
|
||||
Mandatory, the BMC network for all the fake compute nodes. By default, the value is '192.168'. Note: It could not be the same subnet as 'FAKE_NETWORK_PRO'
|
||||
It must be a string like 'A.B' and no need to be defined in 'networks' table.
|
||||
|
||||
\ **PERF_NODETEMPL**\
|
||||
|
||||
Optional, The node template name used for generating fake nodes. By default, it will be auto-detected according to the current arch.
|
||||
|
||||
\ **PERF_DRYRUN**\
|
||||
|
||||
Optional, Indicate no real commands will be executed if the environment variable is set.
|
||||
|
||||
\ **PERF_NOCREATE**\
|
||||
|
||||
Optional, Indicate no new fake nodes will be created if the environment variable is set.
|
||||
|
||||
|
||||
********
|
||||
EXAMPLES
|
||||
********
|
||||
|
||||
|
||||
|
||||
1.
|
||||
|
||||
To run the performance testing for the commands defined in /tmp/cmd.lst on 5000 fake nodes:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
xcatperftest 5000 /tmp/cmd.lst
|
||||
|
||||
|
||||
|
||||
|
||||
2.
|
||||
|
||||
To generate an xCAT node object stanz file for 10000 nodes in subnet 10.100.0.0:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
FAKE_NETWORK_PRO=10.100 FAKE_NETWORK_BMC=10.200 xcatperftest 10000
|
||||
|
||||
|
||||
|
||||
|
||||
3.
|
||||
|
||||
To run the performance testing for the commands defined in /opt/xcat/share/xcat/tools/autotest/perfcmds.lst on 5000 existing fake nodes:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
PERF_NOCREATE=y xcatperftest 5000 /opt/xcat/share/xcat/tools/autotest/perfcmds.lst
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*****
|
||||
FILES
|
||||
*****
|
||||
|
||||
|
||||
/opt/xcat/bin/xcatperftest
|
||||
|
||||
/opt/xcat/share/xcat/tools/autotest/perfcmds.lst
|
||||
|
||||
@@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **openbmc Attributes:**\ \ *node*\ , \ *bmc*\ , \ *username*\ , \ *password*\ , \ *comments*\ , \ *disable*\
|
||||
\ **openbmc Attributes:**\ \ *node*\ , \ *bmc*\ , \ *consport*\ , \ *taggedvlan*\ , \ *username*\ , \ *password*\ , \ *comments*\ , \ *disable*\
|
||||
|
||||
|
||||
***********
|
||||
@@ -48,6 +48,18 @@ openbmc Attributes:
|
||||
|
||||
|
||||
|
||||
\ **consport**\
|
||||
|
||||
The console port for OpenBMC.
|
||||
|
||||
|
||||
|
||||
\ **taggedvlan**\
|
||||
|
||||
bmcsetup script will configure the network interface of the BMC to be tagged to the VLAN specified.
|
||||
|
||||
|
||||
|
||||
\ **username**\
|
||||
|
||||
The BMC userid.
|
||||
|
||||
@@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
|
||||
\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *consport*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
|
||||
|
||||
|
||||
***********
|
||||
@@ -133,7 +133,11 @@ group Attributes:
|
||||
|
||||
|
||||
|
||||
\ **bmcvlantag**\ (ipmi.taggedvlan)
|
||||
\ **bmcvlantag**\ (ipmi.taggedvlan, openbmc.taggedvlan)
|
||||
|
||||
bmcsetup script will configure the network interface of the BMC to be tagged to the VLAN specified.
|
||||
|
||||
or
|
||||
|
||||
bmcsetup script will configure the network interface of the BMC to be tagged to the VLAN specified.
|
||||
|
||||
@@ -193,6 +197,12 @@ group Attributes:
|
||||
|
||||
|
||||
|
||||
\ **consport**\ (openbmc.consport)
|
||||
|
||||
The console port for OpenBMC.
|
||||
|
||||
|
||||
|
||||
\ **cpucount**\ (hwinv.cpucount)
|
||||
|
||||
The number of cpus for the node.
|
||||
|
||||
@@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
|
||||
\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *consport*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
|
||||
|
||||
|
||||
***********
|
||||
@@ -145,7 +145,11 @@ node Attributes:
|
||||
|
||||
|
||||
|
||||
\ **bmcvlantag**\ (ipmi.taggedvlan)
|
||||
\ **bmcvlantag**\ (ipmi.taggedvlan, openbmc.taggedvlan)
|
||||
|
||||
bmcsetup script will configure the network interface of the BMC to be tagged to the VLAN specified.
|
||||
|
||||
or
|
||||
|
||||
bmcsetup script will configure the network interface of the BMC to be tagged to the VLAN specified.
|
||||
|
||||
@@ -205,6 +209,12 @@ node Attributes:
|
||||
|
||||
|
||||
|
||||
\ **consport**\ (openbmc.consport)
|
||||
|
||||
The console port for OpenBMC.
|
||||
|
||||
|
||||
|
||||
\ **cpucount**\ (hwinv.cpucount)
|
||||
|
||||
The number of cpus for the node.
|
||||
|
||||
@@ -265,7 +265,11 @@ sub submit_request {
|
||||
%sslargs,
|
||||
);
|
||||
} else {
|
||||
print "warning: the client certificates under $homedir/.xcat/ are not setup correctly, please run '/opt/xcat/share/xcat/scripts/setup-local-client.sh"." $ENV{'USER'}' as 'root' to generate the client certificates; otherwise, the SSL connection between xcat client and xcatd will be setup without certificate verification and open to Man-In-The-Middle attacks.\n";
|
||||
#Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated!
|
||||
#need to specify SSL_verify_mode => SSL_VERIFY_NONE explicitly
|
||||
$client = IO::Socket::SSL->start_SSL($pclient,
|
||||
SSL_verify_mode => SSL_VERIFY_NONE,
|
||||
Timeout => 0,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -488,7 +488,9 @@ sub getobjdefs
|
||||
foreach my $lookup_attr (keys %{ $tabentry{'lookup_attrs'} }) {
|
||||
# Check whether the attribute is already in %tabhash
|
||||
# The %tabhash is for performance considerations
|
||||
if (($lookup_attr eq 'node') && ($objtype eq 'node')) {
|
||||
my $tabspec = $xCAT::Schema::tabspec{$lookup_table};
|
||||
my $nodecol = $tabspec->{'nodecol'} if defined($tabspec->{'nodecol'});
|
||||
if (($lookup_attr eq 'node' && $objtype eq 'node') || (defined($nodecol) && $objtype eq 'node' && $lookup_table ne 'ppcdirect')) {
|
||||
if (defined($tabhash{$lookup_table}{$objname}{$tabattr})) {
|
||||
if ($verbose == 1) {
|
||||
$objhash{$objname}{$attr} = "$tabhash{$lookup_table}{$objname}{$tabattr}\t(Table:$lookup_table - Key:$lookup_attr - Column:$tabattr)";
|
||||
@@ -2501,6 +2503,7 @@ sub judge_node
|
||||
nicsattr value, like niccsips=eth0!1.1.1.1|2.1.1.1,eth1!3.1.1.1|4.1.1.1
|
||||
node name, like frame10node10
|
||||
nicnames: only return the value for specific nics, like "eth0,eth1"
|
||||
is_group: bool value indicates whether the type of object is group
|
||||
Returns:
|
||||
expanded format, like:
|
||||
nicsips.eth0=1.1.1.1|2.1.1.1
|
||||
@@ -2522,8 +2525,7 @@ sub expandnicsattr()
|
||||
if (($nicstr) && ($nicstr =~ /xCAT::/)) {
|
||||
$nicstr = shift;
|
||||
}
|
||||
my $node = shift;
|
||||
my $nicnames = shift;
|
||||
my ($node, $nicnames, $is_group) = @_;
|
||||
my $ret;
|
||||
|
||||
$nicstr =~ /^(.*?)=(.*?)$/;
|
||||
@@ -2572,8 +2574,10 @@ sub expandnicsattr()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$nicv[1]= xCAT::Table::transRegexAttrs($node, $nicv[1]);
|
||||
# print group attributes in original format
|
||||
if (!$is_group) {
|
||||
$nicv[1]= xCAT::Table::transRegexAttrs($node, $nicv[1]);
|
||||
}
|
||||
# ignore the line that does not have nicname or value
|
||||
if ($nicv[0] && $nicv[1]) {
|
||||
$ret .= " $nicattr.$nicv[0]=$nicv[1]\n";
|
||||
|
||||
@@ -444,12 +444,14 @@ passed as argument rather than by table value',
|
||||
},
|
||||
},
|
||||
openbmc => {
|
||||
cols => [qw(node bmc username password comments disable)],
|
||||
cols => [qw(node bmc consport taggedvlan username password comments disable)],
|
||||
keys => [qw(node)],
|
||||
table_desc => 'Setting for nodes that are controlled by an on-board OpenBmc.',
|
||||
descriptions => {
|
||||
node => 'The node name or group name.',
|
||||
bmc => 'The hostname of the BMC adapter.',
|
||||
consport => 'The console port for OpenBMC.',
|
||||
taggedvlan => 'bmcsetup script will configure the network interface of the BMC to be tagged to the VLAN specified.',
|
||||
username => 'The BMC userid.',
|
||||
password => 'The BMC password.',
|
||||
comments => 'Any user-written notes.',
|
||||
@@ -2303,6 +2305,11 @@ my @nodeattrs = (
|
||||
tabentry => 'mp.nodetype',
|
||||
access_tabentry => 'mp.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'hwtype',
|
||||
only_if => 'mgt=openbmc',
|
||||
tabentry => 'mp.nodetype',
|
||||
access_tabentry => 'mp.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'supernode',
|
||||
tabentry => 'ppc.supernode',
|
||||
access_tabentry => 'ppc.node=attr:node',
|
||||
@@ -2481,6 +2488,16 @@ my @nodeattrs = (
|
||||
tabentry => 'openbmc.password',
|
||||
access_tabentry => 'openbmc.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'consport',
|
||||
only_if => 'mgt=openbmc',
|
||||
tabentry => 'openbmc.consport',
|
||||
access_tabentry => 'openbmc.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'bmcvlantag',
|
||||
only_if => 'mgt=openbmc',
|
||||
tabentry => 'openbmc.taggedvlan',
|
||||
access_tabentry => 'openbmc.node=attr:node',
|
||||
},
|
||||
|
||||
######################
|
||||
# nodepos table #
|
||||
|
||||
+18
-8
@@ -26,7 +26,13 @@ my %usage = (
|
||||
"rpower" =>
|
||||
"Usage: rpower <noderange> [--nodeps] [on|onstandby|off|suspend|reset|stat|state|boot] [-V|--verbose] [-m table.colum==expectedstatus][-m table.colum==expectedstatus...] [-r <retrycount>] [-t <timeout>]
|
||||
rpower [-h|--help|-v|--version]
|
||||
OpenBMC specific:
|
||||
BMC (using IPMI):
|
||||
rpower noderange [on|off|softoff|reset|boot|stat|state|status|wake|suspend [-w timeout] [-o] [-r]]
|
||||
rpower noderange [pduon|pduoff|pdustat]
|
||||
OpenPower BMC:
|
||||
rpower noderange [on|off|reset|boot|stat|state|status]
|
||||
rpower noderange [pduon|pduoff|pdustat]
|
||||
OpenPower OpenBMC:
|
||||
rpower noderange [on|off|reset|boot|stat|state|status]
|
||||
KVM Virtualization specific:
|
||||
rpower <noderange> [boot] [ -c <path to iso> ]
|
||||
@@ -76,7 +82,7 @@ my %usage = (
|
||||
BMC specific:
|
||||
rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|all}
|
||||
OpenPOWER server specific:
|
||||
rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|all}
|
||||
rvitals noderange [temp|voltage|wattage|fanspeed|power|leds|all]
|
||||
MIC specific:
|
||||
rvitals noderange {thermal|all}",
|
||||
"reventlog" =>
|
||||
@@ -89,8 +95,10 @@ my %usage = (
|
||||
rinv [-h|--help|-v|--version]
|
||||
BMC specific:
|
||||
rinv <noderange> [mprom|deviceid|uuid|guid|vpd|dimm|all]
|
||||
OpenPOWER server specific:
|
||||
OpenPOWER (using ipmi) server specific:
|
||||
rinv <noderange> [model|serial|deviceid|uuid|guid|vpd|mprom|firm|all]
|
||||
OpenPOWER (using openbmc) server specific:
|
||||
rinv <noderange> [model|serial|deviceid|uuid|guid|vpd|mprom|firm|cpu|dimm|all]
|
||||
MPA specific:
|
||||
rinv <noderange> [firm|bios|diag|mprom|sprom|mparom|mac|mtm]
|
||||
PPC specific(with HMC):
|
||||
@@ -132,9 +140,11 @@ my %usage = (
|
||||
rspconfig <noderange> [snmpdest|alert|community] [-V|--verbose]
|
||||
rspconfig <noderange> [snmpdest=<dest ip address>|alert=<on|off|en|dis|enable|disable>|community=<string>]
|
||||
BMC specific:
|
||||
rspconfig <noderange> [ip|netmask|gateway|backupgateway|garp]
|
||||
rspconfig <noderange> [ip|netmask|gateway|backupgateway|garp|vlan]
|
||||
rspconfig <noderange> [garp=<number of 1/2 second>]
|
||||
rspconfig <noderange> [userid=<userid> username=<username> password=<password>]
|
||||
OpenBMC specific:
|
||||
rspconfig <noderange> [ip|netmask|gateway|vlan]
|
||||
iDataplex specific:
|
||||
rspconfig <noderange> [thermprofile]
|
||||
rspconfig <noderange> [thermprofile=<two digit number from chassis>]
|
||||
@@ -324,14 +334,14 @@ my %usage = (
|
||||
"Usage:
|
||||
rflash [ -h|--help|-v|--version]
|
||||
PPC (with HMC) specific:
|
||||
rflash <noderange> -p <rpm_directory> [--activate concurrent | disruptive][-V|--verbose]
|
||||
rflash <noderange> [--commit | --recover] [-V|--verbose]
|
||||
rflash <noderange> -p <rpm_directory> [--activate {concurrent | disruptive}] [-V|--verbose]
|
||||
rflash <noderange> {--commit | --recover} [-V|--verbose]
|
||||
PPC (using Direct FSP Management) specific:
|
||||
rflash <noderange> -p <rpm_directory> --activate <disruptive|deferred> [-d <data_directory>]
|
||||
rflash <noderange> -p <rpm_directory> [--activate {disruptive|deferred}] [-d <data_directory>]
|
||||
rflash <noderange> [--commit | --recover] [-V|--verbose]
|
||||
rflash <noderange> [--bpa_acdl]
|
||||
PPC64LE (using BMC Management) specific:
|
||||
rflash <noderange> [-c | --check] <hpm_file>",
|
||||
rflash <noderange> [-c | --check] [--retry=<count>] [-V] <hpm_file>",
|
||||
"mkhwconn" =>
|
||||
"Usage:
|
||||
mkhwconn [-h|--help]
|
||||
|
||||
@@ -4,7 +4,7 @@ B<clonevm> - Create masters from virtual machines and virtual machines from mast
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<clonevm> I<noderange> [ B<-t> I<mastertobemade> | B<-b> I<master to base vms upon> ] B<-d|--detached -f|--force>
|
||||
B<clonevm> I<noderange> [ B<-t> I<master_to_be_made> | B<-b> I<master_to_base_vms_upon> ] [ B<-d|--detached>] [B<-f|--force>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -12,35 +12,51 @@ Command to promote a VM's current configuration and storage to a master as well
|
||||
performing the converse operation of creating VMs based on a master.
|
||||
|
||||
By default, attempting to create a master from a running VM will produce an error.
|
||||
The force argument will request that a master be made of the VM anyway.
|
||||
The B<--force> argument will request that a master be made of the VM anyway.
|
||||
|
||||
Also, by default a VM that is used to create a master will be rebased as a thin
|
||||
clone of that master. If the force argument is used to create a master of a powered
|
||||
on vm, this will not be done. Additionally, the detached option can be used to
|
||||
clone of that master. If the B<--force> argument is used to create a master of a powered
|
||||
on vm, this will not be done. Additionally, the B<--detached> option can be used to
|
||||
explicitly request that a clone not be tethered to a master image, allowing the
|
||||
clones to not be tied to the health of a master, at the cost of additional storage.
|
||||
|
||||
When promoting a VM's current state to master, all rleated virtual disks will be
|
||||
When promoting a VM's current state to master, all related virtual disks will be
|
||||
copied and merged with any prerequisite images. A master will not be tethered to
|
||||
other masters.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
B<-h|--help> Display usage message.
|
||||
=item B<-h|--help>
|
||||
|
||||
B<-b> The master to base the clones upon
|
||||
Display usage message.
|
||||
|
||||
B<-t> The target master to copy a single VM's state to
|
||||
=item B<-b> I<master_to_base_vms_upon>
|
||||
|
||||
B<-d> Explicitly request that the noderange be untethered from any masters.
|
||||
The master to base the clones upon
|
||||
|
||||
B<-f> Force cloning of a powered on VM. Implies -d if the VM is on.
|
||||
=item B<-t> I<master_to_be_made>
|
||||
|
||||
B<-v|--version> Command Version.
|
||||
The target master to copy a single VM's state to
|
||||
|
||||
B<-V|--verbose> Verbose output.
|
||||
=item B<-d|--detached>
|
||||
|
||||
Explicitly request that the noderange be untethered from any masters.
|
||||
|
||||
=item B<-f|--force>
|
||||
|
||||
Force cloning of a powered on VM. Implies B<-d> if the VM is on.
|
||||
|
||||
=item B<-v|--version>
|
||||
|
||||
Command Version.
|
||||
|
||||
=item B<-V|--verbose>
|
||||
|
||||
Verbose output.
|
||||
|
||||
=back
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
@@ -53,12 +69,12 @@ Any other value: An error has occurred.
|
||||
=over 3
|
||||
|
||||
=item 1.
|
||||
Creating a master named appserver from a node called vm1:
|
||||
Creating a master named I<appserver> from a node called I<vm1>:
|
||||
|
||||
clonevm vm1 -t appserver
|
||||
|
||||
=item 2.
|
||||
Cleating 30 VMs from a master named appserver:
|
||||
Cleating 30 VMs from a master named I<appserver>:
|
||||
|
||||
clonevm vm1-vm30 -b appserver
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ B<imgcapture> - Captures an image from a Linux diskful node and create a diskles
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<imgcapture> I<node> B<-t>|B<--type> {B<diskless>|B<sysclone>} B<-o>|B<--osimage> I<osimage> [B<-V>|B<--verbose>]
|
||||
B<imgcapture> I<node> B<-t>|B<--type> {B<diskless>|B<sysclone>} B<-o>|B<--osimage> I<osimage> [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-V>|B<--verbose>]
|
||||
|
||||
B<imgcapture> [B<-h> | B<--help>] | [B<-v> | B<--version>]
|
||||
|
||||
@@ -12,9 +12,9 @@ B<imgcapture> [B<-h> | B<--help>] | [B<-v> | B<--version>]
|
||||
|
||||
The B<imgcapture> command will capture an image from one running diskful Linux node and create a diskless or diskful image for later use.
|
||||
|
||||
The B<node> should be one diskful Linux node, managed by the xCAT MN, and the remote shell between MN and the B<node> should have been configured. AIX is not supported.
|
||||
The B<node> should be one diskful Linux node, managed by the xCAT MN, and the remote shell between MN and the B<node> should have been configured. AIX is not supported. VMs are not supported.
|
||||
|
||||
The B<imgcapture> command supports two image types: B<diskless> and B<sysclone>. For the B<diskless> type, it will capture an image from one running diskful Linux node, prepares the rootimg directory, kernel and initial rmadisks for the B<liteimg>/B<packimage> command to generate the statelite/stateless rootimg. For the B<sysclone> type, it will capture an image from one running diskful Linux node, create an osimage which can be used to clone other diskful Linux nodes.
|
||||
The B<imgcapture> command supports two image types: B<diskless> and B<sysclone>. For the B<diskless> type, it will capture an image from one running diskful Linux node, prepares the rootimg directory, kernel and initial ramdisks for the B<liteimg>/B<packimage> command to generate the statelite/stateless rootimg. For the B<sysclone> type, it will capture an image from one running diskful Linux node, create an osimage which can be used to clone other diskful Linux nodes.
|
||||
|
||||
The B<diskless> type:
|
||||
|
||||
@@ -52,13 +52,11 @@ The osimage name.
|
||||
|
||||
The network interface the diskless node will boot over (e.g. eth0), which is used by the B<genimage> command to generate initial ramdisks.
|
||||
|
||||
This is optional.
|
||||
|
||||
=item B<-n> I<nodenetdrivers>
|
||||
|
||||
The driver modules needed for the network interface, which is used by the B<genimage> command to generate initial ramdisks.
|
||||
|
||||
This is optional. By default, the B<genimage> command can provide drivers for the following network interfaces:
|
||||
By default, the B<genimage> command can provide drivers for the following network interfaces:
|
||||
|
||||
For x86 or x86_64 platform:
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ B<imgexport> I<image_name> [I<destination>] [[B<-e>|B<--extra> I<file:dir>] ...
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The imgexport command will export an image that is being used by xCAT. To export images, you must have the images defined in the I<osimage> table. All the columns in the I<osimage> and I<linuximage> tables will be exported. If kits are used in stateful or stateless images, I<kit>, I<kitcomponent> and I<kitrepo> tables will be exported. In addition, the following files will also be exported.
|
||||
The B<imgexport> command will export an image that is being used by xCAT. To export images, you must have the images defined in the I<osimage> table. All the columns in the I<osimage> and I<linuximage> tables will be exported. If kits are used in stateful or stateless images, I<kit>, I<kitcomponent> and I<kitrepo> tables will be exported. In addition, the following files will also be exported.
|
||||
|
||||
For stateful:
|
||||
x.pkglist
|
||||
@@ -45,24 +45,39 @@ For statelite:
|
||||
where x is the name of the profile.
|
||||
|
||||
|
||||
Any files specified by the -e flag will also be exported. If -p flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themsleves need to be manualy exported using -e flag.
|
||||
Any files specified by the B<-e> flag will also be exported. If B<-p> flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themsleves need to be manualy exported using B<-e> flag.
|
||||
|
||||
For statelite, the litefile table settings for the image will also be exported. The litetree and statelite tables are not exported.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
B<-e|--extra> I<srcfile:destdir> Pack up extra files. If I<destdir> is omitted, the destination directory will be the same as the source directory.
|
||||
=item B<-e|--extra> I<srcfile:destdir>
|
||||
|
||||
B<-h|--help> Display usage message.
|
||||
Pack up extra files. If I<destdir> is omitted, the destination directory will be the same as the source directory.
|
||||
|
||||
=item B<-h|--help>
|
||||
|
||||
Display usage message.
|
||||
|
||||
B<-p|--postscripts> I<node_name> Get the names of the postscripts and postbootscripts for the given node and pack them into the image.
|
||||
=item B<-p|--postscripts> I<node_name>
|
||||
|
||||
B<-v|--verbose> Verbose output.
|
||||
Get the names of the postscripts and postbootscripts for the given node and pack them into the image.
|
||||
|
||||
I<image_name> The name of the image. Use I<lsdef -t> osimage to find out all the image names.
|
||||
=item B<-v|--verbose>
|
||||
|
||||
I<destination> The output bundle file name.
|
||||
Verbose output.
|
||||
|
||||
=item I<image_name>
|
||||
|
||||
The name of the image. Use B<lsdef -t osimage> to find out all the image names.
|
||||
|
||||
=item I<destination>
|
||||
|
||||
The output bundle file name.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
@@ -10,7 +10,7 @@ B<imgimport> I<bundle_file_name> [B<-p>|B<--postscripts> I<nodelist>] [B<-f>|B<-
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The imgimport command will import an image that has been exported by I<imgexport> from xCAT. This is the easiest way to transfer/backup/, change or share images created by xCAT whether they be stateless or stateful. The bundle file will be unpacked in the current working directory. The xCAT configuration such as I<osimage> and I<linuximage> tables will then be updated.
|
||||
The B<imgimport> command will import an image that has been exported by B<imgexport> from xCAT. This is the easiest way to transfer, backup, change or share images created by xCAT whether they be stateless or stateful. The bundle file will be unpacked in the current working directory. The xCAT configuration such as I<osimage> and I<linuximage> tables will then be updated.
|
||||
|
||||
For stateful, the following files will be copied to the appropriate directories.
|
||||
x.pkglist
|
||||
@@ -42,15 +42,15 @@ For statelite, the following files will be copied to the appropriate directories
|
||||
|
||||
where x is the profile name.
|
||||
|
||||
Any extra files, included by --extra flag in the imgexport command, will also be copied to the appropriate directories.
|
||||
Any extra files, included by B<--extra> flag in the B<imgexport> command, will also be copied to the appropriate directories.
|
||||
|
||||
For statelite, the litefile table will be updated for the image. The litetree and statelite tables are not imported.
|
||||
|
||||
If -p flag is specified, the I<postscripts> table will be updated with the postscripts and the postbootscripts names from the image for the nodes given by this flag.
|
||||
If B<-p> flag is specified, the I<postscripts> table will be updated with the postscripts and the postbootscripts names from the image for the nodes given by this flag.
|
||||
|
||||
If -f flag is not specified, all the files will be copied to the same directories as the source. If it is specified, the old profile name x will be changed to the new and the files will be copied to the appropriate directores for the new profiles. For example, I</opt/xcat/share/xcat/netboot/sles/x.pkglist> will be copied to I</install/custom/netboot/sles/compute_new.pkglist> and I</install/netboot/sles11/ppc64/x/kernel> will be copied to I</install/netboot/sles11/ppc64/compute_new/kernel>. This flag is commonly used when you want to copy the image on the same xCAT mn so you can make modification on the new one.
|
||||
If B<-f> flag is not specified, all the files will be copied to the same directories as the source. If it is specified, the old profile name x will be changed to the new and the files will be copied to the appropriate directores for the new profiles. For example, I</opt/xcat/share/xcat/netboot/sles/x.pkglist> will be copied to I</install/custom/netboot/sles/compute_new.pkglist> and I</install/netboot/sles11/ppc64/x/kernel> will be copied to I</install/netboot/sles11/ppc64/compute_new/kernel>. This flag is commonly used when you want to copy the image on the same xCAT mn so you can make modification on the new one.
|
||||
|
||||
After this command, you can run the I<nodeset> command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node depolyment.
|
||||
After this command, you can run the B<nodeset> command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node depolyment.
|
||||
|
||||
For stateful:
|
||||
nodeset
|
||||
@@ -68,15 +68,25 @@ For statelite
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
B<-f|--profile> I<new_prof> Import the image with a new profile name.
|
||||
=item B<-f|--profile> I<new_profile>
|
||||
|
||||
B<-h|--help> Display usage message.
|
||||
Import the image with a new profile name.
|
||||
|
||||
B<-p|--postscripts> I<nodelist> Import the postscripts. The postscripts contained in the image will be set in the postscripts table for I<nodelist>.
|
||||
=item B<-h|--help>
|
||||
|
||||
B<-v|--verbose> Verbose output.
|
||||
Display usage message.
|
||||
|
||||
=item B<-p|--postscripts> I<nodelist>
|
||||
|
||||
Import the postscripts. The postscripts contained in the image will be set in the postscripts table for I<nodelist>.
|
||||
|
||||
=item B<-v|--verbose>
|
||||
|
||||
Verbose output.
|
||||
|
||||
=back
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@ B<lsvm> I<noderange>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The lsvm command lists all partition profiles defined for the partitions specified in noderange. If noderange is a CEC, all the partitions associated with that CEC are displayed.
|
||||
The B<lsvm> command lists all partition profiles defined for the partitions specified in I<noderange>. If I<noderange> is a CEC, all the partitions associated with that CEC are displayed.
|
||||
|
||||
=head2 For PPC (using Direct FSP Management):
|
||||
|
||||
For Power 775(use option I<--p775> to specify), lsvm lists all partition I/O slots information for the partitions specified in noderange. If noderange is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information.
|
||||
For Power 775 (use option B<--p775> to specify), B<lsvm> lists all partition I/O slots information for the partitions specified in I<noderange>. If I<noderange> is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information.
|
||||
|
||||
For DFM-managed (short for Direct FSP Management mode) normal power machine, lsvm lists the processor, memory, physical I/O slots, hugepage and BSR info for the specified partitions or CEC.
|
||||
For DFM-managed (short for Direct FSP Management mode) normal power machine, B<lsvm> lists the processor, memory, physical I/O slots, hugepage and BSR info for the specified partitions or CEC.
|
||||
|
||||
The pump mode value has the valid options:
|
||||
1 - Node Pump Mode
|
||||
@@ -50,9 +50,9 @@ More information about this part, refer to the section Using the *vm commands to
|
||||
|
||||
=head2 For KVM and VMware
|
||||
|
||||
The virtual machines that defined in the hypervisor I<noderange> will be displayed. I<noderange> can only be hypervisor.
|
||||
If I<noderange> is a hypervisor, virtual machines defined on that hypervisor will be displayed. If I<noderange> is a VM, details for that VM will be displayed.
|
||||
|
||||
Note: Only the virtual machine which is in power on state can be listed by lsvm command.
|
||||
Note: Only the virtual machine which is in power on state can be listed by B<lsvm> command.
|
||||
|
||||
=head2 For zVM:
|
||||
|
||||
@@ -67,7 +67,7 @@ Display usage message.
|
||||
|
||||
B<-v>
|
||||
|
||||
Command Version.
|
||||
Command version.
|
||||
|
||||
B<-V>
|
||||
|
||||
@@ -101,7 +101,7 @@ Output is similar to:
|
||||
|
||||
lpar3: name=lpar3,lpar_name=lpar3,lpar_id=4,lpar_env=aixlinux,all_resources=0,min_mem=512, desired_mem=2048, max_mem=3072,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,proc_mode=shared, min_proc_units=0.5,desired_proc_units=0.5,max_proc_units=0.5,min_procs=1,desired_procs=1,max_procs=1, sharing_mode=uncap,uncap_weight=128,shared_proc_pool_id=0,shared_proc_pool_name=DefaultPool,io_slots=none, lpar_io_pool_ids=none,max_virtual_slots=10, "virtual_serial_adapters=1/server/1/any//any/1,0/server/1/any//any/1", virtual_scsi_adapters=2/client/1/p6vios/4/1,virtual_eth_adapters=3/0/1//0/1,hca_adapters=none,boot_mode=norm,conn_monitoring=0,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0, bsr_arrays=0,lhea_logical_ports=none,lhea_capabilities=none,lpar_proc_compat_mode=default,electronic_err_reporting=null
|
||||
|
||||
2.To list all IVM-managed partitions associated with CEC cec01, enter:
|
||||
2. To list all IVM-managed partitions associated with CEC cec01, enter:
|
||||
|
||||
lsvm cec01
|
||||
|
||||
@@ -164,7 +164,7 @@ Output is similar to:
|
||||
OctantID=6,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
|
||||
OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
|
||||
|
||||
6.To list the lparname of lpars, enter:
|
||||
6. To list the lparname of lpars, enter:
|
||||
|
||||
lsvm cec1 -l --p775
|
||||
|
||||
@@ -248,9 +248,9 @@ Output is similar to:
|
||||
Bytes per BSR array: 4096
|
||||
Available BSR array: 256
|
||||
|
||||
Note: The lines list in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class discription)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicate a physical I/O resource in normal power machine.
|
||||
Note: The lines listed in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class discription)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicates a physical I/O resource in a normal power machine.
|
||||
|
||||
9.For DFM-managed partition on normal power machine, list out the detailed information:
|
||||
9. For DFM-managed partition on normal power machine, list out the detailed information:
|
||||
|
||||
lsvm lpar1
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ To setup NTP on the compute node, add B<setupntp> postscript to the I<postscript
|
||||
|
||||
=item B<-a|--all>
|
||||
|
||||
Setup NTP servers for both management node and the service node.
|
||||
Setup NTP servers for both management node and the service node. If management node has SLES installed and used as I<ntpservers>, it is recommanded to use the B<setupntp> postscript to set up NTP server for service nodes.
|
||||
|
||||
|
||||
=item B<-h|--help>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
B<piflash> - Remotely applies firmware updates to servers.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<piflash> <noderange> --package <filename>
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<piflash> Remotely applies firmware updates to servers.
|
||||
@@ -10,10 +10,14 @@ B<rinv> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
|
||||
B<rinv> I<noderange> {B<pci>|B<model>|B<serial>|B<asset>|B<vpd>|B<mprom>|B<deviceid>|B<guid>|B<firm>|B<diag>|B<dimm>|B<bios>|B<mparom>|B<mac>|B<all>}
|
||||
|
||||
=head2 OpenPOWER server specific:
|
||||
=head2 OpenPOWER (using ipmi) server specific:
|
||||
|
||||
B<rinv> I<noderange> {B<model>|B<serial>|B<deviceid>|B<uuid>|B<guid>|B<vpd>|B<mprom>|B<firm>|B<all>}
|
||||
|
||||
=head2 OpenPOWER (using openbmc) server specific:
|
||||
|
||||
B<rinv> I<noderange> {B<model>|B<serial>|B<deviceid>|B<uuid>|B<guid>|B<vpd>|B<mprom>|B<firm>|B<cpu>|B<dimm>|B<all>}
|
||||
|
||||
=head2 PPC (with HMC) specific:
|
||||
|
||||
B<rinv> I<noderange> {B<bus>|B<config>|B<serial>|B<model>|B<firm>|B<all>}
|
||||
|
||||
@@ -8,13 +8,19 @@ B<rpower> I<noderange> [B<--nodeps>] [B<on>|B<onstandby>|B<off>|B<suspend>|B<sta
|
||||
|
||||
B<rpower> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
|
||||
=head2 BMC (using IPMI) specific:
|
||||
=head2 BMC (using IPMI):
|
||||
|
||||
B<rpower> I<noderange> [B<on>|B<off>|B<softoff>|B<reset>|B<boot>|B<stat>|B<state>|B<status>|B<wake>|B<suspend> [B<-w> I<timeout>] [B<-o>] [B<-r>]]
|
||||
|
||||
B<rpower> I<noderange> [B<pduon>|B<pduoff>|B<pdustat>|B<pdureset>]
|
||||
|
||||
=head2 OpenBMC specific:
|
||||
=head2 OpenPower BMC (using IPMI):
|
||||
|
||||
B<rpower> I<noderange> [B<on>|B<off>|B<reset>|B<boot>|B<stat>|B<state>|B<status>]
|
||||
|
||||
B<rpower> I<noderange> [B<pduon>|B<pduoff>|B<pdustat>|B<pdureset>]
|
||||
|
||||
=head2 OpenPower OpenBMC:
|
||||
|
||||
B<rpower> I<noderange> [B<off>|B<on>|B<reset>|B<boot>|B<stat>|B<state>|B<status>]
|
||||
|
||||
|
||||
@@ -18,10 +18,14 @@ B<rspconfig> I<noderange> B<community>={B<public> | I<string>}
|
||||
|
||||
=head2 BMC specific:
|
||||
|
||||
B<rspconfig> I<noderange> {B<vlan>|B<ip>|B<netmask>|B<gateway>|B<backupgateway>|B<garp>}
|
||||
B<rspconfig> I<noderange> {B<ip>|B<netmask>|B<gateway>|B<backupgateway>|B<garp>|B<vlan>}
|
||||
|
||||
B<rspconfig> I<noderange> B<garp>=I<time>
|
||||
|
||||
=head2 OpenBMC specific:
|
||||
|
||||
B<rspconfig> I<noderange> {B<ip>|B<netmask>|B<gateway>|B<vlan>}
|
||||
|
||||
=head2 MPA specific:
|
||||
|
||||
B<rspconfig> I<noderange> {B<sshcfg>|B<snmpcfg>|B<pd1>|B<pd2>|B<network>|B<swnet>|B<ntp>|B<textid>|B<frame>}
|
||||
|
||||
@@ -28,7 +28,7 @@ B<rvitals> I<noderange> {B<temp>|B<voltage>|B<wattage>|B<fanspeed>|B<power>|B<le
|
||||
|
||||
=head2 OpenPOWER server specific:
|
||||
|
||||
B<rvitals> I<noderange> {B<temp>|B<voltage>|B<wattage>|B<fanspeed>|B<power>|B<leds>|B<all>}
|
||||
B<rvitals> I<noderange> [B<temp>|B<voltage>|B<wattage>|B<fanspeed>|B<power>|B<leds>|B<all>]
|
||||
|
||||
=head1 B<Description>
|
||||
|
||||
|
||||
@@ -112,6 +112,13 @@ fi
|
||||
# Add ipmi_devintf module to allow the ipmitool operation in-band
|
||||
modprobe ipmi_devintf
|
||||
|
||||
for parm in `cat /proc/cmdline`; do
|
||||
key=`echo $parm|awk -F= '{print $1}'`
|
||||
if [ "$key" = "xcatd" ]; then
|
||||
XCATMASTER=`echo $parm|awk -F= '{print $2}'|awk -F: '{print $1}'`
|
||||
fi
|
||||
done
|
||||
|
||||
allowcred.awk &
|
||||
CREDPID=$!
|
||||
sleep 5
|
||||
@@ -161,6 +168,7 @@ logger -s -t $log_label -p local4.info "IPMIVER=$IPMIVER, IPMIMFG=$IPMIMFG, XPRO
|
||||
#
|
||||
# IPMIMFG=2 = IBM
|
||||
# IPMIMFG=0 = OpenPower
|
||||
# IPMIMFG=42817 and XPROD=16975 = OpenBMC
|
||||
#
|
||||
if [ "$IPMIMFG" == 2 ]; then #IBM
|
||||
if [ "$XPROD" == "220" ]; then
|
||||
@@ -258,13 +266,20 @@ elif [ "$IPMIMFG" == "674" ]; then # DELL
|
||||
ipmitool delloem lan set shared with lom$BMCPORT &>/dev/null
|
||||
ipmitool delloem lan set shared with failover all loms &>dev/null
|
||||
fi
|
||||
elif [ "$IPMIMFG" = "42817" -a "$XPROD" = "16975" ]; then # IBM OpenPOWER servers with OpenBMC
|
||||
ISOPENBMC=1
|
||||
fi
|
||||
|
||||
LAN_MED_TYPE="802.3"
|
||||
if [ ! -z "$ISOPENBMC" ]; then
|
||||
# Overvide the default value for OpenBMC
|
||||
LAN_MED_TYPE="Other LAN"
|
||||
fi
|
||||
while [ -z "$LANCHAN" ]; do
|
||||
logger -s -t $log_label -p local4.info "Auto detecting LAN channel..."
|
||||
for TLANCHAN in {1..16}; do
|
||||
# Try to get the channel information; then get the MAC which is used for the channel
|
||||
if ipmitool channel info $TLANCHAN 2> /dev/null | grep 802.3 > /dev/null 2>&1 && ipmitool raw 0xc 2 $TLANCHAN 5 0 0 > /dev/null 2>&1; then
|
||||
if ipmitool channel info $TLANCHAN 2> /dev/null | grep "$LAN_MED_TYPE" > /dev/null 2>&1 && ipmitool raw 0xc 2 $TLANCHAN 5 0 0 > /dev/null 2>&1; then
|
||||
LANCHAN=$TLANCHAN
|
||||
break;
|
||||
fi;
|
||||
@@ -279,6 +294,9 @@ logger -s -t $log_label -p local4.info "Detected LAN channel $LANCHAN"
|
||||
|
||||
let idev=NUMBMCS
|
||||
if [ $IPCFGMETHOD="static" ]; then
|
||||
if [ ! -z "$ISOPENBMC" ]; then
|
||||
let idev=0
|
||||
fi
|
||||
while [ $idev -gt 0 ]; do
|
||||
let idev=idev-1
|
||||
TRIES=0
|
||||
@@ -334,7 +352,11 @@ if [ $IPCFGMETHOD="static" ]; then
|
||||
done
|
||||
fi
|
||||
else
|
||||
let idev=NUMBMCS
|
||||
if [ -z "$ISOPENBMC" ];then
|
||||
let idev=NUMBMCS
|
||||
else
|
||||
let idev=0
|
||||
fi
|
||||
while [ $idev -gt 0 ]; do
|
||||
let idev=idev-1
|
||||
TRIES=0
|
||||
@@ -363,6 +385,37 @@ for b in $BMCVLAN; do
|
||||
let idev=idev+1
|
||||
done
|
||||
|
||||
|
||||
|
||||
# update the node status to 'bmcready' for openbmc, no more configuration is needed.
|
||||
if [ ! -z "$ISOPENBMC" ]; then
|
||||
# To enable network configuration for openbmc
|
||||
TRIES=0
|
||||
bmc_config_rc=0
|
||||
# Set Channel Access to apply network setting
|
||||
#while ! ipmitool -d 0 lan set $LANCHAN access on; do
|
||||
while ! ipmitool -d 0 raw 0x06 0x40 $LANCHAN 0x42 0x44 > /dev/null; do
|
||||
snooze
|
||||
let TRIES=TRIES+1
|
||||
if [ $TRIES -gt $TIMEOUT ]; then
|
||||
bmc_config_rc=1
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
# update the node status to 'bmcready'
|
||||
if [ ! -z "$XCATMASTER" ]; then
|
||||
if [ "$bmc_config_rc" = "0" ]; then
|
||||
# Wait for some time for the new network setting is ready
|
||||
snooze
|
||||
updateflag.awk $XCATMASTER 3002 "installstatus bmcready"
|
||||
else
|
||||
updateflag.awk $XCATMASTER 3002 "installstatus failed"
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/ipmicfg.xml
|
||||
exit $bmc_config_rc
|
||||
fi
|
||||
# After network commands are issued, pause to allow the BMC to apply (OpenPower)
|
||||
snooze
|
||||
|
||||
@@ -587,12 +640,6 @@ while [ $idev -gt 0 ]; do
|
||||
cold_reset_bmc
|
||||
|
||||
# update the node status to 'bmcready'
|
||||
for parm in `cat /proc/cmdline`; do
|
||||
key=`echo $parm|awk -F= '{print $1}'`
|
||||
if [ "$key" = "xcatd" ]; then
|
||||
XCATMASTER=`echo $parm|awk -F= '{print $2}'|awk -F: '{print $1}'`
|
||||
fi
|
||||
done
|
||||
if [ ! -z "$XCATMASTER" ]; then
|
||||
updateflag.awk $XCATMASTER 3002 "installstatus bmcready"
|
||||
fi
|
||||
|
||||
@@ -29,10 +29,17 @@ for LANCHAN in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
|
||||
done
|
||||
BMCMAC=`ipmitool lan print $LANCHAN|grep ^MAC|awk '{print $4}'` #bmcconfig may opt to use DHCP, if so we need to feed up the mac address
|
||||
#TODO: need a way to get the DUID the service processor may use, perhaps reserve that for 'ibmsetup' since spec doesn't touch ipv6?
|
||||
|
||||
IPMIMFG=`ipmitool mc info |grep "^Manufacturer ID"|awk '{print $4}'`
|
||||
XPROD=`ipmitool mc info | grep "^Product ID"|awk '{print $4}'`
|
||||
if [ "$IPMIMFG" == "42817" -a "$XPROD" == "16975" ]; then
|
||||
ISOPENBMC=1
|
||||
else
|
||||
ISOPENBMC=0
|
||||
fi
|
||||
echo "<xcatrequest>
|
||||
<command>getbmcconfig</command>
|
||||
<callback_port>300</callback_port>
|
||||
<isopenbmc>$ISOPENBMC</isopenbmc>
|
||||
<bmcmac>$BMCMAC</bmcmac>
|
||||
</xcatrequest>" > /tmp/bmcreq.xml
|
||||
rm -f /tmp/ipmicfg.xml
|
||||
|
||||
@@ -30,10 +30,14 @@ sub getIPMIAuth {
|
||||
my $noderange = $args{noderange};
|
||||
my $ipmihash = $args{ipmihash};
|
||||
my $mphash = $args{mphash};
|
||||
my $key = $args{keytype};
|
||||
unless($key) {
|
||||
$key = "ipmi";
|
||||
}
|
||||
my $tmp;
|
||||
my %authmap;
|
||||
unless ($ipmihash) { #in the event that calling code does not pass us a prefetched set of values, pull it ourselves
|
||||
my $ipmitab = xCAT::Table->new('ipmi', -create => 0);
|
||||
my $ipmitab = xCAT::Table->new("$key", -create => 0);
|
||||
if ($ipmitab) { $ipmihash = $ipmitab->getNodesAttribs($noderange, [ 'username', 'password' ]); }
|
||||
}
|
||||
unless ($mphash) {
|
||||
@@ -42,7 +46,7 @@ sub getIPMIAuth {
|
||||
}
|
||||
my $passtab = xCAT::Table->new('passwd');
|
||||
if ($passtab) {
|
||||
($tmp) = $passtab->getAttribs({ 'key' => 'ipmi' }, 'username', 'password');
|
||||
($tmp) = $passtab->getAttribs({ 'key' => "$key" }, 'username', 'password');
|
||||
if (defined($tmp)) {
|
||||
$ipmiuser = $tmp->{username};
|
||||
$ipmipass = $tmp->{password};
|
||||
|
||||
@@ -1986,12 +1986,16 @@ sub getPostScripts
|
||||
{
|
||||
$nodecfg = "$tftpdir/pxelinux.cfg/$node";
|
||||
|
||||
} elsif($netboot eq "petitboot"){
|
||||
$nodecfg = "$tftpdir/petitboot/$node";
|
||||
}
|
||||
|
||||
my $rc = system("grep net.ifnames=0 $nodecfg >/dev/null 2>&1");
|
||||
if ($rc == 0)
|
||||
{
|
||||
$result .= "disableconsistentNICrename\n";
|
||||
if( -f "$nodecfg"){
|
||||
my $rc = system("grep net.ifnames=0 $nodecfg >/dev/null 2>&1");
|
||||
if ($rc == 0)
|
||||
{
|
||||
$result .= "disableconsistentNICrename\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1566,6 +1566,7 @@ sub sendmsg {
|
||||
$rc = $text->[0];
|
||||
$text = $text->[1];
|
||||
}
|
||||
my $text_origin = $text; # Save original text string
|
||||
if ($text =~ /:/) {
|
||||
($descr, $text) = split /:/, $text, 2;
|
||||
}
|
||||
@@ -1582,7 +1583,7 @@ sub sendmsg {
|
||||
}
|
||||
if ($rc) {
|
||||
$curptr->{errorcode} = [$rc];
|
||||
$curptr->{error} = [$text];
|
||||
$curptr->{error} = [$text_origin];
|
||||
$curptr = $curptr->{error}->[0];
|
||||
if (defined $node && %allerrornodes) {
|
||||
$allerrornodes{$node} = 1;
|
||||
|
||||
@@ -1750,11 +1750,8 @@ sub defmk
|
||||
|
||||
# won't remove the old one unless the force option is used
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "\nA definition for \'$obj\' already exists.";
|
||||
$rsp->{data}->[1] = "To remove the old definition and replace it with \na new definition use the force \'-f\' option.";
|
||||
$rsp->{data}->[2] = "To change the existing definition use the \'chdef\' command.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
$rsp->{data}->[0] = "A definition for \'$obj\' already exists. No changes will be made. Run again with \'-f\' option to force replace.";
|
||||
xCAT::MsgUtils->message("W", $rsp, $::callback);
|
||||
delete $::FINALATTRS{$obj};
|
||||
next;
|
||||
|
||||
@@ -2007,7 +2004,6 @@ sub defmk
|
||||
|
||||
# give results
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "The database was updated for the following objects:";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
|
||||
my $n = 1;
|
||||
@@ -2016,14 +2012,30 @@ sub defmk
|
||||
$rsp->{data}->[$n] = "$o";
|
||||
$n++;
|
||||
}
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
if ($n > 1) {
|
||||
# Some objects were created ($n was increased), report as success
|
||||
$rsp->{data}->[0] = "The database was updated for the following objects:";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
else {
|
||||
# No objects were created, report as error
|
||||
$rsp->{data}->[0] = "The database was not updated.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
my $nodenum = scalar(keys %::FINALATTRS);
|
||||
$rsp->{data}->[0] = "$nodenum object definitions have been created or modified.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
if ($nodenum > 0) {
|
||||
# Some objects were created, report as success
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
else {
|
||||
# No objects were created, report as error
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -3850,13 +3862,14 @@ sub defls
|
||||
$nicnames = join(',', @{ $::NicsAttrHash{$showattr} });
|
||||
}
|
||||
my $nicsstr;
|
||||
my $is_group = $defhash{$obj}{'objtype'} eq 'group';
|
||||
if ($nicnames)
|
||||
{
|
||||
$nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, $nicnames);
|
||||
$nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, $nicnames, $is_group);
|
||||
}
|
||||
else
|
||||
{
|
||||
$nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj);
|
||||
$nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, undef, $is_group);
|
||||
}
|
||||
|
||||
# Compress mode, format the output
|
||||
@@ -3909,7 +3922,8 @@ sub defls
|
||||
if ($showattr =~ /^nic/)
|
||||
{
|
||||
my $nicval = "$showattr=$attrval";
|
||||
my $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj);
|
||||
my $is_group = $defhash{$obj}{'objtype'} eq 'group';
|
||||
my $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, undef, $is_group);
|
||||
if ($nicsstr)
|
||||
{
|
||||
push(@{ $rsp_info->{data} }, "$nicsstr");
|
||||
|
||||
@@ -96,20 +96,24 @@ sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
my $node = $request->{'_xcat_clienthost'}->[0];
|
||||
my $bmc_mgmt_type = "ipmi";
|
||||
if ($request->{isopenbmc}->[0]) {
|
||||
$bmc_mgmt_type = "openbmc";
|
||||
}
|
||||
unless (ok_with_node($node, 300)) {
|
||||
$callback->({ error => ["Unable to prove root on your IP approves of this request"], errorcode => [1] });
|
||||
return;
|
||||
}
|
||||
|
||||
#my $sitetable = xCAT::Table->new('site');
|
||||
my $ipmitable = xCAT::Table->new('ipmi');
|
||||
my $ipmitable = xCAT::Table->new("$bmc_mgmt_type");
|
||||
my $tmphash;
|
||||
my $username;
|
||||
my $gennedpassword = 0;
|
||||
my $bmc;
|
||||
my $password;
|
||||
$tmphash = $ipmitable->getNodesAttribs([$node], [ 'bmc', 'username', 'bmcport', 'password', 'taggedvlan' ]);
|
||||
my $authmap = xCAT::PasswordUtils::getIPMIAuth(noderange => [$node], ipmihash => $tmphash);
|
||||
my $authmap = xCAT::PasswordUtils::getIPMIAuth(noderange => [$node], ipmihash => $tmphash, keytype => $bmc_mgmt_type);
|
||||
|
||||
if ($::XCATSITEVALS{genpasswords} eq "1" or $::XCATSITEVALS{genpasswords} =~ /y(es)?/i) {
|
||||
$password = genpassword(10) . "1cA!";
|
||||
|
||||
@@ -29,6 +29,7 @@ use Data::Dumper;
|
||||
use File::Basename;
|
||||
use File::Path;
|
||||
use Cwd;
|
||||
use JSON;
|
||||
|
||||
my $nmap_path;
|
||||
|
||||
@@ -388,7 +389,7 @@ sub get_bmc_ip_source {
|
||||
# all other errors
|
||||
push @{ $rsp->{data} }, "$error_msg";
|
||||
}
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
xCAT::MsgUtils->message("W", $rsp, $::CALLBACK);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -452,7 +453,7 @@ sub check_auth_process {
|
||||
else {
|
||||
push @{ $rsp->{data} }, "Unknown Error: $output";
|
||||
}
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
xCAT::MsgUtils->message("W", $rsp, $::CALLBACK);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -575,7 +576,21 @@ sub scan_process {
|
||||
|
||||
# Set child process default, if not the function runcmd may return error
|
||||
$SIG{CHLD} = 'DEFAULT';
|
||||
bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command);
|
||||
|
||||
my $nmap_cmd = "nmap ${$live_ip}[$i] -p 2200 -Pn";
|
||||
my $nmap_output = xCAT::Utils->runcmd($nmap_cmd, -1);
|
||||
if ($nmap_output =~ /2200\/tcp (\w+)/) {
|
||||
my $port_stat = $1;
|
||||
if ($port_stat eq "open") {
|
||||
bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command);
|
||||
} else {
|
||||
bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command);
|
||||
}
|
||||
} else {
|
||||
xCAT::MsgUtils->message("E", "Can not get status of 2200 port.", $::CALLBACK);
|
||||
exit 1;
|
||||
}
|
||||
|
||||
exit 0;
|
||||
} else {
|
||||
|
||||
@@ -606,7 +621,7 @@ sub scan_process {
|
||||
{
|
||||
my $rsp = {};
|
||||
push @{ $rsp->{data} }, "No bmc found.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
xCAT::MsgUtils->message("W", $rsp, $::CALLBACK);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -625,14 +640,15 @@ sub scan_process {
|
||||
sub format_stanza {
|
||||
my $node = shift;
|
||||
my $data = shift;
|
||||
my $mgt_type = shift;
|
||||
my ($bmcip, $bmcmtm, $bmcserial, $bmcuser, $bmcpass, $nodetype, $hwtype) = split(/,/, $data);
|
||||
my $result;
|
||||
if (defined($bmcip)) {
|
||||
$result .= "$node:\n\tobjtype=node\n";
|
||||
$result .= "\tgroups=all\n";
|
||||
$result .= "\tbmc=$bmcip\n";
|
||||
$result .= "\tcons=ipmi\n";
|
||||
$result .= "\tmgt=ipmi\n";
|
||||
$result .= "\tcons=$mgt_type\n";
|
||||
$result .= "\tmgt=$mgt_type\n";
|
||||
if ($bmcmtm) {
|
||||
$result .= "\tmtm=$bmcmtm\n";
|
||||
}
|
||||
@@ -665,11 +681,17 @@ sub format_stanza {
|
||||
sub write_to_xcatdb {
|
||||
my $node = shift;
|
||||
my $data = shift;
|
||||
my $mgt_type = shift;
|
||||
my ($bmcip, $bmcmtm, $bmcserial, $bmcuser, $bmcpass, $nodetype, $hwtype) = split(/,/, $data);
|
||||
my $request_command = shift;
|
||||
my $ret;
|
||||
|
||||
$ret = xCAT::Utils->runxcmd({ command => ['chdef'], arg => [ '-t', 'node', '-o', $node, "bmc=$bmcip", "cons=ipmi", "mgt=ipmi", "mtm=$bmcmtm", "serial=$bmcserial", "bmcusername=$bmcuser", "bmcpassword=$bmcpass", "nodetype=$nodetype", "hwtype=$hwtype", "groups=all" ] }, $request_command, 0, 1);
|
||||
$ret = xCAT::Utils->runxcmd({ command => ['chdef'],
|
||||
arg => [ '-t', 'node', '-o', $node, "bmc=$bmcip", "cons=$mgt_type",
|
||||
"mgt=$mgt_type", "mtm=$bmcmtm", "serial=$bmcserial",
|
||||
"bmcusername=$bmcuser", "bmcpassword=$bmcpass", "nodetype=$nodetype",
|
||||
"hwtype=$hwtype", "groups=all" ] },
|
||||
$request_command, 0, 1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
my $rsp = {};
|
||||
push @{ $rsp->{data} }, "create or modify node is failed.\n";
|
||||
@@ -696,7 +718,6 @@ sub write_to_xcatdb {
|
||||
|
||||
sub send_rep {
|
||||
my $resp = shift;
|
||||
|
||||
unless ($resp) { return; }
|
||||
store_fd($resp, $parent_fd);
|
||||
}
|
||||
@@ -892,13 +913,15 @@ sub bmcdiscovery_ipmi {
|
||||
if ($bmc_pass) {
|
||||
$bmcpassword = "-P $bmc_pass";
|
||||
}
|
||||
|
||||
my $node_data = $ip;
|
||||
my $icmd = "/opt/xcat/bin/ipmitool-xcat -vv -I lanplus $bmcusername $bmcpassword -H $ip chassis status ";
|
||||
my $output = xCAT::Utils->runcmd("$icmd", -1);
|
||||
if ($output =~ $bmcstr) {
|
||||
|
||||
if ($output =~ /RAKP 2 message indicates an error : (.+)\nError: (.+)/) {
|
||||
xCAT::MsgUtils->message("E", { data => ["$2: $1 for $ip"] }, $::CALLBACK);
|
||||
return 1;
|
||||
xCAT::MsgUtils->message("W", { data => ["$2: $1 for $ip"] }, $::CALLBACK);
|
||||
return;
|
||||
}
|
||||
|
||||
# The output contains System Power indicated the username/password is correct, then try to get MTMS
|
||||
@@ -936,44 +959,125 @@ sub bmcdiscovery_ipmi {
|
||||
}
|
||||
}
|
||||
|
||||
$ip .= ",$mtm";
|
||||
$ip .= ",$serial";
|
||||
$node_data .= ",$mtm";
|
||||
$node_data .= ",$serial";
|
||||
if ($::opt_P) {
|
||||
if ($::opt_U) {
|
||||
$ip .= ",$::opt_U,$::opt_P";
|
||||
$node_data .= ",$::opt_U,$::opt_P";
|
||||
} else {
|
||||
$ip .= ",,$::opt_P";
|
||||
$node_data .= ",,$::opt_P";
|
||||
}
|
||||
} else {
|
||||
$ip .= ",,";
|
||||
$node_data .= ",,";
|
||||
}
|
||||
$ip .= ",mp,bmc";
|
||||
$node_data .= ",mp,bmc";
|
||||
if ($mtm and $serial) {
|
||||
$node = "node-$mtm-$serial";
|
||||
$node =~ s/(.*)/\L$1/g;
|
||||
$node =~ s/[\s:\._]/-/g;
|
||||
}
|
||||
} elsif ($output =~ /error : unauthorized name/) {
|
||||
xCAT::MsgUtils->message("E", { data => ["BMC username is incorrect for $ip"] }, $::CALLBACK);
|
||||
return 1;
|
||||
xCAT::MsgUtils->message("W", { data => ["BMC username is incorrect for $ip"] }, $::CALLBACK);
|
||||
return;
|
||||
} elsif ($output =~ /RAKP \S* \S* is invalid/) {
|
||||
xCAT::MsgUtils->message("E", { data => ["BMC password is incorrect for $ip"] }, $::CALLBACK);
|
||||
return 1;
|
||||
xCAT::MsgUtils->message("W", { data => ["BMC password is incorrect for $ip"] }, $::CALLBACK);
|
||||
return;
|
||||
}
|
||||
if (defined($opz) || defined($opw))
|
||||
{
|
||||
format_stanza($node, $ip);
|
||||
format_stanza($node, $node_data, "ipmi");
|
||||
if (defined($opw))
|
||||
{
|
||||
write_to_xcatdb($node, $ip, $request_command);
|
||||
write_to_xcatdb($node, $node_data, "ipmi", $request_command);
|
||||
}
|
||||
}
|
||||
else {
|
||||
my $rsp = {};
|
||||
push @{ $rsp->{data} }, "$ip";
|
||||
push @{ $rsp->{data} }, "$node_data";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
=head3 bmcdiscovery_openbmc
|
||||
|
||||
Support for discovering bmc using openbmc
|
||||
Returns:
|
||||
if it is openbmc, it returns bmc ip or host;
|
||||
if it is not openbmc, it returns nothing;
|
||||
|
||||
=cut
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
sub bmcdiscovery_openbmc{
|
||||
my $ip = shift;
|
||||
my $opz = shift;
|
||||
my $opw = shift;
|
||||
my $request_command = shift;
|
||||
my $node = sprintf("node-%08x", unpack("N*", inet_aton($ip)));
|
||||
|
||||
my $node_data = $ip;
|
||||
my $cjar_file = "/tmp/cjar_$ip";
|
||||
my $data = '{"data": [ "' . $bmc_user .'", "' . $bmc_pass . '" ] }';
|
||||
|
||||
my $output = `curl -c $cjar_file -k -X POST -H \"Content-Type: application/json\" -d '$data' https://$ip/login`;
|
||||
|
||||
if ($output =~ /\"status\": \"ok\"/) {
|
||||
my $req_output = `curl -b $cjar_file -k https://$ip/xyz/openbmc_project/inventory/system/chassis/motherboard`;
|
||||
my $response = decode_json $req_output;
|
||||
my $mtm;
|
||||
my $serial;
|
||||
|
||||
if (defined($response->{data}) and defined($response->{data}->{Model}) and defined($response->{data}->{SerialNumber})) {
|
||||
$mtm = $response->{data}->{Model};
|
||||
$serial = $response->{data}->{SerialNumber};
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
# delete space before and after
|
||||
$mtm =~ s/^\s+|\s+$//g;
|
||||
$serial =~ s/^\s+|\s+$//g;
|
||||
|
||||
# format info string for format_stanza function
|
||||
$node_data .= ",$mtm";
|
||||
$node_data .= ",$serial";
|
||||
if ($::opt_P) {
|
||||
if ($::opt_U) {
|
||||
$node_data .= ",$::opt_U,$::opt_P";
|
||||
} else {
|
||||
$node_data .= ",,$::opt_P";
|
||||
}
|
||||
} else {
|
||||
$node_data .= ",,";
|
||||
}
|
||||
$node_data .= ",mp,bmc";
|
||||
if ($mtm and $serial) {
|
||||
$node = "node-$mtm-$serial";
|
||||
$node =~ s/(.*)/\L$1/g;
|
||||
$node =~ s/[\s:\._]/-/g;
|
||||
}
|
||||
|
||||
unlink $cjar_file;
|
||||
} else {
|
||||
if ($output =~ /\"description\": \"Invalid username or password\"/) {
|
||||
xCAT::MsgUtils->message("W", { data => ["Invalid username or password for $ip"] }, $::CALLBACK);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (defined($opz) || defined($opw)) {
|
||||
format_stanza($node, $node_data, "openbmc");
|
||||
if (defined($opw)) {
|
||||
write_to_xcatdb($node, $node_data, "openbmc", $request_command);
|
||||
}
|
||||
} else {
|
||||
my $rsp = {};
|
||||
push @{ $rsp->{data} }, "$node_data";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -151,6 +151,8 @@ sub parse_args {
|
||||
if ($::VERBOSE) {
|
||||
$opt->{verbose} = 1;
|
||||
}
|
||||
} else {
|
||||
return (1, &usage());
|
||||
}
|
||||
|
||||
# if the request has node range
|
||||
|
||||
@@ -513,11 +513,31 @@ sub process_request {
|
||||
#if not shared tftpdir, then filter, otherwise, set up everything
|
||||
if ($request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command
|
||||
@nodes = ();
|
||||
my @hostinfo = xCAT::NetworkUtils->determinehostname();
|
||||
my $cur_xmaster = pop @hostinfo;
|
||||
xCAT::MsgUtils->trace(0, "d", "grub2: running on $cur_xmaster");
|
||||
|
||||
# Get current server managed node list
|
||||
my $sn_hash = xCAT::ServiceNodeUtils->getSNformattedhash(\@rnodes, "xcat", "MN");
|
||||
my %managed = {};
|
||||
foreach (@{ $sn_hash->{$cur_xmaster} }) { $managed{$_} = 1; }
|
||||
|
||||
foreach (@rnodes) {
|
||||
if (xCAT::NetworkUtils->nodeonmynet($_)) {
|
||||
push @nodes, $_;
|
||||
} else {
|
||||
xCAT::MsgUtils->message("S", "$_: grub2 netboot: stop configuration because of none sharedtftp and not on same network with its xcatmaster.");
|
||||
my $msg = "grub2 configuration file was not created for node [$_] because sharedtftp attribute is not set and the node is not on same network as this xcatmaster";
|
||||
if ( $cur_xmaster ) {
|
||||
$msg .= ": $cur_xmaster";
|
||||
}
|
||||
if ( exists( $managed{$_} ) ) {
|
||||
# report error when it is under my control but I cannot handle it.
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = $msg;
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
} else {
|
||||
xCAT::MsgUtils->message("S", $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -46,7 +46,7 @@ sub process_request {
|
||||
@ARGV = @{ $request->{arg} } if (defined $request->{arg});
|
||||
my $argc = scalar @ARGV;
|
||||
|
||||
my $usage = "Usage:\n imgcapture <node> -t|--type {diskless|sysclone} -o|--osimage <osimage> [-V | --verbose] \n imgcapture [-h|--help] \n imgcapture [-v|--version]";
|
||||
my $usage = "Usage:\n imgcapture <node> -t|--type {diskless|sysclone} -o|--osimage <osimage> [-i <nodebootif>] [-n <nodebootif>] [-V | --verbose] \n imgcapture [-h|--help] \n imgcapture [-v|--version]";
|
||||
|
||||
my $os;
|
||||
my $arch;
|
||||
|
||||
@@ -24,6 +24,7 @@ my %needbladeinv;
|
||||
|
||||
use POSIX qw(ceil floor);
|
||||
use Storable qw(nstore_fd retrieve_fd thaw freeze);
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use xCAT::Utils;
|
||||
use xCAT::TableUtils;
|
||||
use xCAT::IMMUtils;
|
||||
@@ -1761,6 +1762,56 @@ sub check_bmc_status_with_ipmitool {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------#
|
||||
# Wait for OS to reboot by checking "nodestat" to be "sshd" :
|
||||
# Arguments:
|
||||
# initial_sleep: seconds to sleep before checking loop start
|
||||
# inteval: inteval time to check
|
||||
# retry: max retry time
|
||||
# sessdata: session data for display
|
||||
# verbose: verbose output
|
||||
# Returns:
|
||||
# 1 when OS is up
|
||||
# 0 when no response of "sshd" from OS
|
||||
#----------------------------------------------------------------#
|
||||
sub wait_for_os_to_reboot {
|
||||
my $initial_sleep = shift;
|
||||
my $interval = shift;
|
||||
my $retry = shift;
|
||||
my $sessdata = shift;
|
||||
my $verbose = shift;
|
||||
my $cmd;
|
||||
my $output;
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg("Sleeping for a few min waiting for node to power on before attempting to continue", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
sleep($initial_sleep); # sleep initially for $initial_sleep seconds for node to reboot
|
||||
# Start testing every $interval sec for node to be booted. Give up after $retry times.
|
||||
foreach (1..$retry) {
|
||||
# Test node is booted in to OS
|
||||
$cmd = "nodestat $sessdata->{node} | /usr/bin/grep sshd";
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC == 0) {
|
||||
# Node is ready to retry an upgrage
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg("Detected node booted. Will retry upgrade", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
return 1; #Node booted
|
||||
}
|
||||
else {
|
||||
# Still not booted, wait for $interval sec and try again
|
||||
if ($verbose) {
|
||||
$cmd = "nodestat $sessdata->{node}";
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
my ($nodename, $state) = split(/:/, $output);
|
||||
xCAT::SvrUtils::sendmsg("($_) Node still not ready. Current state - $state, test again in $interval sec.", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
sleep($interval);
|
||||
}
|
||||
}
|
||||
return 0; #Node did not boot after requested delay
|
||||
}
|
||||
|
||||
sub do_firmware_update {
|
||||
my $sessdata = shift;
|
||||
my $ret;
|
||||
@@ -1768,6 +1819,9 @@ sub do_firmware_update {
|
||||
my $verbose = 0;
|
||||
my $retry = 2;
|
||||
my $verbose_opt;
|
||||
my $is_firestone = 0;
|
||||
my $firestone_update_version;
|
||||
my $htm_update_version;
|
||||
$ret = get_ipmitool_version(\$ipmitool_ver);
|
||||
exit $ret if $ret < 0;
|
||||
|
||||
@@ -1788,7 +1842,7 @@ sub do_firmware_update {
|
||||
|
||||
my $exit_with_success_func = sub {
|
||||
my ($node, $callback, $message) = @_;
|
||||
my $status = "success to update firmware";
|
||||
my $status = "success updating firmware";
|
||||
my $nodelist_table = xCAT::Table->new('nodelist');
|
||||
if (!$nodelist_table) {
|
||||
xCAT::MsgUtils->message("S", "Unable to open nodelist table, denying");
|
||||
@@ -1857,22 +1911,31 @@ sub do_firmware_update {
|
||||
if ($opt =~ /buffersize=/) {
|
||||
my ($attribute, $buffer_value) = split(/=/, $opt);
|
||||
if ($buffer_value) {
|
||||
# buffersize option was passed in, reset the default
|
||||
$buffer_size = $buffer_value;
|
||||
# buffersize option was passed in, reset the default if valid
|
||||
if (looks_like_number($buffer_value) and $buffer_value > 0) {
|
||||
$buffer_size = $buffer_value;
|
||||
}
|
||||
else {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Invalid buffer size value $buffer_value");
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($opt =~ /retry=/) {
|
||||
my ($attribute, $retry_value) = split(/=/, $opt);
|
||||
if ($retry_value) {
|
||||
# retry option was passed in, reset the default
|
||||
$retry = $retry_value;
|
||||
if (defined $retry_value) {
|
||||
# retry option was passed in, reset the default if valid
|
||||
if (looks_like_number($retry_value) and $retry_value >= 0) {
|
||||
$retry = $retry_value;
|
||||
}
|
||||
else {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Invalid retry value $retry_value");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
xCAT::SvrUtils::sendmsg("rflash started, upgrade failure will be retried up to $retry times. Please wait...",
|
||||
$callback, $sessdata->{node}, %allerrornodes);
|
||||
|
||||
# check for 8335-GTB Firmware above 1610A release. If below, exit
|
||||
if ($output =~ /8335-GTB/) {
|
||||
$cmd = $pre_cmd . " fru print 47";
|
||||
@@ -1890,6 +1953,69 @@ sub do_firmware_update {
|
||||
"Error: Current firmware level OP8v_$grs_version requires one-time manual update to at least version OP8v_1.7_2.55");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
# For Firestone the update from 810 to 820 or from 820 to 810 needs to be done in 3 steps
|
||||
# instead of usual one.
|
||||
if ($output =~ /8335-GCA|8335-GTA/) {
|
||||
$is_firestone = 1;
|
||||
$cmd = $pre_cmd . " fru print 47";
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Running ipmitool command $cmd failed: $output");
|
||||
}
|
||||
# Check what firmware version is currently running on the machine
|
||||
if ($output =~ /OP8_v\d\.\d+_(\d+)\.\d+/) {
|
||||
my $frs_version = $1;
|
||||
if ($frs_version == 1) {
|
||||
$firestone_update_version = "810";
|
||||
}
|
||||
if ($frs_version == 2) {
|
||||
$firestone_update_version = "820";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Unable to determine firmware version currently installed. Verify that \"$cmd | grep OP8_v\" command returns a version.");
|
||||
}
|
||||
|
||||
# Check what firmware version is specified in htm file
|
||||
$cmd = "/usr/bin/grep -a FW_DESC $hpm_file";
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Running ipmitool command $cmd failed: $output");
|
||||
}
|
||||
# Parse out build date from the description string
|
||||
if ($output =~ /FW_DESC=8335 \w+ \w+ \w+ (\w+)/) {
|
||||
my $htm_date= $1;
|
||||
# Parse out the year from "mmddyyyy" (skip 4 digits, grab last 4)
|
||||
if ($htm_date =~ /\d{4}(\d+)/) {
|
||||
my $htm_year = $1;
|
||||
if ($htm_year == 2016) {
|
||||
$htm_update_version = "810";
|
||||
}
|
||||
if ($htm_year == 2017) {
|
||||
$htm_update_version = "820";
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Unable to determine firmware version of $hpm_file.");
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_firestone and
|
||||
(($firestone_update_version eq "820" and $htm_update_version eq "810") or
|
||||
($firestone_update_version eq "810" and $htm_update_version eq "820"))
|
||||
) {
|
||||
xCAT::SvrUtils::sendmsg("rflash started, Please wait...", $callback, $sessdata->{node}, %allerrornodes);
|
||||
$retry = 0; # No retry support for 3 step update process
|
||||
}
|
||||
else {
|
||||
xCAT::SvrUtils::sendmsg("rflash started, upgrade failure will be retried up to $retry times. Please wait...", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
|
||||
RETRY_UPGRADE:
|
||||
@@ -1897,7 +2023,9 @@ RETRY_UPGRADE:
|
||||
|
||||
# step 1 power off
|
||||
$cmd = $pre_cmd . " chassis power off";
|
||||
xCAT::SvrUtils::sendmsg("Preparing to upgrade firmware, powering chassis off...", $callback, $sessdata->{node}, %allerrornodes);
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg("Preparing to upgrade firmware, powering chassis off...", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
@@ -1913,7 +2041,7 @@ RETRY_UPGRADE:
|
||||
}
|
||||
|
||||
# check reset status
|
||||
unless (check_bmc_status_with_ipmitool($pre_cmd, 5, 60, 1, $sessdata, $verbose)) {
|
||||
unless (check_bmc_status_with_ipmitool($pre_cmd, 5, 60, 2, $sessdata, $verbose)) {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Timeout to check the bmc status");
|
||||
}
|
||||
@@ -1927,36 +2055,124 @@ RETRY_UPGRADE:
|
||||
}
|
||||
|
||||
# step 4 upgrade firmware
|
||||
$cmd = $pre_cmd . " -z " . $buffer_size . " hpm upgrade $hpm_file force ";
|
||||
$cmd .= $verbose_opt;
|
||||
|
||||
# For firestone machines if updating from 810 to 820 version or from 820 to 810,
|
||||
# extra steps are needed. Hanled in "if" block, "else" block is normal update in a single step.
|
||||
my $rflash_log_file = xCAT::Utils->full_path($sessdata->{node}.".log", RFLASH_LOG_DIR);
|
||||
$cmd .= " >".$rflash_log_file." 2>&1";
|
||||
xCAT::SvrUtils::sendmsg([ 0,
|
||||
"rflashing ... See the detail progress :\"tail -f $rflash_log_file\"" ],
|
||||
$callback, $sessdata->{node});
|
||||
if ($is_firestone and
|
||||
(($firestone_update_version eq "820" and $htm_update_version eq "810") or
|
||||
($firestone_update_version eq "810" and $htm_update_version eq "820"))
|
||||
) {
|
||||
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
# if upgrade command failed and we exausted number of retries
|
||||
# report an error, exit to the caller and leave node in powered off state
|
||||
# otherwise report an error, power on the node and try upgrade again
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
if ($retry == 0) {
|
||||
# No more retries left, report and error and exit
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Running ipmitool command $cmd failed: $output");
|
||||
# Step 4.1
|
||||
$cmd = $pre_cmd . " -z " . $buffer_size . " hpm upgrade $hpm_file component 0 force ";
|
||||
$cmd .= $verbose_opt;
|
||||
|
||||
$cmd .= " >".$rflash_log_file." 2>&1";
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg([ 0,
|
||||
"rflashing component 0, see the detail progress :\"tail -f $rflash_log_file\"" ],
|
||||
$callback, $sessdata->{node});
|
||||
}
|
||||
else {
|
||||
# Error upgrading, set a flag to attempt a retry
|
||||
xCAT::SvrUtils::sendmsg("Running ipmitool command $cmd failed: $output", $callback, $sessdata->{node}, %allerrornodes);
|
||||
$failed_upgrade = 1;
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
# Since "hpm update" command in step 4.1 above redirects standard out and error to a log file,
|
||||
# nothing gets returned from execution of the command. Here if RC is not zero, we
|
||||
# extract all lines containing "Error" from that log file and display them in the sendmsg below
|
||||
my $get_error_cmd = "/usr/bin/grep Error $rflash_log_file";
|
||||
$output = xCAT::Utils->runcmd($get_error_cmd, 0);
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Running ipmitool command $cmd failed with rc=$::RUNCMD_RC and the following error messages:\n$output\nSee the $rflash_log_file for details.");
|
||||
}
|
||||
|
||||
sleep(1); # Sleep for a second before next step
|
||||
|
||||
# Step 4.2
|
||||
$cmd = $pre_cmd . " -z " . $buffer_size . " hpm upgrade $hpm_file component 1 force ";
|
||||
$cmd .= $verbose_opt;
|
||||
|
||||
$cmd .= " >>".$rflash_log_file." 2>&1";
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg([ 0,
|
||||
"rflashing component 1, see the detail progress :\"tail -f $rflash_log_file\"" ],
|
||||
$callback, $sessdata->{node});
|
||||
}
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
# Since "hpm update" command in step 4.2 above redirects standard out and error to a log file,
|
||||
# nothing gets returned from execution of the command. Here if RC is not zero, we
|
||||
# extract all lines containing "Error" from that log file and display them in the sendmsg below
|
||||
my $get_error_cmd = "/usr/bin/grep Error $rflash_log_file";
|
||||
$output = xCAT::Utils->runcmd($get_error_cmd, 0);
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Running ipmitool command $cmd failed with rc=$::RUNCMD_RC and the following error messages:\n$output\nSee the $rflash_log_file for details.");
|
||||
}
|
||||
|
||||
# Wait for BMC to reboot before continuing to next step
|
||||
unless (check_bmc_status_with_ipmitool($pre_cmd, 5, 60, 10, $sessdata, $verbose)) {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Timeout waiting for the bmc ready status. Firmware update suspended");
|
||||
}
|
||||
|
||||
# Step 4.3
|
||||
$cmd = $pre_cmd . " -z " . $buffer_size . " hpm upgrade $hpm_file component 2 force ";
|
||||
$cmd .= $verbose_opt;
|
||||
|
||||
$cmd .= " >>".$rflash_log_file." 2>&1";
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg([ 0,
|
||||
"rflashing component 2, see the detail progress :\"tail -f $rflash_log_file\"" ],
|
||||
$callback, $sessdata->{node});
|
||||
}
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
# Since "hpm update" command in step 4.3 above redirects standard out and error to a log file,
|
||||
# nothing gets returned from execution of the command. Here if RC is not zero, we
|
||||
# extract all lines containing "Error" from that log file and display them in the sendmsg below
|
||||
my $get_error_cmd = "/usr/bin/grep Error $rflash_log_file";
|
||||
$output = xCAT::Utils->runcmd($get_error_cmd, 0);
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Running ipmitool command $cmd failed with rc=$::RUNCMD_RC and the following error messages:\n$output\nSee the $rflash_log_file for details.");
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
$cmd = $pre_cmd . " -z " . $buffer_size . " hpm upgrade $hpm_file force ";
|
||||
$cmd .= $verbose_opt;
|
||||
|
||||
$cmd .= " >".$rflash_log_file." 2>&1";
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg([ 0,
|
||||
"rflashing ... See the detail progress :\"tail -f $rflash_log_file\"" ],
|
||||
$callback, $sessdata->{node});
|
||||
}
|
||||
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
# if upgrade command failed and we exausted number of retries
|
||||
# report an error, exit to the caller and leave node in powered off state
|
||||
# otherwise report an error, power on the node and try upgrade again
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
# Since "hpm update" command in step 4 above redirects standard out and error to a log file,
|
||||
# nothing gets returned from execution of the command. Here if RC is not zero, we
|
||||
# extract all lines containing "Error" from that log file and display them in the sendmsg below
|
||||
my $get_error_cmd = "/usr/bin/grep Error $rflash_log_file";
|
||||
$output = xCAT::Utils->runcmd($get_error_cmd, 0);
|
||||
if ($retry == 0) {
|
||||
# No more retries left, report an error and exit
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Running ipmitool command $cmd failed with rc=$::RUNCMD_RC and the following error messages:\n$output\nSee the $rflash_log_file for details.");
|
||||
}
|
||||
else {
|
||||
# Error upgrading, set a flag to attempt a retry
|
||||
xCAT::SvrUtils::sendmsg("Running attempt $retry of ipmitool command $cmd failed with rc=$::RUNCMD_RC and the following error messages:\n$output\nSee the $rflash_log_file for details.", $callback, $sessdata->{node}, %allerrornodes);
|
||||
$failed_upgrade = 1;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# step 5 power on
|
||||
# check reset status
|
||||
unless (check_bmc_status_with_ipmitool($pre_cmd, 5, 60, 15, $sessdata, $verbose)) {
|
||||
unless (check_bmc_status_with_ipmitool($pre_cmd, 5, 60, 10, $sessdata, $verbose)) {
|
||||
$exit_with_error_func->($sessdata->{node}, $callback,
|
||||
"Timeout to check the bmc status");
|
||||
}
|
||||
@@ -1965,7 +2181,9 @@ RETRY_UPGRADE:
|
||||
xCAT::SvrUtils::sendmsg("Firmware update failed, powering chassis on for a retry. This can take several minutes. $retry retries left ...", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
else {
|
||||
xCAT::SvrUtils::sendmsg("Firmware updated, powering chassis on to populate FRU information...", $callback, $sessdata->{node}, %allerrornodes);
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg("Firmware updated, powering chassis on to populate FRU information...", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
}
|
||||
|
||||
$cmd = $pre_cmd . " chassis power on";
|
||||
@@ -1975,34 +2193,9 @@ RETRY_UPGRADE:
|
||||
"Running ipmitool command $cmd failed: $output");
|
||||
}
|
||||
|
||||
my $node_ready_for_retry = 0;
|
||||
if ($failed_upgrade) {
|
||||
# Update has failed in step 4. Wait for node to reboot and try again
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg("Sleeping for a few min waiting for node to power on before attempting a retry", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
sleep(300); # sleep for 5 min for node to reboot
|
||||
# Start testing every 10 sec for node to be booted. Give up after 5 min.
|
||||
foreach (1..30) {
|
||||
# Test node is booted in to OS
|
||||
$cmd = "nodestat $sessdata->{node} | grep sshd";
|
||||
$output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC == 0) {
|
||||
# Node is ready to retry an upgrage
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg("Detected node booted. Will retry upgrade", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
$node_ready_for_retry = 1;
|
||||
last;
|
||||
}
|
||||
else {
|
||||
# Still not booted, wait for 10 sec and try again
|
||||
if ($verbose) {
|
||||
xCAT::SvrUtils::sendmsg("Node still not ready, Test again in 10 sec.", $callback, $sessdata->{node}, %allerrornodes);
|
||||
}
|
||||
sleep(10);
|
||||
}
|
||||
}
|
||||
my $node_ready_for_retry = wait_for_os_to_reboot(300,10,30,$sessdata,$verbose);
|
||||
if ($node_ready_for_retry) {
|
||||
$retry--; # decrement number of retries left
|
||||
# Yes, it is a goto statement here. Ugly, but removes the need to restructure
|
||||
@@ -2340,6 +2533,12 @@ sub power {
|
||||
my $rc = 0;
|
||||
my $text;
|
||||
my $code;
|
||||
|
||||
if (($sessdata->{subcommand} !~ /^on$|^off$|^reset$|^boot$|^stat$|^state$|^status$/) and isopenpower($sessdata)) {
|
||||
xCAT::SvrUtils::sendmsg([ 1, "unsupported command rpower $sessdata->{subcommand} for OpenPower" ], $callback, $sessdata->{node}, %allerrornodes);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($sessdata->{subcommand} eq "reseat") {
|
||||
reseat_node($sessdata);
|
||||
} elsif (not $sessdata->{acpistate} and is_systemx($sessdata)) { #Only implemented for IBM servers
|
||||
@@ -2486,6 +2685,7 @@ sub power_response {
|
||||
my $text = $codes{ $rsp->{code} };
|
||||
unless ($text) { $text = sprintf("Unknown response %02xh", $rsp->{code}); }
|
||||
xCAT::SvrUtils::sendmsg([ 1, $text ], $callback, $sessdata->{node}, %allerrornodes);
|
||||
return;
|
||||
} else {
|
||||
my $command = $sessdata->{subcommand};
|
||||
my $status = $sessdata->{powerstatus};
|
||||
@@ -4330,8 +4530,9 @@ sub extractfield { #idx is location of the type/length byte, returns something a
|
||||
my $language = shift;
|
||||
my $data;
|
||||
if ($idx >= scalar @$area) {
|
||||
xCAT::SvrUtils::sendmsg([ 1, "Error parsing FRU data from BMC" ], $callback);
|
||||
return -1, undef, undef;
|
||||
# The global_sessdata store the sessdata for a node when parsefru, and it is cleaned after parsefru
|
||||
xCAT::SvrUtils::sendmsg([ 1, "Error encountered when parsing FRU data from BMC" ], $callback, $global_sessdata->{node}, %allerrornodes);
|
||||
return 0, undef, undef;
|
||||
}
|
||||
my $size = $area->[$idx] & 0b00111111;
|
||||
my $encoding = ($area->[$idx] & 0b11000000) >> 6;
|
||||
|
||||
@@ -26,6 +26,7 @@ use IO::Select;
|
||||
use xCAT::TableUtils;
|
||||
use xCAT::ServiceNodeUtils;
|
||||
use strict;
|
||||
use feature "switch"; # For given-when block
|
||||
|
||||
#use warnings;
|
||||
my $use_xhrm = 0; #xCAT Hypervisor Resource Manager, to satisfy networking and storage prerequisites, default to not using it for the moment
|
||||
@@ -81,7 +82,7 @@ sub handled_commands {
|
||||
#rvitals => 'nodehm:mgt',
|
||||
#rinv => 'nodehm:mgt',
|
||||
getrvidparms => 'nodehm:mgt',
|
||||
lsvm => 'nodehm:mgt=ipmi',
|
||||
lsvm => ['nodehm:mgt=ipmi', 'nodehm:mgt=kvm'], #allow both hypervisor and VMs as params
|
||||
rbeacon => 'nodehm:mgt',
|
||||
revacuate => 'hypervisor:type',
|
||||
vmstatenotify => 'hypervisor:type',
|
||||
@@ -2711,7 +2712,9 @@ sub promote_vm_to_master {
|
||||
$target = $sourcedir . "/" . $target;
|
||||
}
|
||||
unless ($target =~ /^nfs:\/\//) {
|
||||
xCAT::SvrUtils::sendmsg([ 1, "KVM plugin only has nfs://<server>/<path>/<mastername> support for cloning at this moment" ], $callback, $node);
|
||||
my $rsp;
|
||||
push @{ $rsp->{data} }, "VM cloning is only supported for nfs server vmstorage attribute. Current setting is $target";
|
||||
xCAT::MsgUtils->message('E', $rsp, $callback);
|
||||
return;
|
||||
}
|
||||
my $dom;
|
||||
@@ -3512,11 +3515,84 @@ sub rscan {
|
||||
}
|
||||
|
||||
sub lsvm {
|
||||
my $node = shift;
|
||||
my $host = shift;
|
||||
my $vm = shift;
|
||||
my @doms = $hypconn->list_domains();
|
||||
my @vms;
|
||||
foreach (@doms) {
|
||||
push @vms, $_->get_name();
|
||||
|
||||
if ($host ne $vm) {
|
||||
# Processing lsvm for a VM, display details about that VM
|
||||
foreach (@doms) {
|
||||
if ($_->get_name() eq $vm) {
|
||||
push @vms, "Id:" . $_->get_id();
|
||||
push @vms, "Host:" . $host;
|
||||
push @vms, "OS:" . $_->get_os_type();
|
||||
my $domain_info = $_->get_info();
|
||||
if (exists $domain_info->{"memory"}) {
|
||||
push @vms, "Memory:" . $domain_info->{"memory"};
|
||||
}
|
||||
if (exists $domain_info->{"nrVirtCpu"}) {
|
||||
push @vms, "CPU: " . $domain_info->{"nrVirtCpu"};
|
||||
}
|
||||
if (exists $domain_info->{"state"}) {
|
||||
my $state = $domain_info->{"state"};
|
||||
my $state_string;
|
||||
given($state) {
|
||||
when ($state == &Sys::Virt::Domain::STATE_NOSTATE)
|
||||
{$state_string = "The domain is active, but is not running / blocked (eg idle)";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_RUNNING)
|
||||
{$state_string = "The domain is active and running";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_BLOCKED)
|
||||
{$state_string = "The domain is active, but execution is blocked";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_PAUSED)
|
||||
{$state_string = "The domain is active, but execution has been paused";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_SHUTDOWN)
|
||||
{$state_string = "The domain is active, but in the shutdown phase";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_SHUTOFF)
|
||||
{$state_string = "The domain is inactive, and shut down";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_CRUSHED)
|
||||
{$state_string = "The domain is inactive, and crashed";}
|
||||
when ($state == &Sys::Virt::Domain::STATE_PMSUSPENDED)
|
||||
{$state_string = "The domain is active, but in power management suspend state";}
|
||||
default {$state_string = "Unknown"};
|
||||
}
|
||||
push @vms, "State :" . $domain_info->{"state"} . " ($state_string)";
|
||||
}
|
||||
# The following block of code copied from rscan command processng for disks
|
||||
my $currxml = $_->get_xml_description();
|
||||
if ($currxml) {
|
||||
my $domain = $parser->parse_string($currxml);
|
||||
my @vmstoragediskobjs = $domain->findnodes("/domain/devices/disk");
|
||||
foreach my $vmstoragediskobj (@vmstoragediskobjs) {
|
||||
my ($vmstorage_file_obj, $vmstorage_block_obj);
|
||||
if (($vmstoragediskobj->getAttribute("device") eq "disk") and ($vmstoragediskobj->getAttribute("type") eq "file")) {
|
||||
my @vmstorageobj = $vmstoragediskobj->findnodes("./source");
|
||||
if (@vmstorageobj) {
|
||||
$vmstorage_file_obj = $vmstorageobj[0]->getAttribute("file");
|
||||
push @vms, "Disk file:" . $vmstorage_file_obj;
|
||||
}
|
||||
}
|
||||
if (($vmstoragediskobj->getAttribute("device") eq "disk") and ($vmstoragediskobj->getAttribute("type") eq "block")) {
|
||||
my @vmstorageobj = $vmstoragediskobj->findnodes("./source");
|
||||
if (@vmstorageobj) {
|
||||
$vmstorage_block_obj = $vmstorageobj[0]->getAttribute("dev");
|
||||
push @vms, "Disk object:" . $vmstorage_block_obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Processing lsvm for hypervisor, display a list of VMs on that hypervisor
|
||||
foreach (@doms) {
|
||||
push @vms, $_->get_name();
|
||||
}
|
||||
}
|
||||
# Check if we were able to get any data
|
||||
unless (@vms) {
|
||||
push @vms, "Could not get any information about specified object";
|
||||
}
|
||||
return (0, @vms);
|
||||
}
|
||||
@@ -3547,7 +3623,7 @@ sub guestcmd {
|
||||
} elsif ($command eq "getcons") {
|
||||
return getcons($node, @args);
|
||||
} elsif ($command eq "lsvm") {
|
||||
return lsvm($node, @args);
|
||||
return lsvm($hyp, $node, @args);
|
||||
} elsif ($command eq "rscan") {
|
||||
return rscan($node, @args);
|
||||
}
|
||||
@@ -3783,7 +3859,7 @@ sub process_request {
|
||||
if ($::XCATSITEVALS{usexhrm}) { $use_xhrm = 1; }
|
||||
$vmtab = xCAT::Table->new("vm");
|
||||
$confdata = {};
|
||||
unless ($command eq 'lsvm' or $command eq 'rscan') {
|
||||
unless ($command eq 'rscan') {
|
||||
xCAT::VMCommon::grab_table_data($noderange, $confdata, $callback);
|
||||
# Add debug info for issue 1958, the rmvm issue
|
||||
my $test_file_fd;
|
||||
@@ -3824,7 +3900,8 @@ sub process_request {
|
||||
my $inputs = new IO::Select;
|
||||
my $sub_fds = new IO::Select;
|
||||
%hyphash = ();
|
||||
if ($command eq 'lsvm' or $command eq 'rscan') { #command intended for hypervisors, not guests
|
||||
|
||||
if ($command eq 'rscan') { #command intended for hypervisors, not guests
|
||||
foreach (@$noderange) { $hyphash{$_}->{nodes}->{$_} = 1; }
|
||||
} else {
|
||||
foreach (keys %{ $confdata->{vm} }) {
|
||||
@@ -3868,6 +3945,12 @@ sub process_request {
|
||||
# foreach (keys %orphans) {
|
||||
# $hyphash{'!@!XCATDUMMYHYPERVISOR!@!'}->{nodes}->{$_}=1;
|
||||
# }
|
||||
} elsif ($command eq "lsvm") {
|
||||
# Special processing for lsvm command, which takes vm name or hypervisor name
|
||||
unless (%hyphash) {
|
||||
# if hyperhash has not been set already, we are processing vms, set it here
|
||||
foreach (@$noderange) { $hyphash{$_}->{nodes}->{$_} = 1; }
|
||||
}
|
||||
} else {
|
||||
$callback->({ error => "Can't find " . join(",", keys %orphans), errorcode => [1] });
|
||||
return;
|
||||
@@ -4000,7 +4083,6 @@ sub dohyp {
|
||||
$offlinehyps{$hyp} = 1;
|
||||
}
|
||||
|
||||
|
||||
eval { #Contain Sys::Virt bugs that make $@ useless
|
||||
if ($hyp eq '!@!XCATDUMMYHYPERVISOR!@!') { #Fake connection for commands that have a fake hypervisor key
|
||||
$hypconn = 1;
|
||||
@@ -4031,7 +4113,7 @@ sub dohyp {
|
||||
return 1, "General error establishing libvirt communication";
|
||||
}
|
||||
}
|
||||
if (($command eq 'mkvm' or $command eq 'chvm' or $command eq 'rpower') and $hypconn) {
|
||||
if (($command =~ /^mkvm$|^chvm$|^rpower$|^lsvm$/) and $hypconn) {
|
||||
my $nodeinfo = $hypconn->get_node_info();
|
||||
if (exists($nodeinfo->{model})) {
|
||||
$confdata->{$hyp}->{cpumodel} = $nodeinfo->{model};
|
||||
|
||||
@@ -15,31 +15,30 @@ use lib "$::XCATROOT/lib/perl";
|
||||
use strict;
|
||||
use warnings "all";
|
||||
|
||||
use JSON;
|
||||
use HTTP::Async;
|
||||
use HTTP::Cookies;
|
||||
use File::Basename;
|
||||
use Data::Dumper;
|
||||
use Getopt::Long;
|
||||
use xCAT::OPENBMC;
|
||||
use xCAT::Utils;
|
||||
use xCAT::Table;
|
||||
use xCAT::Usage;
|
||||
use xCAT::SvrUtils;
|
||||
use File::Basename;
|
||||
use Data::Dumper;
|
||||
use JSON;
|
||||
|
||||
$::OPENBMC_DEVEL = $ENV{'OPENBMC_DEVEL'};
|
||||
|
||||
use xCAT::GlobalDef;
|
||||
use xCAT_monitoring::monitorctrl;
|
||||
|
||||
sub unsupported {
|
||||
my $callback = shift;
|
||||
if (defined($::OPENBMC_DEVEL) && ($::OPENBMC_DEVEL eq "YES")) {
|
||||
xCAT::SvrUtils::sendmsg("Warning: Currently running development code, use at your own risk. Unset OPENBMC_DEVEL and `restartxcatd` to disable.", $callback);
|
||||
xCAT::SvrUtils::sendmsg("Warning: Currently running development code, use at your own risk. Unset XCAT_OPENBMC_DEVEL to disable.", $callback);
|
||||
return;
|
||||
} else {
|
||||
return ([ 1, "This openbmc related function is unsupported and disabled. To bypass, run the following: \n\texport OPENBMC_DEVEL=YES\n\trestartxcatd" ]);
|
||||
return ([ 1, "This openbmc related function is unsupported and disabled. To bypass, run the following: \n\texport XCAT_OPENBMC_DEVEL=YES" ]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 handled_commands
|
||||
@@ -51,17 +50,17 @@ sub unsupported {
|
||||
#-------------------------------------------------------
|
||||
sub handled_commands {
|
||||
return {
|
||||
rpower => 'nodehm:mgt',
|
||||
rinv => 'nodehm:mgt',
|
||||
getopenbmccons => 'nodehm:cons',
|
||||
rsetboot => 'nodehm:mgt',
|
||||
rspconfig => 'nodehm:mgt',
|
||||
rvitals => 'nodehm:mgt',
|
||||
rflash => 'nodehm:mgt',
|
||||
reventlog => 'nodehm:mgt',
|
||||
rspreset => 'nodehm:mgt',
|
||||
rbeacon => 'nodehm:mgt',
|
||||
renergy => 'nodehm:mgt',
|
||||
reventlog => 'nodehm:mgt',
|
||||
rflash => 'nodehm:mgt',
|
||||
rinv => 'nodehm:mgt',
|
||||
rpower => 'nodehm:mgt',
|
||||
rsetboot => 'nodehm:mgt',
|
||||
rspconfig => 'nodehm:mgt',
|
||||
rspreset => 'nodehm:mgt',
|
||||
rvitals => 'nodehm:mgt',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -83,6 +82,30 @@ my %status_info = (
|
||||
process => \&login_response,
|
||||
},
|
||||
|
||||
REVENTLOG_REQUEST => {
|
||||
method => "GET",
|
||||
init_url => "$openbmc_project_url/logging/enumerate",
|
||||
},
|
||||
REVENTLOG_RESPONSE => {
|
||||
process => \&reventlog_response,
|
||||
},
|
||||
REVENTLOG_CLEAR_REQUEST => {
|
||||
method => "POST",
|
||||
init_url => "$openbmc_url/records/events/action/clear",
|
||||
data => "",
|
||||
},
|
||||
REVENTLOG_CLEAR_RESPONSE => {
|
||||
process => \&reventlog_response,
|
||||
},
|
||||
|
||||
RINV_REQUEST => {
|
||||
method => "GET",
|
||||
init_url => "$openbmc_project_url/inventory/enumerate",
|
||||
},
|
||||
RINV_RESPONSE => {
|
||||
process => \&rinv_response,
|
||||
},
|
||||
|
||||
RPOWER_ON_REQUEST => {
|
||||
method => "PUT",
|
||||
init_url => "$openbmc_project_url/state/host0/attr/RequestedHostTransition",
|
||||
@@ -115,15 +138,48 @@ my %status_info = (
|
||||
process => \&rpower_response,
|
||||
},
|
||||
|
||||
RINV_REQUEST => {
|
||||
method => "GET",
|
||||
init_url => "$openbmc_url/inventory/enumerate",
|
||||
RSETBOOT_SET_REQUEST => {
|
||||
method => "PUT",
|
||||
init_url => "",
|
||||
},
|
||||
RINV_RESPONSE => {
|
||||
process => \&rinv_response,
|
||||
RSETBOOT_SET_RESPONSE => {
|
||||
process => \&rsetboot_response,
|
||||
},
|
||||
RSETBOOT_STATUS_REQUEST => {
|
||||
method => "GET",
|
||||
init_url => "",
|
||||
},
|
||||
RSETBOOT_STATUS_RESPONSE => {
|
||||
process => \&rsetboot_response,
|
||||
},
|
||||
|
||||
RSPCONFIG_GET_REQUEST => {
|
||||
method => "GET",
|
||||
init_url => "",
|
||||
},
|
||||
RSPCONFIG_GET_RESPONSE => {
|
||||
process => \&rspconfig_response,
|
||||
},
|
||||
RSPCONFIG_SET_REQUEST => {
|
||||
method => "POST",
|
||||
init_url => "",
|
||||
data => "",
|
||||
},
|
||||
RSPCONFIG_SET_RESPONSE => {
|
||||
process => \&rspconfig_response,
|
||||
},
|
||||
RVITALS_REQUEST => {
|
||||
method => "GET",
|
||||
init_url => "$openbmc_project_url/sensors/enumerate",
|
||||
},
|
||||
RVITALS_RESPONSE => {
|
||||
process => \&rvitals_response,
|
||||
},
|
||||
);
|
||||
|
||||
$::RESPONSE_OK = "200 OK";
|
||||
$::RESPONSE_SERVER_ERROR = "500 Internal Server Error";
|
||||
$::RESPONSE_SERVICE_UNAVAILABLE = "503 Service Unavailable";
|
||||
|
||||
#-----------------------------
|
||||
|
||||
@@ -137,11 +193,10 @@ my %status_info = (
|
||||
cur_status => "LOGIN_REQUEST",
|
||||
cur_url => "",
|
||||
method => "",
|
||||
back_urls => (),
|
||||
},
|
||||
);
|
||||
|
||||
'cur_url', 'method', 'back_urls' used for path has a trailing-slash
|
||||
'cur_url', 'method' used for path has a trailing-slash
|
||||
|
||||
=cut
|
||||
|
||||
@@ -176,6 +231,16 @@ sub preprocess_request {
|
||||
return [$request];
|
||||
}
|
||||
|
||||
##############################################
|
||||
# Delete this when could be released
|
||||
|
||||
if (ref($request->{environment}) eq 'ARRAY' and ref($request->{environment}->[0]->{XCAT_OPENBMC_DEVEL}) eq 'ARRAY') {
|
||||
$::OPENBMC_DEVEL = $request->{environment}->[0]->{XCAT_OPENBMC_DEVEL}->[0];
|
||||
} else {
|
||||
$::OPENBMC_DEVEL = $request->{environment}->{XCAT_OPENBMC_DEVEL};
|
||||
}
|
||||
##############################################
|
||||
|
||||
$callback = shift;
|
||||
|
||||
my $command = $request->{command}->[0];
|
||||
@@ -194,9 +259,9 @@ sub preprocess_request {
|
||||
return;
|
||||
}
|
||||
|
||||
my $parse_result = parse_args($command, $extrargs);
|
||||
my $parse_result = parse_args($command, $extrargs, $noderange);
|
||||
if (ref($parse_result) eq 'ARRAY') {
|
||||
$callback->({ errorcode => $parse_result->[0], data => $parse_result->[1] });
|
||||
$callback->({ errorcode => [$parse_result->[0]], data => [$parse_result->[1]] });
|
||||
$request = {};
|
||||
return;
|
||||
}
|
||||
@@ -227,16 +292,21 @@ sub process_request {
|
||||
my $command = $request->{command}->[0];
|
||||
my $noderange = $request->{node};
|
||||
|
||||
parse_node_info($noderange);
|
||||
parse_command_status($command);
|
||||
my $check = parse_node_info($noderange);
|
||||
my $rst = parse_command_status($command);
|
||||
return if ($rst);
|
||||
|
||||
$cookie_jar = HTTP::Cookies->new({});
|
||||
$async = HTTP::Async->new(
|
||||
cookie_jar => $cookie_jar,
|
||||
ssl_options => {
|
||||
SSL_verify_mode => 0,
|
||||
},
|
||||
);
|
||||
if ($request->{command}->[0] ne "getopenbmccons") {
|
||||
$cookie_jar = HTTP::Cookies->new({});
|
||||
$async = HTTP::Async->new(
|
||||
cookie_jar => $cookie_jar,
|
||||
timeout => 10,
|
||||
max_request_time => 60,
|
||||
ssl_options => {
|
||||
SSL_verify_mode => 0,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
my $bmcip;
|
||||
my $login_url;
|
||||
@@ -247,13 +317,17 @@ sub process_request {
|
||||
|
||||
foreach my $node (keys %node_info) {
|
||||
$bmcip = $node_info{$node}{bmc};
|
||||
$login_url = "$http_protocol://$bmcip/login";
|
||||
$content = '{"data": [ "' . $node_info{$node}{username} .'", "' . $node_info{$node}{password} . '" ] }';
|
||||
$handle_id = xCAT::OPENBMC->new($async, $login_url, $content);
|
||||
$handle_id_node{$handle_id} = $node;
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
print "$node: DEBUG POST $login_url -d $content\n";
|
||||
push @donargs, [ $node,$bmcip,$node_info{$node}{username}, $node_info{$node}{password}];
|
||||
|
||||
if ($request->{command}->[0] eq "getopenbmccons") {
|
||||
push @donargs, [ $node,$bmcip,$node_info{$node}{username}, $node_info{$node}{password}];
|
||||
} else {
|
||||
$login_url = "$http_protocol://$bmcip/login";
|
||||
$content = '{"data": [ "' . $node_info{$node}{username} .'", "' . $node_info{$node}{password} . '" ] }';
|
||||
$handle_id = xCAT::OPENBMC->new($async, $login_url, $content);
|
||||
$handle_id_node{$handle_id} = $node;
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
print "$node: DEBUG POST $login_url -d $content\n";
|
||||
}
|
||||
}
|
||||
|
||||
#process rcons
|
||||
@@ -264,7 +338,6 @@ sub process_request {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
while (1) {
|
||||
last unless ($wait_node_num);
|
||||
while (my ($response, $handle_id) = $async->wait_for_next_response) {
|
||||
@@ -272,6 +345,7 @@ sub process_request {
|
||||
}
|
||||
}
|
||||
|
||||
$callback->({ errorcode => $check }) if ($check);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -287,37 +361,87 @@ sub process_request {
|
||||
sub parse_args {
|
||||
my $command = shift;
|
||||
my $extrargs = shift;
|
||||
my $noderange = shift;
|
||||
my $check = undef;
|
||||
|
||||
if (!defined($extrargs) and $command =~ /rpower|rsetboot|rspconfig/) {
|
||||
return ([ 1, "No option specified for $command" ]);
|
||||
}
|
||||
|
||||
if (scalar(@ARGV) > 1) {
|
||||
if (scalar(@ARGV) > 1 and ($command =~ /rpower|rinv|rsetboot|rvitals/)) {
|
||||
return ([ 1, "Only one option is supported at the same time" ]);
|
||||
}
|
||||
|
||||
my $subcommand = $ARGV[0];
|
||||
if ($command eq "rpower") {
|
||||
#
|
||||
# disable function until fully tested
|
||||
# disable function until fully tested
|
||||
#
|
||||
$check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; }
|
||||
|
||||
if (!defined($extrargs)) {
|
||||
return ([ 1, "No option specified for rpower" ]);
|
||||
}
|
||||
unless ($subcommand =~ /^on$|^off$|^reset$|^boot$|^status$|^stat$|^state$/) {
|
||||
return ([ 1, "Unsupported command: $command $subcommand" ]);
|
||||
}
|
||||
} elsif ($command eq "rinv") {
|
||||
#
|
||||
# disable function until fully tested
|
||||
# disable function until fully tested
|
||||
#
|
||||
$check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; }
|
||||
|
||||
|
||||
unless ($subcommand =~ /^cpu$|^dimm$|^bios$|^all$/) {
|
||||
$subcommand = "all" if (!defined($ARGV[0]));
|
||||
unless ($subcommand =~ /^cpu$|^dimm$|^model$|^serial$|^firm$|^mac$|^vpd$|^mprom$|^deviceid$|^guid$|^uuid$|^all$/) {
|
||||
return ([ 1, "Unsupported command: $command $subcommand" ]);
|
||||
}
|
||||
} elsif ($command eq "getopenbmccons") {
|
||||
#command for openbmc rcons
|
||||
} elsif ($command eq "rsetboot") {
|
||||
#
|
||||
# disable function until fully tested
|
||||
#
|
||||
$check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; }
|
||||
unless ($subcommand =~ /^net$|^hd$|^cd$|^def$|^default$|^stat$/) {
|
||||
return ([ 1, "Unsupported command: $command $subcommand" ]);
|
||||
}
|
||||
} elsif ($command eq "reventlog") {
|
||||
#
|
||||
# disable function until fully tested
|
||||
#
|
||||
$check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; }
|
||||
$subcommand = "all" if (!defined($ARGV[0]));
|
||||
unless ($subcommand =~ /^\d$|^\d+$|^all$|^clear$/) {
|
||||
return ([ 1, "Unsupported command: $command $subcommand" ]);
|
||||
}
|
||||
} elsif ($command eq "rspconfig") {
|
||||
#
|
||||
# disable function until fully tested
|
||||
#
|
||||
$check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; }
|
||||
my $setorget;
|
||||
foreach $subcommand (@ARGV) {
|
||||
if ($subcommand =~ /^(\w+)=(.*)/) {
|
||||
return ([ 1, "Can not configure and display nodes' value at the same time" ]) if ($setorget and $setorget eq "get");
|
||||
my $key = $1;
|
||||
my $value = $2;
|
||||
return ([ 1, "Unsupported command: $command $key" ]) unless ($key =~ /^ip$|^netmask$|^gateway$|^vlan$/);
|
||||
|
||||
my $nodes_num = @$noderange;
|
||||
return ([ 1, "Invalid parameter for option $key" ]) unless ($value);
|
||||
return ([ 1, "Invalid parameter for option $key: $value" ]) unless (xCAT::NetworkUtils->isIpaddr($value));
|
||||
if ($key eq "ip") {
|
||||
return ([ 1, "Can not configure more than 1 nodes' ip at the same time" ]) if ($nodes_num >= 2);
|
||||
}
|
||||
$setorget = "set";
|
||||
} elsif ($subcommand =~ /^ip$|^netmask$|^gateway$|^vlan$/) {
|
||||
return ([ 1, "Can not configure and display nodes' value at the same time" ]) if ($setorget and $setorget eq "set");
|
||||
$setorget = "get";
|
||||
} else {
|
||||
return ([ 1, "Unsupported command: $command $subcommand" ]);
|
||||
}
|
||||
}
|
||||
} elsif ($command eq "rvitals") {
|
||||
$check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; }
|
||||
$subcommand = "all" if (!defined($ARGV[0]));
|
||||
unless ($subcommand =~ /^temp$|^voltage$|^wattage$|^fanspeed$|^power$|^leds$|^all$/) {
|
||||
return ([ 1, "Unsupported command: $command $subcommand" ]);
|
||||
}
|
||||
} else {
|
||||
return ([ 1, "Command is not supported." ]);
|
||||
}
|
||||
@@ -336,11 +460,12 @@ sub parse_args {
|
||||
#-------------------------------------------------------
|
||||
sub parse_command_status {
|
||||
my $command = shift;
|
||||
my $subcommand;
|
||||
|
||||
$next_status{LOGIN_REQUEST} = "LOGIN_RESPONSE";
|
||||
|
||||
if ($command eq "rpower") {
|
||||
my $subcommand = $ARGV[0];
|
||||
$subcommand = $ARGV[0];
|
||||
|
||||
if ($subcommand eq "on") {
|
||||
$next_status{LOGIN_RESPONSE} = "RPOWER_ON_REQUEST";
|
||||
@@ -365,16 +490,105 @@ sub parse_command_status {
|
||||
}
|
||||
|
||||
if ($command eq "rinv") {
|
||||
my $subcommand = $ARGV[0];
|
||||
if (defined($ARGV[0])) {
|
||||
$subcommand = $ARGV[0];
|
||||
} else {
|
||||
$subcommand = "all";
|
||||
}
|
||||
|
||||
if ($subcommand eq "cpu" or $subcommand eq "dimm" or $subcommand eq "bios" or $subcommand eq "all") {
|
||||
$next_status{LOGIN_RESPONSE} = "RINV_REQUEST";
|
||||
$next_status{RINV_REQUEST} = "RINV_RESPONSE";
|
||||
$status_info{RINV_RESPONSE}{argv} = "$subcommand";
|
||||
$next_status{LOGIN_RESPONSE} = "RINV_REQUEST";
|
||||
$next_status{RINV_REQUEST} = "RINV_RESPONSE";
|
||||
$status_info{RINV_RESPONSE}{argv} = "$subcommand";
|
||||
}
|
||||
|
||||
if ($command eq "rsetboot") {
|
||||
my $persistent = 0;
|
||||
unless (GetOptions("p" => \$persistent,)) {
|
||||
xCAT::SvrUtils::sendmsg("Error parsing arguments.", $callback);
|
||||
return 1;
|
||||
}
|
||||
|
||||
$subcommand = $ARGV[0];
|
||||
if ($subcommand =~ /^hd$|^net$|^cd$|^default$|^def$/) {
|
||||
$next_status{LOGIN_RESPONSE} = "RSETBOOT_SET_REQUEST";
|
||||
$next_status{RSETBOOT_SET_REQUEST} = "RSETBOOT_SET_RESPONSE";
|
||||
# modify $status_info{RSETBOOT_SET_REQUEST}{data}
|
||||
$next_status{RSETBOOT_SET_RESPONSE} = "RSETBOOT_STATUS_REQUEST";
|
||||
$next_status{RSETBOOT_STATUS_REQUEST} = "RSETBOOT_STATUS_RESPONSE";
|
||||
} elsif ($subcommand eq "stat") {
|
||||
$next_status{LOGIN_RESPONSE} = "RSETBOOT_STATUS_REQUEST";
|
||||
$next_status{RSETBOOT_STATUS_REQUEST} = "RSETBOOT_STATUS_RESPONSE";
|
||||
}
|
||||
xCAT::SvrUtils::sendmsg("Command $command is not available now!", $callback);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ($command eq "reventlog") {
|
||||
my $option_s = 0;
|
||||
unless (GetOptions("s" => \$option_s,)) {
|
||||
xCAT::SvrUtils::sendmsg("Error parsing arguments.", $callback);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (defined($ARGV[0])) {
|
||||
$subcommand = $ARGV[0];
|
||||
} else {
|
||||
$subcommand = "all";
|
||||
}
|
||||
|
||||
if ($subcommand eq "clear") {
|
||||
$next_status{LOGIN_RESPONSE} = "REVENTLOG_CLEAR_REQUEST";
|
||||
$next_status{REVENTLOG_CLEAR_REQUEST} = "REVENTLOG_CLEAR_RESPONSE";
|
||||
xCAT::SvrUtils::sendmsg("Command $command is not available now!", $callback);
|
||||
return 1;
|
||||
} else {
|
||||
$next_status{LOGIN_RESPONSE} = "REVENTLOG_REQUEST";
|
||||
$next_status{REVENTLOG_REQUEST} = "REVENTLOG_RESPONSE";
|
||||
$status_info{REVENTLOG_RESPONSE}{argv} = "$subcommand";
|
||||
$status_info{REVENTLOG_RESPONSE}{argv} .= ",s" if ($option_s);
|
||||
}
|
||||
}
|
||||
|
||||
if ($command eq "rspconfig") {
|
||||
my @options = ();
|
||||
foreach $subcommand (@ARGV) {
|
||||
if ($subcommand =~ /^ip$|^netmask$|^gateway$/) {
|
||||
$next_status{LOGIN_RESPONSE} = "RSPCONFIG_GET_REQUEST";
|
||||
$next_status{RSPCONFIG_GET_REQUEST} = "RSPCONFIG_GET_RESPONSE";
|
||||
push @options, $subcommand;
|
||||
} elsif ($subcommand =~ /^(\w+)=(.+)/) {
|
||||
my $key = $1;
|
||||
my $value = $2;
|
||||
$next_status{LOGIN_RESPONSE} = "RSPCONFIG_SET_REQUEST";
|
||||
$next_status{RSPCONFIG_SET_REQUEST} = "RSPCONFIG_SET_RESPONSE";
|
||||
$next_status{RSPCONFIG_SET_RESPONSE} = "RSPCONFIG_GET_REQUEST";
|
||||
$next_status{RSPCONFIG_GET_REQUEST} = "RSPCONFIG_GET_RESPONSE";
|
||||
if ($key eq "ip") {
|
||||
$status_info{RSPCONFIG_SET_RESPONSE}{ip} = $value;
|
||||
}
|
||||
$status_info{RSPCONFIG_SET_REQUEST}{data} = ""; # wait for interface, ip/netmask/gateway is $value
|
||||
push @options, $key;
|
||||
}
|
||||
}
|
||||
$next_status{RSPCONFIG_GET_RESPONSE}{argv} = join(",", @options);
|
||||
xCAT::SvrUtils::sendmsg("Command $command is not available now!", $callback);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ($command eq "rvitals") {
|
||||
if (defined($ARGV[0])) {
|
||||
$subcommand = $ARGV[0];
|
||||
} else {
|
||||
$subcommand = "all";
|
||||
}
|
||||
|
||||
$next_status{LOGIN_RESPONSE} = "RVITALS_REQUEST";
|
||||
$next_status{RVITALS_REQUEST} = "RVITALS_RESPONSE";
|
||||
$status_info{RVITALS_RESPONSE}{argv} = "$subcommand";
|
||||
}
|
||||
|
||||
print Dumper(\%next_status) . "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
@@ -388,6 +602,7 @@ sub parse_command_status {
|
||||
#-------------------------------------------------------
|
||||
sub parse_node_info {
|
||||
my $noderange = shift;
|
||||
my $rst = 0;
|
||||
|
||||
my $passwd_table = xCAT::Table->new('passwd');
|
||||
my $passwd_hash = $passwd_table->getAttribs({ 'key' => 'openbmc' }, qw(username password));
|
||||
@@ -401,6 +616,7 @@ sub parse_node_info {
|
||||
$node_info{$node}{bmc} = $openbmc_hash->{$node}->[0]->{'bmc'};
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("Unable to get attribute bmc", $callback, $node);
|
||||
$rst = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
@@ -411,6 +627,7 @@ sub parse_node_info {
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("Unable to get attribute username", $callback, $node);
|
||||
delete $node_info{$node};
|
||||
$rst = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
@@ -421,19 +638,21 @@ sub parse_node_info {
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("Unable to get attribute password", $callback, $node);
|
||||
delete $node_info{$node};
|
||||
$rst = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
$node_info{$node}{cur_status} = "LOGIN_REQUEST";
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("Unable to get information from openbmc table", $callback, $node);
|
||||
$rst = 1;
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
print Dumper(\%node_info) ."\n";
|
||||
|
||||
return;
|
||||
return $rst;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
@@ -511,13 +730,15 @@ sub deal_with_response {
|
||||
|
||||
delete $handle_id_node{$handle_id};
|
||||
|
||||
if ($response->status_line ne "200 OK") {
|
||||
print "$node: DEBUG " . lc ($node_info{$node}{cur_status}) . " " . $response->status_line . "\n";
|
||||
|
||||
if ($response->status_line ne $::RESPONSE_OK) {
|
||||
my $error;
|
||||
if ($response->status_line eq "503 Service Unavailable") {
|
||||
if ($response->status_line eq $::RESPONSE_SERVICE_UNAVAILABLE) {
|
||||
$error = "Service Unavailable";
|
||||
} else {
|
||||
my $response_info = decode_json $response->content;
|
||||
if ($response->status_line eq "500 Internal Server Error") {
|
||||
if ($response->status_line eq $::RESPONSE_SERVER_ERROR) {
|
||||
$error = $response_info->{'data'}->{'exception'};
|
||||
} elsif ($response_info->{'data'}->{'description'} =~ /path or object not found: (.+)/) {
|
||||
$error = "path or object not found $1";
|
||||
@@ -530,8 +751,6 @@ sub deal_with_response {
|
||||
return;
|
||||
}
|
||||
|
||||
print "$node: DEBUG " . lc ($node_info{$node}{cur_status}) . " " . $response->status_line . "\n";
|
||||
|
||||
$status_info{ $node_info{$node}{cur_status} }->{process}->($node, $response);
|
||||
|
||||
return;
|
||||
@@ -576,29 +795,44 @@ sub login_response {
|
||||
sub rpower_response {
|
||||
my $node = shift;
|
||||
my $response = shift;
|
||||
my %new_status = ();
|
||||
|
||||
my $response_info = decode_json $response->content;
|
||||
|
||||
foreach my $key (keys %{$response_info->{data}}) {
|
||||
# Debug, print out the Current and Transition States
|
||||
print "$node: DEBUG host_states $key=$response_info->{'data'}->{$key}\n";
|
||||
}
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RPOWER_ON_RESPONSE") {
|
||||
if ($response_info->{'message'} eq "200 OK") {
|
||||
if ($response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
xCAT::SvrUtils::sendmsg("on", $callback, $node);
|
||||
$new_status{$::STATUS_POWERING_ON} = [$node];
|
||||
}
|
||||
}
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RPOWER_OFF_RESPONSE") {
|
||||
if ($response_info->{'message'} eq "200 OK") {
|
||||
if ($response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
xCAT::SvrUtils::sendmsg("off", $callback, $node);
|
||||
$new_status{$::STATUS_POWERING_OFF} = [$node];
|
||||
}
|
||||
}
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RPOWER_RESET_RESPONSE") {
|
||||
if ($response_info->{'message'} eq "200 OK") {
|
||||
if ($response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
xCAT::SvrUtils::sendmsg("reset", $callback, $node);
|
||||
$new_status{$::STATUS_POWERING_ON} = [$node];
|
||||
}
|
||||
}
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RPOWER_STATUS_RESPONSE") {
|
||||
xCAT::SvrUtils::sendmsg($response_info->{'data'}->{CurrentHostState}, $callback, $node);
|
||||
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%new_status, 1) if (%new_status);
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RPOWER_STATUS_RESPONSE" and !$next_status{ $node_info{$node}{cur_status} }) {
|
||||
if ($response_info->{'data'}->{CurrentHostState} =~ /Off$/) {
|
||||
xCAT::SvrUtils::sendmsg("off", $callback, $node);
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("on", $callback, $node);
|
||||
}
|
||||
}
|
||||
|
||||
if ($next_status{ $node_info{$node}{cur_status} }) {
|
||||
@@ -642,14 +876,49 @@ sub rinv_response {
|
||||
my $content_info;
|
||||
|
||||
foreach my $key_url (keys %{$response_info->{data}}) {
|
||||
if ($grep_string eq "all" or $key_url =~ /\/$grep_string/) {
|
||||
my %content = %{ ${ $response_info->{data} }{$key_url} };
|
||||
|
||||
if (($grep_string eq "vpd" or $grep_string eq "model") and $key_url =~ /\/motherboard$/) {
|
||||
my $partnumber = "BOARD Part Number: " . "$content{PartNumber}";
|
||||
xCAT::SvrUtils::sendmsg("$partnumber", $callback, $node);
|
||||
next if ($grep_string eq "model");
|
||||
}
|
||||
|
||||
if (($grep_string eq "vpd" or $grep_string eq "serial") and $key_url =~ /\/motherboard$/) {
|
||||
my $serialnumber = "BOARD Serial Number: " . "$content{SerialNumber}";
|
||||
xCAT::SvrUtils::sendmsg("$serialnumber", $callback, $node);
|
||||
next if ($grep_string eq "serial");
|
||||
}
|
||||
|
||||
if (($grep_string eq "vpd" or $grep_string eq "mprom")) {
|
||||
# wait for interface
|
||||
}
|
||||
|
||||
if (($grep_string eq "vpd" or $grep_string eq "deviceid")) {
|
||||
# wait for interface
|
||||
}
|
||||
|
||||
if ($grep_string eq "uuid") {
|
||||
# wait for interface
|
||||
}
|
||||
|
||||
if ($grep_string eq "guid") {
|
||||
# wait for interface
|
||||
}
|
||||
|
||||
if ($grep_string eq "mac" and $key_url =~ /\/ethernet/) {
|
||||
my $macaddress = "MAC: " . $content{MACAddress};
|
||||
xCAT::SvrUtils::sendmsg("$macaddress", $callback, $node);
|
||||
next;
|
||||
}
|
||||
|
||||
if ($grep_string eq "all" or $key_url =~ /\/$grep_string/ or ($grep_string eq "firm" and defined($content{Name}) and $content{Name} eq "OpenPOWER Firmware")) {
|
||||
if ($key_url =~ /\/(cpu\d*)\/(\w+)/) {
|
||||
$src = "$1 $2";
|
||||
} else {
|
||||
$src = basename $key_url;
|
||||
}
|
||||
|
||||
my %content = %{ ${ $response_info->{data} }{$key_url} };
|
||||
foreach my $key (keys %content) {
|
||||
$content_info = uc ($src) . " " . $key . " : " . $content{$key};
|
||||
xCAT::SvrUtils::sendmsg("$content_info", $callback, $node);
|
||||
@@ -695,6 +964,202 @@ sub getopenbmccons {
|
||||
return $rsp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 rsetboot_response
|
||||
|
||||
Deal with response of rsetboot command
|
||||
Input:
|
||||
$node: nodename of current response
|
||||
$response: Async return response
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
sub rsetboot_response {
|
||||
my $node = shift;
|
||||
my $response = shift;
|
||||
|
||||
my $response_info = decode_json $response->content;
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RSETBOOT_GET_RESPONSE") {
|
||||
xCAT::SvrUtils::sendmsg("Hard Drive", $callback, $node); #if response data is hd
|
||||
xCAT::SvrUtils::sendmsg("Network", $callback, $node); #if response data is net
|
||||
xCAT::SvrUtils::sendmsg("CD/DVD", $callback, $node); #if response data is net
|
||||
xCAT::SvrUtils::sendmsg("boot override inactive", $callback, $node); #if response data is def
|
||||
}
|
||||
|
||||
if ($next_status{ $node_info{$node}{cur_status} }) {
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
gen_send_request($node);
|
||||
} else {
|
||||
$wait_node_num--;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 reventlog_response
|
||||
|
||||
Deal with response of reventlog command
|
||||
Input:
|
||||
$node: nodename of current response
|
||||
$response: Async return response
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
sub reventlog_response {
|
||||
my $node = shift;
|
||||
my $response = shift;
|
||||
|
||||
my $response_info = decode_json $response->content;
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "REVENTLOG_CLEAR_REQUEST") {
|
||||
if ($response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
xCAT::SvrUtils::sendmsg("clear", $callback, $node);
|
||||
}
|
||||
} else {
|
||||
my ($entry_string, $option_s) = split(",", $status_info{REVENTLOG_RESPONSE}{argv});
|
||||
my $content_info;
|
||||
my %output_s = () if ($option_s);
|
||||
my $entry_num = 0;
|
||||
$entry_string = "all" if ($entry_string eq "0");
|
||||
$entry_num = 0 + $entry_string if ($entry_string ne "all");
|
||||
|
||||
foreach my $key_url (keys %{$response_info->{data}}) {
|
||||
my %content = %{ ${ $response_info->{data} }{$key_url} };
|
||||
my $id_num = 0 + $content{Id} if ($content{Id});
|
||||
if (($entry_string eq "all" or ($id_num and ($entry_num ge $id_num))) and $content{Message}) {
|
||||
my $content_info = $content{Timestamp} . " " . $content{Message};
|
||||
if ($option_s) {
|
||||
$output_s{$id_num} = $content_info;
|
||||
$entry_num = $id_num if ($entry_num < $id_num);
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("$content_info", $callback, $node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (%output_s) {
|
||||
for (my $key = $entry_num; $key >= 1; $key--) {
|
||||
xCAT::SvrUtils::sendmsg("$output_s{$key}", $callback, $node) if ($output_s{$key});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($next_status{ $node_info{$node}{cur_status} }) {
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
gen_send_request($node);
|
||||
} else {
|
||||
$wait_node_num--;
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 rspconfig_response
|
||||
|
||||
Deal with response of rspconfig command
|
||||
Input:
|
||||
$node: nodename of current response
|
||||
$response: Async return response
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
sub rspconfig_response {
|
||||
my $node = shift;
|
||||
my $response = shift;
|
||||
|
||||
my $response_info = decode_json $response->content;
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RSPCONFIG_GET_RESPONSE") {
|
||||
my $grep_string = $status_info{RSPCONFIG_GET_RESPONSE}{argv};
|
||||
my $data;
|
||||
my @output;
|
||||
if ($grep_string =~ "ip") {
|
||||
$data = ""; # got data from response
|
||||
push @output, "BMC IP: $data";
|
||||
}
|
||||
if ($grep_string =~ "netmask") {
|
||||
$data = ""; # got data from response
|
||||
push @output, "BMC Netmask: $data";
|
||||
}
|
||||
if ($grep_string =~ "gateway") {
|
||||
$data = ""; # got data from response
|
||||
push @output, "BMC Gateway: $data";
|
||||
}
|
||||
if ($grep_string =~ "vlan") {
|
||||
$data = ""; # got data from response
|
||||
push @output, "BMC VLAN ID enabled: $data";
|
||||
}
|
||||
|
||||
xCAT::SvrUtils::sendmsg("$_", $callback, $node) foreach (@output);
|
||||
}
|
||||
|
||||
if ($node_info{$node}{cur_status} eq "RSPCONFIG_SET_RESPONSE" and $response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
if ($status_info{RSPCONFIG_SET_RESPONSE}{ip}) {
|
||||
$node_info{$node}{bmc} = $status_info{RSPCONFIG_SET_RESPONSE}{ip};
|
||||
print "$node: DEBUG BMC IP is $node_info{$node}{bmc}\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($next_status{ $node_info{$node}{cur_status} }) {
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
gen_send_request($node);
|
||||
} else {
|
||||
$wait_node_num--;
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
=head3 rvitals_response
|
||||
|
||||
Deal with response of rvitals command
|
||||
Input:
|
||||
$node: nodename of current response
|
||||
$response: Async return response
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------
|
||||
sub rvitals_response {
|
||||
my $node = shift;
|
||||
my $response = shift;
|
||||
|
||||
my $response_info = decode_json $response->content;
|
||||
|
||||
my $grep_string = $status_info{RVITALS_RESPONSE}{argv};
|
||||
my $src;
|
||||
my $content_info;
|
||||
my $sensor_value;
|
||||
|
||||
print "$node DEBUG Processing command: rvitals $grep_string \n";
|
||||
print Dumper(%{$response_info->{data}}) . "\n";
|
||||
|
||||
foreach my $key_url (keys %{$response_info->{data}}) {
|
||||
my %content = %{ ${ $response_info->{data} }{$key_url} };
|
||||
print Dumper(%content) . "\n";
|
||||
# $key_url is "/xyz/openbmc_project/sensors/xxx/yyy
|
||||
# For now display xxx/yyy as a label
|
||||
my ($junk, $label) = split("/sensors/", $key_url);
|
||||
$sensor_value = $label . " " . $content{Value};
|
||||
xCAT::SvrUtils::sendmsg("$sensor_value", $callback, $node);
|
||||
}
|
||||
|
||||
if ($next_status{ $node_info{$node}{cur_status} }) {
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
gen_send_request($node);
|
||||
} else {
|
||||
$wait_node_num--;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
@@ -203,8 +203,12 @@ sub setstate {
|
||||
} elsif ($kern and $kern->{kernel} and $cref and $cref->{currstate} ne "offline") {
|
||||
|
||||
#It's time to set petitboot for this node to boot the kernel, but only if not offline directive
|
||||
print $pcfg "default xCAT\n";
|
||||
print $pcfg "label xCAT\n";
|
||||
my $label = "xCAT";
|
||||
if ($cref->{currstate} eq "shell") {
|
||||
$label = "xCAT Genesis shell";
|
||||
}
|
||||
print $pcfg "default $label\n";
|
||||
print $pcfg "label $label\n";
|
||||
print $pcfg "\tkernel $kern->{kernel}\n";
|
||||
if ($kern and $kern->{initrd}) {
|
||||
print $pcfg "\tinitrd " . $kern->{initrd} . "\n";
|
||||
@@ -404,11 +408,31 @@ sub process_request {
|
||||
#if not shared tftpdir, then filter, otherwise, set up everything
|
||||
if ($request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command
|
||||
@nodes = ();
|
||||
my @hostinfo = xCAT::NetworkUtils->determinehostname();
|
||||
my $cur_xmaster = pop @hostinfo;
|
||||
xCAT::MsgUtils->trace(0, "d", "petitboot: running on $cur_xmaster");
|
||||
|
||||
# Get current server managed node list
|
||||
my $sn_hash = xCAT::ServiceNodeUtils->getSNformattedhash(\@rnodes, "xcat", "MN");
|
||||
my %managed = {};
|
||||
foreach (@{ $sn_hash->{$cur_xmaster} }) { $managed{$_} = 1; }
|
||||
|
||||
foreach (@rnodes) {
|
||||
if (xCAT::NetworkUtils->nodeonmynet($_)) {
|
||||
push @nodes, $_;
|
||||
} else {
|
||||
xCAT::MsgUtils->message("S", "$_: petitboot netboot: stop configuration because of none sharedtftp and not on same network with its xcatmaster.");
|
||||
my $msg = "petitboot configuration file was not created for node [$_] because sharedtftp attribute is not set and the node is not on same network as this xcatmaster";
|
||||
if ( $cur_xmaster ) {
|
||||
$msg .= ": $cur_xmaster";
|
||||
}
|
||||
if ( exists( $managed{$_} ) ) {
|
||||
# report error when it is under my control but I cannot handle it.
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = $msg;
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
} else {
|
||||
xCAT::MsgUtils->message("S", $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -477,7 +501,11 @@ sub process_request {
|
||||
if ($args[0] eq 'next') {
|
||||
$sub_req->({ command => ['rsetboot'],
|
||||
node => \@nodes,
|
||||
arg => ['default'] });
|
||||
arg => ['default'],
|
||||
#todo: do not need to pass the XCAT_OPENBMC_DEVEL after the openbmc dev work finish
|
||||
#this does not hurt anything for other plugins
|
||||
environment => {XCAT_OPENBMC_DEVEL=>"YES"}
|
||||
});
|
||||
xCAT::MsgUtils->message("S", "xCAT: petitboot netboot: clear node(s): @nodes boot device setting.");
|
||||
}
|
||||
my $chaintab = xCAT::Table->new('chain', -create => 1);
|
||||
@@ -545,21 +573,14 @@ sub process_request {
|
||||
if ($t_entry =~ /0|n|N/) { $do_dhcpsetup = 0; }
|
||||
}
|
||||
if ($do_dhcpsetup) {
|
||||
foreach my $node (@normalnodeset) {
|
||||
if ($request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command
|
||||
xCAT::MsgUtils->trace($verbose_on_off, "d", "petitboot: issue makedhcp request");
|
||||
$sub_req->({ command => ['makedhcp'],
|
||||
node => [$node],
|
||||
arg => ['-l'] }, $callback);
|
||||
|
||||
#arg=>['-l','-s','option conf-file \"'.$fpath.'\";']},$callback);
|
||||
} else {
|
||||
xCAT::MsgUtils->trace($verbose_on_off, "d", "petitboot: issue makedhcp request");
|
||||
$sub_req->({ command => ['makedhcp'],
|
||||
node => [$node] }, $callback);
|
||||
|
||||
#arg=>['-s','option conf-file \"'.$fpath.'\";']},$callback);
|
||||
}
|
||||
if ($::request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command
|
||||
xCAT::MsgUtils->trace($verbose_on_off, "d", "petitboot: issue makedhcp request");
|
||||
$sub_req->({ command => ['makedhcp'], arg => ['-l'],
|
||||
node => \@normalnodeset }, $callback);
|
||||
} else {
|
||||
xCAT::MsgUtils->trace($verbose_on_off, "d", "petitboot: issue makedhcp request");
|
||||
$sub_req->({ command => ['makedhcp'],
|
||||
node => \@normalnodeset }, $callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ sub rinstall {
|
||||
my @cmd = "Run command: nodeset @nodes @parameter";
|
||||
push @{ $rsp->{data} }, @cmd;
|
||||
push @{ $rsp->{data} }, @$res;
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
xCAT::MsgUtils->message("D", $rsp, $callback);
|
||||
}
|
||||
unless ($rc == 0) {
|
||||
|
||||
@@ -382,7 +382,7 @@ sub rinstall {
|
||||
foreach my $hmkey (keys %hmhash) {
|
||||
$::RUNCMD_RC = 0;
|
||||
my @nodes = @{ $hmhash{$hmkey} };
|
||||
unless (($hmkey =~ /^ipmi$/) or ($hmkey =~ /^blade$/) or ($hmkey =~ /^hmc$/) or ($hmkey =~ /^ivm$/) or ($hmkey =~ /^fsp$/) or ($hmkey =~ /^kvm$/) or ($hmkey =~ /^esx$/) or ($hmkey =~ /^rhevm$/)) {
|
||||
unless ($hmkey =~ /^(ipmi|blade|hmc|ivm|fsp|kvm|esx|rhevm|openbmc)$/) {
|
||||
my $rsp = {};
|
||||
$rsp->{error}->[0] = "@nodes: rinstall only support nodehm.mgt type 'ipmi', 'blade', 'hmc', 'ivm', 'fsp', 'kvm', 'esx', 'rhevm'.";
|
||||
$rsp->{errorcode}->[0] = 1;
|
||||
@@ -401,13 +401,14 @@ sub rinstall {
|
||||
},
|
||||
$subreq, -1, 1);
|
||||
|
||||
|
||||
$rc = $::RUNCMD_RC;
|
||||
my $rsp = {};
|
||||
if ($VERBOSE) {
|
||||
my @cmd = "Run command: rnetboot @nodes";
|
||||
push @{ $rsp->{data} }, @cmd;
|
||||
push @{ $rsp->{data} }, @$res;
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
xCAT::MsgUtils->message("D", $rsp, $callback);
|
||||
}
|
||||
unless ($rc == 0) {
|
||||
|
||||
@@ -435,8 +436,8 @@ sub rinstall {
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Call "rsetboot" to set the boot order of the nodehm.mgt=ipmi nodes
|
||||
if ($hmkey =~ /^ipmi$/) {
|
||||
# Call "rsetboot" to set the boot order of the nodehm.mgt=ipmi/openbmc nodes
|
||||
if ($hmkey =~ /^(ipmi|openbmc)$/) {
|
||||
%nodes = map { $_, 1 } @nodes;
|
||||
|
||||
# Run rsetboot $noderange net
|
||||
@@ -445,25 +446,33 @@ sub rinstall {
|
||||
if ($UEFIMODE) {
|
||||
push @rsetbootarg, "-u";
|
||||
}
|
||||
my $res =
|
||||
xCAT::Utils->runxcmd(
|
||||
{
|
||||
|
||||
my %req=(
|
||||
command => ["rsetboot"],
|
||||
node => \@nodes,
|
||||
arg => \@rsetbootarg
|
||||
},
|
||||
);
|
||||
|
||||
#TODO: When OPENBMC support is finished, this line should be removed
|
||||
if($hmkey =~ /^openbmc$/){
|
||||
$req{environment}{XCAT_OPENBMC_DEVEL}= "YES";
|
||||
}
|
||||
|
||||
my $res =
|
||||
xCAT::Utils->runxcmd(
|
||||
\%req,
|
||||
$subreq, -1, 1);
|
||||
|
||||
|
||||
$rc = $::RUNCMD_RC;
|
||||
my $rsp = {};
|
||||
if ($VERBOSE) {
|
||||
my @cmd = "Run command: rsetboot @nodes @rsetbootarg";
|
||||
push @{ $rsp->{data} }, @cmd;
|
||||
push @{ $rsp->{data} }, @$res;
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
xCAT::MsgUtils->message("D", $rsp, $callback);
|
||||
}
|
||||
unless ($rc == 0) {
|
||||
|
||||
# We got an error with the rsetboot
|
||||
my @successnodes;
|
||||
my @failurenodes;
|
||||
@@ -497,13 +506,20 @@ sub rinstall {
|
||||
# Run rpower $noderange boot
|
||||
my @rpowerarg;
|
||||
push @rpowerarg, "boot";
|
||||
my $res =
|
||||
xCAT::Utils->runxcmd(
|
||||
{
|
||||
my %req=(
|
||||
command => ["rpower"],
|
||||
node => \@nodes,
|
||||
arg => \@rpowerarg
|
||||
},
|
||||
);
|
||||
|
||||
#TODO: When OPENBMC support is finished, this line should be removed
|
||||
if($hmkey =~ /^openbmc$/){
|
||||
$req{environment}{XCAT_OPENBMC_DEVEL} = "YES";
|
||||
}
|
||||
|
||||
my $res =
|
||||
xCAT::Utils->runxcmd(
|
||||
\%req,
|
||||
$subreq, -1, 1);
|
||||
|
||||
$rc = $::RUNCMD_RC;
|
||||
@@ -512,10 +528,9 @@ sub rinstall {
|
||||
my @cmd = "Run command: rpower @nodes @rpowerarg";
|
||||
push @{ $rsp->{data} }, @cmd;
|
||||
push @{ $rsp->{data} }, @$res;
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
xCAT::MsgUtils->message("D", $rsp, $callback);
|
||||
}
|
||||
unless ($rc == 0) {
|
||||
|
||||
# We got an error with the rpower
|
||||
my @failurenodes;
|
||||
foreach my $line (@$res) {
|
||||
|
||||
@@ -449,11 +449,33 @@ sub process_request {
|
||||
#if not shared, then help sync up
|
||||
if ($::XNBA_request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command
|
||||
@nodes = ();
|
||||
my @hostinfo = xCAT::NetworkUtils->determinehostname();
|
||||
my $cur_xmaster = pop @hostinfo;
|
||||
xCAT::MsgUtils->trace(0, "d", "xnba: running on $cur_xmaster");
|
||||
|
||||
# Get current server managed node list
|
||||
my $sn_hash = xCAT::ServiceNodeUtils->getSNformattedhash(\@rnodes, "xcat", "MN");
|
||||
my %managed = {};
|
||||
foreach (@{ $sn_hash->{$cur_xmaster} }) { $managed{$_} = 1; }
|
||||
|
||||
# Whatever the node managed by this xcatmaster explicitly, if the node in same subnet, we need to handle its boot configuration files
|
||||
foreach (@rnodes) {
|
||||
if (xCAT::NetworkUtils->nodeonmynet($_)) {
|
||||
push @nodes, $_;
|
||||
} else {
|
||||
xCAT::MsgUtils->message("S", "$_: xnba netboot: stop configuration because of none sharedtftp and not on same network with its xcatmaster.");
|
||||
my $msg = "xnba configuration file was not created for node [$_] because sharedtftp attribute is not set and the node is not on same network as this xcatmaster";
|
||||
if ( $cur_xmaster ) {
|
||||
$msg .= ": $cur_xmaster";
|
||||
}
|
||||
if ( exists( $managed{$_} ) ) {
|
||||
# report error when it is under my control but I cannot handle it.
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = $msg;
|
||||
xCAT::MsgUtils->message("E", $rsp, $::XNBA_callback);
|
||||
} else {
|
||||
xCAT::MsgUtils->message("S", $msg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -124,7 +124,7 @@ my $iface = "lanplus";
|
||||
if (grep /IPMI Version : 1.5/, @mcinfo) {
|
||||
$solcom = "isol";
|
||||
$iface = "lan";
|
||||
} elsif (grep /Manufacturer ID : 343/, @mcinfo) {
|
||||
} elsif (grep /Manufacturer ID : 343/, @mcinfo && ! grep /Product ID : 117/,@mcinfo) {
|
||||
$isintel = 1;
|
||||
}
|
||||
my $inteloption = "";
|
||||
|
||||
@@ -141,8 +141,19 @@ if [ -z "$install_disk" ]; then
|
||||
disk_wwn=$(echo $output_for_wwn | $utolcmd)
|
||||
output_for_path=$(IFS= ;echo $disk_info | grep DEVPATH | cut -d "=" -f2)
|
||||
disk_path=$(echo $output_for_path | $utolcmd)
|
||||
disk_driver=$(udevadm info --attribute-walk --name=$disk | grep DRIVERS| grep -v '""'| grep -v '"sd"'|
|
||||
|
||||
# Work around the issue Pegas running on Power9 installation hang in anaconda
|
||||
# with "TypeError: argument of type 'NoneType' is not iterable",
|
||||
# after running of "udevadm info --attribute-walk --name=/dev/sda" in %pre section of kickstart
|
||||
cpu_model=$(awk '/model/ { print $NF }' /proc/cpuinfo)
|
||||
p9_bool=$(grep POWER9 /proc/cpuinfo|head -n 1|awk '{print $3}')
|
||||
anaconda --version >/dev/null 2>&1
|
||||
if [ $? -eq 0 ] && [ "$cpu_model" = "0000000000000000" ] && [ "$p9_bool" = "POWER9" ]; then
|
||||
disk_driver=""
|
||||
else
|
||||
disk_driver=$(udevadm info --attribute-walk --name=$disk | grep DRIVERS| grep -v '""'| grep -v '"sd"'|
|
||||
\head -n 1| sed -e 's/[^"]*"//' -e 's/"//' | $utolcmd)
|
||||
fi
|
||||
|
||||
echo "[get_install_disk]The disk $disk information: "
|
||||
echo "[get_install_disk] disk_wwn=$disk_wwn"
|
||||
|
||||
@@ -1657,9 +1657,12 @@ EOMS
|
||||
push @filestoadd, $_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($arch =~ /x86_64/) {
|
||||
push @filestoadd, "lib64/libnss_dns.so.2";
|
||||
#the path of libnss_dns.so.2 for ubuntu 14.4+
|
||||
push @filestoadd, "lib/x86_64-linux-gnu/libnss_dns.so.2";
|
||||
push @filestoadd, "lib64/libresolv.so.2";
|
||||
} elsif ($arch =~ /ppc64el/) {
|
||||
push @filestoadd, "lib/powerpc64le-linux-gnu/libnss_files.so.2";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#---------------------------------------------------------
|
||||
# Configure Ethnet BNT switches
|
||||
# Configure cumulus/onie switches
|
||||
#---------------------------------------------------------
|
||||
|
||||
BEGIN
|
||||
@@ -42,8 +42,6 @@ if (
|
||||
'switches=s' => \$::SWITCH,
|
||||
'port=s' => \$::PORT,
|
||||
'vlan=s' => \$::VLAN,
|
||||
'user=s' => \$::USER,
|
||||
'password=s' => \$::PASSWORD,
|
||||
'snmp' => \$::SNMP,
|
||||
'ssh' => \$::SSH,
|
||||
'license=s' => \$::LICENSE,
|
||||
@@ -254,34 +252,11 @@ sub install_license {
|
||||
}
|
||||
|
||||
|
||||
#setup secure SNMP v3
|
||||
#get snmp attributes from switches tabele and setup secure SNMP v3
|
||||
sub config_snmp {
|
||||
my $snmp_user;
|
||||
my $snmp_passwd;
|
||||
my @config_switches;
|
||||
my $cmd;
|
||||
|
||||
print "start to config_snmp\n";
|
||||
if ($::USER) {
|
||||
$snmp_user = $::USER;
|
||||
} else {
|
||||
$snmp_user = "xcatadmin";
|
||||
}
|
||||
if ($::PASSWORD) {
|
||||
$snmp_passwd = $::PASSWORD;
|
||||
} else {
|
||||
$snmp_passwd = "xcatpassw0rd";
|
||||
}
|
||||
|
||||
my $file = "temp.txt";
|
||||
open(FILE , ">$file")
|
||||
or die "cannot open file $file\n";
|
||||
print FILE "#xCAT modify following line\n";
|
||||
print FILE "agentAddress udp:161,udp6:[::1]:161\n";
|
||||
print FILE "rocommunity public default\n";
|
||||
print FILE "rocommunity public default -V systemonly\n";
|
||||
print FILE "createUser $snmp_user SHA $snmp_passwd\n";
|
||||
print FILE "rwuser $snmp_user\n";
|
||||
my $switchestab = xCAT::Table->new('switches');
|
||||
my $switches_hash = $switchestab->getNodesAttribs(\@nodes,['username','password','privacy','auth']);
|
||||
|
||||
foreach my $switch (@nodes) {
|
||||
#check if xdsh works
|
||||
@@ -291,29 +266,37 @@ sub config_snmp {
|
||||
xCAT::MsgUtils->message("E","xdsh command to $switch failed");
|
||||
next;
|
||||
}
|
||||
my $cmd_line = "sed -i 's/^agentAddress/#agentAddress/g' /etc/snmp/snmpd.conf";
|
||||
$cmd = "xdsh $switch $cmd_line";
|
||||
$rc= xCAT::Utils->runcmd($cmd, 0);
|
||||
|
||||
$cmd = "xdcp $switch $file";
|
||||
$rc= xCAT::Utils->runcmd($cmd, 0);
|
||||
$cmd = "xdsh $switch 'cat $file >> /etc/snmp/snmpd.conf;rm -fr $file;systemctl restart snmpd;systemctl enable snmpd' ";
|
||||
$rc= xCAT::Utils->runcmd($cmd, 0);
|
||||
my $username = $switches_hash->{$switch}->[0]->{username};
|
||||
my $password = $switches_hash->{$switch}->[0]->{password};
|
||||
my $auth = $switches_hash->{$switch}->[0]->{auth};
|
||||
my $privacy = $switches_hash->{$switch}->[0]->{privacy};
|
||||
my $privpwd;
|
||||
if (defined $privacy) {
|
||||
$privpwd = $password;
|
||||
}
|
||||
|
||||
my $libconf = "/var/lib/snmp/snmpd.conf";
|
||||
my $etcconf = "/etc/snmp/snmpd.conf";
|
||||
|
||||
my $cmd_prefix = "xdsh $switch ";
|
||||
my $cmd;
|
||||
$cmd = $cmd . "systemctl stop snmpd.service;";
|
||||
$cmd = $cmd . "sed -i '/$username/d' $libconf;";
|
||||
$cmd = $cmd . "sed -i '/$username/d' $etcconf;";
|
||||
$cmd = $cmd . "echo 'createUser $username $auth $password $privacy $privpwd' >> $etcconf;";
|
||||
$cmd = $cmd . "echo 'rwuser $username' >> $etcconf;";
|
||||
$cmd = $cmd . "systemctl start snmpd.service;";
|
||||
|
||||
my $dshcmd = $cmd_prefix . " \"" . $cmd . "\"";
|
||||
|
||||
$rc= xCAT::Utils->runcmd($dshcmd, 0);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
xCAT::MsgUtils->message("E","Failed to update snmpd.conf for $switch");
|
||||
next;
|
||||
}
|
||||
push (@config_switches, $switch);
|
||||
print "Add username=$username, password=$password, privacy=$privacy, auth=$auth to snmp service for $switch \n";
|
||||
}
|
||||
close FILE;
|
||||
$cmd = `rm -rf $file`;
|
||||
if (@config_switches) {
|
||||
#update switch status
|
||||
my $csw = join(",",@config_switches);
|
||||
$cmd = "chdef $csw status=snmp_configed snmpversion=3 snmpauth=sha snmpusername=$snmp_user snmppassword=$snmp_passwd";
|
||||
$rc= xCAT::Utils->runcmd($cmd, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub config_ntp {
|
||||
@@ -387,7 +370,7 @@ sub usage
|
||||
configonie -h│--help
|
||||
configonie --switches switchnames --ssh
|
||||
configonie --switches switchnames --license filename
|
||||
configonie --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--group snmp_group]
|
||||
configonie --switches switchnames --snmp
|
||||
configonie --switches switchnames --ntp
|
||||
|
||||
To set ssh, install license(license file: /root/license.txt), config snmp and ntp:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# go-xcat - Install xCAT automatically.
|
||||
#
|
||||
# Version 1.0.15
|
||||
# Version 1.0.19
|
||||
#
|
||||
# Copyright (C) 2016 International Business Machines
|
||||
# Eclipse Public License, Version 1.0 (EPL-1.0)
|
||||
@@ -517,8 +517,9 @@ function check_repo_version_zypper()
|
||||
do
|
||||
name+=("${name}")
|
||||
ver+=("${ver}")
|
||||
done < <(zypper --no-gpg-checks -n search -s --match-exact "$@" \
|
||||
2>/dev/null | awk -F ' *\\| *' '/ package / { print $2, $4 }')
|
||||
done < <(zypper --no-gpg-checks -n search --match-exact -C -t package \
|
||||
-s "$@" 2>/dev/null |
|
||||
awk -F ' +\\| +' '/ package / { if ("(" != substr($6, 0, 1)) print $2, $4 }')
|
||||
local -i i
|
||||
while [[ -n "$1" ]]
|
||||
do
|
||||
@@ -592,6 +593,7 @@ function get_package_list_yum()
|
||||
[[ -z "${repo_id}" ]] && return 1
|
||||
repoquery -qa "--repoid=${repo_id}" --qf "%{name}" 2>/dev/null
|
||||
}
|
||||
|
||||
# $1 repo id
|
||||
function get_package_list_zypper()
|
||||
{
|
||||
@@ -599,7 +601,7 @@ function get_package_list_zypper()
|
||||
local repo_id="$1"
|
||||
[[ -z "${repo_id}" ]] && return 1
|
||||
zypper --no-gpg-checks -n search -r "${repo_id}" 2>/dev/null |
|
||||
awk -F ' *\\| *' '/ package$/ { print $2 }'
|
||||
awk -F ' +\\| +' '/ package$/ { print $2 }'
|
||||
}
|
||||
|
||||
# $1 repo id
|
||||
@@ -955,6 +957,7 @@ function remove_repo_yum()
|
||||
# This is a quick and dirty method.
|
||||
rm -f $(grep -l "^\[${repo_id}\]$" "/etc/yum.repos.d/"*".repo" 2>/dev/null)
|
||||
yum clean metadata
|
||||
:
|
||||
}
|
||||
|
||||
# $1 repo id
|
||||
@@ -1179,7 +1182,7 @@ function install_packages_zypper()
|
||||
type zypper >/dev/null 2>&1 || return 255
|
||||
local -a yes=()
|
||||
[[ "$1" = "-y" ]] && yes=("-n") && shift
|
||||
zypper --no-gpg-checks "${yes[@]}" install "$@"
|
||||
zypper --no-gpg-checks "${yes[@]}" install --force-resolution "$@"
|
||||
}
|
||||
|
||||
function install_packages_apt()
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
assign_certain_command_permission
|
||||
chdef_dynamic_group
|
||||
chdef_group
|
||||
chdef_group_p
|
||||
chdef_m
|
||||
chdef_multiple_keys
|
||||
chdef_n
|
||||
chdef_null
|
||||
chdef_p
|
||||
chdef_t_network
|
||||
chdef_t_node
|
||||
chdef_t_o_error
|
||||
chdef_template
|
||||
chdef_z
|
||||
check_mkdef_node_with_template_priority
|
||||
check_mn_cluster_log_file
|
||||
chtab_d
|
||||
chtab_err_symble
|
||||
chtab_err_table
|
||||
chtab_h
|
||||
chtab_modify_key
|
||||
chtab_modify_node
|
||||
chtab_null
|
||||
chtab_v
|
||||
disable_root_permission_in_policy_table
|
||||
dumpxCATdb_a_p_nullskiptables
|
||||
dumpxCATdb_a_p_nullskiptables_V
|
||||
dumpxCATdb_a_p_skiptables
|
||||
dumpxCATdb_h
|
||||
dumpxCATdb_p_V
|
||||
dumpxCATdb_p_nullskiptables
|
||||
dumpxCATdb_p_nullskiptables_V
|
||||
dumpxCATdb_p_skiptables
|
||||
dumpxCATdb_v
|
||||
gettab_H
|
||||
gettab_err
|
||||
gettab_h
|
||||
gettab_key_table
|
||||
lsdef_a
|
||||
lsdef_nics
|
||||
lsdef_null
|
||||
lsdef_s
|
||||
lsdef_t
|
||||
lsdef_t_auditlog
|
||||
lsdef_t_err
|
||||
lsdef_t_eventlog
|
||||
lsdef_t_h_i
|
||||
lsdef_t_i_o
|
||||
lsdef_t_o_l
|
||||
lsdef_t_o_l_z
|
||||
lsdef_t_policy
|
||||
lsdef_t_site
|
||||
lsdef_t_w
|
||||
lsdef_template
|
||||
lsdef_template_switch_template
|
||||
lsdef_template_with_invalid_name
|
||||
lsxcatd_a
|
||||
lsxcatd_d
|
||||
lsxcatd_h
|
||||
lsxcatd_null
|
||||
makeconservercf_d
|
||||
makeconservercf_noderange
|
||||
makeconservercf_null
|
||||
makedhcp_a_d_linux
|
||||
makedhcp_a_linux
|
||||
makedhcp_d_linux
|
||||
makedhcp_h
|
||||
makedhcp_help
|
||||
makedhcp_n
|
||||
makedhcp_n_linux
|
||||
makedns
|
||||
makedns_d_node
|
||||
makedns_h
|
||||
makedns_n
|
||||
makedns_node
|
||||
makehost_n_r
|
||||
makehosts_d
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_l
|
||||
makehosts_n
|
||||
makehosts_n_noderange
|
||||
makehosts_null
|
||||
makeknownhosts_h
|
||||
makenetworks
|
||||
makenetworks_d
|
||||
makenetworks_d_V
|
||||
makenetworks_h
|
||||
makenetworks_help
|
||||
makenetworks_v
|
||||
mkdef_dynamic_group
|
||||
mkdef_f
|
||||
mkdef_github_issue2582
|
||||
mkdef_group
|
||||
mkdef_multiple_keys
|
||||
mkdef_node
|
||||
mkdef_node_with_a_node_template
|
||||
mkdef_null
|
||||
mkdef_t_network
|
||||
mkdef_t_o_error
|
||||
mkdef_template_cec_template_step_by_step
|
||||
mkdef_template_cec_template_without_remainder
|
||||
mkdef_template_invalid_template
|
||||
mkdef_template_switch_template_without_attribute
|
||||
mkdef_z
|
||||
nodeadd_err_symbol
|
||||
nodeadd_h
|
||||
nodeadd_noderange
|
||||
nodeadd_noderange_nodetype
|
||||
nodeadd_null
|
||||
nodeadd_v
|
||||
nodech_d_error
|
||||
nodech_delete
|
||||
nodech_error_node
|
||||
nodech_error_table
|
||||
nodech_h
|
||||
nodech_noderanage_table_at
|
||||
nodech_noderange_shortname_groups
|
||||
nodech_noderange_shortname_mgt
|
||||
nodech_noderange_shortname_tags
|
||||
nodech_noderange_table
|
||||
nodech_noderange_table_arrow
|
||||
nodech_noderange_table_comma
|
||||
nodech_noderange_table_comma_arrow
|
||||
nodech_noderange_table_equal
|
||||
nodech_noderange_table_include
|
||||
nodech_noderange_table_unequal
|
||||
nodech_noderange_table_uninclude
|
||||
nodech_v
|
||||
nodegrpch_err
|
||||
nodegrpch_groups
|
||||
nodegrpch_h
|
||||
nodegrpch_v
|
||||
nodels_H
|
||||
nodels_S
|
||||
nodels_b
|
||||
nodels_err_noderange
|
||||
nodels_err_symbol
|
||||
nodels_h
|
||||
nodels_noderange
|
||||
nodels_noderange_shortname_groups
|
||||
nodels_noderange_shortname_mgt
|
||||
nodels_noderange_shortname_tags
|
||||
nodels_noderange_table
|
||||
nodels_noderange_table_equal
|
||||
nodels_noderange_table_unequal
|
||||
nodels_noderange_table_uninclude
|
||||
nodels_noderange_tablecolumn
|
||||
nodels_null
|
||||
nodels_table_include
|
||||
nodels_tablevalue
|
||||
nodels_tablevalue_tablecolumn
|
||||
nodels_v
|
||||
noderange_10-20
|
||||
noderange_XCAT_NODE_PREFIX
|
||||
noderange_XCAT_NODE_SUFFIX
|
||||
noderange_dir_tmp-nodelistfile
|
||||
noderange_exclusion
|
||||
noderange_f1-f2_n1-n3
|
||||
noderange_group1-group3
|
||||
noderange_group_intersection
|
||||
noderange_individual_grp
|
||||
noderange_individual_node
|
||||
noderange_node01-node10
|
||||
noderange_node01_10
|
||||
noderange_node10_plus_3
|
||||
noderange_node_01-10
|
||||
noderange_slash_urtestnode_dot_star
|
||||
noderm_err_node
|
||||
noderm_h
|
||||
noderm_noderange
|
||||
noderm_null
|
||||
nodestat_err_node
|
||||
restorexCAT_h
|
||||
restorexCATdb_a_p_V
|
||||
restorexCATdb_p_V
|
||||
restorexCATdb_v
|
||||
restorexCATdb_wrongpath
|
||||
restorexcatdb_p
|
||||
rmdef_dynamic_group
|
||||
rmdef_group
|
||||
rmdef_node
|
||||
rmdef_null
|
||||
rmdef_t_err
|
||||
rmdef_t_node
|
||||
rmdef_t_o_network
|
||||
rmdef_t_o_node
|
||||
rmdef_template
|
||||
run_command_with_XCATBYPASS
|
||||
tabdump_d
|
||||
tabdump_d_nodehm
|
||||
tabdump_f_d
|
||||
tabdump_h
|
||||
tabdump_help
|
||||
tabdump_null
|
||||
tabdump_table
|
||||
tabdump_v
|
||||
tabdump_w_equal
|
||||
tabdump_w_ge
|
||||
tabdump_w_gt
|
||||
tabdump_w_le
|
||||
tabdump_w_lt
|
||||
tabdump_w_match
|
||||
tabdump_w_ne
|
||||
tabdump_w_notmatch
|
||||
tabgrep_err
|
||||
tabgrep_h
|
||||
tabgrep_node
|
||||
tabgrep_null
|
||||
tabprune_V_a_eventlog
|
||||
tabprune_V_n_auditlog
|
||||
tabprune_a_eventlog
|
||||
tabprune_h
|
||||
tabprune_i_auditlog
|
||||
tabprune_p_auditlog
|
||||
tabprune_v
|
||||
tabrestore_err
|
||||
tabrestore_h
|
||||
tabrestore_null
|
||||
tabrestore_table
|
||||
xcatd_restart
|
||||
xcatd_start
|
||||
xcatd_stop
|
||||
xcatsnap_b_d
|
||||
xcatsnap_h
|
||||
xcatsnap_null
|
||||
xcatsnap_v
|
||||
xcatstanzafile_attribute
|
||||
xcatstanzafile_colon
|
||||
xcatstanzafile_objtype
|
||||
xcatstanzafile_specificvalue
|
||||
@@ -1,9 +1,4 @@
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
updatenode_h
|
||||
updatenode_v
|
||||
updatenode_diskful_syncfiles
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
setup_vm
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
updatenode_h
|
||||
updatenode_v
|
||||
updatenode_diskful_syncfiles
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
setup_vm
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
updatenode_h
|
||||
updatenode_v
|
||||
updatenode_diskful_syncfiles
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
updatenode_h
|
||||
updatenode_v
|
||||
updatenode_diskful_syncfiles
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
setup_vm
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
updatenode_h
|
||||
updatenode_v
|
||||
updatenode_diskful_syncfiles
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
go_xcat_local_repo_case7
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
updatenode_h
|
||||
updatenode_v
|
||||
updatenode_diskful_syncfiles
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
setup_vm
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
description:the cases in this bundle are used to test hardware control against P9 server and 2 kinds provision on P9 server.
|
||||
bmcdiscover_q
|
||||
bmcdiscover_help
|
||||
bmcdiscover_version
|
||||
bmcdiscover_h
|
||||
bmcdiscover_nmap_range
|
||||
bmcdiscover_v
|
||||
bmcdiscover_check_paswd
|
||||
bmcdiscover_check_passwd_wrong
|
||||
bmcdiscover_get_ipsource
|
||||
bmcdiscover_range_w
|
||||
bmcdiscover_range_u_p_i_ipsource
|
||||
bmcdiscover_range_z
|
||||
rpower_off
|
||||
rpower_stat
|
||||
rpower_boot
|
||||
rpower_status
|
||||
rpower_state
|
||||
rpower_on
|
||||
rpower_reset
|
||||
rsetboot_h
|
||||
rsetboot_help
|
||||
rsetboot_v
|
||||
rsetboot_node_invalidnode
|
||||
rsetboot_noderange_net
|
||||
rsetboot_node_invalidaction
|
||||
rsetboot_group_net
|
||||
rsetboot_hd_statcheck
|
||||
rsetboot_net_statcheck
|
||||
rsetboot_cd_statcheck
|
||||
rsetboot_default_statcheck
|
||||
reventlog_null
|
||||
reventlog_all
|
||||
reventlog_clear
|
||||
reventlog_numofentries
|
||||
rspconfig_ip
|
||||
rspconfig_ip_invalid
|
||||
rspconfig_netmask
|
||||
rspconfig_netmask_invalid
|
||||
rspconfig_gateway
|
||||
rspconfig_gateway_invalid
|
||||
rspconfig_node_invalid
|
||||
rspconfig_ip_null
|
||||
reg_linux_diskfull_installation_flat
|
||||
reg_linux_diskless_installation_flat
|
||||
@@ -1,9 +1,4 @@
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
chdef_null
|
||||
chdef_t_node
|
||||
chdef_t_network
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
setup_vm
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
setup_vm
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
setup_vm
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
setup_vm
|
||||
Ubuntu_diskless_installation_flat_x86_vm
|
||||
Ubuntu_full_installation_flat_x86_vm
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
@@ -245,12 +245,12 @@ nodeset_cmdline
|
||||
nodeset_runimg
|
||||
nodeset_check_warninginfo
|
||||
Full_installation_flat_docker
|
||||
rpower_stop
|
||||
rpower_start
|
||||
rpower_state
|
||||
rpower_restart
|
||||
rpower_pause
|
||||
rpower_unpause
|
||||
rpower_stop_docker
|
||||
rpower_start_docker
|
||||
rpower_state_docker
|
||||
rpower_restart_docker
|
||||
rpower_pause_docker
|
||||
rpower_unpause_docker
|
||||
mkdocker_h
|
||||
mkdocker_command
|
||||
rmdocker_h
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
setup_vm
|
||||
Ubuntu_diskless_installation_flat_x86_vm
|
||||
Ubuntu_full_installation_flat_x86_vm
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
@@ -267,12 +263,12 @@ nodeset_cmdline
|
||||
nodeset_runimg
|
||||
nodeset_check_warninginfo
|
||||
Full_installation_flat_docker
|
||||
rpower_stop
|
||||
rpower_start
|
||||
rpower_state
|
||||
rpower_restart
|
||||
rpower_pause
|
||||
rpower_unpause
|
||||
rpower_stop_docker
|
||||
rpower_start_docker
|
||||
rpower_state_docker
|
||||
rpower_restart_docker
|
||||
rpower_pause_docker
|
||||
rpower_unpause_docker
|
||||
mkdocker_h
|
||||
mkdocker_command
|
||||
rmdocker_h
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
go_xcat_local_repo_case7
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_noinput
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
setup_vm
|
||||
Ubuntu_diskless_installation_flat_x86_vm
|
||||
Ubuntu_full_installation_flat_x86_vm
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
setup_vm
|
||||
Diskless_installation_flat_p8_le
|
||||
Full_installation_flat_p8_le
|
||||
go_xcat_local_repo_case7
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
setup_vm
|
||||
Ubuntu_diskless_installation_flat_x86_vm
|
||||
Ubuntu_full_installation_flat_x86_vm
|
||||
go_xcat_local_repo_case7
|
||||
go_xcat_noinput
|
||||
go_xcat_with_x
|
||||
go_xcat_with_xcat-version-1
|
||||
go_xcat_online_repo_case6
|
||||
reg_linux_diskless_installation_flat
|
||||
reg_linux_diskfull_installation_flat
|
||||
makehosts_h
|
||||
makehosts_help
|
||||
makehosts_n_noderange
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#SERIES# 1,50,100,250,500,1000,2500,5000,10000
|
||||
lsdef #NODES#
|
||||
makehosts #NODES#
|
||||
makedns -n #NODES#
|
||||
makedhcp #NODES#
|
||||
makeknownhosts #NODES#
|
||||
nodech #NODES# groups,=group1
|
||||
nodels #NODES# noderes
|
||||
nodeset #NODES# osimage=rhels7.3-GA-ppc64le-install-compute
|
||||
chdef -t node -o #NODES# postscripts="fake" profile="install" netboot="grub2"
|
||||
rmdef -t node #PERFGRP#
|
||||
mkdef -z < #STANZ#
|
||||
noderm #PERFGRP#
|
||||
@@ -1,3 +1,33 @@
|
||||
start:bmcdiscover_q
|
||||
os:linux
|
||||
decription:query usage for bmcdiscover
|
||||
cmd:bmcdiscover ?
|
||||
check:rc==0
|
||||
check:output=~bmcdiscover - Discover BMC
|
||||
check:output=~Usage
|
||||
check:output=~bmcdiscover \[-?|-h|--help\]
|
||||
check:output=~bmcdiscover \[-v|--version\]
|
||||
end
|
||||
|
||||
start:bmcdiscover_help
|
||||
os:linux
|
||||
decription:show bmcdiscover help information
|
||||
cmd:bmcdiscover help
|
||||
check:rc==0
|
||||
check:output=~bmcdiscover \- Discover BMC \(Baseboard Management Controller\) using the specified scan method
|
||||
check:output=~Usage:
|
||||
check:output=~bmcdiscover \[-?|-h|--help\]
|
||||
check:output=~bmcdiscover \[-v|--version\]
|
||||
end
|
||||
|
||||
start:bmcdiscover_version
|
||||
os:linux
|
||||
description:show bmcdiscover version
|
||||
cmd:bmcdiscover --version
|
||||
check:rc==0
|
||||
check:output=~bmcdiscover - xCAT Version
|
||||
end
|
||||
|
||||
start:bmcdiscover_h
|
||||
os:Linux
|
||||
decription:help
|
||||
@@ -19,19 +49,19 @@ checkout:output=~xCAT Version
|
||||
end
|
||||
|
||||
start:bmcdiscover_check_paswd
|
||||
cmd:bmcdiscover -i $$bmcrange -u USERID -p PASSW0RD --check
|
||||
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --check
|
||||
check:rc==0
|
||||
check:output=~Correct ADMINISTRATOR
|
||||
end
|
||||
|
||||
start:bmcdiscover_check_passwd_wrong
|
||||
cmd:bmcdiscover -i $$bmcrange -u USERID -p PASSW0RDw --check
|
||||
check:rc!=0
|
||||
check:output=~Error: Wrong BMC password
|
||||
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p test$$bmcpasswd --check
|
||||
check:rc==0
|
||||
check:output=~Invalid username or password | Wrong BMC password
|
||||
end
|
||||
|
||||
start:bmcdiscover_get_ipsource
|
||||
cmd:bmcdiscover -i $$bmcrange -u USERID -p PASSW0RD --ipsource
|
||||
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --ipsource
|
||||
check:rc==0
|
||||
check:output=~Static Address
|
||||
end
|
||||
@@ -42,6 +72,12 @@ check:rc==0
|
||||
check:output=~bmc=$$bmcrange
|
||||
end
|
||||
|
||||
start:bmcdiscover_range_u_p_i_ipsource
|
||||
description:check the bmcrange is which type address
|
||||
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --ipsource
|
||||
check:rc==0
|
||||
check:output=~IP Address Source : Static Address
|
||||
end
|
||||
start:bmcdiscover_range_z
|
||||
cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -z
|
||||
check:rc==0
|
||||
|
||||
@@ -264,3 +264,20 @@ check:rc==0
|
||||
cmd:if [ -e /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv ]; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv; rm -f /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv*; fi
|
||||
check:rc==0
|
||||
end
|
||||
start:chdef_nicips
|
||||
description:nicip could be set to null
|
||||
Attribute: $$CN-The operation object of chdef command
|
||||
cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi
|
||||
check:rc==0
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=100.1.0.100
|
||||
check:rc==0
|
||||
cmd:lsdef $$CN -i nicips
|
||||
check:output=~nicips.$$SECONDNIC=100.1.0.100
|
||||
cmd:chdef $$CN nicips.$$SECONDNIC=""
|
||||
check:rc==0
|
||||
cmd:lsdef $$CN -i nicips
|
||||
check:output!~100.1.0.100
|
||||
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user