diff --git a/.mailmap b/.mailmap index cc6d51051..d01484002 100644 --- a/.mailmap +++ b/.mailmap @@ -1,49 +1,65 @@ +Andy Wray +Andy Wray +Arif Ali +Arif Ali +Arif Ali BAI Yuan +Bill Wajda +Bill Wajda +Brian Elliott Finley +Brian Elliott Finley Bruce Potter -CAO Li +Bruce Potter +CAO Li CAO Meng Meng -CAO Meng Meng -CAO Meng Meng +CAO Meng Meng +CAO Meng Meng Casandra Qiu Casandra Qiu CHENG Long CHU De Gao CHU De Gao CHU De Gao +Chuck Brazie +Chuck Brazie +Chuck Brazie GAO Feng -GAO Ling +GAO Ling GAO Ling GONG Jie GONG Jie GONG Jie HU Wei Hua Jarrod Johnson -Jarrod Johnson -Jarrod Johnson -Jarrod Johnson +Jarrod Johnson +Jarrod Johnson +Jarrod Johnson +Jarrod Johnson JIN Jie Hua -JIN Jie Hua +JIN Jie Hua +John Dunham LI Guang Cheng LI Guang Cheng LI Guang Cheng LI Ting Ting -Linda O. Mellor +LI Ting Ting +Linda O. Mellor Linda O. Mellor -Lissa Valletta +Lissa Valletta Lissa Valletta Mark Gurevich Mark Gurevich -Norm Nott Norm Nott +Norm Nott Patrick Lundgren Patrick Lundgren Patrick Lundgren -SUN Jing SUN Jing +SUN Jing Victor Hu Victor Hu Victor Hu -WANG Hua Zhong +WANG Hua Zhong WANG Hua Zhong WANG Jun Xia WANG Xiao Peng @@ -62,7 +78,7 @@ YANG Song YANG Song YANG Song YANG Song -YIN Le +YIN Le YIN Le ZHAO Er Tao ZHAO Er Tao diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..25ab2393e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +os: linux +dist: trusty +sudo: required +before_install: +- sudo apt-get install -y git reprepro devscripts debhelper libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common +- perl -v +- echo "yes" | sudo cpan -f -i Capture::Tiny + +script: +- echo $TRAVIS_BUILD_ID +- echo $TRAVIS_EVENT_TYPE +- echo $TRAVIS_BUILD_NUMBER +- echo $TRAVIS_BUILD_DIR +- echo $TRAVIS_COMMIT +- echo $TRAVIS_COMMIT_MESSAGE +- echo $TRAVIS_COMMIT_RANGE +- echo $TRAVIS_JOB_ID +- echo $TRAVIS_JOB_NUMBER +- echo $TRAVIS_BRANCH +- echo $TRAVIS_COMMIT_MESSAGE +- echo $USERNAME +- echo $PASSWORD +- echo $GITHUB_TOKEN +- git log --pretty=format:"%s %b" -2 + +#- perl travis.pl +- if [ $TRAVIS_EVENT_TYPE == "pull_request" ]; then perl ./travis.pl; fi + + + diff --git a/README.rst b/README.rst index 1d9a9e0ca..c9250eb90 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Documentation xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/ -|docs_latest| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212| +|docs_latest| |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 `_ In particular the `GitHub `_ related subsection. +.. |docs_2135| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.5 + :alt: 2.13.5 documentation status + :scale: 100% + :target: http://xcat-docs.readthedocs.io/en/2.13.5/ + .. |docs_2134| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.4 :alt: 2.13.4 documentation status :scale: 100% diff --git a/Version b/Version index 8bbab5627..14239ef15 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -2.13.5 +2.13.6 diff --git a/build-ubunturepo b/build-ubunturepo index 6e01caab8..65e44c88d 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -22,6 +22,8 @@ # When you are ready to release this build, use PROMOTE=1 without PREGA # BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in # prep for a release. +# GPGSIGN=0 - Do not sign the repo in the end of the build. The repo will be signed by default +# # LOG= - provide an LOG file option to redirect some output into log file # # For the dependency packages 1. All the xcat dependency deb packages should be uploaded to @@ -125,16 +127,20 @@ if [ ! -z ${LOG} ]; then WGET_CMD="wget -o ${LOG}" fi -#sync the gpg key to the build machine local -gsa_url=http://pokgsa.ibm.com/projects/x/xcat/build/linux -mkdir -p $HOME/.gnupg -for key_name in pubring.gpg secring.gpg trustdb.gpg; do - if [ ! -f $HOME/.gnupg/$key_name ] || [ `wc -c $HOME/.gnupg/$key_name|cut -f 1 -d' '` == 0 ]; then - rm -f $HOME/.gnupg/$key_name - ${WGET_CMD} -P $HOME/.gnupg $gsa_url/keys/$key_name - chmod 600 $HOME/.gnupg/$key_name - fi -done +if [ "$GPGSIGN" = "0" ];then + echo "GPGSIGN=$GPGSIGN specified, skip gnupg key downloading" +else + #sync the gpg key to the build machine local + gsa_url=http://pokgsa.ibm.com/projects/x/xcat/build/linux + mkdir -p $HOME/.gnupg + for key_name in pubring.gpg secring.gpg trustdb.gpg; do + if [ ! -f $HOME/.gnupg/$key_name ] || [ `wc -c $HOME/.gnupg/$key_name|cut -f 1 -d' '` == 0 ]; then + rm -f $HOME/.gnupg/$key_name + ${WGET_CMD} -P $HOME/.gnupg $gsa_url/keys/$key_name + chmod 600 $HOME/.gnupg/$key_name + fi + done +fi if [ "$c_flag" ] then @@ -323,10 +329,16 @@ Codename: $dist Architectures: $tmp_out_arch Components: main Description: Repository automatically genereted conf -SignWith: yes - __EOF__ - done + + if [ "$GPGSIGN" = "0" ];then + echo "GPGSIGN=$GPGSIGN specified, the repo will not be signed" + echo "" >> conf/distributions + else + echo "SignWith: yes" >> conf/distributions + echo "" >> conf/distributions + fi + done cat << __EOF__ > conf/options verbose @@ -444,11 +456,20 @@ Codename: $dist Architectures: $tmp_out_arch Components: main Description: Repository automatically genereted conf -SignWith: yes - __EOF__ + + if [ "$GPGSIGN" = "0" ];then + echo "GPGSIGN=$GPGSIGN specified, the repo will not be signed" + echo "" >> conf/distributions + else + echo "SignWith: yes" >> conf/distributions + echo "" >> conf/distributions + fi + done + + cat << __EOF__ > conf/options verbose ask-passphrase diff --git a/docs/source/advanced/hierarchy/databases/mysql_install.rst b/docs/source/advanced/hierarchy/databases/mysql_install.rst index 4ed15b5ab..497296bbc 100644 --- a/docs/source/advanced/hierarchy/databases/mysql_install.rst +++ b/docs/source/advanced/hierarchy/databases/mysql_install.rst @@ -26,20 +26,14 @@ Red Hat Enterprise Linux perl-DBD-MySQL* mysql-server-5.* mysql-5.* - mysql-devel-5.* - mysql-bench-5.* mysql-connector-odbc-* * MariaDB - Using ``yum``, ensure that the following packages are installed on the management node: :: - mariadb-devel-5.* - mariadb-libs-5.* mariadb-server-5.* - mariadb-bench-5.* mariadb-5.* perl-DBD-MySQL* mysql-connector-odbc-* - unixODBC* Suse Linux Enterprise Server ---------------------------- diff --git a/docs/source/advanced/networks/getadapter.rst b/docs/source/advanced/networks/getadapter.rst index c1ce39e48..38188f486 100644 --- a/docs/source/advanced/networks/getadapter.rst +++ b/docs/source/advanced/networks/getadapter.rst @@ -1,51 +1,42 @@ -Predict network adapter name before deployment +Predict network adapter name during discovery ============================================== +Traditionally, network interfaces in Linux are enumerated as eth[0123…], but +these names do not correspond to actual labels on the chassis. Now, most of +the linux distribution support naming the adapter with slot information which +makes adapter name predictable. xCAT add ``getadapter`` script which can be +run during discovery stage to detect the adapter names and pci slot +information to help customer configure the network. -Traditionally, network interfaces in Linux are enumerated as eth[0123…], but these names do not necessarily correspond to actual labels on the chassis. customer need a methods to get consistent and predictable network device name before provision or network configuration. xCAT provide a tool ``getadapter`` to help customer to resolve this problem. - - -**[Note]** : This feature needs to restart your target sever which you want to obtain network adapter from. - -How to use get adapters +How to use getadapter ----------------------- +Set the chian table to run ``getadapter`` script :: -Using below command to obtain the network adapters information :: - - getadapter + chdef chain="runcmd=getadapter" -Then will get output like below :: +After the discovery completed, the column ``nicsadapter`` of ```nics`` table is +updated. +View result with ``lsdef`` command :: - The whole scan result: - -------------------------------------- - [node2] scan successfully, below are the latest data - node2:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80 - node2:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433 - -------------------------------------- - [node1] scan successfully, below are the latest data - node1:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80 - node1:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433 + # lsdef + ....... + nicsadapter.enP3p3s0f0=mac=98:be:94:59:fa:cc linkstate=DOWN pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.0 candidatename=enP3p3s0f0/enx98be9459facc + nicsadapter.enP3p3s0f1=mac=98:be:94:59:fa:cd linkstate=DOWN pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.1 candidatename=enP3p3s0f1/enx98be9459facd + nicsadapter.enP3p3s0f2=mac=98:be:94:59:fa:ce linkstate=DOWN pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.2 candidatename=enP3p3s0f2/enx98be9459face + nicsadapter.enP3p3s0f3=mac=98:be:94:59:fa:cf linkstate=UP pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.3 candidatename=enP3p3s0f3/enx98be9459facf + ....... +Below are the information ``getadapter`` trying to inspect: -Every node gets a separate section to display its all network adapters information, every network adapter owns single line which start as node name and followed by index and other information. +* **name**: the real adapter name used by genesis operation system -xCAT try its best to collect more information for each network adapter, but can’t guarantee collect same much information for every one. If a network adapter can be derived by xcat genesis, this adapter will have a predictable name, if it can’t be, it only has the information xcat can obtain. - -below are the possible information: - -* **name**: the consistent name which can be used by confignic directly in operating system which follow the same naming scheme with rhels7 - -* **pci**: the pci location +* **pci**: the pci slot location * **mac**: the MAC address -* **candidatename**: All the names which satisfy predictable network device naming scheme, if customer needs to customize their network adapter name, they can choose one of them. (``confignic`` needs to do more work to support this. if customer want to use their own name, xcat should offer a interface to get customer’s input and change this column) +* **candidatename**: All the names which satisfy predictable network device naming scheme, if customer needs to customize their network adapter name, they can choose one of them. (``confignetwork`` needs to do more work to support this. if customer want to use their own name, xcat should offer a interface to get customer’s input and change this column) -* **vendor**: the vender of network device - -* **modle**: the modle of network device - -* **linkstate**: The link state of network device +* **linkstate**: The link state of network device \ No newline at end of file diff --git a/docs/source/advanced/networks/onie_switches/index.rst b/docs/source/advanced/networks/onie_switches/index.rst index 1539acb9b..8c59c6c46 100644 --- a/docs/source/advanced/networks/onie_switches/index.rst +++ b/docs/source/advanced/networks/onie_switches/index.rst @@ -7,6 +7,7 @@ The Open Network Install Environment, or "ONIE" [1]_. is an open source project :maxdepth: 2 os_cumulus/index.rst + os_cumulus/ztp.rst .. [1] Open Network Install Environment: Created by Cumulus Networks, Inc. in 2012, the Open Network Install Environment (ONIE) Project is a small operating system, pre-installed as firmware on bare metal network switches, that provides an environment for automated operating system provisioning. diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/ztp.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/ztp.rst new file mode 100644 index 000000000..b620683e0 --- /dev/null +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/ztp.rst @@ -0,0 +1,91 @@ +Setup ONIE switches with ZTP in large cluster +============================================= + +Zero Touch Provisioning (ZTP) is a feature shipped in many network devices to enable them to be quickly deployed in large-scale environments. In Cumulus OS on ONIE switches with ZTP enabled, the URL of an user provided script can be specified in the DHCP response for the DHCP request trigged by one of the following events: + + * Booting the switch + * Plugging a cable into or unplugging it from the eth0 port + * Disconnecting then reconnecting the switch's power cord. + +the script will be then downloaded and executed on the network device. + +Leveraging the ZTP mechanism, xCAT provides the capability to setup ONIE switches from white-box without touching anything, including Cumulus OS installation, discovery and configuration. Please follow the steps below to setup ONIE switches in the cluster: + +1. Ensure that xCAT is configured with an DHCP open range to detect when new switches request DHCP IPs + + (1). Make sure the network in which the management interface of the ONIE switches are connected has been defined in ``networks`` table :: + + # tabdump networks + #netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable + "172_21_0_0-255_255_0_0","172.21.0.0","255.255.0.0","enP3p3s0d1","","172.21.253.27","172.21.253.27",,,,"172.21.253.100-172.21.253.200",,,,,,,,, + + (2). Prepare the DHCP configuration for ONIE switches setup + + Add the management node's NIC facing the ONIE switches' management interface to the ``site.dhcpinterfaces`` :: + + chdef -t site -p dhcpinterfaces=enP3p3s0d1 + + Add dynamic range for the temporary IP addresses used in the OS provision and discovery of ONIE switches :: + + chdef -t network 172_21_0_0-255_255_0_0 dynamicrange="172.21.253.100-172.21.253.200" + + Update DHCP configuration file :: + + makedhcp -n + +2. Predefine ONIE switches according to the network plan :: + + mkdef mid05tor10 --template onieswitch ip=172.21.205.10 switch=mgmtsw01 switchport=10 + + ``ip`` is the IP address of the management interface of the ONIE switch + + ``switch`` is the core switch to which the management interface of ONIE switch is connected. + + ``switchport`` is the port on the core switch to which the management interface of ONIE switch is connected. + +3. Add the predefined switches into ``/etc/hosts`` :: + + makehosts mid05tor10 + +4. [If the Cumulus OS have been installed on the ONIE switches, please skip this step] Prepare the Cumulus installation image, ``/install/onie/onie-installer`` is the hard-coded path of the Cumulus installation image, or the link to the Cumulus installation image on the management node :: + + mkdir -p /install/onie/ + cp /install/custom/sw_os/cumulus/cumulus-linux-3.1.0-bcm-armel.bin /install/onie/ + ln -s /install/onie/cumulus-linux-3.1.0-bcm-armel.bin /install/onie/onie-installer + +5. Plug the ONIE switches into the cluster according to the network plan and power on them. + + For the white-box ONIE switches, the Cumulus OS will be installed, then the switches will be discovered and configured automaticaly, the whole process will take about 1 hour. + + For the ONIE switches already with Cumulus OS installed, please make sure the ZTP have been enabled and none of the following manual configuration have been made: + + * Password changes + * Users and groups changes + * Packages changes + * Interfaces changes + * The presence of an installed license + + Otherwise, please run ``ztp -R`` on the switches to reset the ZTP state before switch boot up for setup. The whole setup process will take about 1-2 minutes. + +6. The switch definition in xCAT will be updated when the switch is configured :: + + # lsdef mid05tor10 + Object name: mid05tor10 + arch=armv7l + groups=switch + ip=172.21.205.10 + mac=xx:xx:xx:xx:xx:xx + mgt=switch + netboot=onie + nodetype=switch + postbootscripts=otherpkgs + postscripts=syslog,remoteshell,syncfiles + serial=11S01FT690YA50YD73EACH + status=configured + statustime=06-22-2017 23:14:14 + supportedarchs=armv7l + switch=mgmtsw01 + switchport=10 + switchtype=Edgecore Networks Switch + + ``status=configured`` indicates that the switch has been discovered and configured. diff --git a/docs/source/conf.py b/docs/source/conf.py index b5b6350b3..270e99067 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -95,7 +95,6 @@ exclude_patterns = ['guides/install-guides/common_sections.rst', '**ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst', '**ppc64le/discovery/pbmc_discovery_with_lsslp.rst', '**ppc64le/discovery/schedule_environment.rst', - '**ppc64le/discovery/standard_cn_definition.rst', '**ppc64le/diskless/customize_image/cfg_partition.rst', '**ppc64le/diskless/customize_image/raid_cfg.rst', #'**chain/create_image_for_runimage.rst' diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network.rst deleted file mode 100644 index e11d21d67..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network.rst +++ /dev/null @@ -1,10 +0,0 @@ -Advanced Networking Configuration - confignetwork -================================================= - -**Note:** ``confignetwork`` postscript is only supported on RHEL releases. - -.. toctree:: - :maxdepth: 2 - -.. include:: ../../../common/deployment/cfg_network_vlan.rst -.. include:: ../../../common/deployment/cfg_network_bond.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network_bond.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network_bond.rst deleted file mode 100644 index b4c31a981..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network_bond.rst +++ /dev/null @@ -1,58 +0,0 @@ -Configure Two Bonded Adapters ------------------------------ - -The following example set the xCAT properties for compute node ``cn1`` to create: - - * Compute node ``cn1`` has two physical NICs: eth2 and eth3 - * Bond eth2 and eth3 as ``bond0`` - * Assign ip ``40.0.0.1`` to the bonded interface ``bond0`` - -Define attributes in the ``nics`` table -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -#. Using the ``mkdef`` or ``chdef`` commands - - a. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` :: - - chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet - - b. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` :: - - chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3" - chdef cn1 nicips.bond0=40.0.0.1 - -Add network object into the networks table -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the ``chdef`` command to add/modify the networks in the ``networks`` table :: - - chdef -t network net40 net=40.0.0.0 mask=255.0.0.0 - chdef cn1 nicnetworks.bond0=net40 - -Add ``confignetwork`` into the node's postscripts list -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use command below to add ``confignetwork`` into the node's postscripts list :: - - chdef cn1 -p postscripts=confignetwork - - -During OS deployment on compute node, ``confignetwork`` postscript will be executed. -If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node:: - - updatenode cn1 -P confignetwork - - -Verify bonding mode -~~~~~~~~~~~~~~~~~~~ - -Login to compute node cn1 and check bonding options in ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file :: - - BONDING_OPTS="mode=802.3ad xmit_hash_policy=layer2+3" - - -* ``mode=802.3ad`` requires additional configuration on the switch. -* ``mode=2`` can be used for bonding without additional switch configuration. - -If changes are made to ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file, restart network service. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network_vlan.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network_vlan.rst deleted file mode 100644 index 3ddd9606f..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_network_vlan.rst +++ /dev/null @@ -1,109 +0,0 @@ -Configure BOND, VLAN and BRIDGES --------------------------------- - -The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support VLAN, BONDs, and BRIDGES. In order for the ``confignetwork`` postscript to run successfully, the following attributes must be configured for the node in the ``nics`` table: - - * ``nicips`` - * ``nictypes`` - * ``nicnetworks`` - * ``nicdevices`` - resolves the relationship among the physical network interface devices - -The following example set the xCAT properties for compute node ``cn1`` to achieve the following network configuration using the ``confignetwork`` postscript: - - * Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` - * Bond ``eth2`` and ``eth3`` as ``bond0`` - * From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2`` - * Make bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1) - * Make bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1) - -Define attributes in the ``nics`` table -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Chose one of two methods described below: - -#. Using the ``mkdef`` or ``chdef`` commands - - a. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` :: - - chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet - - b. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` :: - - chdef cn1 nictypes.bond0=bond \ - nicdevices.bond0="eth2|eth3" - - c. From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2`` :: - - chdef cn1 nictypes.bond0.1=vlan \ - nictypes.bond0.2=vlan \ - nicdevices.bond0.1=bond0 \ - nicdevices.bond0.2=bond0 - - d. Create bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1) :: - - chdef cn1 nictypes.br1=bridge \ - nicdevices.br1=bond0.1 \ - nicips.br1=10.0.0.1 \ - nicnetworks.br1="net10" - - e. Create bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1) :: - - chdef cn1 nictypes.br2=bridge \ - nicdevices.br2=bond0.2 \ - nicips.br2=20.0.0.1 \ - nicnetworks.br2="net20" - -#. Using an xCAT stanza file - - - Prepare a stanza file ``.stanza`` with content similiar to the following: :: - - # - cn1: - objtype=node - arch=x86_64 - groups=kvm,vm,all - nicdevices.br1=bond0.1 - nicdevices.br2=bond0.2 - nicdevices.bond0.1=bond0 - nicdevices.bond0.2=bond0 - nicdevices.bond0=eth2|eth3 - nictypes.eth2=ethernet - nictypes.eth3=ethernet - nictypes.bond0=bond - nictypes.bond0.1=vlan - nictypes.bond0.2=vlan - nictypes.br1=bridge - nictypes.br2=bridge - nicips.br1=10.0.0.1 - nicips.br2=20.0.0.1 - nicnetworks.br1=net10 - nicnetworks.br2=net20 - - - Using the ``mkdef -z`` option, define the stanza file to xCAT: :: - - cat .stanza | mkdef -z - -Define the additional networks to xCAT -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If this is a new network being created on the compute nodes, an entry needs to be created into the xCAT database. - -The ``nicnetworks`` attribute only defines the nic that uses the IP address. -Other information about the network should be defined in the ``networks`` table. - -Use the ``chdef`` command to add/modify the networks in the ``networks`` table :: - - chdef -t network net10 net=10.0.0.0 mask=255.0.0.0 - chdef -t network net20 net=20.0.0.0 mask=255.0.0.0 - -Add ``confignetwork`` into the node's postscripts list -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the following command to add ``confignetwork`` into postscript list to execute on reboot: :: - - chdef cn1 -p postscripts=confignetwork - -If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node:: - - updatenode cn1 -P confignetwork - diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_aliases.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_aliases.rst new file mode 100644 index 000000000..92d98cb0d --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_aliases.rst @@ -0,0 +1,63 @@ +Configure Aliases +----------------- + +The following example sets the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` with one physical NIC: ``eth2`` + * User wants to configure aliases ``aliases1-1`` and ``aliases1-2`` + * Assign ip ``11.1.0.100`` to ``aliases1-1`` and ``12.1.0.100`` to ``aliases1-2`` + +Add network object into the networks table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add/modify the networks in the ``networks`` table :: + + chdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 + chdef -t network -o 12_1_0_0-255_255_0_0 net=12.1.0.0 mask=255.255.0.0 + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +#. Compute node ``cn1`` has one physical NICs: ``eth2`` :: + + chdef cn1 nictypes.eth2=ethernet + +#. Define ``nicips``, ``nicaliases``, ``nichostnamesuffixes`` :: + + chdef cn1 nicips.eth2="11.1.0.100|12.1.0.100" nicaliases.eth2="aliases1-1|aliases1-2" nichostnamesuffixes.eth2="-eth2|-eth2-1" + +#. Define ``nicnetworks`` :: + + chdef cn1 nicnetworks.eth2="11_1_0_0-255_255_0_0|12_1_0_0-255_255_0_0" + +Update /etc/hosts +~~~~~~~~~~~~~~~~~ + +#. Update the ``/etc/hosts`` file :: + + makehosts cn1 + +#. Check the ``/etc/hosts`` file :: + + 11.1.0.100 cn1-eth2 cn1-eth2.cluster.com aliases1-1 + 12.1.0.100 cn1-eth2-1 cn1-eth2-1.cluster.com aliases1-2 + +Enable ``confignetwork`` to configure aliases +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Add ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node :: + + chdef cn1 -p postscripts=confignetwork + +#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript :: + + updatenode cn1 -P confignetwork + +Check the result +~~~~~~~~~~~~~~~~ + +Check if eth2 is configured correctly :: + + xdsh cn1 "ip addr show eth2" + diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond.rst new file mode 100644 index 000000000..0ed1084d4 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond.rst @@ -0,0 +1,53 @@ +Configure Bond using two Ethernet Adapters +------------------------------------------ + +The following example sets the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` with two physical NICs: ``eth2`` and ``eth3`` + * Bond eth2 and eth3 as ``bond0`` + * Assign ip ``40.0.0.1`` to the bonded interface ``bond0`` + +Add network object into the networks table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the network ``net40`` in the ``networks`` table :: + + chdef -t network net40 net=40.0.0.0 mask=255.0.0.0 + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` :: + + chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet + +#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` :: + + chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3" + chdef cn1 nicips.bond0=40.0.0.1 + +#. Define ``nicnetworks`` for ``bond0`` :: + + chdef cn1 nicnetworks.bond0=net40 + +Enable ``confignetwork`` to configure bond +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. If adding ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node :: + + chdef cn1 -p postscripts=confignetwork + +#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript :: + + updatenode cn1 -P confignetwork + +Verify bonding mode +~~~~~~~~~~~~~~~~~~~ + +Login to compute node cn1 and check bonding options in ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file :: + + BONDING_OPTS="mode=802.3ad xmit_hash_policy=layer2+3" + + +* ``mode=802.3ad`` requires additional configuration on the switch. +* ``mode=2`` can be used for bonding without additional switch configuration. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_bridge.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_bridge.rst new file mode 100644 index 000000000..fec33c383 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_bridge.rst @@ -0,0 +1,75 @@ +Configure Bridge Based on Bond Adapters +--------------------------------------- + +The following example sets the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` with two physical NICs: ``eth2`` and ``eth3`` + * Bond eth2 and eth3 as ``bond0`` + * Create bridge ``br0`` based on ``bond0`` + * Assign ip ``40.0.0.1`` to the bridge interface ``br0`` + +Add network object into the networks table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add/modify network data in the ``networks`` table :: + + chdef -t network net40 net=40.0.0.0 mask=255.0.0.0 + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` :: + + chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet + +#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` :: + + chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3" + +#. Define ``br0`` based on ``bond0`` :: + + chdef cn1 nicips.br0=40.0.0.1 nictypes.br0=bridge + +#. Define ``nicnetworks`` for ``br0`` :: + + chdef cn1 nicnetworks.br0=net40 + +Enable ``confignetwork`` to configure bridge +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. If adding ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node :: + + chdef cn1 -p postscripts=confignetwork + +#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript :: + + updatenode cn1 -P confignetwork + +Verify bridge +~~~~~~~~~~~~~ + +Login to compute node cn1 and check bonding options in ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file :: + + DEVICE="bond0" + BOOTPROTO="none" + NAME="bond0" + BONDING_MASTER="yes" + ONBOOT="yes" + USERCTL="no" + TYPE="Bond" + BONDING_OPTS="mode=802.3ad miimon=100" + DHCLIENTARGS="-timeout 200" + BRIDGE=br0 + +Check ``ifcfg-br0`` under ``/etc/sysconfig/network-scripts/`` :: + + DEVICE="br0" + BOOTPROTO="static" + IPADDR="40.0.0.1" + NETMASK="255.0.0.0" + NAME="br0" + ONBOOT="yes" + STP="on" + TYPE="Bridge" + +Use ``ip addr`` command to check if ``br0`` and ``bond0`` are correct. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_vlan.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_vlan.rst new file mode 100644 index 000000000..84130a096 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_vlan.rst @@ -0,0 +1,61 @@ +Configure VLAN Based on Bond Adapters +------------------------------------- + +The following example sets the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` with two physical NICs: ``eth2`` and ``eth3`` + * Bond eth2 and eth3 as ``bond0`` + * Create bridge ``bond0.1`` based on ``bond0`` + * Assign ip ``40.0.0.1`` to the bridge interface ``bond0.1`` + +Add network object into the networks table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add/modify the network ``net40`` in the ``networks`` table :: + + chdef -t network net40 net=40.0.0.0 mask=255.0.0.0 + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` :: + + chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet + +#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` :: + + chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3" + +#. Define VLAN ``bond0.1`` based on ``bond0`` :: + + chdef cn1 nicips.bond0.1=40.0.0.1 nictypes.bond0.1=vlan + +#. Define ``nicnetworks`` for ``bond0.1`` :: + chdef cn1 nicnetworks.bond0.1=net40 + +Enable ``confignetwork`` to configure bridge +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. If adding ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node :: + + chdef cn1 -p postscripts=confignetwork + +#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript :: + + updatenode cn1 -P confignetwork + +Verify VLAN +~~~~~~~~~~~ + +Login to compute node cn1 and check ``ifcfg-bond0.1`` under ``/etc/sysconfig/network-scripts/`` :: + + DEVICE="bond0.1" + BOOTPROTO="static" + IPADDR="40.0.0.1" + NETMASK="255.0.0.0" + NAME="bond0.1" + ONBOOT="yes" + USERCTL=no + VLAN=yes + +Use ``ip addr`` command to check if ``br0`` and ``bond0`` are correct. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_vlan_bridge.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_vlan_bridge.rst new file mode 100644 index 000000000..317946682 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bond_vlan_bridge.rst @@ -0,0 +1,77 @@ +Configure BOND, VLAN and BRIDGES +-------------------------------- + +The following example set the xCAT properties for compute node ``cn1`` to achieve the following network configuration using the ``confignetwork`` postscript: + + * Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` + * Bond ``eth2`` and ``eth3`` as ``bond0`` + * From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2`` + * Make bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1) + * Make bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1) + +Define the additional networks to xCAT +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If this is a new network being created on the compute nodes, an entry needs to be created into the xCAT database. + +The ``nicnetworks`` attribute only defines the nic that uses the IP address. +Other information about the network should be defined in the ``networks`` table. + +Add/modify the networks in the ``networks`` table :: + + chdef -t network net10 net=10.0.0.0 mask=255.0.0.0 + chdef -t network net20 net=20.0.0.0 mask=255.0.0.0 + + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` :: + + chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet + +#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` :: + + chdef cn1 nictypes.bond0=bond \ + nicdevices.bond0="eth2|eth3" + +#. From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2`` :: + + chdef cn1 nictypes.bond0.1=vlan \ + nictypes.bond0.2=vlan \ + nicdevices.bond0.1=bond0 \ + nicdevices.bond0.2=bond0 + +#. Create bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1) :: + + chdef cn1 nictypes.br1=bridge \ + nicdevices.br1=bond0.1 \ + nicips.br1=10.0.0.1 \ + nicnetworks.br1="net10" + +#. Create bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1) :: + + chdef cn1 nictypes.br2=bridge \ + nicdevices.br2=bond0.2 \ + nicips.br2=20.0.0.1 \ + nicnetworks.br2="net20" + +Add ``confignetwork`` into the node's postscripts list +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Use the following command to add ``confignetwork`` into postscript list to execute on reboot: :: + + chdef cn1 -p postscripts=confignetwork + +#. If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node:: + + updatenode cn1 -P confignetwork + +Check result +~~~~~~~~~~~~ + +Use ``ip`` command on ``cn1`` to check all NICs :: + + xdsh cn1 "ip addr" + +Check all network configuration files under ``/etc/sysconfig/network-scripts/``. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bridge.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bridge.rst new file mode 100644 index 000000000..02c0a1075 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_bridge.rst @@ -0,0 +1,56 @@ +Configure Bridge Based On Ethernet NIC +-------------------------------------- + +The following example set the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` has one physical NIC: eth1 + * User wants to confgure 1 bridge br1 based on eth1 + * Assign ip ``30.5.106.9`` to br0 + +Add network object into the networks table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add/modify the network ``net30`` in the ``networks`` table :: + + chdef -t network net30 net=30.0.0.0 mask=255.0.0.0 + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Compute node ``cn1`` has one physical NIC: ``eth1`` :: + + chdef cn1 nictypes.eth1=ethernet + +#. Define bridge ``br1`` based on ``eth1`` :: + + chdef cn1 nictypes.br1=bridge nicdevices.br1="eth1" + chdef cn1 nicips.br1=30.5.106.9 + +#. Define ``nicnetworks`` for ``br1`` :: + + chdef cn1 nicnetworks.br1=net30 + +Enable ``confignetwork`` to configure bridge +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. If add ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node :: + + chdef cn1 -p postscripts=confignetwork + +#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript :: + + updatenode cn1 -P confignetwork + +Verify Bridge +~~~~~~~~~~~~~ + +Login to compute node cn1 and check configure files in ``ifcfg-br1`` under ``/etc/sysconfig/network-scripts/`` :: + + TYPE=Bridge + STP=on + +Check ``ifcfg-eth1`` under ``/etc/sysconfig/network-scripts/`` :: + + BRIDGE=br1 + +Use ``ip addr`` command to check if ``br1``, ``eth0.6`` and ``eth0.7`` are correct. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_custom_scripts.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_custom_scripts.rst new file mode 100644 index 000000000..8b352f3f3 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_custom_scripts.rst @@ -0,0 +1,30 @@ +Use Customized Scripts To Configure NIC +--------------------------------------- + +If using customized script to configure NIC, ``niccustomscripts`` for the specified nic in ``nics`` table should be configured. In the customized scripts, it can use data from xCAT DB, These data are parsed as global value from ``/xcatpost/mypostscript`` in compute node. Here is a simple example : + + #. Compute node ``cn1`` with one physical NIC: ``eth1`` + #. Put customized script ``cfgeth1`` under xCAT MN ``/install/postscripts`` + #. Configure ``niccustomscripts`` in ``nics`` table :: + chdef cn1 niccustomscripts.eth1=cfgeth1 + + #. The script ``cfgeth1`` uses data from xCAT DB, for example, it uses network ``net50`` from ``networks`` table :: + + chdef -t network net50 net=50.0.0.0 mask=255.0.0.0 + + **Notes:** The network ``net50`` is parsed as ``NETWORKS_LINE1`` in ``/xcatpost/mypostscript`` as following, so script ``cfgeth1`` can use global value ``NETWORKS_LINE1`` directly :: + + NETWORKS_LINE1='netname=net50||net=50.0.0.0||mask=255.0.0.0||mgtifname=||gateway=||dhcpserver=||tftpserver=||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments=' + + #. When ``confignetwork`` is running in ``cn1``, ``confignetwork`` will execute ``cfgeth1`` to configure eth1, so adding ``confignetwork`` into the node's postscripts list. During OS deployment on compute node, ``confignetwork`` postscript will be executed. :: + + chdef cn1 -p postscripts=confignetwork + + #. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node:: + + updatenode cn1 -P confignetwork + + #. Use ``xdsh cn1 "ip addr show eth1"`` to check the NIC + + #. Check ``ifcfg-eth1`` under ``/etc/sysconfig/network-scripts/`` + diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_ethernet_nic.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_ethernet_nic.rst new file mode 100644 index 000000000..5e5755deb --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_ethernet_nic.rst @@ -0,0 +1,76 @@ +Configure Ethernet Network Interface +------------------------------------ + +The following example sets the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` with two physical NICs: ``eth0`` and ``eth1`` + * Management network is ``11.1.89.0``, application network is ``13.1.89.0`` + * The install NIC is eth0, and application NIC is eth1 + * Assign static ip ``11.1.89.7/24`` to eth0 + * Assign static ip ``13.1.89.7/24`` to eth1 + +Add/update networks into the xCAT DB +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add/update additional networks ``net11`` and ``net13`` into ``networks`` table:: + + chdef -t network net11 net=11.1.89.0 mask=255.255.255.0 + chdef -t network net13 net=13.1.89.0 mask=255.255.255.0 + +**Note:** MTU can be customized as ``mtu`` in ``networks`` table for specified network. + +Define Adapters in the nics table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Provision ip is coming from DHCP, there is no need to configure install nic into ``nics`` table. Provision ip can be configured in node definition, but it is not required. :: + + chdef cn1 ip=11.1.89.7 + +#. Data NIC ``eth1`` is not install NIC, configure ``eth1`` into ``nics`` table :: + + chdef cn1 nicips.eth1="13.1.89.7" nicnetworks.eth1="net13" nictypes.eth1="Ethernet" nichostnamesuffixes.eth1=-eth2 + +Update /etc/hosts +~~~~~~~~~~~~~~~~~ + +#. Run the ``makehosts`` command to add the new configuration to the ``/etc/hosts`` file. :: + + makehosts cn1 + +#. Check ``/etc/hosts`` :: + + cat /etc/hosts + 11.1.89.7 cn1 cn1.cluster.com + 13.1.89.7 cn1-eth1 cn1-eth1.cluster.com + +Configure adapters with static IPs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Execute ``confignetwork -s`` to configure both provision ip ``11.1.89.7`` and application data ip ``13.1.89.7`` as static + + a. Add ``confignetwork -s`` into postscript list to execute on reboot :: + + chdef cn1 -p postscripts="confignetwork -s" + + b. If the compute node is already running, use ``updatenode`` command to run ``confignetwork -s`` postscript without rebooting the node :: + + updatenode cn1 -P "confignetwork -s" + +#. If install NIC is not configured in ``nics`` table, and only configure all other NIC's data defined in ``nics`` table, execute ``confignetwork`` without ``-s`` + + a. Add ``confignetwork`` into postscript list to execute on reboot :: + + chdef cn1 -p postscripts="confignetwork" + + b. If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node :: + + updatenode cn1 -P "confignetwork" + +**Notes:** Option "-s" writes the install NIC's information into configuration file for persistence. All other NIC's data defined in ``nics`` table will be written also. Without option "-s", ``confignetwork`` only configures all NIC's data defined in ``nics`` table. + +Check result +~~~~~~~~~~~~ + +#. Use ``xdsh cn1 "ip addr"`` to check ``eth0`` and ``eth1`` + +#. Check ``ifcfg-eth0`` and ``ifcfg-eth1`` under ``/etc/sysconfig/network-scripts/`` diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst new file mode 100644 index 000000000..74e33d59e --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst @@ -0,0 +1,21 @@ +Use Extra Parameters In NIC Configuration File +---------------------------------------------- + +Use ``nicextraparams`` to customize attributes in NIC configuration file. For example : + + #. Compute node ``cn1`` with one physical NIC: ``eth1`` + #. Configure network into ``networks`` table, configure ``nicips``, ``nictypes`` and ``nicnetworks`` in ``nics`` table, like :doc:`Configure Ethernet Network Interface` + #. In order to customize "MTU=1456 ONBOOT=no" for eth1. configure ``nicips``, ``nictypes`` and ``nicnetworks`` in ``nics`` table , also need to configure ``nicextraparams`` as following:: + + chdef cn1 nicextraparams.eth1="MTU=1456 ONBOOT=no" + + #. After ``confignetwork`` is executed in ``cn1``, ``nicexraparams`` will overwrite the original value in ``/etc/sysconfig/network-scripts/ifcfg-eth1`` as :: + + DEVICE=eth1 + IPADDR=13.1.89.7 + NETMASK=255.255.255.0 + BOOTPROTO=static + ONBOOT=no + HWADDR=42:f5:0a:05:6a:09 + MTU=1456 + diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_vlan.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_vlan.rst new file mode 100644 index 000000000..41ed6a0a9 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_vlan.rst @@ -0,0 +1,52 @@ +Configure VLAN Based on Ethernet Adapter +---------------------------------------- + +The following example set the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` has one physical NIC: eth0 + * Confgure 2 vlans: eth0.6 and eth0.7 based on eth0 + * Assign ip ``60.5.106.9`` to eth0.6 and ``70.5.106.9`` to eth0.7 + +Define the additional networks to xCAT +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add/modify the networks ``net60`` and ``net70`` in the ``networks`` table :: + + chdef -t network net60 net=60.0.0.0 mask=255.0.0.0 + chdef -t network net70 net=70.0.0.0 mask=255.0.0.0 + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Compute node ``cn1`` has one physical NIC: ``eth0`` :: + + chdef cn1 nictypes.eth0=ethernet + +#. Define vlan ``eth0.6`` and ``eth0.7`` based on ``eth0`` :: + + chdef cn1 nictypes.eth0.6=vlan nicdevices.eth0.6="eth0" nictypes.eth0.7=vlan nicdevices.eth0.7="eth0" + chdef cn1 nicips.eth0.6=60.5.106.9 nicips.eth0.7=70.5.106.9 + +#. Define ``nicnetworks`` for ``eth0.6`` and ``eth0.7`` :: + + chdef cn1 nicnetworks.eth0.6=net60 nicnetworks.eth0.7=net70 + +Enable ``confignetwork`` to configure VLAN +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Add ``confignetwork`` into postscript list to execute on reboot :: + + chdef cn1 -p postscripts=confignetwork + +#. If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node :: + + updatenode cn1 -P confignetwork + +Verify VLAN +~~~~~~~~~~~ + +Login to compute node cn1 and check VLAN options in ``ifcfg-eth0.6`` and ``ifcfg-eth0.7`` under ``/etc/sysconfig/network-scripts/`` :: + + VLAN=yes + +Use ``ip addr`` command to check if ``eth0.6`` and ``eth0.7`` are there. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_vlan_bridge.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_vlan_bridge.rst new file mode 100644 index 000000000..ebbf9fa12 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_vlan_bridge.rst @@ -0,0 +1,63 @@ +Configure Bridge Based on VLAN +------------------------------ + +The following example set the xCAT properties for compute node ``cn1`` to create: + + * Compute node ``cn1`` has one physical NIC: eth0 + * Define 2 vlans: eth0.6 and eth0.7 based on eth0 + * Define 2 bridge br1 and br2 + * Assign ip ``60.5.106.9`` to br1 and ``70.5.106.9`` to br2 + +Define attributes in the ``nics`` table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Using the ``mkdef`` or ``chdef`` commands + + a. Compute node ``cn1`` has one physical NIC: ``eth0`` :: + + chdef cn1 nictypes.eth0=ethernet + + b. Define vlan ``eth0.6`` and ``eth0.7`` based on ``eth0`` :: + + chdef cn1 nictypes.eth0.6=vlan nicdevices.eth0.6="eth0" nictypes.eth0.7=vlan nicdevices.eth0.7="eth0" + + c. Define bridge ``br1`` and ``br2`` :: + + chdef cn1 nicips.br1=60.5.106.9 nicips.br2=70.5.106.9 nictypes.br1=bridge nictypes.br2=bridge + +Add network object into the networks table +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the ``chdef`` command to add/modify the networks in the ``networks`` table :: + + chdef -t network net60 net=60.0.0.0 mask=255.0.0.0 + chdef -t network net70 net=70.0.0.0 mask=255.0.0.0 + chdef cn1 nicnetworks.br1=net60 nicnetworks.br2=net70 + +Add ``confignetwork`` into the node's postscripts list +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use command below to add ``confignetwork`` into the node's postscripts list :: + + chdef cn1 -p postscripts=confignetwork + + +During OS deployment on compute node, ``confignetwork`` postscript will be executed. +If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node:: + + updatenode cn1 -P confignetwork + +Verify Bridge +~~~~~~~~~~~~~ + +Login to compute node cn1 and check ``ifcfg-br1`` and ``ifcfg-br2`` under ``/etc/sysconfig/network-scripts/`` like :: + + BOOTPROTO="static" + IPADDR="60.5.106.9" + NETMASK="255.0.0.0" + NAME="br1" + ONBOOT="yes" + STP="on" + TYPE="Bridge" + +Use ``ip addr`` command to check if ``br1``, ``br2``, ``eth0.6`` and ``eth0.7``. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_second_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_second_adapter.rst similarity index 97% rename from docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_second_adapter.rst rename to docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_second_adapter.rst index ca1da9738..8e4fda2c1 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_second_adapter.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_second_adapter.rst @@ -1,5 +1,5 @@ -Configure Additional Network Interfaces - confignics -==================================================== +Configure Additional Network Interfaces old version - confignics - (deprecated) +=============================================================================== The **nics** table and the **confignics** postscript can be used to automatically configure additional network interfaces (multiple ethernets adapters, InfiniBand, etc) on the nodes as they are being deployed. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/use_kernel_patch.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/use_kernel_patch.rst new file mode 100644 index 000000000..6ad4b7782 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/use_kernel_patch.rst @@ -0,0 +1,24 @@ +Use new kernel patch +==================== + +This procedure assumes there are kernel RPM in /tmp, we take the osimage **rhels7.3-ppc64le-install-compute** as an example. +The RPM names below are only examples, substitute your specific level and architecture. + +* **[RHEL]** + +#. The RPM kernel package is usually named: kernel-.rpm. Append new kernel packages directory to osimage pkgdir :: + + mkdir -p /install/kernels/ + cp /tmp/kernel-*.rpm /install/kernels/ + createrepo /install/kernels// + chdef -t osimage rhels7.3-ppc64le-install-compute -p pkgdir=/install/kernels/ + +#. Inject the drivers from the new kernel RPMs into the initrd :: + + mkdef -t osdistroupdate kernelupdate dirpath=/install/kernels// + chdef -t osimage rhels7.3-ppc64le-install-compute osupdatename=kernelupdate + chdef -t osimage rhels7.3-ppc64le-install-compute netdrivers=updateonly + genitrd rhels7.3-ppc64le-install-compute --ignorekernelchk + nodeset osimage=rhels7.3-ppc64le-install-compute --noupdateinitrd + +#. Boot CN from net normallly. diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/configure/networks.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/configure/networks.rst index 3bacd82b5..7d10ecd29 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/configure/networks.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/configure/networks.rst @@ -45,6 +45,10 @@ Configure DHCP to listen on different network interfaces [**Optional**] To set "eth1" and "eth3" on the management node and "bond0" on all nodes in the nodegroup="service", set ``dhcpinterfaces`` using: :: + chdef -t site dhcpinterfaces="eth1,eth3;service|bond0" + + or, to explicitly identify the management node with hostname ``xcatmn``: :: + chdef -t site dhcpinterfaces="xcatmn|eth1,eth3;service|bond0" **noboot** diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst index fbb43f7c6..7ec0f41cf 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst @@ -31,35 +31,41 @@ For more information about chain, refer to :doc:`Chain <../../../../../advanced/ Initialize the discovery process ```````````````````````````````` -Specify the predefined nodes to the nodediscoverstart command to initialize the discovery process:: +Specify the predefined nodes to the `nodediscoverstart` command to initialize the discovery process:: nodediscoverstart noderange=cn1 -See "nodediscoverstart man page" for more details. +See :doc:`nodediscoverstart ` for more information. Display information about the discovery process ``````````````````````````````````````````````` -There are additional nodediscover commands you can run during the discovery process. See their man pages for more details. +There are additional `nodediscover*` commands you can run during the discovery process. See the man pages for more details. -Verify the status of discovery:: +Verify the status of discovery using :doc:`nodediscoverstatus `:: nodediscoverstatus -Show the nodes that have been discovered so far:: +Show the nodes that have been discovered using :doc:`nodediscoverls `:: nodediscoverls -t seq -l -Stop the current sequential discovery process:: +Stop the current sequential discovery process using: :doc:`nodediscoverstop `:: nodediscoverstop -Note: The sequential discovery process will be stopped automatically when all of the node names in the node pool are used up. + +**Note:** The sequential discovery process will stop automatically when all of the node names in the pool are consumed. Start discovery process ----------------------- To start the discovery process, the system administrator needs to power on the servers one by one manually. Then the hardware discovery process will start automatically. -.. include:: standard_cn_definition.rst +Verify Node Definition +---------------------- + +After discovery of the node, properties of the server will be added to the xCAT node definition. + +Display the node definition and verify that the MAC address has been populated. diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/standard_cn_definition.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/standard_cn_definition.rst deleted file mode 100644 index 6230e8488..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/standard_cn_definition.rst +++ /dev/null @@ -1,25 +0,0 @@ -Verify node definition ----------------------- - -The following is an example of the server node definition after hardware discovery:: - - # lsdef cn1 - Object name: cn1 - arch=ppc64 - bmc=50.0.100.1 - cons=ipmi - cpucount=192 - cputype=POWER8E (raw), altivec supported - groups=powerLE,all - installnic=mac - ip=10.0.101.1 - mac=6c:ae:8b:02:12:50 - memory=65118MB - mgt=ipmi - mtm=8247-22L - netboot=petitboot - postbootscripts=otherpkgs - postscripts=syslog,remoteshell,syncfiles - primarynic=mac - serial=10112CA - supportedarchs=ppc64 diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network.rst deleted file mode 100644 index 27d35cf7d..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../../common/deployment/cfg_network.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network_adapter.rst deleted file mode 100644 index e68b5756f..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network_adapter.rst +++ /dev/null @@ -1,8 +0,0 @@ -Customize network adapter -========================= - -.. toctree:: - :maxdepth: 2 - - cfg_second_adapter.rst - cfg_network.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_second_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_second_adapter.rst deleted file mode 100644 index 097b8010d..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_second_adapter.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. include:: ../../../common/deployment/cfg_second_adapter.rst - diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/index.rst index 5b0cecea4..059b0ef6c 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/index.rst @@ -11,6 +11,7 @@ Optional means all the subitems in this page are not necessary to finish an OS d pre_post_script.rst syncfile.rst additional_pkg.rst - cfg_network_adapter.rst + use_kernel_patch.rst + network/index.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_network_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_network_adapter.rst new file mode 100644 index 000000000..72631fe6b --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_network_adapter.rst @@ -0,0 +1,42 @@ +Configure Additional Network Interfaces - confignetwork +------------------------------------------------------- + +The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES. ``confignetwork`` can be used in postscripts during OS privision, it can also be executed in ``updatenode``. The way the ``confignetwork`` postscript decides what IP address to give the secondary adapter is by checking the ``nics`` table, in which the nic configuration information is stored. In order for the ``confignetwork`` postscript to run successfully, the following attributes must be configured for the node in the ``nics`` table: + + * ``nicips`` + * ``nictypes`` + * ``nicnetworks`` + +If configuring VLAN, BOND, or BRIDGES, ``nicdevices`` in ``nics`` table must be configured. VLAN, BOND or BRIDGES is only supported on RHEL. + + * ``nicdevices`` - resolves the relationship among the physical network interface devices + +The following scenarios are examples to configure Ethernet adapters/BOND/VLAN/Bridge. + + #. Configure Ethernet adapters: + + * Scenario 1: :doc:`Configure Ethernet Network Interface <../../../../common/deployment/network/cfg_network_ethernet_nic>` + To configure Ethernet install NIC or other Ethernet network adapters as static + + #. Configure BOND **[RHEL]**: + + * Scenario 2: :doc:`Configure Bond using two Ethernet Adapters <../../../../common/deployment/network/cfg_network_bond>` + + #. Configure VLAN **[RHEL]**: + + * Scenario 3: :doc:`Configure VLAN Based on Ethernet Adapter <../../../../common/deployment/network/cfg_network_vlan>` + * Scenario 4: :doc:`Configure VLAN Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_vlan>` + + #. Configure Bridge **[RHEL]**: + + * Scenario 5: :doc:`Configure Bridge Based On Ethernet NIC <../../../../common/deployment/network/cfg_network_bridge>` + * Scenario 6: :doc:`Configure Bridge Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_bridge>` + * Scenario 7: :doc:`Configure Bridge Based on VLAN <../../../../common/deployment/network/cfg_network_vlan_bridge>` + + * Scenario 8: :doc:`Configure Bridge Based on VLAN,VLAN use BOND adapter <../../../../common/deployment/network/cfg_network_bond_vlan_bridge>` + + #. Advanced topics: + + * :doc:`Use Customized Scripts To Configure NIC <../../../../common/deployment/network/cfg_network_custom_scripts>` + * :doc:`Use Extra Parameters In NIC Configuration File <../../../../common/deployment/network/cfg_network_extra_param>` + * :doc:`Configure Aliases <../../../../common/deployment/network/cfg_network_aliases>` diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_second_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_second_adapter.rst new file mode 100644 index 000000000..f5cfbee00 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_second_adapter.rst @@ -0,0 +1,2 @@ +.. include:: ../../../../common/deployment/network/cfg_second_adapter.rst + diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/index.rst new file mode 100644 index 000000000..43286943d --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/index.rst @@ -0,0 +1,10 @@ +Customize network adapter +========================= + +This section describes how to configure network adapters with persistent configuration using xCAT. The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES. + +.. toctree:: + :maxdepth: 1 + + cfg_network_adapter.rst + cfg_second_adapter.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/use_kernel_patch.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/use_kernel_patch.rst new file mode 100644 index 000000000..185ae7105 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/use_kernel_patch.rst @@ -0,0 +1,2 @@ +.. include:: ../../../common/deployment/use_kernel_patch.rst + diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_network.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_network.rst deleted file mode 100644 index 27d35cf7d..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_network.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../../common/deployment/cfg_network.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_network_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_network_adapter.rst deleted file mode 100644 index e68b5756f..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_network_adapter.rst +++ /dev/null @@ -1,8 +0,0 @@ -Customize network adapter -========================= - -.. toctree:: - :maxdepth: 2 - - cfg_second_adapter.rst - cfg_network.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_second_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_second_adapter.rst deleted file mode 100644 index 097b8010d..000000000 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/cfg_second_adapter.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. include:: ../../../common/deployment/cfg_second_adapter.rst - diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/index.rst index c790d1dd3..5d71d4223 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/index.rst @@ -10,7 +10,7 @@ Optional means all the subitems in this page are not necessary to finish an OS d pre_post_script.rst syncfile.rst additional_pkg.rst - cfg_network_adapter.rst + network/index.rst enable_kdump.rst install_new_kernel.rst acc_initrd_rootimg_gen_ppc64le.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_network_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_network_adapter.rst new file mode 100644 index 000000000..72631fe6b --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_network_adapter.rst @@ -0,0 +1,42 @@ +Configure Additional Network Interfaces - confignetwork +------------------------------------------------------- + +The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES. ``confignetwork`` can be used in postscripts during OS privision, it can also be executed in ``updatenode``. The way the ``confignetwork`` postscript decides what IP address to give the secondary adapter is by checking the ``nics`` table, in which the nic configuration information is stored. In order for the ``confignetwork`` postscript to run successfully, the following attributes must be configured for the node in the ``nics`` table: + + * ``nicips`` + * ``nictypes`` + * ``nicnetworks`` + +If configuring VLAN, BOND, or BRIDGES, ``nicdevices`` in ``nics`` table must be configured. VLAN, BOND or BRIDGES is only supported on RHEL. + + * ``nicdevices`` - resolves the relationship among the physical network interface devices + +The following scenarios are examples to configure Ethernet adapters/BOND/VLAN/Bridge. + + #. Configure Ethernet adapters: + + * Scenario 1: :doc:`Configure Ethernet Network Interface <../../../../common/deployment/network/cfg_network_ethernet_nic>` + To configure Ethernet install NIC or other Ethernet network adapters as static + + #. Configure BOND **[RHEL]**: + + * Scenario 2: :doc:`Configure Bond using two Ethernet Adapters <../../../../common/deployment/network/cfg_network_bond>` + + #. Configure VLAN **[RHEL]**: + + * Scenario 3: :doc:`Configure VLAN Based on Ethernet Adapter <../../../../common/deployment/network/cfg_network_vlan>` + * Scenario 4: :doc:`Configure VLAN Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_vlan>` + + #. Configure Bridge **[RHEL]**: + + * Scenario 5: :doc:`Configure Bridge Based On Ethernet NIC <../../../../common/deployment/network/cfg_network_bridge>` + * Scenario 6: :doc:`Configure Bridge Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_bridge>` + * Scenario 7: :doc:`Configure Bridge Based on VLAN <../../../../common/deployment/network/cfg_network_vlan_bridge>` + + * Scenario 8: :doc:`Configure Bridge Based on VLAN,VLAN use BOND adapter <../../../../common/deployment/network/cfg_network_bond_vlan_bridge>` + + #. Advanced topics: + + * :doc:`Use Customized Scripts To Configure NIC <../../../../common/deployment/network/cfg_network_custom_scripts>` + * :doc:`Use Extra Parameters In NIC Configuration File <../../../../common/deployment/network/cfg_network_extra_param>` + * :doc:`Configure Aliases <../../../../common/deployment/network/cfg_network_aliases>` diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_second_adapter.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_second_adapter.rst new file mode 100644 index 000000000..f5cfbee00 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_second_adapter.rst @@ -0,0 +1,2 @@ +.. include:: ../../../../common/deployment/network/cfg_second_adapter.rst + diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/index.rst new file mode 100644 index 000000000..43286943d --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/index.rst @@ -0,0 +1,10 @@ +Customize network adapter +========================= + +This section describes how to configure network adapters with persistent configuration using xCAT. The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES. + +.. toctree:: + :maxdepth: 1 + + cfg_network_adapter.rst + cfg_second_adapter.rst diff --git a/docs/source/guides/admin-guides/references/man1/getadapter.1.rst b/docs/source/guides/admin-guides/references/man1/getadapter.1.rst deleted file mode 100644 index 982fcd4c3..000000000 --- a/docs/source/guides/admin-guides/references/man1/getadapter.1.rst +++ /dev/null @@ -1,121 +0,0 @@ - -############ -getadapter.1 -############ - -.. highlight:: perl - - -**** -NAME -**** - - -\ **getadapter**\ - Obtain all network adapters's predictable name and some other information before provision or network configuration. - - -******** -SYNOPSIS -******** - - -\ **getadapter**\ \ *noderange*\ [\ **-f**\ ] - -\ **getadapter**\ [\ **-h | -**\ **-help | -v | -**\ **-version | -V**\ ] - - -*********** -DESCRIPTION -*********** - - -Traditionally, network interfaces in Linux are enumerated as eth[0123...], but these names do not necessarily correspond to actual labels on the chassis. \ **getadapter**\ help customer to get predictable network device name and some other network adapter information before provision or network configuration. - -\ **getadapter**\ use genesis to collect network adapters information, so that mean it need to restart the target node. - -\ **getadapter**\ For each node within the , follows below scheme: - -If the target node is scanned for the first time, \ **getadapter**\ will trigger genesis to collect information then save the information at the \ **nicsadapter**\ column of nics table. -If the target node has ever been scanned, \ **getadapter**\ will use the information from nics table first. -If user hopes to scan the adapter information for the node but these information already exist, \ **-f**\ option can be used to start rescan process. - -\ **getadapter**\ tries to collect more information for the target network device, but doesn't guarantee collect same much information for every network device. - -Below are the possible information can be collect up to now: -\ **name**\ : the consistent name which can be used by confignic directly in operating system which follow the same naming scheme with rhels7 -\ **pci**\ : the pci location -\ **mac**\ : the MAC address -\ **candidatename**\ : All the names which satisfy predictable network device naming scheme. \ *(if xcat enhance confignic command later, user can use these names to configure their network adapter, even customize their name)*\ -\ **vender**\ : the vender of network device -\ **model**\ : the model of network device -\ **linkstate**\ : the link state of network device - - -******* -OPTIONS -******* - - -\ **-h**\ - -Display usage message. - -\ **-v**\ - -Command Version. - -\ **-V**\ - -Display verbose message. - -\ **-f**\ - -Force to trigger new round scan. ignore the data collected before. - - -******** -EXAMPLES -******** - - -1. To collect node[1-3]'s network device information, enter: - - -.. code-block:: perl - - getadapter node[1-2] - - -Output is similar to: - - -.. code-block:: perl - - -->Starting scan for: node1,node2 - The whole scan result: - -------------------------------------- - [node1]: Adapter information exists, no need to scan. - -------------------------------------- - [node2] scan successfully, below are the latest data - node2:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80 - node2:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433 - - -Every node gets a separate section to display its all network adapters information, every network adapter owns single line which start as node name and followed by index and other information. - -2. Force to trigger new round scan - - -.. code-block:: perl - - getadatper node -f - - - -******** -SEE ALSO -******** - - -noderange(3)|noderange.3 - diff --git a/docs/source/guides/admin-guides/references/man1/pgsqlsetup.1.rst b/docs/source/guides/admin-guides/references/man1/pgsqlsetup.1.rst index b29252858..e0b7b8298 100644 --- a/docs/source/guides/admin-guides/references/man1/pgsqlsetup.1.rst +++ b/docs/source/guides/admin-guides/references/man1/pgsqlsetup.1.rst @@ -23,7 +23,7 @@ SYNOPSIS \ **pgsqlsetup**\ {\ **-v**\ | \ **-**\ **-version**\ } -\ **pgsqlsetup**\ {\ **-i**\ | \ **-**\ **-init**\ } [\ **-N**\ | \ **-**\ **-nostart**\ ] [\ **-P**\ | \ **-**\ **-PCM**\ ] [\ **-o**\ | \ **-**\ **-odbc**\ ] [\ **-V**\ | \ **-**\ **-verbose**\ ] +\ **pgsqlsetup**\ {\ **-i**\ | \ **-**\ **-init**\ } [\ **-N**\ | \ **-**\ **-nostart**\ ] [\ **-**\ **-listen**\ | \ **-l**\ \ *address*\ ] [\ **-**\ **-access**\ | \ **-a**\ \ *address*\ ] [\ **-P**\ | \ **-**\ **-PCM**\ ] [\ **-o**\ | \ **-**\ **-odbc**\ ] [\ **-V**\ | \ **-**\ **-verbose**\ ] \ **pgsqlsetup**\ {\ **-o**\ | \ **-**\ **-setupODBC**\ } [\ **-V**\ | \ **-**\ **-verbose**\ ] @@ -65,7 +65,7 @@ OPTIONS The init option is used to setup an installed PostgreSQL database so that xCAT can use the database. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the PostgreSQL database and restarts the xcatd daemon using the database. On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the -o option, to run after the init. - To add additional nodes to access the PostgreSQL server, setup on the Management Node, edit the pg_hba.conf file. + To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the -a option. For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB @@ -77,6 +77,18 @@ OPTIONS +\ **-l|-**\ **-listen**\ \ *address*\ + + This option is used to specify additional IP addresses on which the PostgreSQL database will listen. Without it, only localhost (on Linux) and the management node's main IP (on Linux and AIX) will be configured. This option can be specified multiple times. + + + +\ **-a|-**\ **-access**\ \ *address*\ + + This option is used to specify additional IP addresses from which the service nodes will connect to the PostgreSQL database. Without it, only the management node will be configured for database access. This option can be specified multiple times. + + + \ **-P|-**\ **-PCM**\ This option sets up PostgreSQL database to be used with xCAT running with PCM. diff --git a/docs/source/guides/admin-guides/references/man1/rflash.1.rst b/docs/source/guides/admin-guides/references/man1/rflash.1.rst index 087047ab6..84d176e49 100644 --- a/docs/source/guides/admin-guides/references/man1/rflash.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rflash.1.rst @@ -11,7 +11,7 @@ Name **** -\ **rflash**\ - Performs Licensed Internal Code (LIC) update support for HMC-attached POWER5 and POWER6 Systems, and POWER7 systems using Direct FSP management. \ **rflash**\ is also able to update firmware for NextScale Fan Power Controllers (FPC). +\ **rflash**\ - Performs Licensed Internal Code (LIC) update or firmware update on supported xCAT managed nodes. **************** @@ -46,11 +46,18 @@ NeXtScale FPC specific: \ **rflash**\ \ *noderange*\ \ *http_directory*\ -OpenPOWER BMC specific: -======================= +OpenPOWER BMC specific (using IPMI): +==================================== -\ **rflash**\ \ *noderange*\ \ *hpm_file_path*\ [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ] +\ **rflash**\ \ *noderange*\ [\ *hpm_file_path*\ | \ **-d=**\ \ *data_directory*\ ] [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ] + + +OpenPOWER OpenBMC specific : +============================ + + +\ **rflash**\ \ *noderange*\ [\ *tar_file_path*\ | \ *image_id*\ ] [\ **-c | -**\ **-check**\ ] [\ **-a | -**\ **-activate**\ ] [\ **-l | -**\ **-list**\ ] [\ **-u | -**\ **-upload**\ ] [\ **-d | -**\ **-delete**\ ] @@ -118,11 +125,20 @@ NeXtScale FPC specific: The command will update firmware for NeXtScale FPC when given an FPC node and the http information needed to access the firmware. The http information required includes both the MN IP address as well as the directory containing the firmware. It is recommended that the firmware be downloaded and placed in the /install directory structure as the xCAT MN /install directory is configured with the correct permissions for http. Refer to the doc to get more details: XCAT_NeXtScale_Clusters -OpenPOWER specific: -=================== +OpenPOWER specific (using IPMI): +================================ -The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and the hpm1 formatted file path. +The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and either the hpm formatted file path or path to a data directory. +\ **Note:**\ When using \ **rflash**\ in hierarchical environment, the hpm file or data directory must be accessible from Service Nodes. + + +OpenPOWER OpenBMC specific: +=========================== + + +The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER node and either an update .tar file or an uploaded image id. +\ **Note:**\ When using \ **rflash**\ in hierarchical environment, the .tar file must be accessible from Service Nodes. @@ -140,7 +156,7 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node \ **-c|-**\ **-check**\ - Check the firmware version of BMC and HPM file. + Check the firmware version of BMC and an update file. @@ -156,6 +172,12 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node +\ **-d=**\ \ *data_directory*\ + + Used for IBM Power S822LC for Big Data systems only. Specifies the directory where the \ **pUpdate**\ utility and at least one of BMC or PNOR update files are located. The utility and update files can be downloaded from FixCentral. + + + \ **-**\ **-activate**\ {\ **concurrent**\ | \ **disruptive**\ } Must be specified to activate the new Licensed Internal Code. The "disruptive" option will cause the target systems to be recycled. Without this flag, LIC updates will be installed only, not activated. @@ -180,6 +202,30 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node +\ **-a|-**\ **-activate**\ + + Activate update image. Image id must be specified. + + + +\ **-l|-**\ **-list**\ + + List currently uploaded update images. "(\*)" indicates currently active image. + + + +\ **-u|-**\ **-upload**\ + + Upload update image. Specified file must be in .tar format. + + + +\ **-d|-**\ **-delete**\ + + Delete update image from BMC + + + \ **-v|-**\ **-version**\ Displays the command's version. @@ -267,6 +313,16 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node +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: + + + .. code-block:: perl + + rflash briggs01 -d=/root/supermicro/OP825 + + + + **************** \ **Location**\ diff --git a/docs/source/guides/admin-guides/references/man1/rinv.1.rst b/docs/source/guides/admin-guides/references/man1/rinv.1.rst index f7202fae2..d760fc576 100644 --- a/docs/source/guides/admin-guides/references/man1/rinv.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rinv.1.rst @@ -25,7 +25,7 @@ BMC/MPA specific: ================= -\ **rinv**\ \ *noderange*\ {\ **pci | model | serial | asset | vpd | mprom | deviceid | guid | firm | diag | dimm | bios | mparom | mac | all**\ } +\ **rinv**\ \ *noderange*\ [\ **model | serial | asset | vpd | deviceid | guid | firm | dimm | mprom | all**\ ] OpenPOWER (IPMI) server specific: @@ -39,7 +39,7 @@ OpenPOWER (OpenBMC) server specific: ==================================== -\ **rinv**\ \ *noderange*\ [\ **model | serial | firm | cpu | dimm | all**\ ] +\ **rinv**\ \ *noderange*\ [\ **model | serial | firm | cpu | dimm | all**\ ] [\ **-V | -**\ **-verbose**\ ] PPC (with HMC) specific: @@ -126,12 +126,6 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou -\ **pci**\ - - Retrieves PCI bus information. - - - \ **bus**\ List all buses for each I/O slot. @@ -140,8 +134,7 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou \ **config**\ - Retrieves number of processors, speed, total memory, and DIMM - locations. + Retrieves number of processors, speed, total memory, and DIMM locations. @@ -177,7 +170,7 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou \ **asset**\ - Retrieves asset tag. Usually it's the MAC address of eth0. + Retrieves asset tag. Usually it's the MAC address of eth0. @@ -199,6 +192,12 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou +\ **dimm**\ + + Retrieves dual in-line memory module information. + + + \ **deviceid**\ Retrieves device identification. Usually device, manufacturing and product IDs. @@ -235,6 +234,12 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou +\ **-V | -**\ **-verbose**\ + + Prints verbose output, if available. + + + \ **-t**\ Set the values in the vm table to what vCenter has for the indicated nodes. diff --git a/docs/source/guides/admin-guides/references/man1/rpower.1.rst b/docs/source/guides/admin-guides/references/man1/rpower.1.rst index 414471bd5..1dee1d74a 100644 --- a/docs/source/guides/admin-guides/references/man1/rpower.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rpower.1.rst @@ -45,7 +45,7 @@ OpenPOWER OpenBMC: ================== -\ **rpower**\ \ *noderange*\ [\ **off | on | reset | boot | stat | state | status**\ ] +\ **rpower**\ \ *noderange*\ [\ **off | on | softoff | reset | boot | bmcreboot | bmcstate | stat | state | status**\ ] PPC (with IVM or HMC) specific: @@ -380,6 +380,18 @@ OPTIONS +\ **bmcreboot**\ + + To reboot BMC. + + + +\ **bmcstate**\ + + To get state of the BMC. + + + \ **state**\ To get state of the instance. diff --git a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst index c2165234b..c2a4d365c 100644 --- a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst @@ -47,7 +47,7 @@ OpenBMC specific: ================= -\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | vlan**\ } +\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | vlan | sshcfg**\ } MPA specific: @@ -251,8 +251,7 @@ DESCRIPTION *********** -\ **rspconfig**\ configures various settings in the nodes' service processors. If only a keyword is -specified, without the \ **=**\ , it displays the current value. +\ **rspconfig**\ configures various settings in the nodes' service processors. For options \ **autopower | iocap | decfg | memdecfg | procdecfg | time | date | spdump | sysdump | network**\ , user need to use \ *chdef -t site enableASMI=yes*\ to enable ASMI first. @@ -526,6 +525,12 @@ OPTIONS +\ **sshcfg**\ + + Copy SSH keys. + + + \ **swnet**\ ={[\ *ip*\ ],[\ *gateway*\ ],[\ *netmask*\ ]} Set the Switch network parameters. diff --git a/docs/source/guides/admin-guides/references/man1/sinv.1.rst b/docs/source/guides/admin-guides/references/man1/sinv.1.rst index 89bf04d4e..11a98a55b 100644 --- a/docs/source/guides/admin-guides/references/man1/sinv.1.rst +++ b/docs/source/guides/admin-guides/references/man1/sinv.1.rst @@ -19,7 +19,7 @@ sinv.1 **************** -\ **sinv**\ [\ **-o**\ \ *output*\ ] [\ **-p**\ \ *template path*\ ] [\ **-t**\ \ *template count*\ ] [\ **-s**\ \ *seed node*\ ] [\ **-i**\ ] [\ **-e**\ ] [\ **-r**\ ] [\ **-V**\ ] [\ **-**\ **-devicetype**\ \ *type_of_device*\ ] [\ **-l**\ \ *userID*\ ] [[\ **-f**\ \ *command file*\ ] | [\ **-c**\ \ *command*\ ]] +\ **sinv**\ [\ **-o**\ \ *output*\ ] \ **-p**\ \ *template path*\ [\ **-t**\ \ *template count*\ ] [\ **-s**\ \ *seed node*\ ] [\ **-i**\ ] [\ **-e**\ ] [\ **-r**\ ] [\ **-V**\ ] [\ **-**\ **-devicetype**\ \ *type_of_device*\ ] [\ **-l**\ \ *userID*\ ] {\ **-f**\ \ *command file*\ | \ **-c**\ \ *command*\ } \ **sinv**\ [\ **-h**\ | \ **-v**\ ] @@ -30,9 +30,9 @@ sinv.1 The \ **sinv**\ command is designed to check the configuration of the nodes in a cluster. -The command takes as input command line flags, and one or more templates which will be compared against the output of the xdsh command, designated to be run by the -c or -f flag, on the nodes in the noderange. +The command takes as input command line flags, and one or more templates which will be compared against the output of the \ **xdsh**\ command, designated to be run by the \ **-c**\ or \ **-f**\ flag, on the nodes in the noderange. -The nodes will then be grouped according to the template they match and a report returned to the administrator in the output file designated by the -o flag, or to stdout. +The nodes will then be grouped according to the template they match and a report returned to the administrator in the output file designated by the \ **-o**\ flag, or to stdout. \ **sinv**\ supports checking the output from the \ **rinv**\ or \ **xdsh**\ command. @@ -40,13 +40,13 @@ The \ **sinv**\ command is an xCAT Distributed Shell Utility. \ **COMMAND**\ \ **SPECIFICATION**\ : -The xdsh or rinv command to execute on the remote targets is specified by the \ **-c**\ flag, or by the \ **-f**\ flag +The \ **xdsh**\ or \ **rinv**\ command to execute on the remote targets is specified by the \ **-c**\ flag, or by the \ **-f**\ flag which is followed by the fully qualified path to a file containing the command. -Note: do not add | xdshcoll to the command on the command line or in the -command file, it is automatically added by sinv. +Note: do not add \ **| xdshcoll**\ to the command on the command line or in the +command file, it is automatically added by \ **sinv**\ . -The syntax for the \ **-c**\ \ **sinv**\ parameter is as follows: +The syntax for the \ **-c**\ parameter is as follows: "\ *command*\ [; \ *command*\ ]..." @@ -60,9 +60,9 @@ those that read from standard input. \ **REMOTE**\ \ **SHELL**\ \ **COMMAND**\ : -For xdsh, support is explicitly provided -for AIX Remote Shell and OpenSSH, but any secure remote command that -conforms to the IETF (Internet Engineering Task Force) Secure Remote +For \ **xdsh**\ , support is explicitly provided +for AIX Remote Shell and OpenSSH, but any secure remote command that +conforms to the IETF (Internet Engineering Task Force) Secure Remote Command Protocol can be used. See man \ **xdsh**\ for more details. @@ -74,32 +74,28 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. \ **-o | -**\ **-output**\ \ *report output file*\ - Optional output file. This is the location of the file that will contain the report of the nodes that match, and do not match, the input templates. - If the flag is not used, the output will go to stdout. + Optional output file. This is the location of the file that will contain the report of the nodes that match, and do not match, the input templates. If the flag is not used, the output will go to stdout. \ **-p | -**\ **-tp**\ \ *template path*\ This is the path to the template file. The template contains the output - of xdsh command, that has been run against a "seed" node, a node - that contains the configuration that you would like - all nodes in your noderange to match. + of \ **xdsh**\ or \ **rinv**\ command, that has been run against a "seed" node, a node + that contains the configuration that you would like all nodes in your noderange to match. - The admin can create the template by running the xdsh command on - the seed node, pipe to xdshcoll ( required) and store the output + The admin can create the template by running the \ **xdsh**\ or \ **rinv**\ command on + the seed node, pipe to \ **xdshcoll**\ (required) and store the output in the template path. See examples. - \ **Note:**\ The admin can also edit the - template to remove any lines that they do not want checked. + \ **Note:**\ The admin can also edit the template to remove any lines that they do not want checked. An alternative method is to use the [\ **-s**\ \ *seed node*\ ] parameter, which will automatically build the template for you from the seed node named. - If a template path file does not exist, and a seed node is not input, - then sinv will automatically use the one node in the noderange as - the seed node and build the template. + If a a seed node is not provided, then command will automatically use the first node in the noderange as + the seed node. @@ -107,7 +103,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. This count is the number of templates that the command will use to check for nodes matches. If the template in the template path does not - match a node, the \ **sinv**\ will check additional templates up + match a node, the \ **sinv**\ will check additional templates up to the template count. For each node, it will compare the node against each template to see if @@ -127,9 +123,8 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. that is stored in template path. You can use this parameter instead of running the command yourself to build the template. - \ **Note:**\ If the template path file does not exist, and no seed node is - supplied, the seed node automatically is one node in the - noderange. + \ **Note:**\ If no seed node is supplied, the first node in the noderange is automatically + selected as a seed node. @@ -147,9 +142,9 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. This requires the check of node output against template to be an exact match. If this flag is not set, \ **sinv**\ checks to see if the return from the - xdsh command to the nodes contain a match for each line in the input + \ **xdsh**\ or \ **rinv**\ command to the nodes contain a match for each line in the input template (except for xdshcoll header and comments). If not in exactmatch mode, - there can exist more lines in the xdsh return from the nodes. + there can be more lines in the \ **xdsh**\ or \ **rinv**\ return from the nodes. For example, if running a "rpm -qa | grep xCAT" command, without exactmatch set, if the node contains more xCAT rpms that listed in the template, @@ -185,21 +180,21 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. \ **-c | -**\ **-command**\ - The xdsh or rinv command that will be run. The command should be enclosed in - double quotes to insure correct shell interpretation. This parameter must only contain, the node range or the image path (Linux) or spot name for AIX. It cannot be used to set additional input flags to xdsh or rinv (for example -s,-T,-e). See examples below. + The \ **xdsh**\ or \ **rinv**\ command that will be run. The command should be enclosed in + double quotes to insure correct shell interpretation. This parameter must only contain, the node range or the image path (Linux) or spot name for AIX. It cannot be used to set additional input flags to \ **xdsh**\ or \ **rinv**\ (for example \ **-s**\ ,\ **-T**\ ,\ **-e**\ ). See examples below. - \ **Note:**\ do not add the | xdshcoll to the command, - it is automatically added by sinv. sinv also automatically sets the -v flag for xdsh. + \ **Note:**\ do not add the \ **| xdshcoll**\ to the command, + it is automatically added by \ **sinv**\ . \ **sinv**\ also automatically sets the \ **-v**\ flag for \ **xdsh**\ . \ **-f | -**\ **-file**\ - The file containing the xdsh or rinv command that will be run. + The file containing the \ **xdsh**\ or \ **rinv**\ command that will be run. This should be the fully qualified name of the file. - \ **Note:**\ do not add the | xdshcoll to the command in the file, - it is automatically added by sinv. + \ **Note:**\ do not add the \ **| xdshcoll**\ to the command in the file, + it is automatically added by \ **sinv**\ . @@ -208,11 +203,11 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. This flag indicates that generated templates should be removed at the at the end of the \ **sinv**\ command execution. - If the flag is input, then all templates that are generated by the \ **sinv**\ + If the flag is specified, then all templates that are generated by the \ **sinv**\ command, will be removed. If the first template is created by the admin, it will not be removed. - If the flag is not input, no + If the flag is not specified, no templates will be removed. It is up to the admin to cleanup templates. @@ -242,7 +237,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. -1. To setup sinv.template (name optional) for input to the \ **sinv**\ command , enter: +1. To setup sinv.template (name optional) for input to the \ **sinv**\ command, enter: .. code-block:: perl @@ -250,7 +245,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. xdsh node1,node2 "rpm -qa | grep ssh " | xdshcoll > /tmp/sinv.template - Note: when setting up the template the output of xdsh must be piped to xdshcoll, sinv processing depends on it. + Note: when setting up the template the output of \ **xdsh**\ must be piped to \ **xdshcoll**\ , \ **sinv**\ processing depends on it. @@ -262,12 +257,12 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. rinv node1-node2 serial | xdshcoll > /tmp/rinv.template - Note: when setting up the template the output of rinv must be piped to xdshcoll, sinv processing depends on it. + Note: when setting up the template the output of \ **rinv**\ must be piped to \ **xdshcoll**\ , \ **sinv**\ processing depends on it. 3. To execute \ **sinv**\ using the sinv.template generated above -on the nodegroup, \ **testnodes**\ ,possibly generating up to two +on the nodegroup, \ *testnodes*\ ,possibly generating up to two new templates, and removing all generated templates in the end, and writing output report to /tmp/sinv.output, enter: @@ -277,12 +272,12 @@ output report to /tmp/sinv.output, enter: sinv -c "xdsh testnodes rpm -qa | grep ssh" -p /tmp/sinv.template -t 2 -r -o /tmp/sinv.output - Note: do not add the pipe to xdshcoll on the -c flag, it is automatically added by the sinv routine. + Note: do not add the pipe to \ **xdshcoll**\ on the \ **-c**\ flag, it is automatically added by the \ **sinv**\ . -4. To execute \ **sinv**\ on noderange, node1-node4, using the seed node, node8, -to generate the first template, using the xdsh command (-c), +4. To execute \ **sinv**\ on noderange, \ *node1-node4*\ , using the seed node, \ *node8*\ , +to generate the first template, using the \ **xdsh**\ command (\ **-c**\ ), possibly generating up to two additional templates and not removing any templates at the end, enter: @@ -294,8 +289,8 @@ templates and not removing any templates at the end, enter: -5. To execute \ **sinv**\ on noderange, node1-node4, using the seed node, node8, -to generate the first template, using the rinv command (-c), +5. To execute \ **sinv**\ on noderange, \ *node1-node4*\ , using the seed node, \ *node8*\ , +to generate the first template, using the \ **rinv**\ command (\ **-c**\ ), possibly generating up to two additional templates and removing any generated templates at the end, enter: @@ -307,8 +302,8 @@ templates and removing any generated templates at the end, enter: -6. To execute \ **sinv**\ on noderange, node1-node4, using node1 as -the seed node, to generate the sinv.template from the xdsh command (-c), +6. To execute \ **sinv**\ on noderange, \ *node1-node4*\ , using \ *node1*\ as +the seed node, to generate the sinv.template from the \ **xdsh**\ command (\ **-c**\ ), using the exact match option, generating no additional templates, enter: @@ -322,14 +317,14 @@ using the exact match option, generating no additional templates, enter: -7. To execute \ **sinv**\ on the Linux osimage defined for cn1. First build a template from the /etc/hosts on the node. Then run sinv to compare. +7. To execute \ **sinv**\ on the Linux osimage defined for cn1. First build a template from the /etc/hosts on the node. Then run \ **sinv**\ to compare. .. code-block:: perl xdsh cn1 "cat /etc/hosts" | xdshcoll > /tmp/sinv2/template" - sinv -c "xdsh -i /install/netboot/rhels6/ppc64/test_ramdisk_statelite/rootimg cat /etc/hosts" -e -t1 -p /tmp/sinv.template -o /tmp/sinv.output + sinv -c "xdsh -i /install/netboot/rhels6/ppc64/test_ramdisk_statelite/rootimg cat /etc/hosts" -e -t 1 -p /tmp/sinv.template -o /tmp/sinv.output diff --git a/docs/source/guides/admin-guides/references/man3/noderange.3.rst b/docs/source/guides/admin-guides/references/man3/noderange.3.rst index da8266d5e..c172e5218 100644 --- a/docs/source/guides/admin-guides/references/man3/noderange.3.rst +++ b/docs/source/guides/admin-guides/references/man3/noderange.3.rst @@ -59,6 +59,12 @@ Name conveniently specify a list of nodes. The result is that the command will be applied to a range of nodes, often in parallel. +If you invoke xCAT \ **noderange**\ from a shell you may need to quote the +\ **noderange**\ if the shell would otherwise treat the punctuation marks in +the \ **noderange**\ as control operators. The affected punctuation marks may +include Asterisk (\`*'), Left Square Bracket (\`[') , Right Square Bracket +(\`]'), Circumflex Accent (\`^'), and Overline (\`~'). + \ **noderange**\ is a comma-separated list. Each token (text between commas) in the list can be any of the forms listed below: @@ -357,6 +363,14 @@ Example of \ **xCAT Node Name Format**\ node/group names: +************ +\ **Bugs**\ +************ + +The special characters used by xCAT \ **noderange**\ are also special characters +to many shell programs. In particular, the characters \`*', \`[', \`]', \`^', +and \`~' may have to be escaped from the shell. + **************** \ **SEE ALSO**\ **************** diff --git a/docs/source/guides/admin-guides/references/man5/bootparams.5.rst b/docs/source/guides/admin-guides/references/man5/bootparams.5.rst index e6596fcb4..13f261616 100644 --- a/docs/source/guides/admin-guides/references/man5/bootparams.5.rst +++ b/docs/source/guides/admin-guides/references/man5/bootparams.5.rst @@ -62,7 +62,7 @@ bootparams Attributes: \ **addkcmdline**\ - User specified one or more parameters to be passed to the kernel. For the kernel options need to be persistent after installation, specify them with prefix "R::" + User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" ") diff --git a/docs/source/guides/admin-guides/references/man5/linuximage.5.rst b/docs/source/guides/admin-guides/references/man5/linuximage.5.rst index 74810be1c..66569e8c4 100644 --- a/docs/source/guides/admin-guides/references/man5/linuximage.5.rst +++ b/docs/source/guides/admin-guides/references/man5/linuximage.5.rst @@ -56,7 +56,7 @@ linuximage Attributes: \ **addkcmdline**\ - User specified arguments to be passed to the kernel. The user arguments are appended to xCAT.s default kernel arguments. For the kernel options need to be persistent after installation, specify them with prefix "R::". This attribute is ignored if linuximage.boottarget is set. + User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" "). This attribute is ignored if linuximage.boottarget is set. diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst index 9e48d38c2..7fb2bf6cc 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -110,8 +110,9 @@ site Attributes: dhcplease: The lease time for the dhcp client. The default value is 43200. disjointdhcps: If set to '1', the .leases file on a service node only contains - the nodes it manages. The default value is '0'. - '0' value means include all the nodes in the subnet. + the nodes it manages. And when 'sharedtftp' is disabled, nodeset handles + boot loader configuration on a service node only for the nodes it manages. + The default value is '0'. It means include all the nodes in the subnet. pruneservices: Whether to enable service pruning when noderm is run (i.e. removing DHCP entries when noderm is executed) diff --git a/docs/source/guides/admin-guides/references/man8/nodeset.8.rst b/docs/source/guides/admin-guides/references/man8/nodeset.8.rst index 35edfcd45..aeb8275c6 100644 --- a/docs/source/guides/admin-guides/references/man8/nodeset.8.rst +++ b/docs/source/guides/admin-guides/references/man8/nodeset.8.rst @@ -19,7 +19,7 @@ Name **************** -\ **nodeset**\ \ *noderange*\ [\ **boot**\ | \ **stat**\ | \ **offline**\ | \ **runcmd=bmcsetup**\ | \ **osimage**\ [=\ *imagename*\ ] | \ **shell**\ | \ **shutdown**\ ] +\ **nodeset**\ \ *noderange*\ [\ **boot**\ | \ **stat**\ [\ **-a**\ ]| \ **offline**\ | \ **runcmd=bmcsetup**\ | \ **osimage**\ [=\ *imagename*\ ] | \ **shell**\ | \ **shutdown**\ ] [\ **-V | -**\ **-verbose**\ ] \ **nodeset**\ \ *noderange*\ \ **osimage**\ [=\ *imagename*\ ] [\ **-**\ **-noupdateinitrd**\ ] [\ **-**\ **-ignorekernelchk**\ ] @@ -40,10 +40,16 @@ changing the network boot files. Each xCAT node always boots from the network and downloads a boot file with instructions on what action to take next. -\ **nodeset**\ will manipulate the boot configuration files of yaboot and pxelinux.0. +\ **nodeset**\ will manipulate the boot configuration files of xnba, grub2, petitboot, yaboot and pxelinux.0. Assume that /tftpboot is the root for tftpd (set in site(5)|site.5). +\ **nodeset**\ for petitboot makes changes to /tftpboot/petitboot/{node name} + +\ **nodeset**\ for xnba makes changes to /tftpboot/xcat/xnba/nodes/{node name} + +\ **nodeset**\ for grub2 makes changes to /tftpboot/boot/grub2/{node name} + \ **nodeset**\ for pxe makes changes to /tftpboot/pxelinux.cfg/{node hex ip} \ **nodeset**\ for yaboot makes changes to /tftpboot/etc/{node hex ip} @@ -53,6 +59,8 @@ Assume that /tftpboot is the root for tftpd (set in site(5)|site.5). \ **nodeset**\ is called by \ **rinstall**\ and \ **winstall**\ and is also called by the installation process remotely to set the boot state back to "boot". +In a hierarchical cluster managed by service nodes, \ **nodeset**\ command is used to make sure compute node states are consistent on service and management nodes. When errors are reported, run the command with verbose mode. And the command will display additional service node information, which might be useful in identifying the problem. + A user can supply their own scripts to be run on the mn or on the service node (if a hierarchical cluster) for a node when the nodeset command is run. Such scripts are called \ **prescripts**\ . They should be copied to /install/prescripts directory. A table called \ *prescripts*\ is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the nodeset command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the nodeset command are stored in the 'end' column of \ *prescripts*\ table. You can run 'tabdump -d prescripts' command for details. The following two environment variables will be passed to each script: NODES contains all the names of the nodes that need to run the script for and ACTION contains the current nodeset action. If \ *#xCAT setting:MAX_INSTANCE=number*\ is specified in the script, the script will get invoked for each node in parallel, but no more than \ *number*\ of instances will be invoked at a time. If it is not specified, the script will be invoked once for all the nodes. @@ -101,7 +109,7 @@ A user can supply their own scripts to be run on the mn or on the service node ( \ **stat**\ - Display the current boot loader config file description for the nodes requested + Display the current boot loader config file description for the nodes requested. When \ **disjointdhcps**\ is set, using \ **-a**\ to display them on all available service nodes. @@ -125,6 +133,12 @@ A user can supply their own scripts to be run on the mn or on the service node ( +\ **-V | -**\ **-verbose**\ + + Verbose mode. + + + \ **-h | -**\ **-help**\ Print help. diff --git a/docs/source/guides/install-guides/yum/update_xcat.rst b/docs/source/guides/install-guides/yum/update_xcat.rst index fc01d99ad..fbbbe4762 100644 --- a/docs/source/guides/install-guides/yum/update_xcat.rst +++ b/docs/source/guides/install-guides/yum/update_xcat.rst @@ -6,5 +6,5 @@ If at a later date you want to update xCAT, first, update the software repositor yum clean metadata # or, yum clean all yum update '*xCAT*' - - + # To check and update the packages provided by xcat-dep: + yum update '*xcat*' diff --git a/docs/source/guides/install-guides/zypper/update_xcat.rst b/docs/source/guides/install-guides/zypper/update_xcat.rst index c18bb5b3c..3da2a2bb2 100644 --- a/docs/source/guides/install-guides/zypper/update_xcat.rst +++ b/docs/source/guides/install-guides/zypper/update_xcat.rst @@ -6,4 +6,5 @@ If at a later date you want to update xCAT, first, update the software repositor zypper refresh zypper update "*xCAT*" - + # To check and update the packages provided by xcat-dep: + zypper update "*xcat*" diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 079a62155..ae0d19d98 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -33,7 +33,7 @@ if ($inet6support) { if ($^O =~ /^linux/i) { # Is IPv6 enabled on the MN or xcat client node at all? - my $ipv6enabled = `ip addr 2> /dev/null | grep inet6`; + my $ipv6enabled = `ip -6 -o addr 2> /dev/null`; if (!$ipv6enabled) { $inet6support = 0; } @@ -1129,6 +1129,13 @@ sub handle_response { return; } + my $msgsource; + if ($ENV{'XCATSHOWSVR'}) { + unless ($rsp->{NoSvrPrefix}) { # some plugins could disable the prefix forcely by seting the flag in response. + $msgsource = $rsp->{xcatdsource}->[0] if ($rsp->{xcatdsource}); + } + } + #print "in handle_response\n"; # Handle errors if (defined($rsp->{errorcode})) { @@ -1141,24 +1148,23 @@ sub handle_response { $xCAT::Client::EXITCODE |= $rsp->{errorcode}; } # assume it is a non-reference scalar } + if ($rsp->{error}) { #print "printing error\n"; if (ref($rsp->{error}) eq 'ARRAY') { foreach my $text (@{ $rsp->{error} }) { - if ($rsp->{NoErrorPrefix}) { - print STDERR "$text\n"; - } else { - print STDERR "Error: $text\n"; - } + my $desc = "$text"; + $desc = "[$msgsource]: $desc" if ($msgsource && $desc); + $desc = "Error: $desc" unless ($rsp->{NoErrorPrefix}); + print STDERR "$desc\n"; } } else { - if ($rsp->{NoErrorPrefix}) { - print STDERR ($rsp->{error} . "\n"); - } else { - print STDERR ("Error: " . $rsp->{error} . "\n"); - } + my $desc = $rsp->{error}; + $desc = "[$msgsource]: $desc" if ($msgsource && $desc); + $desc = "Error: $desc" unless ($rsp->{NoErrorPrefix}); + print STDERR "$desc\n"; } } if ($rsp->{warning}) { @@ -1166,19 +1172,17 @@ sub handle_response { #print "printing warning\n"; if (ref($rsp->{warning}) eq 'ARRAY') { foreach my $text (@{ $rsp->{warning} }) { - if ($rsp->{NoWarnPrefix}) { - print STDERR "$text\n"; - } else { - print STDERR "Warning: $text\n"; - } + my $desc = "$text"; + $desc = "[$msgsource]: $desc" if ($msgsource && $desc); + $desc = "Warning: $desc" unless ($rsp->{NoWarnPrefix}); + print STDERR "$desc\n"; } } else { - if ($rsp->{NoWarnPrefix}) { - print STDERR ($rsp->{warning} . "\n"); - } else { - print STDERR ("Warning: " . $rsp->{warning} . "\n"); - } + my $desc = $rsp->{warning}; + $desc = "[$msgsource]: $desc" if ($msgsource && $desc); + $desc = "Warning: $desc" unless ($rsp->{NoWarnPrefix}); + print STDERR "$desc\n"; } } if ($rsp->{info}) { @@ -1186,11 +1190,15 @@ sub handle_response { #print "printing info\n"; if (ref($rsp->{info}) eq 'ARRAY') { foreach my $text (@{ $rsp->{info} }) { - print "$text\n"; + my $desc = "$text"; + $desc = "[$msgsource]: $desc" if ($msgsource && $desc); + print "$desc\n"; } } else { - print($rsp->{info} . "\n"); + my $desc = $rsp->{info}; + $desc = "[$msgsource]: $desc" if ($msgsource && $desc); + print "$desc\n"; } } @@ -1224,6 +1232,11 @@ sub handle_response { } else { $desc = $node->{name}; } + if ($desc) { + $desc = "$desc: [$msgsource]" if ($msgsource); + } else { + $desc = "[$msgsource]" if ($msgsource); + } if ($node->{errorcode}) { if (ref($node->{errorcode}) eq 'ARRAY') { foreach my $ecode (@{ $node->{errorcode} }) { @@ -1274,7 +1287,7 @@ sub handle_response { if ($node->{base64_data}) { $desc = $desc . ": " . decode_base64($node->{base64_data}->[0]); } - if ($desc) { + if ($desc && $desc ne "[$msgsource]") { if ($errflg == 1) { print STDERR ("$desc\n"); } else { @@ -1306,7 +1319,10 @@ sub handle_response { } } } - if ($desc) { print "$desc\n"; } + if ($desc) { + $desc = "[$msgsource]: $desc" if ($msgsource); + print "$desc\n"; + } } } } # end of handle_response diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 4faa725b8..880160f42 100755 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -780,6 +780,7 @@ sub setobjdefs $montable->commit; $monsettable->commit; + $objhash{$objname}{updated} = 1; next; } #if ($type eq 'monitoring') @@ -870,6 +871,9 @@ sub setobjdefs } } + unless ($ret) { + $objhash{$objname}{updated} = 1; + } $thistable->commit; diff --git a/perl-xCAT/xCAT/GlobalDef.pm b/perl-xCAT/xCAT/GlobalDef.pm index b953a5168..b9b99ea20 100644 --- a/perl-xCAT/xCAT/GlobalDef.pm +++ b/perl-xCAT/xCAT/GlobalDef.pm @@ -51,7 +51,9 @@ $::STATUS_BOOTED = "booted"; $::STATUS_POWERING_ON = "powering-on"; $::STATUS_POWERING_OFF = "powering-off"; $::STATUS_DISCOVERING = "discovering"; +$::STATUS_DISCOVERED = "discovered"; $::STATUS_CONFIGURING = "configuring"; +$::STATUS_CONFIGURED = "configured"; $::STATUS_STANDING_BY = "standingby"; $::STATUS_SHELL = "shell"; $::STATUS_DEFINED = "defined"; @@ -69,7 +71,9 @@ $::STATUS_BMCREADY = "bmcready"; $::STATUS_POWERING_ON => 1, $::STATUS_POWERING_OFF => 1, $::STATUS_DISCOVERING => 1, + $::STATUS_DISCOVERED => 1, $::STATUS_CONFIGURING => 1, + $::STATUS_CONFIGURED => 1, $::STATUS_STANDING_BY => 1, $::STATUS_SHELL => 1, $::STATUS_DEFINED => 1, diff --git a/perl-xCAT/xCAT/MacMap.pm b/perl-xCAT/xCAT/MacMap.pm index 54edb1824..426cf1619 100644 --- a/perl-xCAT/xCAT/MacMap.pm +++ b/perl-xCAT/xCAT/MacMap.pm @@ -147,6 +147,12 @@ OID, and have the switch table port value match exactly the format suggested by return 0; } + #HP calls their PortChannel interfaces "trunks" + #designated as Trk1, etc. don't match those + if ($namepersnmp =~ /Trk/) { + return 0; + } + #The blacklist approach has been exhausted. For now, assuming that means good, #if something ambiguous happens, the whitelist would have been: #'Port','Port #','/' (if namepercfg has no /, then / would be...), @@ -356,6 +362,8 @@ sub dump_mac_info { } } @{ $ret{$switch}->{$snmpportname}->{MACaddress} } = @{ $self->{macinfo}->{$switch}->{$snmpportname} }; + @{ $ret{$switch}->{$snmpportname}->{Vlanid} } = @{ $self->{vlaninfo}->{$switch}->{$snmpportname} }; + @{ $ret{$switch}->{$snmpportname}->{Mtu} } = @{ $self->{mtuinfo}->{$switch}->{$snmpportname} }; } } } @@ -720,6 +728,12 @@ sub refresh_switch { return; } + # get mtu + my $iftomtumap = walkoid($session, '.1.3.6.1.2.1.2.2.1.4', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); + unless (defined($iftomtumap)) { + xCAT::MsgUtils->message("I", "MTU information is not availabe for this switch $switch"); + } + #Above is valid without community string indexing, on cisco, we need it on the next one and onward my $iftovlanmap = walkoid($session, '.1.3.6.1.4.1.9.9.68.1.2.2.1.2', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); #use cisco vlan membership mib to ascertain vlan my $trunktovlanmap = walkoid($session, '.1.3.6.1.4.1.9.9.46.1.6.1.1.5', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); #for trunk ports, we are interested in the native vlan, so we need cisco vtp mib too @@ -783,24 +797,38 @@ sub refresh_switch { xCAT::MsgUtils->message("S", "Error communicating with " . $session->{DestHost} . ": Unable to get MAC entries via either BRIDGE or Q-BRIDE MIB"); return; } + if (defined($self->{collect_mac_info})) { my %index_to_mac = (); + my %index_to_vlan = (); foreach (keys %$mactoindexmap) { my $index = $mactoindexmap->{$_}; my @tmp = split /\./, $_; + my $vlan = @tmp[0]; my @mac = @tmp[ -6 .. -1 ]; my $macstring = sprintf("%02x:%02x:%02x:%02x:%02x:%02x", @mac); push @{ $index_to_mac{$index} }, $macstring; + push @{ $index_to_vlan{$index} }, $vlan; } foreach my $boid (keys %$bridgetoifmap) { my $port_index = $boid; my $port_name = $namemap->{ $bridgetoifmap->{$port_index} }; + my $mtu = $iftomtumap->{ $bridgetoifmap->{$port_index} }; if (defined($index_to_mac{$port_index})) { push @{ $self->{macinfo}->{$switch}->{$port_name} }, @{ $index_to_mac{$port_index} }; } else { $self->{macinfo}->{$switch}->{$port_name}->[0] = ''; } + + if (defined($index_to_vlan{$port_index})) { + push @{ $self->{vlaninfo}->{$switch}->{$port_name} }, @{ $index_to_vlan{$port_index} }; + } + else { + $self->{vlaninfo}->{$switch}->{$port_name}->[0] = ''; + } + push @{ $self->{mtuinfo}->{$switch}->{$port_name} } , $mtu; + } return; } diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 0c62fb7a0..9b65054a2 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -736,7 +736,7 @@ sub get_nic_ip my %iphash; my $mode = "MULTICAST"; my $payingattention = 0; - my $interface; + my $interface = ""; my $keepcurrentiface; @@ -793,6 +793,7 @@ sub get_nic_ip delete $iphash{$interface}; } $keepcurrentiface = 0; + $interface = ""; if (!($line =~ /LOOPBACK/) and $line =~ /UP( |,|>)/ and $line =~ /$mode/) { @@ -1644,10 +1645,14 @@ sub getNodeIPaddress { require xCAT::Table; my $nodetocheck = shift; - my $port = shift; - my $nodeip; + if ($nodetocheck eq 'xCAT::NetworkUtils') { #was called with -> syntax + $nodetocheck = shift; + } - $nodeip = xCAT::NetworkUtils->getipaddr($nodetocheck); + # Quick return if pass in an IP + return $nodetocheck if (xCAT::NetworkUtils->isIpaddr($nodetocheck)); + + my $nodeip = xCAT::NetworkUtils->getipaddr($nodetocheck); if (!$nodeip) { my $hoststab = xCAT::Table->new('hosts'); @@ -1665,6 +1670,51 @@ sub getNodeIPaddress } +#------------------------------------------------------------------------------- + +=head3 checkNodeIPaddress + Arguments: + Node name only one at a time + Returns: a hash object contains IP or Error + Globals: + none + Example: my $ipresult = xCAT::NetworkUtils::checkNodeIPaddress($nodetocheck); + +=cut + +#------------------------------------------------------------------------------- + +sub checkNodeIPaddress +{ + require xCAT::Table; + my $nodetocheck = shift; + if ($nodetocheck eq 'xCAT::NetworkUtils') { #was called with -> syntax + $nodetocheck = shift; + } + my $ret; + + my $nodeip; + my $hoststab = xCAT::Table->new('hosts'); + my $ent = $hoststab->getNodeAttribs($nodetocheck, ['ip']); + if ($ent->{'ip'}) { + $nodeip = $ent->{'ip'}; + } + + # Get the IP from DNS + my $dnsip = xCAT::NetworkUtils->getipaddr($nodetocheck); + if (!$dnsip) + { + $ret->{'error'} = "The $nodetocheck can not be resolved."; + $ret->{'ip'} = $nodeip if ($nodeip); + } elsif (!$nodeip) { + $ret->{'ip'} = $dnsip; + } else { + $ret->{'ip'} = $nodeip; + $ret->{'error'} = "Defined IP address of $nodetocheck is inconsistent with DNS." if ($nodeip ne $dnsip); + } + return $ret; +} + #------------------------------------------------------------------------------- diff --git a/perl-xCAT/xCAT/PPCdb.pm b/perl-xCAT/xCAT/PPCdb.pm index af6eebead..51967544d 100644 --- a/perl-xCAT/xCAT/PPCdb.pm +++ b/perl-xCAT/xCAT/PPCdb.pm @@ -217,14 +217,16 @@ sub add_ppc { ############################### # Update hosts table ############################### - if ($otherinterfaces) { - $db{hosts}->setNodeAttribs($name, - { otherinterfaces => $ips }); - } else { - $db{hosts}->setNodeAttribs($name, - { ip => $ips }); + if ($ips) { + if ($otherinterfaces) { + $db{hosts}->setNodeAttribs($name, + { otherinterfaces => $ips }); + } else { + $db{hosts}->setNodeAttribs($name, + { ip => $ips }); + } + $db{hosts}{commit} = 1; } - $db{hosts}{commit} = 1; ############################### # Update mac table diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 507b562a9..d787ff57f 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -331,8 +331,8 @@ passed as argument rather than by table value', 'kernel' => 'The kernel that network boot actions should currently acquire and use. Note this could be a chained boot loader such as memdisk or a non-linux boot loader', 'initrd' => 'The initial ramdisk image that network boot actions should use (could be a DOS floppy or hard drive image if using memdisk as kernel)', 'kcmdline' => 'Arguments to be passed to the kernel', -'addkcmdline' => 'User specified one or more parameters to be passed to the kernel. For the kernel options need to be persistent after installation, specify them with prefix "R::"', -'dhcpstatements' => 'xCAT manipulated custom dhcp statements (not intended for user manipulation)', + 'addkcmdline' => 'User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" ")', + 'dhcpstatements' => 'xCAT manipulated custom dhcp statements (not intended for user manipulation)', 'adddhcpstatements' => 'Custom dhcp statements for administrator use (not implemneted yet)', comments => 'Any user-written notes.', disable => "Set to 'yes' or '1' to comment out this row.", @@ -799,7 +799,7 @@ passed as argument rather than by table value', imagename => 'The name of this xCAT OS image definition.', template => 'The fully qualified name of the template file that will be used to create the OS installer configuration file for stateful installations (e.g. kickstart for RedHat, autoyast for SLES).', boottarget => 'The name of the boottarget definition. When this attribute is set, xCAT will use the kernel, initrd and kernel params defined in the boottarget definition instead of the default.', - addkcmdline => 'User specified arguments to be passed to the kernel. The user arguments are appended to xCAT.s default kernel arguments. For the kernel options need to be persistent after installation, specify them with prefix "R::". This attribute is ignored if linuximage.boottarget is set.', + addkcmdline => 'User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" "). This attribute is ignored if linuximage.boottarget is set.', pkglist => 'The fully qualified name of the file that stores the distro packages list that will be included in the image. Make sure that if the pkgs in the pkglist have dependency pkgs, the dependency pkgs should be found in one of the pkgdir', pkgdir => 'The name of the directory where the distro packages are stored. It could be set to multiple paths. The multiple paths must be separated by ",". The first path in the value of osimage.pkgdir must be the OS base pkg dir path, such as pkgdir=/install/rhels6.2/x86_64,/install/updates . In the os base pkg path, there are default repository data. And in the other pkg path(s), the users should make sure there are repository data. If not, use "createrepo" command to create them. For ubuntu, multiple mirrors can be specified in the pkgdir attribute, the mirrors must be prefixed by the protocol(http/ssh) and delimited with "," between each other.', otherpkglist => 'The fully qualified name of the file that stores non-distro package lists that will be included in the image. It could be set to multiple paths. The multiple paths must be separated by ",".', @@ -1029,8 +1029,9 @@ passed as argument rather than by table value', " dhcpsetup: If set to 'n', it will skip the dhcp setup process in the nodeset cmd.\n\n" . " dhcplease: The lease time for the dhcp client. The default value is 43200.\n\n" . " disjointdhcps: If set to '1', the .leases file on a service node only contains\n" . -" the nodes it manages. The default value is '0'.\n" . -" '0' value means include all the nodes in the subnet.\n\n" . +" the nodes it manages. And when 'sharedtftp' is disabled, nodeset handles\n" . +" boot loader configuration on a service node only for the nodes it manages.\n" . +" The default value is '0'. It means include all the nodes in the subnet.\n\n" . " pruneservices: Whether to enable service pruning when noderm is run (i.e.\n" . " removing DHCP entries when noderm is executed)\n\n" . " managedaddressmode: The mode of networking configuration during node provision.\n" . @@ -1590,7 +1591,7 @@ zvmivp => { The xCAT object definition commands support to use nicextraparams. as the sub attributes.', nicdevices => 'Comma-separated list of NIC device per NIC, multiple ethernet devices can be bonded as bond device, these ethernet devices are separated by | . !|,!, e.g. bond0!eth0|eth2,br0!bond0. The xCAT object definition commands support to use nicdevices. as the sub attributes.', nicsadapter => 'Comma-separated list of extra parameters that will be used for each NIC configuration. - !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes.', + !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face', comments => 'Any user-written notes.', disable => "Set to 'yes' or '1' to comment out this row.", }, diff --git a/perl-xCAT/xCAT/Scope.pm b/perl-xCAT/xCAT/Scope.pm index a7aaf2588..39bb3da44 100644 --- a/perl-xCAT/xCAT/Scope.pm +++ b/perl-xCAT/xCAT/Scope.pm @@ -2,6 +2,7 @@ package xCAT::Scope; use xCAT::Utils; use xCAT::Table; +use xCAT::TableUtils; use xCAT::ServiceNodeUtils qw(getSNList); @@ -125,16 +126,17 @@ sub get_parallel_scope { =head3 get_broadcast_scope_with_parallel Convert a request object to an array of multiple requests according to the - splitted node range. + splitted node range. Also it replicates the requests to all required service + nodes or management node. Arguments: Reference of request - Callback: TODO, Optional, the Callback will be used to filter the nodes + SN list: Array of target service nodes Returns: An array of requests Error: none Example: - my $reqs = xCAT::Scope->get_broadcast_scope($request); + my $reqs = xCAT::Scope->get_broadcast_scope_with_parallel($request, \@snlist); =cut #----------------------------------------------------------------------------- @@ -145,25 +147,118 @@ sub get_broadcast_scope_with_parallel { } #Exit if the packet has been preprocessed in its history if ($req->{_xcatpreprocessed}->[0] == 1) { return [$req]; } + $req->{_xcatpreprocessed}->[0] = 1; - #Handle the one for current management/service node - my $reqs = get_parallel_scope($req); - my @requests = @$reqs; + my $snlist = shift; - #Broadcast the request to other management/service nodes - foreach (xCAT::ServiceNodeUtils->getSNList()) { - if (xCAT::NetworkUtils->thishostisnot($_)) { - my $xcatdest = $_; - my $reqcopy = {%$req}; - $reqcopy->{'_xcatdest'} = $_; - $reqcopy->{_xcatpreprocessed}->[0] = 1; - #Apply callback to filter the node range in future. - $reqs = get_parallel_scope($reqcopy); - foreach (@$reqs) { - push @requests, {%$_}; - } + my $reqs = get_parallel_scope($req); + + my @requests = (); # The request array will be return. + push @requests, @$reqs; + + # when this method is called on service node, it is required to broadcast to MN too. + # get site.master from DB in order to dispatch to MN ( MN will not be added in servicenode table) + if ( xCAT::Utils->isServiceNode() ) { + my @entries = xCAT::TableUtils->get_site_attribute("master"); + my $master = $entries[0]; + foreach (@$reqs) { + my $reqcopy = {%$_}; + $reqcopy->{'_xcatdest'} = $master; + push @requests, $reqcopy; } } + + #Broadcast the request to all service nodes + foreach (@$snlist) { + my $xcatdest = $_; + next unless (xCAT::NetworkUtils->thishostisnot($xcatdest)); + + foreach (@$reqs) { + my $reqcopy = {%$_}; + $reqcopy->{'_xcatdest'} = $xcatdest; + push @requests, $reqcopy; + } + } + return \@requests; +} + +#----------------------------------------------------------------------------- + +=head3 get_broadcast_disjoint_scope_with_parallel + + Convert a request object to an array of multiple requests according to the + splitted node range. Also it replicates the requests to all required service + nodes or management node, but the request to a service node will only contains + the node range it manages. + + Arguments: + Reference of request + SN hash: Hash of target service nodes => Managed CNs + Special servers: Array of servers, those servers are required to handle whole noderange. + Returns: An array of requests + Error: + none + Example: + my $reqs = xCAT::Scope->get_broadcast_disjoint_scope_with_parallel($request, \@snhash); +=cut + +#----------------------------------------------------------------------------- +sub get_broadcast_disjoint_scope_with_parallel { + my $req = shift; + if ($req =~ /xCAT::Scope/) { + $req = shift; + } + #Exit if the packet has been preprocessed in its history + if ($req->{_xcatpreprocessed}->[0] == 1) { return [$req]; } + $req->{_xcatpreprocessed}->[0] = 1; + + my $sn_hash = shift; + my $extras = shift; + + my @requests = (); # The request array will be return. + my $reqs = get_parallel_scope($req); + + my $handled4me = 0; # indicate myself is already handled. + my %prehandledhash = ();# the servers which is already handled. + foreach (@$extras) { + my $xcatdest = $_; + if (xCAT::NetworkUtils->thishostisnot($xcatdest)) { + # TODO, To avoid sending request to a multi-home server many times. + foreach (@$reqs) { + my $reqcopy = {%$_}; + $reqcopy->{'_xcatdest'} = $xcatdest; + push @requests, $reqcopy; + } + $prehandledhash{$xcatdest} = 1; + } elsif ($handled4me == 0) { + push @requests, @$reqs; + $handled4me = 1; + } + } + + #Broadcast the request to all available service nodes + foreach (keys %$sn_hash) { + my $xcatdest = $_; + # to check if the SN already handled + next if (exists($prehandledhash{$xcatdest})); + + if (xCAT::NetworkUtils->thishostisnot($xcatdest)) { + my $reqcopy = {%$req}; + $reqcopy->{'_xcatdest'} = $xcatdest; + $reqcopy->{'node'} = $sn_hash->{$xcatdest}; + + $reqs = get_parallel_scope($reqcopy); + push @requests, @$reqs; + } elsif ($handled4me == 0) { + my $reqcopy = {%$req}; + $reqcopy->{'node'} = $sn_hash->{$xcatdest}; + + $reqs = get_parallel_scope($reqcopy); + push @requests, @$reqs; + $handled4me = 1; + } + } + return \@requests; } diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 576598ef9..508de47c7 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -844,12 +844,28 @@ sub new } my $oldumask = umask 0077; - unless ($::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} }) { #= $self->{tabname}; - $::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} } = - DBI->connect($self->{connstring}, $self->{dbuser}, $self->{dbpass}, { AutoCommit => $self->{realautocommit} }); + my $retry = 0; + while (!$::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} }) { + eval { + local $SIG{__WARN__} = sub { + my $message = shift; + if ($retry == 3 && $message) { + xCAT::MsgUtils->message("S", "Failed to connect to ".$self->{tabname}." table after retrying $retry times: $message"); + } + }; + $::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} } = + DBI->connect($self->{connstring}, $self->{dbuser}, $self->{dbpass}, { AutoCommit => $self->{realautocommit} }); + }; + if ($::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} }) { + last; + } elsif ($retry == 3) { + last; + } else { + sleep (2**$retry); + } + $retry++; } umask $oldumask; - $self->{dbh} = $::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} }; #Store the Table object reference as afflicted by changes to the DBH @@ -2186,6 +2202,12 @@ sub getNodesAttribs { $self->{nodelist}->{_use_cache} = 1; } my $rethash; + my @hierarchy_attrs = (); + my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs"); + if ($hierarchy_field) { + @hierarchy_attrs = split(/,/, $hierarchy_field); + } + $options{hierarchy_attrs} = \@hierarchy_attrs; foreach (@$nodelist) { my @nodeentries = $self->getNodeAttribs($_, \@realattribs, %options); $rethash->{$_} = \@nodeentries; #$self->getNodeAttribs($_,\@attribs); @@ -2435,6 +2457,16 @@ sub getNodeAttribs } else { @attribs = @_; } + + if (!exists($options{hierarchy_attrs})) { + my @hierarchy_attrs = (); + my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs"); + if ($hierarchy_field) { + @hierarchy_attrs = split(/,/, $hierarchy_field); + } + $options{hierarchy_attrs} = \@hierarchy_attrs; + } + my $datum; my $oldusecache; my $nloldusecache; @@ -2665,12 +2697,7 @@ sub getNodeAttribs_nosub_returnany my $attrib; my $result; - my @hierarchy_attrs; - my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs"); - if ($hierarchy_field) { - @hierarchy_attrs = split(/,/, $hierarchy_field); - } - + my @hierarchy_attrs = @{ $options{hierarchy_attrs} }; my $data = $results[0]; if (defined {$data}) { #if there was some data for the node, loop through and check it foreach $result (@results) { @@ -3103,7 +3130,13 @@ sub getAllNodeAttribs #} end SF 3580 #my $localhash = $self->getNodesAttribs(\@nodes,$attribq); #NOTE: This is stupid, rebuilds the cache for every entry, FIXME - + my %options; + my @hierarchy_attrs = (); + my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs"); + if ($hierarchy_field) { + @hierarchy_attrs = split(/,/, $hierarchy_field); + } + $options{hierarchy_attrs} = \@hierarchy_attrs; foreach (@nodes) { if ($donenodes{$_}) { next; } @@ -3117,7 +3150,7 @@ sub getAllNodeAttribs # } #} else { my @attrs = - $self->getNodeAttribs($_, $attribq); #@{$localhash->{$_}} #$self->getNodeAttribs($_, $attribq) + $self->getNodeAttribs($_, $attribq, %options); #@{$localhash->{$_}} #$self->getNodeAttribs($_, $attribq) ; #Logic moves to getNodeAttribs #} #populate node attribute by default, this sort of expansion essentially requires it. diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 5ef15b608..b8978ee1e 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -4,7 +4,6 @@ package xCAT::Usage; use Getopt::Long; use xCAT::Utils; - #------------------------------------------------------------------------------- =head1 xCAT::Usage @@ -33,7 +32,7 @@ my %usage = ( rpower noderange [on|off|reset|boot|stat|state|status] rpower noderange [pduon|pduoff|pdustat] OpenPOWER OpenBMC: - rpower noderange [on|off|reset|boot|stat|state|status] + rpower noderange [on|off|softoff|reset|boot|bmcreboot|bmcstate|stat|state|status] KVM Virtualization specific: rpower [boot] [ -c ] PPC (with IVM or HMC) specific: @@ -95,14 +94,12 @@ my %usage = ( Common: rinv [all|model|serial] [-V|--verbose] rinv [-h|--help|-v|--version] - BMC specific: - rinv [mprom|deviceid|uuid|guid|vpd|dimm|all] + BMC/MPA specific: + rinv [model|serial|asset|vpd|deviceid|guid|firm|dimm|mprom|all] OpenPOWER (IPMI) server specific: rinv [model|serial|deviceid|uuid|guid|vpd|mprom|firm|all] OpenPOWER (OpenBMC) server specific: - rinv [model|serial|firm|cpu|dimm|all] - MPA specific: - rinv [firm|bios|diag|mprom|sprom|mparom|mac|mtm] + rinv [model|serial|firm|cpu|dimm|all] [-V|--verbose] PPC specific(with HMC): rinv [all|bus|config|serial|model|firm] PPC specific(using Direct FSP Management): @@ -121,7 +118,7 @@ my %usage = ( pdu specific: rinv noderange ", "rsetboot" => -"Usage: rsetboot [net|hd|cd|floppy|def|stat] [-V|--verbose] [-u] [-p] +"Usage: rsetboot [net|hd|cd|floppy|def|stat] [-u] [-p] rsetboot [-h|--help|-v|--version]", "rbootseq" => "Usage: @@ -327,6 +324,9 @@ my %usage = ( "Usage: lsslp [-h|--help|-v|--version] lsslp [][-V|--verbose][-i ip[,ip..]][-w][-r|-x|-z][-n][-I][-s FRAME|CEC|MM|IVM|RSA|HMC|CMM|IMM2|FSP] [-u] [--range IPranges][-t tries][--vpdtable][-C counts][-T timeout]", + "pdudiscover" => + "Usage: pdudiscover [-h|--help|-v|--version] + pdudiscover [|--range ipranges] [-r|-x|-z] [-w] [-V|--verbose] [--setup]", "switchdiscover" => "Usage: switchdiscover [-h|--help|-v|--version] switchdiscover [|--range ipranges] [-s scan_methods] [-r|-x|-z] [-w] [-V|--verbose] [--setup]", @@ -345,8 +345,10 @@ my %usage = ( rflash -p [--activate {disruptive|deferred}] [-d ] rflash [--commit | --recover] [-V|--verbose] rflash [--bpa_acdl] - PPC64LE (using BMC Management) specific: - rflash [-c | --check] [--retry=] [-V] ", + PPC64LE (using IPMI Management) specific: + rflash [-c|--check] [--retry=] [-V] [|-d=] + PPC64LE (using OpenBMC Management) specific: + rflash [-c|--check] [-l|--list] [-a|--activate] [-u|--upload] [-d|--delete] [|]", "mkhwconn" => "Usage: mkhwconn [-h|--help] @@ -487,7 +489,7 @@ Options: "Usage: Common: nodeset [-h|--help|-v|--version] - nodeset [shell|boot|runcmd=bmcsetup|osimage[=]|offline|shutdown|stat]", + nodeset [shell|boot|runcmd=bmcsetup|osimage[=]|offline|shutdown|stat [-a]]", "rmflexnode" => "Usage: rmflexnode [-h|--help|-v|--version] @@ -652,11 +654,11 @@ sub validateArgs { #filtered by GetOpt subroutine #fortunately the commands in this branch does not have such options foreach(@extrargs){ - if($_ !~ m/^-[-]?\S+/){ + if($_ and $_ !~ m/^-[-]?\S+/){ $count+=1; } } - if ($count!=1) { + unless (($command =~ m/^(rinstall|winstall)$/ and $count==0) or $count==1) { return [1,"Invalid argument: '".join(" ",@extrargs)."'"]; } } diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 9b7713222..29ea8a6f1 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -638,7 +638,7 @@ sub calc_conserver_version { my $ver_str = shift; my @vers = split(/\./, $ver_str); - return ord($vers[2]) + ord($vers[1]) * 10000 + ord($vers[0]) * 100000000; + return int($vers[2]) + int($vers[1]) * 10000 + int($vers[0]) * 100000000; } @@ -4025,14 +4025,14 @@ sub servicemap { # (general service name) => {list of possible service names} # my %svchash = ( - "dhcp" => [ "dhcp3-server", "dhcpd", "isc-dhcp-server" ], - "nfs" => [ "nfsserver", "nfs-server", "nfs", "nfs-kernel-server" ], - "named" => [ "named", "bind9" ], - "syslog" => [ "syslog", "syslogd", "rsyslog" ], - "firewall" => [ "iptables", "firewalld", "ufw" ], - "http" => [ "apache2", "httpd" ], - "ntpserver" => [ "ntpd", "ntp" ], - "mysql" => [ "mysqld", "mysql" ], + "dhcp" => [ "dhcp3-server", "dhcpd", "isc-dhcp-server" ], + "nfs" => [ "nfsserver", "nfs-server", "nfs", "nfs-kernel-server" ], + "named" => [ "named", "bind9" ], + "syslog" => [ "syslog", "syslogd", "rsyslog" ], + "firewall" => [ "iptables", "firewalld", "ufw" ], + "http" => [ "apache2", "httpd" ], + "ntpserver" => [ "ntpd", "ntp" ], + "mysql" => [ "mysqld", "mysql", "mariadb" ], ); my $path = undef; diff --git a/perl-xCAT/xCAT/data/switchinfo.pm b/perl-xCAT/xCAT/data/switchinfo.pm new file mode 100644 index 000000000..79c36abfa --- /dev/null +++ b/perl-xCAT/xCAT/data/switchinfo.pm @@ -0,0 +1,45 @@ +# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html + +#This module includes some glocal table to look up the switch type via mac and vendor + +package xCAT::data::switchinfo; + +require Exporter; +@ISA = qw(Exporter); +@EXPORT = qw(); +@EXPORT_OK = qw(global_mac_identity global_switch_type); + +use strict; + +#the hash to look up switch type with MAC +our %global_mac_identity = ( + "a8:97:dc" => "BNT G8052 switch", + "6c:ae:8b" => "BNT G8264-T switch", + "fc:cf:62" => "BNT G8124 switch", + "7c:fe:90" => "Mellanox IB switch", + "cc:37:ab" => "Edgecore Networks Switch", + "8c:ea:1b" => "Edgecore Networks Switch" +); + +#the hash to lookup switch type with vendor +our %global_switch_type = ( + Juniper => "Juniper", + juniper => "Juniper", + Cisco => "Cisco", + cisco => "Cisco", + BNT => "BNT", + Blade => "BNT", + G8052 => "BNT", + RackSwitch => "BNT", + Mellanox => "Mellanox", + mellanox => "Mellanox", + MLNX => "Mellanox", + MELLAN => "Mellanox", + Cumulus => "onie", + cumulus => "onie", + Edgecore => "onie" +); + + + +1; diff --git a/travis.pl b/travis.pl new file mode 100644 index 000000000..526cb5977 --- /dev/null +++ b/travis.pl @@ -0,0 +1,525 @@ +# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html + +use strict; +use warnings; +use Getopt::Long; +use Data::Dumper; +use Time::Local; +use File::Basename; +use File::Path; +use File::Find; +use LWP::UserAgent; +use HTTP::Request; +use Encode; +use Encode::CN; +use JSON; +use URI::Escape; +use LWP::Simple; + +use Term::ANSIColor qw(:constants); +$Term::ANSIColor::AUTORESET = 1; + +#---Global attributes--- +my $rst = 0; +my $check_result_str="``CI CHECK RESULT`` : "; +my $last_func_start = timelocal(localtime()); + +#-------------------------------------------------------- +# Fuction name: runcmd +# Description: run a command after 'cmd' label in one case +# Atrributes: +# Retrun code: +# $::RUNCMD_RC : the return code of command +# @$outref : the output of command +#-------------------------------------------------------- +sub runcmd +{ + my ($cmd) = @_; + my $rc = 0; + $::RUNCMD_RC = 0; + my $outref = []; + @$outref = `$cmd 2>&1`; + if ($?) + { + $rc = $?; + $rc = $rc >> 8; + $::RUNCMD_RC = $rc; + } + chomp(@$outref); + return @$outref; + +} + +#-------------------------------------------------------- +# Fuction name: get_files_recursive +# Description: Search all file in one directory recursively +# Atrributes: +# $dir (input attribute) +# The target scan directory +# $files_path_ref (output attribute) +# the reference of array where save all vaild files under $dir +# Retrun code: +#-------------------------------------------------------- +sub get_files_recursive +{ + my $dir = shift; + my $files_path_ref = shift; + + my $fd = undef; + if(!opendir($fd, $dir)){ + print "[get_files_recursive]: failed to open $dir :$!\n"; + return 1; + } + + for (; ;) + { + my $direntry = readdir($fd); + last unless (defined($direntry)); + next if ($direntry =~ m/^\.\w*/); + next if ($direntry eq '..'); + my $target = "$dir/$direntry"; + if (-d $target) { + get_files_recursive($target, $files_path_ref); + } else { + push(@{$files_path_ref}, glob("$target\n")); + } + } + closedir($fd); + return 0; +} + +#-------------------------------------------------------- +# Fuction name: check_pr_format +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub check_pr_format{ + if($ENV{'TRAVIS_EVENT_TYPE'} eq "pull_request"){ + my $pr_url = "https://api.github.com/repos/$ENV{'TRAVIS_REPO_SLUG'}/pulls/$ENV{'TRAVIS_PULL_REQUEST'}"; + my $pr_url_resp = get($pr_url); + my $pr_content = decode_json($pr_url_resp); + my $pr_title = $pr_content->{title}; + my $pr_body = $pr_content->{body}; + + #print "[check_pr_format] Dumper pr_content:\n"; + #print Dumper $pr_content; + print "[check_pr_format] pr title = $pr_title\n"; + print "[check_pr_format] pr body = $pr_body \n"; + + my $checkrst=""; + if(! $pr_title){ + $checkrst.="Miss title."; + } + if(! $pr_body){ + $checkrst.="Miss description."; + } + + if(length($checkrst) == 0){ + $check_result_str .= "> **PR FORMAT CORRECT**"; + send_back_comment("$check_result_str"); + }else{ + $check_result_str .= "> **PR FORMAT ERROR** : $checkrst"; + send_back_comment("$check_result_str"); + return 1; + } + } + return 0; +} + +#-------------------------------------------------------- +# Fuction name: check_pr_format +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub send_back_comment{ + my $message = shift; + + my $comment_url = "https://api.github.com/repos/$ENV{'TRAVIS_REPO_SLUG'}/issues/$ENV{'TRAVIS_PULL_REQUEST'}/comments"; + my $comment_url_resp = get($comment_url); + my $json = new JSON; + my $comment_content = $json->decode($comment_url_resp); + my $comment_len = @$comment_content; + + #print "\n\n>>>>>Dumper comment_content: $comment_len\n"; + #print Dumper $comment_content; + + my $post_url = $comment_url; + my $post_method = "POST"; + if($comment_len > 0){ + foreach my $comment (@{$comment_content}){ + if($comment->{'body'} =~ /CI CHECK RESULT/) { + $post_url = $comment->{'url'}; + $post_method = "PATCH"; + } + } + } + + print "[send_back_comment] method = $post_method to $post_url\n"; + `curl -u "$ENV{'xcatbotuser'}:$ENV{'xcatbotpw'}" -X $post_method -d '{"body":"$message"}' $post_url`; +} + +#-------------------------------------------------------- +# Fuction name: build_xcat_core +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub build_xcat_core{ + my @output; + my @cmds = ("gpg --list-keys", + "sed -i '/SignWith: yes/d' $ENV{'PWD'}/build-ubunturepo"); + foreach my $cmd (@cmds){ + print "[build_xcat_core] to run $cmd\n"; + @output = runcmd("$cmd"); + if($::RUNCMD_RC){ + print "[build_xcat_core] $cmd ....[Failed]\n"; + send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information"); + return 1; + } + } + + my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1"; + @output = runcmd("$cmd"); + print ">>>>>Dumper the output of '$cmd'\n"; + print Dumper \@output; + if($::RUNCMD_RC){ + my $lastline = $output[-1]; + $lastline =~ s/[\r\n\t\\"']*//g; + print "[build_xcat_core] $cmd ....[Failed]\n"; + #print ">>>>>Dumper the output of '$cmd'\n"; + #print Dumper \@output; + $check_result_str .= "> **BUILD ERROR**, Please click ``Details`` label in ``Merge pull request`` box for detailed information"; + send_back_comment("$check_result_str"); + return 1; + }else{ + print "[build_xcat_core] $cmd ....[Pass]\n"; + $check_result_str .= "> **BUILD SUCCESSFUL** "; + send_back_comment("$check_result_str"); + } + +# my $buildpath ="/home/travis/build/xcat-core/"; +# my @buildfils = (); +# get_files_recursive("$buildpath", \@buildfils); +# print "\n-----------Dumper build files-----------\n"; +# print Dumper \@buildfils; + + return 0; +} + +#-------------------------------------------------------- +# Fuction name: install_xcat +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub install_xcat{ + + my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh", + "sudo chmod 777 /etc/apt/sources.list", + "sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/xcat-dep trusty main\" >> /etc/apt/sources.list", + "sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/xcat-dep trusty main\" >> /etc/apt/sources.list", + "sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -", + "sudo apt-get -qq update"); + my @output; + foreach my $cmd (@cmds){ + print "[install_xcat] to run $cmd\n"; + @output = runcmd("$cmd"); + if($::RUNCMD_RC){ + print RED "[install_xcat] $cmd. ...[Failed]\n"; + print "[install_xcat] error message:\n"; + print Dumper \@output; + $check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information "; + send_back_comment("$check_result_str"); + return 1; + } + } + + my $cmd = "sudo apt-get install xcat --force-yes"; + @output = runcmd("$cmd"); + #print ">>>>>Dumper the output of '$cmd'\n"; + #print Dumper \@output; + if($::RUNCMD_RC){ + my $lastline = $output[-1]; + $lastline =~ s/[\r\n\t\\"']*//g; + print "[install_xcat] $cmd ....[Failed]\n"; + print ">>>>>Dumper the output of '$cmd'\n"; + print Dumper \@output; + $check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information"; + send_back_comment("$check_result_str"); + return 1; + }else{ + print "[install_xcat] $cmd ....[Pass]\n"; + + print "\n------To config xcat and check if xcat work correctly-----\n"; + @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f travis", + "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=travis policy.rule=allow", + ". /etc/profile.d/xcat.sh && tabdump policy", + ". /etc/profile.d/xcat.sh && tabdump site", + ". /etc/profile.d/xcat.sh && lsxcatd -a", + "ls /opt/xcat/sbin", + "service xcatd status"); + my $ret = 0; + foreach my $cmd (@cmds){ + print "\n[install_xcat] To run $cmd.....\n"; + @output = runcmd("$cmd"); + print Dumper \@output; + if($::RUNCMD_RC){ + print RED "[install_xcat] $cmd. ...[Failed]\n"; + #print Dumper \@output; + $ret = 1; + }else{ + print "[install_xcat] $cmd....[Pass]\n"; + } + } + if($ret){ + $check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information"; + send_back_comment("$check_result_str"); + return 1; + } + $check_result_str .= "> **INSTALL XCAT SUCCESSFUL**"; + send_back_comment("$check_result_str"); + } + return 0; +} + + +#-------------------------------------------------------- +# Fuction name: check_syntax +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub check_syntax{ + my @output; + my @syntax_err; + my $ret = 0; + + my @target_dirs=("/opt/xcat", + "/install"); + foreach my $dir (@target_dirs){ + my @files = (); + get_files_recursive("$dir", \@files); + + foreach my $file (@files) { + next if($file =~ /\/opt\/xcat\/share\/xcat\/netboot\/genesis\//); + next if($file =~ /\/opt\/xcat\/probe\//); + + @output = runcmd("file $file"); + if($output[0] =~ /perl /i){ + @output = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && perl -I /opt/xcat/lib/perl -I /opt/xcat/lib -I /usr/lib/perl5 -I /usr/share/perl -c $file'"); + if($::RUNCMD_RC){ + push @syntax_err, @output; + $ret = 1; + } + #}elsif($output[0] =~ /shell/i){ + # @output = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && sh -n $file'"); + # if($::RUNCMD_RC){ + # push @syntax_err, @output; + # $ret = 1; + # } + } + } + } + + if(@syntax_err){ + print "[check_syntax] syntax checking ....[Failed]\n"; + print "[check_syntax] Dumper error message:\n"; + print Dumper @syntax_err; + $check_result_str .= "> **CODE SYNTAX ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information"; + send_back_comment("$check_result_str"); + }else{ + print "[check_syntax] syntax checking ....[Pass]\n"; + $check_result_str .= "> **CODE SYNTAX CORRECT**"; + send_back_comment("$check_result_str"); + } + + return $ret; +} + +#-------------------------------------------------------- +# Fuction name: run_fast_regression_test +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub run_fast_regression_test{ + my $cmd = "sudo apt-get install xcat-test --force-yes"; + my @output = runcmd("$cmd"); + if($::RUNCMD_RC){ + print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; + print Dumper \@output; + return 1; + }else{ + print "[run_fast_regression_test] $cmd .....:\n"; + print Dumper \@output; + } + + $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l bundleinfo'"; + @output = runcmd("$cmd"); + if($::RUNCMD_RC){ + print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; + print "[run_fast_regression_test] error dumper:\n"; + print Dumper \@output; + return 1; + }else{ + print "[run_fast_regression_test] $cmd .....:\n"; + print Dumper \@output; + } + + my $hostname = `hostname`; + chomp($hostname); + print "hostname = $hostname\n"; + my $conf_file = "$ENV{'PWD'}/regression.conf"; + $cmd = "echo '[System]' > $conf_file; echo 'MN=$hostname' >> $conf_file; echo '[Table_site]' >> $conf_file; echo 'key=domain' >>$conf_file; echo 'value=pok.stglabs.ibm.com' >> $conf_file"; + @output = runcmd("$cmd"); + if($::RUNCMD_RC){ + print RED "[run_fast_regression_test] $cmd ....[Failed]"; + print "[run_fast_regression_test] error dumper:\n"; + print Dumper \@output; + return 1; + } + + print "Dumper regression conf file:\n"; + @output = runcmd("cat $conf_file"); + print Dumper \@output; + + my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'"); + my $casenum = @caseslist; + + my $x = 0; + my @failcase; + my $passnum = 0; + my $failnum = 0; + foreach my $case (@caseslist){ + ++$x; + $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -f $conf_file -t $case'"; + print "[run_fast_regression_test] run $x: $cmd\n"; + @output = runcmd("$cmd"); + #print Dumper \@output; + for(my $i = $#output; $i>-1; --$i){ + if($output[$i] =~ /------END::(.+)::Failed/){ + push @failcase, $1; + ++$failnum; + print Dumper \@output; + last; + }elsif ($output[$i] =~ /------END::(.+)::Passed/){ + ++$passnum; + last; + } + } + } + + if($failnum){ + my $log_str = join (",", @failcase ); + $check_result_str .= "> **FAST REGRESSION TEST Failed**: Totalcase $casenum Pass $passnum failed $failnum FailedCases: $log_str. Please click ``Details`` label in ``Merge pull request`` box for detailed information"; + send_back_comment("$check_result_str"); + return 1; + }else{ + $check_result_str .= "> **FAST REGRESSION TEST Successful**: Totalcase $casenum Pass $passnum failed $failnum"; + send_back_comment("$check_result_str"); + } + + return 0; +} + +#-------------------------------------------------------- +# Fuction name: run_fast_regression_test +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub mark_time{ + my $func_name=shift; + my $nowtime = timelocal(localtime()); + my $nowtime_str = scalar(localtime()); + my $duration = $nowtime - $last_func_start; + $last_func_start = $nowtime; + print "[mark_time] $nowtime_str, ElapsedTime of $func_name is $duration s\n"; +} + +#===============Main Process============================= + +#Dumper Travis Environment Attribute +print GREEN "\n------Dumper Travis Environment Attribute------\n"; +my @travis_env_attr = ("TRAVIS_REPO_SLUG", + "TRAVIS_BRANCH", + "TRAVIS_EVENT_TYPE", + "TRAVIS_PULL_REQUEST", + "GITHUB_TOKEN", + "USERNAME", + "PASSWORD", + "PWD"); +foreach (@travis_env_attr){ + if($ENV{$_}) { + print "$_ = '$ENV{$_}'\n"; + } else { + print "$_ = ''\n"; + } +} + +my @os_info = runcmd("cat /etc/os-release"); +print "Current OS information:\n"; +print Dumper \@os_info; + +my @perl_vserion = runcmd("perl -v"); +print "Current perl information:\n"; +print Dumper \@perl_vserion; + +#my @sh_version = runcmd("sudo bash -c 'sh --version'"); +#print "Current sh information:\n"; +#print Dumper \@sh_version; + +my @disk = runcmd("df -h"); +print "Disk information:\n"; +print Dumper \@disk; + +#Start to check the format of pull request +$last_func_start = timelocal(localtime()); +print GREEN "\n------To Check Pull Request Format------\n"; +$rst = check_pr_format(); +if($rst){ + print RED "Check pull request format failed\n"; + exit $rst; +} +mark_time("check_pr_format"); + +#Start to build xcat core + +print GREEN "\n------To Build xCAT core package------\n"; +$rst = build_xcat_core(); +if($rst){ + print RED "Build xCAT core package failed\n"; + exit $rst; +} +mark_time("build_xcat_core"); + +#Start to install xcat +print GREEN "\n------To install xcat------\n"; +$rst = install_xcat(); +if($rst){ + print RED "Install xcat failed\n"; + exit $rst; +} +mark_time("install_xcat"); + +#Check the syntax of changing code +print GREEN "\n------To check the syntax of changing code------\n"; +$rst = check_syntax(); +if($rst){ + print RED "check the syntax of changing code failed\n"; + exit $rst; +} +mark_time("check_syntax"); + +#run fast regression +print GREEN "\n------To run fast regression test------\n"; +$rst = run_fast_regression_test(); +if($rst){ + print RED "Run fast regression test failed\n"; + exit $rst; +} +mark_time("run_fast_regression_test"); + +exit 0; diff --git a/xCAT-OpenStack/postscripts/configgw b/xCAT-OpenStack/postscripts/configgw index 36c246eaf..e2b97be77 100755 --- a/xCAT-OpenStack/postscripts/configgw +++ b/xCAT-OpenStack/postscripts/configgw @@ -9,7 +9,7 @@ if [ -z "$1" ];then fi str_nic_name=$1 -str_ip_mask=`ip addr show dev $str_nic_name | grep inet | grep -v inet6 | awk '{print $2}' | head -n 1` +str_ip_mask=`ip -4 -o addr show dev $str_nic_name | awk '{print $4}' | head -n 1` str_ip=`echo $str_ip_mask | awk -F'/' '{print $1}'` str_mask=`echo $str_ip_mask | awk -F'/' '{print $2}'` diff --git a/xCAT-client/bin/pgsqlsetup b/xCAT-client/bin/pgsqlsetup index 2f97f50b3..5e9152c3c 100755 --- a/xCAT-client/bin/pgsqlsetup +++ b/xCAT-client/bin/pgsqlsetup @@ -72,6 +72,8 @@ $::pgcmddir = "/usr/bin"; # pg cmds location $::debiancfgdir = "/etc/postgresql/9.1/main"; my $INIT; my $SETUPODBC; +my @LISTENADDRS; +my @ACCESSADDRS; my $NOSTART; my $SETUPPCM; my $HELP; @@ -83,6 +85,8 @@ if ( !GetOptions( 'i|init' => \$INIT, 'o|odbc' => \$SETUPODBC, + 'l|listen=s'=> \@LISTENADDRS, + 'a|access=s'=> \@ACCESSADDRS, 'N|nostart' => \$NOSTART, 'P|PCM' => \$SETUPPCM, 'h|help' => \$HELP, @@ -128,6 +132,13 @@ if ((!($INIT)) && ($SETUPODBC)) } +# create comma-separated list of additional listen addresses +my $listenaddrs = undef; +if (@LISTENADDRS) +{ + $listenaddrs = join ',', @LISTENADDRS; +} + # # Get OS # @@ -428,7 +439,7 @@ sub usage "Usage:\npgsqlsetup - Performs the setup of PostgreSQL for xCAT to use as its database. See man pgsqlsetup for more information." ); my $msg = -"pgsqlsetup <-h|--help>\n <-v|--version>\n <-i|--init> [-N|--nostart] [-P|--PCM] [-o|--odbc] [-V|--verbose]\n <-o|--odbc> [-V|--verbose]"; +"pgsqlsetup <-h|--help>\n <-v|--version>\n <-i|--init> [-N|--nostart] [-l|--listen address] [-a|--access address] [-P|--PCM] [-o|--odbc] [-V|--verbose]\n <-o|--odbc> [-V|--verbose]"; xCAT::MsgUtils->message('I', "$msg"); } @@ -726,7 +737,8 @@ sub initpgdb } &runpostgrescmd($cmd); - # insert MN ip address in the # IPv4 local connections: stanza of + # insert MN ip address and any -a addresses + # in the # IPv4 local connections: stanza of # the /var/lib/pgsql/data/pg_hba.conf file # if it is not already there @@ -735,43 +747,44 @@ sub initpgdb if ($debianflag) { $hbafile = $::debiancfgdir . "/pg_hba.conf"; } - $cmd = "fgrep $::MN $hbafile"; + $cmd = "cp $hbafile $hbafile.org"; # backup the original xCAT::Utils->runcmd($cmd, -1); - if ($::RUNCMD_RC != 0) # not already there - { - $cmd = "cp $hbafile $hbafile.org"; # backup the original + + push @ACCESSADDRS, $::MN; # add management node to list + my $insertstr = undef; # start with empty string + for my $hbaaccess (@ACCESSADDRS) + { + $cmd = "fgrep $hbaaccess $hbafile"; xCAT::Utils->runcmd($cmd, -1); - my $insertstr = "host all all "; - $insertstr .= $::MN; - $insertstr .= "\/32 md5 "; - $cmd = -"awk '{gsub(\"\IPv4 local connections:\",\"\IPv4 local connections:\\n$insertstr \"); print}' $hbafile > $hbafile.xcat"; - xCAT::Utils->runcmd($cmd, 0); - - if ($::RUNCMD_RC != 0) + if ($::RUNCMD_RC != 0) # not already there { - - xCAT::MsgUtils->message("E", " $cmd failed."); - exit(1); + $insertstr .= "host all all "; + $insertstr .= $hbaaccess; + $insertstr .= "\/32 md5\\n "; # add entry line to string } - $cmd = "cp -p $hbafile.xcat $hbafile "; - xCAT::Utils->runcmd($cmd, 0); - if ($::RUNCMD_RC != 0) - { - - xCAT::MsgUtils->message("E", " $cmd failed."); - exit(1); - } - $cmd = "rm $hbafile.xcat "; - xCAT::Utils->runcmd($cmd, 0); - if ($::RUNCMD_RC != 0) - { - - xCAT::MsgUtils->message("E", " $cmd failed."); - exit(1); - } - $dbrestart = 1; - } + } + $cmd = "awk '{gsub(\"\IPv4 local connections:\",\"\IPv4 local connections:\\n$insertstr \"); print}' $hbafile > $hbafile.xcat"; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { + xCAT::MsgUtils->message("E", " $cmd failed."); + exit(1); + } + $cmd = "cp -p $hbafile.xcat $hbafile "; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { + xCAT::MsgUtils->message("E", " $cmd failed."); + exit(1); + } + $cmd = "rm $hbafile.xcat "; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { + xCAT::MsgUtils->message("E", " $cmd failed."); + exit(1); + } + $dbrestart = 1; # setup the postgresql.conf file my $pgconf = $::installdatadir; @@ -789,6 +802,10 @@ sub initpgdb if ($::osname eq 'Linux') { $cmd = qq~ echo listen_addresses = \\'localhost,$::MN\\' >> $pgconf~; + if ($::listenaddrs) + { + $cmd = qq~ echo listen_addresses = \\'localhost,$::MN,$::listenaddrs\\' >> $pgconf~; + } `$cmd`; } @@ -796,6 +813,10 @@ sub initpgdb if ($::osname eq 'AIX') { $cmd = qq~ echo listen_addresses = \\'$::MN\\' >> $pgconf~; + if ($::listenaddrs) + { + $cmd = qq~ echo listen_addresses = \\'$::MN,$::listenaddrs\\' >> $pgconf~; + } `$cmd`; $cmd = qq~echo logging_collector = on >> $pgconf~; `$cmd`; diff --git a/xCAT-client/bin/rcons b/xCAT-client/bin/rcons index 65d8d8000..c5b1b78df 100755 --- a/xCAT-client/bin/rcons +++ b/xCAT-client/bin/rcons @@ -87,7 +87,7 @@ if [ $USE_CONFLUENT == "1" ] && ([ -x "/opt/confluent/bin/confetty" ] || [ -x "/ fi if [ -z "$CONSERVER" ]; then CONSERVER=`nodels $1 nodehm.conserver 2>/dev/null | awk -F: '{print $2}' | tr -d ' '` - declare -a ipaddrs=`ip addr | grep 'inet' | awk {'print $2'} | cut -d/ -f1 | grep -v : | tr '\n' ' '` + declare -a ipaddrs=`ip -o a | awk {'print $4'} | cut -d/ -f1 | grep -v : | tr '\n' ' '` for IP in ${ipaddrs[*]}; do if [[ "${CONSERVER}" == "${IP}" ]]; then # conserver is the same node, do not connect using -s diff --git a/xCAT-client/bin/rinstall b/xCAT-client/bin/rinstall index 9d989a2e7..90cc60e12 100755 --- a/xCAT-client/bin/rinstall +++ b/xCAT-client/bin/rinstall @@ -21,6 +21,7 @@ use Getopt::Long; use xCAT::MsgUtils; use xCAT::Utils; use xCAT::Client; +use xCAT::NodeRange; use Cwd; use strict; @@ -65,15 +66,31 @@ while ($arg =~ /^-/) { $cmdref->{noderange}->[0] = $arg; push(@{ $cmdref->{arg} }, @ARGV); +my $startconsole=0; +if(grep m/^-c|--console$/,@ARGV){ + $startconsole=1; +} + my $noderange = $cmdref->{noderange}->[0]; # save the noderange +my @noderange=xCAT::NodeRange::noderange($noderange); + +if($bname eq "rinstall" and $startconsole==1 and scalar @noderange!=1 ){ + xCAT::MsgUtils->message("E", "Error: rinstall -c/--console can only be run against one node! Please use winstall -c/--console for multiple nodes."); + exit 1; +} + +# Allow to print server information when -V/--verbose +foreach (reverse(@ARGV)) { + if ($_ eq '-V' || $_ eq '--verbose') { + $ENV{'XCATSHOWSVR'} = 1; + last; + } +} # ok call Client to run the plugin rinstall.pm xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response); - if ($xCAT::Client::EXITCODE == 0) # no errors { - my $startconsole = $cmdref->{startconsole}->[0]; - # if startconsole requested ( -c flag) for rinstall always for winstall # This is set in the rinstall plugin if ($startconsole == 1) { @@ -82,9 +99,7 @@ if ($xCAT::Client::EXITCODE == 0) # no errors exec("rcons $noderange"); } elsif (basename($0) =~ /winstall/) { - # winstall can commence a wcons command to the noderange for monitoring the provision cycle - exec("wcons $noderange"); } } diff --git a/xCAT-client/bin/updatenode b/xCAT-client/bin/updatenode index 17e52db8e..ebfe392e2 100755 --- a/xCAT-client/bin/updatenode +++ b/xCAT-client/bin/updatenode @@ -200,5 +200,13 @@ foreach (keys %ENV) { } } +# Allow to print server information when -V/--verbose +foreach (reverse(@ARGV)) { + if ($_ eq '-V' || $_ eq '--verbose') { + $ENV{'XCATSHOWSVR'} = 1; + last; + } +} + xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response); exit $xCAT::Client::EXITCODE; diff --git a/xCAT-client/bin/xcatclient b/xCAT-client/bin/xcatclient index 83a918941..7f68579c9 100755 --- a/xCAT-client/bin/xcatclient +++ b/xCAT-client/bin/xcatclient @@ -102,5 +102,13 @@ foreach (keys %ENV) { } } +# Allow to print server information when -V +foreach (reverse(@ARGV)) { + if ($_ eq '-V') { + $ENV{'XCATSHOWSVR'} = 1; + last; + } +} + xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response); exit $xCAT::Client::EXITCODE; diff --git a/xCAT-client/bin/xcatclientnnr b/xCAT-client/bin/xcatclientnnr index e33b80408..566dec3b2 100755 --- a/xCAT-client/bin/xcatclientnnr +++ b/xCAT-client/bin/xcatclientnnr @@ -51,6 +51,14 @@ foreach (keys %ENV) { } } +# Allow to print server information when -V/--verbose +foreach (reverse(@ARGV)) { + if ($_ eq '-V' || $_ eq '--verbose') { + $ENV{'XCATSHOWSVR'} = 1; + last; + } +} + xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response); exit $xCAT::Client::EXITCODE; diff --git a/xCAT-client/debian/xcat-client.links b/xCAT-client/debian/xcat-client.links index d1e323960..ed2ac8134 100644 --- a/xCAT-client/debian/xcat-client.links +++ b/xCAT-client/debian/xcat-client.links @@ -37,7 +37,6 @@ opt/xcat/bin/xcatclient opt/xcat/bin/lstree opt/xcat/bin/xcatclient opt/xcat/bin/lsflexnode opt/xcat/bin/xcatclient opt/xcat/bin/rmflexnode opt/xcat/bin/xcatclient opt/xcat/bin/mkflexnode -opt/xcat/bin/xcatclient opt/xcat/bin/getadapter opt/xcat/bin/xcatclientnnr opt/xcat/bin/lsslp opt/xcat/bin/xcatclient opt/xcat/bin/imgcapture opt/xcat/bin/xcatclientnnr opt/xcat/bin/swapnodes @@ -126,6 +125,7 @@ opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmzone opt/xcat/bin/xcatclientnnr opt/xcat/bin/slpdiscover opt/xcat/bin/xcatclient opt/xcat/bin/xCATWorld opt/xcat/bin/xcatclientnnr opt/xcat/bin/switchdiscover +opt/xcat/bin/xcatclientnnr opt/xcat/bin/pdudiscover opt/xcat/bin/xcatclientnnr opt/xcat/bin/bmcdiscover opt/xcat/bin/xcatclientnnr opt/xcat/bin/makentp opt/xcat/bin/xcatclientnnr opt/xcat/sbin/rescanplugins diff --git a/xCAT-client/pods/man1/getadapter.1.pod b/xCAT-client/pods/man1/getadapter.1.pod deleted file mode 100644 index d9e43c6e9..000000000 --- a/xCAT-client/pods/man1/getadapter.1.pod +++ /dev/null @@ -1,83 +0,0 @@ -=head1 NAME - -B - Obtain all network adapters's predictable name and some other information before provision or network configuration. - -=head1 SYNOPSIS - -B I [B<-f>] - -B [B<-h>|B<--help>|B<-v>|B<--version>|B<-V>] - -=head1 DESCRIPTION - -Traditionally, network interfaces in Linux are enumerated as eth[0123...], but these names do not necessarily correspond to actual labels on the chassis. B help customer to get predictable network device name and some other network adapter information before provision or network configuration. - -B use genesis to collect network adapters information, so that mean it need to restart the target node. - -B For each node within the , follows below scheme: - -If the target node is scanned for the first time, B will trigger genesis to collect information then save the information at the B column of nics table. -If the target node has ever been scanned, B will use the information from nics table first. -If user hopes to scan the adapter information for the node but these information already exist, B<-f> option can be used to start rescan process. - -B tries to collect more information for the target network device, but doesn't guarantee collect same much information for every network device. - -Below are the possible information can be collect up to now: -B: the consistent name which can be used by confignic directly in operating system which follow the same naming scheme with rhels7 -B: the pci location -B: the MAC address -B: All the names which satisfy predictable network device naming scheme. I<(if xcat enhance confignic command later, user can use these names to configure their network adapter, even customize their name)> -B: the vender of network device -B: the model of network device -B: the link state of network device - -=head1 OPTIONS - -B<-h> - -Display usage message. - -B<-v> - -Command Version. - -B<-V> - -Display verbose message. - -B<-f> - -Force to trigger new round scan. ignore the data collected before. - - -=head1 EXAMPLES - -1. To collect node[1-3]'s network device information, enter: - - getadapter node[1-2] - -Output is similar to: - - -->Starting scan for: node1,node2 - The whole scan result: - -------------------------------------- - [node1]: Adapter information exists, no need to scan. - -------------------------------------- - [node2] scan successfully, below are the latest data - node2:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80 - node2:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433 - -Every node gets a separate section to display its all network adapters information, every network adapter owns single line which start as node name and followed by index and other information. - - -2. Force to trigger new round scan - - getadatper node -f - - - -=head1 SEE ALSO - -L - - diff --git a/xCAT-client/pods/man1/pgsqlsetup.1.pod b/xCAT-client/pods/man1/pgsqlsetup.1.pod index 939d16a17..3115b1bc8 100644 --- a/xCAT-client/pods/man1/pgsqlsetup.1.pod +++ b/xCAT-client/pods/man1/pgsqlsetup.1.pod @@ -9,7 +9,7 @@ B {B<-h> | B<--help>} B {B<-v> | B<--version>} -B {B<-i> | B<--init>} [B<-N> | B<--nostart>] [B<-P> | B<--PCM>] [B<-o> | B<--odbc>] [B<-V> | B<--verbose>] +B {B<-i> | B<--init>} [B<-N> | B<--nostart>] [B<--listen> | B<-l> I
] [B<--access> | B<-a> I
] [B<-P> | B<--PCM>] [B<-o> | B<--odbc>] [B<-V> | B<--verbose>] B {B<-o> | B<--setupODBC>} [B<-V> | B<--verbose>] @@ -38,7 +38,7 @@ Displays verbose messages. The init option is used to setup an installed PostgreSQL database so that xCAT can use the database. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the PostgreSQL database and restarts the xcatd daemon using the database. On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the -o option, to run after the init. -To add additional nodes to access the PostgreSQL server, setup on the Management Node, edit the pg_hba.conf file. +To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the -a option. For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB @@ -46,6 +46,14 @@ For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB This option with the -i flag will create the database, but will not backup and restore xCAT tables into the database. It will create the cfgloc file such that the next start of xcatd will try and contact the database. This can be used to setup the xCAT PostgreSQL database during or before install. +=item B<-l|--listen> I
+ +This option is used to specify additional IP addresses on which the PostgreSQL database will listen. Without it, only localhost (on Linux) and the management node's main IP (on Linux and AIX) will be configured. This option can be specified multiple times. + +=item B<-a|--access> I
+ +This option is used to specify additional IP addresses from which the service nodes will connect to the PostgreSQL database. Without it, only the management node will be configured for database access. This option can be specified multiple times. + =item B<-P|--PCM> This option sets up PostgreSQL database to be used with xCAT running with PCM. diff --git a/xCAT-client/pods/man1/rflash.1.pod b/xCAT-client/pods/man1/rflash.1.pod index 091eec11a..70c964d15 100644 --- a/xCAT-client/pods/man1/rflash.1.pod +++ b/xCAT-client/pods/man1/rflash.1.pod @@ -1,6 +1,6 @@ =head1 Name -B - Performs Licensed Internal Code (LIC) update support for HMC-attached POWER5 and POWER6 Systems, and POWER7 systems using Direct FSP management. B is also able to update firmware for NextScale Fan Power Controllers (FPC). +B - Performs Licensed Internal Code (LIC) update or firmware update on supported xCAT managed nodes. =head1 B @@ -22,9 +22,13 @@ B I {B<--commit>|B<--recover>} B I I -=head2 OpenPOWER BMC specific: +=head2 OpenPOWER BMC specific (using IPMI): -B I I [B<-c>|B<--check>] [B<--retry=>I] [B<-V>] +B I [I | B<-d=>I] [B<-c>|B<--check>] [B<--retry=>I] [B<-V>] + +=head2 OpenPOWER OpenBMC specific : + +B I [I | I] [B<-c>|B<--check>] [B<-a>|B<--activate>] [B<-l>|B<--list>] [B<-u>|B<--upload>] [B<-d>|B<--delete>] =head1 B @@ -38,6 +42,7 @@ The I can be an CEC or CEC list, a Lpar or Lpar list and a Frame or F The command will update firmware for NeXtScale FPC when given an FPC node and the http information needed to access the firmware. + =head2 PPC (with HMC) specific: The B command uses the B command to connect to the HMC controlling the given managed system and perform the updates. Before running B, use B to check if the related HMC ssh is enabled. To enable a HMC ssh connection, use B command. @@ -78,9 +83,15 @@ For more details about the Firmware Update using Direct FSP/BPA Management, refe The command will update firmware for NeXtScale FPC when given an FPC node and the http information needed to access the firmware. The http information required includes both the MN IP address as well as the directory containing the firmware. It is recommended that the firmware be downloaded and placed in the /install directory structure as the xCAT MN /install directory is configured with the correct permissions for http. Refer to the doc to get more details: XCAT_NeXtScale_Clusters -=head2 OpenPOWER specific: +=head2 OpenPOWER specific (using IPMI): -The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and the hpm1 formatted file path. +The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and either the hpm formatted file path or path to a data directory. +B When using B in hierarchical environment, the hpm file or data directory must be accessible from Service Nodes. + +=head2 OpenPOWER OpenBMC specific: + +The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER node and either an update .tar file or an uploaded image id. +B When using B in hierarchical environment, the .tar file must be accessible from Service Nodes. =head1 B @@ -92,7 +103,7 @@ Writes the command's usage statement to standard output. =item B<-c|--check> -Check the firmware version of BMC and HPM file. +Check the firmware version of BMC and an update file. =item B<-p> I @@ -102,6 +113,10 @@ Specifies the directory where the packages are located. Specifies the directory where the raw data from rpm packages for each CEC/Frame are located. The default directory is /tmp. The option is only used in Direct FSP/BPA Management. +=item B<-d=>I + +Used for IBM Power S822LC for Big Data systems only. Specifies the directory where the B utility and at least one of BMC or PNOR update files are located. The utility and update files can be downloaded from FixCentral. + =item B<--activate> {B | B} Must be specified to activate the new Licensed Internal Code. The "disruptive" option will cause the target systems to be recycled. Without this flag, LIC updates will be installed only, not activated. @@ -118,6 +133,22 @@ Used to recover the flash image in the permanent side of the chip to the tempora Specify number of times to retry the update if failure is detected. Default value is 2. Value of 0 can be used to indicate no retries. +=item B<-a|--activate> + +Activate update image. Image id must be specified. + +=item B<-l|--list> + +List currently uploaded update images. "(*)" indicates currently active image. + +=item B<-u|--upload> + +Upload update image. Specified file must be in .tar format. + +=item B<-d|--delete> + +Delete update image from BMC + =item B<-v|--version> Displays the command's version. @@ -167,6 +198,11 @@ 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: + + rflash briggs01 -d=/root/supermicro/OP825 + =back =head1 B diff --git a/xCAT-client/pods/man1/rinv.1.pod b/xCAT-client/pods/man1/rinv.1.pod index e6fda9914..52ed22ccc 100644 --- a/xCAT-client/pods/man1/rinv.1.pod +++ b/xCAT-client/pods/man1/rinv.1.pod @@ -8,7 +8,7 @@ B [B<-h>|B<--help>|B<-v>|B<--version>] =head2 BMC/MPA specific: -B I {B|B|B|B|B|B|B|B|B|B|B|B|B|B|B} +B I [B|B|B|B|B|B|B|B|B|B] =head2 OpenPOWER (IPMI) server specific: @@ -16,7 +16,7 @@ B I [B|B|B|B|B|B|B I [B|B|B|B|B|B] +B I [B|B|B|B|B|B] [B<-V>|B<--verbose>] =head2 PPC (with HMC) specific: @@ -40,7 +40,6 @@ B I [B<-t>] B I - =head2 zVM specific: B I [B|B] @@ -78,18 +77,13 @@ Calling B for VMware will display the UUID/GUID, number of CPUs, amount of =over 7 -=item B - -Retrieves PCI bus information. - =item B List all buses for each I/O slot. =item B -Retrieves number of processors, speed, total memory, and DIMM -locations. +Retrieves number of processors, speed, total memory, and DIMM locations. =item B @@ -113,7 +107,7 @@ To output the raw information of deconfigured resources for CEC. =item B -Retrieves asset tag. Usually it's the MAC address of eth0. +Retrieves asset tag. Usually it's the MAC address of eth0. =item B @@ -127,6 +121,10 @@ Diagnostics information of firmware. Retrieves mprom firmware level. +=item B + +Retrieves dual in-line memory module information. + =item B Retrieves device identification. Usually device, manufacturing and product IDs. @@ -151,6 +149,10 @@ Print help. Print version. +=item B<-V>|B<--verbose> + +Prints verbose output, if available. + =item B<-t> Set the values in the vm table to what vCenter has for the indicated nodes. diff --git a/xCAT-client/pods/man1/rpower.1.pod b/xCAT-client/pods/man1/rpower.1.pod index 0e38e78c8..2c5683fb1 100644 --- a/xCAT-client/pods/man1/rpower.1.pod +++ b/xCAT-client/pods/man1/rpower.1.pod @@ -22,7 +22,7 @@ B I [B|B|B|B] =head2 OpenPOWER OpenBMC: -B I [B|B|B|B|B|B|B] +B I [B|B|B|B|B|B|B|B|B|B] =head2 PPC (with IVM or HMC) specific: @@ -247,6 +247,14 @@ To pause all processes in the instance. To unpause all processes in the instance. +=item B + +To reboot BMC. + +=item B + +To get state of the BMC. + =item B To get state of the instance. diff --git a/xCAT-client/pods/man1/rspconfig.1.pod b/xCAT-client/pods/man1/rspconfig.1.pod index aba5fcd5a..972aa649b 100644 --- a/xCAT-client/pods/man1/rspconfig.1.pod +++ b/xCAT-client/pods/man1/rspconfig.1.pod @@ -24,7 +24,7 @@ B I B=I