mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-22 11:10:24 +00:00
Merge branch 'master' into ZVM_XCAT_DEV
This commit is contained in:
@@ -28,18 +28,18 @@ BMC/MPA specific:
|
||||
\ **rinv**\ \ *noderange*\ {\ **pci | model | serial | asset | vpd | mprom | deviceid | guid | firm | diag | dimm | bios | mparom | mac | all**\ }
|
||||
|
||||
|
||||
OpenPOWER (using ipmi) server specific:
|
||||
=======================================
|
||||
OpenPOWER (IPMI) server specific:
|
||||
=================================
|
||||
|
||||
|
||||
\ **rinv**\ \ *noderange*\ [\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | all**\ ]
|
||||
|
||||
|
||||
OpenPOWER (using openbmc) server specific:
|
||||
==========================================
|
||||
OpenPOWER (OpenBMC) server specific:
|
||||
====================================
|
||||
|
||||
|
||||
\ **rinv**\ \ *noderange*\ [\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | cpu | dimm | all**\ ]
|
||||
\ **rinv**\ \ *noderange*\ [\ **model | serial | firm | cpu | dimm | all**\ ]
|
||||
|
||||
|
||||
PPC (with HMC) specific:
|
||||
@@ -195,25 +195,25 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou
|
||||
|
||||
\ **mprom**\
|
||||
|
||||
Retrieves mprom firmware level
|
||||
Retrieves mprom firmware level.
|
||||
|
||||
|
||||
|
||||
\ **deviceid**\
|
||||
|
||||
Retrieves device identification. Usually device, manufacturing and product ids.
|
||||
Retrieves device identification. Usually device, manufacturing and product IDs.
|
||||
|
||||
|
||||
|
||||
\ **uuid**\
|
||||
|
||||
Retrieves the universally unique identifier
|
||||
Retrieves the universally unique identifier.
|
||||
|
||||
|
||||
|
||||
\ **guid**\
|
||||
|
||||
Retrieves the global unique identifier
|
||||
Retrieves the global unique identifier .
|
||||
|
||||
|
||||
|
||||
|
@@ -43,7 +43,7 @@ The \ **forwarders**\ value should be set to the IP address of one or more name
|
||||
|
||||
An xCAT \ **network**\ definition must be defined for each network used in the cluster. The \ **net**\ and \ **mask**\ attributes will be used by the \ **makedns**\ command.
|
||||
|
||||
A network \ **domain**\ and \ **nameservers**\ values must be provided either in the \ **network**\ definiton corresponding to the node or in the \ **site**\ definition.
|
||||
A network \ **domain**\ and \ **nameservers**\ values must be provided either in the \ **network**\ definition corresponding to the node or in the \ **site**\ definition.
|
||||
|
||||
Only entries in /etc/hosts or the hosts specified by \ **noderange**\ that have a corresponding xCAT network definition will be added to DNS.
|
||||
|
||||
|
@@ -19,7 +19,7 @@ SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **makeknownhosts**\ \ *noderange*\ [\ **-r | -d | -**\ **-remove**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
\ **makeknownhosts**\ \ *noderange*\ [\ **-r | -**\ **-remove | -d | -**\ **-delete**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
\ **makeknownhosts**\ [\ **-h | -**\ **-help**\ ]
|
||||
|
||||
@@ -53,12 +53,18 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
\ **-r| -d| -**\ **-remove**\
|
||||
\ **-d|-**\ **-delete**\
|
||||
|
||||
Only removes the entries for the nodes from the known_hosts file.
|
||||
|
||||
|
||||
|
||||
\ **-r|-**\ **-remove**\
|
||||
|
||||
Synonymous to \ **-d|-**\ **-delete**\ .
|
||||
|
||||
|
||||
|
||||
\ **-V|-**\ **-verbose**\
|
||||
|
||||
Verbose mode.
|
||||
@@ -97,10 +103,6 @@ EXAMPLES
|
||||
3.
|
||||
To remove the known_hosts entry for node02
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
makeknownhosts node02 -r
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
|
@@ -35,7 +35,7 @@ The \ **makenetworks**\ command can be used to gather network information from
|
||||
|
||||
Every network that will be used to install a cluster node must be defined in the xCAT database.
|
||||
|
||||
The default behavior is to gather network information from the managment node, and any configured xCAT service nodes, and automatically save this information in the xCAT database.
|
||||
The default behavior is to gather network information from the management node, and any configured xCAT service nodes, and automatically save this information in the xCAT database.
|
||||
|
||||
You can use the "-d" option to display the network information without writing it to the database.
|
||||
|
||||
|
@@ -35,7 +35,7 @@ DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
The \ **makeroutes**\ command adds or deletes routes on the management node or any given nodes. The \ **noderange**\ specifies the nodes where the routes are to be added or removed. When the \ *noderange*\ is omitted, the action will be done on the management node. The \ **-r**\ option specifies the name of routes. The details of the routes are defined in the \ **routes**\ table which contians the route name, subnet, net mask and gateway. If -r option is omitted, the names of the routes found on \ **noderes.routenames**\ for the nodes or on \ **site.mnroutenames**\ for the management node will be used.
|
||||
The \ **makeroutes**\ command adds or deletes routes on the management node or any given nodes. The \ **noderange**\ specifies the nodes where the routes are to be added or removed. When the \ *noderange*\ is omitted, the action will be done on the management node. The \ **-r**\ option specifies the name of routes. The details of the routes are defined in the \ **routes**\ table which contains the route name, subnet, net mask and gateway. If -r option is omitted, the names of the routes found on \ **noderes.routenames**\ for the nodes or on \ **site.mnroutenames**\ for the management node will be used.
|
||||
|
||||
If you want the routes be automatically setup during node deployment, first put a list of route names to \ **noderes.routenames**\ and then add \ *setroute*\ script name to the \ **postscripts.postbootscripts**\ for the nodes.
|
||||
|
||||
|
@@ -53,7 +53,7 @@ Assume that /tftpboot is the root for tftpd (set in site(5)|site.5).
|
||||
\ **nodeset**\ is called by \ **rinstall**\ and \ **winstall**\ and is also called by the
|
||||
installation process remotely to set the boot state back to "boot".
|
||||
|
||||
A user can supply their own scripts to be run on the mn or on the service node (if a hierarchical cluster) for a node when the nodeset command is run. Such scripts are called \ **prescripts**\ . They should be copied to /install/prescripts dirctory. A table called \ *prescripts*\ is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the nodeset command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the nodeset command are stored in the 'end' column of \ *prescripts*\ table. You can run 'tabdump -d prescripts' command for details. The following two environment variables will be passed to each script: NODES contains all the names of the nodes that need to run the script for and ACTION contains the current nodeset action. If \ *#xCAT setting:MAX_INSTANCE=number*\ is specified in the script, the script will get invoked for each node in parallel, but no more than \ *number*\ of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes.
|
||||
A user can supply their own scripts to be run on the mn or on the service node (if a hierarchical cluster) for a node when the nodeset command is run. Such scripts are called \ **prescripts**\ . They should be copied to /install/prescripts directory. A table called \ *prescripts*\ is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the nodeset command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the nodeset command are stored in the 'end' column of \ *prescripts*\ table. You can run 'tabdump -d prescripts' command for details. The following two environment variables will be passed to each script: NODES contains all the names of the nodes that need to run the script for and ACTION contains the current nodeset action. If \ *#xCAT setting:MAX_INSTANCE=number*\ is specified in the script, the script will get invoked for each node in parallel, but no more than \ *number*\ of instances will be invoked at a time. If it is not specified, the script will be invoked once for all the nodes.
|
||||
|
||||
|
||||
***************
|
||||
@@ -114,7 +114,7 @@ A user can supply their own scripts to be run on the mn or on the service node (
|
||||
|
||||
\ **shell**\
|
||||
|
||||
This instructs tho node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
This instructs the node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
The node will also be able to be sshed into and have utilities such as wget, tftp, scp, nfs, and cifs. It will have storage drivers available for many common systems.
|
||||
|
||||
|
||||
|
@@ -19,9 +19,9 @@ Name
|
||||
****************
|
||||
|
||||
|
||||
\ **rinstall**\ \ *noderange*\ \ **boot**\ | \ **shell**\ | \ **runcmd=bmcsetup**\ [\ **-c | -**\ **-console**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
\ **rinstall**\ \ *noderange*\ [\ **boot**\ | \ **shell**\ | \ **runcmd=bmcsetup**\ ] [\ **runimage=**\ \ *task*\ ] [\ **-c | -**\ **-console**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
\ **rinstall**\ \ *noderange*\ \ **osimage**\ =\ *imagename*\ | [\ **-O**\ ] \ *imagename*\ [\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
\ **rinstall**\ \ *noderange*\ [\ **osimage**\ =\ *imagename*\ | \ *imagename*\ ] [\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
\ **rinstall**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ]
|
||||
|
||||
@@ -31,11 +31,11 @@ Name
|
||||
*******************
|
||||
|
||||
|
||||
\ **rinstall**\ is a convenience command to begin OS provision on a noderange(support nodes with "nodetype.mgt=ipmi,blade,hmc,ivm,fsp,kvm,esx,rhevm").
|
||||
\ **rinstall**\ is a convenience command to begin OS provision on a noderange.
|
||||
|
||||
If \ **osimage**\ =\ *imagename*\ | \ **-O**\ \ *imagename*\ is specified or nodetype.provmethod=\ **osimage**\ is set, provision the noderange with the osimage specified/configured.
|
||||
If \ **osimage**\ =\ *imagename*\ | \ *imagename*\ is specified or nodetype.provmethod=\ **osimage**\ is set, provision the noderange with the osimage specified/configured.
|
||||
|
||||
If -c is specified, it will then run rcons on the node. This is allowed only if one node in the noderange. If need consoles on multiple nodes , see winstall(8)|winstall.8.
|
||||
If \ **-c**\ is specified, it will then run rcons on the node. This is allowed only if one node in the noderange. If need consoles on multiple nodes, see winstall(8)|winstall.8.
|
||||
|
||||
|
||||
***************
|
||||
@@ -50,9 +50,9 @@ If -c is specified, it will then run rcons on the node. This is allowed only if
|
||||
|
||||
|
||||
|
||||
\ **osimage | osimage=**\ \ *imagename*\ |\ **-O**\ \ *imagename*\
|
||||
\ *imagename*\ | \ **osimage=**\ \ *imagename*\
|
||||
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the \ *osimage*\ table and \ *linuximage*\ table. If the <imagename> is omitted, the os image name will be obtained from \ *nodetype.provmethod*\ for the node.
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the \ *osimage*\ table and \ *linuximage*\ table. If the \ *imagename*\ is omitted, the os image name will be obtained from \ *nodetype.provmethod*\ for the node.
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ If -c is specified, it will then run rcons on the node. This is allowed only if
|
||||
|
||||
|
||||
|
||||
\ **runimage**\ =\ *task*\
|
||||
\ **runimage=**\ \ *task*\
|
||||
|
||||
If you would like to run a task after deployment, you can define that task with this attribute.
|
||||
|
||||
@@ -70,14 +70,13 @@ If -c is specified, it will then run rcons on the node. This is allowed only if
|
||||
|
||||
\ **runcmd=bmcsetup**\
|
||||
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC
|
||||
for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
|
||||
|
||||
|
||||
\ **shell**\
|
||||
|
||||
This instructs tho node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
This instructs the node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
The node will also be able to be sshed into and have utilities such as wget, tftp, scp, nfs, and cifs. It will have storage drivers available for many common systems.
|
||||
|
||||
|
||||
@@ -100,7 +99,7 @@ If -c is specified, it will then run rcons on the node. This is allowed only if
|
||||
|
||||
|
||||
|
||||
\ **-V | -**\ **-Verbose**\
|
||||
\ **-V | -**\ **-verbose**\
|
||||
|
||||
Verbose output.
|
||||
|
||||
|
@@ -19,11 +19,11 @@ Name
|
||||
****************
|
||||
|
||||
|
||||
\ **rinstall**\ \ *noderange*\ \ **boot**\ | \ **shell**\ | \ **runcmd=bmcsetup**\ [\ **-c | -**\ **-console**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
\ **winstall**\ \ *noderange*\ [\ **boot**\ | \ **shell**\ | \ **runcmd=bmcsetup**\ ] [\ **runimage=**\ \ *task*\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
\ **rinstall**\ \ *noderange*\ \ **osimage**\ =\ *imagename*\ | [\ **-O**\ ] \ *imagename*\ [\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
\ **winstall**\ \ *noderange*\ [\ **osimage**\ =\ *imagename*\ | \ *imagename*\ ] [\ **-**\ **-ignorekernelchk**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
\ **rinstall**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ]
|
||||
\ **winstall**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ]
|
||||
|
||||
|
||||
*******************
|
||||
@@ -31,11 +31,11 @@ Name
|
||||
*******************
|
||||
|
||||
|
||||
\ **winstall**\ is a convenience command to begin OS provision on a noderange(support nodes with "nodetype.mgt=ipmi,blade,hmc,ivm,fsp,kvm,esx,rhevm").
|
||||
\ **winstall**\ is a convenience command to begin OS provision on a noderange.
|
||||
|
||||
If \ **osimage**\ =\ *imagename*\ | \ **-O**\ \ *imagename*\ is specified or nodetype.provmethod=\ **osimage**\ is set, provision the noderange with the osimage specified/configured.
|
||||
If \ **osimage**\ =\ *imagename*\ | \ *imagename*\ is specified or nodetype.provmethod=\ **osimage**\ is set, provision the noderange with the osimage specified/configured.
|
||||
|
||||
It will then run wcons on the nodes.
|
||||
It will then run \ **wcons**\ on the noderange.
|
||||
|
||||
|
||||
***************
|
||||
@@ -50,9 +50,9 @@ It will then run wcons on the nodes.
|
||||
|
||||
|
||||
|
||||
\ **osimage | osimage=**\ \ *imagename*\ |\ **-O**\ \ *imagename*\
|
||||
\ *imagename*\ | \ **osimage=**\ \ *imagename*\
|
||||
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the \ *osimage*\ table and \ *linuximage*\ table. If the <imagename> is omitted, the os image name will be obtained from \ *nodetype.provmethod*\ for the node.
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the \ *osimage*\ table and \ *linuximage*\ table. If the \ *imagename*\ is omitted, the os image name will be obtained from \ *nodetype.provmethod*\ for the node.
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ It will then run wcons on the nodes.
|
||||
|
||||
|
||||
|
||||
\ **runimage**\ =\ *task*\
|
||||
\ **runimage=**\ \ *task*\
|
||||
|
||||
If you would like to run a task after deployment, you can define that task with this attribute.
|
||||
|
||||
@@ -70,14 +70,13 @@ It will then run wcons on the nodes.
|
||||
|
||||
\ **runcmd=bmcsetup**\
|
||||
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC
|
||||
for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
|
||||
|
||||
|
||||
\ **shell**\
|
||||
|
||||
This instructs tho node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
This instructs the node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
The node will also be able to be sshed into and have utilities such as wget, tftp, scp, nfs, and cifs. It will have storage drivers available for many common systems.
|
||||
|
||||
|
||||
@@ -100,18 +99,12 @@ It will then run wcons on the nodes.
|
||||
|
||||
|
||||
|
||||
\ **-V | -**\ **-Verbose**\
|
||||
\ **-V | -**\ **-verbose**\
|
||||
|
||||
Verbose output.
|
||||
|
||||
|
||||
|
||||
\ **-c | -**\ **-console**\
|
||||
|
||||
Requests that rinstall runs rcons once the provision starts. This will only work if there is only one node in the noderange. See winstall(8)|winstall.8 for starting consoles on multiple nodes.
|
||||
|
||||
|
||||
|
||||
|
||||
****************
|
||||
\ **Examples**\
|
||||
@@ -119,7 +112,7 @@ It will then run wcons on the nodes.
|
||||
|
||||
|
||||
|
||||
1. Provison nodes 1 through 20, using their current configuration.
|
||||
1. Provision nodes 1 through 20, using their current configuration.
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
@@ -134,7 +127,7 @@ It will then run wcons on the nodes.
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
winstall node1-node20 -O rhels6.4-ppc64-netboot-compute
|
||||
winstall node1-node20 osimage=rhels6.4-ppc64-netboot-compute
|
||||
|
||||
|
||||
|
||||
|
@@ -66,19 +66,19 @@ OPTIONS
|
||||
|
||||
\ **-i|-**\ **-initialinstall**\
|
||||
|
||||
The install option is normally run as a post operation from the rpm xCAT.spec file during the initial install of xCAT on the Management Node. It will setup the root ssh keys, ssh node keys, xCAT credentials, initialize the datebase, export directories, start syslog and other daemons as needed after the initial install of xCAT.
|
||||
The install option is normally run as a post operation from the rpm xCAT.spec file during the initial install of xCAT on the Management Node. It will setup the root ssh keys, ssh node keys, xCAT credentials, initialize the database, export directories, start syslog and other daemons as needed after the initial install of xCAT.
|
||||
|
||||
|
||||
|
||||
\ **-u|-**\ **-updateinstall**\
|
||||
|
||||
The update install option is normally run as a post operation from the rpm xCAT.spec file during an update install of xCAT on the Management Node. It will check the setup the root ssh keys, ssh node keys, xCAT credentials, datebase, exported directories, syslog and the state of daemons needed by xCAT, after the updateinstall of xCAT. If setup is required, it will perform the operation. It will restart the necessary daemons.
|
||||
The update install option is normally run as a post operation from the rpm xCAT.spec file during an update install of xCAT on the Management Node. It will check the setup the root ssh keys, ssh node keys, xCAT credentials, database, exported directories, syslog and the state of daemons needed by xCAT, after the updateinstall of xCAT. If setup is required, it will perform the operation. It will restart the necessary daemons.
|
||||
|
||||
|
||||
|
||||
\ **-k|-**\ **-sshkeys**\
|
||||
|
||||
This option will remove and regenerate the root id_rsa keys. It should only be used, if the keys are deleted or corrupted. The keys must then be distribute to the nodes by installing, running updatenode -k, or using xdsh -K option, for root to be able to ssh to the nodes without being prompted for a password.
|
||||
This option will remove and regenerate the root id_rsa keys. It should only be used, if the keys are deleted or corrupted. The keys must then be distributed to the nodes by installing, running updatenode -k, or using xdsh -K option, for root to be able to ssh to the nodes without being prompted for a password.
|
||||
rspconfig will need to be run to distribute the key to the MM and HMCs. Any device, we need to ssh from the MN to the device will also have to be updated with the new ssh keys.
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ OPTIONS
|
||||
|
||||
\ **-c|-**\ **-credentials**\
|
||||
|
||||
This option will remove all xcat credentials for root and any userids where credentials have been created. It will regenerate roots credentials, but the admin will have to add back all the userid credentials needed with the /opt/xcat/share/xcat/scripts/setup-local-client.sh <username> command. It should only be used, if they are deleted or become corrupted. The root credentials must be redistribed to the service nodes by installing the service node or using updatenode -k. makeconservercf must be rerun to pick up the new credentials, and conserver must be stop and started.
|
||||
This option will remove all xcat credentials for root and any userids where credentials have been created. It will regenerate roots credentials, but the admin will have to add back all the userid credentials needed with the /opt/xcat/share/xcat/scripts/setup-local-client.sh <username> command. It should only be used, if they are deleted or become corrupted. The root credentials must be redistributed to the service nodes by installing the service node or using updatenode -k. makeconservercf must be rerun to pick up the new credentials, and conserver must be stopped and started.
|
||||
|
||||
|
||||
|
||||
@@ -103,9 +103,9 @@ OPTIONS
|
||||
|
||||
\ **-f|-**\ **-force**\
|
||||
|
||||
The force option may be used after the install to reinitialize the Management Node. This option will regenerate keys, credential and reinititialize the site table. This option should be used, if keys or credentials become corrupt or lost.
|
||||
The force option may be used after the install to reinitialize the Management Node. This option will regenerate keys, credential and reinitialize the site table. This option should be used, if keys or credentials become corrupt or lost.
|
||||
Additional action must be taken after using the force options. ssh keys must be redistributed to the nodes, site table attributes might need to be restored, makeconservercf needs to be rerun to pick up the new credentials and conserver stopped and started, rspconfig needs to be rerun to distribute the new keys to the MM and the HMCs.
|
||||
A new set of common ssh host keys will have been generated for the nodes. If you wish your nodes to be able to ssh to each other with out password intervention, then you should redistribute these new keys to the nodes. If the nodes hostkeys are updated then you will need to remove their entries from the known_hosts files on the management node before using ssh, xdsh, xdcp.
|
||||
A new set of common ssh host keys will have been generated for the nodes. If you wish your nodes to be able to ssh to each other with out password intervention, then you should redistribute these new keys to the nodes. If the nodes hostkeys are updated then you will need to remove their entries from the known_hosts files on the management node before using ssh, xdsh, xdcp.
|
||||
Redistribute credentials and ssh keys to the service nodes and ssh keys to the nodes by using the updatenode -k command.
|
||||
|
||||
|
||||
|
@@ -124,7 +124,7 @@ Configuration File
|
||||
|
||||
|
||||
The \ **config file**\ is organized in stanza format and supports the keywords in the sample file below. Comment lines
|
||||
begin with "#". Stanzas can be ommitted if you do not want to define that type of object.
|
||||
begin with "#". Stanzas can be omitted if you do not want to define that type of object.
|
||||
The only hostname formats supported are those shown in this sample file, although you can change the base
|
||||
text and the numbers. For example, hmc1-hmc3 could be changed to hwmgmt01-hwmgmt12.
|
||||
The hostnames specified must sort correctly. I.e. use node01-node80, instead of node1-node80.
|
||||
|
@@ -97,10 +97,10 @@ my %usage = (
|
||||
rinv [-h|--help|-v|--version]
|
||||
BMC specific:
|
||||
rinv <noderange> [mprom|deviceid|uuid|guid|vpd|dimm|all]
|
||||
OpenPOWER (using ipmi) server specific:
|
||||
OpenPOWER (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
|
||||
OpenPOWER (OpenBMC) server specific:
|
||||
rinv <noderange> [model|serial|firm|cpu|dimm|all]
|
||||
MPA specific:
|
||||
rinv <noderange> [firm|bios|diag|mprom|sprom|mparom|mac|mtm]
|
||||
PPC specific(with HMC):
|
||||
|
@@ -579,6 +579,69 @@ sub Version
|
||||
return $version;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 get_conserver_version
|
||||
Returns:
|
||||
consever version number like 8.1.16, undef if error happens
|
||||
Globals:
|
||||
none
|
||||
Error:
|
||||
none
|
||||
Example:
|
||||
$version=xCAT::Utils->get_conserver_version();
|
||||
Comments:
|
||||
none
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
sub get_conserver_version
|
||||
{
|
||||
my $cmd = "/usr/sbin/conserver -V";
|
||||
# output format:
|
||||
# conserver: conserver.com version 8.2.1
|
||||
# conserver: default access type `r'
|
||||
my @out = xCAT::Utils->runcmd("$cmd", 0);
|
||||
if ($::RUNCMD_RC != 0 || @out < 1) {
|
||||
return undef;
|
||||
}
|
||||
my @parts = split(' ',$out[0]);
|
||||
if (@parts < 4) {
|
||||
return undef;
|
||||
}
|
||||
my @count = $parts[3] =~ /\./g;
|
||||
if (@count < 2) {
|
||||
return undef;
|
||||
}
|
||||
return $parts[3];
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 calc_conserver_version
|
||||
Arguments:
|
||||
version in string format
|
||||
Returns:
|
||||
version number
|
||||
Globals:
|
||||
none
|
||||
Error:
|
||||
none
|
||||
Example:
|
||||
$version=xCAT::Utils->calc_conserver_version("8.2.1");
|
||||
Comments:
|
||||
none
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
sub calc_conserver_version
|
||||
{
|
||||
my $ver_str = shift;
|
||||
my @vers = split(/\./, $ver_str);
|
||||
return ord($vers[2]) + ord($vers[1]) * 10000 + ord($vers[0]) * 100000000;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 make_node_list_file
|
||||
|
@@ -11,8 +11,9 @@ require Exporter;
|
||||
@EXPORT = qw();
|
||||
@EXPORT_OK = qw(distnames numdiscs);
|
||||
|
||||
use strict;
|
||||
|
||||
my %distnames = (
|
||||
our %distnames = (
|
||||
"1480943823.812754" => "centos7.3", #x86_64
|
||||
"1450147276.351714" => "centos7.2", #ppc64le
|
||||
"1449699925.561114" => "centos7.2", #x86_64
|
||||
@@ -135,7 +136,7 @@ my %distnames = (
|
||||
"1394111947.452332" => "pkvm2.1", # ppc64, PowerKVM
|
||||
"1413749127.352649" => "pkvm2.1.1", # ppc64, PowerKVM
|
||||
);
|
||||
my %numdiscs = (
|
||||
our %numdiscs = (
|
||||
"1156364963.862322" => 4,
|
||||
"1178480581.024704" => 3
|
||||
);
|
||||
|
@@ -127,12 +127,22 @@ elif [ -f "/usr/bin/console" ] || [ -f "/bin/console" ]; then
|
||||
#NOTE: IPv6 is not good with the below if going by IP, needs more sophisticated
|
||||
#parsing
|
||||
CONSERVER=`echo $CONSERVER|cut -d: -f 1`
|
||||
|
||||
CONSOLE_VER=`console -V | awk '/conserver.com version/ {print $4}'`
|
||||
#Detect console support of SSL, only fixup consolerc if encryption is detected
|
||||
if ! console -h 2>&1 | grep "encryption not compiled" > /dev/null; then
|
||||
# generate .consolerc if it does not exist or is empty
|
||||
if [ ! -s $HOME/.consolerc ]; then
|
||||
cat > $HOME/.consolerc << EOF
|
||||
if [ "$CONSOLE_VER" != "8.1.16" ]; then
|
||||
cat > $HOME/.consolerc << EOF
|
||||
config * {
|
||||
port 782;
|
||||
sslenabled yes;
|
||||
sslcacertificatefile $HOME/.xcat/ca.pem;
|
||||
sslcredentials $HOME/.xcat/client-cred.pem;
|
||||
}
|
||||
EOF
|
||||
else
|
||||
cat > $HOME/.consolerc << EOF
|
||||
config * {
|
||||
port 782;
|
||||
sslenabled yes;
|
||||
@@ -140,6 +150,7 @@ config * {
|
||||
sslcredentials $HOME/.xcat/client-cred.pem;
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# ssl is not enabled, comment out the ssl settings in .consolerc
|
||||
@@ -147,7 +158,10 @@ EOF
|
||||
sed -i 's/\Wssl/#ssl/1' $HOME/.consolerc
|
||||
fi
|
||||
fi
|
||||
|
||||
# for migration, upgrade conserver
|
||||
if [ "$CONSOLE_VER" != "8.1.16" ]; then
|
||||
sed -i 's/sslauthority/sslcacertificatefile/1' $HOME/.consolerc
|
||||
fi
|
||||
exec console $FORCE -M $CONSERVER $1
|
||||
else
|
||||
if [[ "$FORCE" == "-s" ]]; then
|
||||
|
@@ -10,13 +10,13 @@ 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 (using ipmi) server specific:
|
||||
=head2 OpenPOWER (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:
|
||||
=head2 OpenPOWER (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>]
|
||||
B<rinv> I<noderange> [B<model>|B<serial>|B<firm>|B<cpu>|B<dimm>|B<all>]
|
||||
|
||||
=head2 PPC (with HMC) specific:
|
||||
|
||||
@@ -125,19 +125,19 @@ Diagnostics information of firmware.
|
||||
|
||||
=item B<mprom>
|
||||
|
||||
Retrieves mprom firmware level
|
||||
Retrieves mprom firmware level.
|
||||
|
||||
=item B<deviceid>
|
||||
|
||||
Retrieves device identification. Usually device, manufacturing and product ids.
|
||||
Retrieves device identification. Usually device, manufacturing and product IDs.
|
||||
|
||||
=item B<uuid>
|
||||
|
||||
Retrieves the universally unique identifier
|
||||
Retrieves the universally unique identifier.
|
||||
|
||||
=item B<guid>
|
||||
|
||||
Retrieves the global unique identifier
|
||||
Retrieves the global unique identifier .
|
||||
|
||||
=item B<all>
|
||||
|
||||
|
@@ -24,7 +24,7 @@ The B<forwarders> value should be set to the IP address of one or more nameserve
|
||||
|
||||
An xCAT B<network> definition must be defined for each network used in the cluster. The B<net> and B<mask> attributes will be used by the B<makedns> command.
|
||||
|
||||
A network B<domain> and B<nameservers> values must be provided either in the B<network> definiton corresponding to the node or in the B<site> definition.
|
||||
A network B<domain> and B<nameservers> values must be provided either in the B<network> definition corresponding to the node or in the B<site> definition.
|
||||
|
||||
Only entries in /etc/hosts or the hosts specified by B<noderange> that have a corresponding xCAT network definition will be added to DNS.
|
||||
|
||||
|
@@ -16,7 +16,7 @@ The B<makenetworks> command can be used to gather network information from an xC
|
||||
|
||||
Every network that will be used to install a cluster node must be defined in the xCAT database.
|
||||
|
||||
The default behavior is to gather network information from the managment node, and any configured xCAT service nodes, and automatically save this information in the xCAT database.
|
||||
The default behavior is to gather network information from the management node, and any configured xCAT service nodes, and automatically save this information in the xCAT database.
|
||||
|
||||
You can use the "-d" option to display the network information without writing it to the database.
|
||||
|
||||
|
@@ -16,7 +16,7 @@ B<makeroutes> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<makeroutes> command adds or deletes routes on the management node or any given nodes. The B<noderange> specifies the nodes where the routes are to be added or removed. When the I<noderange> is omitted, the action will be done on the management node. The B<-r> option specifies the name of routes. The details of the routes are defined in the B<routes> table which contians the route name, subnet, net mask and gateway. If -r option is omitted, the names of the routes found on B<noderes.routenames> for the nodes or on B<site.mnroutenames> for the management node will be used.
|
||||
The B<makeroutes> command adds or deletes routes on the management node or any given nodes. The B<noderange> specifies the nodes where the routes are to be added or removed. When the I<noderange> is omitted, the action will be done on the management node. The B<-r> option specifies the name of routes. The details of the routes are defined in the B<routes> table which contains the route name, subnet, net mask and gateway. If -r option is omitted, the names of the routes found on B<noderes.routenames> for the nodes or on B<site.mnroutenames> for the management node will be used.
|
||||
|
||||
If you want the routes be automatically setup during node deployment, first put a list of route names to B<noderes.routenames> and then add I<setroute> script name to the B<postscripts.postbootscripts> for the nodes.
|
||||
|
||||
|
@@ -34,7 +34,7 @@ B<nodeset> only sets the next boot state, but does not reboot.
|
||||
B<nodeset> is called by B<rinstall> and B<winstall> and is also called by the
|
||||
installation process remotely to set the boot state back to "boot".
|
||||
|
||||
A user can supply their own scripts to be run on the mn or on the service node (if a hierarchical cluster) for a node when the nodeset command is run. Such scripts are called B<prescripts>. They should be copied to /install/prescripts dirctory. A table called I<prescripts> is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the nodeset command are stored in the 'begin' column of I<prescripts> table. The scripts to be run at the end of the nodeset command are stored in the 'end' column of I<prescripts> table. You can run 'tabdump -d prescripts' command for details. The following two environment variables will be passed to each script: NODES contains all the names of the nodes that need to run the script for and ACTION contains the current nodeset action. If I<#xCAT setting:MAX_INSTANCE=number> is specified in the script, the script will get invoked for each node in parallel, but no more than I<number> of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes.
|
||||
A user can supply their own scripts to be run on the mn or on the service node (if a hierarchical cluster) for a node when the nodeset command is run. Such scripts are called B<prescripts>. They should be copied to /install/prescripts directory. A table called I<prescripts> is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the nodeset command are stored in the 'begin' column of I<prescripts> table. The scripts to be run at the end of the nodeset command are stored in the 'end' column of I<prescripts> table. You can run 'tabdump -d prescripts' command for details. The following two environment variables will be passed to each script: NODES contains all the names of the nodes that need to run the script for and ACTION contains the current nodeset action. If I<#xCAT setting:MAX_INSTANCE=number> is specified in the script, the script will get invoked for each node in parallel, but no more than I<number> of instances will be invoked at a time. If it is not specified, the script will be invoked once for all the nodes.
|
||||
|
||||
|
||||
=head1 B<Options>
|
||||
@@ -77,7 +77,7 @@ for basic remote access. This causes the IP, netmask, gateway, username, and pa
|
||||
|
||||
=item B<shell>
|
||||
|
||||
This instructs tho node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
This instructs the node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
The node will also be able to be sshed into and have utilities such as wget, tftp, scp, nfs, and cifs. It will have storage drivers available for many common systems.
|
||||
|
||||
=item B<shutdown>
|
||||
|
@@ -4,19 +4,19 @@ B<rinstall> - Begin OS provision on a noderange
|
||||
|
||||
=head1 B<Synopsis>
|
||||
|
||||
B<rinstall> I<noderange> B<boot> | B<shell> | B<runcmd=bmcsetup> [B<-c>|B<--console>] [B<-V>|B<--verbose>]
|
||||
B<rinstall> I<noderange> [B<boot> | B<shell> | B<runcmd=bmcsetup>] [B<runimage=>I<task>] [B<-c>|B<--console>] [B<-V>|B<--verbose>]
|
||||
|
||||
B<rinstall> I<noderange> B<osimage>=I<imagename> | [B<-O>] I<imagename> [B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>]
|
||||
B<rinstall> I<noderange> [B<osimage>=I<imagename> | I<imagename>] [B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>]
|
||||
|
||||
B<rinstall> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
|
||||
=head1 B<Description>
|
||||
|
||||
B<rinstall> is a convenience command to begin OS provision on a noderange(support nodes with "nodetype.mgt=ipmi,blade,hmc,ivm,fsp,kvm,esx,rhevm").
|
||||
B<rinstall> is a convenience command to begin OS provision on a noderange.
|
||||
|
||||
If B<osimage>=I<imagename> | B<-O> I<imagename> is specified or nodetype.provmethod=B<osimage> is set, provision the noderange with the osimage specified/configured.
|
||||
If B<osimage>=I<imagename> | I<imagename> is specified or nodetype.provmethod=B<osimage> is set, provision the noderange with the osimage specified/configured.
|
||||
|
||||
If -c is specified, it will then run rcons on the node. This is allowed only if one node in the noderange. If need consoles on multiple nodes , see L<winstall(8)|winstall.8>.
|
||||
If B<-c> is specified, it will then run rcons on the node. This is allowed only if one node in the noderange. If need consoles on multiple nodes, see L<winstall(8)|winstall.8>.
|
||||
|
||||
=head1 B<Options>
|
||||
|
||||
@@ -26,26 +26,25 @@ If -c is specified, it will then run rcons on the node. This is allowed only if
|
||||
|
||||
Instruct network boot loader to be skipped, generally meaning boot to hard disk
|
||||
|
||||
=item B<osimage>|B<osimage=>I<imagename>|B<-O>I<imagename>
|
||||
=item I<imagename> | B<osimage=>I<imagename>
|
||||
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the I<osimage> table and I<linuximage> table. If the <imagename> is omitted, the os image name will be obtained from I<nodetype.provmethod> for the node.
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the I<osimage> table and I<linuximage> table. If the I<imagename> is omitted, the os image name will be obtained from I<nodetype.provmethod> for the node.
|
||||
|
||||
=item B<--ignorekernelchk>
|
||||
|
||||
Skip the kernel version checking when injecting drivers from osimage.driverupdatesrc. That means all drivers from osimage.driverupdatesrc will be injected to initrd for the specific target kernel.
|
||||
|
||||
=item B<runimage>=I<task>
|
||||
=item B<runimage=>I<task>
|
||||
|
||||
If you would like to run a task after deployment, you can define that task with this attribute.
|
||||
|
||||
=item B<runcmd=bmcsetup>
|
||||
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC
|
||||
for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
|
||||
=item B<shell>
|
||||
|
||||
This instructs tho node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
This instructs the node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
The node will also be able to be sshed into and have utilities such as wget, tftp, scp, nfs, and cifs. It will have storage drivers available for many common systems.
|
||||
|
||||
=item B<-h>|B<--help>
|
||||
@@ -60,7 +59,7 @@ Display version.
|
||||
|
||||
For BMC-based servers, to specify the next boot mode to be "UEFI Mode".
|
||||
|
||||
=item B<-V>|B<--Verbose>
|
||||
=item B<-V>|B<--verbose>
|
||||
|
||||
Verbose output.
|
||||
|
||||
|
@@ -4,19 +4,19 @@ B<winstall> - Begin OS provision on a noderange
|
||||
|
||||
=head1 B<Synopsis>
|
||||
|
||||
B<rinstall> I<noderange> B<boot> | B<shell> | B<runcmd=bmcsetup> [B<-c>|B<--console>] [B<-V>|B<--verbose>]
|
||||
B<winstall> I<noderange> [B<boot> | B<shell> | B<runcmd=bmcsetup>] [B<runimage=>I<task>] [B<-V>|B<--verbose>]
|
||||
|
||||
B<rinstall> I<noderange> B<osimage>=I<imagename> | [B<-O>] I<imagename> [B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>]
|
||||
B<winstall> I<noderange> [B<osimage>=I<imagename> | I<imagename>] [B<--ignorekernelchk>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>]
|
||||
|
||||
B<rinstall> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
B<winstall> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
|
||||
=head1 B<Description>
|
||||
|
||||
B<winstall> is a convenience command to begin OS provision on a noderange(support nodes with "nodetype.mgt=ipmi,blade,hmc,ivm,fsp,kvm,esx,rhevm").
|
||||
B<winstall> is a convenience command to begin OS provision on a noderange.
|
||||
|
||||
If B<osimage>=I<imagename> | B<-O> I<imagename> is specified or nodetype.provmethod=B<osimage> is set, provision the noderange with the osimage specified/configured.
|
||||
|
||||
It will then run wcons on the nodes.
|
||||
If B<osimage>=I<imagename> | I<imagename> is specified or nodetype.provmethod=B<osimage> is set, provision the noderange with the osimage specified/configured.
|
||||
|
||||
It will then run B<wcons> on the noderange.
|
||||
|
||||
=head1 B<Options>
|
||||
|
||||
@@ -26,26 +26,25 @@ It will then run wcons on the nodes.
|
||||
|
||||
Instruct network boot loader to be skipped, generally meaning boot to hard disk
|
||||
|
||||
=item B<osimage>|B<osimage=>I<imagename>|B<-O>I<imagename>
|
||||
=item I<imagename> | B<osimage=>I<imagename>
|
||||
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the I<osimage> table and I<linuximage> table. If the <imagename> is omitted, the os image name will be obtained from I<nodetype.provmethod> for the node.
|
||||
Prepare server for installing a node using the specified os image. The os image is defined in the I<osimage> table and I<linuximage> table. If the I<imagename> is omitted, the os image name will be obtained from I<nodetype.provmethod> for the node.
|
||||
|
||||
=item B<--ignorekernelchk>
|
||||
|
||||
Skip the kernel version checking when injecting drivers from osimage.driverupdatesrc. That means all drivers from osimage.driverupdatesrc will be injected to initrd for the specific target kernel.
|
||||
|
||||
=item B<runimage>=I<task>
|
||||
=item B<runimage=>I<task>
|
||||
|
||||
If you would like to run a task after deployment, you can define that task with this attribute.
|
||||
|
||||
=item B<runcmd=bmcsetup>
|
||||
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC
|
||||
for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table.
|
||||
|
||||
=item B<shell>
|
||||
|
||||
This instructs tho node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
This instructs the node to boot to the xCAT genesis environment, and present a shell prompt on console.
|
||||
The node will also be able to be sshed into and have utilities such as wget, tftp, scp, nfs, and cifs. It will have storage drivers available for many common systems.
|
||||
|
||||
=item B<-h>|B<--help>
|
||||
@@ -60,31 +59,28 @@ Display version.
|
||||
|
||||
For BMC-based servers, to specify the next boot mode to be "UEFI Mode".
|
||||
|
||||
=item B<-V>|B<--Verbose>
|
||||
=item B<-V>|B<--verbose>
|
||||
|
||||
Verbose output.
|
||||
|
||||
=item B<-c>|B<--console>
|
||||
|
||||
Requests that rinstall runs rcons once the provision starts. This will only work if there is only one node in the noderange. See L<winstall(8)|winstall.8> for starting consoles on multiple nodes.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 B<Examples>
|
||||
|
||||
=over 2
|
||||
|
||||
=item 1.
|
||||
Provison nodes 1 through 20, using their current configuration.
|
||||
Provision nodes 1 through 20, using their current configuration.
|
||||
|
||||
winstall node1-node20
|
||||
|
||||
=item 2.
|
||||
Provision nodes 1 through 20 with the osimage rhels6.4-ppc64-netboot-compute.
|
||||
|
||||
winstall node1-node20 -O rhels6.4-ppc64-netboot-compute
|
||||
winstall node1-node20 osimage=rhels6.4-ppc64-netboot-compute
|
||||
|
||||
=back
|
||||
=back
|
||||
|
||||
=head1 B<See> B<Also>
|
||||
|
||||
|
@@ -38,15 +38,15 @@ Displays verbose messages.
|
||||
|
||||
=item B<-i|--initialinstall>
|
||||
|
||||
The install option is normally run as a post operation from the rpm xCAT.spec file during the initial install of xCAT on the Management Node. It will setup the root ssh keys, ssh node keys, xCAT credentials, initialize the datebase, export directories, start syslog and other daemons as needed after the initial install of xCAT.
|
||||
The install option is normally run as a post operation from the rpm xCAT.spec file during the initial install of xCAT on the Management Node. It will setup the root ssh keys, ssh node keys, xCAT credentials, initialize the database, export directories, start syslog and other daemons as needed after the initial install of xCAT.
|
||||
|
||||
=item B<-u|--updateinstall>
|
||||
|
||||
The update install option is normally run as a post operation from the rpm xCAT.spec file during an update install of xCAT on the Management Node. It will check the setup the root ssh keys, ssh node keys, xCAT credentials, datebase, exported directories, syslog and the state of daemons needed by xCAT, after the updateinstall of xCAT. If setup is required, it will perform the operation. It will restart the necessary daemons.
|
||||
The update install option is normally run as a post operation from the rpm xCAT.spec file during an update install of xCAT on the Management Node. It will check the setup the root ssh keys, ssh node keys, xCAT credentials, database, exported directories, syslog and the state of daemons needed by xCAT, after the updateinstall of xCAT. If setup is required, it will perform the operation. It will restart the necessary daemons.
|
||||
|
||||
=item B<-k|--sshkeys>
|
||||
|
||||
This option will remove and regenerate the root id_rsa keys. It should only be used, if the keys are deleted or corrupted. The keys must then be distribute to the nodes by installing, running updatenode -k, or using xdsh -K option, for root to be able to ssh to the nodes without being prompted for a password.
|
||||
This option will remove and regenerate the root id_rsa keys. It should only be used, if the keys are deleted or corrupted. The keys must then be distributed to the nodes by installing, running updatenode -k, or using xdsh -K option, for root to be able to ssh to the nodes without being prompted for a password.
|
||||
rspconfig will need to be run to distribute the key to the MM and HMCs. Any device, we need to ssh from the MN to the device will also have to be updated with the new ssh keys.
|
||||
|
||||
=item B<-s|--sshnodehostkeys>
|
||||
@@ -55,7 +55,7 @@ This option will remove and regenerate the node host ssh keys. It should only b
|
||||
|
||||
=item B<-c|--credentials>
|
||||
|
||||
This option will remove all xcat credentials for root and any userids where credentials have been created. It will regenerate roots credentials, but the admin will have to add back all the userid credentials needed with the /opt/xcat/share/xcat/scripts/setup-local-client.sh <username> command. It should only be used, if they are deleted or become corrupted. The root credentials must be redistribed to the service nodes by installing the service node or using updatenode -k. makeconservercf must be rerun to pick up the new credentials, and conserver must be stop and started.
|
||||
This option will remove all xcat credentials for root and any userids where credentials have been created. It will regenerate roots credentials, but the admin will have to add back all the userid credentials needed with the /opt/xcat/share/xcat/scripts/setup-local-client.sh <username> command. It should only be used, if they are deleted or become corrupted. The root credentials must be redistributed to the service nodes by installing the service node or using updatenode -k. makeconservercf must be rerun to pick up the new credentials, and conserver must be stopped and started.
|
||||
|
||||
=item B<-d|--database>
|
||||
|
||||
@@ -63,9 +63,9 @@ This option will reinitialize the basic xCAT database table setup. It will not
|
||||
|
||||
=item B<-f|--force>
|
||||
|
||||
The force option may be used after the install to reinitialize the Management Node. This option will regenerate keys, credential and reinititialize the site table. This option should be used, if keys or credentials become corrupt or lost.
|
||||
The force option may be used after the install to reinitialize the Management Node. This option will regenerate keys, credential and reinitialize the site table. This option should be used, if keys or credentials become corrupt or lost.
|
||||
Additional action must be taken after using the force options. ssh keys must be redistributed to the nodes, site table attributes might need to be restored, makeconservercf needs to be rerun to pick up the new credentials and conserver stopped and started, rspconfig needs to be rerun to distribute the new keys to the MM and the HMCs.
|
||||
A new set of common ssh host keys will have been generated for the nodes. If you wish your nodes to be able to ssh to each other with out password intervention, then you should redistribute these new keys to the nodes. If the nodes hostkeys are updated then you will need to remove their entries from the known_hosts files on the management node before using ssh, xdsh, xdcp.
|
||||
A new set of common ssh host keys will have been generated for the nodes. If you wish your nodes to be able to ssh to each other with out password intervention, then you should redistribute these new keys to the nodes. If the nodes hostkeys are updated then you will need to remove their entries from the known_hosts files on the management node before using ssh, xdsh, xdcp.
|
||||
Redistribute credentials and ssh keys to the service nodes and ssh keys to the nodes by using the updatenode -k command.
|
||||
|
||||
=item B<-m|--mgtnode>
|
||||
|
@@ -85,7 +85,7 @@ The B<xcatsetup> command has only been implemented and tested for system p serve
|
||||
=head2 Configuration File
|
||||
|
||||
The B<config file> is organized in stanza format and supports the keywords in the sample file below. Comment lines
|
||||
begin with "#". Stanzas can be ommitted if you do not want to define that type of object.
|
||||
begin with "#". Stanzas can be omitted if you do not want to define that type of object.
|
||||
The only hostname formats supported are those shown in this sample file, although you can change the base
|
||||
text and the numbers. For example, hmc1-hmc3 could be changed to hwmgmt01-hwmgmt12.
|
||||
The hostnames specified must sort correctly. I.e. use node01-node80, instead of node1-node80.
|
||||
|
@@ -1074,8 +1074,8 @@ sub bmcdiscovery_openbmc{
|
||||
my $serial;
|
||||
|
||||
if (defined($response->{data})) {
|
||||
if (defined($response->{data}->{PartNumber}) and defined($response->{data}->{SerialNumber})) {
|
||||
$mtm = $response->{data}->{PartNumber};
|
||||
if (defined($response->{data}->{Model}) and defined($response->{data}->{SerialNumber})) {
|
||||
$mtm = $response->{data}->{Model};
|
||||
$serial = $response->{data}->{SerialNumber};
|
||||
} else {
|
||||
xCAT::MsgUtils->message("W", { data => ["Could not obtain Model Type and/or Serial Number for BMC at $ip"] }, $::CALLBACK);
|
||||
|
@@ -207,7 +207,16 @@ sub docfheaders {
|
||||
{
|
||||
push @newheaders, "config * {\n";
|
||||
push @newheaders, " sslrequired yes;\n";
|
||||
push @newheaders, " sslauthority /etc/xcat/cert/ca.pem;\n";
|
||||
my $version = xCAT::Utils::get_conserver_version();
|
||||
if (!$version) {
|
||||
xCAT::SvrUtils::sendmsg([ 1, "Failed to get conserver version" ], $cb);
|
||||
return;
|
||||
}
|
||||
if (xCAT::Utils::calc_conserver_version($version) < xCAT::Utils::calc_conserver_version("8.1.19")) {
|
||||
push @newheaders, " sslauthority /etc/xcat/cert/ca.pem;\n";
|
||||
} else {
|
||||
push @newheaders, " sslcacertificatefile /etc/xcat/cert/ca.pem;\n";
|
||||
}
|
||||
push @newheaders, " sslcredentials /etc/xcat/cert/server-cred.pem;\n";
|
||||
push @newheaders, "}\n";
|
||||
}
|
||||
|
@@ -2457,10 +2457,11 @@ sub addnet
|
||||
{
|
||||
$tftp = $ent->{tftpserver};
|
||||
}
|
||||
else
|
||||
{ #presume myself to be it, dhcp no longer does this for us
|
||||
if (!$tftp || ($tftp eq '<xcatmaster>'))
|
||||
{
|
||||
$tftp = $myip;
|
||||
}
|
||||
|
||||
if ($ent and $ent->{gateway})
|
||||
{
|
||||
$gateway = $ent->{gateway};
|
||||
|
@@ -649,7 +649,10 @@ sub process_request_nmap {
|
||||
|
||||
# get additional options from site table
|
||||
my @nmap_options = xCAT::TableUtils->get_site_attribute("nmapoptions");
|
||||
my $more_options = $nmap_options[0];
|
||||
my $more_options = "";
|
||||
if (defined($nmap_options[0])) {
|
||||
$more_options = $nmap_options[0];
|
||||
}
|
||||
|
||||
foreach my $ip6 (0, 1) { #first pass, ipv4, second pass ipv6
|
||||
if ($ip6 and scalar(@ip6s)) {
|
||||
|
@@ -416,7 +416,7 @@ sub parse_args {
|
||||
}
|
||||
} elsif ($command eq "rinv") {
|
||||
$subcommand = "all" if (!defined($ARGV[0]));
|
||||
unless ($subcommand =~ /^cpu$|^dimm$|^model$|^serial$|^firm$|^mac$|^vpd$|^mprom$|^deviceid$|^guid$|^uuid$|^all$/) {
|
||||
unless ($subcommand =~ /^model$|^serial$|^firm$|^cpu$|^dimm$|^all$/) {
|
||||
return ([ 1, "Unsupported command: $command $subcommand" ]);
|
||||
}
|
||||
} elsif ($command eq "getopenbmccons") {
|
||||
@@ -1018,10 +1018,10 @@ sub rinv_response {
|
||||
|
||||
my $grep_string;
|
||||
if ($node_info{$node}{cur_status} eq "RINV_FIRM_RESPONSE") {
|
||||
$grep_string = "firm";
|
||||
} else {
|
||||
$grep_string = $status_info{RINV_RESPONSE}{argv};
|
||||
}
|
||||
$grep_string = "firm";
|
||||
} else {
|
||||
$grep_string = $status_info{RINV_RESPONSE}{argv};
|
||||
}
|
||||
|
||||
my $src;
|
||||
my $content_info;
|
||||
@@ -1031,52 +1031,45 @@ sub rinv_response {
|
||||
my %content = %{ ${ $response_info->{data} }{$key_url} };
|
||||
|
||||
if ($grep_string eq "firm") {
|
||||
# This handles the data from the /xyz/openbmc_project/Software endpoint.
|
||||
#
|
||||
# Handle printing out all posssible Software values in a generic format:
|
||||
# node: <Purpose> Software: <version> (<Activation>)
|
||||
#
|
||||
if (defined($content{Version}) and $content{Version}) {
|
||||
my $firm_ver = "System Firmware Product Version: " . "$content{Version}";
|
||||
xCAT::SvrUtils::sendmsg("$firm_ver", $callback, $node);
|
||||
my $purpose_value = uc ((split(/\./, $content{Purpose}))[-1]);
|
||||
my $activation_value = (split(/\./, $content{Activation}))[-1];
|
||||
#
|
||||
# The space below between "SOFTWARE:" and $content{Version} is intentional
|
||||
# to cause the sorting of this line before any additional info lines
|
||||
#
|
||||
$content_info = "$purpose_value SOFTWARE: $content{Version} ($activation_value)";
|
||||
push (@sorted_output, $content_info);
|
||||
|
||||
if ($content{ExtendedVersion} ne "") {
|
||||
# ExtendedVersion is going to be a comma separated list of additional software
|
||||
my @versions = split(',', $content{ExtendedVersion});
|
||||
foreach my $ver (@versions) {
|
||||
$content_info = "$purpose_value SOFTWARE: -- additional info: $ver";
|
||||
push (@sorted_output, $content_info);
|
||||
}
|
||||
}
|
||||
next;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (! defined $content{Present}) {
|
||||
# This should never happen, but if we find this, contact firmware team to fix...
|
||||
xCAT::SvrUtils::sendmsg("ERROR: Invalid data for $key_url, contact firmware team!", $callback, $node);
|
||||
next;
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
# SPECIAL CASE: If 'serial' or 'model' is specified, only return the system level information
|
||||
if ($grep_string eq "serial" or $grep_string eq "model") {
|
||||
if ($key_url ne "$openbmc_project_url/inventory/system") {
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
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") and $key_url =~ /\/motherboard$/) {
|
||||
xCAT::SvrUtils::sendmsg("No mprom information is available", $callback, $node);
|
||||
next if ($grep_string eq "mprom");
|
||||
}
|
||||
|
||||
if (($grep_string eq "vpd" or $grep_string eq "deviceid") and $key_url =~ /\/motherboard$/) {
|
||||
xCAT::SvrUtils::sendmsg("No deviceid information is available", $callback, $node);
|
||||
next if ($grep_string eq "deviceid");
|
||||
}
|
||||
|
||||
if ($grep_string eq "uuid") {
|
||||
xCAT::SvrUtils::sendmsg("No uuid information is available", $callback, $node);
|
||||
last;
|
||||
}
|
||||
|
||||
if ($grep_string eq "guid") {
|
||||
xCAT::SvrUtils::sendmsg("No guid information is available", $callback, $node);
|
||||
last;
|
||||
}
|
||||
|
||||
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/) {
|
||||
if ($key_url =~ /\/(cpu\d*)\/(\w+)/) {
|
||||
$src = "$1 $2";
|
||||
} else {
|
||||
@@ -1084,17 +1077,25 @@ sub rinv_response {
|
||||
}
|
||||
|
||||
foreach my $key (keys %content) {
|
||||
# If not all options is specified, check whether the key string contains
|
||||
# the keyword option. If so, add it to the return data
|
||||
if ($grep_string ne "all" and ((lc($key) !~ m/$grep_string/i) and ($key_url !~ m/$grep_string/i)) ) {
|
||||
next;
|
||||
}
|
||||
$content_info = uc ($src) . " " . $key . " : " . $content{$key};
|
||||
push (@sorted_output, $node . ": ". $content_info); #Save output in array
|
||||
push (@sorted_output, $content_info); #Save output in array
|
||||
}
|
||||
}
|
||||
}
|
||||
# If sorted array has any contents, sort it and print it
|
||||
if (scalar @sorted_output > 0) {
|
||||
@sorted_output = sort @sorted_output; #Sort all output
|
||||
my $result = join "\n", @sorted_output; #Join into a single string for easier display
|
||||
xCAT::SvrUtils::sendmsg("$result", $callback);
|
||||
}
|
||||
}
|
||||
# If sorted array has any contents, sort it and print it
|
||||
if (scalar @sorted_output > 0) {
|
||||
# sort alpha, then numeric
|
||||
my @sorted_output = grep {s/(^|\D)0+(\d)/$1$2/g,1} sort
|
||||
grep {s/(\d+)/sprintf"%06.6d",$1/ge,1} @sorted_output;
|
||||
xCAT::SvrUtils::sendmsg("$_", $callback, $node) foreach (@sorted_output);
|
||||
} else {
|
||||
xCAT::SvrUtils::sendmsg("$::NO_ATTRIBUTES_RETURNED", $callback, $node);
|
||||
}
|
||||
|
||||
if ($next_status{ $node_info{$node}{cur_status} }) {
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
|
@@ -622,8 +622,8 @@ sub usage {
|
||||
my $callback = shift;
|
||||
my $rsp = {};
|
||||
$rsp->{data}->[0] = "Usage:";
|
||||
$rsp->{data}->[1] = " $command <noderange> boot | shell | runcmd=bmcsetup [-c|--console] [-u|--uefimode] [-V|--verbose]";
|
||||
$rsp->{data}->[2] = " $command <noderange> osimage=<imagename> | -O <imagename> [--ignorekernelchk] [-c|--console] [-u|--uefimode] [-V|--verbose]";
|
||||
$rsp->{data}->[1] = " $command <noderange> [boot | shell | runcmd=bmcsetup] [runimage=<task>] [-c|--console] [-u|--uefimode] [-V|--verbose]";
|
||||
$rsp->{data}->[2] = " $command <noderange> [osimage=<imagename> | <imagename>] [--ignorekernelchk] [-c|--console] [-u|--uefimode] [-V|--verbose]";
|
||||
$rsp->{data}->[3] = " $command [-h|--help|-v|--version]";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
}
|
||||
|
@@ -464,6 +464,10 @@ if ($::INITIALINSTALL || $::FORCE || $::UPDATEINSTALL || $::genCredentials)
|
||||
|
||||
}
|
||||
|
||||
if ($::UPDATEINSTALL) {
|
||||
upgrade_conserver();
|
||||
}
|
||||
|
||||
# more config needed after xcatd start
|
||||
if ($::INITIALINSTALL || $::FORCE)
|
||||
{
|
||||
@@ -2338,3 +2342,45 @@ sub startnamedonboot
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
=head3 upgrade_conserver
|
||||
|
||||
Update conserver configuration files while upgrading xcat
|
||||
|
||||
=cut
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
sub upgrade_conserver
|
||||
{
|
||||
my $version = xCAT::Utils::get_conserver_version();
|
||||
if (!$version) {
|
||||
return;
|
||||
}
|
||||
if (xCAT::Utils::calc_conserver_version($version) < xCAT::Utils::calc_conserver_version("8.1.19")) {
|
||||
return;
|
||||
}
|
||||
my $cmd = "/bin/cat /etc/conserver.cf | grep sslauthority";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
return;
|
||||
}
|
||||
$cmd = "sed -i 's/sslauthority/sslcacertificatefile/1' /etc/conserver.cf";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
return;
|
||||
}
|
||||
#restart conserver daemon
|
||||
if (xCAT::Utils->isAIX()) {
|
||||
$cmd = "stopsrc -s conserver";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
$cmd = "startsrc -s conserver";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
} else {
|
||||
$cmd = "/etc/init.d/conserver stop";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
$cmd = "/etc/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
}
|
||||
}
|
||||
|
@@ -72,6 +72,12 @@ my $switchhash;
|
||||
my $passwdtab;
|
||||
my @passwd_ent;
|
||||
|
||||
#set community string for switch
|
||||
my $community = "public";
|
||||
my @snmpcs = xCAT::TableUtils->get_site_attribute("snmpc");
|
||||
my $tmp = $snmpcs[0];
|
||||
if (defined($tmp)) { $community = $tmp }
|
||||
|
||||
if ($::SWITCH) {
|
||||
my @filternodes = xCAT::NodeRange::noderange( $::SWITCH );
|
||||
if (nodesmissed) {
|
||||
@@ -80,7 +86,7 @@ if ($::SWITCH) {
|
||||
}
|
||||
# check switch attributes
|
||||
$switchestab = xCAT::Table->new('switches');
|
||||
$switchhash = $switchestab->getNodesAttribs(\@filternodes,['switchtype','sshusername','sshpassword','protocol']);
|
||||
$switchhash = $switchestab->getNodesAttribs(\@filternodes,['switchtype','sshusername','sshpassword','protocol','password','snmpversion']);
|
||||
|
||||
# get switch username and password from passwd
|
||||
$passwdtab = xCAT::Table->new('passwd');
|
||||
@@ -98,6 +104,9 @@ if ($::SWITCH) {
|
||||
$switchhash->{$fsw}->[0]->{sshpassword} = $passwd_ent[0]->{password};
|
||||
}
|
||||
}
|
||||
if (!defined($switchhash->{$fsw}->[0]->{password})) {
|
||||
$switchhash->{$fsw}->[0]->{password} = $community;
|
||||
}
|
||||
push @nodes, $fsw;
|
||||
} else {
|
||||
xCAT::MsgUtils->message("E","The $fsw is not BNT switch, will not config");
|
||||
@@ -117,12 +126,6 @@ if ($::SWITCH) {
|
||||
my $mactab = xCAT::Table->new("mac");
|
||||
my $machash = $mactab->getNodesAttribs(\@nodes,['mac']);
|
||||
|
||||
#set community string for switch
|
||||
my $community = "public";
|
||||
my @snmpcs = xCAT::TableUtils->get_site_attribute("snmpc");
|
||||
my $tmp = $snmpcs[0];
|
||||
if (defined($tmp)) { $community = $tmp }
|
||||
|
||||
my $switches = join(",",@nodes);
|
||||
my $cmd;
|
||||
my $vlan;
|
||||
@@ -330,12 +333,20 @@ sub config_snmp {
|
||||
my $username;
|
||||
my $passwd;
|
||||
my $protocol;
|
||||
my $snmppass;
|
||||
my $snmpversion;
|
||||
|
||||
my $login_cmd;
|
||||
|
||||
$username = $switchhash->{$switch}->[0]->{sshusername};
|
||||
$passwd = $switchhash->{$switch}->[0]->{sshpassword};
|
||||
$protocol = $switchhash->{$switch}->[0]->{protocol};
|
||||
if ($switchhash->{$switch}->[0]->{snmpversion} =~ /3/) {
|
||||
$snmppass=$community;
|
||||
} else {
|
||||
$snmppass = $switchhash->{$switch}->[0]->{password};
|
||||
}
|
||||
|
||||
if ($protocol =~ /telnet/) {
|
||||
$login_cmd = "telnet $switch\r";
|
||||
} else {
|
||||
@@ -343,7 +354,7 @@ sub config_snmp {
|
||||
}
|
||||
|
||||
#get hostname on the switch in case hostname is different
|
||||
my $ccmd = "snmpwalk -Os -v1 -c $community $switch 1.3.6.1.2.1.1.5";
|
||||
my $ccmd = "snmpwalk -Os -v1 -c $snmppass $switch 1.3.6.1.2.1.1.5";
|
||||
my $result = xCAT::Utils->runcmd($ccmd, 0);
|
||||
my ($desc,$switchhost) = split /: /, $result;
|
||||
if (!$switchhost) {
|
||||
|
@@ -125,11 +125,28 @@ sub config_ssh {
|
||||
my $cmd;
|
||||
my @config_switches;
|
||||
|
||||
my $nodetab = xCAT::Table->new('hosts');
|
||||
my $nodehash = $nodetab->getNodesAttribs(\@nodes,['ip','otherinterfaces']);
|
||||
|
||||
foreach my $switch (@nodes) {
|
||||
#remove old host key from /root/.ssh/known_hosts
|
||||
$cmd = `ssh-keygen -R $switch`;
|
||||
|
||||
my ($exp, $errstr) = cumulus_connect($switch, $userid, $password, $timeout);
|
||||
my $static_ip = $nodehash->{$switch}->[0]->{ip};
|
||||
my $discover_ip = $nodehash->{$switch}->[0]->{otherinterfaces};
|
||||
my $ssh_ip;
|
||||
|
||||
my $p = Net::Ping->new();
|
||||
if ($p->ping($static_ip)) {
|
||||
$ssh_ip = $static_ip;
|
||||
} elsif ($p->ping($discover_ip)) {
|
||||
$ssh_ip = $discover_ip;
|
||||
} else {
|
||||
print "$switch is not reachable\n";
|
||||
next;
|
||||
}
|
||||
|
||||
my ($exp, $errstr) = cumulus_connect($ssh_ip, $userid, $password, $timeout);
|
||||
if (!defined $exp) {
|
||||
print ("connect failed $errstr\n");
|
||||
next;
|
||||
@@ -142,6 +159,10 @@ sub config_ssh {
|
||||
($ret, $err) = cumulus_exec($exp, "chmod 700 /root/.ssh");
|
||||
($ret, $err) = cumulus_exec($exp, "echo \"$rootkey\" >/root/.ssh/authorized_keys");
|
||||
($ret, $err) = cumulus_exec($exp, "chmod 644 /root/.ssh/authorized_keys");
|
||||
#config dhcp ip address to static
|
||||
if ($ssh_ip eq $discover_ip) {
|
||||
($ret, $err) = cumulus_exec($exp, "ifconfig eth0 $static_ip");
|
||||
}
|
||||
|
||||
$exp->hard_close();
|
||||
push (@config_switches, $switch);
|
||||
|
@@ -163,11 +163,11 @@ cmd:chdef $$CN nicips.$$THIRDNIC="13.1.0.100|14.1.0.100" nictypes.$$THIRDNIC=Eth
|
||||
check:rc==0
|
||||
cmd:makehosts $$CN
|
||||
check:rc==0
|
||||
cmd:cat /etc/hosts
|
||||
check:output=~aliases1-1
|
||||
check:output=~aliases1-2
|
||||
check:output=~aliases2-1
|
||||
check:output=~aliases2-2
|
||||
#cmd:cat /etc/hosts
|
||||
#check:output=~aliases1-1
|
||||
#check:output=~aliases1-2
|
||||
#check:output=~aliases2-1
|
||||
#check:output=~aliases2-2
|
||||
cmd:updatenode $$CN -P confignics
|
||||
check:rc==0
|
||||
cmd:if [ "$$OS" = "ubuntu" ];then xdsh $$CN cat /etc/network/interfaces.d/$$SECONDNIC; else xdsh $$CN cat /etc/sysconfig/network*/ifcfg-$$SECONDNIC; fi
|
||||
|
@@ -4,6 +4,7 @@
|
||||
"ALL","/etc/ntp.conf","tmpfs",,
|
||||
"ALL","/etc/ntp.conf.org","tmpfs",,
|
||||
"ALL","/etc/resolv.conf","tmpfs",,
|
||||
"ALL","/etc/hostname","tmpfs",,
|
||||
"ALL","/etc/ssh/","tmpfs",,
|
||||
"ALL","/etc/sysconfig/","tmpfs",,
|
||||
"ALL","/etc/syslog-ng/","tmpfs",,
|
||||
|
|
@@ -75,6 +75,9 @@ cmd:xdsh $$CN mount
|
||||
check:rc==0
|
||||
check:output=~/nodedata/$$CN on /.statelite/persistent
|
||||
check:output=~compute/rootimg on / type nfs
|
||||
cmd:xdsh $$CN hostname
|
||||
check:rc==0
|
||||
check:output=~$$CN: $$CN
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "echo "test"> /test.statelite"
|
||||
check:rc!=0
|
||||
@@ -110,6 +113,9 @@ cmd:xdsh $$CN mount
|
||||
check:rc==0
|
||||
check:output=~/nodedata/$$CN on /.statelite/persistent
|
||||
check:output=~rootfs on / type tmpfs
|
||||
cmd:xdsh $$CN hostname
|
||||
check:rc==0
|
||||
check:output=~$$CN: $$CN
|
||||
cmd:sleep 120
|
||||
cmd:ping $$CN -c 3
|
||||
check:rc==0
|
||||
|
@@ -95,6 +95,9 @@ cmd:xdsh $$CN mount
|
||||
check:rc==0
|
||||
check:output=~/nodedata/$$CN on /.statelite/persistent
|
||||
check:output=~compute/rootimg on / type nfs
|
||||
cmd:xdsh $$CN hostname
|
||||
check:rc==0
|
||||
check:output=~$$CN: $$CN
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:xdsh $$CN "echo "test"> /test.statelite"
|
||||
check:rc!=0
|
||||
|
@@ -89,6 +89,9 @@ cmd:xdsh $$CN mount
|
||||
check:rc==0
|
||||
check:output=~/nodedata/$$CN on /.statelite/persistent
|
||||
check:output=~rootfs on / type
|
||||
cmd:xdsh $$CN hostname
|
||||
check:rc==0
|
||||
check:output=~$$CN: $$CN
|
||||
cmd:xdsh $$CN "cat /var/log/xcat/xcat.log"
|
||||
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
|
||||
check:rc==0
|
||||
|
@@ -4,14 +4,30 @@
|
||||
#check:rc!=0
|
||||
#check:output=~Usage
|
||||
#end
|
||||
start:rinv_h
|
||||
description:show help information for rinv
|
||||
cmd:rinv -h
|
||||
check:rc==0
|
||||
check:output=~Usage
|
||||
check:output=~rinv
|
||||
end
|
||||
start:rinv_v
|
||||
description:show version for Version
|
||||
cmd:rinv -v
|
||||
check:rc==0
|
||||
check:output=~Version
|
||||
end
|
||||
|
||||
start:rinv_bus
|
||||
arch:ppc
|
||||
description:rinv list all buses for each I/O slot
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:rinv $$CN bus
|
||||
check:rc==0
|
||||
check:output=~I/O Bus Information
|
||||
end
|
||||
start:rinv_config
|
||||
arch:ppc
|
||||
description:Retrieves number of processors, speed, total memory, and DIMM locations.
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:rinv $$CN config
|
||||
check:rc==0
|
||||
check:output=~Machine Configuration Info
|
||||
@@ -19,38 +35,86 @@ check:output=~Number of Processors:\s*\d+
|
||||
check:output=~Total Memory \(\w+\):\s*\d+
|
||||
end
|
||||
start:rinv_serial
|
||||
arch:ppc
|
||||
cmd:rinv $$CN serial
|
||||
description:Retrieves serial number.
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN serial
|
||||
check:rc==0
|
||||
check:output=~Serial Number:\s*\w{7}
|
||||
end
|
||||
start:rinv_model
|
||||
arch:ppc
|
||||
cmd:rinv $$CN model
|
||||
description:Retrieves serial number.
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN model
|
||||
check:rc==0
|
||||
check:output=~Machine Type/Model\s*:\s*\w{4}-\w{3}
|
||||
end
|
||||
start:rinv_firm
|
||||
arch:ppc
|
||||
cmd:rinv $$CN firm
|
||||
description:Retrieves firmware versions.
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN firm
|
||||
check:rc==0
|
||||
check:output=~Release Level\s*:\s*\w+
|
||||
end
|
||||
start:rinv_all
|
||||
arch:ppc
|
||||
cmd:rinv $$CN all
|
||||
description:get serial,model
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN all
|
||||
check:rc==0
|
||||
check:output=~I/O Bus Information
|
||||
check:output=~Machine Configuration Info
|
||||
check:output=~Number of Processors:\s*\d+
|
||||
check:output=~Total Memory \(\w+\):\s*\d+
|
||||
check:output=~Serial Number:\s*\w{7}
|
||||
check:output=~Machine Type/Model\s*:\s*\w{4}-\w{3}
|
||||
check:output=~Release Level\s*:\s*\w+
|
||||
end
|
||||
start:rinv_cpu
|
||||
description:get cpu information
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN cpu
|
||||
check:rc==0
|
||||
end
|
||||
start:rinv_dimm
|
||||
description:get dimm information
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN dimm
|
||||
check:rc==0
|
||||
end
|
||||
start:rinv_uuid
|
||||
description:get uuid information
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN uuid
|
||||
check:rc==0
|
||||
end
|
||||
start:rinv_vpd
|
||||
description:get vpd information
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN vpd
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:rinv_noderange_err
|
||||
cmd:rinv testnode
|
||||
check:rc!=0
|
||||
check:output=~Error
|
||||
end
|
||||
|
||||
start:rinv_mixnode
|
||||
description:get mixnode information,one is invalid node
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
|
||||
check:rc==0
|
||||
cmd:chdef testnode groups=test mgt=__GETNODEATTR($$CN,mgt)__
|
||||
check:rc==0
|
||||
cmd:chdef -p -t node -o $$CN groups="test"
|
||||
check:rc==0
|
||||
cmd:rinv test all
|
||||
check:rc==1
|
||||
check:output=~$$CN: SYSTEM
|
||||
cmd:chdef -m -t node -o $$CN groups="test"
|
||||
check:rc==0
|
||||
cmd:rmdef testnode;if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi
|
||||
check:rc==0
|
||||
end
|
||||
start:rinv_wrongbmcpasswd
|
||||
description:get right return if bmc's passwd wrong
|
||||
Attribute: $$CN-The operation object of rinv command
|
||||
cmd:lsdef -l $$CN -z >/tmp/testnode.stanza
|
||||
check:rc==0
|
||||
cmd:chdef $$CN bmcpassword=test
|
||||
check:rc==0
|
||||
cmd:rinv $$CN all
|
||||
check:rc==1
|
||||
check:output=~$$CN: Error: Invalid username or password
|
||||
cmd:cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza
|
||||
check:rc==0
|
||||
end
|
||||
|
@@ -1,70 +0,0 @@
|
||||
start:rinv_serial
|
||||
arch:ppc64le
|
||||
hcp:ipmi
|
||||
cmd:rinv $$CN serial
|
||||
check:rc==0
|
||||
check:output=~NODE 1 Chassis Serial Number:\s*\w{7}
|
||||
end
|
||||
|
||||
start:rinv_model
|
||||
arch:ppc64le
|
||||
hcp:ipmi
|
||||
cmd:rinv $$CN model
|
||||
check:rc==0
|
||||
check:output=~NODE 1 Chassis Part Number\s*:\s*\w{4}-\w{3}
|
||||
end
|
||||
|
||||
start:rinv_firm
|
||||
arch:ppc64le
|
||||
hcp:ipmi
|
||||
cmd:rinv $$CN firm
|
||||
check:rc==0
|
||||
check:output=~BMC Firmware\s*:\s*\w+.\w+
|
||||
end
|
||||
|
||||
start:rinv_deviceid
|
||||
hcp:ipmi
|
||||
arch:ppc64le
|
||||
cmd:rinv $$CN deviceid
|
||||
check:rc==0
|
||||
check:output=~Device ID:\s*\w+
|
||||
check:output=~Product ID:\s*\w+
|
||||
check:output=~Manufacturer ID:\s*\w+
|
||||
end
|
||||
|
||||
|
||||
start:rinv_vpd
|
||||
hcp:ipmi
|
||||
arch:ppc64le
|
||||
cmd:rinv $$CN vpd
|
||||
check:rc==0
|
||||
check:output=~Manufacturer ID:\s*\w+
|
||||
check:output=~Device ID:\s*\w+
|
||||
check:output=~BMC Firmware:\s*\w+.\w+
|
||||
check:output=~NODE 1 Chassis Serial Number:\s*\w{7}
|
||||
check:output=~NODE 1 Chassis Part Number\s*:\s*\w{4}-\w{3}
|
||||
end
|
||||
|
||||
|
||||
start:rinv_all
|
||||
hcp:ipmi
|
||||
arch:ppc64le
|
||||
cmd:rinv $$CN all
|
||||
check:rc==0
|
||||
check:output=~BMC Firmware:\s*\w+.\w+
|
||||
check:output=~BMCCARD Board Part Number:\s*\w{7}
|
||||
check:output=~UUID/GUID:\s*\w+-\w+-\w+-\w+-\w+
|
||||
check:output=~Product ID:\s*\d+
|
||||
check:output=~Manufacturer ID:\s*\d+
|
||||
check:output=~Device ID:\s*\d+
|
||||
check:output=~BMCCARD Board Serial Number:\s*\w+
|
||||
end
|
||||
|
||||
start:rinv_noderange_err
|
||||
hcp:ipmi
|
||||
arch:ppc64le
|
||||
cmd:rinv testnode
|
||||
check:rc!=0
|
||||
check:output=~Error
|
||||
end
|
||||
|
@@ -1,4 +1,6 @@
|
||||
start:rpower_off
|
||||
description:This case is to test off option could remote power off nodes
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN on
|
||||
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
|
||||
check:ouptut=~Running|on
|
||||
@@ -10,6 +12,8 @@ check:output=~Not Activated|off
|
||||
end
|
||||
|
||||
start:rpower_stat
|
||||
description:This case is to test stat option could show the power status of nodes
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN on
|
||||
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 5 ];then break;fi done
|
||||
cmd:rpower $$CN stat
|
||||
@@ -29,6 +33,8 @@ check:output=~Not Activated|off
|
||||
end
|
||||
|
||||
start:rpower_boot
|
||||
description:This case is to test boot option could power on the nodes if nodes in off state. Or could hard reset the nodes if they are on.
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN off
|
||||
cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
|
||||
cmd:rpower $$CN stat
|
||||
@@ -41,7 +47,8 @@ check:output=~Running|on
|
||||
end
|
||||
|
||||
start:rpower_status
|
||||
description:checkout rpower node status could get node's stauts
|
||||
description:This case is to test status option could show the power status of nodes
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN off
|
||||
cmd:a=0;while ! `rpower $$CN status|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
|
||||
cmd:rpower $$CN status
|
||||
@@ -54,7 +61,8 @@ check:output=~Running|on
|
||||
end
|
||||
|
||||
start:rpower_state
|
||||
description:checkout rpower node status could get node's stauts
|
||||
description:This case is to test state option could show the power status of nodes
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN off
|
||||
cmd:a=0;while ! `rpower $$CN state|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
|
||||
cmd:rpower $$CN state
|
||||
@@ -67,6 +75,8 @@ check:output=~Running|on
|
||||
end
|
||||
|
||||
start:rpower_on
|
||||
description:This case is to test on option could remote power on nodes
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN off
|
||||
cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
|
||||
cmd:rpower $$CN stat
|
||||
@@ -79,6 +89,8 @@ check:output=~Running|on
|
||||
end
|
||||
|
||||
start:rpower_reset
|
||||
description:This case is to test reset option could hard reset nodes when nodes are in on state.
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN on
|
||||
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
|
||||
cmd:rpower $$CN stat
|
||||
@@ -91,18 +103,24 @@ check:output=~Running|on
|
||||
end
|
||||
|
||||
start:rpower_noderange
|
||||
description:This case is to test rpower could process error usage and return help information.
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN
|
||||
check:rc!=0
|
||||
check:output=~Unsupported|Usage
|
||||
end
|
||||
|
||||
start:rpower_noderange_nodeps
|
||||
description:This case is to test rpower could process error usage and return help information.
|
||||
Attribute: $$CN-The operation object of rpower command
|
||||
cmd:rpower $$CN --nodeps
|
||||
check:rc!=0
|
||||
check:output=~Unsupported|Usage
|
||||
end
|
||||
|
||||
start:rpower_err_noderange
|
||||
description:This case is to test rpower could process error usage and return help information.
|
||||
Attribute:N/A
|
||||
cmd:rpower testnode stat
|
||||
check:rc!=0
|
||||
check:output=~Error
|
||||
|
@@ -18,9 +18,8 @@ end
|
||||
start:rvitals_temp
|
||||
description:Retrieves temperatures
|
||||
Attribute: $$CN-The operation object of rvitals command
|
||||
cmd:rvitals $$CN temp
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN temp
|
||||
check:rc==0
|
||||
check:output=~System Temperature|Ambient Temp|temperature
|
||||
end
|
||||
|
||||
start:rvitals_disktemp
|
||||
@@ -46,17 +45,15 @@ end
|
||||
start:rvitals_voltage
|
||||
description:Retrieves power supply and VRM voltage readings
|
||||
Attribute: $$CN-The operation object of rvitals command
|
||||
cmd:rvitals $$CN voltage
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN voltage
|
||||
check:rc==0
|
||||
check:output=~Frame Voltages|CPU VDD Volt|SysBrd
|
||||
end
|
||||
|
||||
start:rvitals_power
|
||||
description:Retrieves power status
|
||||
Attribute: $$CN-The operation object of rvitals command
|
||||
cmd:rvitals $$CN power
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN power
|
||||
check:rc==0
|
||||
check:output=~Current Power Status:\s*(on|off)|Power Status:\s*(on|off)
|
||||
end
|
||||
|
||||
start:rvitals_state
|
||||
@@ -79,12 +76,8 @@ end
|
||||
start:rvitals_all
|
||||
description:Retrieves all status
|
||||
Attribute: $$CN-The operation object of rvitals command
|
||||
cmd:rvitals $$CN all
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN all
|
||||
check:rc==0
|
||||
check:output=~System Temperature|Ambient Temp
|
||||
check:output=~Frame Voltages|CPU VDD Volt|SysBrd
|
||||
check:output=~Current Power Status:\s*(on|off)|Power Status:\s*(on|off)
|
||||
check:output=~ System State:|System Event:|NMI State
|
||||
end
|
||||
|
||||
start:rvitals_leds
|
||||
@@ -98,27 +91,28 @@ end
|
||||
start:rvitals_fanspeed
|
||||
description:Retrieves fan speeds.
|
||||
Attribute: $$CN-The operation object of rvitals command
|
||||
cmd:rvitals $$CN fanspeed
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN fanspeed
|
||||
check:rc==0
|
||||
check:output=~Fan|Fan\s*\d:\s*\w+\s*RPM
|
||||
end
|
||||
start:rvitals_wattage
|
||||
description:Retrieves wattage readings.
|
||||
Attribute: $$CN-The operation object of rvitals command
|
||||
cmd:rvitals $$CN wattage
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN wattage
|
||||
check:rc==0
|
||||
end
|
||||
start:rvitals_altitude
|
||||
description:Retrieves altitude readings.
|
||||
Attribute: $$CN-The operation object of rvitals command
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN altitude
|
||||
check:rc==0
|
||||
check:output=~12V Sense|AC Avg Power
|
||||
check:output=~Mem Cache Power|MEM Avg Power
|
||||
end
|
||||
start:rvitals_noderange_err
|
||||
description:using not defined node
|
||||
cmd:rvitals testnode
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals testnode
|
||||
check:rc!=0
|
||||
check:output=~Error
|
||||
end
|
||||
start:rvitals_errorcommand
|
||||
description:using wrong command
|
||||
cmd: rvitals $$CN errorcommand
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rvitals $$CN errorcommand
|
||||
check:rc!=0
|
||||
check:output=~Unrecognized rvitals arguments
|
||||
end
|
||||
|
59
xCAT-test/autotest/testcase/rvitals/openbmctest.sh
Executable file
59
xCAT-test/autotest/testcase/rvitals/openbmctest.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
function test_openbmccommand()
|
||||
{
|
||||
node_number=0;
|
||||
number=0;
|
||||
if [[ $1 ]]&&[[ $2 ]]&&[[ $3 ]];then
|
||||
`$1 $2 $3 >/tmp/openbmccommand.test`;
|
||||
if [[ $? -eq 0 ]];then
|
||||
echo right command;
|
||||
number=`awk 'END{print NR}' /tmp/openbmccommand.test`
|
||||
echo number is $number
|
||||
`cat /tmp/openbmccommand.test |awk -F : '{print $1}' > /tmp/openbmccommand.test1`
|
||||
for i in `cat /tmp/openbmccommand.test1`
|
||||
do
|
||||
echo $i
|
||||
if [[ $i == $2 ]];then
|
||||
node_number=1;
|
||||
else
|
||||
echo no than more node checked
|
||||
node_number=2;
|
||||
fi
|
||||
done
|
||||
if [[ $node_number -eq 1 ]];then
|
||||
`cat /tmp/openbmccommand.test |awk -F : '{print $2}'> /tmp/openbmccommand.test2`
|
||||
if [[ $number -eq 1 ]]&&[[ `awk -F "" '{for(i=1;i<=NF;++i) if($i==":") ++sum}END{print sum}' /tmp/openbmccommand.test` -eq 1 ]];then
|
||||
if [[ `cat /tmp/openbmccommand.test` =~ "No attributes returned from the BMC" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No mprom information is available" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No deviceid information is available" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No uuid information is available" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No guid information is available" ]];then
|
||||
echo "No attributes"
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
fi
|
||||
else
|
||||
if [[ `cat /tmp/openbmccommand.test2` =~ "No attributes returned from the BMC" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No mprom information is available" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No deviceid information is available" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No uuid information is available" ]]||[[ `cat /tmp/openbmccommand.test` =~ "No guid information is available" ]];then
|
||||
echo "wrong return"
|
||||
return 1;
|
||||
else
|
||||
echo "right return"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ $node_number -eq 2 ]];then
|
||||
return 0;
|
||||
fi
|
||||
fi
|
||||
else
|
||||
return 1;
|
||||
fi
|
||||
else
|
||||
return 1;
|
||||
fi
|
||||
}
|
||||
test_openbmccommand $1 $2 $3
|
||||
if [[ $? -eq 0 ]];then
|
||||
exit 0;
|
||||
else
|
||||
exit 1;
|
||||
fi
|
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
flag=$1
|
||||
mnhn=$2
|
||||
cnhn=$3
|
||||
|
||||
if [ $flag = "-s" ]; then
|
||||
cnip=`lsdef $cnhn -i bmc -c | awk -F '=' '{print $2}'`
|
||||
echo $cnip > "/tmp/simulator"
|
||||
mnip=`ping $mnhn -c 1 | grep "64 bytes from" |awk -F'(' '{print $2}'|awk -F')' '{print $1}'`
|
||||
chdef $cnhn bmc=$mnip
|
||||
elif [ $flag = "-c" ]; then
|
||||
cnip=`cat /tmp/simulator`
|
||||
chdef $cnhn bmc=$cnip
|
||||
process=`ps aux | grep "simulator" | grep "python" | awk -F ' ' '{print $2}'`
|
||||
if [ $process ]; then
|
||||
kill $process
|
||||
fi
|
||||
rm -rf "openbmc_simulator"
|
||||
fi
|
||||
exit $?
|
@@ -1,5 +1,23 @@
|
||||
start:clear_openbmc_simulator
|
||||
description:clear evironment
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/change_ip.sh -c $$MN $$CN
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:clear_openbmc_simulator_multiple_100
|
||||
description:clear evironment that simulate 100 OpenBMCs
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 100
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:clear_openbmc_simulator_multiple_1000
|
||||
description:clear evironment that simulate 1000 OpenBMCs
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 1000
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:clear_openbmc_simulator_multiple_5000
|
||||
description:clear evironment that simulate 5000 OpenBMCs
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 5000
|
||||
check:rc==0
|
||||
end
|
||||
|
74
xCAT-test/autotest/testcase/simulator/config_simulator.sh
Executable file
74
xCAT-test/autotest/testcase/simulator/config_simulator.sh
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
|
||||
flag=$1 # -s:setup simulator -c:clear simulator env
|
||||
mnhn=$2 # MN hostname
|
||||
cnhn=$3 # CN hostname
|
||||
username=$4 # bmcusername
|
||||
password=$5 # bmcpassword
|
||||
nodes=$6 # number of IPs want to config
|
||||
|
||||
if [ $nodes -gt 10000 ]; then
|
||||
echo "Unsupported number of nodes: $nodes"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mnip=`ping $mnhn -c 1 | grep "64 bytes from" |awk -F'(' '{print $2}'|awk -F')' '{print $1}'`
|
||||
if [ $nodes ]; then
|
||||
nic=`ip -4 -o a | grep $mnip | awk -F ' ' '{print $2}'`
|
||||
|
||||
((a=$nodes/100))
|
||||
((b=$nodes%100))
|
||||
if [ $b -eq 0 ]; then
|
||||
b=100
|
||||
fi
|
||||
range=`for((i=1;i<=$a;i++)); do for((m=1;m<=$b;m++)); do echo -n "10.100.$i.$m ";done; done`
|
||||
fi
|
||||
|
||||
if [ $flag = "-s" ]; then
|
||||
os=`cat /etc/*release*`
|
||||
if [[ "$os" =~ "Red Hat" ]] || [[ "$os" =~ "suse" ]]; then
|
||||
yum install git -y
|
||||
if [ $? != 0 ]; then
|
||||
echo "Install git Failed"
|
||||
exit 1
|
||||
fi
|
||||
elif [[ "$os" =~ "ubuntu" ]]; then
|
||||
apt-get install git -y
|
||||
if [ $? != 0 ]; then
|
||||
echo "Install git Failed"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cd /root/ && git clone git@github.com:xuweibj/openbmc_simulator.git
|
||||
|
||||
if [ $nodes ]; then
|
||||
lsdef $cnhn -z > /tmp/$cnhn.stanza
|
||||
rmdef $cnhn
|
||||
|
||||
/root/openbmc_simulator/simulator -n $nic -r $range
|
||||
|
||||
node_end=$[nodes-1]
|
||||
chdef -t group $cnhn mgt=openbmc bmc="|\D+(\d+)$|10.100.(1+((\$1)/100)).((\$1)%100+1)|" bmcusername=$username bmcpassword=$password
|
||||
chdef simulator_test_[0-$node_end] groups=$cnhn # use CN hostname as group, so when run command against CN will rpower against all nodes added here
|
||||
else
|
||||
cnip=`lsdef $cnhn -i bmc -c | awk -F '=' '{print $2}'`
|
||||
echo $cnip > "/tmp/simulator"
|
||||
mnip=`ping $mnhn -c 1 | grep "64 bytes from" |awk -F'(' '{print $2}'|awk -F')' '{print $1}'`
|
||||
chdef $cnhn bmc=$mnip
|
||||
/root/openbmc_simulator/simulator
|
||||
fi
|
||||
elif [ $flag = "-c" ]; then
|
||||
if [ $nodes ]; then
|
||||
/root/openbmc_simulator/simulator -c -n $nic -r $range
|
||||
rmdef $cnhn
|
||||
cat /tmp/$cnhn.stanza | mkdef -z
|
||||
else
|
||||
/root/openbmc_simulator/simulator -c
|
||||
cnip=`cat /tmp/simulator`
|
||||
chdef $cnhn bmc=$cnip
|
||||
fi
|
||||
|
||||
rm -rf /root/openbmc_simulator
|
||||
fi
|
||||
exit $?
|
@@ -1,24 +1,23 @@
|
||||
start:setup_openbmc_simulator
|
||||
description:install dependent packaages, setup and start openbmc simulator
|
||||
cmd:#!/bin/bash
|
||||
os=`cat /etc/*release*`
|
||||
if [[ "$os" =~ "Red Hat" ]] || [[ "$os" =~ "suse" ]]; then
|
||||
yum install git -y
|
||||
if [ $? != 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
elif [[ "$os" =~ "ubuntu" ]]; then
|
||||
apt-get install git -y
|
||||
if [ $? != 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
check:rc==0
|
||||
cmd:cd /root/ && git clone git@github.com:xuweibj/openbmc_simulator.git
|
||||
check:rc==0
|
||||
cmd:/root/openbmc_simulator/simulator &
|
||||
check:rc==0
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/change_ip.sh -s $$MN $$CN
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:setup_openbmc_simulator_multiple_100
|
||||
description:install dependent packaages, setup and start 100 openbmc simulator
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 100
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:setup_openbmc_simulator_multiple_1000
|
||||
description:install dependent packaages, setup and start 1000 openbmc simulator
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000
|
||||
check:rc==0
|
||||
end
|
||||
|
||||
start:setup_openbmc_simulator_multiple_5000
|
||||
description:install dependent packaages, setup and start 5000 openbmc simulator
|
||||
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 5000
|
||||
check:rc==0
|
||||
end
|
||||
|
Reference in New Issue
Block a user