2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jarrod Johnson 2018-01-16 11:13:14 -05:00
commit 74fba1a3b8
108 changed files with 5238 additions and 1084 deletions

View File

@ -8,7 +8,7 @@ Documentation
xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/
|docs_latest| |docs_2138| |docs_2137| |docs_2136| |docs_2135| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212|
|docs_latest| |docs_2139| |docs_2138| |docs_2137| |docs_2136| |docs_2135| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212|
Open Source License
-------------------
@ -22,6 +22,11 @@ Developers
Developers and prospective contributors are encouraged to read the `Developers Guide <http://xcat-docs.readthedocs.io/en/latest/developers/>`_
In particular the `GitHub <http://xcat-docs.readthedocs.io/en/latest/developers/github/>`_ related subsection.
.. |docs_2139| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.9
:alt: 2.13.9 documentation status
:scale: 100%
:target: http://xcat-docs.readthedocs.io/en/2.13.9/
.. |docs_2138| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.8
:alt: 2.13.8 documentation status
:scale: 100%

View File

@ -1 +1 @@
2.13.9
2.13.10

View File

@ -1,7 +1,8 @@
Q/A list
========
Questions & Answers
===================
.. toctree::
:maxdepth: 2
makehosts_qa.rst
makehosts.rst

View File

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

View File

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

View File

@ -0,0 +1,93 @@
Configure routes
-----------------
There are 2 ways to configure OS route in xCAT:
* ``makeroutes``: command to add or delete routes on the management node or any given nodes.
* ``setroute``: script to replace/add the routes to the node, it can be used in postscripts/postbootscripts.
``makeroutes`` or ``setroute`` will modify OS temporary route, it also modifies persistent route in ``/etc/sysconfig/static-routes`` file.
Before using ``makeroutes`` or ``setroute`` to configure OS route, details of the routes data such as routename, subnet, net mask and gateway should be stored in ``routes`` table.
Configure ``routes`` table
``````````````````````````
#. Store default route data in ``routes`` table: ::
chdef -t route defaultroute net=default mask=255.0.0.0 gateway=10.0.0.101
#. Store additional route data in ``routes`` table: ::
chdef -t route 20net net=20.0.0.0 mask=255.0.0.0 gateway=0.0.0.0 ifname=eth1
#. Check data in ``routes`` table: ::
tabdump routes
#routename,net,mask,gateway,ifname,comments,disable
"30net","30.0.0.0","255.0.0.0","0.0.0.0","eth2",,
"20net","20.0.0.0","255.0.0.0","0.0.0.0","eth1",,
"defaultroute","default","255.0.0.0","10.0.0.101",,,
Use ``makeroutes`` to configure OS route on xCAT management node
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#. define the names of the routes to be setup on the management node in ``site`` table: ::
chdef -t site mnroutenames="defaultroute,20net"
lsdef -t site clustersite -i mnroutenames
Object name: clustersite
mnroutenames=defaultroute,20net
#. add all routes from the ``mnroutenames`` to the OS route table for the management node: ::
makeroutes
#. add route ``20net`` and ``30net`` to the OS route table for the management node: ::
makeroutes -r 20net,30net
#. delete route ``20net`` from the OS route table for the management node: ::
makeroutes -d -r 20net
Use ``makeroutes`` to configure OS route for compute node
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#. define the names of the routes to be setup on the compute node: ::
chdef -t cn1 routenames="defaultroute,20net"
#. add all routes from the ``routenames`` to the OS route table for the compute node: ::
makeroutes cn1
#. add route ``20net`` and ``30net`` to the OS route table for the compute node: ::
makeroutes cn1 -r 20net,30net
#. delete route ``20net`` from the OS route table for the compute node: ::
makeroutes cn1,cn2 -d -r 20net
Use ``setroute`` to configure OS route for compute node
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
#. define the names of the routes to be setup on the compute node: ::
chdef -t cn1 routenames="defaultroute,20net"
#. If adding ``setroute [replace | add]`` into the nodes postscripts list, ``setroute`` will be executed during OS deployment on compute node to replace/add routes from ``routenames``: ::
chdef cn1 -p postscripts="setroute replace"
#. Or if the compute node is already running, use ``updatenode`` command to run ``setroute [replace | add]`` postscript: ::
updatenode cn1 -P "setroute replace"
Check result
````````````
#. Use ``route`` command in xCAT management node to check OS route table.
#. Use ``xdsh cn1 route`` to check compute node OS route table.

View File

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

View File

@ -8,3 +8,4 @@ This section describes how to configure network adapters with persistent configu
cfg_network_adapter.rst
cfg_second_adapter.rst
cfg_routes.rst

View File

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

View File

@ -8,3 +8,4 @@ This section describes how to configure network adapters with persistent configu
cfg_network_adapter.rst
cfg_second_adapter.rst
cfg_routes.rst

View File

@ -25,10 +25,6 @@ SYNOPSIS
\ **bmcdiscover**\ [\ **-**\ **-sn**\ \ *SN_nodename*\ ] [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] \ **-**\ **-range**\ \ *ip_ranges*\
\ **bmcdiscover**\ \ **-u**\ \ *bmc_user*\ \ **-p**\ \ *bmc_passwd*\ \ **-i**\ \ *bmc_ip*\ \ **-**\ **-check**\
\ **bmcdiscover**\ [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] \ **-i**\ \ *bmc_ip*\ \ **-**\ **-ipsource**\
***********
DESCRIPTION
@ -98,18 +94,6 @@ OPTIONS
\ **-**\ **-check**\
Check BMC administrator User/Password.
\ **-**\ **-ipsource**\
Display the BMC IP configuration.
\ **-h|-**\ **-help**\
Display usage message
@ -187,22 +171,6 @@ Output is similar to:
bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z
5. To check if the username or password is correct against the BMC:
.. code-block:: perl
bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --check
6. Get BMC IP Address source, DHCP Address or static Address
.. code-block:: perl
bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --ipsource
********
SEE ALSO

View File

@ -19,10 +19,17 @@ Name
****************
\ **reventlog**\ \ *noderange*\ {\ *number-of-entries*\ [\ **-s**\ ]|\ **all [-s] | clear**\ }
\ **reventlog**\ \ *noderange*\ [\ *number-of-entries*\ [\ **-s**\ ]|\ **all [-s] | clear**\ ]
\ **reventlog**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ]
OpenPOWER OpenBMC specific :
============================
\ **reventlog**\ \ *noderange*\ [\ **resolved=**\ {\ *id-list*\ |\ **LED**\ }]
*******************
\ **Description**\
@ -64,6 +71,12 @@ logs are stored on each servers service processor.
\ **resolved=**\ {\ *id-list*\ |\ **LED**\ }
Mark event log entries as resolved. Use comma separated list of entry ids to specify individual entries. Use \ **LED**\ to mark as resolved all event log entries that contribute to LED fault.
\ **-h | -**\ **-help**\
Print help.
@ -83,7 +96,7 @@ logs are stored on each servers service processor.
1.
1. List last 5 event log entries from node4 and node5
.. code-block:: perl
@ -110,7 +123,7 @@ logs are stored on each servers service processor.
2.
2. Clear all event log entries from node4 and node5
.. code-block:: perl
@ -129,6 +142,27 @@ logs are stored on each servers service processor.
3. Mark as resolved all event log entries from node4 that contribute to LED fault
.. code-block:: perl
reventlog node4 resolved=LED
Output is similar to:
.. code-block:: perl
Attempting to resolve the following log entries: LED...
node4: Resolved 51.
node4: Resolved 52.
node4: Resolved 58.
********
SEE ALSO

View File

@ -63,7 +63,9 @@ OpenPOWER OpenBMC specific :
\ **rflash**\ \ *noderange*\ \ *tar_file_path*\ {[\ **-c | -**\ **-check**\ ] | [\ **-a | -**\ **-activate**\ ] | [\ **-u | -**\ **-upload**\ ]}
\ **rflash**\ \ *noderange*\ \ *image_id*\ {[\ **-a | -**\ **-activate**\ ] | [\ **-d | -**\ **-delete**\ ]}
\ **rflash**\ \ *noderange*\ \ *tar_file_directory*\ [\ **-d**\ ] [\ **-**\ **-no-host-reboot**\ ]
\ **rflash**\ \ *noderange*\ \ *image_id*\ {[\ **-a | -**\ **-activate**\ ] | [\ **-**\ **-delete**\ ]}
@ -148,36 +150,34 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node
\ **-l|-**\ **-list**\ :
The list option will list out available firmware on the BMC. It provides an interface to display the ID of the various firmware levels.
.. code-block:: perl
The list option will list out available firmware on the BMC. It provides an interface to display the ID of the various firmware levels.
The (*) symbol indicates the active running firmware on the server.
The (+) symbol indicates the firmware that is pending and a reboot is required to set it to be the active running firmware level.
The (\*) symbol indicates the active running firmware on the server.
The (+) symbol indicates the firmware that is pending and a reboot is required to set it to be the active running firmware level.
\ **-u|-**\ **-upload**\ :
.. code-block:: perl
The upload option expects a .tar file as the input and will upload the file to the BMC. Use the list option to view the result.
The upload option expects a .tar file as the input and will upload the file to the BMC. Use the list option to view the result.
\ **-a|-**\ **-activate**\ :
.. code-block:: perl
The activate option expects either a .tar file or an ID as the input. If a .tar file is provided, it will upload and activate the firmware in a single step
The activate option expects either a .tar file or an ID as the input. If a .tar file is provided, it will upload and activate the firmware in a single step
To apply the firmware level, a reboot is required to BMC and HOST.
\ **Note:**\ When using \ **rflash**\ in hierarchical environment, the .tar file must be accessible from Service Nodes.
\ **-d**\ :
This option steamlines the update, activate, reboot BMC and reboot HOST procedure. It expects a directory containing both BMC and PNOR .tar files. When BMC and PNOR tar files are provided, the command will upload and activate firmware. After BMC becomes activate, it will reboot BMC. If BMC state is Ready, the command will reboot the HOST. If BMC state is NotReady, the command will exit.
\ **Note:**\ When using \ **-**\ **-no-host-reboot**\ , it will not reboot the host after BMC is reboot.
\ **-**\ **-delete**\ :
This delete option will delete update image from BMC. It expects an ID as the input.
***************
@ -264,7 +264,7 @@ To apply the firmware level, a reboot is required to BMC and HOST.
\ **-d|-**\ **-delete**\
\ **-**\ **-delete**\
Delete update image from BMC
@ -357,7 +357,7 @@ To apply the firmware level, a reboot is required to BMC and HOST.
6. To update the firmware on IBM Power S822LC for Big Data machine specify the node name and the file path of the data directory containing pUpdate utility and BMC and/or PNOR update files:
6. To update the firmware on IBM Power S822LC for Big Data machine specify the node name and the file path of the data directory containing pUpdate utility, both BMC and PNOR update files:
.. code-block:: perl
@ -372,7 +372,7 @@ To apply the firmware level, a reboot is required to BMC and HOST.
.. code-block:: perl
rflash p9euh02 -a /tmp/witherspoon.pnor.squashfs.tar
rflash p9euh02 -a /tmp/witherspoon.pnor.squashfs.tar

View File

@ -90,7 +90,7 @@ OPTIONS
\ **-C|-**\ **-cleanup**\
Perform additional cleanup by running \ **nodeset offline**\ on the objects specified in the \ *noderange*\ .
Perform additional cleanup by running \ **nodeset offline**\ and \ **makeconservercf -d**\ on the objects specified in the \ *noderange*\ .

View File

@ -49,6 +49,8 @@ OpenBMC specific:
\ **rspconfig**\ \ *noderange*\ {\ **ipsrc | ip | netmask | gateway | hostname | vlan | sshcfg**\ }
\ **rspconfig**\ \ *noderange*\ \ **dump**\ [\ **-l | -**\ **-list**\ ] [\ **-g | -**\ **-generate**\ ] [\ **-c | -**\ **-clear**\ {\ *id*\ |\ **all**\ }] [\ **-d | -**\ **-download**\ \ *id*\ ]
MPA specific:
=============
@ -430,6 +432,29 @@ OPTIONS
\ **dump**\
Manage OpenBMC system dumps. If no sub-option is provided, will generate, wait, and download the dump.
\ **-c**\ will clear a single specified dump, or use 'all' to clear all dumps on the BMC.
\ **-l**\ will list all the generated dumps on the BMC.
\ **-g**\ will generate a new dump on the BMC. Dump generation can take a few minutes.
\ **-d**\ will download a single dump from the BMC to /var/log/xcat/dump on management or service node.
\ **network**\ ={[\ *ip*\ ],[\ *host*\ ],[\ *gateway*\ ],[\ *netmask*\ ]|\*}
For MPA: get or set the MPA network parameters. If '\*' is specified, all parameters are read from the xCAT database.
@ -1230,6 +1255,48 @@ EXAMPLES
31. To list BMC dumps available for download:
.. code-block:: perl
rspconfig p9euh02 dump -l
Output is similar to:
.. code-block:: perl
p9euh02: [1] Generated: 09/06/2017 14:31:49, Size: 4528
p9euh02: [2] Generated: 09/06/2017 14:31:55, Size: 4516
p9euh02: [3] Generated: 09/06/2017 14:32:01, Size: 4236
p9euh02: [4] Generated: 09/06/2017 14:32:07, Size: 4248
p9euh02: [5] Generated: 09/06/2017 14:32:11, Size: 4268
32. To generate and download BMC dump:
.. code-block:: perl
rspconfig p9euh02 dump
Output is similar to:
.. code-block:: perl
Capturing BMC Diagnostic information, this will take some time...
p9euh02: Dump requested. Target ID is 6, waiting for BMC to generate...
p9euh02: Dump 6 generated. Downloading to /var/log/xcat/dump/20171211-0951_p9euh02_dump_6.tar.xz
********
SEE ALSO

View File

@ -67,7 +67,7 @@ OpenPOWER (OpenBMC) specific:
=============================
\ **rvitals**\ \ *noderange*\ [\ **temp | voltage | wattage | fanspeed | power | altitude | all**\ ]
\ **rvitals**\ \ *noderange*\ [\ **temp | voltage | wattage | fanspeed | power | leds | altitude | all**\ ]

View File

@ -19,7 +19,7 @@ SYNOPSIS
********
\ **pdu Attributes:**\ \ *node*\ , \ *nodetype*\ , \ *outlet*\ , \ *machinetype*\ , \ *modelnum*\ , \ *serialnum*\ , \ *comments*\ , \ *disable*\
\ **pdu Attributes:**\ \ *node*\ , \ *nodetype*\ , \ *pdutype*\ , \ *outlet*\ , \ *username*\ , \ *password*\ , \ *snmpversion*\ , \ *community*\ , \ *snmpuser*\ , \ *authtype*\ , \ *authkey*\ , \ *privtype*\ , \ *privkey*\ , \ *seclevel*\ , \ *comments*\ , \ *disable*\
***********
@ -48,27 +48,75 @@ pdu Attributes:
\ **pdutype**\
The type of pdu
\ **outlet**\
The pdu outlet count
\ **machinetype**\
\ **username**\
The pdu machine type
The remote login user name
\ **modelnum**\
\ **password**\
The pdu model number
The remote login password
\ **serialnum**\
\ **snmpversion**\
The pdu serial number
The version to use to communicate with switch. SNMPv1 is assumed by default.
\ **community**\
The community string to use for SNMPv1/v2
\ **snmpuser**\
The username to use for SNMPv3 communication, ignored for SNMPv1
\ **authtype**\
The authentication protocol(MD5|SHA) to use for SNMPv3.
\ **authkey**\
The authentication passphrase for SNMPv3
\ **privtype**\
The privacy protocol(AES|DES) to use for SNMPv3.
\ **privkey**\
The privacy passphrase to use for SNMPv3.
\ **seclevel**\
The Security Level(noAuthNoPriv|authNoPriv|authPriv) to use for SNMPv3.

View File

@ -44,67 +44,67 @@ servicenode Attributes:
\ **nameserver**\
Do we set up DNS on this service node? Valid values: 2, 1, no or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If no or 0, it does not change the current state of the service.
Do we set up DNS on this service node? Valid values: 2, 1, or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If 0, it does not change the current state of the service.
\ **dhcpserver**\
Do we set up DHCP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, runs makedhcp -n. If no or 0, it does not change the current state of the service.
Do we set up DHCP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, runs makedhcp -n. If 0, it does not change the current state of the service.
\ **tftpserver**\
Do we set up TFTP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, configures and starts atftp. If no or 0, it does not change the current state of the service.
Do we set up TFTP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, configures and starts atftp. If 0, it does not change the current state of the service.
\ **nfsserver**\
Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:yes or 1, no or 0.If no or 0, it does not change the current state of the service.
Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:1 or 0.If 0, it does not change the current state of the service.
\ **conserver**\
Do we set up Conserver on this service node? Valid values:yes or 1, no or 0. If yes, configures and starts conserver daemon. If no or 0, it does not change the current state of the service.
Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service.
\ **monserver**\
Is this a monitoring event collection point? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Is this a monitoring event collection point? Valid values: 1 or 0. If 0, it does not change the current state of the service.
\ **ldapserver**\
Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **ntpserver**\
Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **ftpserver**\
Do we set up a ftp server on this service node? Not supported on AIX Valid values:yes or 1, no or 0. If yes, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If no or 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes
Do we set up a ftp server on this service node? Not supported on AIX Valid values:1 or 0. If 1, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes
\ **nimserver**\
Not used. Do we set up a NIM server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Not used. Do we set up a NIM server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **ipforward**\
Do we set up ip forwarding on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Do we set up ip forwarding on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
@ -116,7 +116,7 @@ servicenode Attributes:
\ **proxydhcp**\
Do we set up proxydhcp service on this node? valid values: yes or 1, no or 0. If yes, the proxydhcp daemon will be enabled on this node.
Do we set up proxydhcp service on this node? valid values: 1 or 0. If 1, the proxydhcp daemon will be enabled on this node.

View File

@ -19,7 +19,7 @@ SYNOPSIS
********
\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *consport*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *authkey*\ , \ *authtype*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *community*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *consport*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *pdutype*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *privkey*\ , \ *privtype*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *seclevel*\ , \ *serial*\ , \ *serialflow*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpuser*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
***********
@ -57,6 +57,18 @@ group Attributes:
\ **authkey**\ (pdu.authkey)
The authentication passphrase for SNMPv3
\ **authtype**\ (pdu.authtype)
The authentication protocol(MD5|SHA) to use for SNMPv3.
\ **bmc**\ (ipmi.bmc, openbmc.bmc)
The hostname of the BMC adapter.
@ -179,6 +191,12 @@ group Attributes:
\ **community**\ (pdu.community)
The community string to use for SNMPv1/v2
\ **cons**\ (nodehm.cons)
The console method. If nodehm.serialport is set, this will default to the nodehm.mgt setting, otherwise it defaults to unused. Valid values: cyclades, mrv, or the values valid for the mgt attribute.
@ -457,12 +475,6 @@ group Attributes:
\ **machinetype**\ (pdu.machinetype)
The pdu machine type
\ **membergroups**\ (nodegroup.membergroups)
This attribute stores a comma-separated list of nodegroups that this nodegroup refers to. This attribute is only used by PCM.
@ -529,12 +541,6 @@ group Attributes:
\ **modelnum**\ (pdu.modelnum)
The pdu model number
\ **monserver**\ (noderes.monserver)
The monitoring aggregation point for this node. The format is "x,y" where x is the ip address as known by the management node and y is the ip address as known by the node.
@ -780,7 +786,7 @@ group Attributes:
\ **password**\ (ppchcp.password, mpa.password, websrv.password, switches.sshpassword)
\ **password**\ (ppchcp.password, mpa.password, websrv.password, pdu.password, switches.sshpassword)
Password of the HMC or IVM. If not filled in, xCAT will look in the passwd table for key=hmc or key=ivm. If not in the passwd table, the default used is abc123 for HMCs and padmin for IVMs.
@ -794,6 +800,10 @@ group Attributes:
or
The remote login password
or
The remote login password. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.
@ -804,6 +814,12 @@ group Attributes:
\ **pdutype**\ (pdu.pdutype)
The type of pdu
\ **postbootscripts**\ (postscripts.postbootscripts)
Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. Please note that the postbootscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postbootscripts" attribute of a node with "chdef -m" command
@ -867,6 +883,18 @@ group Attributes:
\ **privkey**\ (pdu.privkey)
The privacy passphrase to use for SNMPv3.
\ **privtype**\ (pdu.privtype)
The privacy protocol(AES|DES) to use for SNMPv3.
\ **productkey**\ (prodkey.key)
The product key relevant to the aforementioned node/group and product combination
@ -909,6 +937,12 @@ group Attributes:
\ **seclevel**\ (pdu.seclevel)
The Security Level(noAuthNoPriv|authNoPriv|authPriv) to use for SNMPv3.
\ **serial**\ (vpd.serial)
The serial number of the node.
@ -921,12 +955,6 @@ group Attributes:
\ **serialnum**\ (pdu.serialnum)
The pdu serial number
\ **serialport**\ (nodehm.serialport)
The serial port for this node, in the linux numbering style (0=COM1/ttyS0, 1=COM2/ttyS1). For SOL on IBM blades, this is typically 1. For rackmount IBM servers, this is typically 0.
@ -947,67 +975,67 @@ group Attributes:
\ **setupconserver**\ (servicenode.conserver)
Do we set up Conserver on this service node? Valid values:yes or 1, no or 0. If yes, configures and starts conserver daemon. If no or 0, it does not change the current state of the service.
Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service.
\ **setupdhcp**\ (servicenode.dhcpserver)
Do we set up DHCP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, runs makedhcp -n. If no or 0, it does not change the current state of the service.
Do we set up DHCP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, runs makedhcp -n. If 0, it does not change the current state of the service.
\ **setupftp**\ (servicenode.ftpserver)
Do we set up a ftp server on this service node? Not supported on AIX Valid values:yes or 1, no or 0. If yes, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If no or 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes
Do we set up a ftp server on this service node? Not supported on AIX Valid values:1 or 0. If 1, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes
\ **setupipforward**\ (servicenode.ipforward)
Do we set up ip forwarding on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Do we set up ip forwarding on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupldap**\ (servicenode.ldapserver)
Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupnameserver**\ (servicenode.nameserver)
Do we set up DNS on this service node? Valid values: 2, 1, no or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If no or 0, it does not change the current state of the service.
Do we set up DNS on this service node? Valid values: 2, 1, or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If 0, it does not change the current state of the service.
\ **setupnfs**\ (servicenode.nfsserver)
Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:yes or 1, no or 0.If no or 0, it does not change the current state of the service.
Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:1 or 0.If 0, it does not change the current state of the service.
\ **setupnim**\ (servicenode.nimserver)
Not used. Do we set up a NIM server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Not used. Do we set up a NIM server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupntp**\ (servicenode.ntpserver)
Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupproxydhcp**\ (servicenode.proxydhcp)
Do we set up proxydhcp service on this node? valid values: yes or 1, no or 0. If yes, the proxydhcp daemon will be enabled on this node.
Do we set up proxydhcp service on this node? valid values: 1 or 0. If 1, the proxydhcp daemon will be enabled on this node.
\ **setuptftp**\ (servicenode.tftpserver)
Do we set up TFTP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, configures and starts atftp. If no or 0, it does not change the current state of the service.
Do we set up TFTP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, configures and starts atftp. If 0, it does not change the current state of the service.
@ -1067,13 +1095,23 @@ group Attributes:
\ **snmpuser**\ (pdu.snmpuser)
The username to use for SNMPv3 communication, ignored for SNMPv1
\ **snmpusername**\ (switches.username)
The username to use for SNMPv3 communication, ignored for SNMPv1
\ **snmpversion**\ (switches.snmpversion)
\ **snmpversion**\ (pdu.snmpversion, switches.snmpversion)
The version to use to communicate with switch. SNMPv1 is assumed by default.
or
The version to use to communicate with switch. SNMPv1 is assumed by default.
@ -1195,7 +1233,7 @@ group Attributes:
\ **username**\ (ppchcp.username, mpa.username, websrv.username, switches.sshusername)
\ **username**\ (ppchcp.username, mpa.username, websrv.username, pdu.username, switches.sshusername)
Userid of the HMC or IVM. If not filled in, xCAT will look in the passwd table for key=hmc or key=ivm. If not in the passwd table, the default used is hscroot for HMCs and padmin for IVMs.
@ -1209,6 +1247,10 @@ group Attributes:
or
The remote login user name
or
The remote login user name. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.

View File

@ -19,7 +19,7 @@ SYNOPSIS
********
\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *consport*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *authkey*\ , \ *authtype*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *community*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *consport*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outlet*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *pdutype*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *privkey*\ , \ *privtype*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *seclevel*\ , \ *serial*\ , \ *serialflow*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpuser*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
***********
@ -69,6 +69,18 @@ node Attributes:
\ **authkey**\ (pdu.authkey)
The authentication passphrase for SNMPv3
\ **authtype**\ (pdu.authtype)
The authentication protocol(MD5|SHA) to use for SNMPv3.
\ **bmc**\ (ipmi.bmc, openbmc.bmc)
The hostname of the BMC adapter.
@ -191,6 +203,12 @@ node Attributes:
\ **community**\ (pdu.community)
The community string to use for SNMPv1/v2
\ **cons**\ (nodehm.cons)
The console method. If nodehm.serialport is set, this will default to the nodehm.mgt setting, otherwise it defaults to unused. Valid values: cyclades, mrv, or the values valid for the mgt attribute.
@ -469,12 +487,6 @@ node Attributes:
\ **machinetype**\ (pdu.machinetype)
The pdu machine type
\ **memory**\ (hwinv.memory)
The size of the memory for the node in MB.
@ -529,12 +541,6 @@ node Attributes:
\ **modelnum**\ (pdu.modelnum)
The pdu model number
\ **monserver**\ (noderes.monserver)
The monitoring aggregation point for this node. The format is "x,y" where x is the ip address as known by the management node and y is the ip address as known by the node.
@ -786,7 +792,7 @@ node Attributes:
\ **password**\ (ppchcp.password, mpa.password, websrv.password, switches.sshpassword)
\ **password**\ (ppchcp.password, mpa.password, websrv.password, pdu.password, switches.sshpassword)
Password of the HMC or IVM. If not filled in, xCAT will look in the passwd table for key=hmc or key=ivm. If not in the passwd table, the default used is abc123 for HMCs and padmin for IVMs.
@ -800,6 +806,10 @@ node Attributes:
or
The remote login password
or
The remote login password. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.
@ -810,6 +820,12 @@ node Attributes:
\ **pdutype**\ (pdu.pdutype)
The type of pdu
\ **postbootscripts**\ (postscripts.postbootscripts)
Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. Please note that the postbootscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postbootscripts" attribute of a node with "chdef -m" command
@ -879,6 +895,18 @@ node Attributes:
\ **privkey**\ (pdu.privkey)
The privacy passphrase to use for SNMPv3.
\ **privtype**\ (pdu.privtype)
The privacy protocol(AES|DES) to use for SNMPv3.
\ **productkey**\ (prodkey.key)
The product key relevant to the aforementioned node/group and product combination
@ -921,6 +949,12 @@ node Attributes:
\ **seclevel**\ (pdu.seclevel)
The Security Level(noAuthNoPriv|authNoPriv|authPriv) to use for SNMPv3.
\ **serial**\ (vpd.serial)
The serial number of the node.
@ -933,12 +967,6 @@ node Attributes:
\ **serialnum**\ (pdu.serialnum)
The pdu serial number
\ **serialport**\ (nodehm.serialport)
The serial port for this node, in the linux numbering style (0=COM1/ttyS0, 1=COM2/ttyS1). For SOL on IBM blades, this is typically 1. For rackmount IBM servers, this is typically 0.
@ -959,67 +987,67 @@ node Attributes:
\ **setupconserver**\ (servicenode.conserver)
Do we set up Conserver on this service node? Valid values:yes or 1, no or 0. If yes, configures and starts conserver daemon. If no or 0, it does not change the current state of the service.
Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service.
\ **setupdhcp**\ (servicenode.dhcpserver)
Do we set up DHCP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, runs makedhcp -n. If no or 0, it does not change the current state of the service.
Do we set up DHCP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, runs makedhcp -n. If 0, it does not change the current state of the service.
\ **setupftp**\ (servicenode.ftpserver)
Do we set up a ftp server on this service node? Not supported on AIX Valid values:yes or 1, no or 0. If yes, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If no or 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes
Do we set up a ftp server on this service node? Not supported on AIX Valid values:1 or 0. If 1, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes
\ **setupipforward**\ (servicenode.ipforward)
Do we set up ip forwarding on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Do we set up ip forwarding on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupldap**\ (servicenode.ldapserver)
Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupnameserver**\ (servicenode.nameserver)
Do we set up DNS on this service node? Valid values: 2, 1, no or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If no or 0, it does not change the current state of the service.
Do we set up DNS on this service node? Valid values: 2, 1, or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If 0, it does not change the current state of the service.
\ **setupnfs**\ (servicenode.nfsserver)
Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:yes or 1, no or 0.If no or 0, it does not change the current state of the service.
Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:1 or 0.If 0, it does not change the current state of the service.
\ **setupnim**\ (servicenode.nimserver)
Not used. Do we set up a NIM server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Not used. Do we set up a NIM server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupntp**\ (servicenode.ntpserver)
Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.
Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.
\ **setupproxydhcp**\ (servicenode.proxydhcp)
Do we set up proxydhcp service on this node? valid values: yes or 1, no or 0. If yes, the proxydhcp daemon will be enabled on this node.
Do we set up proxydhcp service on this node? valid values: 1 or 0. If 1, the proxydhcp daemon will be enabled on this node.
\ **setuptftp**\ (servicenode.tftpserver)
Do we set up TFTP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, configures and starts atftp. If no or 0, it does not change the current state of the service.
Do we set up TFTP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, configures and starts atftp. If 0, it does not change the current state of the service.
@ -1079,13 +1107,23 @@ node Attributes:
\ **snmpuser**\ (pdu.snmpuser)
The username to use for SNMPv3 communication, ignored for SNMPv1
\ **snmpusername**\ (switches.username)
The username to use for SNMPv3 communication, ignored for SNMPv1
\ **snmpversion**\ (switches.snmpversion)
\ **snmpversion**\ (pdu.snmpversion, switches.snmpversion)
The version to use to communicate with switch. SNMPv1 is assumed by default.
or
The version to use to communicate with switch. SNMPv1 is assumed by default.
@ -1231,7 +1269,7 @@ node Attributes:
\ **username**\ (ppchcp.username, mpa.username, websrv.username, switches.sshusername)
\ **username**\ (ppchcp.username, mpa.username, websrv.username, pdu.username, switches.sshusername)
Userid of the HMC or IVM. If not filled in, xCAT will look in the passwd table for key=hmc or key=ivm. If not in the passwd table, the default used is hscroot for HMCs and padmin for IVMs.
@ -1245,6 +1283,10 @@ node Attributes:
or
The remote login user name
or
The remote login user name. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.

View File

@ -255,7 +255,7 @@ osimage Attributes:
\ **otherpkgdir**\ (linuximage.otherpkgdir)
The base directory where the non-distro packages are stored. Only 1 local directory supported at present.
The base directory and urls of internet repos from which the non-distro packages are retrived. Only 1 local directory is supported at present. The entries should be delimited with comma ",". Currently, the internet repos are only supported on Ubuntu and Redhat.

View File

@ -40,15 +40,11 @@ pdu Attributes:
\ **machinetype**\ (pdu.machinetype)
The pdu machine type
\ **modelnum**\ (pdu.modelnum)
The pdu model number
\ **node**\ (pdu.node)
@ -70,9 +66,7 @@ pdu Attributes:
\ **serialnum**\ (pdu.serialnum)
The pdu serial number

View File

@ -21,6 +21,8 @@ SYNOPSIS
\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-d|-**\ **-delete**\ ] [\ *noderange*\ ]
\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-C|-**\ **-cleanup**\ ]
\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-l|-**\ **-local**\ ] [\ *noderange*\ ]
\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-c|-**\ **-conserver**\ ] [\ *noderange*\ ]
@ -42,6 +44,8 @@ does not have nodehm.cons set, it will not be written to the file.
If \ **-d**\ is specified, \ **makeconservercf**\ will remove specified nodes from /etc/conserver.cf file. If \ *noderange*\ is not specified, all xCAT nodes will be removed from /etc/conserver.cf file.
If \ **-C|-**\ **-cleanup**\ is specified, \ **makeconservercf**\ will remove console configuration entries from /etc/conserver.cf for the nodes whose definitions have been removed from xCATdb. \ **Don't**\ specify any noderange.
In the case of a hierarchical cluster (i.e. one with service nodes) \ **makeconservercf**\ will determine
which nodes will have their consoles accessed from the management node and which from a service node
(based on the nodehm.conserver attribute). The /etc/conserver.cf file will be created accordingly on
@ -60,6 +64,12 @@ OPTIONS
\ **-C|-**\ **-cleanup**\
Remove the entries for the nodes whose definitions have been removed from xCAT db.
\ **-c|-**\ **-conserver**\
Only set up the conserver on the conserver host. If no conserver host

View File

@ -0,0 +1,151 @@
############
makegocons.8
############
.. highlight:: perl
****
NAME
****
\ **makegocons**\ - Register or unregister the node in the goconserver service
********
SYNOPSIS
********
\ **makegocons**\ [\ **-V|-**\ **-verbose**\ ] [\ **-d|-**\ **-delete**\ ] [\ *noderange*\ ]
\ **makeconservercf**\ [\ **-h|-**\ **-help|-v|-**\ **-version**\ ]
***********
DESCRIPTION
***********
The \ **makegocons**\ command will start the goconserver service if it is not started, then
send the REST request to create or delete the session resource in the goconserver service. The session
information including the session command or ssh connection parameters (for openbmc) is generated by xcat
based on the records in the related tables (e.g. nodehm, ipmi, ppc, openbmc).
By default \ **makegocons**\ will register the session for all of the nodes in xcat.
If a \ *noderange*\ is specified, only the session in the specified scope will be affected, goconserver
service will not be restarted and the other session will not be disconnected. This is the advantage
of goconserver over the conserver service with \ **makeconservercf**\ .
If \ **-d**\ is specified, \ **makegocons**\ will remove the session in the goconserver service.
In the case of a hierarchical cluster (i.e. one with service nodes) \ **makegocons**\ will determine
which nodes will have their consoles accessed from the management node and which from a service node
(based on the nodehm.conserver attribute).
For openbmc which uses ssh as the terminal session connection method, goconserver can help save the system
resources as goconserver could handle the ssh connection within goroutine which is more light-weighted than the command process.
\ **Note:**\ goconserver is an experimental feature, it will not be installed with xcat and will only support the systemd based systems.
Download and setup the rpm or deb package manually. Release link:
.. code-block:: perl
https://github.com/chenglch/goconserver/releases
*******
OPTIONS
*******
\ **-d|-**\ **-delete**\
Delete rather than add or refresh the nodes specified as a noderange.
\ **-v|-**\ **-version**\
Display version.
\ **-V|-**\ **-verbose**\
Verbose mode.
\ **-h|-**\ **-help**\
Display usage message.
************
RETURN VALUE
************
0. The command completed successfully.
1. An error has occurred.
********
EXAMPLES
********
1. To create goconserver configuration for all the nodes.
.. code-block:: perl
makegocons
2. To create goconserver configuration for nodes node01-node10.
.. code-block:: perl
makegocons node01-node10
3. To remove goconserver configuration for node01.
.. code-block:: perl
makegocons -d node01
********
SEE ALSO
********
rcons(1)|rcons.1

View File

@ -14,6 +14,17 @@ xCAT 2.13.x
|xCAT |New OS |New |New Feature |
|Version | |Hardware | |
+=================================+===============+=============+==================================+
|| xCAT 2.13.9 | | |- OpenBMC support: |
|| 2017/12/18 | | | |
|| | | | rflash -a/-u enhance, add -d |
| `2.13.9 Release Notes <https:// | | | |
| github.com/xcat2/xcat-core/wiki | | | reventlog implementation |
| /XCAT_2.13.9_Release_Notes>`_ | | | |
| | | | rspconfig dump,hostname, |
| | | | ntpserver,admin_passwd |
| | | | |
| | | |- goconserver for OpenBMC |
+---------------------------------+---------------+-------------+----------------------------------+
|| xCAT 2.13.8 | | |- OpenBMC support: |
|| 2017/11/3 | | | |
|| | | | rflash/rpower run parallelly |

View File

@ -0,0 +1,29 @@
2017-12-12 - TLS Vulnerabilities
================================
*Dec 12, 2017*, TLS implementations may disclose side channel information via discrepencies between valid and invalid PKCS#1 padding
Advisory CVEs
-------------
* CWE-203 - http://cwe.mitre.org/data/definitions/203.html
Summary
-------
Transport Layer Security (TLS) is a mechanism for a security transport over network connections, and is defined in RFC 5246. TLS may utilize RSA cryptography to secure the connection, and section 7.4.7 describes how client and server may exchange keys. Implementations that don't closely follow the descriptions in RFC 5246 may leak information to an attacker when they handle PKCS #1 v1.5 padding errors in ways that lets the attacker distinguish between valid and invalid messages. An attacker may utilize discrepancies in TLS error messages to obtain the pre-master secret key private RSA key used by TLS to decrypt sensitive data. This type of attack has become known as a Bleichenbacher attack. CERT/CC previously published CERT Advisory CA-1998-07 for this type of attack.
Action
------
Consider the following recommended actions:
1. Disable TLS RSA
2. Apply an update (if available)
xCAT uses OpenSSL for client-server communication but **does not** ship it.
It is highly recommended to keep your OpenSSL levels up-to-date. Obtain the updated software packages from your Operating system distribution channels.

View File

@ -4,6 +4,7 @@
.. toctree::
:maxdepth: 1
20171212_tls.rst
20170828_openssl.rst
20170216_openssl.rst
20170126_openssl.rst

View File

@ -835,7 +835,7 @@ sub fork_fanout_dcp
my @target_file = split '/', $$options{'source'};
$rcp_config{'dest-file'} =
"$$options{'target'}/$target_file[$#target_file]._$$target_properties{'hostname'}";
"$$options{'target'}/$target_file[$#target_file]._$$target_properties{'hostname'}";
}
@ -850,6 +850,8 @@ sub fork_fanout_dcp
$$options{'destDir_srcFile'}{$user_target};
}
$dsh_trace
&& ($rcp_config{'trace'} = 1);
#eval "require RemoteShell::$rsh_extension";
eval "require xCAT::$rsh_extension";
my $remoteshell = "xCAT::$rsh_extension";
@ -5198,8 +5200,10 @@ sub parse_rsync_input_file_on_MN
foreach my $target_node (@dest_host)
{
# skip the node if it's NOT in the permitted list
if ($dest_node && !grep /^$target_node$/, @dest_nodes) {
# skip the node if it's NOT in the permitted list and if
# it's not a SN doing a hierarchical mode transfer
if ($dest_node && !(grep /^$target_node$/, @dest_nodes)
&& ($rsyncSN != 1) ) {
next;
}
$$options{'destDir_srcFile'}{$target_node} ||= {};
@ -5214,7 +5218,13 @@ sub parse_rsync_input_file_on_MN
if ($rsyncSN == 1)
{ # syncing the SN
$dest_dir = $syncdir; # the SN sync dir
$dest_dir .= dirname($srcfile);
if($srcfile =~ /\/$/){
#the srcfile is a directory
$dest_dir .= $srcfile;
}else{
#the srcfile is a file
$dest_dir .= dirname($srcfile);
}
$dest_dir =~ s/\s*//g; #remove blanks
}
$$options{'destDir_srcFile'}{$target_node}{$dest_dir} ||=
@ -5655,11 +5665,30 @@ sub parse_rsync_input_file_on_SN
} else { # not processing EXECUTE, EXECUTEALWAYS or APPEND
# otherwise it is just the synclist
if ($line =~ /(.+) -> (.+)/)
# xCAT supports the syncfile format:
# file -> file
# file -> (noderange for permitted nodes) file
if ($line =~ /(.+) -> (.+)/ || $line =~ /(.+) -> +\((.+)\) +(.+)/)
{
$process_line = 1;
my $src_file = $1;
my $dest_file = $2;
my $src_file;
my $dest_file;
my $dest_node;
my @dest_nodes;
if ($line =~ /(.+) -> +\((.+)\) +(.+)/) {
$src_file = $1;
$dest_node = $2;
$dest_file = $3;
} elsif ($line =~ /(.+) -> (.+)/) {
$src_file = $1;
$dest_file = $2;
}
# get all the permitted nodes for the line
$dest_node =~ s/\s//g;
if ($dest_node) {
@dest_nodes = noderange($dest_node);
}
$dest_file =~ s/[\s;]//g; # remove blanks
# see if destination is a directory
@ -5688,6 +5717,10 @@ sub parse_rsync_input_file_on_SN
foreach my $target_node (@dest_host)
{
# skip the node if it's NOT in the permitted list
if ($dest_node && ! grep /^$target_node$/, @dest_nodes) {
next;
}
$$options{'destDir_srcFile'}{$target_node} ||= {};
# for each file on the line

View File

@ -510,7 +510,7 @@ sub refresh_table {
# if we are doing switch discovery and the node is not a switch, skip
# if we are NOT doing switch discovery, and the node is a switch, skip
my $ntype = $typehash->{$entry->{node}}->[0]->{nodetype};
if ( (($discover_switch) and ( $ntype ne "switch"))
if ( (($discover_switch) and ($ntype ne "switch") and ($ntype ne "pdu") )
or ( !($discover_switch) and ( $ntype eq "switch")) ){
xCAT::MsgUtils->trace(0, "d", "refresh_table: skip node=$entry->{node} switch=$entry->{switch} discover_switch=$discover_switch nodetype=$ntype\n");
next;

View File

@ -156,7 +156,11 @@ sub remote_copy_command
$dest_user_host =
"$$config{'dest-user'}@" . "$$config{'dest-host'}";
}
print RSCYCCMDFILE "#!/bin/sh\n";
if ($$config{'trace'}) {
print RSCYCCMDFILE "#!/bin/sh -x\n";
} else {
print RSCYCCMDFILE "#!/bin/sh\n";
}
if ($localhost == 1) { # running to the MN from the MN
print RSCYCCMDFILE
"/bin/mkdir -p $dest_dir_list\n";

View File

@ -694,17 +694,25 @@ passed as argument rather than by table value',
},
},
pdu => {
cols => [qw(node nodetype outlet machinetype modelnum serialnum comments disable)],
cols => [qw(node nodetype pdutype outlet username password snmpversion community snmpuser authtype authkey privtype privkey seclevel comments disable)],
keys => [qw(node)],
nodecol => "node",
table_desc => 'Parameters to use when interrogating pdus',
descriptions => {
node => 'The hostname/address of the pdu to which the settings apply',
nodetype => 'The node type should be pdu ',
pdutype => 'The type of pdu ',
outlet => 'The pdu outlet count',
machinetype => 'The pdu machine type',
modelnum => 'The pdu model number',
serialnum => 'The pdu serial number',
username => 'The remote login user name',
password => 'The remote login password',
snmpversion => 'The version to use to communicate with switch. SNMPv1 is assumed by default.',
community => 'The community string to use for SNMPv1/v2',
snmpuser => 'The username to use for SNMPv3 communication, ignored for SNMPv1',
authtype => 'The authentication protocol(MD5|SHA) to use for SNMPv3.',
authkey => 'The authentication passphrase for SNMPv3 ',
privtype => 'The privacy protocol(AES|DES) to use for SNMPv3.',
privkey => 'The privacy passphrase to use for SNMPv3.',
seclevel => 'The Security Level(noAuthNoPriv|authNoPriv|authPriv) to use for SNMPv3.',
comments => 'Any user-written notes.',
disable => "Set to 'yes' or '1' to comment out this row.",
},
@ -950,19 +958,19 @@ passed as argument rather than by table value',
table_desc => 'List of all Service Nodes and services that will be set up on the Service Node.',
descriptions => {
node => 'The hostname of the service node as known by the Management Node.',
nameserver => 'Do we set up DNS on this service node? Valid values: 2, 1, no or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If no or 0, it does not change the current state of the service. ',
dhcpserver => 'Do we set up DHCP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, runs makedhcp -n. If no or 0, it does not change the current state of the service. ',
tftpserver => 'Do we set up TFTP on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If yes, configures and starts atftp. If no or 0, it does not change the current state of the service. ',
nfsserver => 'Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:yes or 1, no or 0.If no or 0, it does not change the current state of the service. ',
conserver => 'Do we set up Conserver on this service node? Valid values:yes or 1, no or 0. If yes, configures and starts conserver daemon. If no or 0, it does not change the current state of the service.',
monserver => 'Is this a monitoring event collection point? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.',
ldapserver => 'Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.',
ntpserver => 'Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.',
ftpserver => 'Do we set up a ftp server on this service node? Not supported on AIX Valid values:yes or 1, no or 0. If yes, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If no or 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes',
nimserver => 'Not used. Do we set up a NIM server on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.',
ipforward => 'Do we set up ip forwarding on this service node? Valid values:yes or 1, no or 0. If no or 0, it does not change the current state of the service.',
nameserver => 'Do we set up DNS on this service node? Valid values: 2, 1, or 0. If 2, creates named.conf as dns slave, using the management node as dns master, and starts named. If 1, creates named.conf file with forwarding to the management node and starts named. If 0, it does not change the current state of the service. ',
dhcpserver => 'Do we set up DHCP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, runs makedhcp -n. If 0, it does not change the current state of the service. ',
tftpserver => 'Do we set up TFTP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, configures and starts atftp. If 0, it does not change the current state of the service. ',
nfsserver => 'Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:1 or 0.If 0, it does not change the current state of the service. ',
conserver => 'Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service.',
monserver => 'Is this a monitoring event collection point? Valid values: 1 or 0. If 0, it does not change the current state of the service.',
ldapserver => 'Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:1 or 0. If 0, it does not change the current state of the service.',
ntpserver => 'Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.',
ftpserver => 'Do we set up a ftp server on this service node? Not supported on AIX Valid values:1 or 0. If 1, configure and start vsftpd. (You must manually install vsftpd on the service nodes before this.) If 0, it does not change the current state of the service. xCAT is not using ftp for compute nodes provisioning or any other xCAT features, so this attribute can be set to 0 if the ftp service will not be used for other purposes',
nimserver => 'Not used. Do we set up a NIM server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.',
ipforward => 'Do we set up ip forwarding on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.',
dhcpinterfaces => 'The network interfaces DHCP server should listen on for the target node. This attribute can be used for management node and service nodes. If defined, it will override the values defined in site.dhcpinterfaces. This is a comma separated list of device names. !remote! indicates a non-local network for relay DHCP. For example: !remote!,eth0,eth1',
proxydhcp => 'Do we set up proxydhcp service on this node? valid values: yes or 1, no or 0. If yes, the proxydhcp daemon will be enabled on this node.',
proxydhcp => 'Do we set up proxydhcp service on this node? valid values: 1 or 0. If 1, the proxydhcp daemon will be enabled on this node.',
comments => 'Any user-written notes.',
disable => "Set to 'yes' or '1' to comment out this row.",
@ -2951,24 +2959,64 @@ my @nodeattrs = (
tabentry => 'pdu.nodetype',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'pdutype',
only_if => 'nodetype=pdu',
tabentry => 'pdu.pdutype',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'outlet',
only_if => 'nodetype=pdu',
tabentry => 'pdu.outlet',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'machinetype',
{ attr_name => 'username',
only_if => 'nodetype=pdu',
tabentry => 'pdu.machinetype',
tabentry => 'pdu.username',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'modelnum',
{ attr_name => 'password',
only_if => 'nodetype=pdu',
tabentry => 'pdu.modelnum',
tabentry => 'pdu.password',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'serialnum',
{ attr_name => 'snmpversion',
only_if => 'nodetype=pdu',
tabentry => 'pdu.serialnum',
tabentry => 'pdu.snmpversion',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'community',
only_if => 'nodetype=pdu',
tabentry => 'pdu.community',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'snmpuser',
only_if => 'nodetype=pdu',
tabentry => 'pdu.snmpuser',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'authtype',
only_if => 'nodetype=pdu',
tabentry => 'pdu.authtype',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'authkey',
only_if => 'nodetype=pdu',
tabentry => 'pdu.authkey',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'privtype',
only_if => 'nodetype=pdu',
tabentry => 'pdu.privtype',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'privkey',
only_if => 'nodetype=pdu',
tabentry => 'pdu.privkey',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'seclevel',
only_if => 'nodetype=pdu',
tabentry => 'pdu.seclevel',
access_tabentry => 'pdu.node=attr:node',
},

View File

@ -219,6 +219,10 @@ sub get_broadcast_disjoint_scope_with_parallel {
my $reqs = get_parallel_scope($req);
my $handled4me = 0; # indicate myself is already handled.
if (xCAT::Utils->isMN()) { # For MN, add itself always.
push @requests, @$reqs;
$handled4me = 1;
}
my %prehandledhash = ();# the servers which is already handled.
foreach (@$extras) {
my $xcatdest = $_;

View File

@ -83,13 +83,14 @@ my %usage = (
OpenPOWER (IPMI) specific:
rvitals noderange [temp|voltage|wattage|fanspeed|power|leds|chassis|all]
OpenPOWER (OpenBMC) specific:
rvitals noderange [temp|voltage|wattage|fanspeed|power|altitude|all]
rvitals noderange [temp|voltage|wattage|fanspeed|power|leds|altitude|all]
MIC specific:
rvitals noderange {thermal|all}
pdu specific:
rvitals noderange ",
"reventlog" =>
"Usage: reventlog <noderange> [all [-s]|clear|<number of entries to retrieve> [-s]] [-V|--verbose]
reventlog <noderange> [resolved={<id list>|LED}]
reventlog [-h|--help|-v|--version]",
"rinv" =>
"Usage:
@ -146,6 +147,7 @@ my %usage = (
rspconfig <noderange> [userid=<userid> username=<username> password=<password>]
OpenBMC specific:
rspconfig <noderange> [ipsrc|ip|netmask|gateway|hostname|vlan]
rspconfig <noderange> dump [-l|--list] [-g|--generate] [-c|--clear {<id>|all}] [-d|--download <id>]
iDataplex specific:
rspconfig <noderange> [thermprofile]
rspconfig <noderange> [thermprofile=<two digit number from chassis>]
@ -353,7 +355,8 @@ my %usage = (
OpenPOWER OpenBMC specific:
rflash <noderange> {[-c|--check] | [-l|--list]}
rflash <noderange> <tar_file_path> {[-c|--check] | [-a|--activate] | [-u|--upload]}
rflash <noderange> <image_id> {[-a|--activate] | [-d|--delete]}",
rflash <noderange> <tar_file_diretory> [-d] [--no-host-reboot]
rflash <noderange> <image_id> {[-a|--activate] | [--delete]}",
"mkhwconn" =>
"Usage:
mkhwconn [-h|--help]

View File

@ -41,7 +41,10 @@ our %global_switch_type = (
MELLAN => "Mellanox",
Cumulus => "onie",
cumulus => "onie",
Edgecore => "onie"
Edgecore => "onie",
sLEN => "irpdu",
sIBM => "irpdu",
coral => "crpdu"
);

View File

@ -149,11 +149,27 @@ elif [ $USE_GOCONSERVER == "1" ]; then
CONGO_SSL_CERT=$HOME/.xcat/client-cred.pem \
CONGO_SSL_CA_CERT=$HOME/.xcat/ca.pem \
CONGO_PORT=12430 \
CONGO_SERVER_HOST=$CONSERVER"
CONGO_CLIENT_TYPE=xcat \
CONGO_SSL_INSECURE=true"
if [ "$CONSERVER" == `hostname` ]; then
host=`hostname -s`
if [ $? -ne 0 ]; then
echo "Error: could not get the short hostname for $CONSERVER."
exit 1
fi
CONGO_ENV="$CONGO_ENV \
CONGO_SERVER_HOST=$host \
CONGO_URL=https://$host:12429"
exec env $CONGO_ENV /usr/bin/congo console $1
else
host=`ssh $CONSERVER hostname -s`
if [ $? -ne 0 ]; then
echo "Error: could not get the short hostname for $CONSERVER."
exit 1
fi
CONGO_ENV="$CONGO_ENV \
CONGO_SERVER_HOST=$host \
CONGO_URL=https://$host:12429"
exec ssh -t $CONSERVER "$CONGO_ENV /usr/bin/congo console $1"
fi

View File

@ -10,10 +10,6 @@ B<bmcdiscover> [B<-v>|B<--version>]
B<bmcdiscover> [B<--sn> I<SN_nodename>] [B<-s> I<scan_method>] [B<-u> I<bmc_user>] [B<-p> I<bmc_passwd>] [B<-z>] [B<-w>] B<--range> I<ip_ranges>
B<bmcdiscover> B<-u> I<bmc_user> B<-p> I<bmc_passwd> B<-i> I<bmc_ip> B<--check>
B<bmcdiscover> [B<-u> I<bmc_user>] [B<-p> I<bmc_passwd>] B<-i> I<bmc_ip> B<--ipsource>
=head1 DESCRIPTION
@ -61,14 +57,6 @@ BMC user name.
BMC user password.
=item B<--check>
Check BMC administrator User/Password.
=item B<--ipsource>
Display the BMC IP configuration.
=item B<-h|--help>
Display usage message
@ -117,14 +105,6 @@ Output is similar to:
bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z
5. To check if the username or password is correct against the BMC:
bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --check
6. Get BMC IP Address source, DHCP Address or static Address
bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --ipsource
=head1 SEE ALSO
L<lsslp(1)|lsslp.1>

View File

@ -4,10 +4,15 @@ B<reventlog> - retrieve or clear remote hardware event logs
=head1 B<Synopsis>
B<reventlog> I<noderange> {I<number-of-entries> [B<-s>]|B<all [-s]>|B<clear>}
B<reventlog> I<noderange> [I<number-of-entries> [B<-s>]|B<all [-s]>|B<clear>]
B<reventlog> [B<-h>|B<--help>|B<-v>|B<--version>]
=head2 OpenPOWER OpenBMC specific :
B<reventlog> I<noderange> [B<resolved=>{I<id-list>|B<LED>}]
=head1 B<Description>
B<reventlog> can display any number of remote hardware event log entries
@ -34,6 +39,10 @@ To sort the entries from latest (always the last entry in event DB) to oldest (a
Clear event logs.
=item B<resolved=>{I<id-list>|B<LED>}
Mark event log entries as resolved. Use comma separated list of entry ids to specify individual entries. Use B<LED> to mark as resolved all event log entries that contribute to LED fault.
=item B<-h>|B<--help>
Print help.
@ -50,6 +59,7 @@ Print version.
=over 2
=item 1.
List last 5 event log entries from node4 and node5
reventlog node4,node5 5
@ -67,6 +77,7 @@ Output is similar to:
node5: SERVPROC I 09/06/00 15:21:29 System spn1 started a RS485 connection with us[00]
=item 2.
Clear all event log entries from node4 and node5
reventlog node4,node5 clear
@ -75,6 +86,18 @@ Output is similar to:
node4: clear
node5: clear
=item 3.
Mark as resolved all event log entries from node4 that contribute to LED fault
reventlog node4 resolved=LED
Output is similar to:
Attempting to resolve the following log entries: LED...
node4: Resolved 51.
node4: Resolved 52.
node4: Resolved 58.
=back
=head1 SEE ALSO

View File

@ -34,7 +34,9 @@ B<rflash> I<noderange> {[B<-c>|B<--check>] | [B<-l>|B<--list>]}
B<rflash> I<noderange> I<tar_file_path> {[B<-c>|B<--check>] | [B<-a>|B<--activate>] | [B<-u>|B<--upload>]}
B<rflash> I<noderange> I<image_id> {[B<-a>|B<--activate>] | [B<-d>|B<--delete>]}
B<rflash> I<noderange> I<tar_file_directory> [B<-d>] [B<--no-host-reboot>]
B<rflash> I<noderange> I<image_id> {[B<-a>|B<--activate>] | [B<--delete>]}
=head1 B<Description>
@ -101,24 +103,34 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node
B<-l|--list>:
The list option will list out available firmware on the BMC. It provides an interface to display the ID of the various firmware levels.
The list option will list out available firmware on the BMC. It provides an interface to display the ID of the various firmware levels.
The (*) symbol indicates the active running firmware on the server.
The (*) symbol indicates the active running firmware on the server.
The (+) symbol indicates the firmware that is pending and a reboot is required to set it to be the active running firmware level.
The (+) symbol indicates the firmware that is pending and a reboot is required to set it to be the active running firmware level.
B<-u|--upload>:
The upload option expects a .tar file as the input and will upload the file to the BMC. Use the list option to view the result.
The upload option expects a .tar file as the input and will upload the file to the BMC. Use the list option to view the result.
B<-a|--activate>:
The activate option expects either a .tar file or an ID as the input. If a .tar file is provided, it will upload and activate the firmware in a single step
The activate option expects either a .tar file or an ID as the input. If a .tar file is provided, it will upload and activate the firmware in a single step
To apply the firmware level, a reboot is required to BMC and HOST.
B<Note:> When using B<rflash> in hierarchical environment, the .tar file must be accessible from Service Nodes.
B<-d>:
This option steamlines the update, activate, reboot BMC and reboot HOST procedure. It expects a directory containing both BMC and PNOR .tar files. When BMC and PNOR tar files are provided, the command will upload and activate firmware. After BMC becomes activate, it will reboot BMC. If BMC state is Ready, the command will reboot the HOST. If BMC state is NotReady, the command will exit.
B<Note:> When using B<--no-host-reboot>, it will not reboot the host after BMC is reboot.
B<--delete>:
This delete option will delete update image from BMC. It expects an ID as the input.
=head1 B<Options>
=over 7
@ -179,7 +191,7 @@ List currently uploaded update images. "(*)" indicates currently active image.
Upload update image. Specified file must be in .tar format.
=item B<-d|--delete>
=item B<--delete>
Delete update image from BMC
@ -233,14 +245,14 @@ Print verbose message to rflash log file (/var/log/xcat/rflash/fs3.log) when upd
rflash fs3 /firmware/8335_810.1543.20151021b_update.hpm -V
=item 6.
To update the firmware on IBM Power S822LC for Big Data machine specify the node name and the file path of the data directory containing pUpdate utility and BMC and/or PNOR update files:
To update the firmware on IBM Power S822LC for Big Data machine specify the node name and the file path of the data directory containing pUpdate utility, both BMC and PNOR update files:
rflash briggs01 -d /root/supermicro/OP825
=item 7.
To update the firmware on the OpenBMC machine, specify the firmare update file to upload and activate:
rflash p9euh02 -a /tmp/witherspoon.pnor.squashfs.tar
rflash p9euh02 -a /tmp/witherspoon.pnor.squashfs.tar
=back

View File

@ -58,7 +58,7 @@ A set of comma delimited object types.
=item B<-C|--cleanup>
Perform additional cleanup by running B<nodeset offline> on the objects specified in the I<noderange>.
Perform additional cleanup by running B<nodeset offline> and B<makeconservercf -d> on the objects specified in the I<noderange>.
=item B<-V|--verbose>

View File

@ -26,6 +26,8 @@ B<rspconfig> I<noderange> B<garp>=I<time>
B<rspconfig> I<noderange> {B<ipsrc>|B<ip>|B<netmask>|B<gateway>|B<hostname>|B<vlan>|B<sshcfg>}
B<rspconfig> I<noderange> B<dump> [B<-l>|B<--list>] [B<-g>|B<--generate>] [B<-c>|B<--clear> {I<id>|B<all>}] [B<-d>|B<--download> I<id>]
=head2 MPA specific:
B<rspconfig> I<noderange> {B<sshcfg>|B<snmpcfg>|B<pd1>|B<pd2>|B<network>|B<swnet>|B<ntp>|B<textid>|B<frame>}
@ -324,6 +326,26 @@ Select whether each memory bank should be enabled or disabled. State changes tak
The subnet mask.
=item B<dump>
Manage OpenBMC system dumps. If no sub-option is provided, will generate, wait, and download the dump.
=over 4
=item
B<-c> will clear a single specified dump, or use 'all' to clear all dumps on the BMC.
=item
B<-l> will list all the generated dumps on the BMC.
=item
B<-g> will generate a new dump on the BMC. Dump generation can take a few minutes.
=item
B<-d> will download a single dump from the BMC to /var/log/xcat/dump on management or service node.
=back
=item B<network>={[I<ip>],[I<host>],[I<gateway>],[I<netmask>]|*}
For MPA: get or set the MPA network parameters. If '*' is specified, all parameters are read from the xCAT database.
@ -813,6 +835,30 @@ Output is similar to:
fsp: Success
=item 31.
To list BMC dumps available for download:
rspconfig p9euh02 dump -l
Output is similar to:
p9euh02: [1] Generated: 09/06/2017 14:31:49, Size: 4528
p9euh02: [2] Generated: 09/06/2017 14:31:55, Size: 4516
p9euh02: [3] Generated: 09/06/2017 14:32:01, Size: 4236
p9euh02: [4] Generated: 09/06/2017 14:32:07, Size: 4248
p9euh02: [5] Generated: 09/06/2017 14:32:11, Size: 4268
=item 32.
To generate and download BMC dump:
rspconfig p9euh02 dump
Output is similar to:
Capturing BMC Diagnostic information, this will take some time...
p9euh02: Dump requested. Target ID is 6, waiting for BMC to generate...
p9euh02: Dump 6 generated. Downloading to /var/log/xcat/dump/20171211-0951_p9euh02_dump_6.tar.xz
=back
=head1 SEE ALSO

View File

@ -32,7 +32,7 @@ B<rvitals> I<noderange> [B<temp>|B<voltage>|B<wattage>|B<fanspeed>|B<power>|B<le
=head2 OpenPOWER (OpenBMC) specific:
B<rvitals> I<noderange> [B<temp>|B<voltage>|B<wattage>|B<fanspeed>|B<power>|B<altitude>|B<all>]
B<rvitals> I<noderange> [B<temp>|B<voltage>|B<wattage>|B<fanspeed>|B<power>|B<leds>|B<altitude>|B<all>]
=head1 B<Description>

View File

@ -6,6 +6,8 @@ B<makeconservercf> - creates the conserver configuration file from info in the x
B<makeconservercf> [B<-V|--verbose>] [B<-d|--delete>] [I<noderange>]
B<makeconservercf> [B<-V|--verbose>] [B<-C|--cleanup>]
B<makeconservercf> [B<-V|--verbose>] [B<-l|--local>] [I<noderange>]
B<makeconservercf> [B<-V|--verbose>] [B<-c|--conserver>] [I<noderange>]
@ -24,6 +26,8 @@ does not have nodehm.cons set, it will not be written to the file.
If B<-d> is specified, B<makeconservercf> will remove specified nodes from /etc/conserver.cf file. If I<noderange> is not specified, all xCAT nodes will be removed from /etc/conserver.cf file.
If B<-C|--cleanup> is specified, B<makeconservercf> will remove console configuration entries from /etc/conserver.cf for the nodes whose definitions have been removed from xCATdb. B<Don't> specify any noderange.
In the case of a hierarchical cluster (i.e. one with service nodes) B<makeconservercf> will determine
which nodes will have their consoles accessed from the management node and which from a service node
(based on the nodehm.conserver attribute). The /etc/conserver.cf file will be created accordingly on
@ -38,6 +42,10 @@ all relevant management/service nodes. If B<-l> is specified, it will only crea
Delete rather than add or refresh the nodes specified as a noderange.
=item B<-C|--cleanup>
Remove the entries for the nodes whose definitions have been removed from xCAT db.
=item B<-c|--conserver>
Only set up the conserver on the conserver host. If no conserver host

View File

@ -0,0 +1,98 @@
=head1 NAME
B<makegocons> - Register or unregister the node in the goconserver service
=head1 SYNOPSIS
B<makegocons> [B<-V|--verbose>] [B<-d|--delete>] [I<noderange>]
B<makeconservercf> [B<-h|--help|-v|--version>]
=head1 DESCRIPTION
The B<makegocons> command will start the goconserver service if it is not started, then
send the REST request to create or delete the session resource in the goconserver service. The session
information including the session command or ssh connection parameters (for openbmc) is generated by xcat
based on the records in the related tables (e.g. nodehm, ipmi, ppc, openbmc).
By default B<makegocons> will register the session for all of the nodes in xcat.
If a I<noderange> is specified, only the session in the specified scope will be affected, goconserver
service will not be restarted and the other session will not be disconnected. This is the advantage
of goconserver over the conserver service with B<makeconservercf>.
If B<-d> is specified, B<makegocons> will remove the session in the goconserver service.
In the case of a hierarchical cluster (i.e. one with service nodes) B<makegocons> will determine
which nodes will have their consoles accessed from the management node and which from a service node
(based on the nodehm.conserver attribute).
For openbmc which uses ssh as the terminal session connection method, goconserver can help save the system
resources as goconserver could handle the ssh connection within goroutine which is more light-weighted than the command process.
B<Note:> goconserver is an experimental feature, it will not be installed with xcat and will only support the systemd based systems.
Download and setup the rpm or deb package manually. Release link:
https://github.com/chenglch/goconserver/releases
=head1 OPTIONS
=over 10
=item B<-d|--delete>
Delete rather than add or refresh the nodes specified as a noderange.
=item B<-v|--version>
Display version.
=item B<-V|--verbose>
Verbose mode.
=item B<-h|--help>
Display usage message.
=back
=head1 RETURN VALUE
=over 2
=item 0.
The command completed successfully.
=item 1.
An error has occurred.
=back
=head1 EXAMPLES
=over 2
=item 1.
To create goconserver configuration for all the nodes.
makegocons
=item 2.
To create goconserver configuration for nodes node01-node10.
makegocons node01-node10
=item 3.
To remove goconserver configuration for node01.
makegocons -d node01
=back
=head1 SEE ALSO
L<rcons(1)|rcons.1>

View File

@ -473,7 +473,6 @@ dracut_install /usr/share/zoneinfo/posix/Asia/Phnom_Penh
dracut_install /usr/share/zoneinfo/posix/Asia/Ulan_Bator
dracut_install /usr/share/zoneinfo/posix/Asia/Sakhalin
dracut_install /usr/share/zoneinfo/posix/MST7MDT
dracut_install /usr/share/zoneinfo/posix/Canada/East-Saskatchewan
dracut_install /usr/share/zoneinfo/posix/Canada/Atlantic
dracut_install /usr/share/zoneinfo/posix/Canada/Central
dracut_install /usr/share/zoneinfo/posix/Canada/Eastern

View File

@ -498,7 +498,6 @@ dracut_install /usr/share/zoneinfo/posix/Asia/Phnom_Penh
dracut_install /usr/share/zoneinfo/posix/Asia/Ulan_Bator
dracut_install /usr/share/zoneinfo/posix/Asia/Sakhalin
dracut_install /usr/share/zoneinfo/posix/MST7MDT
dracut_install /usr/share/zoneinfo/posix/Canada/East-Saskatchewan
dracut_install /usr/share/zoneinfo/posix/Canada/Atlantic
dracut_install /usr/share/zoneinfo/posix/Canada/Central
dracut_install /usr/share/zoneinfo/posix/Canada/Eastern

View File

@ -1,3 +1,4 @@
#!/bin/bash
root=1
rootok=1
netroot=xcat
@ -8,11 +9,13 @@ mkdir -p /etc/ssh
mkdir -p /var/tmp/
mkdir -p /var/empty/sshd
sed -i '/^root:x/d' /etc/passwd
echo root:x:0:0::/:/bin/bash >> /etc/passwd
echo sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin >> /etc/passwd
echo rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin >> /etc/passwd
echo rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin >> /etc/passwd
echo qemu:x:107:107:qemu user:/:/sbin/nologin >> /etc/passwd
cat >>/etc/passwd <<"__ENDL"
root:x:0:0::/:/bin/bash
sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
qemu:x:107:107:qemu user:/:/sbin/nologin
__ENDL
# Fedora 20 ppc64 uses /lib/dracut/hooks/initqueue/finished
# CentOS 7 probably uses /lib/dracut/hooks/initqueue/finished also
if [ -d "/initqueue-finished" ]; then
@ -35,34 +38,30 @@ mkdir -p /var/lib/dhclient/
mkdir -p /var/log
ip link set lo up
echo '127.0.0.1 localhost' >> /etc/hosts
if grep console=ttyS /proc/cmdline > /dev/null; then
while :; do sleep 1; screen -x console < /dev/tty1 > /dev/tty1 2>&1; clear; done &
if grep -q console=ttyS /proc/cmdline; then
while :; do sleep 1; screen -S console -ln screen -x doxcat </dev/tty1 &>/dev/tty1; clear &>/dev/tty1 ; done &
fi
while :; do screen -ln < /dev/tty2 > /dev/tty2 2>&1; done &
while :; do screen -ln < /dev/tty2 &> /dev/tty2 ; done &
# The section below is just for System P LE hardware discovery
# Need to wait for NIC initialization
sleep 20
ARCH=`uname -m`
#For Openpower
if [ $ARCH = "ppc64le" ]; then
ARCH="ppc64"
fi
ARCH="$(uname -m)"
if [ $ARCH == 'ppc64' ]; then
if [[ ${ARCH} =~ ppc64 ]]; then
waittime=2
ALL_NICS=`ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo`
ALL_NICS=$(ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo)
for tmp in $ALL_NICS; do
tmp_data=`ip link show $tmp | grep -v "^ " | grep "UP"`
tmp_data="$(ip link show "$tmp" | grep -v "^ " | grep "UP")"
if [ "$tmp_data" == "" ]; then
ip link set $tmp up
ip link set "$tmp" up
fi
tmp_data="UP"
waittime=$(($waittime+1))
waittime=$((waittime+1))
done
# wait 2+number_of_nics seconds for all the LINKed NICs to be UP
sleep $waittime
fi
while :; do screen -L -ln doxcat; done
while :; do screen -dr doxcat || screen -S doxcat -L -ln doxcat; done

View File

@ -482,7 +482,12 @@ for user in $BMCUS; do
TRIES=0
# Enable the channel link for the specified user
while ! ipmitool -d $idev channel setaccess $LANCHAN $USERSLOT link=on; do
if [ "$IPMIMFG" == 343 -a "$XPROD" == 124 ]; then # For Intel S2600BP system boards
cmd="ipmitool -d $idev channel setaccess $LANCHAN $USERSLOT link=on ipmi=on"
else
cmd="ipmitool -d $idev channel setaccess $LANCHAN $USERSLOT link=on"
fi
while ! eval $cmd; do
sleep 1
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then break; fi

View File

@ -149,7 +149,7 @@ if [ "$UUID" != "unknown" ]; then
fi
flag_mtm=`echo "$MTM" | sed 's/0//g'`
if [ $flag_mtm ] && [ "$MTM" != "unknown" ]; then
if [ "$flag_mtm" ] && [ "$MTM" != "unknown" ]; then
MTM=`echo $MTM | sed 's/\.//g'`
echo "<mtm>$MTM</mtm>" >> /tmp/discopacket
fi

View File

@ -15,6 +15,16 @@ use HTTP::Request;
use HTTP::Headers;
use LWP;
use JSON;
use File::Path;
use IO::Socket::SSL qw( SSL_VERIFY_PEER );
my $go_api_port = 12429;
my $go_cons_port = 12430;
use constant CONSOLE_LOG_DIR => "/var/log/consoles";
unless (-d CONSOLE_LOG_DIR) {
mkpath(CONSOLE_LOG_DIR, 0, 0755);
}
sub http_request {
my ($method, $url, $data) = @_;
@ -26,7 +36,8 @@ sub http_request {
SSL_cert_file => xCAT::Utils->getHomeDir() . "/.xcat/client-cred.pem",
SSL_ca_file => xCAT::Utils->getHomeDir() . "/.xcat/ca.pem",
SSL_use_cert => 1,
SSL_verify_mode => 'SSL_VERIFY_PEER', }, );
verify_hostname => 0,
SSL_verify_mode => SSL_VERIFY_PEER, }, );
my $header = HTTP::Headers->new('Content-Type' => 'application/json');
# $data = encode_json $data if defined($data);
$data = JSON->new->encode($data) if defined($data);
@ -104,4 +115,263 @@ sub create_nodes {
return $ret;
}
#-------------------------------------------------------------------------------
=head3 is_xcat_conf_ready
Check if the goconserver configuration file was generated by xcat
Returns:
1 - ready
0 - not ready
Globals:
none
Example:
my $ready=(xCAT::Goconserver::is_xcat_conf_ready()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub is_xcat_conf_ready {
my $file;
open $file, '<', "/etc/goconserver/server.conf";
my $line = <$file>;
close $file;
if ($line =~ /#generated by xcat/) {
return 1;
}
return 0;
}
#-------------------------------------------------------------------------------
=head3 is_goconserver_running
Check if the goconserver service is running
Returns:
1 - running
0 - not running
Globals:
none
Example:
my $running=(xCAT::Goconserver::is_goconserver_running()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub is_goconserver_running {
my $cmd = "ps axf | grep -v grep | grep \/usr\/bin\/goconserver";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
return 0;
}
return 1;
}
#-------------------------------------------------------------------------------
=head3 is_conserver_running
Check if the conserver service is running
Returns:
1 - running
0 - not running
Globals:
none
Example:
my $running=(xCAT::Goconserver::is_conserver_running()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub is_conserver_running {
# On ubuntu system 'service conserver status' can not get the correct status of conserver,
# use 'pidof conserver' like what we did in rcons.
my $cmd = "pidof conserver";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0) {
return 1;
}
return 0;
}
#-------------------------------------------------------------------------------
=head3 build_conf
generate configuration file for goconserver
Returns:
none
Globals:
none
Example:
my $running=(xCAT::Goconserver::build_conf()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub build_conf {
my $config = "#generated by xcat ".xCAT::Utils->Version()."\n".
"global:\n".
" host: 0.0.0.0\n".
" ssl_key_file: /etc/xcat/cert/server-cred.pem\n".
" ssl_cert_file: /etc/xcat/cert/server-cred.pem\n".
" ssl_ca_cert_file: /etc/xcat/cert/ca.pem\n".
" logfile: /var/log/goconserver/server.log # the log for goconserver\n".
"api:\n".
" port: $go_api_port # the port for rest api\n".
"console:\n".
" datadir: /var/lib/goconserver/ # the data file to save the hosts\n".
" port: $go_cons_port # the port for console\n".
" log_timestamp: true # log the timestamp at the beginning of line\n".
" reconnect_interval: 10 # retry interval in second if console could not be connected\n".
" logger: # multiple logger targets could be specified\n".
" file: # file logger, valid fields: name,logdir. Accept array in yaml format\n".
" - name: default # the identity name customized by user\n".
" logdir: ".CONSOLE_LOG_DIR." # default log directory of xcat\n".
" # - name: goconserver \n".
" # logdir: /var/log/goconserver/nodes \n".
" # tcp: # valied fields: name, host, port, timeout, ssl_key_file, ssl_cert_file, ssl_ca_cert_file, ssl_insecure\n".
" # - name: logstash \n".
" # host: 127.0.0.1 \n".
" # port: 9653 \n".
" # timeout: 3 # default 3 second\n".
" # - name: filebeat \n".
" # host: <hostname or ip> \n".
" # port: <port> \n".
" # udp: # valid fiedls: name, host, port, timeout\n".
" # - name: rsyslog \n".
" # host: \n".
" # port: \n".
" # timeout: # default 3 second\n";
my $file;
my $ret = open ($file, '>', '/etc/goconserver/server.conf');
if ($ret == 0) {
xCAT::MsgUtils->message("S", "Could not open file /etc/goconserver/server.conf");
return 1;
}
print $file $config;
close $file;
return 0;
}
#-------------------------------------------------------------------------------
=head3 start_service
start goconserver service
Returns:
none
Globals:
none
Example:
my $running=(xCAT::Goconserver::start_service()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub start_service {
my $cmd = "service goconserver start";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("S", "Could not start goconserver service.");
return 1;
}
return 0;
}
#-------------------------------------------------------------------------------
=head3 stop_service
stop goconserver service
Returns:
none
Globals:
none
Example:
my $ret=(xCAT::Goconserver::stop_service()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub stop_service {
my $cmd = "service goconserver stop";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("S", "Could not stop goconserver service.");
return 1;
}
return 0;
}
#-------------------------------------------------------------------------------
=head3 stop_conserver_service
stop conserver service
Returns:
none
Globals:
none
Example:
my $ret=(xCAT::Goconserver::stop_conserver_service()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub stop_conserver_service {
my $cmd = "service conserver stop";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("S", "Could not stop conserver service.");
return 1;
}
return 0;
}
#-------------------------------------------------------------------------------
=head3 restart_service
restart goconserver service
Returns:
none
Globals:
none
Example:
my $ret=(xCAT::Goconserver::restart_service()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub restart_service {
my $cmd = "service goconserver restart";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("S", "Could not restart goconserver service.");
return 1;
}
return 0;
}
sub get_api_port {
return $go_api_port;
}
1;

View File

@ -704,9 +704,7 @@ sub setNodeStatusAttributes {
$updates{'status'} = $_;
$updates{'statustime'} = $currtime;
my $nodestate = "@$nodes status: $updates{'status'} statustime: $updates{'statustime'}";
openlog('xcat', 'ndelay', 'local4');
syslog('local4|info', '%s', $nodestate);
closelog();
xCAT::MsgUtils->message('S', "$nodestate");
my $where_clause;
my $dbname = xCAT::Utils->get_DBName();

View File

@ -152,6 +152,9 @@ sub init_plugin
$rc = xCAT::Utils->setupAIXconserver();
}
} elsif ($servicelist->{"conserver"} == 2)
{
&setup_GOCONS();
}
if (($servicelist->{"nameserver"} == 1) || ($servicelist->{"nameserver"} == 2))
{
@ -488,9 +491,17 @@ sub setup_CONS
{
my ($nodename) = @_;
my $rc = 0;
my $cmd;
my $cmdref;
if (-x "/usr/bin/goconserver") {
require xCAT::Goconserver;
if (xCAT::Goconserver::is_goconserver_running()) {
$rc = xCAT::Goconserver::stop_service();
if($rc) {
xCAT::MsgUtils->message("S", "Error: Failed to stop goconserver service.");
return 1;
}
}
}
$cmdref->{command}->[0] = "makeconservercf";
$cmdref->{arg}->[0] = "-l";
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
@ -532,6 +543,55 @@ sub setup_CONS
#-----------------------------------------------------------------------------
=head3 setup_GOCONS
Sets up goconserver
=cut
#-----------------------------------------------------------------------------
sub setup_GOCONS
{
my ($running, $ready, $ret);
unless (-x "/usr/bin/goconserver") {
xCAT::MsgUtils->message("S", "Error: goconserver is not installed.");
return 1;
}
require xCAT::Goconserver;
# if goconserver is installed, check the status of conserver service.
if (xCAT::Goconserver::is_conserver_running()) {
xCAT::MsgUtils->message("S", "conserver is started, stopping it.");
$ret = xCAT::Goconserver::stop_conserver_service();
if ($ret) {
xCAT::MsgUtils->message("S", "Error: failed to stop conserver service.");
return 1;
}
}
$running = xCAT::Goconserver::is_goconserver_running();
$ready = xCAT::Goconserver::is_xcat_conf_ready();
if ( $running && $ready ) {
# Already started by xcat
return 0;
}
# user could customize the configuration, do not rewrite the configuration if this file has been
# generated by xcat
if (!$ready) {
$ret = xCAT::Goconserver::build_conf();
if ($ret) {
xCAT::MsgUtils->message("S", "Error: failed to create configuration file for goconserver.");
return 1;
}
}
$ret = xCAT::Goconserver::restart_service();
if ($ret) {
xCAT::MsgUtils->message("S", "Error: failed to start goconserver service.");
return 1;
}
return 0;
}
#-----------------------------------------------------------------------------
=head3 setup_DHCP
Sets up DHCP services

View File

@ -4417,6 +4417,12 @@ sub defrm
node => [@allnodes],
arg => ['offline'],
}, $doreq, 0 ,1);
# Run makeconservercf -d <node>
@output = xCAT::Utils->runxcmd({
command => ['makeconservercf'],
node => [@allnodes],
arg => ['-d'],}, $doreq, 0, 1);
}
}

View File

@ -549,17 +549,39 @@ sub mknetboot
$xcatmaster = '!myipfn!'; #allow service nodes to dynamically nominate themselves as a good contact point, this is of limited use in the event that xcat is not the dhcp/tftp server
}
if ($ient and $ient->{tftpserver} and $ient->{tftpserver} ne '<xcatmaster>') {
if ($ient and $ient->{nfsserver} and $ient->{nfsserver} ne '<xcatmaster>') {
$imgsrv = $ient->{nfsserver};
}elsif ($ient and $ient->{tftpserver} and $ient->{tftpserver} ne '<xcatmaster>') {
$imgsrv = $ient->{tftpserver};
} else {
$ient = $reshash->{$node}->[0];
$imgsrv = $xcatmaster;
}
unless ($imgsrv) {
xCAT::MsgUtils->report_node_error($callback, $node, "Unable to determine or reasonably guess the image server for $node");
next;
}
my $imgsrvip;
unless($imgsrv eq '!myipfn!' or xCAT::NetworkUtils->validate_ip($imgsrv)==0){
# if imgsrv is hostname, convert it to ip address
# the host name might not be resolved inside initrd
$imgsrvip = xCAT::NetworkUtils->getipaddr($imgsrv);
}
unless($imgsrvip){
$imgsrvip=$imgsrv;
}
my $xcatmasterip;
if (xCAT::NetworkUtils->validate_ip($xcatmaster)) {
# if xcatmaster is hostname, convert it to ip address
# the host name might not be resolved inside initrd
$xcatmasterip = xCAT::NetworkUtils->getipaddr($xcatmaster);
}
unless($xcatmasterip){
$xcatmasterip=$xcatmaster
}
# Start to build kcmdline
my $kcmdline;
@ -570,11 +592,8 @@ sub mknetboot
# get entry for nfs root if it exists:
# have to get nfssvr and nfsdir from noderes table
my $nfssrv = $imgsrv;
my $nfssrv = $imgsrvip;
my $nfsdir = $rootimgdir;
if ($ient->{nfsserver}) {
$nfssrv = $ient->{nfsserver};
}
if ($ient->{nfsdir} ne '') {
$nfsdir = $ient->{nfsdir} . "/netboot/$osver/$arch/$profile";
@ -597,9 +616,9 @@ sub mknetboot
}
} else {
if (-r "$rootimgdir/rootimg-statelite.gz.metainfo") {
$kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz.metainfo STATEMNT=";
$kcmdline = "imgurl=$httpmethod://$imgsrvip:$httpport/$rootimgdir/rootimg-statelite.gz.metainfo STATEMNT=";
} else {
$kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz STATEMNT=";
$kcmdline = "imgurl=$httpmethod://$imgsrvip:$httpport/$rootimgdir/rootimg-statelite.gz STATEMNT=";
}
}
@ -626,21 +645,6 @@ sub mknetboot
}
}
$kcmdline .= $statemnt . " ";
my $xcatmasterip;
# if xcatmaster is hostname, convert it to ip address
if (xCAT::NetworkUtils->validate_ip($xcatmaster)) {
# Using XCAT=<hostname> will cause problems rc.statelite.ppc.redhat
# when trying to run chroot command
$xcatmasterip = xCAT::NetworkUtils->getipaddr($xcatmaster);
if (!$xcatmasterip)
{
$xcatmasterip = $xcatmaster;
}
} else {
$xcatmasterip = $xcatmaster;
}
$kcmdline .= "XCAT=$xcatmasterip:$xcatdport ";
@ -669,11 +673,11 @@ sub mknetboot
}
else {
if (-r "$rootimgdir/$compressedrootimg.metainfo") {
$kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/$compressedrootimg.metainfo ";
$kcmdline = "imgurl=$httpmethod://$imgsrvip:$httpport/$rootimgdir/$compressedrootimg.metainfo ";
} else {
$kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/$compressedrootimg ";
$kcmdline = "imgurl=$httpmethod://$imgsrvip:$httpport/$rootimgdir/$compressedrootimg ";
}
$kcmdline .= "XCAT=$xcatmaster:$xcatdport ";
$kcmdline .= "XCAT=$xcatmasterip:$xcatdport ";
$kcmdline .= "NODE=$node ";
# add flow control setting
@ -686,23 +690,10 @@ sub mknetboot
}
if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) {
my ($host, $ipaddr) = xCAT::NetworkUtils->gethostnameandip($xcatmaster);
if ($ipaddr) {
#for use in postscript and postbootscript in xcatdsklspost in the rootimg
$kcmdline .= " LOGSERVER=$ipaddr ";
#for use in syslog dracut module in the initrd
$kcmdline .= " syslog.server=$ipaddr syslog.type=rsyslogd syslog.filter=*.* ";
}
else {
#for use in postscript and postbootscript in xcatdsklspost in the rootimg
$kcmdline .= " LOGSERVER=$xcatmaster ";
#for use in syslog dracut module in the initrd
$kcmdline .= " syslog.server=$xcatmaster syslog.type=rsyslogd syslog.filter=*.* ";
}
#for use in postscript and postbootscript in xcatdsklspost in the rootimg
$kcmdline .= " LOGSERVER=$xcatmasterip ";
#for use in syslog dracut module in the initrd
$kcmdline .= " syslog.server=$xcatmasterip syslog.type=rsyslogd syslog.filter=*.* ";
$kcmdline .= " xcatdebugmode=$::XCATSITEVALS{xcatdebugmode} ";
}

View File

@ -50,6 +50,8 @@ my $openbmc_pass;
$::P9_WITHERSPOON_MFG_ID = "42817";
$::P9_WITHERSPOON_PRODUCT_ID = "16975";
my %node_in_list = ();
#-------------------------------------------------------
=head3 handled_commands
@ -194,12 +196,6 @@ sub bmcdiscovery_usage {
push @{ $rsp->{data} }, "\tbmcdiscover [-v|--version]";
push @{ $rsp->{data} }, "\tbmcdiscover [--sn <SN_nodename>] [-s scan_method] [-u bmc_user] [-p bmc_passwd] [-z] [-w] --range ip_range\n";
push @{ $rsp->{data} }, "\tCheck BMC administrator User/Password:\n";
push @{ $rsp->{data} }, "\t\tbmcdiscover -u bmc_user -p bmc_password -i bmc_ip --check\n";
push @{ $rsp->{data} }, "\tDisplay the BMC IP configuration:\n";
push @{ $rsp->{data} }, "\t\tbmcdiscover [-u bmc_user] [-p bmc_passwd] -i bmc_ip --ipsource";
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
return 0;
}
@ -627,6 +623,17 @@ sub scan_process {
$ipmac{$_} = $new_mac;
}
my $nodelisttab;
if ($nodelisttab = xCAT::Table->new("nodelist")) {
my @nodes_in_list = $nodelisttab->getAllAttribs("node");
foreach my $node (@nodes_in_list) {
$node_in_list{$node->{node}} = 1;
}
} else {
xCAT::MsgUtils->message("E", " Could not read the nodelist table\n");
return 1;
}
###############################
# Set the signal handler for ^c
###############################
@ -685,17 +692,14 @@ sub scan_process {
my @mc_cmds = ("/opt/xcat/bin/ipmitool-xcat -I lanplus -H ${$live_ip}[$i] -P $openbmc_pass mc info -N 1 -R 1",
"/opt/xcat/bin/ipmitool-xcat -I lanplus -H ${$live_ip}[$i] $bmcusername $bmcpassword mc info -N 1 -R 1");
my $mc_info;
my $flag;
foreach my $mc_cmd (@mc_cmds) {
$mc_info = xCAT::Utils->runcmd($mc_cmd, -1);
if ($mc_info =~ /Manufacturer ID\s*:\s*(\d+)\s*Manufacturer Name.+\s*Product ID\s*:\s*(\d+)/) {
if ($1 eq $::P9_WITHERSPOON_MFG_ID and $2 eq $::P9_WITHERSPOON_PRODUCT_ID) {
bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command);
$flag = 1;
last;
} else {
bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command);
$flag = 1;
last;
}
}
@ -1017,7 +1021,6 @@ sub bmcdiscovery_ipmi {
my $opz = shift;
my $opw = shift;
my $request_command = shift;
my $node = sprintf("node-%08x", unpack("N*", inet_aton($ip)));
my $bmcstr = "BMC Session ID";
my $bmcusername = '';
my $bmcpassword = '';
@ -1028,6 +1031,9 @@ sub bmcdiscovery_ipmi {
$bmcpassword = "-P $bmc_pass";
}
my $mtms_node = "";
my $mac_node = "";
my $node_data = $ip;
my $icmd = "/opt/xcat/bin/ipmitool-xcat -vv -I lanplus $bmcusername $bmcpassword -H $ip chassis status ";
my $output = xCAT::Utils->runcmd("$icmd", -1);
@ -1094,11 +1100,12 @@ sub bmcdiscovery_ipmi {
}
$node_data .= ",mp,bmc,$::opt_SN,$::opt_SN";
if ($mtm and $serial) {
$node = "node-$mtm-$serial";
$node =~ s/(.*)/\L$1/g;
$node =~ s/[\s:\._]/-/g;
} else {
$node = "node-$ipmac{$ip}";
$mtms_node = "node-$mtm-$serial";
$mtms_node =~ s/(.*)/\L$1/g;
$mtms_node =~ s/[\s:\._]/-/g;
}
if ($ipmac{$ip}) {
$mac_node = "node-$ipmac{$ip}";
}
} elsif ($output =~ /error : unauthorized name/) {
xCAT::MsgUtils->message("W", { data => ["BMC username is incorrect for $ip"] }, $::CALLBACK);
@ -1108,7 +1115,7 @@ sub bmcdiscovery_ipmi {
return;
}
display_output($opz,$opw,$node,$node_data,"ipmi",$request_command);
display_output($opz,$opw,$mtms_node,$mac_node,$node_data,"ipmi",$request_command);
}
}
@ -1129,7 +1136,8 @@ sub bmcdiscovery_openbmc{
my $opz = shift;
my $opw = shift;
my $request_command = shift;
my $node = sprintf("node-%08x", unpack("N*", inet_aton($ip)));
my $mtms_node = "";
my $mac_node = "";
print "$ip: Detected openbmc, attempting to obtain system information...\n";
my $http_protocol="https";
@ -1205,21 +1213,22 @@ sub bmcdiscovery_openbmc{
}
$node_data .= ",mp,bmc,$::opt_SN,$::opt_SN";
if ($mtm and $serial) {
$node = "node-$mtm-$serial";
$node =~ s/(.*)/\L$1/g;
$node =~ s/[\s:\._]/-/g;
} else {
$node = "node-$ipmac{$ip}";
$mtms_node = "node-$mtm-$serial";
$mtms_node =~ s/(.*)/\L$1/g;
$mtms_node =~ s/[\s:\._]/-/g;
}
if ($ipmac{$ip}) {
$mac_node = "node-$ipmac{$ip}";
}
} else {
if ($login_response->status_line =~ /401 Unauthorized/) {
xCAT::MsgUtils->message("W", { data => ["Invalid username or password for $ip"] }, $::CALLBACK);
} else {
xCAT::MsgUtils->message("W", { data => ["$login_response->status_line for $ip"] }, $::CALLBACK);
xCAT::MsgUtils->message("W", { data => ["Received response " . $login_response->status_line . " for $ip"] }, $::CALLBACK);
}
return;
}
display_output($opz,$opw,$node,$node_data,"openbmc",$request_command);
display_output($opz,$opw,$mtms_node,$mac_node,$node_data,"openbmc",$request_command);
}
@ -1235,11 +1244,19 @@ sub bmcdiscovery_openbmc{
sub display_output {
my $opz = shift;
my $opw = shift;
my $node = shift;
my $mtms_node = shift;
my $mac_node = shift;
my $node_data = shift;
my $mgttype = shift;
my $request_command = shift;
my $node;
if (($node_in_list{$mac_node} and !$node_in_list{$mtms_node}) or (!$node_in_list{$mac_node} and !$mtms_node)) {
$node = $mac_node;
} else {
$node = $mtms_node;
}
if (defined($opw)) {
my $rsp = {};
push @{ $rsp->{data} }, "Writing $node ($node_data) to database...";

View File

@ -8,6 +8,7 @@ use xCAT::TableUtils;
use Getopt::Long;
use Sys::Hostname;
use xCAT::SvrUtils;
use xCAT::Scope;
use strict;
use Data::Dumper;
@ -28,6 +29,7 @@ my $usage_string =
The default goes down to all the conservers on
the server nodes and set them up
-d|--delete Conserver has the relevant entries for the given noderange removed immediately from configuration
-C|--cleanup To remove the entries for the nodes that do not exist in xCAT db
-t|--trust Add additional trusted hosts.
-h|--help Display this usage statement.
-V|--verbose Verbose mode.
@ -71,6 +73,7 @@ sub preprocess_request {
'l|local' => \$::LOCAL,
'h|help' => \$::HELP,
'D|debug' => \$::DEBUG,
'C|cleanup' => \$::CLEANUP,
'v|version' => \$::VERSION,
'V|verbose' => \$::VERBOSE)) {
$request = {};
@ -98,8 +101,25 @@ sub preprocess_request {
$request = {};
return;
}
if ($::CLEANUP && ($::CONSERVER or $::LOCAL)) {
$callback->({ data => "Can not specify -l|--local or -c|--conserver together with -C|--cleanup." });
$request = {};
return;
}
# The cleanup shall run on both MN and all SNs
if ($::CLEANUP) {
if ($noderange && @$noderange > 0) {
$callback->({ data => "Can not specify noderange together with -C|--cleanup." });
$request = {};
return;
}
my @sns = xCAT::ServiceNodeUtils->getSNList();
unless ( @sns > 0 ) {
return xCAT::Scope->get_parallel_scope($request);
}
return xCAT::Scope->get_broadcast_scope_with_parallel($request, \@sns);
}
# get site master
my $master = xCAT::TableUtils->get_site_Master();
if (!$master) { $master = hostname(); }
@ -183,9 +203,8 @@ sub process_request {
my $cb = shift;
if ($req->{command}->[0] eq "makeconservercf") {
if (-x "/usr/bin/goconserver") {
my $cmd = "ps axf | grep -v grep | grep \/usr\/bin\/goconserver";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC == 0) {
require xCAT::Goconserver;
if (xCAT::Goconserver::is_goconserver_running()) {
my $rsp->{data}->[0] = "goconserver is started, please stop it at first.";
xCAT::MsgUtils->message("E", $rsp, $cb);
return;
@ -335,7 +354,8 @@ sub makeconservercf {
#$Getopt::Long::pass_through=1;
my $delmode;
GetOptions('d|delete' => \$delmode,
't|trust=s' => \$::TRUSTED_HOST
't|trust=s' => \$::TRUSTED_HOST,
'C|cleanup' => \$::CLEANUP,
);
my $nodes = $req->{node};
my $svboot = 0;
@ -409,6 +429,18 @@ sub makeconservercf {
#$cb->({node=>[{name=>$node,error=>"Bad configuration, check attributes under the nodehm category",errorcode=>1}]});
xCAT::SvrUtils::sendmsg([ 1, "Bad configuration, check attributes under the nodehm category" ], $cb, $node);
}
} elsif ($::CLEANUP) {
my $nodelstab = xCAT::Table->new('nodelist');
my @allnodeset = $nodelstab->getAllAttribs('node');
my %allnodehash = map { $_->{node} => 1 } @allnodeset;
my $rmnodes = delete_undefined_nodes_entry(\@filecontent, \%allnodehash);
my $rsp;
if (!defined($rmnodes)) {
$rsp->{data}->[0] = "Nothing removed";
} else{
$rsp->{data}->[0] = "Remove console entry for the nodes:".join(',', @$rmnodes);
}
xCAT::MsgUtils->message("I", $rsp, $cb);
} else { #no nodes specified, do em all up
zapcfg(\@filecontent); # strip all xCAT configured nodes from config
@ -608,6 +640,41 @@ sub donodeent {
}
return 0;
}
# Remove cons entries for the undefined nodes
sub delete_undefined_nodes_entry {
my $content = shift;
my $allnodeshash = shift;
my $idx = 0;
my $toidx = -1;
my $skip = 0;
my $skipnext = 0;
my @rmnodes = ();
while ($idx <= $#$content) {
if ($content->[$idx] =~ /^#xCAT BEGIN (\S+) CONS/) {
$toidx = $idx;
my $node = $1;
unless (exists($allnodeshash->{$node})) {
$skip = 1;
$skipnext = 1;
push @rmnodes, $node;
print __LINE__."===== push node: $node==\n";
}
} elsif ($content->[$idx] =~ /^#xCAT END/) {
$skipnext = 0;
}
if ($skip) {
splice(@$content, $idx, 1);
} else {
$idx++;
}
$skip = $skipnext;
}
if (scalar(@rmnodes) > 0) {
return \@rmnodes;
} else {
return undef;
}
}
# Delete any xcat added node entries from the file
sub zapcfg {

View File

@ -321,6 +321,7 @@ sub process_request
open($tmpfile, $tfilename);
@filecontent = <$tmpfile>;
close($tmpfile);
$filecontent[$#filecontent] =~ s/\n?$/\n/;
$retdata = "\n" . join('', @filecontent);
push @{ $rsp->{'data'} }, { content => [$retdata], desc => [$parm] };
$retdata = "";

18
xCAT-server/lib/xcat/plugins/ddns.pm Executable file → Normal file
View File

@ -1223,8 +1223,8 @@ sub update_namedconf {
}
unless ($gotoptions) {
push @newnamed, "options {\n";
push @newnamed, "\tdirectory \"" . $ctx->{zonesdir} . "\";\n";
unless ($slave && xCAT::Utils->isLinux()) {
push @newnamed, "\tdirectory \"" . $ctx->{zonesdir} . "\";\n";
push @newnamed, "\tallow-recursion { any; };\n";
}
@ -1274,6 +1274,22 @@ sub update_namedconf {
push @newnamed, "};\n\n";
}
# include external configuration file(s) if present in site.namedincludes
my @entries = xCAT::TableUtils->get_site_attribute("namedincludes");
my $site_entry = $entries[0];
if (defined($site_entry)) {
my @includes = split /[ ,]/, $site_entry;
foreach (@includes) {
if (defined($_)) {
my $line = "include \"$_\";\n";
unless (grep{/$line/} @newnamed) {
push @newnamed, "include \"$_\";\n";
}
}
push @newnamed, "\n";
}
}
unless ($slave) {
unless ($gotkey) {
unless ($ctx->{privkey}) { #need to generate one

View File

@ -1267,44 +1267,24 @@ sub mknetboot
my $xcatmaster;
$ient = $reshash->{$node}->[0]; #$restab->getNodeAttribs($node, ['tftpserver']);
if ($ient and $ient->{xcatmaster})
{
if ($ient and $ient->{xcatmaster}) {
$xcatmaster = $ient->{xcatmaster};
} else {
$xcatmaster = '!myipfn!'; #allow service nodes to dynamically nominate themselves as a good contact point, this is of limited use in the event that xcat is not the dhcp/tftp server
}
if ($ient and $ient->{tftpserver})
{
if ($ient and $ient->{nfsserver} and $ient->{nfsserver} ne '<xcatmaster>') {
$imgsrv = $ient->{nfsserver};
}elsif ($ient and $ient->{tftpserver} and $ient->{tftpserver} ne '<xcatmaster>') {
$imgsrv = $ient->{tftpserver};
}
else
{
$ient = $reshash->{$node}->[0]; #$restab->getNodeAttribs($node, ['xcatmaster']);
#if ($ient and $ient->{xcatmaster})
#{
# $imgsrv = $ient->{xcatmaster};
#}
#else
#{
# master not correct for service node pools
#$ient = $sitetab->getAttribs({key => master}, value);
#if ($ient and $ient->{value})
#{
# $imgsrv = $ient->{value};
#}
#else
#{
# $imgsrv = '!myipfn!';
#}
#}
} else {
$imgsrv = $xcatmaster;
}
unless ($imgsrv) {
xCAT::MsgUtils->report_node_error($callback, $node, "Unable to determine or reasonably guess the image server for $node");
next;
}
my $kcmdline;
if ($statelite) {
if (rootfstype ne "ramdisk") {
@ -1313,9 +1293,6 @@ sub mknetboot
# have to get nfssvr and nfsdir from noderes table
my $nfssrv = $imgsrv;
my $nfsdir = $rootimgdir;
if ($ient->{nfsserver}) {
$nfssrv = $ient->{nfsserver};
}
if ($ient->{nfsdir} ne '') {
$nfsdir = $ient->{nfsdir} . "/netboot/$osver/$arch/$profile";

View File

@ -747,6 +747,7 @@ sub addnode
print $omshell "new host\n";
print $omshell "set name = \"$hostname\"\n";
print $omshell "set hardware-address = " . $mac . "\n";
print $omshell "set dhcp-client-identifier = " . $mac . "\n";
print $omshell "set hardware-type = $hardwaretype\n";
if ($ip eq "DENIED")
@ -978,48 +979,6 @@ sub check_options
return 0;
}
# if not help and not -n, dhcpd needs to be running
if (!($opt->{h}) && (!($opt->{n}))) {
if (xCAT::Utils->isLinux()) {
#my $DHCPSERVER="dhcpd";
#if( -e "/etc/init.d/isc-dhcp-server" ){
# $DHCPSERVER="isc-dhcp-server";
#}
#my @output = xCAT::Utils->runcmd("service $DHCPSERVER status", -1);
#if ($::RUNCMD_RC != 0) { # not running
my $ret = 0;
$ret = xCAT::Utils->checkservicestatus("dhcp");
if ($ret != 0)
{
my $rsp = {};
$rsp->{data}->[0] = "dhcp server is not running. please start the dhcp server.";
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
return 1;
}
} else { # AIX
my @output = xCAT::Utils->runcmd("lssrc -s dhcpsd ", -1);
if ($::RUNCMD_RC != 0) { # not running
my $rsp = {};
$rsp->{data}->[0] = "dhcpsd is not running. Run startsrc -s dhcpsd and rerun your command.";
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
return 1;
} else { # check the status
# the return output varies, sometime status is the third sometimes the 4th col
if (grep /inoperative/, @output)
{
my $rsp = {};
$rsp->{data}->[0] = "dhcpsd is not running. Run startsrc -s dhcpsd and rerun your command.";
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
return 1;
}
}
}
}
# check to see if -q is listed with any other options which is not allowed
if ($opt->{q} and ($opt->{a} || $opt->{d} || $opt->{n} || $opt->{r} || $opt->{l} || $statements)) {
my $rsp = {};
@ -1132,9 +1091,11 @@ sub preprocess_request
xCAT::MsgUtils->trace($verbose_on_off, "d", "dhcp: dhcp server on $_->{net}: $_->{dhcpserver}");
}
}
} elsif ($snonly == 1) {
$snonly = 0;
xCAT::MsgUtils->trace($verbose_on_off, "d", "dhcp: disjointdhcps mode is disabled as no service nodes are running dhcp service.");
}
my @nodes = ();
# if the new option is not specified
@ -1381,17 +1342,6 @@ sub process_request
return [];
}
# if option is query then call listnode for each node and return
if ($opt{q})
{
# call listnode for each node requested
foreach my $node (@{ $req->{node} }) {
listnode($node, $callback);
}
return;
}
# if current node is a servicenode, make sure that it is also a dhcpserver
my $isok = 1;
if (xCAT::Utils->isServiceNode()) {
@ -1413,6 +1363,57 @@ sub process_request
return;
}
# if not -n, dhcpd needs to be running
if (!($opt{n})) {
if (xCAT::Utils->isLinux()) {
#my $DHCPSERVER="dhcpd";
#if( -e "/etc/init.d/isc-dhcp-server" ){
# $DHCPSERVER="isc-dhcp-server";
#}
#my @output = xCAT::Utils->runcmd("service $DHCPSERVER status", -1);
#if ($::RUNCMD_RC != 0) { # not running
my $ret = 0;
$ret = xCAT::Utils->checkservicestatus("dhcp");
if ($ret != 0)
{
my $rsp = {};
$rsp->{data}->[0] = "dhcp server is not running. please start the dhcp server.";
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
return;
}
} else { # AIX
my @output = xCAT::Utils->runcmd("lssrc -s dhcpsd ", -1);
if ($::RUNCMD_RC != 0) { # not running
my $rsp = {};
$rsp->{data}->[0] = "dhcpsd is not running. Run startsrc -s dhcpsd and rerun your command.";
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
return;
} else { # check the status
# the return output varies, sometime status is the third sometimes the 4th col
if (grep /inoperative/, @output)
{
my $rsp = {};
$rsp->{data}->[0] = "dhcpsd is not running. Run startsrc -s dhcpsd and rerun your command.";
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
return;
}
}
}
}
# if option is query then call listnode for each node and return
if ($opt{q})
{
# call listnode for each node requested
foreach my $node (@{ $req->{node} }) {
listnode($node, $callback);
}
return;
}
my $servicenodetab = xCAT::Table->new('servicenode');
my @nodeinfo = xCAT::NetworkUtils->determinehostname;
my $nodename = pop @nodeinfo; # get hostname

View File

@ -17,8 +17,6 @@ use Data::Dumper;
my $isSN;
my $host;
my $go_api_port = 12429;
my $go_cons_port = 12430;
my $bmc_cons_port = "2200";
my $usage_string =" makegocons [-V|--verbose] [-d|--delete] noderange
-h|--help Display this usage statement.
@ -56,8 +54,6 @@ sub preprocess_request {
#$Getopt::Long::pass_through=1;
if (!GetOptions(
'c|conserver' => \$::CONSERVER,
'l|local' => \$::LOCAL,
'h|help' => \$::HELP,
'D|debug' => \$::DEBUG,
'v|version' => \$::VERSION,
@ -75,19 +71,6 @@ sub preprocess_request {
$request = {};
return;
}
if ($::LOCAL) {
if ($noderange && @$noderange > 0) {
$::callback->({ data => "Invalid option -l or --local when there are nodes specified." });
$request = {};
return;
}
}
if ($::CONSERVER && $::LOCAL) {
$::callback->({ data => "Can not specify -l or --local together with -c or --conserver." });
$request = {};
return;
}
# get site master
my $master = xCAT::TableUtils->get_site_Master();
@ -122,42 +105,14 @@ sub preprocess_request {
push @nodes, $_->{node};
}
#send all nodes to the MN
if (!$isSN && !$::CONSERVER) { #If -c flag is set, do not add the all nodes to the management node
if ($::VERBOSE) {
my $rsp;
$rsp->{data}->[0] = "Setting the nodes into goconserver on the management node";
xCAT::MsgUtils->message("I", $rsp, $::callback);
}
my $reqcopy = {%$request};
$reqcopy->{'_xcatdest'} = $master;
$reqcopy->{_xcatpreprocessed}->[0] = 1;
$reqcopy->{'_allnodes'} = $allnodes; # the original command comes with nodes or not
if ($allnodes == 1) { @nodes = (); }
$reqcopy->{node} = \@nodes;
push @requests, $reqcopy;
if ($::LOCAL) { return \@requests; }
}
# send to conserver hosts
foreach my $cons (keys %cons_hash) {
#print "cons=$cons\n";
my $doit = 0;
if ($isSN) {
if (exists($iphash{$cons})) { $doit = 1; }
} else {
if (!exists($iphash{$cons}) || $::CONSERVER) { $doit = 1; }
}
if ($doit) {
my $reqcopy = {%$request};
$reqcopy->{'_xcatdest'} = $cons;
$reqcopy->{_xcatpreprocessed}->[0] = 1;
$reqcopy->{'_allnodes'} = [$allnodes]; # the original command comes with nodes or not
$reqcopy->{node} = $cons_hash{$cons}{nodes};
push @requests, $reqcopy;
} #end if
foreach my $host (keys %cons_hash) {
my $reqcopy = {%$request};
$reqcopy->{'_xcatdest'} = $host;
$reqcopy->{_xcatpreprocessed}->[0] = 1;
$reqcopy->{'_allnodes'} = [$allnodes]; # the original command comes with nodes or not
$reqcopy->{node} = $cons_hash{$host}{nodes};
push @requests, $reqcopy;
} #end foreach
if ($::DEBUG) {
@ -227,7 +182,12 @@ sub gen_request_data {
my ($cons_map, $siteondemand) = @_;
my (@openbmc_nodes, $data);
while (my ($k, $v) = each %{$cons_map}) {
my $ondemaind = \1;
my $ondemand;
if ($siteondemand) {
$ondemand = \1;
} else {
$ondemand = \0;
}
my $cmd;
my $cmeth = $v->{cons};
if ($cmeth eq "openbmc") {
@ -248,14 +208,14 @@ sub gen_request_data {
}
if (defined($v->{consoleondemand})) {
# consoleondemand attribute for node can be "1", "yes", "0" and "no"
if ((($v->{consoleondemand} eq "1") || lc($v->{consoleondemand}) eq "yes") && !$siteondemand) {
$ondemaind = \1;
if (($v->{consoleondemand} eq "1") || lc($v->{consoleondemand}) eq "yes") {
$ondemand = \1;
}
elsif ((($v->{consoleondemand} eq "0") || lc($v->{consoleondemand}) eq "no") && $siteondemand) {
$ondemaind = \0;
elsif (($v->{consoleondemand} eq "0") || lc($v->{consoleondemand}) eq "no") {
$ondemand = \0;
}
}
$data->{$k}->{ondemand} = $ondemaind;
$data->{$k}->{ondemand} = $ondemand;
}
if (@openbmc_nodes) {
my $passwd_table = xCAT::Table->new('passwd');
@ -303,54 +263,44 @@ sub gen_request_data {
return $data;
}
sub start_goconserver {
my $rsp;
my ($rsp, $running, $ready, $ret);
unless (-x "/usr/bin/goconserver") {
$rsp->{data}->[0] = "goconserver is not installed.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 1;
}
# As conserver is always installed, we check the existence of goconserver at first.
# if goconserver is installed, check the status of conserver service.
my $cmd = "ps axf | grep -v grep | grep \/usr\/sbin\/conserver";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC == 0) {
if (xCAT::Goconserver::is_conserver_running()) {
$rsp->{data}->[0] = "conserver is started, please stop it at first.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 1;
}
$cmd = "ps axf | grep -v grep | grep \/usr\/bin\/goconserver";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0) {
my $config= "global:\n".
" host: $host\n".
" ssl_key_file: /etc/xcat/cert/server-key.pem\n".
" ssl_cert_file: /etc/xcat/cert/server-cert.pem\n".
" ssl_ca_cert_file: /etc/xcat/cert/ca.pem\n".
" logfile: /var/log/goconserver/server.log\n".
"api:\n".
" port: $go_api_port\n".
"console:\n".
" port: $go_cons_port\n";
my $file;
my $ret = open ($file, '>', '/etc/goconserver/server.conf');
if ($ret == 0) {
$rsp->{data}->[0] = "Could not open file /etc/goconserver/server.conf.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 1;
}
print $file $config;
close $file;
my $cmd = "service goconserver start";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0) {
$rsp->{data}->[0] = "Could not start goconserver service.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 1;
}
sleep(3);
$running = xCAT::Goconserver::is_goconserver_running();
$ready = xCAT::Goconserver::is_xcat_conf_ready();
if ( $running && $ready ) {
# Already started by xcat
return 0;
}
# user could customize the configuration, do not rewrite the configuration if this file has been
# generated by xcat
if (!$ready) {
$ret = xCAT::Goconserver::build_conf();
if ($ret) {
$rsp->{data}->[0] = "Failed to create configuration file for goconserver.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 1;
}
}
$ret = xCAT::Goconserver::restart_service();
if ($ret) {
$rsp->{data}->[0] = "Failed to start goconserver service.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return 1;
}
$rsp->{data}->[0] = "Starting goconserver service ...";
xCAT::MsgUtils->message("I", $rsp, $::callback);
sleep(3);
return 0;
}
@ -401,7 +351,7 @@ sub makegocons {
xCAT::SvrUtils::sendmsg([ 1, "Could not generate the request data" ], $::callback);
return 1;
}
my $api_url = "https://$host:$go_api_port";
my $api_url = "https://$host:". xCAT::Goconserver::get_api_port();
$ret = xCAT::Goconserver::delete_nodes($api_url, $data, $delmode, $::callback);
if ($delmode) {
return $ret;

View File

@ -2427,9 +2427,9 @@ sub rflash {
my $c_id = ${ $sessdata->{component_ids} }[$i];
my $version = $firmware_version{$c_id};
my $format_string = $comp_string{$c_id};
my $format_ver = sprintf("%3d.%02x %02X%02X%02X%02X",
$version->[0], $version->[1], $version->[2],
$version->[3], $version->[4], $version->[5]);
my $format_ver = sprintf("%3d.%02x.%d",
$version->[0], $version->[1],
$version->[5]*0x1000000 +$version->[4]*0x10000+ $version->[3]*0x100+$version->[2]);
$msg = $msg . $sessdata->{node} . ": " .
"Node firmware version for $format_string component: $format_ver";
if ($i != scalar(@{ $sessdata->{component_ids} }) - 1) {
@ -8747,16 +8747,16 @@ sub hpm_action_version {
return -1;
}
my $version = $hpm_data_hash{1}{action_version};
my $ver = sprintf("%3d.%02x %02X%02X%02X%02X", $version->[0], $version->[1], $version->[2],
$version->[3], $version->[4], $version->[5]);
my $ver = sprintf("%3d.%02x.%d", $version->[0], $version->[1],
$version->[5]*0x1000000+$version->[4]*0x10000+$version->[3]*0x100+$version->[2]);
$callback->({ data => "HPM firmware version for BOOT component:$ver" });
$version = $hpm_data_hash{2}{action_version};
$ver = sprintf("%3d.%02x %02X%02X%02X%02X", $version->[0], $version->[1], $version->[2],
$version->[3], $version->[4], $version->[5]);
$ver = sprintf("%3d.%02x.%d", $version->[0], $version->[1],
$version->[5]*0x1000000+$version->[4]*0x10000+$version->[3]*0x100+$version->[2]);
$callback->({ data => "HPM firmware version for APP component:$ver" });
$version = $hpm_data_hash{4}{action_version};
$ver = sprintf("%3d.%02x %02X%02X%02X%02X", $version->[0], $version->[1], $version->[2],
$version->[3], $version->[4], $version->[5]);
$ver = sprintf("%3d.%02x.%d", $version->[0], $version->[1],
$version->[5]*0x1000000+$version->[4]*0x10000+$version->[3]*0x100+$version->[2]);
$callback->({ data => "HPM firmware version for BIOS component:$ver" });
}

View File

@ -620,7 +620,7 @@ sub mods_in_rpm {
rmtree($tmp_path);
return; }
} else {
if (system("cd $tmp_path; rpm2cpio $krpm | cpio -idum *.ko > /dev/null 2>&1 ; cd - > /dev/null 2>&1")) {
if (system("cd $tmp_path; rpm2cpio $krpm | cpio -idum > /dev/null 2>&1 ; cd - > /dev/null 2>&1")) {
my $rsp;
push @{ $rsp->{data} }, "Unable to extract files from the rpm $krpm.";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
@ -636,7 +636,7 @@ sub mods_in_rpm {
return;
}
my @ko_files = `find $tmp_path -name *.ko`;
my @ko_files = `find $tmp_path -regextype posix-egrep -regex ".*/*\.ko(\.xz)?"`;
foreach my $ko (@ko_files) {
my %mod;
chomp($ko);
@ -650,7 +650,6 @@ sub mods_in_rpm {
$mod{description} = $desc;
push(@modlist, \%mod);
}
rmtree($tmp_path);
return @modlist;

File diff suppressed because it is too large Load Diff

View File

@ -629,6 +629,7 @@ sub copybootscript {
copy("$installroot/postscripts/xcatdsklspost", "$rootimg_dir/opt/xcat/xcatdsklspost");
if ($timezone[0]) {
unlink("$rootimg_dir/etc/localtime");
copy("$rootimg_dir/usr/share/zoneinfo/$timezone[0]", "$rootimg_dir/etc/localtime");
}

View File

@ -71,6 +71,41 @@ sub handled_commands
};
}
sub pdu_usage
{
my ($callback, $command) = @_;
my $usagemsg =
"Usage:
pdudiscover [<noderange>|--range ipranges] [-r|-x|-z] [-w] [-V|--verbose] [--setup]
rpower pdunodes [off|on|stat|reset]
The following command supports IR PDU with pdutype=irpdu :
rpower CN [pduoff|pduon|pdustat|pdustatus|pdureset]
The following commands support CR PDU with pdutype=crpdu :
rpower pdunodes relay=[1|2|3] [on|off]
rinv pdunodes
rvitals pdunodes
rspconfig pdunodes sshcfg
rspconfig pdunodes snmpcfg
rspconfig pdunode [hostname=<NAME>|ip=<IP>|mask=<MASK>]
\n";
if ($callback)
{
my $rsp = {};
$rsp->{data}->[0] = $usagemsg;
xCAT::MsgUtils->message("I", $rsp, $callback);
}
else
{
xCAT::MsgUtils->message("I", $usagemsg);
}
return;
}
#--------------------------------------------------------------------------------
=head3 preprocess_request
@ -94,15 +129,12 @@ sub preprocess_request {
my $usage_string=xCAT::Usage->parseCommand($command, @exargs);
if ($usage_string) {
$callback->({data=>[$usage_string]});
$req = {};
return;
&pdu_usage($callback, $command);
return 1;
}
if ((!$noderange) && ($command ne "pdudiscover") ){
$usage_string = xCAT::Usage->getUsage($command);
$callback->({ data => $usage_string });
$req = {};
&pdu_usage($callback, $command);
return;
}
@ -137,11 +169,6 @@ sub process_request
@exargs = @$extrargs;
}
#fill in the total outlet count for each pdu
$pdutab = xCAT::Table->new('pdu');
@pduents = $pdutab->getAllNodeAttribs(['node', 'outlet']);
#fill_outletCount(\@pduents, $callback);
if( $command eq "rinv") {
#for higher performance, handle node in batch
return showMFR($noderange, $callback);
@ -149,6 +176,7 @@ sub process_request
return showMonitorData($noderange, $callback);
}elsif ($command eq "rpower") {
my $subcmd = $exargs[0];
my $subcmd2 = $exargs[1];
if (($subcmd eq 'pduoff') || ($subcmd eq 'pduon') || ($subcmd eq 'pdustat')|| ($subcmd eq 'pdureset') ){
#if one day, pdu node have pdu attribute, handle in this section too
return powerpduoutlet($noderange, $subcmd, $callback);
@ -169,11 +197,14 @@ sub process_request
}
}
if(@allpdunodes) {
if(($subcmd eq 'on') || ($subcmd eq 'off') || ($subcmd eq 'stat') || ($subcmd eq 'state') || ($subcmd eq 'reset') ){
if ( ($subcmd =~ /relay/) || ($subcmd2 =~ /relay/) ) {
process_powerrelay($request,$subreq,\@allpdunodes,$callback);
} elsif(($subcmd eq 'on') || ($subcmd eq 'off') || ($subcmd eq 'stat') || ($subcmd eq 'state') || ($subcmd eq 'reset') ){
return powerpdu(\@allpdunodes, $subcmd, $callback);
} else {
my $pdunode = join (",", @allpdunodes);
$callback->({ errorcode => [1],error => "The option $subcmd is not support for pdu node(s) $pdunode."});
&pdu_usage($callback, $command);
}
}
}
@ -181,15 +212,19 @@ sub process_request
my $subcmd = $exargs[0];
if ($subcmd eq 'sshcfg') {
process_sshcfg($noderange, $subcmd, $callback);
}elsif ($subcmd eq 'snmpcfg') {
process_snmpcfg($noderange, $subcmd, $callback);
}elsif ($subcmd =~ /ip|netmask|hostname/) {
process_netcfg($request, $subreq, $subcmd, $callback);
} else {
$callback->({ errorcode => [1],error => "The input $command $subcmd is not support for pdu"});
&pdu_usage($callback, $command);
}
}elsif($command eq "pdudiscover") {
process_pdudiscover($request, $subreq, $callback);
}elsif($command eq "nodeset") {
$callback->({ errorcode => [1],error => "The input $command is not support for pdu"});
&pdu_usage($callback, $command);
}else{
#reserve for other new command in future
}
@ -197,29 +232,32 @@ sub process_request
return;
}
#-------------------------------------------------------
=head3 fill_outletcount
Get outlet count for IR PDU.
=cut
#-------------------------------------------------------
sub fill_outletCount {
my $pduentries = shift;
my $session = shift;
my $pdu = shift;
my $callback = shift;
my $outletoid = ".1.3.6.1.4.1.2.6.223.8.2.1.0";
my $pdutab = xCAT::Table->new('pdu');
foreach my $pdu (@$pduentries) {
my $cur_pdu = $pdu->{node};
my $count = $pdu->{outlet};
#get total outlet number for the pdu
if (!$count) {
my $session = connectTopdu($cur_pdu,$callback);
#will not log this error to output
if (!$session) {
next;
}
$count = $session->get("$outletoid");
if ($count) {
$pdutab->setNodeAttribs($cur_pdu, {outlet => $count});
}
}
$pdunodes->{$cur_pdu}->{outlet}=$count;
my $count = $session->get("$outletoid");
if ($count) {
$pdutab->setNodeAttribs($pdu, {outlet => $count});
} else {
xCAT::SvrUtils::sendmsg("Invalid Outlet number ", $callback,$pdu);
}
return $count;
}
#-------------------------------------------------------
@ -240,13 +278,25 @@ sub powerpdu {
return powerstat($noderange, $callback);
}
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($noderange, ['pdutype','outlet']);
foreach my $node (@$noderange) {
if ($pduhash->{$node}->[0]->{pdutype} eq 'crpdu') {
process_relay($node,$subcmd,$callback,1,3);
next;
}
my $session = connectTopdu($node,$callback);
if (!$session) {
$callback->({ errorcode => [1],error => "Couldn't connect to $node"});
next;
}
my $count = $pdunodes->{$node}->{outlet};
my $count = $pduhash->{$node}->[0]->{outlet};
unless ($count) {
$count = fill_outletCount($session, $node, $callback);
}
my $value;
my $statstr;
if ($subcmd eq "off") {
@ -295,6 +345,9 @@ sub powerpduoutlet {
my $nodetab = xCAT::Table->new('pduoutlet');
my $nodepdu = $nodetab->getNodesAttribs($noderange,['pdu']);
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($noderange, ['pdutype','outlet']);
foreach my $node (@$noderange) {
# the pdu attribute needs to be set
if(! $nodepdu->{$node}->[0]->{pdu}){
@ -305,12 +358,20 @@ sub powerpduoutlet {
my @pdus = split /,/, $nodepdu->{$node}->[0]->{pdu};
foreach my $pdu_outlet (@pdus) {
my ($pdu, $outlet) = split /:/, $pdu_outlet;
if ($pduhash->{$pdu}->[0]->{pdutype} eq 'crpdu') {
$callback->({ error => "$node: This command doesn't supports CONSTELLATION PDU with pdutype=crpdu for $pdu"});
next;
}
my $session = connectTopdu($pdu,$callback);
if (!$session) {
$callback->({ errorcode => [1],error => "$node: Couldn't connect to $pdu"});
next;
}
if ($outlet > $pdunodes->{$pdu}->{outlet} ) {
my $count = $pduhash->{$pdu}->[0]->{outlet};
unless ($count) {
$count = fill_outletCount($session, $pdu, $callback);
}
if ($outlet > $count ) {
$callback->({ error => "$node: $pdu outlet number $outlet is invalid"});
next;
}
@ -382,13 +443,60 @@ sub powerstat {
my $callback = shift;
my $output;
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($noderange, ['pdutype','outlet','snmpversion','snmpuser','authtype','authkey','privtype','privkey','seclevel']);
foreach my $pdu (@$noderange) {
if ($pduhash->{$pdu}->[0]->{pdutype} eq 'crpdu') {
my $snmpversion = $pduhash->{$pdu}->[0]->{snmpversion};
if ($snmpversion =~ /3/) {
my $snmpuser = $pduhash->{$pdu}->[0]->{snmpuser};
my $seclevel = $pduhash->{$pdu}->[0]->{seclevel};
if ((defined $snmpuser) && (defined $seclevel)) {
my $authtype = $pduhash->{$pdu}->[0]->{authtype};
if (!defined $authtype) {
$authtype="MD5";
}
my $authkey = $pduhash->{$pdu}->[0]->{authkey};
my $privtype = $pduhash->{$pdu}->[0]->{privtype};
if (!defined $privtype) {
$privtype="DES";
}
my $privkey = $pduhash->{$pdu}->[0]->{privkey};
if (!defined $privkey) {
if (defined $authkey) {
$privkey=$authkey;
}
}
my $snmpcmd;
if ($seclevel eq "authNoPriv") {
$snmpcmd = "snmpwalk -v3 -u $snmpuser -a $authtype -A $authkey -l $seclevel";
} elsif ($seclevel eq "authPriv") {
$snmpcmd = "snmpwalk -v3 -u $snmpuser -a $authtype -A $authkey -l $seclevel -x $privtype -X $privkey";
} else { #default to notAuthNoPriv
$snmpcmd = "snmpwalk -v3 -u $snmpuser -l $seclevel";
}
for (my $relay = 1; $relay <= 3; $relay++) {
relaystat($pdu, $relay, $snmpcmd, $callback);
}
next;
}
}
xCAT::SvrUtils::sendmsg("please config snmpv3 to be able to query pdu relay status", $callback,$pdu);
xCAT::SvrUtils::sendmsg(" use chdef command to add pdu snmpv3 attributes to pdu table", $callback);
xCAT::SvrUtils::sendmsg(" then run 'rspconfig $pdu snmpcfg' command ", $callback);
next;
}
my $session = connectTopdu($pdu,$callback);
if (!$session) {
$callback->({ errorcode => [1],error => "Couldn't connect to $pdu"});
next;
}
my $count = $pdunodes->{$pdu}->{outlet};
my $count = $pduhash->{$pdu}->[0]->{outlet};
unless ($count) {
$count = fill_outletCount($session, $pdu, $callback);
}
for (my $outlet =1; $outlet <= $count; $outlet++)
{
my $statstr = outletstat($session, $outlet);
@ -518,6 +626,13 @@ sub process_netcfg {
my $pdu = @$nodes[0];
my $rsp = {};
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($nodes, ['pdutype']);
unless ($pduhash->{$pdu}->[0]->{pdutype} eq "crpdu") {
xCAT::SvrUtils::sendmsg("This command only supports CONSTELLATION PDU with pdutype=crpdu", $callback,$pdu);
return;
}
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs($nodes,['ip','otherinterfaces']);
@ -526,7 +641,7 @@ sub process_netcfg {
my $discover_ip = $nodehash->{$pdu}->[0]->{otherinterfaces};
($exp, $errstr) = session_connect($static_ip, $discover_ip);
if (defined $errstr) {
xCAT::SvrUtils::sendmsg("Failed to connect", $callback);
xCAT::SvrUtils::sendmsg("Failed to connect", $callback,$pdu);
return;
}
@ -603,8 +718,16 @@ sub process_sshcfg {
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs($noderange,['ip','otherinterfaces']);
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($noderange, ['pdutype']);
foreach my $pdu (@$noderange) {
unless ($pduhash->{$pdu}->[0]->{pdutype} eq "crpdu") {
xCAT::SvrUtils::sendmsg("This command only supports CONSTELLATION PDU with pdutype=crpdu", $callback,$pdu);
next;
}
my $msg = " process_sshcfg";
xCAT::SvrUtils::sendmsg($msg, $callback, $pdu, %allerrornodes);
@ -635,6 +758,15 @@ sub process_sshcfg {
return;
}
#-------------------------------------------------------
=head3 session_connect
open a expect session and connect to CR PDU.
=cut
#-------------------------------------------------------
sub session_connect {
my $static_ip = shift;
my $discover_ip = shift;
@ -682,7 +814,15 @@ sub session_connect {
return ($ssh);
}
#-------------------------------------------------------
=head3 session_exec
execute command to CR PDU.
=cut
#-------------------------------------------------------
sub session_exec {
my $exp = shift;
my $cmd = shift;
@ -765,11 +905,20 @@ sub process_pdudiscover {
sub showMFR {
my $noderange = shift;
my $callback = shift;
my $output;
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs($noderange,['ip','otherinterfaces']);
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($noderange, ['pdutype']);
foreach my $pdu (@$noderange) {
unless ($pduhash->{$pdu}->[0]->{pdutype} eq "crpdu") {
rinv_for_irpdu($pdu, $callback);
next;
}
# connect to PDU
my $static_ip = $nodehash->{$pdu}->[0]->{ip};
my $discover_ip = $nodehash->{$pdu}->[0]->{otherinterfaces};
@ -795,6 +944,55 @@ sub showMFR {
}
}
sub rinv_for_irpdu
{
my $pdu = shift;
my $callback = shift;
my $output;
my $session = connectTopdu($pdu,$callback);
if (!$session) {
$callback->({ errorcode => [1],error => "Couldn't connect to $pdu"});
next;
}
#ibmPduSoftwareVersion
$output = $session->get(".1.3.6.1.4.1.2.6.223.7.3.0");
if ($output) {
xCAT::SvrUtils::sendmsg("PDU Software Version: $output", $callback,$pdu);
}
#ibmPduMachineType
$output = $session->get(".1.3.6.1.4.1.2.6.223.7.4.0");
if ($output) {
xCAT::SvrUtils::sendmsg("PDU Machine Type: $output", $callback,$pdu);
}
#ibmPduModelNumber
$output = $session->get(".1.3.6.1.4.1.2.6.223.7.5.0");
if ($output) {
xCAT::SvrUtils::sendmsg("PDU Model Number: $output", $callback,$pdu);
}
#ibmPduPartNumber
$output = $session->get(".1.3.6.1.4.1.2.6.223.7.6.0");
if ($output) {
xCAT::SvrUtils::sendmsg("PDU Part Number: $output", $callback,$pdu);
}
#ibmPduName
$output = $session->get(".1.3.6.1.4.1.2.6.223.7.7.0");
if ($output) {
xCAT::SvrUtils::sendmsg("PDU Name: $output", $callback,$pdu);
}
#ibmPduSerialNumber
$output = $session->get(".1.3.6.1.4.1.2.6.223.7.9.0");
if ($output) {
xCAT::SvrUtils::sendmsg("PDU Serial Number: $output", $callback,$pdu);
}
#ibmPduDescription
$output = $session->get(".1.3.6.1.4.1.2.6.223.7.10.0");
if ($output) {
xCAT::SvrUtils::sendmsg("PDU Description: $output", $callback,$pdu);
}
}
#-------------------------------------------------------
@ -814,11 +1012,31 @@ sub showMFR {
sub showMonitorData {
my $noderange = shift;
my $callback = shift;
my $output;
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs($noderange,['ip','otherinterfaces']);
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($noderange, ['pdutype']);
foreach my $pdu (@$noderange) {
unless ($pduhash->{$pdu}->[0]->{pdutype} eq "crpdu") {
my $session = connectTopdu($pdu,$callback);
if (!$session) {
$callback->({ errorcode => [1],error => "Couldn't connect to $pdu"});
next;
}
my $count = $pduhash->{$pdu}->[0]->{outlet};
unless ($count) {
$count = fill_outletCount($session, $pdu, $callback);
}
if ($count > 0) {
rvitals_for_irpdu($pdu, $count, $session, $callback);
}
next;
}
# connect to PDU
my $static_ip = $nodehash->{$pdu}->[0]->{ip};
my $discover_ip = $nodehash->{$pdu}->[0]->{otherinterfaces};
@ -845,4 +1063,304 @@ sub showMonitorData {
}
sub rvitals_for_irpdu
{
my $pdu = shift;
my $count = shift;
my $session = shift;
my $callback = shift;
my $output;
#ibmPduVoltageWarning: (voltageNormal(0),voltageOutOfRange(1))
my $voltagewarning = ".1.3.6.1.4.1.2.6.223.0.1.1.7.0";
$output = $session->get("$voltagewarning");
xCAT::SvrUtils::sendmsg("Voltage Warning: $output", $callback,$pdu);
# get power info for each outlet
# starts oid .2.6.223.8.2.2.1.7 to .2.6.223.8.2.2.1.14
#ibmPduOutletCurrent
my $outletcurrent = ".1.3.6.1.4.1.2.6.223.8.2.2.1.7";
#ibmPduOutletMaxCapacity
my $outletmaxcap = ".1.3.6.1.4.1.2.6.223.8.2.2.1.8";
#ibmPduOutletCurrentThresholdWarning
my $currentthrewarning = ".1.3.6.1.4.1.2.6.223.8.2.2.1.9";
#ibmPduOutletCurrentThresholdCritical
my $currentthrecrit = ".1.3.6.1.4.1.2.6.223.8.2.2.1.10";
#ibmPduOutletLastPowerReading
my $lastpowerreading = ".1.3.6.1.4.1.2.6.223.8.2.2.1.13";
for (my $outlet = 1; $outlet <= $count; $outlet++) {
$output = $session->get("$outletcurrent.$outlet");
xCAT::SvrUtils::sendmsg("outlet $outlet Current: $output mA", $callback,$pdu);
$output = $session->get("$outletmaxcap.$outlet");
xCAT::SvrUtils::sendmsg("outlet $outlet Max Capacity of the current: $output mA", $callback,$pdu);
$output = $session->get("$currentthrewarning.$outlet");
xCAT::SvrUtils::sendmsg("outlet $outlet Current Threshold Warning: $output mA", $callback,$pdu);
$output = $session->get("$currentthrecrit.$outlet");
xCAT::SvrUtils::sendmsg("outlet $outlet Current Threshold Critical: $output mA", $callback,$pdu);
$output = $session->get("$lastpowerreading.$outlet");
xCAT::SvrUtils::sendmsg("outlet $outlet Last Power Reading: $output Watts", $callback,$pdu);
}
}
#-------------------------------------------------------
=head3 relaystat
process individual relay stat for CR PDU.
The OID for 3 relay:
1.3.6.1.4.1.2.6.262.15.2.13
1.3.6.1.4.1.2.6.262.15.2.14
1.3.6.1.4.1.2.6.262.15.2.15
=cut
#-------------------------------------------------------
sub relaystat {
my $pdu = shift;
my $relay = shift;
my $snmpcmd = shift;
my $callback = shift;
my $relayoid = $relay + 12;
#default pdu snmpv3, won't show up for snmpv1
my $cmd = "$snmpcmd $pdu 1.3.6.1.4.1.2.6.262.15.2.$relayoid";
my $result = xCAT::Utils->runcmd($cmd, 0);
my ($msg,$stat) = split /: /, $result;
if ($stat eq "1" ) {
xCAT::SvrUtils::sendmsg(" relay $relay is on", $callback, $pdu, %allerrornodes);
} elsif ( $stat eq "0" ) {
xCAT::SvrUtils::sendmsg(" relay $relay is off", $callback, $pdu, %allerrornodes);
} else {
xCAT::SvrUtils::sendmsg(" relay $relay is unknown", $callback, $pdu, %allerrornodes);
}
return;
}
#-------------------------------------------------------
=head3 process_powerrelay
process relay action for CR PDU.
=cut
#-------------------------------------------------------
sub process_powerrelay {
my $request = shift;
my $subreq = shift;
my $subcmd = shift;
my $callback = shift;
my $relay;
my $action;
my $extrargs = $request->{arg};
my @exargs = ($request->{arg});
if (ref($extrargs)) {
@exargs = @$extrargs;
}
my $nodes = $request->{node};
foreach my $cmd (@exargs) {
if ($cmd =~ /=/ ) {
my ($key, $value) = split(/=/, $cmd);
$relay = $value;
} else {
$action = $cmd;
}
}
if ( (defined $relay) && (defined $action) ) {
my $relay_count = 1;
foreach my $pdu (@$nodes) {
process_relay($pdu, $action, $callback, $relay, $relay_count);
}
} else {
xCAT::SvrUtils::sendmsg(" This command is not support, please define relay number and action", $callback);
}
}
#-------------------------------------------------------
=head3 process_relay
process relay action for CR PDU.
=cut
#-------------------------------------------------------
sub process_relay {
my $pdu = shift;
my $subcmd = shift;
my $callback = shift;
my $relay_num = shift;
my $relay_count = shift;
if ( !defined $relay_count ) {
$relay_num = 1;
$relay_count = 3;
}
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodeAttribs($pdu,['ip','otherinterfaces']);
# connect to PDU
my $static_ip = $nodehash->{$pdu}->[0]->{ip};
my $discover_ip = $nodehash->{$pdu}->[0]->{otherinterfaces};
my ($session, $errstr) = session_connect($static_ip, $discover_ip);
my $ret;
my $err;
my $statestr;
for (my $i = 0; $i < $relay_count; $i++) {
my $relay = $relay_num;
xCAT::SvrUtils::sendmsg(" power $subcmd for relay $relay_num", $callback,$pdu);
if ($subcmd eq "off") {
relay_action($session, $pdu, $relay, "OFF", $callback);
} elsif ( $subcmd eq "on") {
relay_action($session, $pdu, $relay, "ON", $callback);
} elsif ( $subcmd eq "reset") {
relay_action($session, $pdu, $relay, "OFF", $callback);
relay_action($session, $pdu, $relay, "ON", $callback);
} else {
xCAT::SvrUtils::sendmsg(" subcmd $subcmd is not support", $callback,$pdu);
}
$relay_num++;
}
$session->hard_close();
}
#-------------------------------------------------------
=head3 realy_action
process individual relay action for CR PDU.
=cut
#-------------------------------------------------------
sub relay_action {
my $session = shift;
my $pdu = shift;
my $relay = shift;
my $action = shift;
my $callback = shift;
my ($ret, $err) = session_exec($session, "/dev/shm/bin/PduManager -r $relay -v $action");
if (defined $err) {
xCAT::SvrUtils::sendmsg("Failed to process relay action: $err", $callback);
}
if (defined $ret) {
xCAT::SvrUtils::sendmsg("$ret", $callback,$pdu);
}
}
#-------------------------------------------------------
=head3 process_snmpcfg
config snmp and snmpv3 for CR PDU.
=cut
#-------------------------------------------------------
sub process_snmpcfg {
my $noderange = shift;
my $subcmd = shift;
my $callback = shift;
my $snmp_conf="/etc/snmp/snmpd.conf";
my $xCATSettingsSTART="xCAT settings START";
my $xCATSettingsEND="xCAT settings END";
my $xCATSettingsInfo="Entries between the START and END lines will be replaced each time by xCAT command";
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs($noderange,['ip','otherinterfaces']);
my $pdutab = xCAT::Table->new('pdu');
my $pduhash = $pdutab->getNodesAttribs($noderange, ['pdutype','community','snmpversion','snmpuser','authtype','authkey','privtype','privkey','seclevel']);
foreach my $pdu (@$noderange) {
unless ($pduhash->{$pdu}->[0]->{pdutype} eq "crpdu") {
xCAT::SvrUtils::sendmsg("This command only supports CONSTELLATION PDU with pdutype=crpdu", $callback,$pdu);
next;
}
my $community = $pduhash->{$pdu}->[0]->{community};
my $snmpversion = $pduhash->{$pdu}->[0]->{snmpversion};
my $snmpuser = $pduhash->{$pdu}->[0]->{snmpuser};
my $authtype = $pduhash->{$pdu}->[0]->{authtype};
if (!defined $authtype) {
$authtype="MD5";
}
my $authkey = $pduhash->{$pdu}->[0]->{authkey};
my $privtype = $pduhash->{$pdu}->[0]->{privtype};
if (!defined $privtype) {
$privtype="DES";
}
my $privkey = $pduhash->{$pdu}->[0]->{privkey};
if (!defined $privkey) {
if (defined $authkey) {
$privkey=$authkey;
}
}
my $seclevel = $pduhash->{$pdu}->[0]->{seclevel};
# connect to PDU
my $static_ip = $nodehash->{$pdu}->[0]->{ip};
my $discover_ip = $nodehash->{$pdu}->[0]->{otherinterfaces};
my ($exp, $errstr) = session_connect($static_ip, $discover_ip);
my $ret;
my $err;
($ret, $err) = session_exec($exp, "sed -i '/$xCATSettingsSTART/,/$xCATSettingsEND/ d' $snmp_conf");
($ret, $err) = session_exec($exp, "echo '# $xCATSettingsSTART' >> $snmp_conf");
($ret, $err) = session_exec($exp, "echo '# $xCATSettingsInfo' >> $snmp_conf");
if (defined $community) {
($ret, $err) = session_exec($exp, "echo 'com2sec readwrite default $community' >> $snmp_conf");
}
#set snmpv3 configuration
if ($snmpversion =~ /3/) {
if ((defined $snmpuser) && (defined $seclevel)) {
my $msg1;
if ($seclevel eq "authNoPriv") {
$msg1 = "createUser $snmpuser $authtype $authkey";
} elsif ($seclevel eq "authPriv") {
$msg1 = "createUser $snmpuser $authtype $authkey $privtype $privkey";
} else { #default to notAuthNoPriv
$msg1 = "createUser $snmpuser";
}
my $msg2 = "rwuser $snmpuser $seclevel .1.3.6.1.4.1.2.6.262";
($ret, $err) = session_exec($exp, "sed -i '/\"$snmpuser\"/ d' /var/lib/net-snmp/snmpd.conf");
($ret, $err) = session_exec($exp, "echo $msg1 >> $snmp_conf");
($ret, $err) = session_exec($exp, "echo $msg2 >> $snmp_conf");
} else {
xCAT::SvrUtils::sendmsg("Need to define user name and security level for snmpv3 configuration", $callback);
}
}
($ret, $err) = session_exec($exp, "echo '# $xCATSettingsEND' >> $snmp_conf");
#need to restart snmpd after config file changes
($ret, $err) = session_exec($exp, "ps | grep snmpd | grep -v grep | awk '{ print $1}' | xargs kill -9");
($ret, $err) = session_exec($exp, "/usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd");
if (defined $err) {
xCAT::SvrUtils::sendmsg("Failed to configure snmp : $err", $callback);
}
$exp->hard_close();
}
}
1;

View File

@ -94,8 +94,8 @@ sub setstate {
if ($kern->{kernel} !~ /^$tftpdir/) {
my $nodereshash = $nrhash{$node}->[0];
my $installsrv;
if ($nodereshash and $nodereshash->{nfsserver}) {
$installsrv = $nodereshash->{nfsserver};
if ($nodereshash and $nodereshash->{tftpserver}) {
$installsrv = $nodereshash->{tftpserver};
} elsif ($nodereshash->{xcatmaster}) {
$installsrv = $nodereshash->{xcatmaster};
} else {
@ -574,7 +574,7 @@ sub process_request {
my $chaintab = xCAT::Table->new('chain', -create => 1);
my $chainhash = $chaintab->getNodesAttribs(\@nodes, ['currstate']);
my $noderestab = xCAT::Table->new('noderes', -create => 1);
my $nodereshash = $noderestab->getNodesAttribs(\@nodes, [ 'tftpdir', 'xcatmaster', 'nfsserver', 'servicenode' ]);
my $nodereshash = $noderestab->getNodesAttribs(\@nodes, [ 'tftpdir', 'xcatmaster', 'tftpserver', 'servicenode' ]);
my $typetab = xCAT::Table->new('nodetype', -create => 1);
my $typehash = $typetab->getNodesAttribs(\@nodes, [ 'os', 'provmethod', 'arch', 'profile' ]);
my $linuximgtab = xCAT::Table->new('linuximage', -create => 1);

View File

@ -411,41 +411,21 @@ sub mknetboot
my $ient;
my $xcatmaster;
$ient = $restab->getNodeAttribs($node, ['xcatmaster']);
if ($ient and $ient->{xcatmaster})
{
$ient = $reshash->{$node}->[0]; #$restab->getNodeAttribs($node, ['tftpserver']);
if ($ient and $ient->{xcatmaster}) {
$xcatmaster = $ient->{xcatmaster};
} else {
$xcatmaster = '!myipfn!'; #allow service nodes to dynamically nominate themselves as a good contact point, this is of limited use in the event that xcat is not the dhcp/tftp server
}
$ient = $restab->getNodeAttribs($node, ['tftpserver']);
if ($ient and $ient->{tftpserver})
{
if ($ient and $ient->{nfsserver} and $ient->{nfsserver} ne '<xcatmaster>') {
$imgsrv = $ient->{nfsserver};
}elsif ($ient and $ient->{tftpserver} and $ient->{tftpserver} ne '<xcatmaster>') {
$imgsrv = $ient->{tftpserver};
}
else
{
# $ient = $restab->getNodeAttribs($node, ['xcatmaster']);
# if ($ient and $ient->{xcatmaster})
# {
# $imgsrv = $ient->{xcatmaster};
# }
# else
# {
# # master removed, does not work for servicenode pools
# #$ient = $sitetab->getAttribs({key => master}, value);
# #if ($ient and $ient->{value})
# #{
# # $imgsrv = $ient->{value};
# #}
# #else
# #{
# $imgsrv = '!myipfn!';
# #}
# }
} else {
$imgsrv = $xcatmaster;
}
unless ($imgsrv)
{
xCAT::MsgUtils->report_node_error($callback, $node, "Unable to determine or reasonably guess the image server for $node");
@ -463,14 +443,8 @@ sub mknetboot
my $nfssrv = $imgsrv;
my $nfsdir = $rootimgdir;
if ($restab) {
my $resHash = $restab->getNodeAttribs($node, [ 'nfsserver', 'nfsdir' ]);
if ($resHash and $resHash->{nfsserver}) {
$nfssrv = $resHash->{nfsserver};
}
if ($resHash and $resHash->{nfsdir} ne '') {
$nfsdir = $resHash->{nfsdir} . "/netboot/$osver/$arch/$profile";
}
if ($ient->{nfsdir} ne '') {
$nfsdir = $ient->{nfsdir} . "/netboot/$osver/$arch/$profile";
}
if (&using_dracut($rootimgdir)) {
$kcmdline = "root=nfs:$nfssrv:$nfsdir/rootimg:ro STATEMNT=";

View File

@ -434,6 +434,7 @@ sub process_request {
}
if (exists($globalopt{setup})) {
send_msg(\%request, 0, "Configure $device ....");
switchsetup($predefineswitch, \%request, $sub_req);
}
@ -1150,6 +1151,9 @@ sub get_switchtype {
$key = $1;
return $xCAT::data::switchinfo::global_switch_type{$key};
} else {
if (exists($globalopt{pdu})) {
return "crpdu";
}
return $key;
}
}
@ -1190,7 +1194,7 @@ sub xCATdB {
# it's attribute
##################################################
if (exists($globalopt{pdu})) {
$ret = xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$host,"groups=$device","ip=$ip","mac=$mac","nodetype=$device","mgt=$device","usercomment=$vendor"] }, $sub_req, 0, 1);
$ret = xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$host,"groups=$device","ip=$ip","mac=$mac","nodetype=$device","mgt=$device","usercomment=$vendor","pdutype=$stype"] }, $sub_req, 0, 1);
} else {
$ret = xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$host,"groups=$device","ip=$ip","mac=$mac","nodetype=$device","mgt=$device","usercomment=$vendor","switchtype=$stype"] }, $sub_req, 0, 1);
}
@ -1286,6 +1290,8 @@ sub format_stanza {
$result .= "\tnodetype=$device\n";
if (!exists($globalopt{pdu})) {
$result .= "\tswitchtype=$stype\n";
} else {
$result .= "\tpdutype=$stype\n";
}
}
return ($result);
@ -1328,6 +1334,8 @@ sub format_xml {
$result .= "nodetype=$device\n";
if (!exists($globalopt{pdu})) {
$result .= "switchtype=$stype\n";
} else {
$result .= "\tpdutype=$stype\n";
}
my $href = {
@ -1390,8 +1398,8 @@ sub matchPredefineSwitch {
}
my $stype = get_switchtype($vendor);
if (exists($globalopt{pdu})) {
$stype="pdu";
if (exists($globalopt{pdu}) and !stype ) {
$stype="crpdu";
}
send_msg($request, 0, "$device discovered and matched: $dswitch to $node" );
@ -1399,7 +1407,7 @@ sub matchPredefineSwitch {
# only write to xcatdb if -w or --setup option specified
if ( (exists($globalopt{w})) || (exists($globalopt{setup})) ) {
if (exists($globalopt{pdu})) {
xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$node,"otherinterfaces=$ip",'status=Matched',"mac=$mac","usercomment=$vendor"] }, $sub_req, 0, 1);
xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$node,"otherinterfaces=$ip",'status=Matched',"mac=$mac","usercomment=$vendor","pdutype=$stype"] }, $sub_req, 0, 1);
} else {
xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$node,"otherinterfaces=$ip",'status=Matched',"mac=$mac","switchtype=$stype","usercomment=$vendor"] }, $sub_req, 0, 1);
}
@ -1425,34 +1433,39 @@ sub switchsetup {
my $request = shift;
my $sub_req = shift;
if (exists($globalopt{pdu})) {
my $mytype = "pdu";
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs(\@{${nodes_to_config}->{$mytype}},['ip','otherinterfaces']);
# get netmask from network table
my $nettab = xCAT::Table->new("networks");
my @nets;
if ($nettab) {
@nets = $nettab->getAllAttribs('net','mask');
}
foreach my $pdu(@{${nodes_to_config}->{$mytype}}) {
my $cmd = "rspconfig $pdu sshcfg";
xCAT::Utils->runcmd($cmd, 0);
my $ip = $nodehash->{$pdu}->[0]->{ip};
my $mask;
foreach my $net (@nets) {
if (xCAT::NetworkUtils::isInSameSubnet( $net->{'net'}, $ip, $net->{'mask'}, 0)) {
$mask=$net->{'mask'};
foreach my $mytype (keys %$nodes_to_config) {
if ( $mytype eq "irpdu" ) {
send_msg($request, 0, "the setup options for irpdu is not support yet\n");
} elsif ( $mytype eq "crpdu" ) {
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs(\@{${nodes_to_config}->{$mytype}},['ip','otherinterfaces']);
foreach my $pdu(@{${nodes_to_config}->{$mytype}}) {
my $cmd = "rspconfig $pdu sshcfg";
xCAT::Utils->runcmd($cmd, 0);
my $ip = $nodehash->{$pdu}->[0]->{ip};
my $mask;
foreach my $net (@nets) {
if (xCAT::NetworkUtils::isInSameSubnet( $net->{'net'}, $ip, $net->{'mask'}, 0)) {
$mask=$net->{'mask'};
}
}
$cmd = "rspconfig $pdu hostname=$pdu ip=$ip netmask=$mask";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC == 0) {
xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$pdu,"ip=$ip","otherinterfaces="] }, $sub_req, 0, 1);
} else {
send_msg($request, 0, "Failed to run rspconfig command to set ip/netmask\n");
}
}
}
$cmd = "rspconfig $pdu hostname=$pdu ip=$ip netmask=$mask";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC == 0) {
xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','node','-o',$pdu,"ip=$ip","otherinterfaces="] }, $sub_req, 0, 1);
} else {
send_msg($request, 0, "Failed to run rspconfig command to set ip/netmask\n");
send_msg($request, 0, "the pdu type $mytype is not support\n");
}
}
return;
}

View File

@ -686,7 +686,6 @@ sub preprocess_updatenode
}
# Get the MN names
my @MNip = xCAT::NetworkUtils->determinehostname;
my @MNnodeinfo = xCAT::NetworkUtils->determinehostname;
my $MNnodename = pop @MNnodeinfo; # hostname
my @MNnodeipaddr = @MNnodeinfo; # ipaddresses
@ -1695,6 +1694,24 @@ sub updatenodesyncfiles
}
}
my $dsh_from_user_env;
# get the Environment Variables and set DSH_FROM_USERID if possible (From updatenode client)
if (defined($request->{environment})) {
foreach my $envar (@{ $request->{environment} })
{
if ($envar =~ /^DSH_FROM_USERID=/) {
$dsh_from_user_env = $envar;
last;
}
}
}
unless ($dsh_from_user_env) {
# $request->{username} is gotten from CN in client certificate
if (($request->{username}) && defined($request->{username}->[0])) {
$dsh_from_user_env = 'DSH_FROM_USERID=' . $request->{username}->[0];
}
}
my $node_syncfile = xCAT::SvrUtils->getsynclistfile($nodes);
foreach my $node (@$nodes)
{
@ -1745,6 +1762,10 @@ sub updatenodesyncfiles
} else { # else this is updatenode -F
$env = ["DSH_RSYNC_FILE=$synclist"];
}
if ($dsh_from_user_env) {
push @$env, $dsh_from_user_env;
}
push @$args, "--nodestatus";
if (defined($::fanout)) { # fanout
push @$args, "-f";
@ -1765,6 +1786,7 @@ sub updatenodesyncfiles
if ($::VERBOSE)
{
push @$args, "-T";
my $rsp = {};
$rsp->{data}->[0] =
" $localhostname: Internal call command: xdcp $nodestring " . join(' ', @$args);

View File

@ -639,6 +639,7 @@ sub process_servicenodes_xdcp
$addreq->{'_xcatdest'} = $::mnname;
$addreq->{node} = \@sn;
$addreq->{noderange} = \@sn;
$addreq->{forceroot}->[0] = 1;
# check input request for --nodestatus
my $args = $req->{arg}; # argument
@ -1215,6 +1216,9 @@ sub process_request
$ENV{DSH_FROM_USERID} = $request->{username}->[0];
}
}
if ($request->{forceroot}) {
$ENV{DSH_FROM_USERID} = 'root';
}
if ($command eq "xdsh")
{
xdsh($nodes, $args, $callback, $command, $request->{noderange}->[0]);

View File

@ -65,6 +65,7 @@ use xCAT::Client qw(submit_request);
my $clientselect = new IO::Select;
my $sslclients = 0; # THROTTLE
my $maxsslclients = 64; # default
my $maxsslclientswarntime = 0;
my $batchclients = 50;
my @deferredmsgargs; # hold argumentlist for MsgUtils call until after fork
# parallelizing logging overhead with real work
@ -1432,6 +1433,11 @@ until ($quit) {
}
unless (scalar @pendingconnections) { next; } # if for some reason we landed here without any accepted connections, carry on..
if ($sslclients > $maxsslclients) { # we have enough children, wait for some to exit before spawning more
my $curtime = time();
if ($curtime > ($maxsslclientswarntime + 30)) {
xCAT::MsgUtils->message("S", "xcatd: Connections are being throttled. Current client count (" . ($sslclients + scalar @pendingconnections) . ") is greater than allowed ($maxsslclients)");
$maxsslclientswarntime=$curtime;
}
$bothwatcher->can_read(0.1); # when next connection tries to come in or a tenth of a second, whichever comes first
next; # just keep pulling things off listen queue onto our own
}

View File

@ -27,3 +27,4 @@ parted
gzip
tar
xz
ethtool

View File

@ -23,3 +23,4 @@ parted
gzip
tar
xz
ethtool

View File

@ -30,3 +30,4 @@ xz
grub2
grub2-tools
bzip2
ethtool

View File

@ -22,3 +22,4 @@ net-tools
gzip
tar
xz
ethtool

View File

@ -4,6 +4,10 @@ dracut_install wget tar cpio gzip modprobe touch echo cut wc xz
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install mount.nfs
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install ethtool
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst "$moddir/xcatroot" "/sbin/xcatroot"
inst_hook cmdline 10 "$moddir/xcat-cmdline.sh"
for file in /etc/udev/rules.d/*;do
grep -qi xcat $file && inst_rules $(basename $file)
done

View File

@ -3,6 +3,10 @@ echo $drivers
dracut_install wget cpio gzip modprobe wc touch echo cut
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install parted mke2fs bc mkswap swapon chmod
dracut_install ethtool
inst "$moddir/xcat-updateflag" "/tmp/updateflag"
inst_hook pre-mount 5 "$moddir/xcat-premount.sh"
inst_hook pre-pivot 5 "$moddir/xcat-prepivot.sh"
for file in /etc/udev/rules.d/*;do
grep -qi xcat $file && inst_rules $(basename $file)
done

View File

@ -46,3 +46,4 @@ vsftpd
wget
xz
rsyslog
ethtool

View File

@ -45,3 +45,4 @@ vsftpd
wget
xz
rsyslog
ethtool

View File

@ -615,7 +615,7 @@ if ((-d "$rootimg_dir/usr/share/dracut") or (-d "$rootimg_dir/usr/lib/dracut"))
$dracutmode = 1;
# get dracut version
$dracutver = `chroot $rootimg_dir rpm -qi dracut | awk '/Version/{print \$3}' `;
$dracutver = `chroot $rootimg_dir rpm -qi dracut | awk '/Version/{print \$3}' | awk -F. '{print \$1}'`;
chomp($dracutver);
if ($dracutver =~ /^\d\d\d$/) {
if ($dracutver >= "033") {

View File

@ -153,6 +153,7 @@ sub config_ssh {
print "$switch is not reachable\n";
next;
}
my ($exp, $errstr) = cumulus_connect($ssh_ip, $userid, $password, $timeout);
if (!defined $exp) {
@ -290,6 +291,9 @@ sub install_license {
xCAT::MsgUtils->message("E","Failed to $cmd to $switch");
next;
}
#restart switchd and reload interface
$cmd = "xdsh $switch 'systemctl enable switchd;systemctl restart switchd;ifreload -a' ";
xCAT::Utils->runcmd($cmd, 0);
push (@config_switches, $switch);
}
if (@config_switches) {
@ -350,8 +354,35 @@ sub config_snmp {
sub config_ntp {
my @config_switches;
my $cmd;
my $master;
my $ntpservers;
my $timezone;
#get ntpserver, master and timezone from site table
my @entries = xCAT::TableUtils->get_site_attribute("master");
my $master = $entries[0];
@entries = xCAT::TableUtils->get_site_attribute("timezone");
$timezone = $entries[0];
@entries = xCAT::TableUtils->get_site_attribute("ntpservers");
my $t_entry = $entries[0];
if (defined($t_entry)) {
$ntpservers = $t_entry;
} else {
$ntpservers = $master;
}
my @servers = split(',', $ntpservers);
#use ntpserver from network table if available
my $nettab = xCAT::Table->new("networks");
my @nets;
if ($nettab) {
@nets = $nettab->getAllAttribs('net','mask','ntpservers');
}
my $master = `hostname -i`;
my $file = "temp.txt";
open(FILE , ">$file")
@ -360,7 +391,6 @@ sub config_ntp {
print FILE "driftfile /var/lib/ntp/drift\n";
print FILE "disable auth\n";
print FILE "restrict 127.0.0.1\n";
print FILE "server $master iburst\n";
print FILE "interface listen eth0\n";
foreach my $switch (@nodes) {
@ -371,15 +401,31 @@ sub config_ntp {
xCAT::MsgUtils->message("E","xdsh command to $switch failed");
next;
}
my $cmd_line = "echo 'US/Eastern'>/etc/timezone;dpkg-reconfigure --frontend noninteractive tzdata";
print "$cmd_line\n";
$cmd = "xdsh $switch $cmd_line";
$cmd = "xdsh $switch 'echo $timezone >/etc/timezone;dpkg-reconfigure --frontend noninteractive tzdata' ";
$rc= xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0) {
print "Failed to update ntp timezone\n";
xCAT::MsgUtils->message("E","Failed to update ntp timezone for $switch");
next;
}
print "$cmd\n";
#use ntpserver from network table if available
my $ntpserver;
foreach my $net (@nets) {
if (xCAT::NetworkUtils::isInSameSubnet( $net->{'net'}, $switch, $net->{'mask'}, 0)) {
$ntpserver=$net->{'ntpservers'};
if (defined $ntpserver) {
if ($ntpserver =~ /xcatmaster/) {
@servers = $master;
} else {
@servers = split(',', $ntpserver);
}
}
last;
}
}
foreach my $server (@servers) {
`echo "server $server iburst" >> $file`;
}
$cmd = "xdcp $switch $file";
$rc= xCAT::Utils->runcmd($cmd, 0);
$cmd = "xdsh $switch 'cp /etc/ntp.conf /etc/ntp.conf.orig;cp $file /etc/ntp.conf;rm -fr $file;systemctl restart ntp;systemctl enable ntp' ";
@ -398,6 +444,7 @@ sub config_ntp {
my $csw = join(",",@config_switches);
$cmd = "chdef $csw status=ntp_configured";
$rc= xCAT::Utils->runcmd($cmd, 0);
print "$csw: ntp configured\n";
}

View File

@ -7,8 +7,8 @@ RewriteCond %{HTTPS} !=on
RewriteRule ^/?xcatws/(.*) https://%{SERVER_NAME}/xcatws/$1 [R,L]
RewriteRule ^/?xcatwsv2/(.*) https://%{SERVER_NAME}/xcatwsv2/$1 [R,L]
<Files (xcatws.cgi|zvmxcatws.cgi)>
<FilesMatch "^(xcatws.cgi|zvmxcatws.cgi)$">
Order allow,deny
Allow from all
</Files>
</FilesMatch>

View File

@ -5,7 +5,6 @@ RewriteCond %{HTTPS} !=on
RewriteRule ^/?xcatws/(.*) https://%{SERVER_NAME}/xcatws/$1 [R,L]
RewriteRule ^/?xcatwsv2/(.*) https://%{SERVER_NAME}/xcatwsv2/$1 [R,L]
<Files (xcatws.cgi|zvmxcatws.cgi)>
<FilesMatch "^(xcatws.cgi|zvmxcatws.cgi)$">
Require all granted
</Files>
</FilesMatch>

View File

@ -33,20 +33,51 @@ rspconfig_list_ip
rspconfig_list_netmask
rspconfig_list_vlan
rspconfig_noderange_invalid
rspconfig_set_all
rspconfig_set_all_invalid
rspconfig_set_vlan
rspconfig_set_vlan_invalid
rflash_check
rflash_invalid_activate
rflash_invalid_activate_and_delete
rflash_invalid_id
rflash_invalid_multiple_id_3
rflash_invalid_multiple_id_2
rflash_invalid_node
rflash_invalid_delete_2
rspconfig_set_hostname_equal_star_with_bmc_is_ip
rspconfig_set_hostname_equal_star_with_bmc_is_hostname
rspconfig_get_hostname
rspconfig_hostname_with_error_input
rspconfig_set_hostname
rspconfig_set_admin_passwd_with_error_input
rspconfig_set_admin_passwd_with_error_origin_password
rspconfig_sshcfg_with_error_input
rflash_option_c_without_specify_noderange
rflash_option_l_without_specify_noderange
rflash_option_a_without_specify_noderange
rflash_option_u_without_specify_noderange
rflash_option_d_without_specify_noderange
rflash_without_option
rflash_unsupport_multiple_option_a_u
rflash_unsupport_multiple_option_a_c
rflash_unsupport_multiple_option_a_l
rflash_unsupport_multiple_option_a_d
rflash_unsupport_multiple_option_c_l
rflash_unsupport_multiple_option_c_u
rflash_unsupport_multiple_option_c_d
rflash_unsupport_multiple_option_l_d
rflash_unsupport_multiple_option_l_u
rflash_unsupport_multiple_option_u_d
rflash_option_c_file_not_exist
rflash_option_c_with_multiple_values
rflash_option_c_against_node
rflash_option_check_with_V_against_node
rflash_option_l_with_value
rflash_option_l
rflash_option_u_file_not_exist
rflash_option_u_with_multiple_values
rflash_option_a_file_not_exist
rflash_option_a_with_multiple_values
rflash_option_a_with_non_existent_id
rflash_option_delete_with_multiple_values
rflash_option_delete_with_non_existent_id
rflash_option_d_with_multiple_values
rflash_option_d_with_non_existent_dir
rflash_usage
reventlog_s_openbmc
rpower_softoff
rpower_suspend_OpenpowerBmc
rpower_wake_OpenpowerBmc
rpower_errorcommand_OpenpowerBmc
rpower_wrongpasswd
rpower_errorcommand_OpenpowerBmc

View File

@ -0,0 +1,35 @@
start:reventlog_resolved_parse_error1
description: Do not pass in any logs to clear
os:Linux
hcp:openbmc
cmd:reventlog $$CN resolved
check:rc==1
check:output=~Error: Usage error. Provide a comma separated
end
start:reventlog_resolved_parse_error2
description: Do not pass in any logs to clear, include = sign
os:Linux
hcp:openbmc
cmd:reventlog $$CN resolved=
check:rc==1
check:output=~Error: Usage error. Provide a comma separated
end
start:reventlog_resolved_parse_error3
description: forgot the = sign
os:Linux
hcp:openbmc
cmd:reventlog $$CN resolved 1,2,3
check:rc==1
check:output=~Error: Usage error. Provide a comma separated
end
start:reventlog_resolved_parse_error4
description: Pass in a negative number
os:Linux
hcp:openbmc
cmd:reventlog $$CN resolved=-1
check:rc==1
check:output=~Error: Invalid ID=
end

View File

@ -14,14 +14,14 @@ os:Linux
hcp:openbmc
cmd: rflash $$CN -a /tmp/abc123.tz
check:rc==1
check:output=~Error: Invalid option
check:output=~Error: Invalid firmware specified with -a
end
start:rflash_invalid_activate_and_delete
description: Cannot specify -a and -d at the same time
description: Cannot specify -a and --delete at the same time
os:Linux
hcp:openbmc
cmd: rflash $$CN -a 123 -d 123
cmd: rflash $$CN -a 123 --delete 123
check:rc==1
check:output=~Error: Multiple options are not supported
end
@ -66,7 +66,7 @@ start:rflash_invalid_delete_2
description: Attempt to delete more than 1 ID from the FW
os:Linux
hcp:openbmc
cmd: rflash $$CN -d 221d9020 221d9020
cmd: rflash $$CN --delete 221d9020 221d9020
check:rc==1
check:output=~Error: More than one firmware specified is not supported
end

View File

@ -1,3 +1,10 @@
start:rinv_record_firmware_level
description: Record the firmware level for the start of each testcase
hcp:openbmc
cmd: rinv $$CN firm
check:rc==0
end
start:rinv_check_active_fw_count
description: Ensure that there is only 2 active firmware, one for bmc and one for pnor
hcp:openbmc

View File

@ -0,0 +1,71 @@
start:rspconfig_record_firmware_level
description: Record the firmware level for the start of each testcase
hcp:openbmc
cmd: rinv $$CN firm
check:rc==0
end
start:rspconfig_get_all
description: Check that we can get all the attributes from the BMC
os:Linux
hcp:openbmc
cmd:rspconfig $$CN ip netmask gateway hostname vlan
check:rc==0
check:output=~$$CN: BMC IP:
check:output=~$$CN: BMC Netmask:
check:output=~$$CN: BMC Gateway:
check:output=~$$CN: BMC Hostname:
check:output=~$$CN: BMC VLAN ID:
end
start:rspconfig_get_all_error
description: Check the parsing code for rspconfig (error cases)
hcp: openbmc
cmd: rspconfig $$CN ip,netmask,gateway,hostname,vlan
check:rc==1
check:output=~Error: Unsupported command
end
start:rspconfig_get_set_error
description: Check the parsing code for rspconfig (error cases) - Cannot get/set in same line
hcp: openbmc
cmd: rspconfig $$CN ip netmask=255.0.0.0
check:rc==1
check:output=~Error: Can not set and query OpenBMC information at the same time
end
start:rspconfig_get_and_set_hostname
description: Test setting and getting hostname on the BMC
os:Linux
hcp:openbmc
# Save the hostname to a file....
cmd:rspconfig $$CN hostname | tee /tmp/xcattest.rspconfig.hostname
check:rc==0
check:output=~$$CN: BMC Hostname:
# Set to witherspoon first
cmd:rspconfig $$CN hostname=witherspoon
check:rc==0
check:output=~$$CN: BMC Setting Hostname...
# Check that it's set to witherspoon
cmd:rspconfig $$CN hostname
check:rc==0
check:output=~$$CN: BMC Hostname: witherspoon
# Set to <host>-UTset
cmd:rspconfig $$CN hostname=$$CN-UTset
check:rc==0
check:output=~$$CN: BMC Setting Hostname...
# Check that it's set
cmd:rspconfig $$CN hostname
check:rc==0
check:output=~$$CN: BMC Hostname: $$CN-UTset
# Restore to saved version
cmd:grep BMC /tmp/xcattest.rspconfig.hostname | cut -d' ' -f4 | xargs -i{} rspconfig $$CN hostname={}
check:rc==0
check:output=~$$CN: BMC Setting Hostname...
cmd:rspconfig $$CN hostname
check:rc==0
check:output=~$$CN: BMC Hostname:
cmd:rm /tmp/xcattest.rspconfig.hostname
check:rc==0
end

View File

@ -50,20 +50,14 @@ end
start:bmcdiscover_check_paswd
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --check
check:rc==0
check:output=~Correct ADMINISTRATOR
end
start:bmcdiscover_check_passwd_wrong
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p test$$bmcpasswd --check
check:rc==0
check:output=~Invalid username or password | Wrong BMC password
check:rc==1
check:output=~is not supported
end
start:bmcdiscover_get_ipsource
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --ipsource
check:rc==0
check:output=~Static Address
check:rc==1
check:output=~is not supported
end
start:bmcdiscover_range_w
@ -73,12 +67,6 @@ check:output=~Writing node
check:output=~$$bmcrange,\w*,\w*,$$bmcusername,$$bmcpasswd
end
start:bmcdiscover_range_u_p_i_ipsource
description:check the bmcrange is which type address
cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --ipsource
check:rc==0
check:output=~IP Address Source : Static Address
end
start:bmcdiscover_range_z
cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -z
check:rc==0

View File

@ -10,6 +10,13 @@ cmd:ls /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__
check:rc==0
end
start:lskmodules_o
cmd:lskmodules -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__
check:rc==0
check:output=~.ko(.xz):
end
start:copycds_n
os:Linux
#cmd:umount /mnt/xca

View File

@ -411,8 +411,9 @@ check:rc==0
cmd:nodeset testnode1 osimage=rhels7.99-ppc64le-install-compute
#Ignore the exit code check as nonexistenode is fake and dispatching always fail
#check:rc==0
#nodeset will be always run on MN (#4426)
cmd:test -f /tftpboot.1/petitboot/testnode1
check:rc!=0
check:rc==0
cmd:xdsh $$SN 'test -f /tftpboot.1/petitboot/testnode1'
check:rc!=0
cmd:nodeset testnode1 offline
@ -435,6 +436,8 @@ cmd:chdef -t site tftpdir=/tftpboot
check:rc==0
cmd:rm -rf /tftpboot.1
cmd:xdsh $$SN 'rm -rf /tftpboot.1'
cmd:makedns -d testnode1
check:rc==0
cmd:chdef -t node -o testnode1 ip=
check:rc==0
cmd:cp -f /etc/hosts.xcattestbak /etc/hosts

View File

@ -3,18 +3,42 @@ cmd:reventlog
check:rc==0
check:output=~Usage
end
start:reventlog_all
cmd:reventlog $$CN all
check:rc==0
check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+
end
start:reventlog_clear
cmd:reventlog $$CN clear
check:rc==0
check:output=~$$CN\s*:\s*clear|SEL cleared
check:output=~$$CN\s*:\s*Logs cleared|SEL cleared
end
start:reventlog_numofentries
cmd:reventlog $$CN 5
check:rc==0
check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+|$$CN: no SEL entries|Entry
end
start:reventlog_s_openbmc
description: For openbmc, reventlog has dropped option s
os:Linux
hcp:openbmc
cmd:reventlog $$CN 10 -s
check:output=~The -s option is not supported for OpenBMC
check:rc!=0
cmd:reventlog $$CN 10 -s 1
check:output=~The -s option is not supported for OpenBMC
check:rc!=0
cmd:reventlog $$CN -s all
check:output=~The -s option is not supported for OpenBMC
check:rc!=0
cmd:reventlog $$CN -s
check:output=~Error: Unsupported command
check:rc!=0
cmd:reventlog $$CN all aaa
check:output=~Error: Only one option is supported at the same time
check:rc!=0
end

View File

@ -0,0 +1,484 @@
start:rflash_option_c_without_specify_noderange
description: basic usage check for option c. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
cmd:rflash -c
check:output=~Usage:
cmd:rflash -c 1.tar
check:rc != 0
check:output=~Error: Invalid nodes and/or groups in noderange
end
start:rflash_option_l_without_specify_noderange
description: basic usage check for option l. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
cmd:rflash -l
check:output=~Usage:
end
start:rflash_option_a_without_specify_noderange
description: basic usage check for option a. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
cmd:rflash -a
check:output=~Usage:
cmd:rflash -a 1.tar
check:rc != 0
check:output=~Error: Invalid nodes and/or groups in noderange
cmd:rflash -a 123abc
check:rc != 0
check:output=~Error: Invalid nodes and/or groups in noderange
end
start:rflash_option_u_without_specify_noderange
description: basic usage check for option u. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
cmd:rflash -u
check:output=~Usage:
cmd:rflash -u 1.tar
check:rc != 0
check:output=~Error: Invalid nodes and/or groups in noderange
end
start:rflash_option_d_without_specify_noderange
description: basic usage check for option d. if without specify noderange for rflash command, should offer usage message
os:Linux
hcp:openbmc
cmd:rflash -d
check:output=~Usage:
cmd:rflash -d /1234
check:Usage:
cmd:rflash --delete 1234abc
check:rc != 0
check:output=~Error: Invalid nodes and/or groups in noderange
end
start:rflash_without_option
description: basic usage check, if without option, should throw out a error
os:Linux
hcp:openbmc
cmd:rflash $$CN 1.tar
check:rc != 0
check:output=~Error: Invalid option specified when a file is provided:
end
start:rflash_unsupport_multiple_option_a_u
description: basic usage check. If specify multiple options a+u, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -a 1.tz -u
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_a_c
description: basic usage check. If specify multiple options a+c, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -a 1.tz -c
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_a_l
description: basic usage check. If specify multiple options a+l, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -a 1.tz -l
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_a_d
description: basic usage check. If specify multiple options a+d, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -a 1.tz -d
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_c_l
description: basic usage check. If specify multiple options c+l, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -c 1.tz -l
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_c_u
description: basic usage check. If specify multiple options c+u, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -c 1.tz -u
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_c_d
description: basic usage check. If specify multiple options c+d, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -c 1.tz -d
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_l_d
description: basic usage check. If specify multiple options l+d, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -l -d
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_l_u
description: basic usage check. If specify multiple options l+u, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -l -u
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_unsupport_multiple_option_u_d
description: basic usage check. If specify multiple options u+d, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -u -d
check:output=~Error: Multiple options are not supported
check:rc != 0
end
start:rflash_option_c_file_not_exist
description: basic usage check for option c. if the file does not exist, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -c /tmp/abc123.tz
check:output=~Error: Invalid firmware specified with
check:rc != 0
cmd:rflash $$CN -c /tmp/
check:output=~Error: Invalid firmware specified with
check:rc != 0
cmd:rflash $$CN /tmp/abc123.tz -c
check:output=~Error: Invalid firmware specified with
check:rc != 0
cmd:rflash $$CN /tmp/ -c
check:output=~Error: Invalid firmware specified with
check:rc != 0
cmd:rflash $$CN 1.tar -c
check:output=~Error: Cannot access
check:rc != 0
cmd:rflash $$CN -c /tmp/1.tar
check:output=~Error: Cannot access
check:rc != 0
end
start:rflash_option_c_with_multiple_values
description: basic usage check for option c. if there are multiple value assigned to c option, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -c /tmp/abc123.tz /tmp/abc124.tz
check:output=~Error: Invalid firmware specified with
check:rc != 0
cmd:rflash $$CN -c 1.tz 2.tz 3.tz
check:output=~Error: Invalid firmware specified with
check:rc != 0
cmd:rflash $$CN 1.tz 2.tz 3.tz -c
check:output=~Error: Invalid firmware specified with
check:rc != 0
cmd:rflash $$CN 1.tz -c 2.tz
check:output=~Error: Invalid firmware specified with
check:rc != 0
end
start:rflash_option_c_against_node
description: Make sure the -c option against node works
os:Linux
hcp:openbmc
cmd:rflash $$CN -c |tee /tmp/rflash_option_c.output
check:rc == 0
cmd:grep -i ibm /tmp/rflash_option_c.output |grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l
check:rc==0
check:output=~1
cmd:grep -i ibm /tmp/rflash_option_c.output |grep -i 'BMC Firmware Product' | grep -i 'Active)\*' | wc -l
check:rc==0
check:output=~1
cmd:rm -rf /tmp/rflash_option_c.output
check:rc==0
end
start:rflash_option_check_with_V_against_node
description: Make sure the --check option with V works
os:Linux
hcp:openbmc
cmd:rflash $$CN --check -V |tee /tmp/rflash_option_check_with_V.output
check:rc == 0
cmd:grep -i ibm /tmp/rflash_option_check_with_V.output |grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l
check:rc==0
check:output=~1
cmd:grep -i ibm /tmp/rflash_option_check_with_V.output |grep -i 'BMC Firmware Product' | grep -i 'Active)\*' | wc -l
check:rc==0
check:output=~1
cmd:rm -rf /tmp/rflash_option_check_with_V.output
check:rc==0
end
start:rflash_option_l_with_value
description: basic usage check for option l. if there is value for l option, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -l /tmp/abc123.tz
check:output=~Error: Invalid option
check:rc != 0
cmd: rflash $$CN /tmp/abc123.tz -l
check:output=~Error: Invalid option
check:rc != 0
end
start:rflash_option_l
description: Make sure the -l option works
os:Linux
hcp:openbmc
cmd:rflash $$CN -l |tee /tmp/rflash_option_l.output
check:rc == 0
cmd:grep -i ' bmc ' /tmp/rflash_option_l.output | grep -i 'Active(\*)' | wc -l
check:rc==0
check:output=~1
cmd:grep -i ' host ' /tmp/rflash_option_l.output | grep -i 'Active(\*)' | wc -l
check:rc==0
check:output=~1
cmd:rm -rf /tmp/rflash_option_l.output
check:rc==0
end
start:rflash_option_u_file_not_exist
description: basic usage check for option u. if the file does not exist, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -u /tmp/abc123.tz
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN -u /tmp/
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN /tmp/abc123.tz -u
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN /tmp/ -u
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN 1.tar -u
check:output=~Error: Cannot access
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN -u /tmp/1.tar
check:output=~Error: Cannot access
check:output!~Attempting to
check:rc != 0
end
start:rflash_option_u_with_multiple_values
description: basic usage check for option u. if there are multiple value assigned to u option, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -u /tmp/abc123.tz /tmp/abc124.tz
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN -u 1.tz 2.tz 3.tz
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN 1.tz 2.tz 3.tz -u
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN 1.tz -u 2.tz
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
end
start:rflash_option_a_file_not_exist
description: basic usage check for option a. if the file does not exist, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -a /tmp/abc123.tz
check:output=~rror: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN -a /tmp/
check:output=~rror: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN /tmp/abc123.tz -a
check:output=~rror: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN /tmp/ -a
check:output=~rror: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN 1.tar -a
check:output=~Error: Cannot access
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN -a /tmp/1.tar
check:output=~Error: Cannot access
check:output!~Attempting to
check:rc != 0
end
start:rflash_option_a_with_multiple_values
description: basic usage check for option a. if there are multiple value assigned to a option, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -a /tmp/abc123.tz /tmp/abc124.tz
check:output=~Error: Invalid firmware specified with
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN -a 1.tz 2.tz 3.tz
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN 1.tz 2.tz 3.tz -a
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN 1.tz -a 2.tz
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN 1234567 -a 2345678
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN -a 123 abc asdbas
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to
check:rc != 0
end
start:rflash_option_a_with_non_existent_id
description: basic usage check for option a. if active a non-existent firmware ID, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -a 1234567
check:output=~Error: Invalid ID provided to activate
check:rc != 0
cmd:rflash $$CN -a d123abc
check:output=~Error: Invalid ID provided to activate
check:rc != 0
end
start:rflash_option_delete_with_multiple_values
description: basic usage check for option delete. if there are multiple value assigned to delete option, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN --delete 1234567 2345678
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to delete
check:rc != 0
cmd:rflash $$CN 1234567 2345678 --delete
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to delete
check:rc != 0
cmd:rflash $$CN 1234567 --delete 2345678
check:output=~Error: More than one firmware specified is not supported
check:output!~Attempting to delete
check:rc != 0
end
start:rflash_option_delete_with_non_existent_id
description: basic usage check for option --delete. if delete a non-existent firmware ID, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN --delete 1234567
check:output=~Error: Invalid ID provided to delete
check:rc != 0
cmd:rflash $$CN --delete d123abc
check:output=~Error: Invalid ID provided to delete
check:rc != 0
end
start:rflash_option_d_with_multiple_values
description: basic usage check for option d. if there are multiple value assigned to d option, should throw out error message
os:Linux
hcp:openbmc
cmd:rflash $$CN -d /123/ /234/
check:output=~Error: More than one
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN /123/ /234/ -d
check:output=~Error: More than one
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN /123/ -d /234/
check:output=~Error: More than one
check:output!~Attempting to
check:rc != 0
end
start:rflash_option_d_with_non_existent_dir
description: basic usage check for option -d. if try to oprate non-existent dir by d option, should throw out error message
os:Linux
hcp:openbmc
cmd:rm -rf /tmp/bogus123
check:rc == 0
cmd:rflash $$CN -d /tmp/bogus123
check:output=~Error: Can't open directory
check:output!~Attempting to
check:rc != 0
cmd:rflash $$CN /tmp/bogus123
check:output=~Error: Invalid option specified
check:rc != 0
cmd:mkdir -p /tmp/bogus123
check:rc == 0
cmd:rflash $$CN /tmp/bogus123 -d
check:output =~Error: No BMC tar file found
check:output =~Error: No PNOR tar file found
check:output!~Attempting to
check:rc != 0
cmd:touch /tmp/bogus123/obmc-phosphor-image-witherspoon.ubi.mtd.tar
check:rc == 0
cmd:rflash $$CN -d /tmp/bogus123
check:output =~Error: No BMC tar file found
check:output =~Error: No PNOR tar file found
check:output!~Attempting to
check:rc != 0
cmd:touch /tmp/bogus123/witherspoon.pnor.squashfs.tar
check:rc == 0
cmd:rflash $$CN -d /tmp/bogus123
check:output =~Error: No BMC tar file found
check:output =~Error: No PNOR tar file found
check:output!~Attempting to
check:rc != 0
cmd:rm -rf /tmp/bogus123
check:rc == 0
end
start:rflash_usage
description:checke the usage of rflash for openbmc
os:Linux
hcp:openbmc
cmd:rflash -h
check:output =~Usage:
check:output =~OpenPOWER OpenBMC specific:
check:output =~ -d.+no-host-reboot
check:output =~ image_id.+--delete
check:rc == 0
end

View File

@ -121,7 +121,7 @@ cmd:chdef $$CN bmcpassword=test
check:rc==0
cmd:rinv $$CN all
check:rc==1
check:output=~$$CN: Error: Invalid username or password|Error: ERROR: Incorrect password provided
check:output=~$$CN: Error:.+Invalid username or password|Error: ERROR: Incorrect password provided
cmd:cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza
check:rc==0
end

View File

@ -11,7 +11,7 @@ cmd:rspconfig $$CEC iocap
check:rc==0
check:output=~$$CEC: iocap: \w+
end
start:
start:rspconfig_time
hcp:fsp
cmd:rspconfig $$CEC time
@ -41,55 +41,97 @@ check:rc==0
check:output=~__GETNODEATTR($$CN,hcp)__: \w+
end
start:rspconfig_set_ip
description:rspconfig change openbmc ip
start:rspconfig_list_ntpservers
description: rspconfig list ntpservers info
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -i $$CN $NODEIP
cmd:rspconfig $$CN ntpservers
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -c $$CN ip
check:output=~$$CN: BMC NTP Servers
end
start:rspconfig_set_ntpservers
description: rspconfig set ntpservers
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig_ntp.sh $$CN $$MN
check:rc==0
end
start:rspconfig_set_ip
description:To test change openbmc ip separately by rspconfig. should not support and throw out error message
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
cmd:rspconfig $$CN ip=__GETNODEATTR($$CN,bmc)__
check:output=~Error: IP, netmask and gateway must be configured together.
check:rc!=0
end
start:rspconfig_ip_invalid
description:rspconfig could not change openbmc ip using invalid ip
Attribute: $$CN-The operation object of rspconfig command
cmd:rspconfig $$CN ip=ddd
os:Linux
hcp:openbmc
cmd:rspconfig $$CN ip=ddd gateway=0.0.0.0 netmask=255.255.0.0
check:output=~Error: Invalid parameter for option ip
check:rc!=0
end
start:rspconfig_ip_null
description:rspconfig could not set ip to null
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
cmd:rspconfig $$CN ip=
check:output=~Invalid parameter for option ip
check:rc!=0
cmd:rspconfig $$CN ip= gateway=0.0.0.0 netmask=255.255.0.0
check:output=~Invalid parameter for option ip
check:rc!=0
end
start:rspconfig_set_netmask
description:rspconfig change openbmc netmask
description:To test change openbmc netmask separately by rspconfig. should not support and throw out error message
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -n $$CN netmask
check:rc==0
os:Linux
hcp:openbmc
cmd:rspconfig $$CN netmask=255.255.0.0
check:output=~Error: IP, netmask and gateway must be configured together.
check:rc!=0
end
start:rspconfig_netmask_invalid
despcription:rspconfig could not change openbmc netmask using invalid netmask
Attribute: $$CN-The operation object of rspconfig command
cmd:rspconfig $$CN netmask=ddd
check:output=~Error: Invalid parameter for option netmask
check:rc!=0
cmd:rspconfig $$CN netmask=ddd ip=__GETNODEATTR($$CN,bmc)__ gateway=0.0.0.0
check:output=~Error: Invalid parameter for option netmask
check:rc!=0
cmd:rspconfig $$CN netmask= ip=__GETNODEATTR($$CN,bmc)__ gateway=0.0.0.0
check:output=~Error: Invalid parameter for option netmask
check:rc!=0
end
start:rspconfig_set_gateway
description:rspconfig change openbmc gateway
description:To test change openbmc gateway by rspconfig. should not support and throw out error message
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -g $$CN gateway
check:rc==0
os:Linux
hcp:openbmc
cmd:rspconfig $$CN gateway=0.0.0.0
check:output=~Error: IP, netmask and gateway must be configured together.
check:rc!=0
end
start:rspconfig_set_vlan
description:rspconfig change openbmc gateway
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -v $$CN vlan
check:rc==0
cmd:rspconfig $$CN vlan=0
check:output=~Error: Invalid parameter for option vlan
check:rc!=0
cmd:rspconfig $$CN vlan=111
check:output=~Error: VLAN must be configured with IP, netmask and gateway
check:rc!=0
end
start:rspconfig_set_all
@ -102,29 +144,47 @@ end
start:rspconfig_gateway_invalid
despcription:rspconfig could not change openbmc gatway using invalid gateway
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
cmd:rspconfig $$CN gateway=ddd
check:output=~Error: Invalid parameter for option gateway
check:rc!=0
cmd:rspconfig $$CN gateway= ip=__GETNODEATTR($$CN,bmc)__ netmask=255.0.0.0
check:output=~Error: Invalid parameter for option gateway
check:rc!=0
cmd:rspconfig $$CN gateway=
check:output=~Error: Invalid parameter for option gateway
check:rc!=0
end
start:rspconfig_set_vlan_invalid
despcription:rspconfig could not change openbmc gatway using invalid vlan
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
cmd:rspconfig $$CN vlan=dddsdsdfs
check:output=~Error: VLAN must be configured with IP, netmask and gateway
check:rc!=0
end
start:rspconfig_set_all_invalid
despcription:rspconfig could not change openbmc gatway using invalid vlan
Attribute: $$CN-The operation object of rspconfig command
os:Linux
hcp:openbmc
cmd:rspconfig $$CN ip=dsd gateway=ooo netmask=asfsf vlan=dddsdsdfs
check:output=~Error: Invalid parameter
check:rc!=0
end
start:rspconfig_node_invalid
despcription:rspconfig could not do any action using invalid node
os:Linux
hcp:openbmc
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:rspconfig testnode ip
check:output=~Error: Invalid nodes and/or groups in noderange
check:rc!=0
cmd:if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi
check:rc==0
@ -132,9 +192,12 @@ end
start:rspconfig_noderange_invalid
despcription:rspconfig could not do any action using invalid node
os:Linux
hcp:openbmc
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:rspconfig testnode,$$CN ip
check:output=~Error: Invalid nodes
check:rc!=0
cmd:if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi
check:rc==0
@ -184,3 +247,155 @@ check:output=~$$CN: BMC Netmask:
check:output=~__GETNODEATTR($$CN,bmc)__
end
start:rspconfig_set_hostname_equal_star_with_bmc_is_ip
description:when bmc=<ip>, rspconfig <node> hostname=* should throw out error
os:Linux
hcp:openbmc
#in automation environment, bmc is ip by default.
cmd:lsdef $$CN -i bmc -c
check:rc == 0
cmd:rspconfig $$CN hostname=*
check:rc == 0
check:output =~ Invalid OpenBMC Hostname
end
start:rspconfig_set_hostname_equal_star_with_bmc_is_hostname
description:when bmc=<bmc_hostname>, rspconfig <node> hostname=* should set bmc_hostname into bmc
os:Linux
hcp:openbmc
cmd:mkdir -p /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname
check:rc == 0
cmd:lsdef $$CN -z > /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/$$CN.stanza
check:rc == 0
cmd:chdef -t node -o bogus_bmc_hostname groups=bmc ip=10.6.17.100
check:rc == 0
cmd:makehosts bogus_bmc_hostname
check:rc == 0
cmd:chdef $$CN bmc=bogus_bmc_hostname
check:rc == 0
cmd:lsdef $$CN -i bmc -c
check:rc == 0
cmd:rspconfig $$CN hostname=*
check:rc == 0
check:output =~$$CN: BMC Hostname: bogus_bmc_hostname
cmd:makehosts -d bogus_bmc_hostname
check:rc == 0
cmd:rmdef bogus_bmc_hostname
check:rc == 0
cmd:rmdef $$CN
check:rc == 0
cmd:cat /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/$$CN.stanza |mkdef -z
check:rc == 0
cmd:rm -rf /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname
check:rc == 0
end
start:rspconfig_get_hostname
description:To test get bmc hostname by rspconfig.
os:Linux
hcp:openbmc
cmd:mkdir -p /tmp/rspconfig_get_hostname
check:rc == 0
cmd:rspconfig $$CN sshcfg
check:rc == 0
cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" | tee /tmp/rspconfig_get_hostname/working_hostname
check:rc == 0
cmd:cat /tmp/rspconfig_get_hostname/working_hostname
check:rc == 0
cmd:rspconfig $$CN hostname |tee /tmp/rspconfig_get_hostname/rspconfig_output
check:rc == 0
cmd: grep -i 'BMC Hostname' /tmp/rspconfig_get_hostname/rspconfig_output|awk -F':' '{print $3}' |sed s/\\s//g > /tmp/rspconfig_get_hostname/rspconfig_get_hostname
check:rc == 0
cmd:cat /tmp/rspconfig_get_hostname/rspconfig_get_hostname
cmd:diff /tmp/rspconfig_get_hostname/working_hostname /tmp/rspconfig_get_hostname/rspconfig_get_hostname
check:rc == 0
cmd:rm -rf /tmp/rspconfig_get_hostname
check:rc == 0
end
start:rspconfig_hostname_with_error_input
description: To test <get node hostname> with error input, should throw out error message
os:Linux
hcp:openbmc
cmd:rspconfig $$CN hostname bogus
check:output =~Error: Unsupported command
check:rc != 0
cmd:rspconfig $$CN bogus hostname
check:output =~Error: Unsupported command
check:rc != 0
cmd:rspconfig $$CN hostname=
check:output =~Error: Invalid parameter for option hostname
check:rc != 0
end
start:rspconfig_set_hostname
description:To test set bmc hostname by rspconfig
os:Linux
hcp:openbmc
cmd:mkdir -p /tmp/rspconfig_set_hostname
check:rc == 0
cmd:rspconfig $$CN sshcfg
check:rc == 0
cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" | tee /tmp/rspconfig_set_hostname/working_hostname
check:rc == 0
cmd:cat /tmp/rspconfig_set_hostname/working_hostname
check:rc == 0
cmd:a=$(cat /tmp/rspconfig_set_hostname/working_hostname); rspconfig $$CN hostname=test_$a |tee /tmp/rspconfig_set_hostname/rspconfig_output
check:rc == 0
cmd:grep -i 'BMC hostname' /tmp/rspconfig_set_hostname/rspconfig_output|awk -F':' '{print $3}' |sed s/\\s//g > /tmp/rspconfig_set_hostname/rspconfig_get_hostname
check:rc == 0
cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" | tee /tmp/rspconfig_set_hostname/new_working_hostname
check:rc == 0
cmd:diff /tmp/rspconfig_set_hostname/rspconfig_get_hostname /tmp/rspconfig_set_hostname/new_working_hostname
check:rc == 0
cmd:diff /tmp/rspconfig_set_hostname/new_working_hostname /tmp/rspconfig_set_hostname/working_hostname
check:rc != 0
cmd:a=test_$(cat /tmp/rspconfig_set_hostname/working_hostname);b=$(cat /tmp/rspconfig_set_hostname/new_working_hostname);echo "a=$a b=$b";if [ "$a" = "$b" ];then exit 0;else exit 1; fi
check:rc == 0
cmd:rm -rf /tmp/rspconfig_set_hostname
check:rc == 0
end
start:rspconfig_set_admin_passwd_with_error_input
description: To test "rspconfig <node> admin_passwd=xxx,yyy". If the format of "xxx,yyy" is wrong, should throw out error message
os:Linux
hcp:openbmc
cmd:rspconfig $$CN admin_passwd=cluster,
check:output =~Error: Invalid parameter for option admin_passwd
check:rc != 0
cmd:rspconfig $$CN admin_passwd=,cluster
check:output =~Error: Invalid parameter for option admin_passwd
check:rc != 0
cmd:rspconfig $$CN admin_passwd=,
check:output =~Error: Invalid parameter for option admin_passwd
check:rc != 0
cmd:rspconfig $$CN admin_passwd=
check:output =~Error: Invalid parameter for option admin_passwd
check:rc != 0
cmd:rspconfig $$CN admin_passwd=;
check:output =~Error: Invalid parameter for option admin_passwd
end
start:rspconfig_set_admin_passwd_with_error_origin_password
description: To test "rspconfig <node> admin_passwd=xxx,yyy". If the original password is wrong, should throw out error message
os:Linux
hcp:openbmc
cmd:rspconfig $$CN admin_passwd=bogus__GETNODEATTR($$CN,bmcpassword)__,cluster
check:output =~Current BMC password is incorrect
#check:rc != 0
end
start:rspconfig_sshcfg_with_error_input
description: To test "rspconfig <node> sshcfg" with error input, should throw out error message
os:Linux
hcp:openbmc
cmd:rspconfig $$CN sshcfg aaa
check:output =~Error: Configure sshcfg must be issued without other options.
check:rc != 0
cmd:rspconfig $$CN hostname sshcfg
check:output =~Error: Configure sshcfg must be issued without other options.
check:rc != 0
end

View File

@ -0,0 +1,53 @@
#!/bin/bash
cn=$1
mn=$2
ntpservers=`rspconfig $cn ntpservers | awk -F":" '{print $3}' | sed 's/^ //;s/ $//'`
if [ $? -ne 0 ]; then
echo "rspconfig $cn ntpservers failed"
exit 1
fi
echo "The original BMC NTP Servers is $ntpservers"
if [ $ntpservers != "None" ]; then
new_ntpservers=$ntpservers"_test"
else
new_ntpservers=$mn
fi
output=`rspconfig $cn ntpservers=$new_ntpservers`
if [ $? -ne 0 ]; then
echo "rspconfig $cn ntpservers=$new_ntpservers failed"
exit 1
fi
if [[ $output =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$new_ntpservers" ]]; then
echo "Setting NTPServers as $new_ntpservers success"
else
echo "Setting NTPServers as $new_ntpservers failed, the output is $output"
exit 1
fi
echo "To clear environment"
if [ $ntpservers != "None" ]; then
original_ntpservers="$ntpservers"
else
original_ntpservers=""
fi
output=`rspconfig $cn ntpservers=$original_ntpservers`
if [ $? -ne 0 ]; then
echo "rspconfig $cn ntpservers=$ntpservers failed when clearing environment"
exit 1
fi
if [[ "$output" =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$ntpservers" ]]; then
echo "Setting NTPServers as $ntpservers success when clearing environment"
exit 0
fi
echo "Setting NTPServers as $ntpservers failed when clearing environment"
exit 1

View File

@ -0,0 +1,77 @@
start:updatenode_f_F_hierarchy
description: verify the behavior of updatenode -f/-F in the hierarchy environment-- (1)the different kind of synclist entries including destination nodes (2)make sure the location of directory to hold the files/dirs to sync on SN is correct (3)check the result of updatenode -f/-F
#create environment files to hold variables accross the case
cmd: MYENVFILE="/tmp/updatenode_f_F_hierarchy.envs"; rm -rf $MYENVFILE; echo "MYENVFILE=\"$MYENVFILE\"">> $MYENVFILE; chmod +x $MYENVFILE
#obtain and save the site.SNsyncfiledir
cmd: source /tmp/updatenode_f_F_hierarchy.envs;echo $(lsdef -t site -o clustersite -i SNsyncfiledir|grep SNsyncfiledir||echo "SNsyncfiledir=/var/xcat/syncfiles")>>$MYENVFILE
#create and save dir to hold intermidate files/dirs related to the case
cmd: source /tmp/updatenode_f_F_hierarchy.envs;SYNCDIR='/tmp/updatenode_f_F_hierarchy.dir/';echo "SYNCDIR=\"$SYNCDIR\"">>$MYENVFILE; rm -rf $SYNCDIR; mkdir -p $SYNCDIR
#create and save synclist path
cmd: source /tmp/updatenode_f_F_hierarchy.envs; SYNCLIST="$SYNCDIR/synclist";echo "SYNCLIST=\"$SYNCLIST\"">>$MYENVFILE
#obtain the cn's osimage name, backup the osimage definition, save the osimage name and the path to the osimage stanza
cmd: source /tmp/updatenode_f_F_hierarchy.envs; CNOSIMGSTANZA="$SYNCDIR/osimage.stanza";CNOSIMG=__GETNODEATTR($$CN,provmethod)__;lsdef -t osimage -o $CNOSIMG -z>$CNOSIMGSTANZA; echo "CNOSIMGSTANZA=\"$CNOSIMGSTANZA\"" >> $MYENVFILE; echo "CNOSIMG=\"$CNOSIMG\"">>$MYENVFILE
#specify the synclists attribute for cn's osimage
cmd: source /tmp/updatenode_f_F_hierarchy.envs; chdef -t osimage -o $CNOSIMG synclists=$SYNCLIST
check:rc==0
#create the dirs+files to sync, append the sync list entries
cmd: source /tmp/updatenode_f_F_hierarchy.envs; echo "$SYNCDIR/testdir1/ -> ($$CN) /tmp/" >>$SYNCLIST ; mkdir -p "$SYNCDIR/testdir1/"; echo "hellotest" > "$SYNCDIR/testdir1/testfile1"
cmd: source /tmp/updatenode_f_F_hierarchy.envs; echo "$SYNCDIR/testdir2/* -> ($$CN) /tmp/" >>$SYNCLIST; mkdir -p "$SYNCDIR/testdir2/"; echo "hellotest" > "$SYNCDIR/testdir2/testfile2"
cmd: source /tmp/updatenode_f_F_hierarchy.envs; echo "$SYNCDIR/testdir3 -> ($$CN) /tmp/" >>$SYNCLIST; mkdir -p "$SYNCDIR/testdir3/"; echo "hellotest" > "$SYNCDIR/testdir3/testfile3"
cmd: source /tmp/updatenode_f_F_hierarchy.envs; echo "$SYNCDIR/testdir4/testfile4 -> ($$CN) /tmp/" >>$SYNCLIST; mkdir -p "$SYNCDIR/testdir4/"; echo "hellotest" > "$SYNCDIR/testdir4/testfile4"
cmd: source /tmp/updatenode_f_F_hierarchy.envs; echo "$SYNCDIR/testdir5/testfile5 -> /tmp/" >>$SYNCLIST; mkdir -p "$SYNCDIR/testdir5/"; echo "hellotest" > "$SYNCDIR/testdir5/testfile5"
cmd: source /tmp/updatenode_f_F_hierarchy.envs; echo "$SYNCDIR/testdir6/testfile6 -> ($$SN) /tmp/" >>$SYNCLIST; mkdir -p "$SYNCDIR/testdir6/"; echo "hellotest" > "$SYNCDIR/testdir6/testfile6"
#clear up the SNsyncfiledir directory on sn
cmd: source /tmp/updatenode_f_F_hierarchy.envs;ssh $$SN "rm -rf $SNsyncfiledir/*"
#run updatenode -f
cmd: updatenode $$CN -f
check:rc==0
#verify the behavior of updatenode -f
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$SN "cat $SNsyncfiledir/$SYNCDIR/testdir1/testfile1|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$SN "cat $SNsyncfiledir/$SYNCDIR/testdir2/testfile2|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$SN "cat $SNsyncfiledir/$SYNCDIR/testdir3/testfile3|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$SN "cat $SNsyncfiledir/$SYNCDIR/testdir4/testfile4|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$SN "cat $SNsyncfiledir/$SYNCDIR/testdir5/testfile5|grep 'hellotest'"
check:rc==0
#clean up existing files/dirs with the same name as the ones to sync
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "rm -rf /tmp/test{dir,file}*"
#run updatenode -F
cmd: updatenode $$CN -F
check:rc==0
#verify the behavior of updatenode -F
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "cat /tmp/testfile1|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "cat /tmp/testfile2|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "cat /tmp/testdir3/testfile3|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "cat /tmp/testfile4|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "cat /tmp/testfile5|grep 'hellotest'"
check:rc==0
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "cat /tmp/testfile6|grep 'hellotest'"
check:rc!=0
# restore the cn osimage definition
cmd: source /tmp/updatenode_f_F_hierarchy.envs; cat $CNOSIMGSTANZA|chdef -z
check:rc==0
#clean up the intermidate dirs/files generated in this case
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$SN "rm -rf $SNsyncfiledir/*"
cmd: source /tmp/updatenode_f_F_hierarchy.envs; ssh $$CN "rm -rf /tmp/test{dir,file}*"
cmd: source /tmp/updatenode_f_F_hierarchy.envs; rm -rf $SYNCDIR
cmd: rm -rf /tmp/updatenode_f_F_hierarchy.envs
end

View File

@ -300,7 +300,7 @@ if ($restore) {
}
}
log_this($running_log_fd, "xCAT automated test finished at" . scalar(localtime()));
log_this($running_log_fd, "xCAT automated test finished at " . scalar(localtime()));
log_this($running_log_fd, "Please check results in the $resultdir, \nand see $failed_log_name file for failed cases.");
#To generate performance report
@ -886,6 +886,9 @@ sub load_case {
}
$$case_name_index_map_ref{"$name"} = $i;
$newcmdstart = 0;
if(grep (/$case_ref->[$i]->{name}/,@{ $invalidcases{"noruncases"} })){
delete_item_from_array($case_ref->[$i]->{name}, $invalidcases{"noruncases"});
}
} else {
$skip = 1;
push @{ $invalidcases{"invalidcasename"} }, $name;

View File

@ -35,7 +35,9 @@ case "$1" in
if [ -r "/tmp/xcat/mainservice.pid" ]; then
mv /tmp/xcat/mainservice.pid /var/run/xcat/mainservice.pid
fi
xcatconfig -u
mkdir -p /var/log/xcat
date >> /var/log/xcat/upgrade.log
xcatconfig -u -V >> /var/log/xcat/upgrade.log
rm /tmp/xCAT_upgrade.tmp
else
xcatconfig -i -d -s

View File

@ -1,3 +1,3 @@
# By default, dhcpd use the ``daemon'' facility. Thus dhcp logs will go here.
# ftp.* is for tftp log.
daemon.debug;ftp.* /var/log/messages
# Make sure dhcpd requests and responses (daemon.=debug) and
# tftp messages (ftp.*) are logged.
daemon.=debug;ftp.* /var/log/messages

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