diff --git a/.mailmap b/.mailmap new file mode 100644 index 000000000..cc6d51051 --- /dev/null +++ b/.mailmap @@ -0,0 +1,69 @@ +BAI Yuan +Bruce Potter +CAO Li +CAO Meng Meng +CAO Meng Meng +CAO Meng Meng +Casandra Qiu +Casandra Qiu +CHENG Long +CHU De Gao +CHU De Gao +CHU De Gao +GAO Feng +GAO Ling +GAO Ling +GONG Jie +GONG Jie +GONG Jie +HU Wei Hua +Jarrod Johnson +Jarrod Johnson +Jarrod Johnson +Jarrod Johnson +JIN Jie Hua +JIN Jie Hua +LI Guang Cheng +LI Guang Cheng +LI Guang Cheng +LI Ting Ting +Linda O. Mellor +Linda O. Mellor +Lissa Valletta +Lissa Valletta +Mark Gurevich +Mark Gurevich +Norm Nott +Norm Nott +Patrick Lundgren +Patrick Lundgren +Patrick Lundgren +SUN Jing +SUN Jing +Victor Hu +Victor Hu +Victor Hu +WANG Hua Zhong +WANG Hua Zhong +WANG Jun Xia +WANG Xiao Peng +WANG Xiao Peng +WANG Xiao Peng +WANG Xiao Peng +WANG Xiao Peng +WU Xian +XU Bin +XU Bin +XU Qing +XU Qing +XU Wei +YANG Peng +YANG Song +YANG Song +YANG Song +YANG Song +YIN Le +YIN Le +ZHAO Er Tao +ZHAO Er Tao +ZHAO Er Tao diff --git a/README.rst b/README.rst index 2cb961dfd..1d9a9e0ca 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_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212| |docs_211| +|docs_latest| |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_2134| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.4 + :alt: 2.13.4 documentation status + :scale: 100% + :target: http://xcat-docs.readthedocs.io/en/2.13.4/ + .. |docs_2133| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.3 :alt: 2.13.3 documentation status :scale: 100% diff --git a/Version b/Version index cb9778b41..8bbab5627 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -2.13.4 \ No newline at end of file +2.13.5 diff --git a/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst index 544f577cd..10b7a69c1 100644 --- a/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst +++ b/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst @@ -25,7 +25,7 @@ Remove Old Provision Environment Change Definition ----------------- -#. Change netwoks table definitions :: +#. Change networks table definitions :: lsdef -t network -l diff --git a/docs/source/advanced/cluster_maintenance/compute_node/replace/openpower.rst b/docs/source/advanced/cluster_maintenance/compute_node/replace/openpower.rst index 6e17f9947..018de0672 100644 --- a/docs/source/advanced/cluster_maintenance/compute_node/replace/openpower.rst +++ b/docs/source/advanced/cluster_maintenance/compute_node/replace/openpower.rst @@ -1,10 +1,10 @@ -OpenPower Nodes +OpenPOWER Nodes =============== When compute nodes are physically replaced in the frame, leverage xCAT to re-discover the compute nodes. The following guide can be used for: - * IBM OpenPower S822LC for HPC + * IBM OpenPOWER S822LC for HPC #. Identify the machine(s) to be replaced: ``frame10cn02``. diff --git a/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst b/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst index 984bf79fe..7311f53ae 100644 --- a/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst +++ b/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst @@ -480,6 +480,6 @@ Sample table contents: :: Limited support for user application networks --------------------------------------------- -In some cases you may have additional user application networks in your site that are not specifically used for cluster management.If desired you can create xCAT network definitions for these networks.This not only provides a convenient way to keep track of the network details but the information can also be used to help set up name resolution for these networks on the cluster nodes.When you add a network definition that includes a **"domain"** value then that domain is automatically included the xCAT name resolution set up. This will enable the nodes to be able to resolve hostnames from the other domains. +In some cases you may have additional user application networks in your site that are not specifically used for cluster management. If desired you can create xCAT network definitions for these networks. This not only provides a convenient way to keep track of the network details but the information can also be used to help set up name resolution for these networks on the cluster nodes. When you add a network definition that includes a **"domain"** value then that domain is automatically included the xCAT name resolution set up. This will enable the nodes to be able to resolve hostnames from the other domains. For example, when you run ``makedhcp -n`` it will list all domains defined in the xCAT **"site"** definition and xCAT **"network"** definitions in the **"option domain-search"** entry of the shared-network stanza in the dhcp configuration file. This will cause dhcp to put these domains in the compute nodes' **/etc/resolv.conf** file every time it gets a dhcp lease. diff --git a/docs/source/advanced/gpu/nvidia/osimage/index.rst b/docs/source/advanced/gpu/nvidia/osimage/index.rst index 04d4af107..70a2aff30 100644 --- a/docs/source/advanced/gpu/nvidia/osimage/index.rst +++ b/docs/source/advanced/gpu/nvidia/osimage/index.rst @@ -1,7 +1,7 @@ Create osimage definitions ========================== -Generate ``osimage`` definitions to provison the compute nodes with the NVIDIA CUDA toolkit installed. +Generate ``osimage`` definitions to provision the compute nodes with the NVIDIA CUDA toolkit installed. .. toctree:: :maxdepth: 2 diff --git a/docs/source/advanced/hamn/high_available_management_node.rst b/docs/source/advanced/hamn/high_available_management_node.rst index da94390ae..ebd78cf57 100644 --- a/docs/source/advanced/hamn/high_available_management_node.rst +++ b/docs/source/advanced/hamn/high_available_management_node.rst @@ -13,7 +13,7 @@ The data synchronization is important for any high availability configuration. W * The configuration files for the services that are required by xCAT, like named, DHCP, apache, nfs, ssh, etc. * The operating systems images repository and users customization data repository, the ``/install`` directory contains these repositories in most cases. -There are a lot of ways for data synchronization, but considering the specific xCAT HAMN requirements, only several of the data synchronziation options are practical for xCAT HAMN. +There are a lot of ways for data synchronization, but considering the specific xCAT HAMN requirements, only several of the data synchronization options are practical for xCAT HAMN. **1\. Move physical disks between the two management nodes**: if we could physically move the hard disks from the failed management node to the backup management node, and bring up the backup management node, then both the operating system and xCAT data will be identical between the new management node and the failed management node. RAID1 or disk mirroring could be used to avoid the disk be a single point of failure. @@ -40,7 +40,7 @@ The configuration for the high availability applications is usually complex, it **3\. Maintenance effort** -The automatic failover brings in several high availability applications, after the initial configuration is done, additional maintenance effort will be needed. For example, taking care of the high availability applications during cluster update, the updates for the high availability applications themselves, trouble shooting any problems with the high availability applications. A simple question may be able to help you to decide: could you get technical support if some of the high availability applications run into problems? All software has bugs. +The automatic failover brings in several high availability applications, after the initial configuration is done, additional maintenance effort will be needed. For example, taking care of the high availability applications during cluster update, the updates for the high availability applications themselves, troubleshooting any problems with the high availability applications. A simple question may be able to help you to decide: could you get technical support if some of the high availability applications run into problems? All software has bugs. Configuration Options ===================== diff --git a/docs/source/advanced/hamn/setup_ha_mgmt_node_with_drbd_pacemaker_corosync.rst b/docs/source/advanced/hamn/setup_ha_mgmt_node_with_drbd_pacemaker_corosync.rst index 766580dad..91f9c6cd9 100644 --- a/docs/source/advanced/hamn/setup_ha_mgmt_node_with_drbd_pacemaker_corosync.rst +++ b/docs/source/advanced/hamn/setup_ha_mgmt_node_with_drbd_pacemaker_corosync.rst @@ -31,7 +31,7 @@ Configuration Requirements #. Since the management node needs to provide IP services through broadcast such as DHCP to the compute nodes, the primary management node and standby management node should be in the same subnet to ensure the network services will work correctly after failover. -#. Network connections between the two management nodes: there are several networks defined in the general cluster configuration strucutre, like cluster network, management network and service network; the two management nodes should be in all of these networks(if exist at all). Besides that, it is recommended, though not strictly required, to use a direct, back-to-back, Gigabit Ethernet or higher bandwidth connection for the DRBD, Pacemaker and Corosync communication between the two management nodes. If the connection is run over switches, use of redundant components and the bonding driver (in active-backup mode) is recommended. +#. Network connections between the two management nodes: there are several networks defined in the general cluster configuration structure, like cluster network, management network and service network; the two management nodes should be in all of these networks(if exist at all). Besides that, it is recommended, though not strictly required, to use a direct, back-to-back, Gigabit Ethernet or higher bandwidth connection for the DRBD, Pacemaker and Corosync communication between the two management nodes. If the connection is run over switches, use of redundant components and the bonding driver (in active-backup mode) is recommended. ``Note``: A crossover Ethernet cable is required to setup the direct, back-to-back, Ethernet connection between the two management nodes, but with most of the current hardware, a normal Ethernet cable can also work, the Ethernet adapters will internally handle the crossover bit. Hard disk for DRBD: DRBD device can be setup on a partition of the disk that the operating system runs on, but it is recommended to use a separate standalone disk or RAID/Multipath disk for DRBD configuration. @@ -63,7 +63,7 @@ You have several options to get the RPM packages for ``DRBD``, ``drbdlinks``, `` #. Compile from source code: if none of the options work for some specific applications, you will have to compile RPMs from the source code. You can compile these packages on one of the management node or on a separate build machine with the same arch and operating system with the management nodes. Here are the instructions for compiling the RPM packages from source code: -Before compiling the RPM packages, you need to install some compling tools like gcc, make, glibc, rpm-build. :: +Before compiling the RPM packages, you need to install some compiling tools like gcc, make, glibc, rpm-build. :: yum groupinstall "Development tools" yum install libxslt libxslt-devel @@ -402,13 +402,13 @@ Configure DRBD [>....................] sync'ed: 0.5% (101932/102400)M finish: 2:29:06 speed: 11,644 (11,444) K/sec - If a direct, back-to-back Gigabyte Ethernet connection is setup between the two management nodes and you are unhappy with the syncronization speed, it is possible to speed up the initial synchronization through some tunable parameters in DRBD. This setting is not permanent, and will not be retained after boot. For details, see http://www.drbd.org/users-guide-emb/s-configure-sync-rate.html. :: + If a direct, back-to-back Gigabyte Ethernet connection is setup between the two management nodes and you are unhappy with the synchronization speed, it is possible to speed up the initial synchronization through some tunable parameters in DRBD. This setting is not permanent, and will not be retained after boot. For details, see http://www.drbd.org/users-guide-emb/s-configure-sync-rate.html. :: drbdadm disk-options --resync-rate=110M xCAT #. Create file system on DRBD device and mount the file system - Even while the DRBD sync is taking place, you can go ahead and create a filesystem on the DRBD device, but it is recommended to wait for the inital full synchronization is finished before creating the file system. + Even while the DRBD sync is taking place, you can go ahead and create a filesystem on the DRBD device, but it is recommended to wait for the initial full synchronization is finished before creating the file system. After the initial full synchronization is finished, you can take the DRBD device as a normal disk partition to create file system and mount it to some directory. The DRDB device name is set in the ``/etc/drbd.d/xcat.res`` created in the previous step. In this doc, the DRBD device name is ``/dev/drbd1``. :: @@ -964,7 +964,7 @@ At this point, the HA MN Setup is complete, and customer workloads and system ad Failover ======== -There are two kinds of failover, planned failover and unplanned failover. The planned failover can be useful for updating the management nodes or any scheduled maintainance activities; the unplanned failover covers the unexpected hardware or software failures. +There are two kinds of failover, planned failover and unplanned failover. The planned failover can be useful for updating the management nodes or any scheduled maintenance activities; the unplanned failover covers the unexpected hardware or software failures. In a planned failover, you can do necessary cleanup work on the previous primary management node before failover to the previous standby management node. In a unplanned failover, the previous management node probably is not functioning at all, you can simply shutdown the system. @@ -1009,7 +1009,7 @@ To avoid this, run the following command to set the autostart for the corosync s Backup working Pacemaker configuration (Optional) ================================================= -It is a good practice to backup the working ``pacemaker`` configuration, the backup could be in both plain text format or XML format, the plain text is more easily editable and can be modified and used chunk by chunk, the xml can be used to do a full replacement restore. It will be very useful to make such a backup everytime before you make a change. +It is a good practice to backup the working ``pacemaker`` configuration, the backup could be in both plain text format or XML format, the plain text is more easily editable and can be modified and used chunk by chunk, the xml can be used to do a full replacement restore. It will be very useful to make such a backup every time before you make a change. To backup in the plain text format, run the following command: :: @@ -1182,7 +1182,7 @@ Trouble shooting and debug tips Disable HA MN ============= -For whatever reason, the user might want to disable HA MN, here is the procedur of disabling HA MN: +For whatever reason, the user might want to disable HA MN, here is the procedure of disabling HA MN: * Shut down standby management node @@ -1245,7 +1245,7 @@ Finally we commit the changes that are in xcat_cfg into the live system: :: pcs cluster push cib xcat_cfg -We then need to make sure that the ``/xCATdrbd/etc/drbdlinks.xCAT.conf`` file has the systemimager portion uncommented, and re-do the initialisation of drbdlinks as they have been done earlier in the documentation +We then need to make sure that the ``/xCATdrbd/etc/drbdlinks.xCAT.conf`` file has the systemimager portion uncommented, and re-do the initialization of drbdlinks as they have been done earlier in the documentation Appendix A ========== @@ -1428,7 +1428,7 @@ Finally we commit the changes that are in xcat_cfg into the live system: :: pcs cluster cib-push xcat_cfg -Once the changes have been commited, we can view the config, by running the command below: :: +Once the changes have been committed, we can view the config, by running the command below: :: pcs config @@ -1640,7 +1640,7 @@ Finally we commit the changes that are in xcat_cfg into the live system: :: pcs cluster cib-push xcat_cfg -Once the changes have been commited, we can view the config, by running the command below: :: +Once the changes have been committed, we can view the config, by running the command below: :: pcs config diff --git a/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst b/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst index 6a3e1b98a..3eff968e6 100644 --- a/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst +++ b/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst @@ -18,9 +18,9 @@ The nfs service on the primary management node or the primary management node it What is Shared Data ==================== -The term ``Shared Data`` means that the two management nodes use a single copy of xCAT data, no matter which management node is the primary MN, the cluster management capability is running on top of the single data copy. The acess to the data could be done through various ways like shared storage, NAS, NFS, samba etc. Based on the protocol being used, the data might be accessable only on one management node at a time or be accessable on both management nodes in parellel. If the data could only be accessed from one management node, the failover process need to take care of the data access transition; if the data could be accessed on both management nodes, the failover does not need to consider the data access transition, it usually means the failover process could be faster. +The term ``Shared Data`` means that the two management nodes use a single copy of xCAT data, no matter which management node is the primary MN, the cluster management capability is running on top of the single data copy. The access to the data could be done through various ways like shared storage, NAS, NFS, samba etc. Based on the protocol being used, the data might be accessible only on one management node at a time or be accessible on both management nodes in parallel. If the data could only be accessed from one management node, the failover process need to take care of the data access transition; if the data could be accessed on both management nodes, the failover does not need to consider the data access transition, it usually means the failover process could be faster. -``Warning``: Running database through network file system has a lot of potential problems and is not practical, however, most of the database system provides database replication feature that can be used to synronize the database between the two management nodes +``Warning``: Running database through network file system has a lot of potential problems and is not practical, however, most of the database system provides database replication feature that can be used to synchronize the database between the two management nodes Configuration Requirements ========================== @@ -248,7 +248,7 @@ Besides the files mentioned above, there may be some additional customization fi ``Note``: If the IBM HPC software stack is configured in your environment, execute additional steps required to copy additional data or configuration files for HAMN setup. -The dhcpsd.cnf should be syncronized between the primary management node and standby management node only when the DHCP configuration on the two management nodes are exactly the same. +The dhcpsd.cnf should be synchronized between the primary management node and standby management node only when the DHCP configuration on the two management nodes are exactly the same. Cluster Maintenance Considerations ================================== @@ -268,7 +268,7 @@ At this point, the HA MN Setup is complete, and customer workloads and system ad Failover ======== -There are two kinds of failover, planned failover and unplanned failover. The planned failover can be useful for updating the management nodes or any scheduled maintainance activities; the unplanned failover covers the unexpected hardware or software failures. +There are two kinds of failover, planned failover and unplanned failover. The planned failover can be useful for updating the management nodes or any scheduled maintenance activities; the unplanned failover covers the unexpected hardware or software failures. In a planned failover, you can do necessary cleanup work on the previous primary management node before failover to the previous standby management node. In a unplanned failover, the previous management node probably is not functioning at all, you can simply shutdown the system. @@ -367,7 +367,7 @@ On the new primary management node: **DNS**: run ``makedns``. Verify dns services working for node resolution. Make sure the line ``nameserver=`` is in ``/etc/resolv.conf``. - **DHCP**: if the dhcpd.leases is not syncronized between the primary management node and standby management node, run ``makedhcp -a`` to setup the DHCP leases. Verify dhcp is operational. + **DHCP**: if the dhcpd.leases is not synchronized between the primary management node and standby management node, run ``makedhcp -a`` to setup the DHCP leases. Verify dhcp is operational. **conserver**: run makeconservercf. This will recreate the ``/etc/conserver.cf`` config files for all the nodes. diff --git a/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst b/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst index d30fc59db..768395548 100644 --- a/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst +++ b/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst @@ -15,4 +15,4 @@ Appendix B: Diagnostics * **Errors running hierarchical commands such as xdsh** -- xCAT has a number of commands that run hierarchically. That is, the commands are sent from xcatd on the management node to the correct service node xcatd, which in turn processes the command and sends the results back to xcatd on the management node. If a hierarchical command such as xcatd fails with something like "Error: Permission denied for request", check ``/var/log/messages`` on the management node for errors. One error might be "Request matched no policy rule". This may mean you will need to add policy table entries for your xCAT management node and service node. -* **/install is not mounted on service node from managemen mode** -- If service node does not have ``/install`` directory mounted from management node, run ``lsdef -t site clustersite -i installloc`` and verify ``installloc="/install"`` +* **/install is not mounted on service node from management mode** -- If service node does not have ``/install`` directory mounted from management node, run ``lsdef -t site clustersite -i installloc`` and verify ``installloc="/install"`` diff --git a/docs/source/advanced/hierarchy/databases/postgres_configure.rst b/docs/source/advanced/hierarchy/databases/postgres_configure.rst index 52db88e00..039b6c001 100644 --- a/docs/source/advanced/hierarchy/databases/postgres_configure.rst +++ b/docs/source/advanced/hierarchy/databases/postgres_configure.rst @@ -33,4 +33,4 @@ Restart PostgreSQL after editing the file: :: For more information about changing the ``pg_hab.conf`` file and ``postgresql.conf`` files, see the following documentation: -`Setup the PostgreSQL Configuraion Files `_ +`Setup the PostgreSQL Configuration Files `_ diff --git a/docs/source/advanced/hierarchy/define_service_node.rst b/docs/source/advanced/hierarchy/define_service_node.rst index dba32462c..6c5b5b3ef 100644 --- a/docs/source/advanced/hierarchy/define_service_node.rst +++ b/docs/source/advanced/hierarchy/define_service_node.rst @@ -179,7 +179,7 @@ compute node is rebooted or the compute node is explicitly moved to another SN using the `snmove `_ command. To use Service Node pools, you need to architect your network such that all of -the compute nodes and service nodes in a partcular pool are on the same flat +the compute nodes and service nodes in a particular pool are on the same flat network. If you don't want the management node to respond to manage some of the compute nodes, it shouldn't be on that same flat network. The site, dhcpinterfaces attribute should be set such that the SNs' DHCP daemon diff --git a/docs/source/advanced/kit/custom/build/createkit.rst b/docs/source/advanced/kit/custom/build/createkit.rst index 4061fbef4..fbb0e6118 100644 --- a/docs/source/advanced/kit/custom/build/createkit.rst +++ b/docs/source/advanced/kit/custom/build/createkit.rst @@ -112,7 +112,7 @@ minor version can be support following format: :: **kitpackage** --- This stanza defines Kit Package (ie. RPM). There can be zero or more kitpackage stanzas. For multiple package supports, need to #. Define one kitpackage section per supported OS. or - #. Define one kitpacakge stanza which contains multiple kitrepoid lines. For the RPM packages, users need to responsible for createing an RPM spec file that can run on multiple OSes. + #. Define one kitpacakge stanza which contains multiple kitrepoid lines. For the RPM packages, users need to responsible for creating an RPM spec file that can run on multiple OSes. :: diff --git a/docs/source/advanced/kit/custom/introduction.rst b/docs/source/advanced/kit/custom/introduction.rst index 4c847687e..febb1dbde 100644 --- a/docs/source/advanced/kit/custom/introduction.rst +++ b/docs/source/advanced/kit/custom/introduction.rst @@ -49,7 +49,7 @@ Kit Framework With time, the implementation of the xCAT Software Kit support may change. -In order to process a kit successfully, the kit must be conpatiable with the level of xCAT code that was used to build the kit. The xCAT kit commands and software kits contain the framework version and compatiable supported versions. +In order to process a kit successfully, the kit must be compatible with the level of xCAT code that was used to build the kit. The xCAT kit commands and software kits contain the framework version and compatible supported versions. To view the framework version, use the ``-v | --version`` option on :doc:`addkit ` :: @@ -59,7 +59,7 @@ To view the framework version, use the ``-v | --version`` option on :doc:`addkit compatible_frameworks = 0,1,2 -If the commands in the xCAT installation is not compatiable with the Software Kit obtained, update xCAT to a more recent release. +If the commands in the xCAT installation is not compatible with the Software Kit obtained, update xCAT to a more recent release. .. [#] PCM is IBM Platform Cluster Manager diff --git a/docs/source/advanced/kit/custom/using/addkitcomp.rst b/docs/source/advanced/kit/custom/using/addkitcomp.rst index f716770b8..0c396cf4b 100644 --- a/docs/source/advanced/kit/custom/using/addkitcomp.rst +++ b/docs/source/advanced/kit/custom/using/addkitcomp.rst @@ -14,7 +14,7 @@ To check if a kitcomponent is valid for an existing OS image definition run the chkkitcomp -i -If the kit component is compatible then add the kitcomponent to the OS image defintion using the addkitcomp command. :: +If the kit component is compatible then add the kitcomponent to the OS image definition using the addkitcomp command. :: addkitcomp -a -i @@ -34,7 +34,7 @@ The contents of the kit component may be listed by using the lskitcomponent comm Adding Multiple Versions of the Same Kit Component to an OS Image Definition ````````````````````````````````````````````````````````````````````````````` -xCAT allows to have multiple versions/releases of a product software kit available in the cluster. Typically, different OS image definitions corresponding to the different versions/releases of a product software stack. However, in some instances, may need mulitple versions/releases of the same product available within a single OS image. This is only feasible if the software product supports the install of multiple versions or releases of its product within an OS image. +xCAT allows to have multiple versions/releases of a product software kit available in the cluster. Typically, different OS image definitions corresponding to the different versions/releases of a product software stack. However, in some instances, may need multiple versions/releases of the same product available within a single OS image. This is only feasible if the software product supports the install of multiple versions or releases of its product within an OS image. Currently, it is not possible to install multiple versions of a product into an OS image using xCAT commands. xCAT uses yum on RedHat and zypper on SLES to install product rpms. These package managers do not provide an interface to install different versions of the same package, and will always force an upgrade of the package. We are investigating different ways to accomplish this function for future xCAT releases. diff --git a/docs/source/advanced/kit/hpc/quickstart.rst b/docs/source/advanced/kit/hpc/quickstart.rst index d76814907..74b8d83e4 100644 --- a/docs/source/advanced/kit/hpc/quickstart.rst +++ b/docs/source/advanced/kit/hpc/quickstart.rst @@ -77,7 +77,7 @@ The following software kits will be used to install the IBM HPC software stack o The ESSL software kit has an *external dependency* to the ``libxlf`` which is provided in the XLF software kit. Since it's already added in the above step, there is no action needed here. - If CUDA toolkit is being used, ESSL has a runtime dependency on the CUDA rpms. The adminstrator needs to create the repository for the CUDA 7.5 toolkit or a runtime error will occur when provisioning the node. See the :doc:`/advanced/gpu/nvidia/repo/index` section for more details about setting up the CUDA repository on the xCAT management node. :: + If CUDA toolkit is being used, ESSL has a runtime dependency on the CUDA rpms. The administrator needs to create the repository for the CUDA 7.5 toolkit or a runtime error will occur when provisioning the node. See the :doc:`/advanced/gpu/nvidia/repo/index` section for more details about setting up the CUDA repository on the xCAT management node. :: # # Assuming that the cuda repo has been configured at: @@ -101,7 +101,7 @@ The following software kits will be used to install the IBM HPC software stack o addkitcomp -a -i rhels7.2-ppc64le-install-compute \ essl-computenode-3264rtecuda-5.4.0-0-rhels-7.2-ppc64le - If the system doesn't have GPU and the CUDA toolkit is not needed, the adminstrator should not add the following kit components that requires the CUDA packages: ``essl-loginnode-5.4.0-0-rhels-7.2-ppc64le``, ``essl-computenode-3264rte-5.4.0-0-rhels-7.2-ppc64le`` and ``essl-computenode-3264rtecuda-5.4.0-0-rhels-7.2-ppc64le``. Check the ESSL installation guide: http://www.ibm.com/support/knowledgecenter/SSFHY8_5.4.0/com.ibm.cluster.essl.v5r4.essl300.doc/am5il_xcatinstall.htm + If the system doesn't have GPU and the CUDA toolkit is not needed, the administrator should not add the following kit components that requires the CUDA packages: ``essl-loginnode-5.4.0-0-rhels-7.2-ppc64le``, ``essl-computenode-3264rte-5.4.0-0-rhels-7.2-ppc64le`` and ``essl-computenode-3264rtecuda-5.4.0-0-rhels-7.2-ppc64le``. Check the ESSL installation guide: http://www.ibm.com/support/knowledgecenter/SSFHY8_5.4.0/com.ibm.cluster.essl.v5r4.essl300.doc/am5il_xcatinstall.htm #. Add the **Parallel ESSL** kitcomponents to osimage. diff --git a/docs/source/advanced/mixed_cluster/building_stateless_images.rst b/docs/source/advanced/mixed_cluster/building_stateless_images.rst index 7d1145095..4c9f9a344 100644 --- a/docs/source/advanced/mixed_cluster/building_stateless_images.rst +++ b/docs/source/advanced/mixed_cluster/building_stateless_images.rst @@ -1,7 +1,7 @@ Building Stateless/Diskless Images ================================== -A **stateless**, or **diskless**, provisioned nodes is one where the operating system image is deployed and loaded into memory. The Operating System (OS) does not store its files directly onto persistent storage (i.e hard disk drive, shared drive, usb, etc) and so subsequent rebooting of the machine results in loss of any state changes that happened while the machine was running. +A **stateless**, or **diskless**, provisioned nodes is one where the operating system image is deployed and loaded into memory. The Operating System (OS) does not store its files directly onto persistent storage (i.e. hard disk drive, shared drive, usb, etc) and so subsequent rebooting of the machine results in loss of any state changes that happened while the machine was running. To deploy stateless compute nodes, you must first create a stateless image. The "netboot" osimages created from ``copycds`` in the **osimage** table are sample osimage definitions that can be used for deploying stateless nodes. diff --git a/docs/source/advanced/networks/infiniband/firmware_updates.rst b/docs/source/advanced/networks/infiniband/firmware_updates.rst index a963c3356..e3d5f6c59 100644 --- a/docs/source/advanced/networks/infiniband/firmware_updates.rst +++ b/docs/source/advanced/networks/infiniband/firmware_updates.rst @@ -21,7 +21,7 @@ Burn new firmware on each ibaX: :: mstflint -d 0002:01:00.0 -i b -Note: if this is a PureFlex MezzanineP adapater then you must select the correct image for each ibaX device. Note the difference in the firmware image at end of filename: _0.bin (iba0/iba2) & _1.bin (iba1/iba3) +Note: if this is a PureFlex MezzanineP adapter then you must select the correct image for each ibaX device. Note the difference in the firmware image at end of filename: _0.bin (iba0/iba2) & _1.bin (iba1/iba3) Verify download successful: :: diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2.rst index 5658f2d1b..8a3a5a75c 100644 --- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2.rst +++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2.rst @@ -1,7 +1,7 @@ Mellanox OFED Installation Script ================================= -Mellanox provides a tested and packaged version of the OpenFabrics Enterprise Distribution (OFED) driver, named Mellanox OFED (MLNX_OFED). To assist with the installation of the MLNX_OFED driver, xCAT provids a sample postscript: ``mlnxofed_ib_install.v2``. +Mellanox provides a tested and packaged version of the OpenFabrics Enterprise Distribution (OFED) driver, named Mellanox OFED (MLNX_OFED). To assist with the installation of the MLNX_OFED driver, xCAT provides a sample postscript: ``mlnxofed_ib_install.v2``. .. toctree:: :maxdepth: 2 diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst index 610dd6384..96f263e4a 100644 --- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst +++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst @@ -18,7 +18,7 @@ Diskful Installation chdef -t node -o \ -p postscripts="mlnxofed_ib_install -p /install//" - **[kernel mismatch issue]** The Mellanox OFED ISO is built againt a series of specific kernel version. If the version of the linux kernel does not match any of the Mellanox offered pre-built kernel modules, you can pass the ``--add-kernel-support`` argument to the Mellanox installation script to build the kernel modules based on the version you are using. :: + **[kernel mismatch issue]** The Mellanox OFED ISO is built against a series of specific kernel version. If the version of the linux kernel does not match any of the Mellanox offered pre-built kernel modules, you can pass the ``--add-kernel-support`` argument to the Mellanox installation script to build the kernel modules based on the version you are using. :: chdef -t node -o \ -p postscripts="mlnxofed_ib_install -p /install// \ @@ -42,4 +42,4 @@ Diskful Installation * Verify that the Mellanox IB drivers are located at: ``/lib/modules//extra/`` - * Use the ``ibv_devinfo`` comamnd to obtain information about the InfiniBand adapter. + * Use the ``ibv_devinfo`` command to obtain information about the InfiniBand adapter. diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst index 36af543e7..3af2cb177 100644 --- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst +++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst @@ -28,7 +28,7 @@ Diskless Installation *Note: The $1 is a argument that is passed to the the postinstall script at runtime.* - **[kernel mismatch issue]** The Mellanox OFED ISO is built againt a series of specific kernel version. If the version of the linux kernel does not match any of the Mellanox offered pre-built kernel modules, you can pass the ``--add-kernel-support`` argument to the Mellanox installation script to build the kernel modules based on the version you are using. :: + **[kernel mismatch issue]** The Mellanox OFED ISO is built against a series of specific kernel version. If the version of the linux kernel does not match any of the Mellanox offered pre-built kernel modules, you can pass the ``--add-kernel-support`` argument to the Mellanox installation script to build the kernel modules based on the version you are using. :: /install/postscripts/mlnxofed_ib_install \ -p /install// -m --add-kernel-support -end- \ @@ -62,4 +62,4 @@ Diskless Installation * Verify that the Mellanox IB drivers are located at: ``/lib/modules//extra/`` - * Use the ``ibv_devinfo`` comamnd to obtain information about the InfiniBand adapter. + * Use the ``ibv_devinfo`` command to obtain information about the InfiniBand adapter. diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_preparation.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_preparation.rst index 929bdf674..48e40f8a2 100644 --- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_preparation.rst +++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_preparation.rst @@ -22,7 +22,7 @@ The ``mlnxofed_ib_install.v2`` is a sample script intended to assist with the in # ensure the script has execute permission chmod +x /install/postscripts/mlnxofed_ib_install -#. Familarize the options available for the xCAT ``mlnxofed_ib_install`` script. +#. Familiarize the options available for the xCAT ``mlnxofed_ib_install`` script. +---------+------------------+----------------------------------------------------------+ | Option | Required | Description | diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_verified_scenario_matrix.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_verified_scenario_matrix.rst index fd9bfded6..9849d2091 100644 --- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_verified_scenario_matrix.rst +++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_verified_scenario_matrix.rst @@ -1,7 +1,7 @@ MLNX_OFED Support Matrix ======================== -The following ISO images and attributs have been verified by the xCAT Team. +The following ISO images and attributes have been verified by the xCAT Team. **RedHat Enterprise Linux** diff --git a/docs/source/advanced/networks/infiniband/switch_configuration.rst b/docs/source/advanced/networks/infiniband/switch_configuration.rst index 58e50e0ad..ab6bdf5ae 100644 --- a/docs/source/advanced/networks/infiniband/switch_configuration.rst +++ b/docs/source/advanced/networks/infiniband/switch_configuration.rst @@ -66,7 +66,7 @@ Then run the following: :: Setup syslog on the Switch -------------------------- -Use the following command to consolidate the syslog to the Management Node or Service Nodes, where ip is the addess of the MN or SN as known by the switch. :: +Use the following command to consolidate the syslog to the Management Node or Service Nodes, where ip is the address of the MN or SN as known by the switch. :: rspconfig mswitch logdest= diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst index 8fa31ee71..e0d132dfb 100644 --- a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst @@ -12,7 +12,7 @@ xCAT provides support for detecting and installing the Cumulus Linux OS into ONI The mac address of the switch management port is required for xCAT to configure the DHCP information and send over the OS to install on the switch. - **[small clusters]** If you know the mac address of the management port on the switch, create the pre-defined switch defintion providing the mac address. :: + **[small clusters]** If you know the mac address of the management port on the switch, create the pre-defined switch definition providing the mac address. :: mkdef frame01sw1 --template onieswitch arch=armv71 \ ip=192.168.1.1 mac="aa:bb:cc:dd:ee:ff" @@ -32,7 +32,7 @@ xCAT provides support for detecting and installing the Cumulus Linux OS into ONI ip=192.168.4.1 switch=coresw1 switchport=4 ... - #. Leverage ``switchdiscover`` over the DHCP range to automatically detect the MAC address and write them into the predefined swtiches above. :: + #. Leverage ``switchdiscover`` over the DHCP range to automatically detect the MAC address and write them into the predefined switches above. :: switchdiscover --range diff --git a/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst b/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst index d2b9df8b7..356132d7f 100644 --- a/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst +++ b/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst @@ -155,7 +155,7 @@ These two config files are located in the **/opt/xcat/share/xcat/scripts** direc Switch Status ~~~~~~~~~~~~~ -During the switch-based switch discovery process, there are four states displayed. User may only see **switch_configed** status on node definition if discovery process succefully finished. +During the switch-based switch discovery process, there are four states displayed. User may only see **switch_configed** status on node definition if discovery process successfully finished. **Matched** --- Discovered switch is matched to predefine switch, **otherinterfaces** attribute is updated to dhcp IP address, and mac address, **switch type** and **usercomment** also updated with vendor information for the predefined switch. diff --git a/docs/source/advanced/networks/vlan/vlan.rst b/docs/source/advanced/networks/vlan/vlan.rst index 0e3e3840c..813f2fc60 100644 --- a/docs/source/advanced/networks/vlan/vlan.rst +++ b/docs/source/advanced/networks/vlan/vlan.rst @@ -206,7 +206,7 @@ There is no need to specify -i flag for removing nodes from a vlan. Remove a VLAN ------------- -The **rmvlan** command removes the given vlan ID from the cluster. It removes the vlan id from all the swithces involved, deconfigures the nodes so that vlan adaptor (tag) will be remved, cleans up /etc/hosts, DNS and database tables for the given vlan. +The **rmvlan** command removes the given vlan ID from the cluster. It removes the vlan id from all the switches involved, deconfigures the nodes so that vlan adaptor (tag) will be removed, cleans up /etc/hosts, DNS and database tables for the given vlan. For example: :: @@ -215,7 +215,7 @@ For example: :: VLAN Security ------------- -To make the vlan more secure, the root guard and the bpdu guard are enabled for each ports within the vlan by **mkvlan** and **chvlan** commands. This way it guards the topology changes on the switch by the hackers who hack the STP. However, when the vlan is removed by the **rmvlan** and the **chvlan (-d)** commands, the root guard and the bpdu guard are not disabled because the code cannot tell if the guards were enabled by the admin or not. If you want to remove the gurads after the vlan is removed, you need to use the switch command line interface to do so. Refer to the documents for the switch command line interfaces for details. +To make the vlan more secure, the root guard and the bpdu guard are enabled for each ports within the vlan by **mkvlan** and **chvlan** commands. This way it guards the topology changes on the switch by the hackers who hack the STP. However, when the vlan is removed by the **rmvlan** and the **chvlan (-d)** commands, the root guard and the bpdu guard are not disabled because the code cannot tell if the guards were enabled by the admin or not. If you want to remove the guards after the vlan is removed, you need to use the switch command line interface to do so. Refer to the documents for the switch command line interfaces for details. Limitation ---------- diff --git a/docs/source/advanced/probe/osdeploy.rst b/docs/source/advanced/probe/osdeploy.rst index 546d33198..c9a36f2f1 100644 --- a/docs/source/advanced/probe/osdeploy.rst +++ b/docs/source/advanced/probe/osdeploy.rst @@ -76,7 +76,7 @@ When all the nodes complete provisioning, the probe will exit and display output All nodes provisioned successfully [ OK ] -If there is something wrong when provisioning, this probe will exit when timeout is reachedd or ``Ctrl+C`` is pressed by user. The maximum time can be set by using ``-t`` as below(default 30 minutes) :: +If there is something wrong when provisioning, this probe will exit when timeout is reached or ``Ctrl+C`` is pressed by user. The maximum time can be set by using ``-t`` as below(default 30 minutes) :: xcatprobe osdeploy -n cn1 -t 30 diff --git a/docs/source/advanced/raid/hardware_raid.rst b/docs/source/advanced/raid/hardware_raid.rst index d6e0f3c8e..915f2b241 100644 --- a/docs/source/advanced/raid/hardware_raid.rst +++ b/docs/source/advanced/raid/hardware_raid.rst @@ -18,7 +18,7 @@ Following sections show how to use ``diskdiscover`` and ``configraid``, we assum Discovering disk devices ------------------------ -Command ``diskdiscover`` scans disk devices, it can get the overview of disks and RAID arrays information from compute node; The outputs contain useful information for ``configraid`` to configure RAID arrays, user can get ``pci_id``, ``pci_slot_name``, ``disk names``, ``RAID arrays`` and other informations from the outputs. It should be ran in xcat genesis system. It can be executed without input parameter or with pci_id, pci_id includes PCI vendor and device ID. For example, power8 SAS adapter pci_id is ``1014:034a``, ``1014`` is vendor info, ``034a`` is PCI-E IPR SAS Adapter, more info about pci_id refer to ``http://pci-ids.ucw.cz/read/PC/1014/``. +Command ``diskdiscover`` scans disk devices, it can get the overview of disks and RAID arrays information from compute node; The outputs contain useful information for ``configraid`` to configure RAID arrays, user can get ``pci_id``, ``pci_slot_name``, ``disk names``, ``RAID arrays`` and other information from the outputs. It should be ran in xcat genesis system. It can be executed without input parameter or with pci_id, pci_id includes PCI vendor and device ID. For example, power8 SAS adapter pci_id is ``1014:034a``, ``1014`` is vendor info, ``034a`` is PCI-E IPR SAS Adapter, more info about pci_id refer to ``http://pci-ids.ucw.cz/read/PC/1014/``. Here are steps to use ``diskdiscover``: diff --git a/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst b/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst index 1953a18ba..d2cf1f937 100644 --- a/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst +++ b/docs/source/advanced/restapi/restapi_resource/restapi_reference.rst @@ -15,7 +15,7 @@ POST - Create a token. **Example:** -Aquire a token for user 'root'. :: +Acquire a token for user 'root'. :: #curl -X POST -k 'https://127.0.0.1/xcatws/tokens?userName=root&userPW=cluster&pretty=1' -H Content-Type:application/json --data '{"userName":"root","userPW":"cluster"}' @@ -62,8 +62,8 @@ Get all the node names from xCAT database. :: [URI:/nodes/{noderange}] - The node resource -------------------------------------------- -GET - Get all the attibutes for the node {noderange}. -````````````````````````````````````````````````````` +GET - Get all the attributes for the node {noderange}. +`````````````````````````````````````````````````````` The keyword ALLRESOURCES can be used as {noderange} which means to get node attributes for all the nodes. @@ -75,7 +75,7 @@ Refer to the man page: :doc:`lsdef ` @@ -101,7 +101,7 @@ Refer to the man page: :doc:`chdef ` @@ -597,8 +597,8 @@ Get all the vitails attributes for the node1. :: [URI:/nodes/{noderange}/vitals/{temp|voltage|wattage|fanspeed|power|leds...}] - The specific vital attributes for the node {noderange} -------------------------------------------------------------------------------------------------------------------------------------- -GET - Get the specific vitals attibutes. -```````````````````````````````````````` +GET - Get the specific vitals attributes. +````````````````````````````````````````` Refer to the man page: :doc:`rvitals ` @@ -628,8 +628,8 @@ Get the 'fanspeed' vitals attribute. :: [URI:/nodes/{noderange}/inventory] - The inventory attributes for the node {noderange} -------------------------------------------------------------------------------------- -GET - Get all the inventory attibutes. -`````````````````````````````````````` +GET - Get all the inventory attributes. +``````````````````````````````````````` Refer to the man page: :doc:`rinv ` @@ -659,8 +659,8 @@ Get all the inventory attributes for node1. :: [URI:/nodes/{noderange}/inventory/{pci|model...}] - The specific inventory attributes for the node {noderange} -------------------------------------------------------------------------------------------------------------- -GET - Get the specific inventory attibutes. -``````````````````````````````````````````` +GET - Get the specific inventory attributes. +```````````````````````````````````````````` Refer to the man page: :doc:`rinv ` @@ -714,7 +714,7 @@ Refer to the man page: :doc:`reventlog ` **Returns:** -* No output when execution is successfull. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. +* No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. **Example:** @@ -947,7 +947,7 @@ Refer to the man page: :doc:`chvm ` **Returns:** -* No output when execution is successfull. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. +* No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. **Example1:** @@ -982,7 +982,7 @@ Refer to the man page: :doc:`mkvm ` **Returns:** -* No output when execution is successfull. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. +* No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. **Example:** @@ -1003,7 +1003,7 @@ Refer to the man page: :doc:`rmvm ` **Returns:** -* No output when execution is successfull. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. +* No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. **Example:** @@ -1112,7 +1112,7 @@ Refer to the man page: :doc:`copycds ` @@ -1173,7 +1173,7 @@ Refer to the man page: :doc:`chdef ` **Returns:** -* No output when execution is successfull. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. +* No output when execution is successful. Otherwise output the error information in the Standard Error Format: {error:[msg1,msg2...],errocode:errornum}. **Example1:** @@ -1284,7 +1284,7 @@ Refer to the man page: :doc:`rmimage ` @@ -1385,7 +1385,7 @@ Refer to the man page: :doc:`chdef ` @@ -1648,7 +1648,7 @@ Refer to the man page: :doc:`lsdef ` @@ -1668,7 +1668,7 @@ Refer to the man page: :doc:`chdef /xcat-core.git (fetch) diff --git a/docs/source/developers/github/pull_request.rst b/docs/source/developers/github/pull_request.rst index b5273cb26..80593db5e 100644 --- a/docs/source/developers/github/pull_request.rst +++ b/docs/source/developers/github/pull_request.rst @@ -65,7 +65,7 @@ During the reviewing of your pull request, another pull request may be merged wh $ git push origin -f -If all the conflicts are resolved, the pull request should automaically turn green again and is able to be merged automatically. +If all the conflicts are resolved, the pull request should automatically turn green again and is able to be merged automatically. Reviewing Pull Requests as a Maintainer --------------------------------------- diff --git a/docs/source/developers/guides/code/builds.rst b/docs/source/developers/guides/code/builds.rst index 7afb55b1b..28aba3d02 100644 --- a/docs/source/developers/guides/code/builds.rst +++ b/docs/source/developers/guides/code/builds.rst @@ -37,7 +37,7 @@ The following steps will help configure ``pod2rst`` and be able to generate the make make install - * **[as non-root]** Extrat and build the Perl module using PREFIX to specify a directory that you have write permission :: + * **[as non-root]** Extract and build the Perl module using PREFIX to specify a directory that you have write permission :: mkdir ~/perllib perl Makefile.PL PREFIX=~/perllib diff --git a/docs/source/developers/guides/docs/doc_guidelines.rst b/docs/source/developers/guides/docs/doc_guidelines.rst index 0a245fe01..4e13e7b1c 100644 --- a/docs/source/developers/guides/docs/doc_guidelines.rst +++ b/docs/source/developers/guides/docs/doc_guidelines.rst @@ -65,7 +65,7 @@ Enumerated List Include another file -------------------- -To add contents of a document file inside another file, use ``.. include::``. This is usefull when a common information needs to be displayed in multiple files, whithout the use of a hyperlink. +To add contents of a document file inside another file, use ``.. include::``. This is useful when a common information needs to be displayed in multiple files, without the use of a hyperlink. :: .. include:: config_common.rst @@ -76,14 +76,14 @@ To add contents of a document file inside another file, use ``.. include::``. Th Index file ---------- -Index.rst files contain the ``.. toctree::`` tag. Files listed under that tag will have links to them displayed in the left side navigation area. If a documentation file does not wish to be accessbile from the navigation area, do not list it under the ``.. toctree::``. +Index.rst files contain the ``.. toctree::`` tag. Files listed under that tag will have links to them displayed in the left side navigation area. If a documentation file does not wish to be accessible from the navigation area, do not list it under the ``.. toctree::``. ``Note:`` If a file is not listed under the ``.. toctree::`` it might generate a warning during the documentation build ``WARNING: document isn't included in any toctree``. To eliminate such warning, add the file to the ``exclude_patterns`` list in the ``docs/source/conf.py`` file. However, do not add a file to the ``exclude_patterns`` list if it contains a customized link target, such as ``.. _my_link_taget:``. This link target will not be visible to other files and a ``WARNING: undefined label:`` will be displayed during the documentation build. Hyperlinks -> Internal Links -> External Links ---------------------------------------------- -Add links to refer other web page is a very common way in writting document, it's very helpful to reduce the doc duplication and make docs easy to understand. Following are several ways to add a link in the xCAT documentation. +Add links to refer other web page is a very common way in writing document, it's very helpful to reduce the doc duplication and make docs easy to understand. Following are several ways to add a link in the xCAT documentation. * **Add an Internal Link to ``Customized Link Target``** diff --git a/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst b/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst index b8928ff7e..c94c576a2 100644 --- a/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst +++ b/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst @@ -6,7 +6,7 @@ Description The definition of physical units in the cluster, such as lpar, virtual machine, frame, cec, hmc, switch. -Key Attrubutes +Key Attributes -------------- * os: @@ -16,7 +16,7 @@ Key Attrubutes The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64. * groups: - Usually, there are a set of nodes with some attributes in common, xCAT admin can define a node group containing these nodes, so that the management task can be issued against the group instead of individual nodes. A node can be a memeber of different groups, so the value of this attributes is a comma-delimited list of groups. At least one group is required to create a node. The new created group names should not be prefixed with "__" as this token has been preserverd as the internal group name. + Usually, there are a set of nodes with some attributes in common, xCAT admin can define a node group containing these nodes, so that the management task can be issued against the group instead of individual nodes. A node can be a member of different groups, so the value of this attributes is a comma-delimited list of groups. At least one group is required to create a node. The new created group names should not be prefixed with "__" as this token has been preserved as the internal group name. * mgt: The method to do general hardware management of the node. This attribute can be determined by the machine type of the node. Valid values: ipmi, blade, hmc, ivm, fsp, bpa, kvm, esx, rhevm. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/acc_initrd_rootimg_gen.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/acc_initrd_rootimg_gen.rst index 273c6c13c..9cc18ec36 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/acc_initrd_rootimg_gen.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/acc_initrd_rootimg_gen.rst @@ -1,14 +1,14 @@ Accelerating the diskless initrd and rootimg generating ======================================================== -Generating diskless initrd with ``genimage`` and compressed rootimg with ``packimage`` and ``liteimg`` is a time-comsuming process, it can be accelerated by enabling paralell compression tool ``pigz`` on the management node with multiple processors and cores. See :ref:`Appendix ` for an example on ``packimage`` performance optimized with ``pigz`` enabled. +Generating diskless initrd with ``genimage`` and compressed rootimg with ``packimage`` and ``liteimg`` is a time-consuming process, it can be accelerated by enabling parallel compression tool ``pigz`` on the management node with multiple processors and cores. See :ref:`Appendix ` for an example on ``packimage`` performance optimized with ``pigz`` enabled. Enabling the ``pigz`` for diskless initrd and rootimg generating ---------------------------------------------------------------- -The paralell compression tool ``pigz`` can be enabled by installing ``pigz`` package on the management server or diskless rootimg. Depending on the method of generating the initrd and compressed rootimg, the steps differ in different Linux distributions. +The parallel compression tool ``pigz`` can be enabled by installing ``pigz`` package on the management server or diskless rootimg. Depending on the method of generating the initrd and compressed rootimg, the steps differ in different Linux distributions. * **[RHEL]** @@ -24,7 +24,7 @@ The paralell compression tool ``pigz`` can be enabled by installing ``pigz`` pac ``pigz`` should be installed in the diskless rootimg. Download ``pigz`` package from https://dl.fedoraproject.org/pub/epel/ , then customize the diskless osimage to install ``pigz`` as the additional packages, see :doc:`Install Additional Other Packages` for more details. - 2) Enabeling the ``pigz`` in ``packimage`` + 2) Enabling the ``pigz`` in ``packimage`` ``pigz`` should be installed on the management server. Download ``pigz`` package from https://dl.fedoraproject.org/pub/epel/ , then install the ``pigz`` with ``yum`` or ``rpm``. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_other_pkg.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_other_pkg.rst index e6cc403e6..99d57a980 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_other_pkg.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_other_pkg.rst @@ -70,7 +70,7 @@ These are described in more details in the following sections. RPM Names ''''''''' -A simple otherpkgs.pkglist file just contains the the name of the rpm file without the version numbers. +A simple otherpkgs.pkglist file just contains the name of the rpm file without the version numbers. For example, if you put the following three rpms under **/install/post/otherpkgs///** directory, :: diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_pkg.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_pkg.rst index 77651f270..dcf8c350b 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_pkg.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/nonubuntu_os_pkg.rst @@ -51,7 +51,7 @@ These are described in more details in the following sections. RPM Names '''''''''' -A simple .pkglist file just contains the the name of the rpm file without the version numbers. +A simple .pkglist file just contains the name of the rpm file without the version numbers. For example :: 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/cfg_second_adapter.rst index 492361fc5..ca1da9738 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/cfg_second_adapter.rst @@ -1,7 +1,7 @@ Configure Additional Network Interfaces - confignics ==================================================== -The **nics** table and the **confignics** postscript can be used to automatically configure additional network interfaces (mutltiple ethernets adapters, InfiniBand, etc) on the nodes as they are being deployed. +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. The way the confignics postscript decides what IP address to give the secondary adapter is by checking the nics table, in which the nic configuration information is stored. @@ -78,7 +78,7 @@ By default, confignics does not configure the install nic. if need, using flag " chdef cn1 -p prostscripts="confignics -s" -Option "-s" writes the install nic's information into configuration file for persistance. All install nic's data defined in nics table will be written also. +Option "-s" writes the install nic's information into configuration file for persistence. All install nic's data defined in nics table will be written also. Add network object into the networks table diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/deploy_os.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/deploy_os.rst index bd7567600..4a358b41e 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/deploy_os.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/deploy_os.rst @@ -11,7 +11,7 @@ There are more attributes of nodeset used for some specific purpose or specific * **runcmd**: This instructs the node to boot to the xCAT nbfs environment and proceed to configure BMC for basic remote access. This causes the IP, netmask, gateway, username, and password to be programmed according to the configuration table. * **shell**: This instructs the node to boot to the xCAT genesis environment, and present a shell prompt on console. The node will also be able to be sshed into and have utilities such as wget, tftp, scp, nfs, and cifs. It will have storage drivers available for many common systems. -Choose such additional attribute of nodeset according to your requirement, if want to get more informantion about nodeset, refer to nodeset's man page. +Choose such additional attribute of nodeset according to your requirement, if want to get more information about nodeset, refer to nodeset's man page. Start the OS Deployment ======================= diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_kdump.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_kdump.rst index 85973cc1c..a6c0765d2 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_kdump.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_kdump.rst @@ -38,7 +38,7 @@ In above example, pkglist file is /opt/xcat/share/xcat/netboot/rh/compute.rhels7 Setup pkglist ------------- -Before setting up kdump,the approprite rpms should be added to the pkglist file.Here is the rpm packages list which needs to be added to pkglist file for kdump for different OS. +Before setting up kdump, the appropriate rpms should be added to the pkglist file.Here is the rpm packages list which needs to be added to pkglist file for kdump for different OS. * **[RHEL]** :: diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/generate_img.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/generate_img.rst index a5dcf5382..e5886603d 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/generate_img.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/generate_img.rst @@ -1,7 +1,7 @@ Generate Diskless Image ======================= -The ``copycds`` command copies the contents of the Linux media to ``/install//`` so that it will be available for installing nodes or creating diskless images. After executing ``copycds``, there are serveral ``osimage`` definitions created by default. Run ``tabdump osimage`` to view these images: :: +The ``copycds`` command copies the contents of the Linux media to ``/install//`` so that it will be available for installing nodes or creating diskless images. After executing ``copycds``, there are several ``osimage`` definitions created by default. Run ``tabdump osimage`` to view these images: :: tabdump osimage @@ -18,7 +18,7 @@ The ``netboot-compute`` is the default **diskless** osimage created rhels7.1 ppc Before packing the diskless image, you have the opportunity to change any files in the image by changing to the ``rootimgdir`` and making modifications. (e.g. ``/install/netboot/rhels7.1/ppc64le/compute/rootimg``). -However it's recommended that all changes to the image are made via post install scripts so that it's easily repeatable.Although, instead, we recommend that you make all changes to the image via your postinstall script, so that it is repeatable. Refer to :doc:`/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/pre_post_script` for more details. +However it's recommended that all changes to the image are made via post install scripts so that it's easily repeatable. Although, instead, we recommend that you make all changes to the image via your postinstall script, so that it is repeatable. Refer to :doc:`/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/pre_post_script` for more details. Pack Diskless Image @@ -102,7 +102,7 @@ Skip this section if you want to use the image as is. 1, The use can modify the image to fit his/her own need. The following can be modified. -* Modify .pkglist file to add or remove packges that are from the os distro +* Modify .pkglist file to add or remove packages that are from the os distro * Modify .otherpkgs.pkglist to add or remove packages from other sources. Refer to ``Using_Updatenode`` for details diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/prepostscripts/postinstall_script.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/prepostscripts/postinstall_script.rst index f212c8691..d3066b65c 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/prepostscripts/postinstall_script.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/prepostscripts/postinstall_script.rst @@ -40,7 +40,7 @@ The ``postinstall`` scripts are executed in step b). Do ``postinstall`` scripts execute in chroot mode under ``rootimgdir`` directory? ````````````````````````````````````````````````````````````````````````````````` -No. Unlike postscripts and postbootscripts, the ``postinstall`` scripts are run in non-chroot environment, directly on the management node. In the postinstall scripts, all the paths of the directories and files are based on ``/`` of the managememnt node. To reference inside the ``rootimgdir``, use the ``$IMG_ROOTIMGDIR`` environment variable, exported by ``genimage``. +No. Unlike postscripts and postbootscripts, the ``postinstall`` scripts are run in non-chroot environment, directly on the management node. In the postinstall scripts, all the paths of the directories and files are based on ``/`` of the management node. To reference inside the ``rootimgdir``, use the ``$IMG_ROOTIMGDIR`` environment variable, exported by ``genimage``. What are some of the environment variables available to my customized ``postinstall`` scripts? `````````````````````````````````````````````````````````````````````````````````````````````` diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/raid_cfg.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/raid_cfg.rst index 0acea9a4e..752f38412 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/raid_cfg.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/raid_cfg.rst @@ -185,7 +185,7 @@ Here is the RAID1 partitioning section in service.raid1.sles11.tmpl: :: The samples above created one 24MB PReP partition on each disk, one 2GB mirrored swap partition and one mirrored ``/`` partition uses all the disk space. If you want to use different partitioning scheme in your cluster, modify this RAID1 section in the autoyast template file accordingly. -Since the PReP partition can not be mirrored between the two disks, some additional postinstall commands should be run to make the second disk bootable, here the the commands needed to make the second disk bootable: :: +Since the PReP partition can not be mirrored between the two disks, some additional postinstall commands should be run to make the second disk bootable, here the commands needed to make the second disk bootable: :: # Set the second disk to be bootable for RAID1 setup parted -s /dev/sdb mkfs 1 fat16 @@ -230,7 +230,7 @@ The command mdadm can query the detailed configuration for the RAID partitions: Disk Replacement Procedure -------------------------- -If any one disk fails in the RAID1 arrary, do not panic. Follow the procedure listed below to replace the failed disk and you will be fine. +If any one disk fails in the RAID1 array, do not panic. Follow the procedure listed below to replace the failed disk and you will be fine. Faulty disks should appear marked with an (F) if you look at ``/proc/mdstat``: :: @@ -250,7 +250,7 @@ Faulty disks should appear marked with an (F) if you look at ``/proc/mdstat``: : We can see that the first disk is broken because all the RAID partitions on this disk are marked as (F). -Remove the failed disk from RAID arrary +Remove the failed disk from RAID array --------------------------------------- ``mdadm`` is the command that can be used to query and manage the RAID arrays on Linux. To remove the failed disk from RAID array, use the command: :: diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst index 4862d4ed8..d0d18af6f 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst @@ -3,7 +3,7 @@ Overview Synchronizing (sync) files to the nodes is a feature of xCAT used to distribute specific files from the management node to the new-deploying or deployed nodes. -This function is supported for diskful or RAMdisk-based diskless nodes.Generally, the specific files are usually the system configuration files for the nodes in the **/etc/directory**, like **/etc/hosts**, **/etc/resolve.conf**; it also could be the application programs configuration files for the nodes. The advantages of this function are: it can parallel sync files to the nodes or nodegroup for the installed nodes; it can automatically sync files to the newly-installing node after the installation. Additionally, this feature also supports the flexible format to define the synced files in a configuration file, called **'synclist'**. +This function is supported for diskful or RAMdisk-based diskless nodes. Generally, the specific files are usually the system configuration files for the nodes in the **/etc/directory**, like **/etc/hosts**, **/etc/resolve.conf**; it also could be the application programs configuration files for the nodes. The advantages of this function are: it can parallel sync files to the nodes or nodegroup for the installed nodes; it can automatically sync files to the newly-installing node after the installation. Additionally, this feature also supports the flexible format to define the synced files in a configuration file, called **'synclist'**. The synclist file can be a common one for a group of nodes using the same profile or osimage, or can be the special one for a particular node. Since the location of the synclist file will be used to find the synclist file, the common synclist should be put in a given location for Linux nodes or specified by the osimage. @@ -17,7 +17,7 @@ For a new-installing nodes, the Syncing File action will be triggered when perfo The postscript **'syncfiles'** is located in the **/install/postscripts/**. When running, it sends a message to the xcatd on the management node or service node, then the xcatd figures out the corresponding synclist file for the node and calls the ``xdcp`` command to sync files in the synclist to the node. -**If installing nodes in a hierarchical configuration, you must sync the Service Nodes first to make sure they are updated. The compute nodes will be sync'd from their service nodes.You can use the** ``updatenode -f`` **command to sync all the service nodes for range of compute nodes provided.** +**If installing nodes in a hierarchical configuration, you must sync the Service Nodes first to make sure they are updated. The compute nodes will be sync'd from their service nodes. You can use the** ``updatenode -f`` **command to sync all the service nodes for range of compute nodes provided.** For an installed nodes, the Syncing File action happens when performing the ``updatenode -F`` or ``xdcp -F synclist`` command to update a nodes. If performing the ``updatenode -F``, it figures out the location of the synclist files for all the nodes and classify the nodes which using same synclist file and then calls the ``xdcp -F synclist`` to sync files to the nodes. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst index 6ce471eb3..9af8e913f 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst @@ -97,7 +97,7 @@ Note: From xCAT 2.9.2 on AIX and from xCAT 2.12 on Linux, xCAT support a new for file -> (noderange for permitted nodes) file -The noderange would have several format. Following examples show that /etc/hosts file is synced to the nodes which is specifed before the file name :: +The noderange would have several format. Following examples show that /etc/hosts file is synced to the nodes which is specified before the file name :: /etc/hosts -> (node1,node2) /etc/hosts # The /etc/hosts file is synced to node1 and node2 /etc/hosts -> (node1-node4) /etc/hosts # The /etc/hosts file is synced to node1,node2,node3 and node4 diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/trim_diskless_rootimg.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/trim_diskless_rootimg.rst index 198ac04e8..e417ca402 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/trim_diskless_rootimg.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/trim_diskless_rootimg.rst @@ -51,7 +51,7 @@ The content above presents some syntax supported in exlist file: +./usr/share/locale/C* - It is useful to include files following an exclude entry to qiuckly remove a larger set of files using a wildcard and then adding back the few necessary files using the + sign. In the above example, all the files and sub-directories matching the pattern ``/usr/share/locale/C*`` will be included in the ``rootimg.gz`` file. + It is useful to include files following an exclude entry to quickly remove a larger set of files using a wildcard and then adding back the few necessary files using the + sign. In the above example, all the files and sub-directories matching the pattern ``/usr/share/locale/C*`` will be included in the ``rootimg.gz`` file. Customize the ``exlist`` file and the osimage definition @@ -77,4 +77,4 @@ If you want to customize the osimage ``sles12.1-ppc64le-netboot-compute`` with y .. [1] The ``exlist`` file entry should not end with a slash ``/``, For example, this entry will never match anything: ``./usr/lib/perl[0-9]/[0-9.]*/ppc64le-linux-thread-multi/Encode/``. -.. [2] Pattern match test applies to the whole file name,starting from one of the start points specified in the ``exlist`` file entry. The regex syntax should comply with the regex syntax of system command ``find -path``, refer to its doc for details. +.. [2] Pattern match test applies to the whole file name, starting from one of the start points specified in the ``exlist`` file entry. The regex syntax should comply with the regex syntax of system command ``find -path``, refer to its doc for details. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst index cc7a1fc49..f383e065d 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst @@ -2,7 +2,7 @@ Manage Virtual Machine (VM) ============================ -Now the MowerKVM hypervisor "kvmhost1" is ready, this section introduces the VM management in xCAT, including examples on how to create,remove and clone VMs. +Now the MowerKVM hypervisor "kvmhost1" is ready, this section introduces the VM management in xCAT, including examples on how to create, remove and clone VMs. Create Virtual Machine ---------------------- @@ -117,7 +117,7 @@ Now a VM "vm1" is created, it can be provisioned like any other nodes in xCAT. T rpower vm1 on -If "vm1" is powered on successfully, the VM status can be obtained by running the following command on management node :: +If "vm1" is powered on successfully, the VM status can be obtained by running the following command on management node :: rpower vm1 status diff --git a/docs/source/guides/admin-guides/manage_clusters/common/updatenode.rst b/docs/source/guides/admin-guides/manage_clusters/common/updatenode.rst index 67444a2cd..5a505a57b 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/updatenode.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/updatenode.rst @@ -134,6 +134,6 @@ where is a comma separated postscript like ospkgs,otherpkgs etc. * wget is used in xcatdsklspost/xcataixpost to get all the postscripts from the to the node. You can check /tmp/wget.log file on the node to see if wget was successful or not. You need to make sure the /xcatpost directory has enough space to hold the postscripts. * A file called /xcatpost/mypostscript (Linux) is created on the node which contains the environmental variables and scripts to be run. Make sure this file exists and it contains correct info. You can also run this file on the node manually to debug. * For ospkgs/otherpkgs, if /install is not mounted on the , it will download all the rpms from the to the node using wget. Make sure /tmp and /xcatpost have enough space to hold the rpms and check /tmp/wget.log for errors. - * For ospkgs/otherpkgs, If zypper or yum is installed on the node, it will be used the command to install the rpms. Make sure to run createrepo on the source direcory on the every time a rpm is added or removed. Otherwise, the rpm command will be used, in this case, make sure all the necessary depended rpms are copied in the same source directory. + * For ospkgs/otherpkgs, If zypper or yum is installed on the node, it will be used the command to install the rpms. Make sure to run createrepo on the source directory on the every time a rpm is added or removed. Otherwise, the rpm command will be used, in this case, make sure all the necessary depended rpms are copied in the same source directory. * You can append -x on the first line of ospkgs/otherpkgs to get more debug info. diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/index.rst index fde5e5254..c4c998c9e 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/index.rst @@ -3,12 +3,12 @@ MTMS-based Discovery MTMS stands for **M**\ achine **T**\ ype/\ **M**\ odel and **S**\ erial. This is one way to uniquely identify each physical server. -MTMS-based hardware discovery assumes the administator has the model type and serial number information for the physical servers and a plan for mapping the servers to intended hostname/IP addresses. +MTMS-based hardware discovery assumes the administrator has the model type and serial number information for the physical servers and a plan for mapping the servers to intended hostname/IP addresses. **Overview** #. Automatically search and collect MTMS information from the servers - #. Write **discovered-bmc-nodes** to xCAT (recommened to set different BMC IP address) + #. Write **discovered-bmc-nodes** to xCAT (recommended to set different BMC IP address) #. Create **predefined-compute-nodes** to xCAT providing additional properties #. Power on the nodes which triggers xCAT hardware discovery engine diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst index 5923a32a5..9399c0405 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst @@ -1,11 +1,11 @@ -IBM Power LE / OpenPOWER +IBM POWER LE / OpenPOWER ========================= -Most of the content is general information for xCAT, the focus and examples are for management of IBM OpenPower servers. +Most of the content is general information for xCAT, the focus and examples are for management of IBM OpenPOWER servers. -IBM OpenPower Servers - * based on Power8 Processor Technology is IPMI managed - * based on Power9 Processor Technology is OpenBmc managed [**Alpha**] +IBM OpenPOWER Servers + * based on POWER8 Processor Technology is IPMI managed + * based on POWER9 Processor Technology is OpenBMC managed [**Alpha**] .. toctree:: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst index 531266228..396880103 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst @@ -7,11 +7,11 @@ Most enterprise servers do not have video adapters installed with the machine an Configure the correct console management by modifying the node definition: - * For OpenPower, **IPMI** managed server: :: + * For OpenPOWER, **IPMI** managed server: :: chdef -t node -o cons=ipmi - * For OpenPower, **OpenBMC** managed servers: :: + * For OpenPOWER, **OpenBMC** managed servers: :: chdef -t node -o cons=openbmc @@ -46,7 +46,7 @@ The xCAT ``rcons`` command relies on conserver (http://www.conserver.com/). The OpenBMC Specific -``````````````` +```````````````` #. For OpenBMC managed servers, the root user must be able to ssh passwordless to the BMC for the ``rcons`` function to work. diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst index ce44725f0..0e66ab76d 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst @@ -20,7 +20,7 @@ The litefile table specifies the directories and files on the statelite nodes th #. The third column in the litefile table specifies options for the directory or file: #. tmpfs - It provides a file or directory for the node to use when booting, its permission will be the same as the original version on the server. In most cases, it is read-write; however, on the next statelite boot, the original version of the file or directory on the server will be used, it means it is non-persistent. This option can be performed on files and directories. - #. rw - Same as Above.Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Do not confuse it with the "rw" permission in the file system. + #. rw - Same as above. Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Do not confuse it with the "rw" permission in the file system. #. persistent - It provides a mounted file or directory that is copied to the xCAT persistent location and then over-mounted on the local file or directory. Anything written to that file or directory is preserved. It means, if the file/directory does not exist at first, it will be copied to the persistent location. Next time the file/directory in the persistent location will be used. The file/directory will be persistent across reboots. Its permission will be the same as the original one in the statelite location. It requires the statelite table to be filled out with a spot for persistent statelite. This option can be performed on files and directories. #. con - The contents of the pathname are concatenated to the contents of the existing file. For this directive the searching in the litetree hierarchy does not stop when the first match is found. All files found in the hierarchy will be concatenated to the file when found. The permission of the file will be "-rw-r--r--", which means it is read-write for the root user, but readonly for the others. It is non-persistent, when the node reboots, all changes to the file will be lost. It can only be performed on files. Do not use it for one directory. #. ro - The file/directory will be overmounted read-only on the local file/directory. It will be located in the directory hierarchy specified in the litetree table. Changes made to this file or directory on the server will be immediately seen in this file/directory on the node. This option requires that the file/directory to be mounted must be available in one of the entries in the litetree table. This option can be performed on files and directories. @@ -133,5 +133,5 @@ noderes ``noderes.nfsserver`` attribute can be set for the NFSroot server. If this is not set, then the default is the Management Node. -``noderes.nfsdir`` can be set. If this is not set, the the default is ``/install`` +``noderes.nfsdir`` can be set. If this is not set, the default is ``/install`` diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst index 7a00d46e6..214c79607 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst @@ -88,7 +88,7 @@ Fail to ping the installed VM ADDRCONF(NETDEV_UP): eth0 link is not ready. - **Solutoin**: + **Solution**: Usually caused by the incorrect VM NIC model. Try the following steps to specify "virtio": :: rmvm vm1 diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/hypervisorKVM.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/hypervisorKVM.rst index e4f0b0b14..63a2df528 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/hypervisorKVM.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/hypervisorKVM.rst @@ -16,7 +16,7 @@ Provision Hypervisor #. Customize the hypervisor node definition to create network bridge - xCAT ships a postscript **xHRM** to create a network bridge on kvm host during installation/netbooting. Specify the **xHRM** with appropriate parameters in **postscripts** attibute. For example: + xCAT ships a postscript **xHRM** to create a network bridge on kvm host during installation/netbooting. Specify the **xHRM** with appropriate parameters in **postscripts** attribute. For example: * To create a bridge named 'br0' against the installation network device specified by **installnic**: :: @@ -68,7 +68,7 @@ If the hypervisor is provisioned successfully according to the steps described a br0 8000.000000000000 no eth0 -If the network bridge is not created or configured successfully, run "xHRM" with **updatenode** on managememt node to create it manually::: +If the network bridge is not created or configured successfully, run "xHRM" with **updatenode** on management node to create it manually::: updatenode kvmhost1 -P "xHRM bridgeprereq eth0:br0" diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/kvmMN.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/kvmMN.rst index 8b735a1f4..eb33072f8 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/kvmMN.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/kvmMN.rst @@ -15,7 +15,7 @@ Please make sure the following packages have been installed on the management no Set Up the kvm storage directory on the management node(optional) ----------------------------------------------------------------- -It is a recommended configuration to create a shared file system for virtual machines hosting. The shared file system, usually on a SAN, NAS or GPFS, is shared among KVM hypevisors, which simplifies VM migration from one hypervisor to another with xCAT. +It is a recommended configuration to create a shared file system for virtual machines hosting. The shared file system, usually on a SAN, NAS or GPFS, is shared among KVM hypervisors, which simplifies VM migration from one hypervisor to another with xCAT. The easiest shared file system is ``/install`` directory on the management node, it can be shared among hypervisors via NFS. Please refer to the following steps : diff --git a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst index efe3bde5b..7173c39f5 100644 --- a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst @@ -35,7 +35,7 @@ DESCRIPTION *********** -The \ **bmcdiscover**\ command will discover Baseboard Management Controllers (BMCs) using a scan mathod. +The \ **bmcdiscover**\ command will discover Baseboard Management Controllers (BMCs) using a scan method. The command uses \ **nmap**\ to scan active nodes over a specified IP range. The IP range format should be a format that is acceptable by \ **nmap**\ . @@ -52,7 +52,7 @@ OPTIONS \ **-**\ **-range**\ - Specify one or more IP ranges acceptable to nmap. IP rance can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return. + Specify one or more IP ranges acceptable to nmap. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return. diff --git a/docs/source/guides/admin-guides/references/man1/cfgve.1.rst b/docs/source/guides/admin-guides/references/man1/cfgve.1.rst index 6de85a9fd..3c53d9b20 100644 --- a/docs/source/guides/admin-guides/references/man1/cfgve.1.rst +++ b/docs/source/guides/admin-guides/references/man1/cfgve.1.rst @@ -98,7 +98,7 @@ OPTIONS be owned by vdsm:kvm. \ **localfs**\ : "/data/images/rhev" is set by default. - \ **virtsd.host**\ - A host must be specified for a storage doamin as SPM + \ **virtsd.host**\ - A host must be specified for a storage domain as SPM (Storage Pool Manager) when initialize the storage domain. The role of SPM may be migrated to other host by rhev-m during the running of the datacenter (For example, when the current SPM encountered issue or going to maintenance diff --git a/docs/source/guides/admin-guides/references/man1/chvm.1.rst b/docs/source/guides/admin-guides/references/man1/chvm.1.rst index 01e9afc33..14b1f28ea 100644 --- a/docs/source/guides/admin-guides/references/man1/chvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/chvm.1.rst @@ -151,7 +151,7 @@ PPC (using Direct FSP Management) specific: For Power 755(use option \ *--p775*\ to specify): -chvm could be used to change the octant configuration values for generating LPARs. chvm is designed to set the Octant configure value to split the CPU and memory for partitions, and set Octant Memory interleaving value. The chvm will only set the pending attributes value. After chvm, the CEC needs to be rebooted manually for the pending values to be enabled. Before reboot the cec, the administrator can use chvm to change the partition plan. If the the partition needs I/O slots, the administrator should use chvm to assign the I/O slots. +chvm could be used to change the octant configuration values for generating LPARs. chvm is designed to set the Octant configure value to split the CPU and memory for partitions, and set Octant Memory interleaving value. The chvm will only set the pending attributes value. After chvm, the CEC needs to be rebooted manually for the pending values to be enabled. Before reboot the cec, the administrator can use chvm to change the partition plan. If the partition needs I/O slots, the administrator should use chvm to assign the I/O slots. chvm is also designed to assign the I/O slots to the new LPAR. Both the current IO owning lpar and the new IO owning lpar must be powered off before an IO assignment. Otherwise, if the I/O slot is belonged to an Lpar and the LPAR is power on, the command will return an error when trying to assign that slot to a different lpar. @@ -166,7 +166,7 @@ zVM specific: ============= -The chvm command modifes the virtual machine's configuration specified in noderange. +The chvm command modifies the virtual machine's configuration specified in noderange. @@ -336,7 +336,7 @@ VMware/KVM specific: \ **-**\ **-resize**\ \ *disk*\ =\ *size*\ - Change the size of the Hard disk. The disk in \ *qcow2*\ format can not be set to less than it's current size. The disk in \ *raw*\ format can be resized smaller, use caution. Multiple disks can be resized by using comma separated \ *disk*\ \ **=**\ \ *size*\ pairs. The disks are specified by SCSI id. Size defaults to GB. + Change the size of the Hard disk. The disk in \ *qcow2*\ format can not be set to less than its current size. The disk in \ *raw*\ format can be resized smaller, use caution. Multiple disks can be resized by using comma separated \ *disk*\ \ **=**\ \ *size*\ pairs. The disks are specified by SCSI id. Size defaults to GB. diff --git a/docs/source/guides/admin-guides/references/man1/csm2xcat.1.rst b/docs/source/guides/admin-guides/references/man1/csm2xcat.1.rst index f03df04a2..cd06071a9 100644 --- a/docs/source/guides/admin-guides/references/man1/csm2xcat.1.rst +++ b/docs/source/guides/admin-guides/references/man1/csm2xcat.1.rst @@ -29,7 +29,7 @@ DESCRIPTION *********** -The csm2xcat command must be run on the Management Server of the CSM system that you want to migrate to xCAT. The commmand will build two xCAT stanza files that can update the xCAT database with the chdef command. +The csm2xcat command must be run on the Management Server of the CSM system that you want to migrate to xCAT. The command will build two xCAT stanza files that can update the xCAT database with the chdef command. Copy the csm2xcat command to the CSM Management Server. Run the command, indicating where you want your stanza files saved with the \ **-**\ **-dir**\ parameter. Check the stanza files to see if the information is what you want put in the xCAT database. Copy the two stanza files: node.stanza, device.stanza back to your xCAT Management node, and run the chdef command to input into the xCAT database. diff --git a/docs/source/guides/admin-guides/references/man1/db2sqlsetup.1.rst b/docs/source/guides/admin-guides/references/man1/db2sqlsetup.1.rst index 96b2fad80..2ea1fed24 100644 --- a/docs/source/guides/admin-guides/references/man1/db2sqlsetup.1.rst +++ b/docs/source/guides/admin-guides/references/man1/db2sqlsetup.1.rst @@ -46,7 +46,7 @@ For full information on the setup of DB2, see Setting_Up_DB2_as_the_xCAT_DB. When running of db2sqlsetup on the MN: One password must be supplied for the setup, a password for the xcatdb unix id which will be used as the DB2 instance id and database name. The password will be prompted for interactively or can be input with the XCATDB2PW environment variable. -The script will create the xcat database instance (xcatdb) in the /var/lib/db2 directory unless overriden by setting the site.databaseloc attribute. This attribute should not be set to the directory that is defined in the installloc attribute and it is recommended that the databaseloc be a new filesystem dedicated to the DB2 database, especially in very large clusters. +The script will create the xcat database instance (xcatdb) in the /var/lib/db2 directory unless overridden by setting the site.databaseloc attribute. This attribute should not be set to the directory that is defined in the installloc attribute and it is recommended that the databaseloc be a new filesystem dedicated to the DB2 database, especially in very large clusters. When running db2sqlseutp on the SN: Not only will the password for the DB2 instance Id be prompted for and must match the one on the Management Node; but also the hostname or ip address of the Management Node as known by the Service Node must be supplied , unless the XCATDB2SERVER environment variable is set. diff --git a/docs/source/guides/admin-guides/references/man1/dumpxCATdb.1.rst b/docs/source/guides/admin-guides/references/man1/dumpxCATdb.1.rst index 8dcaedc47..af89c9fef 100644 --- a/docs/source/guides/admin-guides/references/man1/dumpxCATdb.1.rst +++ b/docs/source/guides/admin-guides/references/man1/dumpxCATdb.1.rst @@ -35,7 +35,7 @@ If not using the binary dump option (-b), then the dumpxCATdb command creates .c Supports using XCAT_SKIPTABLES env variable to provide a list of skip tables. The command will never backup TEAL or ISNM tables, except isnm_config. To dump TEAL tables use the documented process for TEAL. For ISNM use tabdump, after using tabprune to get to prune unnecessary records. -If using the binary dump option for the DB2 or postgreSQL database, then the routine will use the Database provide utilites for backup of the entire database. +If using the binary dump option for the DB2 or postgreSQL database, then the routine will use the Database provide utilities for backup of the entire database. ******* @@ -49,7 +49,7 @@ OPTIONS \ **-V**\ Verbose. -\ **-a**\ All,without this flag the eventlog and auditlog will be skipped. +\ **-a**\ All, without this flag the eventlog and auditlog will be skipped. \ **-b**\ This flag is only used for the DB2 or postgreSQL database. The routine will use the database backup utilities to create a binary backup of the entire database. Note to use this backup on DB2, you will have first had to modify the logging of the database and have taken an offline initial backup. Refer to the xCAT DB2 documentation for more instructions. diff --git a/docs/source/guides/admin-guides/references/man1/genimage.1.rst b/docs/source/guides/admin-guides/references/man1/genimage.1.rst index 6d0f8adfd..d28fd3880 100644 --- a/docs/source/guides/admin-guides/references/man1/genimage.1.rst +++ b/docs/source/guides/admin-guides/references/man1/genimage.1.rst @@ -46,7 +46,7 @@ for stateless: \ **packimage**\ for statelite: \ **liteimg**\ -Besides prompting for some paramter values, the \ **genimage**\ command takes default guesses for the parameters not specified or not defined in the \ *osimage*\ and \ *linuximage*\ tables. It also assumes default answers for questions from the yum/zypper command when installing rpms into the image. Use \ **-**\ **-interactive**\ flag if you want the yum/zypper command to prompt you for the answers. +Besides prompting for some parameter values, the \ **genimage**\ command takes default guesses for the parameters not specified or not defined in the \ *osimage*\ and \ *linuximage*\ tables. It also assumes default answers for questions from the yum/zypper command when installing rpms into the image. Use \ **-**\ **-interactive**\ flag if you want the yum/zypper command to prompt you for the answers. If \ **-**\ **-onlyinitrd**\ is specified, genimage only regenerates the initrd for a stateless image to be used for a diskless install. diff --git a/docs/source/guides/admin-guides/references/man1/geninitrd.1.rst b/docs/source/guides/admin-guides/references/man1/geninitrd.1.rst index ffac5dd95..881fff450 100644 --- a/docs/source/guides/admin-guides/references/man1/geninitrd.1.rst +++ b/docs/source/guides/admin-guides/references/man1/geninitrd.1.rst @@ -43,7 +43,7 @@ If the initrd has been rebuilt by geninitrd, when run nodeset, the \ *--noupdate should be used to skip the rebuilding of initrd to improve the performance. Three attributes of osimage object can be used to specify the Driver RPM location and Driver names -for injecting new drviers to initrd. +for injecting new drivers to initrd. \ **netdrivers**\ - comma separated driver names that need to be injected to the initrd. The postfix '.ko' can be ignored. The netdrivers attribute must be set to specify the new driver list. @@ -65,7 +65,7 @@ this command is used to generate the initrd from the rootimg which generated by So the 'genimage' must be run once before running the geninitrd command. Two attributes of osimage object can be used to specify the Driver RPM location and Driver names -for injecting new drviers to initrd. +for injecting new drivers to initrd. \ **netdrivers**\ - comma separated driver names that need to be injected to the initrd. The postfix '.ko' can be ignored. The netdrivers attribute must be set to specify the new driver list. @@ -79,7 +79,7 @@ Parameters ********** -\ *imagename*\ specifies the name of an os image definition to be used. The specification for the image is storted in the \ *osimage*\ table and \ *linuximage*\ table. +\ *imagename*\ specifies the name of an os image definition to be used. The specification for the image is stored in the \ *osimage*\ table and \ *linuximage*\ table. \ **-**\ **-ignorekernelchk**\ diff --git a/docs/source/guides/admin-guides/references/man1/getadapter.1.rst b/docs/source/guides/admin-guides/references/man1/getadapter.1.rst index 7bd216c97..982fcd4c3 100644 --- a/docs/source/guides/admin-guides/references/man1/getadapter.1.rst +++ b/docs/source/guides/admin-guides/references/man1/getadapter.1.rst @@ -35,8 +35,8 @@ Traditionally, network interfaces in Linux are enumerated as eth[0123...], but t \ **getadapter**\ For each node within the , follows below scheme: -If the target node is scaned 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 scaned, \ **getadapter**\ will use the information from nics table first. +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. diff --git a/docs/source/guides/admin-guides/references/man1/getmacs.1.rst b/docs/source/guides/admin-guides/references/man1/getmacs.1.rst index 05bfd6ff0..a38bc1abf 100644 --- a/docs/source/guides/admin-guides/references/man1/getmacs.1.rst +++ b/docs/source/guides/admin-guides/references/man1/getmacs.1.rst @@ -51,12 +51,12 @@ DESCRIPTION The getmacs command collects MAC address from a single or range of nodes. -Note that on AIX systems, the returned MAC address is not colon-seperated (for example 8ee2245cf004), while on Linux systems the MAC address is colon-seperated (for example 8e:e2:24:5c:f0:04). +Note that on AIX systems, the returned MAC address is not colon-separated (for example 8ee2245cf004), while on Linux systems the MAC address is colon-separated (for example 8e:e2:24:5c:f0:04). If no ping test performed, getmacs writes the first adapter MAC to the xCAT database. If ping test performed, getmacs will write the first successfully pinged MAC to xCAT database. For PPC (using Direct FSP Management) specific: -Note: If network adapters are physically assigned to LPARs, getmacs cannot read the MAC addresses unless perform \ **Discovery**\ with option "\ **-D**\ ", since there is no HMC command to read them and getmacs has to login to open formware. And if the LPARs has never been activated before, getmacs need to be performed with the option "\ **-D**\ " to get theirs MAC addresses. +Note: If network adapters are physically assigned to LPARs, getmacs cannot read the MAC addresses unless perform \ **Discovery**\ with option "\ **-D**\ ", since there is no HMC command to read them and getmacs has to login to open firmware. And if the LPARs has never been activated before, getmacs need to be performed with the option "\ **-D**\ " to get theirs MAC addresses. For PPC (using HMC) specific: @@ -74,7 +74,7 @@ OPTIONS \ **-**\ **-arp**\ -Read MAC address with ARP protocal. +Read MAC address with ARP protocol. \ **-C**\ @@ -90,7 +90,7 @@ Perform discovery for mac address. By default, it will run ping test to test th \ **-f**\ -Force immediate shutdown of the partition.This flag must be used with -D flag. +Force immediate shutdown of the partition. This flag must be used with -D flag. \ **-F**\ @@ -118,7 +118,7 @@ Read MAC address when the lpar is in openfirmware state. This option mush be us \ **-S**\ -The IP address of the machine to ping. The default is to read from xCAT databse if no \ **-S**\ specified. +The IP address of the machine to ping. The default is to read from xCAT database if no \ **-S**\ specified. \ **-v**\ @@ -167,7 +167,7 @@ Output is similar to: ent U78A1.001.99203B5-P1-T6 00145eb55788 /lhea@23c00614/ethernet@23e00514 unsuccessful physical -2. To retrieve the MAC address with ARP protocal: +2. To retrieve the MAC address with ARP protocol: .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/groupfiles4dsh.1.rst b/docs/source/guides/admin-guides/references/man1/groupfiles4dsh.1.rst index ea06cfd04..3a2675767 100644 --- a/docs/source/guides/admin-guides/references/man1/groupfiles4dsh.1.rst +++ b/docs/source/guides/admin-guides/references/man1/groupfiles4dsh.1.rst @@ -33,7 +33,7 @@ This tool will build a directory of files, one for each defined nodegroup in xCAT. The file will be named the nodegroup name and contain a list of nodes that belong to the nodegroup. The file can be used as input to the AIX dsh command. -The purpose of this tool is to allow backward compatiblity with scripts +The purpose of this tool is to allow backward compatibility with scripts that were created using the AIX or CSM dsh command Reference: man dsh. diff --git a/docs/source/guides/admin-guides/references/man1/imgexport.1.rst b/docs/source/guides/admin-guides/references/man1/imgexport.1.rst index 2e08a1b61..3626725f1 100644 --- a/docs/source/guides/admin-guides/references/man1/imgexport.1.rst +++ b/docs/source/guides/admin-guides/references/man1/imgexport.1.rst @@ -61,7 +61,7 @@ For statelite: where x is the name of the profile. -Any files specified by the \ **-e**\ flag will also be exported. If \ **-p**\ flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themsleves need to be manualy exported using \ **-e**\ flag. +Any files specified by the \ **-e**\ flag will also be exported. If \ **-p**\ flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themselves need to be manualy exported using \ **-e**\ flag. For statelite, the litefile table settings for the image will also be exported. The litetree and statelite tables are not exported. diff --git a/docs/source/guides/admin-guides/references/man1/imgimport.1.rst b/docs/source/guides/admin-guides/references/man1/imgimport.1.rst index e5e542f7c..6359d535d 100644 --- a/docs/source/guides/admin-guides/references/man1/imgimport.1.rst +++ b/docs/source/guides/admin-guides/references/man1/imgimport.1.rst @@ -69,7 +69,7 @@ If \ **-p**\ flag is specified, the \ *postscripts*\ table will be updated wit If \ **-f**\ flag is not specified, all the files will be copied to the same directories as the source. If it is specified, the old profile name x will be changed to the new and the files will be copied to the appropriate directores for the new profiles. For example, \ */opt/xcat/share/xcat/netboot/sles/x.pkglist*\ will be copied to \ */install/custom/netboot/sles/compute_new.pkglist*\ and \ */install/netboot/sles11/ppc64/x/kernel*\ will be copied to \ */install/netboot/sles11/ppc64/compute_new/kernel*\ . This flag is commonly used when you want to copy the image on the same xCAT mn so you can make modification on the new one. -After this command, you can run the \ **nodeset**\ command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node depolyment. +After this command, you can run the \ **nodeset**\ command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node deployment. For stateful: nodeset diff --git a/docs/source/guides/admin-guides/references/man1/liteimg.1.rst b/docs/source/guides/admin-guides/references/man1/liteimg.1.rst index ceaec142a..266f59b73 100644 --- a/docs/source/guides/admin-guides/references/man1/liteimg.1.rst +++ b/docs/source/guides/admin-guides/references/man1/liteimg.1.rst @@ -63,7 +63,7 @@ PARAMETERS ********** -\ *imagename*\ specifies the name of a os image definition to be used. The specification for the image is storted in the \ *osimage*\ table and \ *linuximage*\ table. +\ *imagename*\ specifies the name of a os image definition to be used. The specification for the image is stored in the \ *osimage*\ table and \ *linuximage*\ table. ******* diff --git a/docs/source/guides/admin-guides/references/man1/lsflexnode.1.rst b/docs/source/guides/admin-guides/references/man1/lsflexnode.1.rst index e3c553c2e..e72fc0ce0 100644 --- a/docs/source/guides/admin-guides/references/man1/lsflexnode.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lsflexnode.1.rst @@ -38,7 +38,7 @@ There are several concepts to support the HX5 multiple blades combination: \ **Complex**\ : Multiple blades which combined by a scalability card is a complex. -\ **Parition**\ : A logic concept which containing part of the \ **Blade slot node**\ in a complex. Each partition can map to a system to install Operating System. Each partition could have 1HX5, 1HX5+1MD or 2HX5+2MD. (MD is the Memory Drawer) +\ **Partition**\ : A logic concept which containing part of the \ **Blade slot node**\ in a complex. Each partition can map to a system to install Operating System. Each partition could have 1HX5, 1HX5+1MD or 2HX5+2MD. (MD is the Memory Drawer) \ **Blade slot node**\ : The physical blade which installed in the slot of a chassis. It can be a HX5 or MD. diff --git a/docs/source/guides/admin-guides/references/man1/lskitcomp.1.rst b/docs/source/guides/admin-guides/references/man1/lskitcomp.1.rst index 81500f251..895a065e1 100644 --- a/docs/source/guides/admin-guides/references/man1/lskitcomp.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lskitcomp.1.rst @@ -89,7 +89,7 @@ OPTIONS - Each tag contains info for a group of kit compoonents belonging to the same kit. The info inside is structured as follows: + Each tag contains info for a group of kit components belonging to the same kit. The info inside is structured as follows: .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/lsslp.1.rst b/docs/source/guides/admin-guides/references/man1/lsslp.1.rst index 0d16d5f50..3c83cb355 100644 --- a/docs/source/guides/admin-guides/references/man1/lsslp.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lsslp.1.rst @@ -41,13 +41,13 @@ OPTIONS ******* -\ **noderange**\ The nodes which the user want to discover. If the user specify the noderange, lsslp will just return the nodes in the node range. Which means it will help to add the new nodes to the xCAT database without modifying the existed definitions. But the nodes' name specified in noderange should be defined in database in advance. The specified nodes' type can be frame/cec/hmc/fsp/bpa. If the it is frame or cec, lsslp will list the bpa or fsp nodes within the nodes(bap for frame, fsp for cec). Do not use noderange with the flag -s. +\ **noderange**\ The nodes which the user wants to discover. If the user specifies the noderange, lsslp will just return the nodes in the node range. Which means it will help to add the new nodes to the xCAT database without modifying the existed definitions. But the nodes' name specified in noderange should be defined in database in advance. The specified nodes' type can be frame/cec/hmc/fsp/bpa. If the it is frame or cec, lsslp will list the bpa or fsp nodes within the nodes(bap for frame, fsp for cec). Do not use noderange with the flag -s. \ **-i**\ IP(s) the command will send out (defaults to all available adapters). \ **-h**\ Display usage message. -\ **-n**\ Only display and write the newly discovered hardwares. +\ **-n**\ Only display and write the newly discovered hardware. \ **-u**\ Do unicast to a specified IP range. Must be used with \ **-s**\ and \ **-**\ **-range**\ . The \ **-u**\ flag is not supported on AIX. @@ -55,15 +55,15 @@ OPTIONS \ **-r**\ Display Raw SLP response. -\ **-C**\ The number of the expected responses specified by the user. When using this flag, lsslp will not return until the it has found all the nodes or time out. The default max time is 3 secondes. The user can use -T flag the specify the time they want to use. A short time will limite the time costing, while a long time will help to find all the nodes. +\ **-C**\ The number of the expected responses specified by the user. When using this flag, lsslp will not return until the it has found all the nodes or time out. The default max time is 3 seconds. The user can use -T flag the specify the time they want to use. A short time will limit the time costing, while a long time will help to find all the nodes. -\ **-T**\ The number in seconds to limite the time costing of lsslp. +\ **-T**\ The number in seconds to limit the time of lsslp. \ **-s**\ Service type interested in discovering. \ **-t**\ Number or service-request attempts. -\ **-**\ **-vpdtable**\ Output the SLP response in vpdtable formatting. Easy for writting data to vpd table. +\ **-**\ **-vpdtable**\ Output the SLP response in vpdtable formatting. Easy for writing data to vpd table. \ **-v**\ Command Version. @@ -73,9 +73,9 @@ OPTIONS \ **-x**\ XML format. -\ **-z**\ Stanza formated output. +\ **-z**\ Stanza formatted output. -\ **-I**\ Give the warning message for the nodes in database which have no SLP responses. Note that this flag noly can be used after the database migration finished successfully. +\ **-I**\ Give the warning message for the nodes in database which have no SLP responses. Note that this flag can only be used after the database migration finished successfully. ************ diff --git a/docs/source/guides/admin-guides/references/man1/lstree.1.rst b/docs/source/guides/admin-guides/references/man1/lstree.1.rst index b4c58f176..e6a4eeddf 100644 --- a/docs/source/guides/admin-guides/references/man1/lstree.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lstree.1.rst @@ -29,7 +29,7 @@ DESCRIPTION *********** -The \ **lstree**\ command can display the tree of service node hierarchy for the xCAT nodes which have service node defined or which are service nodes, display the tree of hardware hierarchy only for the physical objects, display the tree of VM hierarchy for the xCAT nodes which are virtual machines or which are the hosts of virtual machines. If a noderange is specified, only show the part of the hierarchy that involves those nodes. For ZVM, we only support to disply VM hierarchy. By default, lstree will show both the hardware hierarchy and the VM hierarchy for all the nodes. +The \ **lstree**\ command can display the tree of service node hierarchy for the xCAT nodes which have service node defined or which are service nodes, display the tree of hardware hierarchy only for the physical objects, display the tree of VM hierarchy for the xCAT nodes which are virtual machines or which are the hosts of virtual machines. If a noderange is specified, only show the part of the hierarchy that involves those nodes. For ZVM, we only support to display VM hierarchy. By default, lstree will show both the hardware hierarchy and the VM hierarchy for all the nodes. ******* diff --git a/docs/source/guides/admin-guides/references/man1/lsvm.1.rst b/docs/source/guides/admin-guides/references/man1/lsvm.1.rst index dc53a2c47..ad48cc0af 100644 --- a/docs/source/guides/admin-guides/references/man1/lsvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lsvm.1.rst @@ -360,7 +360,7 @@ Output is similar to: Available BSR array: 256 -Note: The lines listed in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class discription)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicates a physical I/O resource in a normal power machine. +Note: The lines listed in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class description)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicates a physical I/O resource in a normal power machine. 9. For DFM-managed partition on normal power machine, list out the detailed information: diff --git a/docs/source/guides/admin-guides/references/man1/mkdef.1.rst b/docs/source/guides/admin-guides/references/man1/mkdef.1.rst index 41084a288..066084735 100644 --- a/docs/source/guides/admin-guides/references/man1/mkdef.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkdef.1.rst @@ -84,7 +84,7 @@ OPTIONS \ **-**\ **-template**\ \ *template-object-name*\ - Name of the xCAT shipped object definition template or an existing object, from which the new object definition will be created. The newly created object will inherit the attributes of the template definition unless the attribute is specified in the arguments of \ **mkdef**\ command. If there are a template and an existing object with the same name \ *template-object-name*\ , the tempalte object takes precedence over the existing object. For the details of xCAT shipped object definition templates, refer to the manpage of \ **-**\ **-template**\ option in lsdef(1)|lsdef.1. + Name of the xCAT shipped object definition template or an existing object, from which the new object definition will be created. The newly created object will inherit the attributes of the template definition unless the attribute is specified in the arguments of \ **mkdef**\ command. If there are a template and an existing object with the same name \ *template-object-name*\ , the template object takes precedence over the existing object. For the details of xCAT shipped object definition templates, refer to the manpage of \ **-**\ **-template**\ option in lsdef(1)|lsdef.1. @@ -96,7 +96,7 @@ OPTIONS \ **-w**\ \ *attr==val*\ \ **-w**\ \ *attr=~val*\ ... - Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. For mkdef commmand, the -w flag only makes sense for creating dynamic node group. Use the help option to get a list of valid attributes for each object type. + Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. For mkdef command, the -w flag only makes sense for creating dynamic node group. Use the help option to get a list of valid attributes for each object type. Operator descriptions: == Select nodes where the attribute value is exactly this value. diff --git a/docs/source/guides/admin-guides/references/man1/mkdocker.1.rst b/docs/source/guides/admin-guides/references/man1/mkdocker.1.rst index 87559be1c..f1e2d2e47 100644 --- a/docs/source/guides/admin-guides/references/man1/mkdocker.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkdocker.1.rst @@ -137,7 +137,7 @@ Output is similar to: host01c01: Pull image ubuntu start host01c01: Pull image ubuntu done host01c01: Remove default network connection - host01c01: Connecting customzied network 'mynet0' + host01c01: Connecting customized network 'mynet0' host01c01: success @@ -155,7 +155,7 @@ Output is similar to: .. code-block:: perl host01c01: Remove default network connection - host01c01: Connecting customzied network 'mynet0' + host01c01: Connecting customized network 'mynet0' host01c01: success diff --git a/docs/source/guides/admin-guides/references/man1/mkdsklsnode.1.rst b/docs/source/guides/admin-guides/references/man1/mkdsklsnode.1.rst index f1a4294e7..6968e6039 100644 --- a/docs/source/guides/admin-guides/references/man1/mkdsklsnode.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkdsklsnode.1.rst @@ -38,7 +38,7 @@ This command will also create a NIM resolv_conf resource to be used when install The "domain" and "nameservers" attributes can be set in either the xCAT "network" definition used by the nodes or in the xCAT cluster "site" definition. The setting in the "network" definition will take priority. The "search" field of the resolv.conf file will contain a list all the domains -listed in the xCAT network definitions and the xCAT site definiton. +listed in the xCAT network definitions and the xCAT site definition. The "nameservers" value can either be set to a specific IP address or the "" key word. The "" key word means that the value of the "xcatmaster" attribute of the node definition will be used in the /etc/resolv.conf file. (I.e. The name of the install server as known by the node.) @@ -57,11 +57,11 @@ You can use the "-n" option of the mkdsklsnode command to create and initialize \ **Note:**\ When using the "-n" option make sure that the new osimage you specify and all the NIM resources that are used are different than what are currently being used on the nodes. The NIM resources should not be shared between the old osimage and the new osimage. -You can use the force option to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinititializing. Use this option with caution since reinitializing a node will stop the node if it is currently running. +You can use the force option to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinitializing. Use this option with caution since reinitializing a node will stop the node if it is currently running. After the mkdsklsnode command completes you can use the \ **lsnim**\ command to check the NIM node definition to see if it is ready for booting the node. ("lsnim -l "). -You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the \ **mkdsklsnode**\ command. Such scripts are called \ **prescripts**\ . They should be copied to /install/prescripts dirctory. A table called \ *prescripts*\ is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the \ **mkdsklsnode**\ command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the \ **mkdsklsnode**\ command are stored in the 'end' column of \ *prescripts*\ table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: \ *diskless:myscript1,myscript2*\ . 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 current nodeset action, in this case "diskless". If \ *#xCAT setting:MAX_INSTANCE=number*\ is specified in the script, the script will get invoked for each node in parallel, but no more than \ *number*\ of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes. +You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the \ **mkdsklsnode**\ command. 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 \ **mkdsklsnode**\ command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the \ **mkdsklsnode**\ command are stored in the 'end' column of \ *prescripts*\ table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: \ *diskless:myscript1,myscript2*\ . 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, in this case "diskless". 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. ******* diff --git a/docs/source/guides/admin-guides/references/man1/mknimimage.1.rst b/docs/source/guides/admin-guides/references/man1/mknimimage.1.rst index 15d496c90..1d2985946 100644 --- a/docs/source/guides/admin-guides/references/man1/mknimimage.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mknimimage.1.rst @@ -43,7 +43,7 @@ When creating a mksysb image definition you must specify either the "-n" or the When creating a diskless osimage definition you also have the option of automatically updating the NIM SPOT resource. You can have additional software installed or you can have configuration files added or updated. To have software installed you must provide either the names of NIM installp_bundle resources or fileset names on the command line using the "attr=val" option. You may also supply the installp flags, RPM flags, emgr flags to use when installing the software. -To have configuration files updated you must provide the full path name of a "synclists" file which contains the the list of actual files to update. The xCAT osimage definition that is created will contain the installp_bundle, otherpkgs, and synclists files that are provided on the command line. +To have configuration files updated you must provide the full path name of a "synclists" file which contains the list of actual files to update. The xCAT osimage definition that is created will contain the installp_bundle, otherpkgs, and synclists files that are provided on the command line. \ **Updating an existing xCAT osimage**\ @@ -69,7 +69,7 @@ You can use the "-i" and "-p" options to copy an existing diskless osimage. To - any other resources (or attributes) included in the original osimage will be included in the new osimage definition. -- if the "-p" option is specified then the original NIM lpp_source resource will be copied to a new location and redfined to NIM. (The default would be to use the original lpp_source - to save file system space.) +- if the "-p" option is specified then the original NIM lpp_source resource will be copied to a new location and redefined to NIM. (The default would be to use the original lpp_source - to save file system space.) \ **Additional information**\ @@ -85,7 +85,7 @@ To list a NIM resource definition use the AIX \ **lsnim**\ command ("lsnim -l < To check the validity of a SPOT or lpp_source resource use the AIX \ **nim**\ command ("nim -o check "). -To remove specific NIM resource definitons use the AIX \ **nim**\ command. ("nim -o remove "). +To remove specific NIM resource definitions use the AIX \ **nim**\ command. ("nim -o remove "). ******* @@ -255,7 +255,7 @@ OPTIONS - Note that you may specify multiple "script", "otherpkgs", and "installp_bundle" resources by using a comma seperated list. (ex. "script=ascript,bscript"). RPM names may be included in the "otherpkgs" list by using a "R:" prefix(ex. "R:whatever.rpm"). epkg (AIX interim fix package) file names may be included in the "otherpkgs" using the 'E:' prefix. (ex. "otherpkgs=E:IZ38930TL0.120304.epkg.Z"). + Note that you may specify multiple "script", "otherpkgs", and "installp_bundle" resources by using a comma separated list. (ex. "script=ascript,bscript"). RPM names may be included in the "otherpkgs" list by using a "R:" prefix(ex. "R:whatever.rpm"). epkg (AIX interim fix package) file names may be included in the "otherpkgs" using the 'E:' prefix. (ex. "otherpkgs=E:IZ38930TL0.120304.epkg.Z"). @@ -267,7 +267,7 @@ OPTIONS \ **-c|-**\ **-completeosimage**\ - Complete the creation of the osimage definition passed in on the command line. This option will use any additonal values passed in on the command line and/or it will attempt to create required resources in order to complete the definition of the xCAT osimage. For example, if the osimage definition is missing a spot or shared_root resource the command will create those resources and add them to the osimage definition. + Complete the creation of the osimage definition passed in on the command line. This option will use any additional values passed in on the command line and/or it will attempt to create required resources in order to complete the definition of the xCAT osimage. For example, if the osimage definition is missing a spot or shared_root resource the command will create those resources and add them to the osimage definition. @@ -492,7 +492,7 @@ The xCAT osimage definition created by this command will include the "otherpkgs" mknimimage -u 61dskls installp_bundle=bndres1,bndres2 installp_flags="-agcQX" -Note that when "installp_bundle", "otherpkgs", or "synclists" values are specified with the "-u" option then the xCAT osimage definiton is not used or updated. +Note that when "installp_bundle", "otherpkgs", or "synclists" values are specified with the "-u" option then the xCAT osimage definition is not used or updated. 13) Update an existing image to support NFSv4. Also specify verbose messages. diff --git a/docs/source/guides/admin-guides/references/man1/mkvm.1.rst b/docs/source/guides/admin-guides/references/man1/mkvm.1.rst index 753ddd42e..effaaa109 100644 --- a/docs/source/guides/admin-guides/references/man1/mkvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkvm.1.rst @@ -148,7 +148,7 @@ OPTIONS \ **vmcpus=**\ \ *value*\ \ **vmmemory=**\ \ *value*\ \ **vmphyslots=**\ \ *value*\ \ **vmothersetting=**\ \ *value*\ \ **vmnics=**\ \ *value*\ \ **vmstorage=**\ \ *value*\ [\ **-**\ **-vios**\ ] - To specify the parameters which are used to create a partition. The \ *vmcpus*\ , \ *vmmemory*\ are necessay, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to lsvm(1)|lsvm.1 for more information about 'drc_index' for \ *vmphyslots*\ . + To specify the parameters which are used to create a partition. The \ *vmcpus*\ , \ *vmmemory*\ are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to lsvm(1)|lsvm.1 for more information about 'drc_index' for \ *vmphyslots*\ . The option \ *vios*\ is used to specify the partition that will be created is a VIOS partition. If specified, the value for \ *vmstorage*\ shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for \ *vmphyslots*\ , all the physical slot of the power machine will be asigned to VIOS partition. If not specified, it shall be in form of \ *vios_name:server_slotid*\ to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition. @@ -392,7 +392,7 @@ First, define a node object: mkdef -t node -o lpar1 mgt=fsp cons=fsp nodetype=ppc,osi id=1 hcp=cec parent=cec hwtype=lpar groups=lpar,all -Then, create the partion on the specified cec. +Then, create the partition on the specified cec. .. code-block:: perl @@ -515,7 +515,7 @@ The output is similar to: mkvm viosnode vmcpus=1/4/16 vmmemory=1G/4G/32G vmphyslots=0x21010201,0x21010200 vmnics=vlan1 vmstorage=5 --vios -The resouces for the node is similar to: +The resources for the node is similar to: .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/monadd.1.rst b/docs/source/guides/admin-guides/references/man1/monadd.1.rst index df2c69af8..bb8f629e8 100644 --- a/docs/source/guides/admin-guides/references/man1/monadd.1.rst +++ b/docs/source/guides/admin-guides/references/man1/monadd.1.rst @@ -39,9 +39,9 @@ Parameters ********** -\ *name*\ is the name of the monitoring plug-in module. For example, if the the \ *name*\ is called \ *xxx*\ , then the actual file name that the xcatd looks for is \ */opt/xcat/lib/perl/xCAT_monitoring/xxx.pm*\ . Use \ *monls -a*\ command to list all the monitoring plug-in modules that can be used. +\ *name*\ is the name of the monitoring plug-in module. For example, if the \ *name*\ is called \ *xxx*\ , then the actual file name that the xcatd looks for is \ */opt/xcat/lib/perl/xCAT_monitoring/xxx.pm*\ . Use \ *monls -a*\ command to list all the monitoring plug-in modules that can be used. -\ *settings*\ is the monitoring plug-in specific settings. It is used to customize the behavior of the plug-in or configure the 3rd party software. Format: \ *-s key-value -s key=value ...*\ Note that the square brackets are needed here. Use \ *monls name -d*\ command to look for the possbile setting keys for a plug-in module. +\ *settings*\ is the monitoring plug-in specific settings. It is used to customize the behavior of the plug-in or configure the 3rd party software. Format: \ *-s key-value -s key=value ...*\ Note that the square brackets are needed here. Use \ *monls name -d*\ command to look for the possible setting keys for a plug-in module. ******* diff --git a/docs/source/guides/admin-guides/references/man1/moncfg.1.rst b/docs/source/guides/admin-guides/references/man1/moncfg.1.rst index febc5f32f..a7ac99ccd 100644 --- a/docs/source/guides/admin-guides/references/man1/moncfg.1.rst +++ b/docs/source/guides/admin-guides/references/man1/moncfg.1.rst @@ -31,7 +31,7 @@ DESCRIPTION *********** -This command is used to configure a 3rd party monitoring software to monitor the xCAT cluster. For example, it modifies the configration file for the monitoring software so that the nodes can be included in the monitoring domain. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the \ *-r*\ option is specified, though the configuration of the nodes is usually performed during the node deployment stage. +This command is used to configure a 3rd party monitoring software to monitor the xCAT cluster. For example, it modifies the configuration file for the monitoring software so that the nodes can be included in the monitoring domain. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the \ *-r*\ option is specified, though the configuration of the nodes is usually performed during the node deployment stage. ********** @@ -39,7 +39,7 @@ Parameters ********** -\ *name*\ is the name of the monitoring plug-in module. For example, if the the \ *name*\ is called \ *xxx*\ , then the actual file name that the xcatd looks for is \ */opt/xcat/lib/perl/xCAT_monitoring/xxx.pm*\ . Use \ *monls -a*\ command to list all the monitoring plug-in modules that can be used. +\ *name*\ is the name of the monitoring plug-in module. For example, if the \ *name*\ is called \ *xxx*\ , then the actual file name that the xcatd looks for is \ */opt/xcat/lib/perl/xCAT_monitoring/xxx.pm*\ . Use \ *monls -a*\ command to list all the monitoring plug-in modules that can be used. \ *noderange*\ specifies the nodes to be monitored. If omitted, all nodes will be monitored. diff --git a/docs/source/guides/admin-guides/references/man1/mondecfg.1.rst b/docs/source/guides/admin-guides/references/man1/mondecfg.1.rst index 1b6b8439b..eeb0dc747 100644 --- a/docs/source/guides/admin-guides/references/man1/mondecfg.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mondecfg.1.rst @@ -31,7 +31,7 @@ DESCRIPTION *********** -This command is used to deconfigure a 3rd party monitoring software from monitoring the xCAT cluster. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the \ *-r*\ option is specified. The deconfigration operation will remove the nodes from the 3rd party software's monitoring domain. +This command is used to deconfigure a 3rd party monitoring software from monitoring the xCAT cluster. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the \ *-r*\ option is specified. The deconfiguration operation will remove the nodes from the 3rd party software's monitoring domain. ********** diff --git a/docs/source/guides/admin-guides/references/man1/monls.1.rst b/docs/source/guides/admin-guides/references/man1/monls.1.rst index 7f321d21b..f5241006d 100644 --- a/docs/source/guides/admin-guides/references/man1/monls.1.rst +++ b/docs/source/guides/admin-guides/references/man1/monls.1.rst @@ -33,7 +33,7 @@ DESCRIPTION *********** -This command is used to list the status, desctiption, the configuration scripts and the settings of one or all of the monitoring plug-in modules. +This command is used to list the status, description, the configuration scripts and the settings of one or all of the monitoring plug-in modules. ********** @@ -49,9 +49,9 @@ OPTIONS ******* -\ **-a | -**\ **-all**\ Searches the \ *XCATROOT/lib/perl/xCAT_monitoring*\ directory and reports all the monitoring plug-in modules. If nothing is specified, the list is read from the \ *monitoring*\ tabel. +\ **-a | -**\ **-all**\ Searches the \ *XCATROOT/lib/perl/xCAT_monitoring*\ directory and reports all the monitoring plug-in modules. If nothing is specified, the list is read from the \ *monitoring*\ table. -\ **-d | -**\ **-description**\ Display the description of the plug-in modules. The description ususally contains the possible settings. +\ **-d | -**\ **-description**\ Display the description of the plug-in modules. The description usually contains the possible settings. \ **-h | -**\ **-help**\ Display usage message. @@ -110,7 +110,7 @@ The output looks like this: nagiosmon not-monitored -3. To list the status and the desciption for \ *snmpmon*\ module, enter: +3. To list the status and the description for \ *snmpmon*\ module, enter: .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/monshow.1.rst b/docs/source/guides/admin-guides/references/man1/monshow.1.rst index e711239b7..2c8ff130c 100644 --- a/docs/source/guides/admin-guides/references/man1/monshow.1.rst +++ b/docs/source/guides/admin-guides/references/man1/monshow.1.rst @@ -59,7 +59,7 @@ OPTIONS \ **-a**\ specifies a comma-separated list of attributes or metrics names. The default is all. -\ **-w**\ specify one or multiple selection string that can be used to select events. The operators ==, !=, =,!,>,<,>=,<= are available. Wildcards % and _ are supported in the pattern string. % allows you to match any string of any length(including zero length) and _ allows you to match on a single character. The valid attributes are eventtype, monitor, monnode, application, component, id, serverity, message, rawdata, comments. Valid severity are: Informational, Warning, Critical. +\ **-w**\ specify one or multiple selection string that can be used to select events. The operators ==, !=, =,!,>,<,>=,<= are available. Wildcards % and _ are supported in the pattern string. % allows you to match any string of any length(including zero length) and _ allows you to match on a single character. The valid attributes are eventtype, monitor, monnode, application, component, id, severity, message, rawdata, comments. Valid severity are: Informational, Warning, Critical. Operator descriptions: diff --git a/docs/source/guides/admin-guides/references/man1/monstart.1.rst b/docs/source/guides/admin-guides/references/man1/monstart.1.rst index 292c72265..1595b28b8 100644 --- a/docs/source/guides/admin-guides/references/man1/monstart.1.rst +++ b/docs/source/guides/admin-guides/references/man1/monstart.1.rst @@ -39,7 +39,7 @@ PARAMETERS ********** -\ *name*\ is the name of the monitoring plug-in module. For example, if the the \ *name*\ is called \ *xxx*\ , then the actual file name that the xcatd looks for is \ */opt/xcat/lib/perl/xCAT_monitoring/xxx.pm*\ . Use \ **monls -a**\ command to list all the monitoring plug-in modules that can be used. +\ *name*\ is the name of the monitoring plug-in module. For example, if the \ *name*\ is called \ *xxx*\ , then the actual file name that the xcatd looks for is \ */opt/xcat/lib/perl/xCAT_monitoring/xxx.pm*\ . Use \ **monls -a**\ command to list all the monitoring plug-in modules that can be used. \ *noderange*\ is the nodes to be monitored. If omitted, all nodes will be monitored. diff --git a/docs/source/guides/admin-guides/references/man1/nimnodecust.1.rst b/docs/source/guides/admin-guides/references/man1/nimnodecust.1.rst index 8a82dad79..1fd244764 100644 --- a/docs/source/guides/admin-guides/references/man1/nimnodecust.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nimnodecust.1.rst @@ -57,9 +57,9 @@ To create a NIM installp_bundle definition you can use the "nim -o define" opera nim -o define -t installp_bundle -a server=master -a location=/install/nim/mypkgs.bnd mypackages -See the AIX documantation for more information on using installp_bundle files. +See the AIX documentation for more information on using installp_bundle files. -The xCAT nimnodecust command will automatically handle the distribution of the packages to AIX service nodes when using an xCAT hierachical environment. +The xCAT nimnodecust command will automatically handle the distribution of the packages to AIX service nodes when using an xCAT hierarchical environment. ******* diff --git a/docs/source/guides/admin-guides/references/man1/nimnodeset.1.rst b/docs/source/guides/admin-guides/references/man1/nimnodeset.1.rst index 8c03d0fd7..5f3511342 100644 --- a/docs/source/guides/admin-guides/references/man1/nimnodeset.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nimnodeset.1.rst @@ -33,7 +33,7 @@ This xCAT command can be used to initialize AIX/NIM standalone machines. Once th If you are using xCAT service nodes the \ **nimnodeset**\ command will automatically determine the correct server(s) for the node and do the initialization on that server(s). -The osimage_name is the name of an xCAT osimage definition that contains the list of NIM resources to use when initializing the nodes. If the osimage_name is not provided on the command line the code checks the node definition for the value of the "provmethod" attribute (which is the name of an osimage definition). If the osimage_image is provided on the command line then the code will also set the "provmethod" attribute of the node definiions. +The osimage_name is the name of an xCAT osimage definition that contains the list of NIM resources to use when initializing the nodes. If the osimage_name is not provided on the command line the code checks the node definition for the value of the "provmethod" attribute (which is the name of an osimage definition). If the osimage_image is provided on the command line then the code will also set the "provmethod" attribute of the node definitions. This command will also create a NIM resolv_conf resource to be used when installing the node. If a resolv_conf resource is not already included in the xCAT osimage definition and if the "domain" and "nameservers" values are set then a new NIM resolv_conf resource will be created and allocated to the nodes. @@ -41,7 +41,7 @@ NIM resolv_conf resource will be created and allocated to the nodes. The "domain" and "nameservers" attributes can be set in either the xCAT "network" definition used by the nodes or in the xCAT cluster "site" definition. The setting in the "network" definition will take priority. The "search" field of the resolv.conf file will contain a list all the domains -listed in the xCAT network definitions and the xCAT site definiton. +listed in the xCAT network definitions and the xCAT site definition. The "nameservers" value can either be set to a specific IP address or the "" key word. The "" key word means that the value of the "xcatmaster" attribute of the node definition will be used in the /etc/resolv.conf file. (I.e. The name of the install server as known by the node.) @@ -58,13 +58,13 @@ will be created. You can specify additional attributes and values using the "attr=val" command line option. This information will be passed on to the underlying call to the NIM "nim -o bos_inst" command. See the NIM documentation for information on valid command line options for the nim command. The "attr" must correspond to a NIM attribute supported for the NIM "bos_inst" operation. Information provided by the "attr=val" option will take precedence over the information provided in the osimage definition. -The force option can be used to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinititializing. +The force option can be used to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinitializing. This command will also create a NIM script resource to enable the xCAT support for user-provided customization scripts. After the \ **nimnodeset**\ command completes you can use the \ **lsnim**\ command to check the NIM node definition to see if it is ready for booting the node. ("lsnim -l "). -You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the \ **nimnodeset**\ command. Such scripts are called \ **prescripts**\ . They should be copied to /install/prescripts dirctory. A table called \ *prescripts*\ is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the \ **nimnodeset**\ command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the \ **nimnodeset**\ command are stored in the 'end' column of \ *prescripts*\ table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: \ *standalone:myscript1,myscript2*\ . 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, in this case "standalone". If \ *#xCAT setting:MAX_INSTANCE=number*\ is specified in the script, the script will get invoked for each node in parallel, but no more than \ *number*\ of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes. +You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the \ **nimnodeset**\ command. 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 \ **nimnodeset**\ command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the \ **nimnodeset**\ command are stored in the 'end' column of \ *prescripts*\ table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: \ *standalone:myscript1,myscript2*\ . 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, in this case "standalone". If \ *#xCAT setting:MAX_INSTANCE=number*\ is specified in the script, the script will get invoked for each node in parallel, but no more than \ *number*\ of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes. ******* @@ -76,7 +76,7 @@ OPTIONS \ *attr=val [attr=val ...]*\ Specifies one or more "attribute equals value" pairs, separated by spaces. Attr= - val pairs must be specified last on the command line. These are used to specify additional values that can be passed to the underlying NIM commands, ("nim -o bos_inst ..."). See the NIM documentation for valid "nim" command line options. Note that you may specify multiple "script" and "installp_bundle" values by using a comma seperated list. (ex. "script=ascript,bscript"). + val pairs must be specified last on the command line. These are used to specify additional values that can be passed to the underlying NIM commands, ("nim -o bos_inst ..."). See the NIM documentation for valid "nim" command line options. Note that you may specify multiple "script" and "installp_bundle" values by using a comma separated list. (ex. "script=ascript,bscript"). @@ -106,8 +106,7 @@ OPTIONS \ **-l|-**\ **-location**\ - The directory location to use when creating new NIM resolv_conf resources. The d - efault location is /install/nim. + The directory location to use when creating new NIM resolv_conf resources. The default location is /install/nim. diff --git a/docs/source/guides/admin-guides/references/man1/nodeaddunmged.1.rst b/docs/source/guides/admin-guides/references/man1/nodeaddunmged.1.rst index 2a7cd8d10..2ce52c742 100644 --- a/docs/source/guides/admin-guides/references/man1/nodeaddunmged.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodeaddunmged.1.rst @@ -61,7 +61,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst b/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst index d293bcaea..84a1dce0c 100644 --- a/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst @@ -63,7 +63,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodechprofile.1.rst b/docs/source/guides/admin-guides/references/man1/nodechprofile.1.rst index 1d02e020a..be6b5300e 100644 --- a/docs/source/guides/admin-guides/references/man1/nodechprofile.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodechprofile.1.rst @@ -79,7 +79,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodediscoverls.1.rst b/docs/source/guides/admin-guides/references/man1/nodediscoverls.1.rst index b791d5180..8d1458b64 100644 --- a/docs/source/guides/admin-guides/references/man1/nodediscoverls.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodediscoverls.1.rst @@ -114,7 +114,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodediscoverstart.1.rst b/docs/source/guides/admin-guides/references/man1/nodediscoverstart.1.rst index 35e01991d..2171f8da9 100644 --- a/docs/source/guides/admin-guides/references/man1/nodediscoverstart.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodediscoverstart.1.rst @@ -59,7 +59,7 @@ When the nodes are discovered, PCM updates the affected configuration files on t When you power on the nodes, they PXE boot and DHCP/TFTP/HTTP on the management node give each node the xCAT genesis boot image, which inventories the node hardware and sends data to the management node. There, either the sequential discovery process or the -profile discovery process assigns node attributes and defines the node in the the database. +profile discovery process assigns node attributes and defines the node in the database. ******* @@ -127,7 +127,7 @@ OPTIONS -\ **chasiss=**\ \ *chassis-name*\ +\ **chassis=**\ \ *chassis-name*\ Sets the chassis name that the Blade server or PureFlex blade is located in, for either the Sequential Discovery or Profile Discovery methods. This option is used for the Blade server and PureFlex system only. You cannot specify this option with the rack option. @@ -196,7 +196,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodediscoverstatus.1.rst b/docs/source/guides/admin-guides/references/man1/nodediscoverstatus.1.rst index 279166e08..182800616 100644 --- a/docs/source/guides/admin-guides/references/man1/nodediscoverstatus.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodediscoverstatus.1.rst @@ -52,7 +52,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodediscoverstop.1.rst b/docs/source/guides/admin-guides/references/man1/nodediscoverstop.1.rst index 92e5ce339..f95b1b43f 100644 --- a/docs/source/guides/admin-guides/references/man1/nodediscoverstop.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodediscoverstop.1.rst @@ -53,7 +53,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodeimport.1.rst b/docs/source/guides/admin-guides/references/man1/nodeimport.1.rst index 27341b4e8..ccd2a8ab9 100644 --- a/docs/source/guides/admin-guides/references/man1/nodeimport.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodeimport.1.rst @@ -29,7 +29,7 @@ DESCRIPTION *********** -The \ **nodeimport**\ command creates nodes by importing a hostinfo file which is following stanza format. In this hostinfo file, we can define node's hostname, ip, mac, switch name, switch port and host location infomation like rack, chassis, start unit, server height...etc +The \ **nodeimport**\ command creates nodes by importing a hostinfo file which is following stanza format. In this hostinfo file, we can define node's hostname, ip, mac, switch name, switch port and host location information like rack, chassis, start unit, server height...etc After nodes imported, the configuration files related with these nodes will be updated automatically. For example: /etc/hosts, dns configuration, dhcp configuration. And the kits node plugins will also be triggered automatically to update kit related configuration/services. @@ -83,9 +83,9 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured while validating parameters. +1 An error has occurred while validating parameters. -2 An error has occured while parsing hostinfo file. +2 An error has occurred while parsing hostinfo file. ******** @@ -143,7 +143,7 @@ To import nodes using a profile, follow the following steps: # hostinfo end. - Another example of a node infomation file, a PureFlex X/P node defined: + Another example of a node information file, a PureFlex X/P node defined: # hostinfo begin # To define a PureFlex P/X node, chassis and slot id must be specified. # The chassis must be a PureFlex chassis. @@ -191,7 +191,7 @@ Description: The name of the node, where __hostname__ is automatically generated \ **mac= This is a mandatory item. -Description: Specify the MAC address for the NIC used by the provisionging node, where is the NICs MAC address. +Description: Specify the MAC address for the NIC used by the provisioning node, where is the NICs MAC address. \ **switches= This is a mandatory item, when define switch, switchport and node nic name relationship. @@ -221,9 +221,9 @@ Description: Lists the IP address for each network interface configuration (NIC) Description: node location info. Specify the rack name which this node will be placed into. If not specify this item, there will be no node location info set for this node. this item must be specified together with height + unit. -\ **chasiss= This is an optional item. +\ **chassis= This is an optional item. -Description: node location info, for blade(or PureFlex) only. Specify the chasiss name which this blade will be placed into. this item can not be specified together with rack. +Description: node location info, for blade(or PureFlex) only. Specify the chassis name which this blade will be placed into. this item can not be specified together with rack. \ **height= This is an optional item. diff --git a/docs/source/guides/admin-guides/references/man1/nodels.1.rst b/docs/source/guides/admin-guides/references/man1/nodels.1.rst index 692331e73..395c72848 100644 --- a/docs/source/guides/admin-guides/references/man1/nodels.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodels.1.rst @@ -109,7 +109,7 @@ OPTIONS \ **-b|-**\ **-blame**\ - For values inherited from groups, display which groups provided the inheritence + For values inherited from groups, display which groups provided the inheritance diff --git a/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst b/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst index c11871cdc..847eb6c7b 100644 --- a/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst @@ -59,7 +59,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/noderefresh.1.rst b/docs/source/guides/admin-guides/references/man1/noderefresh.1.rst index 5eabc41af..7f110d908 100644 --- a/docs/source/guides/admin-guides/references/man1/noderefresh.1.rst +++ b/docs/source/guides/admin-guides/references/man1/noderefresh.1.rst @@ -57,7 +57,7 @@ RETURN VALUE 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. ******** diff --git a/docs/source/guides/admin-guides/references/man1/nodestat.1.rst b/docs/source/guides/admin-guides/references/man1/nodestat.1.rst index f51b0d015..8d3afd684 100644 --- a/docs/source/guides/admin-guides/references/man1/nodestat.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodestat.1.rst @@ -63,7 +63,7 @@ Keywords to use: port -- the application daemon port number, if not specified, use internal list, then /etc/services. group -- the name of a node group that needs to get the application status from. If not specified, assume all the nodes in the nodelist table. To specify more than one groups, use group=a,group=b format. cmd -- the command that will be run locally on mn or sn. - lcmd -- the command that will be run the the mn only. + lcmd -- the command that will be run the mn only. dcmd -- the command that will be run distributed on the nodes using xdsh .... @@ -94,7 +94,7 @@ For the command specified by 'dcmd', no input is needed, the output can be a str \ **-m | -**\ **-usemon**\ - Uses the settings from the \ **monsetting**\ talbe to determine a list of applications that need to get status for. + Uses the settings from the \ **monsetting**\ table to determine a list of applications that need to get status for. diff --git a/docs/source/guides/admin-guides/references/man1/piflash.1.rst b/docs/source/guides/admin-guides/references/man1/piflash.1.rst new file mode 100644 index 000000000..1959a893e --- /dev/null +++ b/docs/source/guides/admin-guides/references/man1/piflash.1.rst @@ -0,0 +1,23 @@ + +######### +piflash.1 +######### + +.. highlight:: perl + + +******** +SYNOPSIS +******** + + +\ **piflash**\ -**\ **-package + + +*********** +DESCRIPTION +*********** + + +\ **piflash**\ Remotely applies firmware updates to servers. + 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 47b35ae06..087047ab6 100644 --- a/docs/source/guides/admin-guides/references/man1/rflash.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rflash.1.rst @@ -73,7 +73,7 @@ PPC (with HMC) specific: ======================== -The \ **rflash**\ command uses the \ **xdsh**\ command to connect to the HMC controlling the given managed system and perform the updates. Before running \ **rflash**\ , use \ **rspconfig**\ to check if the related HMC ssh is enabled. To enable a HMC ssh connection, use \ **rspconfig**\ comamnd. +The \ **rflash**\ command uses the \ **xdsh**\ command to connect to the HMC controlling the given managed system and perform the updates. Before running \ **rflash**\ , use \ **rspconfig**\ to check if the related HMC ssh is enabled. To enable a HMC ssh connection, use \ **rspconfig**\ command. \ **Warning!**\ This command may take considerable time to complete, depending on the number of systems being updated and the workload on the target HMC. In particular, power subsystem updates may take an hour or more if there are many attached managed systems. @@ -83,7 +83,7 @@ The flash chip of a POWER5 and POWER6 managed system or power subsystem stores f The \ **-**\ **-commit**\ flag is used to write the contents of the temporary side of the flash to the permanent side. This flag should be used after updating code and verifying correct system operation. The \ **-**\ **-recover**\ flag is used to write the permanent side of the flash chip back to the temporary side. This flag should be used to recover from a corrupt flash operation, so that the previously running code can be restored. -\ **NOTE:**\ When the \ **-**\ **-commit**\ or \ **-**\ **-recover**\ two flags is used, the noderange \ **cannot**\ be BPA. It only \ **can**\ be CEC or LPAR ,and will take effect for \ **both**\ managed systems and power subsystems. +\ **NOTE:**\ When the \ **-**\ **-commit**\ or \ **-**\ **-recover**\ two flags is used, the noderange \ **cannot**\ be BPA. It only \ **can**\ be CEC or LPAR, and will take effect for \ **both**\ managed systems and power subsystems. xCAT recommends that you shutdown your Operating System images and power off your managed systems before applying disruptive updates to managed systems or power subsystems. @@ -104,7 +104,7 @@ The \ **deferred**\ option will load the new firmware into the T (temp) side, b In Direct FSP/BPA Management, there is \ **-d**\ \ *data_directory*\ option. The default value is /tmp. When doing firmware update, \ **rflash**\ will put some related data from rpm packages in directory, so the execution of \ **rflash**\ will require available disk space in for the command to properly execute: -For one GFW rpm package and one power code rpm package , if the GFW rpm package size is gfw_rpmsize, and the Power code rpm package size is power_rpmsize, it requires that the available disk space should be more than: 1.5\*gfw_rpmsize + 1.5\*power_rpmsize +For one GFW rpm package and one power code rpm package, if the GFW rpm package size is gfw_rpmsize, and the Power code rpm package size is power_rpmsize, it requires that the available disk space should be more than: 1.5\*gfw_rpmsize + 1.5\*power_rpmsize For Power 775, the \ **rflash**\ command takes effect on the primary and secondary FSPs or BPAs almost in parallel. @@ -115,7 +115,7 @@ 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 imformation 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 +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: @@ -140,7 +140,7 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node \ **-c|-**\ **-check**\ - Chech the firmware version of BMC and HPM file. + Check the firmware version of BMC and HPM file. @@ -209,7 +209,7 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node -1. To update only the power subsystem attached to a single HMC-attached pSeries CEC(cec_name), and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: +1. To update only the power subsystem attached to a single HMC-attached pSeries CEC(cec_name), and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: .. code-block:: perl @@ -219,7 +219,7 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node -2. To update only the power subsystem attached to a single HMC-attached pSeries node, and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: +2. To update only the power subsystem attached to a single HMC-attached pSeries node, and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: .. code-block:: perl @@ -239,7 +239,7 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node -4. To update the firmware on a NeXtScale FPC specify the FPC node name and the HTTP location of the file including the xCAT MN IP address and the directory on the xCAT MN containing the firmware as follows: +4. To update the firmware on a NeXtScale FPC specify the FPC node name and the HTTP location of the file including the xCAT MN IP address and the directory on the xCAT MN containing the firmware as follows: .. code-block:: perl 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 9d44f4377..c554e702f 100644 --- a/docs/source/guides/admin-guides/references/man1/rinv.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rinv.1.rst @@ -32,14 +32,14 @@ OpenPOWER (using ipmi) server specific: ======================================= -\ **rinv**\ \ *noderange*\ {\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | all**\ } +\ **rinv**\ \ *noderange*\ [\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | all**\ ] OpenPOWER (using openbmc) server specific: ========================================== -\ **rinv**\ \ *noderange*\ {\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | cpu | dimm | all**\ } +\ **rinv**\ \ *noderange*\ [\ **model | serial | deviceid | uuid | guid | vpd | mprom | firm | cpu | dimm | all**\ ] PPC (with HMC) specific: @@ -114,10 +114,10 @@ zVM specific: ******************* -\ **rinv**\ retrieves hardware configuration information from the on-board +\ **rinv**\ retrieves hardware configuration information from the on-board Service Processor for a single or range of nodes and groups. -Calling \ **rinv**\ for VMware will display the UUID/GUID, nuumber of CPUs, amount of memory, the MAC address and a list of Hard disks. The output for each Hard disk includes the label, size and backing file location. +Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amount of memory, the MAC address and a list of Hard disks. The output for each Hard disk includes the label, size and backing file location. *************** @@ -140,7 +140,7 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, nuumber of CPUs, amo \ **config**\ - Retrieves number of processors, speed, total memory, and DIMM + Retrieves number of processors, speed, total memory, and DIMM locations. diff --git a/docs/source/guides/admin-guides/references/man1/rmdocker.1.rst b/docs/source/guides/admin-guides/references/man1/rmdocker.1.rst index 33db44ce4..db021f2a9 100644 --- a/docs/source/guides/admin-guides/references/man1/rmdocker.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmdocker.1.rst @@ -48,7 +48,7 @@ EXAMPLES .. code-block:: perl rmdocker host01c01 - host01c01: Disconnect customzied network 'mynet0' done + host01c01: Disconnect customized network 'mynet0' done host01c01: success diff --git a/docs/source/guides/admin-guides/references/man1/rmdsklsnode.1.rst b/docs/source/guides/admin-guides/references/man1/rmdsklsnode.1.rst index 1ad0c3b3e..b9dd2625d 100644 --- a/docs/source/guides/admin-guides/references/man1/rmdsklsnode.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmdsklsnode.1.rst @@ -39,11 +39,11 @@ If the node you are trying to remove is currently running the \ **rmdsklsnode**\ \ **Removing alternate NIM client definitions**\ -If you used the "-n" option when you created the NIM client definitions with the \ **mkdsklsnode**\ command then the NIM client machine names would be a combination of the xCAT node name and the osimage name used to initialize the NIM machine. To remove these definitions you must provide the name of the osimage that was used using the "-i" option. +If you used the "-n" option when you created the NIM client definitions with the \ **mkdsklsnode**\ command then the NIM client machine names would be a combination of the xCAT node name and the osimage name used to initialize the NIM machine. To remove these definitions, you must provide the name of the osimage that was used using the "-i" option. -In most cases you would most likely want to remove the old client definitions without disturbing the nodes that you just booted with the new alternate client definition. The \ **rmdsklsnode -r**\ option can be used to remove the old alternate client defintions without stopping the running node. +In most cases you would most likely want to remove the old client definitions without disturbing the nodes that you just booted with the new alternate client definition. The \ **rmdsklsnode -r**\ option can be used to remove the old alternate client definitions without stopping the running node. -However, if you have NIM dump resources assign to your nodes be aware that when the old NIM alternate client definitions are removed it will leave the nodes unable to produce a system dump. This is a current limitation in the NIM support for alternate client definitions. For this reason it is recommended that you wait to do this cleanup until right before you do your next upgrade. +However, if you have NIM dump resources assign to your nodes be aware that when the old NIM alternate client definitions are removed it will leave the nodes unable to produce a system dump. This is a current limitation in the NIM support for alternate client definitions. For this reason, it is recommended that you wait to do this cleanup until right before you do your next upgrade. ******* @@ -60,8 +60,7 @@ OPTIONS \ **-b |-**\ **-backupSN**\ - When using backup service nodes only update the backup. The default is to updat - e both the primary and backup service nodes. + When using backup service nodes only update the backup. The default is to update both the primary and backup service nodes. @@ -85,8 +84,7 @@ OPTIONS \ **-p|-**\ **-primarySN**\ - When using backup service nodes only update the primary. The default is to upda - te both the primary and backup service nodes. + When using backup service nodes only update the primary. The default is to update both the primary and backup service nodes. diff --git a/docs/source/guides/admin-guides/references/man1/rmhwconn.1.rst b/docs/source/guides/admin-guides/references/man1/rmhwconn.1.rst index 1edd0ad07..225bb4627 100644 --- a/docs/source/guides/admin-guides/references/man1/rmhwconn.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmhwconn.1.rst @@ -52,7 +52,7 @@ DESCRIPTION For PPC (with HMC) specific: -This command is used to disconnect CEC and Frame nodes from HMC nodes, according to the connection information defined in ppc talbe in xCAT DB. +This command is used to disconnect CEC and Frame nodes from HMC nodes, according to the connection information defined in ppc table in xCAT DB. Note: If a CEC belongs to a frame with a BPA installed, this CEC cannot be disconnected individually. Instead, the whole frame should be disconnected. diff --git a/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst b/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst index d6b67dfcb..c76a6584e 100644 --- a/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst @@ -88,7 +88,7 @@ zVM specific: \ **vm**\ table - -Table governing VM paramaters. See vm(5)|vm.5 for further details. +Table governing VM parameters. See vm(5)|vm.5 for further details. This is used to determine the current host to migrate from. diff --git a/docs/source/guides/admin-guides/references/man1/rmkitcomp.1.rst b/docs/source/guides/admin-guides/references/man1/rmkitcomp.1.rst index 675774440..183372691 100644 --- a/docs/source/guides/admin-guides/references/man1/rmkitcomp.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmkitcomp.1.rst @@ -29,7 +29,7 @@ DESCRIPTION *********** -The \ **rmkitcomp**\ command removes kit components from an xCAT osimage. All the kit component attribute values that are contained in the osimage will be removed, and the kit comoponent meta rpm and package rpm could be uninstalled by \ **-u|-**\ **-uninstall**\ option. +The \ **rmkitcomp**\ command removes kit components from an xCAT osimage. All the kit component attribute values that are contained in the osimage will be removed, and the kit component meta rpm and package rpm could be uninstalled by \ **-u|-**\ **-uninstall**\ option. Note: The xCAT support for Kits is only available for Linux operating systems. diff --git a/docs/source/guides/admin-guides/references/man1/rmvm.1.rst b/docs/source/guides/admin-guides/references/man1/rmvm.1.rst index f3fc52f98..39a083ec7 100644 --- a/docs/source/guides/admin-guides/references/man1/rmvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmvm.1.rst @@ -65,7 +65,7 @@ OPTIONS \ **-**\ **-service**\ Remove the service partitions of the specified CECs. -\ **-p**\ KVM: Purge the existence of the VM from persistant storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. PPC: Remove the specified partiton on normal power machine. +\ **-p**\ KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. PPC: Remove the specified partition on normal power machine. \ **-f**\ Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested. diff --git a/docs/source/guides/admin-guides/references/man1/rnetboot.1.rst b/docs/source/guides/admin-guides/references/man1/rnetboot.1.rst index 90cc2f5fe..866e10306 100644 --- a/docs/source/guides/admin-guides/references/man1/rnetboot.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rnetboot.1.rst @@ -66,11 +66,11 @@ Note: if the "val" fields includes spaces or any other characters that will be p \ **-r**\ -specify the number of retries that the monitoring process will perform before declare the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. +specify the number of retries that the monitoring process will perform before declaring the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. \ **-t**\ -Specify the the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. +Specify the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. \ **-V|-**\ **-verbose**\ 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 74dcc3cac..414471bd5 100644 --- a/docs/source/guides/admin-guides/references/man1/rpower.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rpower.1.rst @@ -32,7 +32,7 @@ BMC (using IPMI): \ **rpower**\ \ *noderange*\ [\ **pduon | pduoff | pdustat | pdureset**\ ] -OpenPower BMC (using IPMI): +OpenPOWER BMC (using IPMI): =========================== @@ -41,7 +41,7 @@ OpenPower BMC (using IPMI): \ **rpower**\ \ *noderange*\ [\ **pduon | pduoff | pdustat | pdureset**\ ] -OpenPower OpenBMC: +OpenPOWER OpenBMC: ================== @@ -181,7 +181,7 @@ OPTIONS \ **resetsp**\ - Reboot the service processor. If there are primary and secondary FSPs/BPAs of one cec/frame, it will reboot them almost at the sametime. + Reboot the service processor. If there are primary and secondary FSPs/BPAs of one cec/frame, it will reboot them almost at the same time. @@ -320,13 +320,13 @@ OPTIONS \ **-r**\ \ *retrycount*\ - specify the number of retries that the monitoring process will perform before declare the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. + specify the number of retries that the monitoring process will perform before declaring the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. \ **-t**\ \ *timeout*\ - Specify the the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. + Specify the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. Power off, then on. 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 9660a425d..c2165234b 100644 --- a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst @@ -564,7 +564,7 @@ OPTIONS \ **USERID**\ ={\ *newpasswd*\ } \ **updateBMC**\ ={\ **y|n**\ } - Change the password of the userid \ **USERID**\ for CMM in Flex system cluster. The option \ *updateBMC*\ can be used to specify whether updating the password of BMCs that connected to the speified CMM. The value is 'y' by default which means whenever updating the password of CMM, the password of BMCs will be also updated. Note that there will be several seconds needed before this command complete. + Change the password of the userid \ **USERID**\ for CMM in Flex system cluster. The option \ *updateBMC*\ can be used to specify whether updating the password of BMCs that connected to the specified CMM. The value is 'y' by default which means whenever updating the password of CMM, the password of BMCs will be also updated. Note that there will be several seconds needed before this command complete. If value "\*" is specified for USERID and the object node is \ *Flex System X node*\ , the password used to access the BMC of the System X node through IPMI will be updated as the same password of the userid \ **USERID**\ of the CMM in the same cluster. diff --git a/docs/source/guides/admin-guides/references/man1/rvitals.1.rst b/docs/source/guides/admin-guides/references/man1/rvitals.1.rst index 55d29d53b..7fa7e62d6 100644 --- a/docs/source/guides/admin-guides/references/man1/rvitals.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rvitals.1.rst @@ -56,11 +56,18 @@ BMC specific: \ **rvitals**\ \ *noderange*\ {\ **temp | voltage | wattage | fanspeed | power | leds | all**\ } -OpenPOWER server specific: +OpenPOWER (IPMI) specific: ========================== -\ **rvitals**\ \ *noderange*\ {\ **temp | voltage | wattage | fanspeed | power | leds | all**\ } +\ **rvitals**\ \ *noderange*\ [\ **temp | voltage | wattage | fanspeed | power | leds | chassis | all**\ ] + + +OpenPOWER (OpenBMC) specific: +============================= + + +\ **rvitals**\ \ *noderange*\ [\ **temp | voltage | wattage | fanspeed | power | altitude | all**\ ] @@ -69,7 +76,7 @@ OpenPOWER server specific: ******************* -\ **rvitals**\ retrieves hardware vital information from the on-board Service +\ **rvitals**\ Retrieves hardware vital information from the on-board Service Processor for a single or range of nodes and groups. @@ -133,6 +140,18 @@ Processor for a single or range of nodes and groups. +\ **chassis**\ + + Retrieves chassis status. + + + +\ **altitude**\ + + Retrieves altitude related attributes. + + + \ **power**\ Retrieves power status. 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 f1274c9d6..89bf04d4e 100644 --- a/docs/source/guides/admin-guides/references/man1/sinv.1.rst +++ b/docs/source/guides/admin-guides/references/man1/sinv.1.rst @@ -116,7 +116,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. then a new template will be created from the node output. This will result in having all nodes that match a given template reported in their group at the end of the run in the output file. - If no template count is specified, 0 is the default, and all nodes will + If no template count is specified, 0 is the default, and all nodes will be compared against the first template. @@ -127,7 +127,7 @@ 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 exists, and no seed node is + \ **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. @@ -152,7 +152,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. there can exist more lines in the xdsh return from the nodes. For example, if running a "rpm -qa | grep xCAT" command, without exactmatch - set, if the node containes more xCAT rpms that listed in the template, + set, if the node contains more xCAT rpms that listed in the template, it would be considered a match, as long as all rpms listed in the template were on the node. With exactmatch set, the output must be identical to the template. @@ -165,7 +165,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. of relevant device configuration file. The devicetype value must correspond to a valid device configuration file. xCAT ships some default configuration files - for Ethernet switches and and IB switches under + for Ethernet switches and IB switches under \ */opt/xcat/share/xcat/devicetype*\ directory. If you want to overwrite any of the configuration files, copy them to \ */var/opt/xcat/*\ directory and cutomize. diff --git a/docs/source/guides/admin-guides/references/man1/snmove.1.rst b/docs/source/guides/admin-guides/references/man1/snmove.1.rst index 80c0fd598..453e64c94 100644 --- a/docs/source/guides/admin-guides/references/man1/snmove.1.rst +++ b/docs/source/guides/admin-guides/references/man1/snmove.1.rst @@ -59,7 +59,7 @@ node is second. The \ **xcatmaster**\ attribute must be set to the hostname of the primary service node as it is known by the node. When the \ **snmove**\ command is run it modifies the xCAT database to -switch the the primary server to the backup server. +switch the primary server to the backup server. It will also check the other services that are being used for the node (tftpserver, monserver, nfsserver, conserver), and if they were set @@ -114,13 +114,13 @@ OPTIONS \ **-l|-**\ **-liteonly**\ - Use this option to ONLY synchronize any AIX statelite files from the primary server to the backup server for the nodes. It will not do the actual moving of thre nodes the the backup servers. + Use this option to ONLY synchronize any AIX statelite files from the primary server to the backup server for the nodes. It will not do the actual moving of the nodes to the backup servers. \ **-P|-**\ **-postscripts**\ - Specifies a list of extra postscripts to be run on the nodes after the nodes are moved over to the new serive node. If \ **all**\ is specified, all the postscripts defined in the postscripts table will be run for the nodes. The specified postscripts must be stored under /install/postscripts directory. + Specifies a list of extra postscripts to be run on the nodes after the nodes are moved over to the new service node. If \ **all**\ is specified, all the postscripts defined in the postscripts table will be run for the nodes. The specified postscripts must be stored under /install/postscripts directory. diff --git a/docs/source/guides/admin-guides/references/man1/swapnodes.1.rst b/docs/source/guides/admin-guides/references/man1/swapnodes.1.rst index 55c8b6f4e..158c5f4cf 100644 --- a/docs/source/guides/admin-guides/references/man1/swapnodes.1.rst +++ b/docs/source/guides/admin-guides/references/man1/swapnodes.1.rst @@ -44,7 +44,7 @@ The \ **swapnodes**\ command shouldn't make the decision of which 2 nodes are s After running \ **swapnodes**\ command, the order of the I/O devices may be changed after IO re-assignment, so the administrator needs to run \ **rbootseq**\ to set the boot string for the current_node. And then boot the node with the same image and same postscripts because they have the same attributes. -Without \ **-o**\ option, it's used to swap the location info in the db between 2 nodes. With \ **-o**\ option, it's used to move the \ *current_node*\ definition to \ *fip_node*\ (the 2nd octant), not move the \ *fip_node*\ definition to the 1st octant. If the two nodes are in a cec, it will assign the IO adapters that were assigned to the defective node to the available node. Originally, the \ *current_node*\ is a defective non-compute node, and \ *fip_node*\ is a avaible compute node. After the swapping, the \ *current_node*\ will be a available node. +Without \ **-o**\ option, it's used to swap the location info in the db between 2 nodes. With \ **-o**\ option, it's used to move the \ *current_node*\ definition to \ *fip_node*\ (the 2nd octant), not move the \ *fip_node*\ definition to the 1st octant. If the two nodes are in a cec, it will assign the IO adapters that were assigned to the defective node to the available node. Originally, the \ *current_node*\ is a defective non-compute node, and \ *fip_node*\ is a available compute node. After the swapping, the \ *current_node*\ will be a available node. ******* @@ -94,7 +94,7 @@ EXAMPLES -1. To swap the service node attributes and IO assignments between sn1 and compute2 which are in the same cec, all the attributes in the ppc table and nodepos talbe of the two node will be swapped, and the the I/O adapters from the defective node (the original sn1) will be assigned to the available node (the original compute2). After the swapping, the sn1 will use the compute2's hardware resource and the I/O adapters from the original sn1. +1. To swap the service node attributes and IO assignments between sn1 and compute2 which are in the same cec, all the attributes in the ppc table and nodepos table of the two node will be swapped, and the I/O adapters from the defective node (the original sn1) will be assigned to the available node (the original compute2). After the swapping, the sn1 will use the compute2's hardware resource and the I/O adapters from the original sn1. .. code-block:: perl @@ -104,7 +104,7 @@ EXAMPLES -2. To swap the service node attributes and IO assignments between sn1 and compute2 which are NOT in the same cec, all the attributes in the ppc table and nodepos talbe of the two node will be swapped. After the swapping, the sn1 will use the compute2's hardware resource. +2. To swap the service node attributes and IO assignments between sn1 and compute2 which are NOT in the same cec, all the attributes in the ppc table and nodepos table of the two node will be swapped. After the swapping, the sn1 will use the compute2's hardware resource. .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/switchdiscover.1.rst b/docs/source/guides/admin-guides/references/man1/switchdiscover.1.rst index 1ba9aff9b..e84f3e74d 100644 --- a/docs/source/guides/admin-guides/references/man1/switchdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/switchdiscover.1.rst @@ -23,13 +23,13 @@ DESCRIPTION *********** -The switchdiscover command scans the subnets and discovers all the swithches on the subnets. The command takes a list of subnets as input. The default subnets are the ones that the xCAT management node is on. It uses nmap command as default to discover the switches. However, you can specify other discovery methods such as lldp or snmp with \ **-s**\ flag. You can write the discovered switches into xCAT database with \ **-w**\ flag. This command supports may output formats such as xml(\ **-x**\ ), raw(\ **-r**\ ) and stanza(\ **-z**\ ) in addition to the default format. +The switchdiscover command scans the subnets and discovers all the switches on the subnets. The command takes a list of subnets as input. The default subnets are the ones that the xCAT management node is on. It uses nmap command as default to discover the switches. However, you can specify other discovery methods such as lldp or snmp with \ **-s**\ flag. You can write the discovered switches into xCAT database with \ **-w**\ flag. This command supports may output formats such as xml(\ **-x**\ ), raw(\ **-r**\ ) and stanza(\ **-z**\ ) in addition to the default format. \ **-**\ **-setup**\ flag is for switch-based switch discovery. It will find all the discovered switches on the subnets, then match them with predefined switches in the xCATDB. Next, it will set discovered switches with static ip address and hostname based on the predefined switch. It will also enable snmpv3 configuration. The details of the process are defined in the http://xcat-docs.readthedocs.io/en/latest/advanced/networks/switchdiscover/switches_discovery.html. -To view all the switches defined in the xCAT databasee use \ **lsdef -w "nodetype=switch"**\ command. +To view all the switches defined in the xCAT database use \ **lsdef -w "nodetype=switch"**\ command. -For lldp method, make sure that lldpd package is installed and lldpd is running on the xCAT management node. lldpd comes from xcat-dep packge or you can get it from http://vincentbernat.github.io/lldpd/installation.html. +For lldp method, make sure that lldpd package is installed and lldpd is running on the xCAT management node. lldpd comes from xcat-dep package or you can get it from http://vincentbernat.github.io/lldpd/installation.html. For snmp method, make sure that snmpwalk command is installed and snmp is enabled for switches. To install snmpwalk, "yum install net-snmp-utils" for redhat and sles, "apt-get install snmp" for Ubuntu. @@ -102,13 +102,13 @@ OPTIONS \ **-x**\ - XML formated output. + XML formatted output. \ **-z**\ - Stanza formated output. + Stanza formatted output. diff --git a/docs/source/guides/admin-guides/references/man1/updatenode.1.rst b/docs/source/guides/admin-guides/references/man1/updatenode.1.rst index 55043ad8d..cd9a37448 100644 --- a/docs/source/guides/admin-guides/references/man1/updatenode.1.rst +++ b/docs/source/guides/admin-guides/references/man1/updatenode.1.rst @@ -325,7 +325,7 @@ PARAMETERS The scripts must be executable and copied to the /install/postscripts directory. Each script can take zero or more parameters. - If parameters are spcified, the whole list needs to be quoted by double quotes. + If parameters are specified, the whole list needs to be quoted by double quotes. For example: @@ -341,7 +341,7 @@ PARAMETERS Specifies one or more "attribute equals value" pairs, separated by spaces. Attr=val pairs must be specified last on the command line. The currently supported attributes are: "installp_bundle", "otherpkgs", "installp_flags", - "emgr_flags" and "rpm_flags". These attribute are only valid for AIX software + "emgr_flags" and "rpm_flags". These attributes are only valid for AIX software maintenance support. @@ -355,9 +355,7 @@ OPTIONS \ **-**\ **-fanout**\ =\ *fanout_value*\ - Specifies a fanout value for the maximum number of concur- - rently executing remote shell processes. Serial execution - can be specified by indicating a fanout value of \ **1**\ . If \ **-**\ **-fanout**\ is not specified, a default fanout value of \ **64**\ is used. + Specifies a fanout value for the maximum number of concurrently executing remote shell processes. Serial execution can be specified by indicating a fanout value of \ **1**\ . If \ **-**\ **-fanout**\ is not specified, a default fanout value of \ **64**\ is used. @@ -441,7 +439,7 @@ OPTIONS AIX and Linux and updating software (-S) for Linux only. The non-root userid must be previously defined as an xCAT user. The userid sudo setup will have to be done by the admin on the node. - This is not supported in a hiearchical cluster, that is the node is serviced by a service node. + This is not supported in a hierarchical cluster, that is the node is serviced by a service node. See the document Granting_Users_xCAT_privileges for required xcat/sudo setup. diff --git a/docs/source/guides/admin-guides/references/man1/xcat2nim.1.rst b/docs/source/guides/admin-guides/references/man1/xcat2nim.1.rst index e23510646..9069b27de 100644 --- a/docs/source/guides/admin-guides/references/man1/xcat2nim.1.rst +++ b/docs/source/guides/admin-guides/references/man1/xcat2nim.1.rst @@ -153,7 +153,7 @@ EXAMPLES xcat2nim -l -t node clstrn02 -7. To re-create a NIM machine definiton and display verbose output. +7. To re-create a NIM machine definition and display verbose output. .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man5/networks.5.rst b/docs/source/guides/admin-guides/references/man5/networks.5.rst index b9ab58208..c71afb5f2 100644 --- a/docs/source/guides/admin-guides/references/man5/networks.5.rst +++ b/docs/source/guides/admin-guides/references/man5/networks.5.rst @@ -138,7 +138,7 @@ networks Attributes: \ **mtu**\ - The default MTU for the network + The default MTU for the network, If multiple networks are applied to the same nic on the SN and/or CN, the MTU shall be the same for those networks. diff --git a/docs/source/guides/admin-guides/references/man5/openbmc.5.rst b/docs/source/guides/admin-guides/references/man5/openbmc.5.rst index 14cbd3c80..11bbee003 100644 --- a/docs/source/guides/admin-guides/references/man5/openbmc.5.rst +++ b/docs/source/guides/admin-guides/references/man5/openbmc.5.rst @@ -27,7 +27,7 @@ DESCRIPTION *********** -Setting for nodes that are controlled by an on-board OpenBmc. +Setting for nodes that are controlled by an on-board OpenBMC. ******************* diff --git a/docs/source/guides/admin-guides/references/man5/postscripts.5.rst b/docs/source/guides/admin-guides/references/man5/postscripts.5.rst index a87cd902c..6bac116b9 100644 --- a/docs/source/guides/admin-guides/references/man5/postscripts.5.rst +++ b/docs/source/guides/admin-guides/references/man5/postscripts.5.rst @@ -44,13 +44,13 @@ postscripts Attributes: \ **postscripts**\ - Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. + Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. Please note that the postscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postscripts" attribute of a node with "chdef -m" command \ **postbootscripts**\ - Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. + Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. Please note that the postbootscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postbootscripts" attribute of a node with "chdef -m" command diff --git a/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst b/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst index 4100de4bb..e2cb86603 100644 --- a/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst +++ b/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst @@ -567,7 +567,7 @@ notification(5)|notification.5 openbmc(5)|openbmc.5 - Setting for nodes that are controlled by an on-board OpenBmc. + Setting for nodes that are controlled by an on-board OpenBMC. diff --git a/docs/source/guides/admin-guides/references/man7/group.7.rst b/docs/source/guides/admin-guides/references/man7/group.7.rst index 8aea1128b..9a67dd224 100644 --- a/docs/source/guides/admin-guides/references/man7/group.7.rst +++ b/docs/source/guides/admin-guides/references/man7/group.7.rst @@ -801,13 +801,13 @@ group Attributes: \ **postbootscripts**\ (postscripts.postbootscripts) - Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. + Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. Please note that the postbootscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postbootscripts" attribute of a node with "chdef -m" command \ **postscripts**\ (postscripts.postscripts) - Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. + Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. Please note that the postscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postscripts" attribute of a node with "chdef -m" command diff --git a/docs/source/guides/admin-guides/references/man7/network.7.rst b/docs/source/guides/admin-guides/references/man7/network.7.rst index 644e12908..593a52fb0 100644 --- a/docs/source/guides/admin-guides/references/man7/network.7.rst +++ b/docs/source/guides/admin-guides/references/man7/network.7.rst @@ -89,7 +89,7 @@ network Attributes: \ **mtu**\ (networks.mtu) - The default MTU for the network + The default MTU for the network, If multiple networks are applied to the same nic on the SN and/or CN, the MTU shall be the same for those networks. diff --git a/docs/source/guides/admin-guides/references/man7/node.7.rst b/docs/source/guides/admin-guides/references/man7/node.7.rst index 77646859a..0ab71ac4d 100644 --- a/docs/source/guides/admin-guides/references/man7/node.7.rst +++ b/docs/source/guides/admin-guides/references/man7/node.7.rst @@ -807,13 +807,13 @@ node Attributes: \ **postbootscripts**\ (postscripts.postbootscripts) - Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. + Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. Please note that the postbootscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postbootscripts" attribute of a node with "chdef -m" command \ **postscripts**\ (postscripts.postscripts) - Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. + Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. Please note that the postscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postscripts" attribute of a node with "chdef -m" command diff --git a/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst b/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst index 8dad0e800..495704d9c 100644 --- a/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst +++ b/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst @@ -19,7 +19,7 @@ SYNOPSIS ******** -\ **makeknownhosts**\ \ *noderange*\ [\ **-r | -**\ **-remove**\ ] [\ **-V | -**\ **-verbose**\ ] +\ **makeknownhosts**\ \ *noderange*\ [\ **-r | -d | -**\ **-remove**\ ] [\ **-V | -**\ **-verbose**\ ] \ **makeknownhosts**\ [\ **-h | -**\ **-help**\ ] @@ -53,7 +53,7 @@ OPTIONS -\ **-r|-**\ **-remove**\ +\ **-r| -d| -**\ **-remove**\ Only removes the entries for the nodes from the known_hosts file. @@ -98,6 +98,10 @@ EXAMPLES .. code-block:: perl makeknownhosts node02 -r + + or + + makeknownhosts node02 -d diff --git a/docs/source/guides/install-guides/common_sections.rst b/docs/source/guides/install-guides/common_sections.rst index e9f7cc87e..203b6cea9 100644 --- a/docs/source/guides/install-guides/common_sections.rst +++ b/docs/source/guides/install-guides/common_sections.rst @@ -37,11 +37,11 @@ xCAT consists of two software packages: ``xcat-core`` and ``xcat-dep`` * **Latest Release (Stable) Builds** - *This is the latest GA (Generally Availability) build that has been tested throughly* + *This is the latest GA (Generally Availability) build that has been tested thoroughly* * **Latest Snapshot Builds** - *This is the latest snapshot of the GA version build that may contain bug fixes but has not yet been tested throughly* + *This is the latest snapshot of the GA version build that may contain bug fixes but has not yet been tested thoroughly* * **Development Builds** diff --git a/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst b/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst index bfc60691f..6e343f834 100644 --- a/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst +++ b/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst @@ -58,7 +58,7 @@ Remove xCAT Files dpkg -l | awk '/xcat/ { print $2 }' - If you want to remove more cleanly, the list bleow maybe helpful. Listed are the packages of xcat installation tarball. Some RPMs may not to be installed in a specific environment. + If you want to remove more cleanly, the list below maybe helpful. Listed are the packages of xcat installation tarball. Some RPMs may not to be installed in a specific environment. * XCAT Core Packages list (xcat-core): diff --git a/docs/source/overview/differentiators.rst b/docs/source/overview/differentiators.rst index f84bf0a8a..eb015c76b 100644 --- a/docs/source/overview/differentiators.rst +++ b/docs/source/overview/differentiators.rst @@ -18,7 +18,7 @@ Differentiators IBM Power, IBM Power LE, x86_64 -* Support Multiple Virtulization Infrastructures +* Support Multiple Virtualization Infrastructures IBM PowerKVM, KVM, IBM zVM, ESXI, XEN diff --git a/docs/source/overview/quick_start.rst b/docs/source/overview/quick_start.rst index 8bf22dfae..d26fc33b8 100644 --- a/docs/source/overview/quick_start.rst +++ b/docs/source/overview/quick_start.rst @@ -33,7 +33,7 @@ If xCAT looks suitable for your requirement, following steps are recommended pro Now you have the node definition. Verify the hardware control for defined nodes is working. e.g. ``rpower stat``. - Refer to the doc: :doc:`Hardware Management ` to learn how to perform the remote hardware control. + Refer to the doc: :doc:`Hardware Management <../guides/admin-guides/manage_clusters/ppc64le/management/index>` to learn how to perform the remote hardware control. #. Deploy OS on the target nodes diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 18b27871b..2062b7c30 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -14,11 +14,19 @@ xCAT 2.13.x |xCAT |New OS |New |New Feature | |Version | |Hardware | | +=================================+===============+=============+==================================+ -|| xCAT 2.13.3 |- RHEL 6.9 | |- rpower for OpenBMC(experimental)| -|| 2017/4/7 | | |- Add -C for rmdef to run nodeset | -|| | | | nodeset offline | -| `2.13.3 Release Notes `_ | | | | +| | | | | ++---------------------------------+---------------+-------------+----------------------------------+ +|| xCAT 2.13.3 |- RHEL 6.9 | |- OpenBMC support(experimental): | +|| 2017/4/14 | | | | +|| | | | rpower rcons | +| `2.13.3 Release Notes `_ | | | | | | | | | +---------------------------------+---------------+-------------+----------------------------------+ @@ -63,7 +71,7 @@ xCAT 2.12.x | | | | | +---------------------------------+---------------+-------------+----------------------------------+ || xCAT 2.12.3 | | |- GitHub Issues resolved | -|| 2016/09/30 | | |- rinv options for OpenPower | +|| 2016/09/30 | | |- rinv options for OpenPOWER | || | | |- switch based switch discovery | | `2.12.3 Release Notes `_ | | |- Add xCAT Troubleshooting Log | | | | |- xCAT Log Classification | | | | |- RAID Configuration | diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 0bc7e2286..4faa725b8 100755 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -675,6 +675,7 @@ sub setobjdefs # update the tables a row at a time foreach my $objname (keys %objhash) { + my $obj_need_update = 0; # get attr=val that are set in the DB ?? my $type = $objhash{$objname}{objtype}; @@ -1023,6 +1024,7 @@ sub setobjdefs $rsp->{data}->[0] = "access_tabentry \'$this_attr->{access_tabentry}\' is not valid."; xCAT::MsgUtils->message("E", $rsp, $::callback); + $objhash{$objname}{error} = 1; next; } $lookup_table = $tabentry{'lookup_table'}; @@ -1075,19 +1077,26 @@ sub setobjdefs split(/$delim/, $DBattrvals{$objname}{$attr_name}); my @minusList = split(/$delim/, $objhash{$objname}{$attr_name}); + my $operation_failed = 0; foreach my $em (@minusList) { if (!(grep { $_ eq $em } @currentList)) { if (($::opt_t eq 'group') && ($DBattrvals{$objname}{'grouptype'} ne 'dynamic')) { my $rsp; $rsp->{data}->[0] = "$objname is not a member of \'$em\'."; - xCAT::MsgUtils->message("W", $rsp, $::callback); + xCAT::MsgUtils->message("E", $rsp, $::callback); + $operation_failed = 1; } else { my $rsp; $rsp->{data}->[0] = "$em is not in the attribute of \'$attr_name\' for the \'$objname\' definition."; - xCAT::MsgUtils->message("W", $rsp, $::callback); + xCAT::MsgUtils->message("E", $rsp, $::callback); + $operation_failed = 1; } } } + if ($operation_failed) { + $objhash{$objname}{error} = 1; + next; + } # make a new list without the one specified my $first = 1; @@ -1106,6 +1115,12 @@ sub setobjdefs } $val = $newlist; } + else { + my $rsp; + $rsp->{data}->[0] = "No value got for attribute \'$attr_name\' for the \'$objname\' definition."; + xCAT::MsgUtils->message("E", $rsp, $::callback); + next; + } } else { @@ -1118,10 +1133,13 @@ sub setobjdefs # the key is 'tabattrs' $allupdates{$lookup_table}{$objname}{$attr_name}{'tabattrs'}{$::tabattr} = $val; $setattrs = 1; - + $obj_need_update = 1; push(@setattrlist, $attr_name); } # end - foreach attribute + if ($obj_need_update) { + $objhash{$objname}{updated} = 1; + } my $rsp; foreach my $att (keys %$invalidattr) { @@ -2503,6 +2521,7 @@ sub judge_node nicsattr value, like niccsips=eth0!1.1.1.1|2.1.1.1,eth1!3.1.1.1|4.1.1.1 node name, like frame10node10 nicnames: only return the value for specific nics, like "eth0,eth1" + is_group: bool value indicates whether the type of object is group Returns: expanded format, like: nicsips.eth0=1.1.1.1|2.1.1.1 @@ -2524,8 +2543,7 @@ sub expandnicsattr() if (($nicstr) && ($nicstr =~ /xCAT::/)) { $nicstr = shift; } - my $node = shift; - my $nicnames = shift; + my ($node, $nicnames, $is_group) = @_; my $ret; $nicstr =~ /^(.*?)=(.*?)$/; @@ -2574,8 +2592,10 @@ sub expandnicsattr() } } } - - $nicv[1]= xCAT::Table::transRegexAttrs($node, $nicv[1]); + # print group attributes in original format + if (!$is_group) { + $nicv[1]= xCAT::Table::transRegexAttrs($node, $nicv[1]); + } # ignore the line that does not have nicname or value if ($nicv[0] && $nicv[1]) { $ret .= " $nicattr.$nicv[0]=$nicv[1]\n"; diff --git a/perl-xCAT/xCAT/FSPvitals.pm b/perl-xCAT/xCAT/FSPvitals.pm index 3f31bf31c..11915abd7 100644 --- a/perl-xCAT/xCAT/FSPvitals.pm +++ b/perl-xCAT/xCAT/FSPvitals.pm @@ -375,7 +375,6 @@ sub rackenv { push @result, [ $name, $td, $Rc ]; if (!exists($request->{verbose})) { - #if( $td =~ /^Rack altitude in meters/ ) { if ($td =~ /^BPA-B total output in watts/) { last; } diff --git a/perl-xCAT/xCAT/MsgUtils.pm b/perl-xCAT/xCAT/MsgUtils.pm index b2e6484be..577d97ec4 100644 --- a/perl-xCAT/xCAT/MsgUtils.pm +++ b/perl-xCAT/xCAT/MsgUtils.pm @@ -16,6 +16,7 @@ use xCAT::Utils; #use locale; use Socket; use File::Path; +use constant PERF_LOG => "/var/log/xcat/perf.log"; $::NOK = -1; $::OK = 0; @@ -823,5 +824,65 @@ sub trace() { } } +#------------------------------------------------------------------ + +=head3 _perf_log + Libary function to write the perf log. Do not use it directly. +=cut + +#----------------------------------------------------------------- +sub _perf_log +{ + my $type = shift; + my $msg = shift; + my $fh; + my $ret = open($fh, '>>', PERF_LOG); + if (!$ret) { + xCAT::MsgUtils->message("S", "Open perf log file error: $!"); + } + my $line = localtime()."\t$type\t$msg\n"; + print $fh $line; + close $fh; +} + +#------------------------------------------------------------------ + +=head3 perf_log_info + Trace information for perf + Argument: + $msg (trace message) +=cut + +#----------------------------------------------------------------- +sub perf_log_info +{ + shift; + my $msg = shift; + _perf_log('info', $msg); +} + +#------------------------------------------------------------------ + +=head3 perf_log_process + Trace process information for perf + Arguments: + $process_type (immediate, plugin, etc) + $req (xcat reqeust) + $msg (additional message, optional) +=cut + +#----------------------------------------------------------------- +sub perf_log_process +{ + shift; + my ($process_type, $req, $msg, $pid) = @_; + if (defined($req)) { + my $command = $req->{command}->[0]; + _perf_log($process_type, "$$\t$command\t$msg"); + } else { + _perf_log($process_type, "$pid\t$msg"); + } +} + 1; diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index a66576cf4..0c62fb7a0 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -19,8 +19,7 @@ use File::Path; use Math::BigInt; use Socket; use xCAT::GlobalDef; - -#use Data::Dumper; +use Sys::Hostname; use strict; use warnings "all"; my $socket6support = eval { require Socket6 }; @@ -229,6 +228,9 @@ sub gethostname() hostname Optional: GetNumber=>1 (return the address as a BigInt instead of readable string) + GetAllAddresses=>1 (return the ) + OnlyV6=>1 () + OnlyV4=> () Returns: ip address Globals: cache: %::hostiphash @@ -270,69 +272,117 @@ sub getipaddr # #pass in an ip and only want an ip?? # return $iporhost; #} + my $isip=0; + if ($iporhost and ($iporhost =~ /\d+\.\d+\.\d+\.\d+/) || ($iporhost =~ /:/)){ + $isip=1; + } + + +#print "============================\n"; +#print Dumper(\%::hostiphash); +#print "\n"; +#print Dumper(\%extraarguments); +#print "\n"; +#print "iporhost=$iporhost"; +#print "\n"; +#print "============================\n"; #cache, do not lookup DNS each time - if ($::hostiphash and defined($::hostiphash{$iporhost}) && $::hostiphash{$iporhost}) + if ( + ((not $extraarguments{OnlyV6}) and (not $extraarguments{GetAllAddresses})) and defined($::hostiphash{$iporhost}) and $::hostiphash{$iporhost}) { - return $::hostiphash{$iporhost}; + + if($extraarguments{GetNumber} ) { + if($::hostiphash{$iporhost}{Number}){ + #print "YYYYYYYYYY GetNumber Cache Hit!!!YYYYYYYYY\n"; + return $::hostiphash{$iporhost}{Number}; + } + } elsif($::hostiphash{$iporhost}{hostip}) { + #print "YYYYYYYYYY dns Cache Hit!!!YYYYYYYYY\n"; + return $::hostiphash{$iporhost}{hostip}; + } + } + + if ($socket6support) # the getaddrinfo and getnameinfo supports both IPv4 and IPv6 + { + my @returns; + my $reqfamily = AF_UNSPEC; + if ($extraarguments{OnlyV6}) { + $reqfamily = AF_INET6; + } elsif ($extraarguments{OnlyV4}) { + $reqfamily = AF_INET; + } + my @addrinfo; + if($isip) { + @addrinfo=Socket6::getaddrinfo($iporhost, 0, $reqfamily, SOCK_STREAM, 6,Socket6::AI_NUMERICHOST()); + }else{ + @addrinfo=Socket6::getaddrinfo($iporhost, 0, $reqfamily, SOCK_STREAM, 6); + } + my ($family, $socket, $protocol, $ip, $name) = splice(@addrinfo, 0, 5); + unless($reqfamily == AF_INET6){ + if($isip){ + if($name){ + $::hostiphash{$iporhost}{hostip}=$name; + } + }elsif($ip){ + $::hostiphash{$iporhost}{hostip}=$ip; + } + } + while ($ip) + { + if ($extraarguments{GetNumber}) { #return a BigInt for compare, e.g. for comparing ip addresses for determining if they are in a common network or range + my $ip = (Socket6::getnameinfo($ip, Socket6::NI_NUMERICHOST()))[0]; + my $bignumber = Math::BigInt->new(0); + foreach (unpack("N*", Socket6::inet_pton($family, $ip))) { #if ipv4, loop will iterate once, for v6, will go 4 times + $bignumber->blsft(32); + $bignumber->badd($_); + } + push(@returns, $bignumber); + $::hostiphash{$iporhost}{Number}=$returns[0]; + } else { + push @returns, (Socket6::getnameinfo($ip, Socket6::NI_NUMERICHOST()))[0]; + $::hostiphash{$iporhost}{hostip}=$returns[0]; + } + if (scalar @addrinfo and $extraarguments{GetAllAddresses}) { + ($family, $socket, $protocol, $ip, $name) = splice(@addrinfo, 0, 5); + } else { + $ip = 0; + } + } + unless ($extraarguments{GetAllAddresses}) { + return $returns[0]; + } + return @returns; } else { - if ($socket6support) # the getaddrinfo and getnameinfo supports both IPv4 and IPv6 - { - my @returns; - my $reqfamily = AF_UNSPEC; - if ($extraarguments{OnlyV6}) { - $reqfamily = AF_INET6; - } elsif ($extraarguments{OnlyV4}) { - $reqfamily = AF_INET; - } - my @addrinfo = Socket6::getaddrinfo($iporhost, 0, $reqfamily, SOCK_STREAM, 6); - my ($family, $socket, $protocol, $ip, $name) = splice(@addrinfo, 0, 5); - while ($ip) - { - if ($extraarguments{GetNumber}) { #return a BigInt for compare, e.g. for comparing ip addresses for determining if they are in a common network or range - my $ip = (Socket6::getnameinfo($ip, Socket6::NI_NUMERICHOST()))[0]; - my $bignumber = Math::BigInt->new(0); - foreach (unpack("N*", Socket6::inet_pton($family, $ip))) { #if ipv4, loop will iterate once, for v6, will go 4 times - $bignumber->blsft(32); - $bignumber->badd($_); - } - push(@returns, $bignumber); - } else { - push @returns, (Socket6::getnameinfo($ip, Socket6::NI_NUMERICHOST()))[0]; - } - if (scalar @addrinfo and $extraarguments{GetAllAddresses}) { - ($family, $socket, $protocol, $ip, $name) = splice(@addrinfo, 0, 5); - } else { - $ip = 0; - } - } - unless ($extraarguments{GetAllAddresses}) { - return $returns[0]; - } - return @returns; - } - else - { - #return inet_ntoa(inet_aton($iporhost)) - #TODO, what if no scoket6 support, but passing in a IPv6 hostname? - if ($iporhost =~ /:/) { #ipv6 - return undef; + #return inet_ntoa(inet_aton($iporhost)) + #TODO, what if no scoket6 support, but passing in a IPv6 hostname? + if ($iporhost =~ /:/) { #ipv6 + return undef; - #die "Attempt to process IPv6 address, but system does not have requisite IPv6 perl support"; - } - my $packed_ip; - $iporhost and $packed_ip = inet_aton($iporhost); - if (!$packed_ip) - { - return undef; - } - if ($extraarguments{GetNumber}) { #only 32 bits, no for loop needed. - return Math::BigInt->new(unpack("N*", $packed_ip)); - } - return inet_ntoa($packed_ip); + #die "Attempt to process IPv6 address, but system does not have requisite IPv6 perl support"; } + my $packed_ip; + $iporhost and $packed_ip = inet_aton($iporhost); + if (!$packed_ip) + { + return undef; + } + + my $myip=inet_ntoa($packed_ip); + + unless($isip) { + $::hostiphash{$iporhost}{hostip}=$myip; + } + + if ($extraarguments{GetNumber}) { #only 32 bits, no for loop needed. + my $number=Math::BigInt->new(unpack("N*", $packed_ip)); + $::hostiphash{$iporhost}{Number}=$number; + return $number; + } + + return $myip; } } @@ -417,7 +467,7 @@ sub linklocaladdr { =cut #------------------------------------------------------------------------------- -sub ishostinsubnet { +sub ishostinsubnet{ my ($class, $ip, $mask, $subnet) = @_; #safe guard @@ -425,6 +475,40 @@ sub ishostinsubnet { { return 0; } + + my $maskType=0; + + #CIDR notation supported + if ($subnet && ($subnet =~ /\//)) { + ($subnet, $mask) = split /\//, $subnet, 2; + $subnet =~ s/\/.*$//; + $maskType=1; + }elsif ($mask) { + if ($mask =~ /\//) { + $mask =~ s/^\///; + $maskType=1; + } elsif($mask =~ /^0x/i ) { + $maskType=2; + } + } + + my $ret=xCAT::NetworkUtils::isInSameSubnet( $ip, $subnet, $mask, $maskType); + if(defined $ret and $ret==1){ + return 1; + }else{ + return 0; + } +} + +sub ishostinsubnet_orig { + my ($class, $ip, $mask, $subnet) = @_; + + #safe guard + if (!defined($ip) || !defined($mask) || !defined($subnet)) + { + return 0; + } + my $numbits = 32; if ($ip =~ /:/) { #ipv6 $numbits = 128; @@ -1314,7 +1398,7 @@ sub formatNetmask Returns: 1: they are in same subnet - 2: not in same subnet + undef: not in same subnet Globals: none @@ -1853,16 +1937,13 @@ sub get_subnet_aix sub determinehostname { my $hostname; - my $hostnamecmd = "/bin/hostname"; - my @thostname = xCAT::Utils->runcmd($hostnamecmd, 0); - if ($::RUNCMD_RC != 0) - { # could not get hostname - xCAT::MsgUtils->message("S", - "Error $::RUNCMD_RC from $hostnamecmd command\n"); - exit $::RUNCMD_RC; + eval { + $hostname = hostname; + }; + if($@){ + xCAT::MsgUtils->message("S","Fail to get hostname: $@\n"); + exit -1; } - $hostname = $thostname[0]; - #get all potentially valid abbreviations, and pick the one that is ok #by 'noderange' my @hostnamecandidates; diff --git a/perl-xCAT/xCAT/ProfiledNodeUtils.pm b/perl-xCAT/xCAT/ProfiledNodeUtils.pm index dc351df6a..65cb35804 100644 --- a/perl-xCAT/xCAT/ProfiledNodeUtils.pm +++ b/perl-xCAT/xCAT/ProfiledNodeUtils.pm @@ -1365,7 +1365,7 @@ sub gen_chain_for_profiles { #run bmcsetups. #PowerNV nodes can't use 'runcmd=bmcsetup' to set BMC. - #But OpenPower need to support bmcsetup + #But OpenPOWER need to support bmcsetup my $nodehmtab = xCAT::Table->new('nodehm'); my $comments = ""; my $nodehmtab_entry = $nodehmtab->getNodeAttribs($hwprofile, ['comments']); diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 23aaa1968..507b562a9 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -446,7 +446,7 @@ passed as argument rather than by table value', openbmc => { cols => [qw(node bmc consport taggedvlan username password comments disable)], keys => [qw(node)], - table_desc => 'Setting for nodes that are controlled by an on-board OpenBmc.', + table_desc => 'Setting for nodes that are controlled by an on-board OpenBMC.', descriptions => { node => 'The node name or group name.', bmc => 'The hostname of the BMC adapter.', @@ -893,8 +893,8 @@ passed as argument rather than by table value', table_desc => 'The scripts that should be run on each node after installation or diskless boot.', descriptions => { node => 'The node name or group name.', - postscripts => 'Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute.', - postbootscripts => 'Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list.', + postscripts => 'Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. Please note that the postscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postscripts" attribute of a node with "chdef -m" command', + postbootscripts => 'Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. Please note that the postbootscripts specified for "xcatdefaults" will be assigned to node automatically, they can not be removed from "postbootscripts" attribute of a node with "chdef -m" command', 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 654e6950a..a7aaf2588 100644 --- a/perl-xCAT/xCAT/Scope.pm +++ b/perl-xCAT/xCAT/Scope.pm @@ -1,8 +1,173 @@ package xCAT::Scope; + use xCAT::Utils; use xCAT::Table; use xCAT::ServiceNodeUtils qw(getSNList); + +#----------------------------------------------------------------------------- + +=head3 split_node_array + + Split a node array into multiple subsets in case to handle them in parallel. + + Arguments: + Reference of source array + Maximum subset number + Default element capacity in each subset + Returns: An array of all subsets + Error: + none + Example: + my $subsets = split_node_array(\@nodes, 5, 250); +=cut + +#----------------------------------------------------------------------------- +sub split_node_array { + my $source = shift; + if ($source =~ /xCAT::Scope/) { + $source = shift; + } + my $max_sub = shift; + my $capacity = shift; + + if ($max_sub < 2) {return [$source];} + + my @dest = (); + my $total = $#{$source} + 1; + my $n_sub = int ($total / $capacity); + unless ($n_sub * $capacity == $total) { $n_sub++;} #POSIX::ceil + + if ( $n_sub <= 1 ) { + # Only 1 subset is enough + $dest[0] = $source; + + } elsif ( $n_sub > $max_sub ) { + # Exceed, then to recaculate the capacity of each subset as we only allow max_sub + $capacity = int ($total / $max_sub); + if ( $total % $max_sub > 0 ) { + $capacity += 1; + } + my $start = $end = 0; + for (1..$max_sub) { + $end = $start + $capacity - 1; + if ( $end > $total - 1 ) { + $end = $total - 1 + } + + my @temp = @$source[$start..$end]; + $dest[$_-1]=\@temp; + $start = $end + 1; + } + + } else { + # Only n_sub subsets are required, split the noderange into each subset + my $start = $end = 0; + for (1..$n_sub) { + $end = $start + $capacity - 1; + if ( $end > $total - 1 ) { + $end = $total - 1 + } + #print "subset #$_: $start to $end"; + my @temp = @$source[$start..$end]; + $dest[$_-1]=\@temp; + $start = $end + 1; + } + } + + return \@dest; +} + +#----------------------------------------------------------------------------- + +=head3 get_parallel_scope + + Convert a request object to an array of multiple requests according to the + splitted node range. + + Arguments: + Reference of request + Maximum subset number: Optional, default is 5 + Default element capacity in each subset: Optional, default is 250 + Returns: An array of requests + Error: + none + Example: + my $reqs = xCAT::Scope->get_parallel_scope($request); +=cut + +#----------------------------------------------------------------------------- +sub get_parallel_scope { + my $req = shift; + if ($req =~ /xCAT::Scope/) { + $req = shift; + } + my ($max_sub, $capacity) = @_; + #TODO, make the value configurable + unless ($max_sub) { $max_sub = 5; } + unless ($capacity) { $capacity = 250; } + + my $subsets = split_node_array(\@{$req->{node}}, $max_sub, $capacity); + # Just return the origin one if node range is not big enough. + if ($#{$subsets} < 1) { return [$req]; } + + my @requests = (); + foreach (@$subsets) { + my $reqcopy = {%$req}; + $reqcopy->{node} = $_; + push @requests, $reqcopy; + } + return \@requests; +} + +#----------------------------------------------------------------------------- + +=head3 get_broadcast_scope_with_parallel + + Convert a request object to an array of multiple requests according to the + splitted node range. + + Arguments: + Reference of request + Callback: TODO, Optional, the Callback will be used to filter the nodes + Returns: An array of requests + Error: + none + Example: + my $reqs = xCAT::Scope->get_broadcast_scope($request); +=cut + +#----------------------------------------------------------------------------- +sub get_broadcast_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]; } + + #Handle the one for current management/service node + my $reqs = get_parallel_scope($req); + my @requests = @$reqs; + + #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, {%$_}; + } + } + } + return \@requests; +} + + sub get_broadcast_scope { my $req = shift; if ($req =~ /xCAT::Scope/) { diff --git a/perl-xCAT/xCAT/ServiceNodeUtils.pm b/perl-xCAT/xCAT/ServiceNodeUtils.pm index 5daf5c237..c27601874 100755 --- a/perl-xCAT/xCAT/ServiceNodeUtils.pm +++ b/perl-xCAT/xCAT/ServiceNodeUtils.pm @@ -14,7 +14,6 @@ if ($^O =~ /^aix/i) { } use lib "$::XCATROOT/lib/perl"; use strict; - #----------------------------------------------------------------------------- =head3 readSNInfo @@ -353,6 +352,37 @@ sub getSNandNodes #----------------------------------------------------------------------------- sub getSNList +{ + require xCAT::Table; + require xCAT::NodeRange; + my ($class, $service, $options) = @_; + my @servicenodes; + my $servicenodetab = xCAT::Table->new('servicenode'); + my $nodetab = xCAT::Table->new('nodelist'); + unless ($servicenodetab) # no servicenode table + { + xCAT::MsgUtils->message('I', "Unable to open servicenode table.\n"); + $servicenodetab->close; + return @servicenodes; + } + + + if($service){ + @servicenodes = $servicenodetab->getAllAttribsWhere(["$service==1"],'node'); + }else{ + @servicenodes = $servicenodetab->getAllAttribs(('node')); + } + + @servicenodes=xCAT::NodeRange::noderange(join(',',map {$_->{node}} @servicenodes)); + if($options eq "ALL"){ + return @servicenodes; + } + + @servicenodes = $nodetab->getAllAttribsWhere("node in ("."\'".join("\',\'", @servicenodes)."\'".") and groups not like '%__mgmtnode%'",'node'); + return map {$_->{node}} @servicenodes; +} + +sub getSNList_orig { require xCAT::Table; my ($class, $service, $options) = @_; @@ -367,6 +397,7 @@ sub getSNList } my @nodes = $servicenodetab->getAllNodeAttribs([$service]); $servicenodetab->close; + foreach my $node (@nodes) { if (!defined($service) || ($service eq "")) # want all the service nodes diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 45789f754..b933d7252 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -29,10 +29,10 @@ my %usage = ( BMC (using IPMI): rpower noderange [on|off|softoff|reset|boot|stat|state|status|wake|suspend [-w timeout] [-o] [-r]] rpower noderange [pduon|pduoff|pdustat] - OpenPower BMC: + OpenPOWER BMC: rpower noderange [on|off|reset|boot|stat|state|status] rpower noderange [pduon|pduoff|pdustat] - OpenPower OpenBMC: + OpenPOWER OpenBMC: rpower noderange [on|off|reset|boot|stat|state|status] KVM Virtualization specific: rpower [boot] [ -c ] @@ -81,8 +81,10 @@ my %usage = ( rvitals noderange {temp|wattage|fanspeed|leds|summary|all} BMC specific: rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|all} - OpenPOWER server specific: - rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|all} + OpenPOWER (IPMI) specific: + rvitals noderange [temp|voltage|wattage|fanspeed|power|leds|chassis|all] + OpenPOWER (OpenBMC) specific: + rvitals noderange [temp|voltage|wattage|fanspeed|power|altitude|all] MIC specific: rvitals noderange {thermal|all}", "reventlog" => @@ -623,3 +625,41 @@ sub parseCommand { return ""; } +#------------------------------------------------------------------------------ + +=head3 validateArgs + This function validates the arguments of the specified command + Arguments: + command + arguments(array @) + Returns: + $ref: a reference to array of [$retcode(integer),$info(string)] + $ref->[0]=0 : validation passed + $ret->[0]!=0: validation failed, the error info is returned in $ref->[1] + +=cut + +#------------------------------------------------------------------------------- + +sub validateArgs { + my $command=shift; + if ($command =~ /xCAT::Usage/) { $command = shift; } + + my $count=0; + my @extrargs=@_; + if($command =~ m/^(nodeset|rinstall|winstall)$/ ){ + #suppose that argument like "-p foo" have been processed and + #filtered by GetOpt subroutine + #fortunately the commands in this branch does not have such options + foreach(@extrargs){ + if($_ !~ m/^-[-]?\S+/){ + $count+=1; + } + } + if ($count!=1) { + return [1,"Invalid argument: '".join(" ",@extrargs)."'"]; + } + } + + return [0]; +} diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 6154a1bd5..8d741cf9a 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -3314,10 +3314,25 @@ sub isSELINUX =cut #------------------------------------------------------------------------------- + + sub noderangecontainsMn { my ($class, @noderange) = @_; + # check if any node in the noderange is the Management Node return the + # name + my @mnames; # management node names in the database, members of __mgmtnode + my $tab = xCAT::Table->new('nodelist'); + + my @nodelist = $tab->getAllAttribsWhere("node in ("."\'".join("\',\'", @noderange)."\'".") and groups like '%__mgmtnode%'",'node'); + return map {$_->{node}} @nodelist; # if no MN in the noderange, return nothing +} + +sub noderangecontainsMn_orig +{ + my ($class, @noderange) = @_; + # check if any node in the noderange is the Management Node return the # name my @mnames; # management node names in the database, members of __mgmtnode diff --git a/xCAT-client/pods/man1/bmcdiscover.1.pod b/xCAT-client/pods/man1/bmcdiscover.1.pod index 3d4058f51..2e967fab5 100644 --- a/xCAT-client/pods/man1/bmcdiscover.1.pod +++ b/xCAT-client/pods/man1/bmcdiscover.1.pod @@ -17,7 +17,7 @@ B [B<-u> I] [B<-p> I] B<-i> I B<--ips =head1 DESCRIPTION -The B command will discover Baseboard Management Controllers (BMCs) using a scan mathod. +The B command will discover Baseboard Management Controllers (BMCs) using a scan method. The command uses B to scan active nodes over a specified IP range. The IP range format should be a format that is acceptable by B. @@ -31,7 +31,7 @@ Note: The scan method currently support is B. =item B<--range> -Specify one or more IP ranges acceptable to nmap. IP rance can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B command may take a long time to return. +Specify one or more IP ranges acceptable to nmap. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B command may take a long time to return. =item B<-s> diff --git a/xCAT-client/pods/man1/cfgve.1.pod b/xCAT-client/pods/man1/cfgve.1.pod index 93c8dbc60..e2df6268f 100644 --- a/xCAT-client/pods/man1/cfgve.1.pod +++ b/xCAT-client/pods/man1/cfgve.1.pod @@ -81,7 +81,7 @@ The NFS export directory must be configured for read write access and must be owned by vdsm:kvm. B: "/data/images/rhev" is set by default. -B - A host must be specified for a storage doamin as SPM +B - A host must be specified for a storage domain as SPM (Storage Pool Manager) when initialize the storage domain. The role of SPM may be migrated to other host by rhev-m during the running of the datacenter (For example, when the current SPM encountered issue or going to maintenance diff --git a/xCAT-client/pods/man1/chvm.1.pod b/xCAT-client/pods/man1/chvm.1.pod index 99ec573f7..f1ac27855 100644 --- a/xCAT-client/pods/man1/chvm.1.pod +++ b/xCAT-client/pods/man1/chvm.1.pod @@ -114,7 +114,7 @@ This command also supports to change specific partition attributes by specifying For Power 755(use option I<--p775> to specify): -chvm could be used to change the octant configuration values for generating LPARs. chvm is designed to set the Octant configure value to split the CPU and memory for partitions, and set Octant Memory interleaving value. The chvm will only set the pending attributes value. After chvm, the CEC needs to be rebooted manually for the pending values to be enabled. Before reboot the cec, the administrator can use chvm to change the partition plan. If the the partition needs I/O slots, the administrator should use chvm to assign the I/O slots. +chvm could be used to change the octant configuration values for generating LPARs. chvm is designed to set the Octant configure value to split the CPU and memory for partitions, and set Octant Memory interleaving value. The chvm will only set the pending attributes value. After chvm, the CEC needs to be rebooted manually for the pending values to be enabled. Before reboot the cec, the administrator can use chvm to change the partition plan. If the partition needs I/O slots, the administrator should use chvm to assign the I/O slots. chvm is also designed to assign the I/O slots to the new LPAR. Both the current IO owning lpar and the new IO owning lpar must be powered off before an IO assignment. Otherwise, if the I/O slot is belonged to an Lpar and the LPAR is power on, the command will return an error when trying to assign that slot to a different lpar. @@ -127,7 +127,7 @@ chvm could be used to modify the resources assigned to partitions. The admin sha =head2 zVM specific: -The chvm command modifes the virtual machine's configuration specified in noderange. +The chvm command modifies the virtual machine's configuration specified in noderange. =head1 OPTIONS @@ -248,7 +248,7 @@ Purge the Hard disk. Deregisters and deletes the files. Multiple can be done w =item B<--resize> I=I -Change the size of the Hard disk. The disk in I format can not be set to less than it's current size. The disk in I format can be resized smaller, use caution. Multiple disks can be resized by using comma separated IB<=>I pairs. The disks are specified by SCSI id. Size defaults to GB. +Change the size of the Hard disk. The disk in I format can not be set to less than its current size. The disk in I format can be resized smaller, use caution. Multiple disks can be resized by using comma separated IB<=>I pairs. The disks are specified by SCSI id. Size defaults to GB. =back diff --git a/xCAT-client/pods/man1/csm2xcat.1.pod b/xCAT-client/pods/man1/csm2xcat.1.pod index fc1f66411..dffc47c79 100644 --- a/xCAT-client/pods/man1/csm2xcat.1.pod +++ b/xCAT-client/pods/man1/csm2xcat.1.pod @@ -11,7 +11,7 @@ B [B<-h>] =head1 DESCRIPTION -The csm2xcat command must be run on the Management Server of the CSM system that you want to migrate to xCAT. The commmand will build two xCAT stanza files that can update the xCAT database with the chdef command. +The csm2xcat command must be run on the Management Server of the CSM system that you want to migrate to xCAT. The command will build two xCAT stanza files that can update the xCAT database with the chdef command. Copy the csm2xcat command to the CSM Management Server. Run the command, indicating where you want your stanza files saved with the B<--dir> parameter. Check the stanza files to see if the information is what you want put in the xCAT database. Copy the two stanza files: node.stanza, device.stanza back to your xCAT Management node, and run the chdef command to input into the xCAT database. diff --git a/xCAT-client/pods/man1/db2sqlsetup.1.pod b/xCAT-client/pods/man1/db2sqlsetup.1.pod index 4bf2768de..8d9e9f059 100644 --- a/xCAT-client/pods/man1/db2sqlsetup.1.pod +++ b/xCAT-client/pods/man1/db2sqlsetup.1.pod @@ -28,7 +28,7 @@ For full information on the setup of DB2, see Setting_Up_DB2_as_the_xCAT_DB. When running of db2sqlsetup on the MN: One password must be supplied for the setup, a password for the xcatdb unix id which will be used as the DB2 instance id and database name. The password will be prompted for interactively or can be input with the XCATDB2PW environment variable. -The script will create the xcat database instance (xcatdb) in the /var/lib/db2 directory unless overriden by setting the site.databaseloc attribute. This attribute should not be set to the directory that is defined in the installloc attribute and it is recommended that the databaseloc be a new filesystem dedicated to the DB2 database, especially in very large clusters. +The script will create the xcat database instance (xcatdb) in the /var/lib/db2 directory unless overridden by setting the site.databaseloc attribute. This attribute should not be set to the directory that is defined in the installloc attribute and it is recommended that the databaseloc be a new filesystem dedicated to the DB2 database, especially in very large clusters. When running db2sqlseutp on the SN: Not only will the password for the DB2 instance Id be prompted for and must match the one on the Management Node; but also the hostname or ip address of the Management Node as known by the Service Node must be supplied , unless the XCATDB2SERVER environment variable is set. diff --git a/xCAT-client/pods/man1/dumpxCATdb.1.pod b/xCAT-client/pods/man1/dumpxCATdb.1.pod index b9e155a08..fbdf7e392 100644 --- a/xCAT-client/pods/man1/dumpxCATdb.1.pod +++ b/xCAT-client/pods/man1/dumpxCATdb.1.pod @@ -17,7 +17,7 @@ If not using the binary dump option (-b), then the dumpxCATdb command creates .c Supports using XCAT_SKIPTABLES env variable to provide a list of skip tables. The command will never backup TEAL or ISNM tables, except isnm_config. To dump TEAL tables use the documented process for TEAL. For ISNM use tabdump, after using tabprune to get to prune unnecessary records. -If using the binary dump option for the DB2 or postgreSQL database, then the routine will use the Database provide utilites for backup of the entire database. +If using the binary dump option for the DB2 or postgreSQL database, then the routine will use the Database provide utilities for backup of the entire database. =head1 OPTIONS @@ -28,7 +28,7 @@ B<-v> Command Version. B<-V> Verbose. -B<-a> All,without this flag the eventlog and auditlog will be skipped. +B<-a> All, without this flag the eventlog and auditlog will be skipped. B<-b> This flag is only used for the DB2 or postgreSQL database. The routine will use the database backup utilities to create a binary backup of the entire database. Note to use this backup on DB2, you will have first had to modify the logging of the database and have taken an offline initial backup. Refer to the xCAT DB2 documentation for more instructions. diff --git a/xCAT-client/pods/man1/genimage.1.pod b/xCAT-client/pods/man1/genimage.1.pod index 7d2414604..bc4f09d8b 100644 --- a/xCAT-client/pods/man1/genimage.1.pod +++ b/xCAT-client/pods/man1/genimage.1.pod @@ -29,7 +29,7 @@ for stateless: B for statelite: B -Besides prompting for some paramter values, the B command takes default guesses for the parameters not specified or not defined in the I and I tables. It also assumes default answers for questions from the yum/zypper command when installing rpms into the image. Use B<--interactive> flag if you want the yum/zypper command to prompt you for the answers. +Besides prompting for some parameter values, the B command takes default guesses for the parameters not specified or not defined in the I and I tables. It also assumes default answers for questions from the yum/zypper command when installing rpms into the image. Use B<--interactive> flag if you want the yum/zypper command to prompt you for the answers. If B<--onlyinitrd> is specified, genimage only regenerates the initrd for a stateless image to be used for a diskless install. diff --git a/xCAT-client/pods/man1/geninitrd.1.pod b/xCAT-client/pods/man1/geninitrd.1.pod index fce267474..f2d4cfc7a 100644 --- a/xCAT-client/pods/man1/geninitrd.1.pod +++ b/xCAT-client/pods/man1/geninitrd.1.pod @@ -26,7 +26,7 @@ If the initrd has been rebuilt by geninitrd, when run nodeset, the I<--noupdatei should be used to skip the rebuilding of initrd to improve the performance. Three attributes of osimage object can be used to specify the Driver RPM location and Driver names -for injecting new drviers to initrd. +for injecting new drivers to initrd. B - comma separated driver names that need to be injected to the initrd. The postfix '.ko' can be ignored. The netdrivers attribute must be set to specify the new driver list. @@ -51,7 +51,7 @@ this command is used to generate the initrd from the rootimg which generated by So the 'genimage' must be run once before running the geninitrd command. Two attributes of osimage object can be used to specify the Driver RPM location and Driver names -for injecting new drviers to initrd. +for injecting new drivers to initrd. B - comma separated driver names that need to be injected to the initrd. The postfix '.ko' can be ignored. The netdrivers attribute must be set to specify the new driver list. @@ -64,7 +64,7 @@ B - comma separated driver rpm packages (full path should be sp =head1 Parameters -I specifies the name of an os image definition to be used. The specification for the image is storted in the I table and I table. +I specifies the name of an os image definition to be used. The specification for the image is stored in the I table and I table. =over 12 diff --git a/xCAT-client/pods/man1/getadapter.1.pod b/xCAT-client/pods/man1/getadapter.1.pod index 0c10af7a1..d9e43c6e9 100644 --- a/xCAT-client/pods/man1/getadapter.1.pod +++ b/xCAT-client/pods/man1/getadapter.1.pod @@ -16,8 +16,8 @@ B use genesis to collect network adapters information, so that mean B For each node within the , follows below scheme: -If the target node is scaned 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 scaned, B will use the information from nics table first. +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. diff --git a/xCAT-client/pods/man1/getmacs.1.pod b/xCAT-client/pods/man1/getmacs.1.pod index 68572339f..8bbbb8d17 100644 --- a/xCAT-client/pods/man1/getmacs.1.pod +++ b/xCAT-client/pods/man1/getmacs.1.pod @@ -23,12 +23,12 @@ B I [B<-V>| B<--verbose>] [B<-d>] [B<--arp>] [B<-i> I =head1 DESCRIPTION The getmacs command collects MAC address from a single or range of nodes. -Note that on AIX systems, the returned MAC address is not colon-seperated (for example 8ee2245cf004), while on Linux systems the MAC address is colon-seperated (for example 8e:e2:24:5c:f0:04). +Note that on AIX systems, the returned MAC address is not colon-separated (for example 8ee2245cf004), while on Linux systems the MAC address is colon-separated (for example 8e:e2:24:5c:f0:04). If no ping test performed, getmacs writes the first adapter MAC to the xCAT database. If ping test performed, getmacs will write the first successfully pinged MAC to xCAT database. For PPC (using Direct FSP Management) specific: -Note: If network adapters are physically assigned to LPARs, getmacs cannot read the MAC addresses unless perform B with option "B<-D>", since there is no HMC command to read them and getmacs has to login to open formware. And if the LPARs has never been activated before, getmacs need to be performed with the option "B<-D>" to get theirs MAC addresses. +Note: If network adapters are physically assigned to LPARs, getmacs cannot read the MAC addresses unless perform B with option "B<-D>", since there is no HMC command to read them and getmacs has to login to open firmware. And if the LPARs has never been activated before, getmacs need to be performed with the option "B<-D>" to get theirs MAC addresses. For PPC (using HMC) specific: @@ -42,7 +42,7 @@ Note: If "B<-d>" is specified, all the MAC of the blades will be displayed. If n B<--arp> -Read MAC address with ARP protocal. +Read MAC address with ARP protocol. B<-C> @@ -58,7 +58,7 @@ Perform discovery for mac address. By default, it will run ping test to test th B<-f> -Force immediate shutdown of the partition.This flag must be used with -D flag. +Force immediate shutdown of the partition. This flag must be used with -D flag. B<-F> @@ -86,7 +86,7 @@ Read MAC address when the lpar is in openfirmware state. This option mush be us B<-S> -The IP address of the machine to ping. The default is to read from xCAT databse if no B<-S> specified. +The IP address of the machine to ping. The default is to read from xCAT database if no B<-S> specified. B<-v> @@ -122,7 +122,7 @@ Output is similar to: ent U78A1.001.99203B5-P1-T6 00145eb55788 /lhea@23c00614/ethernet@23e00514 unsuccessful physical -2. To retrieve the MAC address with ARP protocal: +2. To retrieve the MAC address with ARP protocol: getmacs lpar4 --arp diff --git a/xCAT-client/pods/man1/groupfiles4dsh.1.pod b/xCAT-client/pods/man1/groupfiles4dsh.1.pod index 171b99978..7f2281eba 100644 --- a/xCAT-client/pods/man1/groupfiles4dsh.1.pod +++ b/xCAT-client/pods/man1/groupfiles4dsh.1.pod @@ -15,7 +15,7 @@ This tool will build a directory of files, one for each defined nodegroup in xCAT. The file will be named the nodegroup name and contain a list of nodes that belong to the nodegroup. The file can be used as input to the AIX dsh command. -The purpose of this tool is to allow backward compatiblity with scripts +The purpose of this tool is to allow backward compatibility with scripts that were created using the AIX or CSM dsh command Reference: man dsh. diff --git a/xCAT-client/pods/man1/imgexport.1.pod b/xCAT-client/pods/man1/imgexport.1.pod index a2376df26..0e535a57b 100644 --- a/xCAT-client/pods/man1/imgexport.1.pod +++ b/xCAT-client/pods/man1/imgexport.1.pod @@ -45,7 +45,7 @@ For statelite: where x is the name of the profile. -Any files specified by the B<-e> flag will also be exported. If B<-p> flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themsleves need to be manualy exported using B<-e> flag. +Any files specified by the B<-e> flag will also be exported. If B<-p> flag is specified, the names of the postscripts and the postbootscripts for the given node will be exported. The postscripts themselves need to be manualy exported using B<-e> flag. For statelite, the litefile table settings for the image will also be exported. The litetree and statelite tables are not exported. diff --git a/xCAT-client/pods/man1/imgimport.1.pod b/xCAT-client/pods/man1/imgimport.1.pod index f652f9d74..2757ee48a 100644 --- a/xCAT-client/pods/man1/imgimport.1.pod +++ b/xCAT-client/pods/man1/imgimport.1.pod @@ -50,7 +50,7 @@ If B<-p> flag is specified, the I table will be updated with the po If B<-f> flag is not specified, all the files will be copied to the same directories as the source. If it is specified, the old profile name x will be changed to the new and the files will be copied to the appropriate directores for the new profiles. For example, I will be copied to I and I will be copied to I. This flag is commonly used when you want to copy the image on the same xCAT mn so you can make modification on the new one. -After this command, you can run the B command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node depolyment. +After this command, you can run the B command and then start deploying the nodes. You can also choose to modify the files and run the following commands before the node deployment. For stateful: nodeset diff --git a/xCAT-client/pods/man1/liteimg.1.pod b/xCAT-client/pods/man1/liteimg.1.pod index 4a98c114a..9f8ed39ff 100644 --- a/xCAT-client/pods/man1/liteimg.1.pod +++ b/xCAT-client/pods/man1/liteimg.1.pod @@ -41,7 +41,7 @@ Note: If you make any changes to your litefile table after running liteimg then =head1 PARAMETERS -I specifies the name of a os image definition to be used. The specification for the image is storted in the I table and I table. +I specifies the name of a os image definition to be used. The specification for the image is stored in the I table and I table. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/lsflexnode.1.pod b/xCAT-client/pods/man1/lsflexnode.1.pod index bcb1a2c93..4fa436316 100644 --- a/xCAT-client/pods/man1/lsflexnode.1.pod +++ b/xCAT-client/pods/man1/lsflexnode.1.pod @@ -22,7 +22,7 @@ There are several concepts to support the HX5 multiple blades combination: B: Multiple blades which combined by a scalability card is a complex. -B: A logic concept which containing part of the B in a complex. Each partition can map to a system to install Operating System. Each partition could have 1HX5, 1HX5+1MD or 2HX5+2MD. (MD is the Memory Drawer) +B: A logic concept which containing part of the B in a complex. Each partition can map to a system to install Operating System. Each partition could have 1HX5, 1HX5+1MD or 2HX5+2MD. (MD is the Memory Drawer) B: The physical blade which installed in the slot of a chassis. It can be a HX5 or MD. diff --git a/xCAT-client/pods/man1/lskitcomp.1.pod b/xCAT-client/pods/man1/lskitcomp.1.pod index 413e7f6be..dfd6e307c 100644 --- a/xCAT-client/pods/man1/lskitcomp.1.pod +++ b/xCAT-client/pods/man1/lskitcomp.1.pod @@ -57,7 +57,7 @@ Return the output with XML tags. The data is returned as: -Each tag contains info for a group of kit compoonents belonging to the same kit. The info inside is structured as follows: +Each tag contains info for a group of kit components belonging to the same kit. The info inside is structured as follows: The sub-tag contains the kit's name. The sub-tags store info about the kit's components. diff --git a/xCAT-client/pods/man1/lsslp.1.pod b/xCAT-client/pods/man1/lsslp.1.pod index 81d5cfdef..fe1e04cac 100755 --- a/xCAT-client/pods/man1/lsslp.1.pod +++ b/xCAT-client/pods/man1/lsslp.1.pod @@ -19,13 +19,13 @@ NOTE: SLP broadcast requests will propagate only within the subnet of the networ =head1 OPTIONS -B The nodes which the user want to discover. If the user specify the noderange, lsslp will just return the nodes in the node range. Which means it will help to add the new nodes to the xCAT database without modifying the existed definitions. But the nodes' name specified in noderange should be defined in database in advance. The specified nodes' type can be frame/cec/hmc/fsp/bpa. If the it is frame or cec, lsslp will list the bpa or fsp nodes within the nodes(bap for frame, fsp for cec). Do not use noderange with the flag -s. +B The nodes which the user wants to discover. If the user specifies the noderange, lsslp will just return the nodes in the node range. Which means it will help to add the new nodes to the xCAT database without modifying the existed definitions. But the nodes' name specified in noderange should be defined in database in advance. The specified nodes' type can be frame/cec/hmc/fsp/bpa. If the it is frame or cec, lsslp will list the bpa or fsp nodes within the nodes(bap for frame, fsp for cec). Do not use noderange with the flag -s. B<-i> IP(s) the command will send out (defaults to all available adapters). B<-h> Display usage message. -B<-n> Only display and write the newly discovered hardwares. +B<-n> Only display and write the newly discovered hardware. B<-u> Do unicast to a specified IP range. Must be used with B<-s> and B<--range>. The B<-u> flag is not supported on AIX. @@ -33,16 +33,16 @@ B<--range> Specify one or more IP ranges. Must be use in unicast mode. It ac B<-r> Display Raw SLP response. -B<-C> The number of the expected responses specified by the user. When using this flag, lsslp will not return until the it has found all the nodes or time out. The default max time is 3 secondes. The user can use -T flag the specify the time they want to use. A short time will limite the time costing, while a long time will help to find all the nodes. +B<-C> The number of the expected responses specified by the user. When using this flag, lsslp will not return until the it has found all the nodes or time out. The default max time is 3 seconds. The user can use -T flag the specify the time they want to use. A short time will limit the time costing, while a long time will help to find all the nodes. -B<-T> The number in seconds to limite the time costing of lsslp. +B<-T> The number in seconds to limit the time of lsslp. B<-s> Service type interested in discovering. B<-t> Number or service-request attempts. -B<--vpdtable> Output the SLP response in vpdtable formatting. Easy for writting data to vpd table. +B<--vpdtable> Output the SLP response in vpdtable formatting. Easy for writing data to vpd table. B<-v> Command Version. @@ -52,9 +52,9 @@ B<-w> Writes output to xCAT database. B<-x> XML format. -B<-z> Stanza formated output. +B<-z> Stanza formatted output. -B<-I> Give the warning message for the nodes in database which have no SLP responses. Note that this flag noly can be used after the database migration finished successfully. +B<-I> Give the warning message for the nodes in database which have no SLP responses. Note that this flag can only be used after the database migration finished successfully. =head1 RETURN VALUE diff --git a/xCAT-client/pods/man1/lstree.1.pod b/xCAT-client/pods/man1/lstree.1.pod index 182abe37b..618151539 100644 --- a/xCAT-client/pods/man1/lstree.1.pod +++ b/xCAT-client/pods/man1/lstree.1.pod @@ -10,7 +10,7 @@ B [B<-s> | B<--servicenode>] [B<-H> | B<--hardwaremgmt>] [B<-v> | B<--vi =head1 DESCRIPTION -The B command can display the tree of service node hierarchy for the xCAT nodes which have service node defined or which are service nodes, display the tree of hardware hierarchy only for the physical objects, display the tree of VM hierarchy for the xCAT nodes which are virtual machines or which are the hosts of virtual machines. If a noderange is specified, only show the part of the hierarchy that involves those nodes. For ZVM, we only support to disply VM hierarchy. By default, lstree will show both the hardware hierarchy and the VM hierarchy for all the nodes. +The B command can display the tree of service node hierarchy for the xCAT nodes which have service node defined or which are service nodes, display the tree of hardware hierarchy only for the physical objects, display the tree of VM hierarchy for the xCAT nodes which are virtual machines or which are the hosts of virtual machines. If a noderange is specified, only show the part of the hierarchy that involves those nodes. For ZVM, we only support to display VM hierarchy. By default, lstree will show both the hardware hierarchy and the VM hierarchy for all the nodes. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/lsvm.1.pod b/xCAT-client/pods/man1/lsvm.1.pod index d588fbf42..ac802ed7a 100644 --- a/xCAT-client/pods/man1/lsvm.1.pod +++ b/xCAT-client/pods/man1/lsvm.1.pod @@ -248,7 +248,7 @@ Output is similar to: Bytes per BSR array: 4096 Available BSR array: 256 -Note: The lines listed in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class discription)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicates a physical I/O resource in a normal power machine. +Note: The lines listed in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class description)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicates a physical I/O resource in a normal power machine. 9. For DFM-managed partition on normal power machine, list out the detailed information: diff --git a/xCAT-client/pods/man1/mkdef.1.pod b/xCAT-client/pods/man1/mkdef.1.pod index 8f5cdb899..af59220b2 100644 --- a/xCAT-client/pods/man1/mkdef.1.pod +++ b/xCAT-client/pods/man1/mkdef.1.pod @@ -50,7 +50,7 @@ A set of comma delimited object types. Use the help option to get a list of val =item B<--template> I -Name of the xCAT shipped object definition template or an existing object, from which the new object definition will be created. The newly created object will inherit the attributes of the template definition unless the attribute is specified in the arguments of B command. If there are a template and an existing object with the same name I, the tempalte object takes precedence over the existing object. For the details of xCAT shipped object definition templates, refer to the manpage of B<--template> option in L. +Name of the xCAT shipped object definition template or an existing object, from which the new object definition will be created. The newly created object will inherit the attributes of the template definition unless the attribute is specified in the arguments of B command. If there are a template and an existing object with the same name I, the template object takes precedence over the existing object. For the details of xCAT shipped object definition templates, refer to the manpage of B<--template> option in L. =item B<-V|--verbose> @@ -58,7 +58,7 @@ Verbose mode. =item B<-w> I B<-w> I ... -Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. For mkdef commmand, the -w flag only makes sense for creating dynamic node group. Use the help option to get a list of valid attributes for each object type. +Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. For mkdef command, the -w flag only makes sense for creating dynamic node group. Use the help option to get a list of valid attributes for each object type. Operator descriptions: == Select nodes where the attribute value is exactly this value. diff --git a/xCAT-client/pods/man1/mkdocker.1.pod b/xCAT-client/pods/man1/mkdocker.1.pod index 1f9ee535c..dcb4eb0e4 100644 --- a/xCAT-client/pods/man1/mkdocker.1.pod +++ b/xCAT-client/pods/man1/mkdocker.1.pod @@ -82,7 +82,7 @@ Output is similar to: host01c01: Pull image ubuntu start host01c01: Pull image ubuntu done host01c01: Remove default network connection - host01c01: Connecting customzied network 'mynet0' + host01c01: Connecting customized network 'mynet0' host01c01: success 2. To create a docker instance which have dir "destdir" in docker instance bind from "srcdir" on dockerhost, and have "Tty" opened with which the docker instance can be attached after started to check the files under "destdir". @@ -92,7 +92,7 @@ Output is similar to: Output is similar to: host01c01: Remove default network connection - host01c01: Connecting customzied network 'mynet0' + host01c01: Connecting customized network 'mynet0' host01c01: success =head1 SEE ALSO diff --git a/xCAT-client/pods/man1/mkdsklsnode.1.pod b/xCAT-client/pods/man1/mkdsklsnode.1.pod index 5e0a95278..3b51f160f 100644 --- a/xCAT-client/pods/man1/mkdsklsnode.1.pod +++ b/xCAT-client/pods/man1/mkdsklsnode.1.pod @@ -19,7 +19,7 @@ This command will also create a NIM resolv_conf resource to be used when install The "domain" and "nameservers" attributes can be set in either the xCAT "network" definition used by the nodes or in the xCAT cluster "site" definition. The setting in the "network" definition will take priority. The "search" field of the resolv.conf file will contain a list all the domains -listed in the xCAT network definitions and the xCAT site definiton. +listed in the xCAT network definitions and the xCAT site definition. The "nameservers" value can either be set to a specific IP address or the "" key word. The "" key word means that the value of the "xcatmaster" attribute of the node definition will be used in the /etc/resolv.conf file. (I.e. The name of the install server as known by the node.) @@ -41,11 +41,11 @@ You can use the "-n" option of the mkdsklsnode command to create and initialize B When using the "-n" option make sure that the new osimage you specify and all the NIM resources that are used are different than what are currently being used on the nodes. The NIM resources should not be shared between the old osimage and the new osimage. -You can use the force option to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinititializing. Use this option with caution since reinitializing a node will stop the node if it is currently running. +You can use the force option to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinitializing. Use this option with caution since reinitializing a node will stop the node if it is currently running. After the mkdsklsnode command completes you can use the B command to check the NIM node definition to see if it is ready for booting the node. ("lsnim -l "). -You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the B command. Such scripts are called B. They should be copied to /install/prescripts dirctory. A table called I is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the B command are stored in the 'begin' column of I table. The scripts to be run at the end of the B command are stored in the 'end' column of I table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: I. 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 current nodeset action, in this case "diskless". If I<#xCAT setting:MAX_INSTANCE=number> is specified in the script, the script will get invoked for each node in parallel, but no more than I of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes. +You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the B command. Such scripts are called B. They should be copied to /install/prescripts directory. A table called I is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the B command are stored in the 'begin' column of I table. The scripts to be run at the end of the B command are stored in the 'end' column of I table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: I. 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, in this case "diskless". If I<#xCAT setting:MAX_INSTANCE=number> is specified in the script, the script will get invoked for each node in parallel, but no more than I of instances will be invoked at a time. If it is not specified, the script will be invoked once for all the nodes. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/mknimimage.1.pod b/xCAT-client/pods/man1/mknimimage.1.pod index 78dc2b00e..700ccdc43 100644 --- a/xCAT-client/pods/man1/mknimimage.1.pod +++ b/xCAT-client/pods/man1/mknimimage.1.pod @@ -24,7 +24,7 @@ B When creating a diskless osimage definition you also have the option of automatically updating the NIM SPOT resource. You can have additional software installed or you can have configuration files added or updated. To have software installed you must provide either the names of NIM installp_bundle resources or fileset names on the command line using the "attr=val" option. You may also supply the installp flags, RPM flags, emgr flags to use when installing the software. -To have configuration files updated you must provide the full path name of a "synclists" file which contains the the list of actual files to update. The xCAT osimage definition that is created will contain the installp_bundle, otherpkgs, and synclists files that are provided on the command line. +To have configuration files updated you must provide the full path name of a "synclists" file which contains the list of actual files to update. The xCAT osimage definition that is created will contain the installp_bundle, otherpkgs, and synclists files that are provided on the command line. B @@ -50,7 +50,7 @@ You can use the "-i" and "-p" options to copy an existing diskless osimage. To - any other resources (or attributes) included in the original osimage will be included in the new osimage definition. -- if the "-p" option is specified then the original NIM lpp_source resource will be copied to a new location and redfined to NIM. (The default would be to use the original lpp_source - to save file system space.) +- if the "-p" option is specified then the original NIM lpp_source resource will be copied to a new location and redefined to NIM. (The default would be to use the original lpp_source - to save file system space.) B @@ -67,7 +67,7 @@ To list a NIM resource definition use the AIX B command ("lsnim -l command ("nim -o check "). -To remove specific NIM resource definitons use the AIX B command. ("nim -o remove "). +To remove specific NIM resource definitions use the AIX B command. ("nim -o remove "). =head1 OPTIONS @@ -187,7 +187,7 @@ Value Specifies the security method required for NFS access. =back -Note that you may specify multiple "script", "otherpkgs", and "installp_bundle" resources by using a comma seperated list. (ex. "script=ascript,bscript"). RPM names may be included in the "otherpkgs" list by using a "R:" prefix(ex. "R:whatever.rpm"). epkg (AIX interim fix package) file names may be included in the "otherpkgs" using the 'E:' prefix. (ex. "otherpkgs=E:IZ38930TL0.120304.epkg.Z"). +Note that you may specify multiple "script", "otherpkgs", and "installp_bundle" resources by using a comma separated list. (ex. "script=ascript,bscript"). RPM names may be included in the "otherpkgs" list by using a "R:" prefix(ex. "R:whatever.rpm"). epkg (AIX interim fix package) file names may be included in the "otherpkgs" using the 'E:' prefix. (ex. "otherpkgs=E:IZ38930TL0.120304.epkg.Z"). =item B<-b> I @@ -195,7 +195,7 @@ Used to specify the path name of a mksysb file to use when defining a NIM mksysb =item B<-c|--completeosimage> -Complete the creation of the osimage definition passed in on the command line. This option will use any additonal values passed in on the command line and/or it will attempt to create required resources in order to complete the definition of the xCAT osimage. For example, if the osimage definition is missing a spot or shared_root resource the command will create those resources and add them to the osimage definition. +Complete the creation of the osimage definition passed in on the command line. This option will use any additional values passed in on the command line and/or it will attempt to create required resources in order to complete the definition of the xCAT osimage. For example, if the osimage definition is missing a spot or shared_root resource the command will create those resources and add them to the osimage definition. =item B<-f|--force> @@ -333,7 +333,7 @@ The xCAT osimage definition created by this command will include the "otherpkgs" mknimimage -u 61dskls installp_bundle=bndres1,bndres2 installp_flags="-agcQX" -Note that when "installp_bundle", "otherpkgs", or "synclists" values are specified with the "-u" option then the xCAT osimage definiton is not used or updated. +Note that when "installp_bundle", "otherpkgs", or "synclists" values are specified with the "-u" option then the xCAT osimage definition is not used or updated. 13) Update an existing image to support NFSv4. Also specify verbose messages. diff --git a/xCAT-client/pods/man1/mkvm.1.pod b/xCAT-client/pods/man1/mkvm.1.pod index 700521841..fd98f4525 100644 --- a/xCAT-client/pods/man1/mkvm.1.pod +++ b/xCAT-client/pods/man1/mkvm.1.pod @@ -88,7 +88,7 @@ Request to create a new full system partition for each CEC. =item B I B I B I B I B I B I [B<--vios>] -To specify the parameters which are used to create a partition. The I, I are necessay, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to L for more information about 'drc_index' for I. +To specify the parameters which are used to create a partition. The I, I are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to L for more information about 'drc_index' for I. The option I is used to specify the partition that will be created is a VIOS partition. If specified, the value for I shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for I, all the physical slot of the power machine will be asigned to VIOS partition. If not specified, it shall be in form of I to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition. @@ -241,7 +241,7 @@ First, define a node object: mkdef -t node -o lpar1 mgt=fsp cons=fsp nodetype=ppc,osi id=1 hcp=cec parent=cec hwtype=lpar groups=lpar,all -Then, create the partion on the specified cec. +Then, create the partition on the specified cec. mkvm lpar1 --full @@ -321,7 +321,7 @@ The output is similar to: mkvm viosnode vmcpus=1/4/16 vmmemory=1G/4G/32G vmphyslots=0x21010201,0x21010200 vmnics=vlan1 vmstorage=5 --vios -The resouces for the node is similar to: +The resources for the node is similar to: viosnode: Lpar Processor Info: Curr Processor Min: 1. diff --git a/xCAT-client/pods/man1/monadd.1.pod b/xCAT-client/pods/man1/monadd.1.pod index 1e587afdd..1ad4bd093 100644 --- a/xCAT-client/pods/man1/monadd.1.pod +++ b/xCAT-client/pods/man1/monadd.1.pod @@ -18,9 +18,9 @@ This command is used to register a monitoring plug-in module to monitor the xCAT =head1 Parameters -I is the name of the monitoring plug-in module. For example, if the the I is called I, then the actual file name that the xcatd looks for is I. Use I command to list all the monitoring plug-in modules that can be used. +I is the name of the monitoring plug-in module. For example, if the I is called I, then the actual file name that the xcatd looks for is I. Use I command to list all the monitoring plug-in modules that can be used. -I is the monitoring plug-in specific settings. It is used to customize the behavior of the plug-in or configure the 3rd party software. Format: I<-s key-value -s key=value ...> Note that the square brackets are needed here. Use I command to look for the possbile setting keys for a plug-in module. +I is the monitoring plug-in specific settings. It is used to customize the behavior of the plug-in or configure the 3rd party software. Format: I<-s key-value -s key=value ...> Note that the square brackets are needed here. Use I command to look for the possible setting keys for a plug-in module. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/moncfg.1.pod b/xCAT-client/pods/man1/moncfg.1.pod index a1fc5a20c..47a3bba3a 100644 --- a/xCAT-client/pods/man1/moncfg.1.pod +++ b/xCAT-client/pods/man1/moncfg.1.pod @@ -15,12 +15,12 @@ B I I<[noderange]> B<[-r|--remote]> =head1 DESCRIPTION -This command is used to configure a 3rd party monitoring software to monitor the xCAT cluster. For example, it modifies the configration file for the monitoring software so that the nodes can be included in the monitoring domain. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the I<-r> option is specified, though the configuration of the nodes is usually performed during the node deployment stage. +This command is used to configure a 3rd party monitoring software to monitor the xCAT cluster. For example, it modifies the configuration file for the monitoring software so that the nodes can be included in the monitoring domain. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the I<-r> option is specified, though the configuration of the nodes is usually performed during the node deployment stage. =head1 Parameters -I is the name of the monitoring plug-in module. For example, if the the I is called I, then the actual file name that the xcatd looks for is I. Use I command to list all the monitoring plug-in modules that can be used. +I is the name of the monitoring plug-in module. For example, if the I is called I, then the actual file name that the xcatd looks for is I. Use I command to list all the monitoring plug-in modules that can be used. I specifies the nodes to be monitored. If omitted, all nodes will be monitored. diff --git a/xCAT-client/pods/man1/mondecfg.1.pod b/xCAT-client/pods/man1/mondecfg.1.pod index 1884ab1b1..6f7ccc753 100644 --- a/xCAT-client/pods/man1/mondecfg.1.pod +++ b/xCAT-client/pods/man1/mondecfg.1.pod @@ -15,7 +15,7 @@ B I I<[noderange]> B<[-r|--remote]> =head1 DESCRIPTION -This command is used to deconfigure a 3rd party monitoring software from monitoring the xCAT cluster. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the I<-r> option is specified. The deconfigration operation will remove the nodes from the 3rd party software's monitoring domain. +This command is used to deconfigure a 3rd party monitoring software from monitoring the xCAT cluster. The operation is performed on the management node and the service nodes of the given nodes. The operation will also be performed on the nodes if the I<-r> option is specified. The deconfiguration operation will remove the nodes from the 3rd party software's monitoring domain. =head1 PARAMETERS diff --git a/xCAT-client/pods/man1/monls.1.pod b/xCAT-client/pods/man1/monls.1.pod index 55cd86498..c9130a98e 100644 --- a/xCAT-client/pods/man1/monls.1.pod +++ b/xCAT-client/pods/man1/monls.1.pod @@ -15,7 +15,7 @@ B =head1 DESCRIPTION -This command is used to list the status, desctiption, the configuration scripts and the settings of one or all of the monitoring plug-in modules. +This command is used to list the status, description, the configuration scripts and the settings of one or all of the monitoring plug-in modules. =head1 Parameters @@ -26,9 +26,9 @@ I is the name of the monitoring plug-in module. =head1 OPTIONS -B<-a | --all> Searches the I directory and reports all the monitoring plug-in modules. If nothing is specified, the list is read from the I tabel. +B<-a | --all> Searches the I directory and reports all the monitoring plug-in modules. If nothing is specified, the list is read from the I table. -B<-d | --description> Display the description of the plug-in modules. The description ususally contains the possible settings. +B<-d | --description> Display the description of the plug-in modules. The description usually contains the possible settings. B<-h | --help> Display usage message. @@ -64,7 +64,7 @@ The output looks like this: nagiosmon not-monitored -3. To list the status and the desciption for I module, enter: +3. To list the status and the description for I module, enter: monls snmpmon -d diff --git a/xCAT-client/pods/man1/monshow.1.pod b/xCAT-client/pods/man1/monshow.1.pod index 22d4309f9..c3aa85385 100755 --- a/xCAT-client/pods/man1/monshow.1.pod +++ b/xCAT-client/pods/man1/monshow.1.pod @@ -36,7 +36,7 @@ B<-t> specifies a range of time for the data, The default is last 60 minutes. Fo B<-a> specifies a comma-separated list of attributes or metrics names. The default is all. -B<-w> specify one or multiple selection string that can be used to select events. The operators ==, !=, =,!,>,<,>=,<= are available. Wildcards % and _ are supported in the pattern string. % allows you to match any string of any length(including zero length) and _ allows you to match on a single character. The valid attributes are eventtype, monitor, monnode, application, component, id, serverity, message, rawdata, comments. Valid severity are: Informational, Warning, Critical. +B<-w> specify one or multiple selection string that can be used to select events. The operators ==, !=, =,!,>,<,>=,<= are available. Wildcards % and _ are supported in the pattern string. % allows you to match any string of any length(including zero length) and _ allows you to match on a single character. The valid attributes are eventtype, monitor, monnode, application, component, id, severity, message, rawdata, comments. Valid severity are: Informational, Warning, Critical. Operator descriptions: diff --git a/xCAT-client/pods/man1/monstart.1.pod b/xCAT-client/pods/man1/monstart.1.pod index 624fad4fa..092d6a399 100644 --- a/xCAT-client/pods/man1/monstart.1.pod +++ b/xCAT-client/pods/man1/monstart.1.pod @@ -18,7 +18,7 @@ This command is used to start a 3rd party software, (for example start the daemo =head1 PARAMETERS -I is the name of the monitoring plug-in module. For example, if the the I is called I, then the actual file name that the xcatd looks for is I. Use B command to list all the monitoring plug-in modules that can be used. +I is the name of the monitoring plug-in module. For example, if the I is called I, then the actual file name that the xcatd looks for is I. Use B command to list all the monitoring plug-in modules that can be used. I is the nodes to be monitored. If omitted, all nodes will be monitored. diff --git a/xCAT-client/pods/man1/nimnodecust.1.pod b/xCAT-client/pods/man1/nimnodecust.1.pod index ea5eaa711..93cba2a36 100644 --- a/xCAT-client/pods/man1/nimnodecust.1.pod +++ b/xCAT-client/pods/man1/nimnodecust.1.pod @@ -30,9 +30,9 @@ To create a NIM installp_bundle definition you can use the "nim -o define" opera nim -o define -t installp_bundle -a server=master -a location=/install/nim/mypkgs.bnd mypackages -See the AIX documantation for more information on using installp_bundle files. +See the AIX documentation for more information on using installp_bundle files. -The xCAT nimnodecust command will automatically handle the distribution of the packages to AIX service nodes when using an xCAT hierachical environment. +The xCAT nimnodecust command will automatically handle the distribution of the packages to AIX service nodes when using an xCAT hierarchical environment. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/nimnodeset.1.pod b/xCAT-client/pods/man1/nimnodeset.1.pod index 2e9b9835f..04ecd9587 100644 --- a/xCAT-client/pods/man1/nimnodeset.1.pod +++ b/xCAT-client/pods/man1/nimnodeset.1.pod @@ -14,7 +14,7 @@ This xCAT command can be used to initialize AIX/NIM standalone machines. Once th If you are using xCAT service nodes the B command will automatically determine the correct server(s) for the node and do the initialization on that server(s). -The osimage_name is the name of an xCAT osimage definition that contains the list of NIM resources to use when initializing the nodes. If the osimage_name is not provided on the command line the code checks the node definition for the value of the "provmethod" attribute (which is the name of an osimage definition). If the osimage_image is provided on the command line then the code will also set the "provmethod" attribute of the node definiions. +The osimage_name is the name of an xCAT osimage definition that contains the list of NIM resources to use when initializing the nodes. If the osimage_name is not provided on the command line the code checks the node definition for the value of the "provmethod" attribute (which is the name of an osimage definition). If the osimage_image is provided on the command line then the code will also set the "provmethod" attribute of the node definitions. This command will also create a NIM resolv_conf resource to be used when installing the node. If a resolv_conf resource is not already included in the xCAT osimage definition and if the "domain" and "nameservers" values are set then a new NIM resolv_conf resource will be created and allocated to the nodes. @@ -22,7 +22,7 @@ NIM resolv_conf resource will be created and allocated to the nodes. The "domain" and "nameservers" attributes can be set in either the xCAT "network" definition used by the nodes or in the xCAT cluster "site" definition. The setting in the "network" definition will take priority. The "search" field of the resolv.conf file will contain a list all the domains -listed in the xCAT network definitions and the xCAT site definiton. +listed in the xCAT network definitions and the xCAT site definition. The "nameservers" value can either be set to a specific IP address or the "" key word. The "" key word means that the value of the "xcatmaster" attribute of the node definition will be used in the /etc/resolv.conf file. (I.e. The name of the install server as known by the node.) @@ -35,13 +35,13 @@ will be created. You can specify additional attributes and values using the "attr=val" command line option. This information will be passed on to the underlying call to the NIM "nim -o bos_inst" command. See the NIM documentation for information on valid command line options for the nim command. The "attr" must correspond to a NIM attribute supported for the NIM "bos_inst" operation. Information provided by the "attr=val" option will take precedence over the information provided in the osimage definition. -The force option can be used to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinititializing. +The force option can be used to reinitialize a node if it already has resources allocated or it is in the wrong NIM state. This option will reset the NIM node and deallocate resources before reinitializing. This command will also create a NIM script resource to enable the xCAT support for user-provided customization scripts. After the B command completes you can use the B command to check the NIM node definition to see if it is ready for booting the node. ("lsnim -l "). -You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the B command. Such scripts are called B. They should be copied to /install/prescripts dirctory. A table called I is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the B command are stored in the 'begin' column of I table. The scripts to be run at the end of the B command are stored in the 'end' column of I table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: I. 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, in this case "standalone". If I<#xCAT setting:MAX_INSTANCE=number> is specified in the script, the script will get invoked for each node in parallel, but no more than I of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes. +You can supply your own scripts to be run on the management node or on the service node (if their is hierarchy) for a node during the B command. Such scripts are called B. They should be copied to /install/prescripts directory. A table called I is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the B command are stored in the 'begin' column of I table. The scripts to be run at the end of the B command are stored in the 'end' column of I table. Run 'tabdump prescripts -d' command for details. An example for the 'begin' or the 'end' column is: I. 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, in this case "standalone". If I<#xCAT setting:MAX_INSTANCE=number> is specified in the script, the script will get invoked for each node in parallel, but no more than I of instances will be invoked at at a time. If it is not specified, the script will be invoked once for all the nodes. =head1 OPTIONS @@ -50,7 +50,7 @@ You can supply your own scripts to be run on the management node or on the serv =item I Specifies one or more "attribute equals value" pairs, separated by spaces. Attr= -val pairs must be specified last on the command line. These are used to specify additional values that can be passed to the underlying NIM commands, ("nim -o bos_inst ..."). See the NIM documentation for valid "nim" command line options. Note that you may specify multiple "script" and "installp_bundle" values by using a comma seperated list. (ex. "script=ascript,bscript"). +val pairs must be specified last on the command line. These are used to specify additional values that can be passed to the underlying NIM commands, ("nim -o bos_inst ..."). See the NIM documentation for valid "nim" command line options. Note that you may specify multiple "script" and "installp_bundle" values by using a comma separated list. (ex. "script=ascript,bscript"). =item B<-b|--backupSN> @@ -70,8 +70,7 @@ The name of an existing xCAT osimage definition. =item B<-l|--location> -The directory location to use when creating new NIM resolv_conf resources. The d -efault location is /install/nim. +The directory location to use when creating new NIM resolv_conf resources. The default location is /install/nim. =item B<-p|--primarySN> diff --git a/xCAT-client/pods/man1/nodeaddunmged.1.pod b/xCAT-client/pods/man1/nodeaddunmged.1.pod index 60258c7a0..675daa669 100644 --- a/xCAT-client/pods/man1/nodeaddunmged.1.pod +++ b/xCAT-client/pods/man1/nodeaddunmged.1.pod @@ -34,7 +34,7 @@ Sets the IP address of the unmanaged node, where I is the IP address 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/nodechmac.1.pod b/xCAT-client/pods/man1/nodechmac.1.pod index 593b20a51..0bf9830f8 100644 --- a/xCAT-client/pods/man1/nodechmac.1.pod +++ b/xCAT-client/pods/man1/nodechmac.1.pod @@ -36,7 +36,7 @@ Sets the new MAC address for the NIC used by the provisioning node, where is 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/nodediscoverls.1.pod b/xCAT-client/pods/man1/nodediscoverls.1.pod index 5b6af9bf6..bde7b37e0 100644 --- a/xCAT-client/pods/man1/nodediscoverls.1.pod +++ b/xCAT-client/pods/man1/nodediscoverls.1.pod @@ -76,7 +76,7 @@ Command version. 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/nodediscoverstart.1.pod b/xCAT-client/pods/man1/nodediscoverstart.1.pod index 165a68d5a..4e3b98d37 100755 --- a/xCAT-client/pods/man1/nodediscoverstart.1.pod +++ b/xCAT-client/pods/man1/nodediscoverstart.1.pod @@ -52,7 +52,7 @@ When the nodes are discovered, PCM updates the affected configuration files on t When you power on the nodes, they PXE boot and DHCP/TFTP/HTTP on the management node give each node the xCAT genesis boot image, which inventories the node hardware and sends data to the management node. There, either the sequential discovery process or the -profile discovery process assigns node attributes and defines the node in the the database. +profile discovery process assigns node attributes and defines the node in the database. =head1 OPTIONS @@ -99,7 +99,7 @@ Sets the node groups that the discovered nodes should be put in for either the S Sets the rack name where the node is located for either the Sequential Discovery or Profile Discovery methods. -=item BI +=item BI Sets the chassis name that the Blade server or PureFlex blade is located in, for either the Sequential Discovery or Profile Discovery methods. This option is used for the Blade server and PureFlex system only. You cannot specify this option with the rack option. @@ -146,7 +146,7 @@ Command Version. 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/nodediscoverstatus.1.pod b/xCAT-client/pods/man1/nodediscoverstatus.1.pod index 2e261fdef..f65597e40 100644 --- a/xCAT-client/pods/man1/nodediscoverstatus.1.pod +++ b/xCAT-client/pods/man1/nodediscoverstatus.1.pod @@ -25,7 +25,7 @@ Command Version. 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/nodediscoverstop.1.pod b/xCAT-client/pods/man1/nodediscoverstop.1.pod index 8cde9a0cb..b8ce5b563 100644 --- a/xCAT-client/pods/man1/nodediscoverstop.1.pod +++ b/xCAT-client/pods/man1/nodediscoverstop.1.pod @@ -26,7 +26,7 @@ Command Version. 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/nodeimport.1.pod b/xCAT-client/pods/man1/nodeimport.1.pod index 30087957b..2c3b670f7 100644 --- a/xCAT-client/pods/man1/nodeimport.1.pod +++ b/xCAT-client/pods/man1/nodeimport.1.pod @@ -10,7 +10,7 @@ B B I B I command creates nodes by importing a hostinfo file which is following stanza format. In this hostinfo file, we can define node's hostname, ip, mac, switch name, switch port and host location infomation like rack, chassis, start unit, server height...etc +The B command creates nodes by importing a hostinfo file which is following stanza format. In this hostinfo file, we can define node's hostname, ip, mac, switch name, switch port and host location information like rack, chassis, start unit, server height...etc After nodes imported, the configuration files related with these nodes will be updated automatically. For example: /etc/hosts, dns configuration, dhcp configuration. And the kits node plugins will also be triggered automatically to update kit related configuration/services. @@ -56,9 +56,9 @@ Sets the node groups that the imported node belongs to, where is a 0 The command completed successfully. -1 An error has occured while validating parameters. +1 An error has occurred while validating parameters. -2 An error has occured while parsing hostinfo file. +2 An error has occurred while parsing hostinfo file. =head1 EXAMPLES @@ -106,7 +106,7 @@ To import nodes using a profile, follow the following steps: # hostinfo end. - Another example of a node infomation file, a PureFlex X/P node defined: + Another example of a node information file, a PureFlex X/P node defined: # hostinfo begin # To define a PureFlex P/X node, chassis and slot id must be specified. # The chassis must be a PureFlex chassis. @@ -153,7 +153,7 @@ Description: The name of the node, where __hostname__ is automatically generated B> This is a mandatory item. -Description: Specify the MAC address for the NIC used by the provisionging node, where is the NICs MAC address. +Description: Specify the MAC address for the NIC used by the provisioning node, where is the NICs MAC address. B> This is a mandatory item, when define switch, switchport and node nic name relationship. @@ -183,9 +183,9 @@ B> This is an optional item. Description: node location info. Specify the rack name which this node will be placed into. If not specify this item, there will be no node location info set for this node. this item must be specified together with height + unit. -B> This is an optional item. +B> This is an optional item. -Description: node location info, for blade(or PureFlex) only. Specify the chasiss name which this blade will be placed into. this item can not be specified together with rack. +Description: node location info, for blade(or PureFlex) only. Specify the chassis name which this blade will be placed into. this item can not be specified together with rack. B> This is an optional item. diff --git a/xCAT-client/pods/man1/nodels.1.pod b/xCAT-client/pods/man1/nodels.1.pod index b976091bf..e3e76cd58 100644 --- a/xCAT-client/pods/man1/nodels.1.pod +++ b/xCAT-client/pods/man1/nodels.1.pod @@ -75,7 +75,7 @@ Force display of table name and column name context for each result =item B<-b|--blame> -For values inherited from groups, display which groups provided the inheritence +For values inherited from groups, display which groups provided the inheritance =item B<-S> diff --git a/xCAT-client/pods/man1/nodepurge.1.pod b/xCAT-client/pods/man1/nodepurge.1.pod index 73b6a94ba..714f164f2 100644 --- a/xCAT-client/pods/man1/nodepurge.1.pod +++ b/xCAT-client/pods/man1/nodepurge.1.pod @@ -32,7 +32,7 @@ The nodes to be removed. 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/noderefresh.1.pod b/xCAT-client/pods/man1/noderefresh.1.pod index b25693c71..cafd50986 100644 --- a/xCAT-client/pods/man1/noderefresh.1.pod +++ b/xCAT-client/pods/man1/noderefresh.1.pod @@ -30,7 +30,7 @@ The nodes to be updated. 0 The command completed successfully. -1 An error has occured. +1 An error has occurred. =head1 EXAMPLES diff --git a/xCAT-client/pods/man1/nodestat.1.pod b/xCAT-client/pods/man1/nodestat.1.pod index 42a0dc5f0..fd964a3c9 100644 --- a/xCAT-client/pods/man1/nodestat.1.pod +++ b/xCAT-client/pods/man1/nodestat.1.pod @@ -41,7 +41,7 @@ Keywords to use: port -- the application daemon port number, if not specified, use internal list, then /etc/services. group -- the name of a node group that needs to get the application status from. If not specified, assume all the nodes in the nodelist table. To specify more than one groups, use group=a,group=b format. cmd -- the command that will be run locally on mn or sn. - lcmd -- the command that will be run the the mn only. + lcmd -- the command that will be run the mn only. dcmd -- the command that will be run distributed on the nodes using xdsh .... For commands specified by 'cmd' and 'lcmd', the input of is a list of comma separated node names, the output must be in the following format: @@ -63,7 +63,7 @@ Uses fping instead of nmap even if nmap is available. If you seem to be having =item B<-m>|B<--usemon> -Uses the settings from the B talbe to determine a list of applications that need to get status for. +Uses the settings from the B table to determine a list of applications that need to get status for. =item B<-p>|B<--powerstat> diff --git a/xCAT-client/pods/man1/rflash.1.pod b/xCAT-client/pods/man1/rflash.1.pod index de1f11e60..091eec11a 100644 --- a/xCAT-client/pods/man1/rflash.1.pod +++ b/xCAT-client/pods/man1/rflash.1.pod @@ -40,7 +40,7 @@ The command will update firmware for NeXtScale FPC when given an FPC node and th =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 comamnd. +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. B This command may take considerable time to complete, depending on the number of systems being updated and the workload on the target HMC. In particular, power subsystem updates may take an hour or more if there are many attached managed systems. @@ -50,7 +50,7 @@ The flash chip of a POWER5 and POWER6 managed system or power subsystem stores f The B<--commit> flag is used to write the contents of the temporary side of the flash to the permanent side. This flag should be used after updating code and verifying correct system operation. The B<--recover> flag is used to write the permanent side of the flash chip back to the temporary side. This flag should be used to recover from a corrupt flash operation, so that the previously running code can be restored. -BWhen the B<--commit> or B<--recover> two flags is used, the noderange B be BPA. It only B be CEC or LPAR ,and will take effect for B managed systems and power subsystems. +BWhen the B<--commit> or B<--recover> two flags is used, the noderange B be BPA. It only B be CEC or LPAR, and will take effect for B managed systems and power subsystems. xCAT recommends that you shutdown your Operating System images and power off your managed systems before applying disruptive updates to managed systems or power subsystems. @@ -68,7 +68,7 @@ The B option will load the new firmware into the T (temp) side, but wi In Direct FSP/BPA Management, there is B<-d> I option. The default value is /tmp. When doing firmware update, B will put some related data from rpm packages in directory, so the execution of B will require available disk space in for the command to properly execute: -For one GFW rpm package and one power code rpm package , if the GFW rpm package size is gfw_rpmsize, and the Power code rpm package size is power_rpmsize, it requires that the available disk space should be more than: 1.5*gfw_rpmsize + 1.5*power_rpmsize +For one GFW rpm package and one power code rpm package, if the GFW rpm package size is gfw_rpmsize, and the Power code rpm package size is power_rpmsize, it requires that the available disk space should be more than: 1.5*gfw_rpmsize + 1.5*power_rpmsize For Power 775, the B command takes effect on the primary and secondary FSPs or BPAs almost in parallel. @@ -76,7 +76,7 @@ For more details about the Firmware Update using Direct FSP/BPA Management, refe =head2 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 imformation 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 +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: @@ -92,7 +92,7 @@ Writes the command's usage statement to standard output. =item B<-c|--check> -Chech the firmware version of BMC and HPM file. +Check the firmware version of BMC and HPM file. =item B<-p> I @@ -139,12 +139,12 @@ Verbose output. =over 4 =item 1. -To update only the power subsystem attached to a single HMC-attached pSeries CEC(cec_name), and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: +To update only the power subsystem attached to a single HMC-attached pSeries CEC(cec_name), and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: rflash cec_name -p /tmp/fw --activate disruptive =item 2. -To update only the power subsystem attached to a single HMC-attached pSeries node, and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: +To update only the power subsystem attached to a single HMC-attached pSeries node, and recycle the power subsystem and all attached managed systems when the update is complete, and the Microcode update package and associated XML file are in /tmp/fw, enter: rflash bpa_name -p /tmp/fw --activate disruptive @@ -154,7 +154,7 @@ To commit a firmware update to permanent flash for both managed system and the r rflash cec_name --commit =item 4. -To update the firmware on a NeXtScale FPC specify the FPC node name and the HTTP location of the file including the xCAT MN IP address and the directory on the xCAT MN containing the firmware as follows: +To update the firmware on a NeXtScale FPC specify the FPC node name and the HTTP location of the file including the xCAT MN IP address and the directory on the xCAT MN containing the firmware as follows: rflash fpc01 http://10.1.147.169/install/firmware/fhet17a/ibm_fw_fpc_fhet17a-2.02_anyos_noarch.rom diff --git a/xCAT-client/pods/man1/rinv.1.pod b/xCAT-client/pods/man1/rinv.1.pod index e0799d15b..30fab0f2c 100644 --- a/xCAT-client/pods/man1/rinv.1.pod +++ b/xCAT-client/pods/man1/rinv.1.pod @@ -12,11 +12,11 @@ B I {B|B|B|B|B|B|B I {B|B|B|B|B|B|B|B|B} +B I [B|B|B|B|B|B|B|B|B] =head2 OpenPOWER (using openbmc) server specific: -B I {B|B|B|B|B|B|B|B|B|B|B} +B I [B|B|B|B|B|B|B|B|B|B|B] =head2 PPC (with HMC) specific: @@ -69,10 +69,10 @@ B I [B<--zfcppoolnames>] =head1 B -B retrieves hardware configuration information from the on-board +B retrieves hardware configuration information from the on-board Service Processor for a single or range of nodes and groups. -Calling B for VMware will display the UUID/GUID, nuumber of CPUs, amount of memory, the MAC address and a list of Hard disks. The output for each Hard disk includes the label, size and backing file location. +Calling B for VMware will display the UUID/GUID, number of CPUs, amount of memory, the MAC address and a list of Hard disks. The output for each Hard disk includes the label, size and backing file location. =head1 B @@ -88,7 +88,7 @@ List all buses for each I/O slot. =item B -Retrieves number of processors, speed, total memory, and DIMM +Retrieves number of processors, speed, total memory, and DIMM locations. =item B diff --git a/xCAT-client/pods/man1/rmdocker.1.pod b/xCAT-client/pods/man1/rmdocker.1.pod index efe339027..d02992870 100644 --- a/xCAT-client/pods/man1/rmdocker.1.pod +++ b/xCAT-client/pods/man1/rmdocker.1.pod @@ -29,7 +29,7 @@ Force to removal of a running container or failed to disconnect customized netwo =head1 EXAMPLES rmdocker host01c01 - host01c01: Disconnect customzied network 'mynet0' done + host01c01: Disconnect customized network 'mynet0' done host01c01: success =head1 SEE ALSO diff --git a/xCAT-client/pods/man1/rmdsklsnode.1.pod b/xCAT-client/pods/man1/rmdsklsnode.1.pod index 9500d2290..f7ed75e27 100644 --- a/xCAT-client/pods/man1/rmdsklsnode.1.pod +++ b/xCAT-client/pods/man1/rmdsklsnode.1.pod @@ -20,11 +20,11 @@ If the node you are trying to remove is currently running the B com B -If you used the "-n" option when you created the NIM client definitions with the B command then the NIM client machine names would be a combination of the xCAT node name and the osimage name used to initialize the NIM machine. To remove these definitions you must provide the name of the osimage that was used using the "-i" option. +If you used the "-n" option when you created the NIM client definitions with the B command then the NIM client machine names would be a combination of the xCAT node name and the osimage name used to initialize the NIM machine. To remove these definitions, you must provide the name of the osimage that was used using the "-i" option. -In most cases you would most likely want to remove the old client definitions without disturbing the nodes that you just booted with the new alternate client definition. The B option can be used to remove the old alternate client defintions without stopping the running node. +In most cases you would most likely want to remove the old client definitions without disturbing the nodes that you just booted with the new alternate client definition. The B option can be used to remove the old alternate client definitions without stopping the running node. -However, if you have NIM dump resources assign to your nodes be aware that when the old NIM alternate client definitions are removed it will leave the nodes unable to produce a system dump. This is a current limitation in the NIM support for alternate client definitions. For this reason it is recommended that you wait to do this cleanup until right before you do your next upgrade. +However, if you have NIM dump resources assign to your nodes be aware that when the old NIM alternate client definitions are removed it will leave the nodes unable to produce a system dump. This is a current limitation in the NIM support for alternate client definitions. For this reason, it is recommended that you wait to do this cleanup until right before you do your next upgrade. =head1 OPTIONS @@ -36,8 +36,7 @@ Use the force option to stop and remove running nodes. This handles the situatio =item B<-b |--backupSN> -When using backup service nodes only update the backup. The default is to updat -e both the primary and backup service nodes. +When using backup service nodes only update the backup. The default is to update both the primary and backup service nodes. =item B<-h |--help> @@ -53,8 +52,7 @@ A set of comma delimited node names and/or group names. See the "noderange" man =item B<-p|--primarySN> -When using backup service nodes only update the primary. The default is to upda -te both the primary and backup service nodes. +When using backup service nodes only update the primary. The default is to update both the primary and backup service nodes. =item B<-r|--remdef> diff --git a/xCAT-client/pods/man1/rmhwconn.1.pod b/xCAT-client/pods/man1/rmhwconn.1.pod index 86ea9a15e..d0dd7cad9 100644 --- a/xCAT-client/pods/man1/rmhwconn.1.pod +++ b/xCAT-client/pods/man1/rmhwconn.1.pod @@ -24,7 +24,7 @@ B B<-s> For PPC (with HMC) specific: -This command is used to disconnect CEC and Frame nodes from HMC nodes, according to the connection information defined in ppc talbe in xCAT DB. +This command is used to disconnect CEC and Frame nodes from HMC nodes, according to the connection information defined in ppc table in xCAT DB. Note: If a CEC belongs to a frame with a BPA installed, this CEC cannot be disconnected individually. Instead, the whole frame should be disconnected. diff --git a/xCAT-client/pods/man1/rmigrate.1.pod b/xCAT-client/pods/man1/rmigrate.1.pod index fea02a867..2be54a94f 100644 --- a/xCAT-client/pods/man1/rmigrate.1.pod +++ b/xCAT-client/pods/man1/rmigrate.1.pod @@ -49,7 +49,7 @@ The maximum quiesce time a VM may be stopped during a relocation attempt. =head1 B B table - -Table governing VM paramaters. See L for further details. +Table governing VM parameters. See L for further details. This is used to determine the current host to migrate from. =head1 B diff --git a/xCAT-client/pods/man1/rmkitcomp.1.pod b/xCAT-client/pods/man1/rmkitcomp.1.pod index 591f0cfd7..5484300dc 100644 --- a/xCAT-client/pods/man1/rmkitcomp.1.pod +++ b/xCAT-client/pods/man1/rmkitcomp.1.pod @@ -10,7 +10,7 @@ B [B<-V>|B<--verbose>] [B<-u>|B<--uninstall>] [B<-f>|B<--force>] [B<- =head1 DESCRIPTION -The B command removes kit components from an xCAT osimage. All the kit component attribute values that are contained in the osimage will be removed, and the kit comoponent meta rpm and package rpm could be uninstalled by B<-u|--uninstall> option. +The B command removes kit components from an xCAT osimage. All the kit component attribute values that are contained in the osimage will be removed, and the kit component meta rpm and package rpm could be uninstalled by B<-u|--uninstall> option. Note: The xCAT support for Kits is only available for Linux operating systems. diff --git a/xCAT-client/pods/man1/rmvm.1.pod b/xCAT-client/pods/man1/rmvm.1.pod index 959a350d8..2dcf8cc67 100644 --- a/xCAT-client/pods/man1/rmvm.1.pod +++ b/xCAT-client/pods/man1/rmvm.1.pod @@ -37,7 +37,7 @@ B<-r> Retain the data object definitions of the nodes. B<--service> Remove the service partitions of the specified CECs. -B<-p> KVM: Purge the existence of the VM from persistant storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. PPC: Remove the specified partiton on normal power machine. +B<-p> KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. PPC: Remove the specified partition on normal power machine. B<-f> Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested. diff --git a/xCAT-client/pods/man1/rnetboot.1.pod b/xCAT-client/pods/man1/rnetboot.1.pod index 6b9fc9671..e968e9f2d 100644 --- a/xCAT-client/pods/man1/rnetboot.1.pod +++ b/xCAT-client/pods/man1/rnetboot.1.pod @@ -41,11 +41,11 @@ Note: if the "val" fields includes spaces or any other characters that will be p B<-r> -specify the number of retries that the monitoring process will perform before declare the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. +specify the number of retries that the monitoring process will perform before declaring the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. B<-t> -Specify the the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. +Specify the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. B<-V|--verbose> diff --git a/xCAT-client/pods/man1/rpower.1.pod b/xCAT-client/pods/man1/rpower.1.pod index 61e7be87c..0e38e78c8 100644 --- a/xCAT-client/pods/man1/rpower.1.pod +++ b/xCAT-client/pods/man1/rpower.1.pod @@ -14,13 +14,13 @@ B I [B|B|B|B|B|B|B I [B|B|B|B] -=head2 OpenPower BMC (using IPMI): +=head2 OpenPOWER BMC (using IPMI): B I [B|B|B|B|B|B|B] B I [B|B|B|B] -=head2 OpenPower OpenBMC: +=head2 OpenPOWER OpenBMC: B I [B|B|B|B|B|B|B] @@ -104,7 +104,7 @@ Exit Rack standby will be the default state that a rack goes into when power is =item B -Reboot the service processor. If there are primary and secondary FSPs/BPAs of one cec/frame, it will reboot them almost at the sametime. +Reboot the service processor. If there are primary and secondary FSPs/BPAs of one cec/frame, it will reboot them almost at the same time. =item B @@ -207,11 +207,11 @@ Do not use dependency table (default is to use dependency table). Valid only wit =item B<-r> I -specify the number of retries that the monitoring process will perform before declare the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. +specify the number of retries that the monitoring process will perform before declaring the failure. The default value is 3. Setting the retrycount to 0 means only monitoring the os installation progress and will not re-initiate the installation if the node status has not been changed to the expected value after timeout. This flag must be used with -m flag. =item B<-t> I -Specify the the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. +Specify the timeout, in minutes, to wait for the expectedstatus specified by -m flag. This is a required flag if the -m flag is specified. Power off, then on. diff --git a/xCAT-client/pods/man1/rspconfig.1.pod b/xCAT-client/pods/man1/rspconfig.1.pod index 900224f65..aba5fcd5a 100644 --- a/xCAT-client/pods/man1/rspconfig.1.pod +++ b/xCAT-client/pods/man1/rspconfig.1.pod @@ -416,7 +416,7 @@ Set the blade or MPA textid. When using '*', the textid used is the node name sp =item B={I} B={B} -Change the password of the userid B for CMM in Flex system cluster. The option I can be used to specify whether updating the password of BMCs that connected to the speified CMM. The value is 'y' by default which means whenever updating the password of CMM, the password of BMCs will be also updated. Note that there will be several seconds needed before this command complete. +Change the password of the userid B for CMM in Flex system cluster. The option I can be used to specify whether updating the password of BMCs that connected to the specified CMM. The value is 'y' by default which means whenever updating the password of CMM, the password of BMCs will be also updated. Note that there will be several seconds needed before this command complete. If value "*" is specified for USERID and the object node is I, the password used to access the BMC of the System X node through IPMI will be updated as the same password of the userid B of the CMM in the same cluster. diff --git a/xCAT-client/pods/man1/rvitals.1.pod b/xCAT-client/pods/man1/rvitals.1.pod index 3bce77fa8..fb246eb40 100644 --- a/xCAT-client/pods/man1/rvitals.1.pod +++ b/xCAT-client/pods/man1/rvitals.1.pod @@ -26,13 +26,17 @@ B I {B|B|B|B|B|B I {B|B|B|B|B|B|B} -=head2 OpenPOWER server specific: +=head2 OpenPOWER (IPMI) specific: -B I {B|B|B|B|B|B|B} +B I [B|B|B|B|B|B|B|B] + +=head2 OpenPOWER (OpenBMC) specific: + +B I [B|B|B|B|B|B|B] =head1 B -B retrieves hardware vital information from the on-board Service +B Retrieves hardware vital information from the on-board Service Processor for a single or range of nodes and groups. =head1 B @@ -75,6 +79,14 @@ Retrieves rack environmentals. Retrieves LEDs status. +=item B + +Retrieves chassis status. + +=item B + +Retrieves altitude related attributes. + =item B Retrieves power status. diff --git a/xCAT-client/pods/man1/sinv.1.pod b/xCAT-client/pods/man1/sinv.1.pod index 9c08ced7e..b81db7b57 100644 --- a/xCAT-client/pods/man1/sinv.1.pod +++ b/xCAT-client/pods/man1/sinv.1.pod @@ -95,7 +95,7 @@ If there is no match, and we are not over the template count, then a new template will be created from the node output. This will result in having all nodes that match a given template reported in their group at the end of the run in the output file. -If no template count is specified, 0 is the default, and all nodes will +If no template count is specified, 0 is the default, and all nodes will be compared against the first template. =item B<-s>|B<--seed> I @@ -104,7 +104,7 @@ This is the node that will be used to build the first template that is stored in template path. You can use this parameter instead of running the command yourself to build the template. -B If the template path file does not exists, and no seed node is +B If the template path file does not exist, and no seed node is supplied, the seed node automatically is one node in the noderange. @@ -126,7 +126,7 @@ template (except for xdshcoll header and comments). If not in exactmatch mode, there can exist more lines in the xdsh return from the nodes. For example, if running a "rpm -qa | grep xCAT" command, without exactmatch -set, if the node containes more xCAT rpms that listed in the template, +set, if the node contains more xCAT rpms that listed in the template, it would be considered a match, as long as all rpms listed in the template were on the node. With exactmatch set, the output must be identical to the template. @@ -137,7 +137,7 @@ Specify a user-defined device type that references the location of relevant device configuration file. The devicetype value must correspond to a valid device configuration file. xCAT ships some default configuration files -for Ethernet switches and and IB switches under +for Ethernet switches and IB switches under I directory. If you want to overwrite any of the configuration files, copy them to I directory and cutomize. diff --git a/xCAT-client/pods/man1/snmove.1.pod b/xCAT-client/pods/man1/snmove.1.pod index 477ba7ea6..d1e4fad4d 100644 --- a/xCAT-client/pods/man1/snmove.1.pod +++ b/xCAT-client/pods/man1/snmove.1.pod @@ -40,7 +40,7 @@ node is second. The B attribute must be set to the hostname of the primary service node as it is known by the node. When the B command is run it modifies the xCAT database to -switch the the primary server to the backup server. +switch the primary server to the backup server. It will also check the other services that are being used for the node (tftpserver, monserver, nfsserver, conserver), and if they were set @@ -84,11 +84,11 @@ No modifications will be made on the nodes. If not specified, several xCAT posts =item B<-l|--liteonly> -Use this option to ONLY synchronize any AIX statelite files from the primary server to the backup server for the nodes. It will not do the actual moving of thre nodes the the backup servers. +Use this option to ONLY synchronize any AIX statelite files from the primary server to the backup server for the nodes. It will not do the actual moving of the nodes to the backup servers. =item B<-P|--postscripts> -Specifies a list of extra postscripts to be run on the nodes after the nodes are moved over to the new serive node. If B is specified, all the postscripts defined in the postscripts table will be run for the nodes. The specified postscripts must be stored under /install/postscripts directory. +Specifies a list of extra postscripts to be run on the nodes after the nodes are moved over to the new service node. If B is specified, all the postscripts defined in the postscripts table will be run for the nodes. The specified postscripts must be stored under /install/postscripts directory. =item B<-s|--source> diff --git a/xCAT-client/pods/man1/swapnodes.1.pod b/xCAT-client/pods/man1/swapnodes.1.pod index c1e17308f..63b3c59f2 100644 --- a/xCAT-client/pods/man1/swapnodes.1.pod +++ b/xCAT-client/pods/man1/swapnodes.1.pod @@ -25,7 +25,7 @@ The B command shouldn't make the decision of which 2 nodes are swappe After running B command, the order of the I/O devices may be changed after IO re-assignment, so the administrator needs to run B to set the boot string for the current_node. And then boot the node with the same image and same postscripts because they have the same attributes. -Without B<-o> option, it's used to swap the location info in the db between 2 nodes. With B<-o> option, it's used to move the I definition to I (the 2nd octant), not move the I definition to the 1st octant. If the two nodes are in a cec, it will assign the IO adapters that were assigned to the defective node to the available node. Originally, the I is a defective non-compute node, and I is a avaible compute node. After the swapping, the I will be a available node. +Without B<-o> option, it's used to swap the location info in the db between 2 nodes. With B<-o> option, it's used to move the I definition to I (the 2nd octant), not move the I definition to the 1st octant. If the two nodes are in a cec, it will assign the IO adapters that were assigned to the defective node to the available node. Originally, the I is a defective non-compute node, and I is a available compute node. After the swapping, the I will be a available node. =head1 OPTIONS @@ -61,12 +61,12 @@ one way. Only move the I definition to the I's hardware =over 3 =item 1. -To swap the service node attributes and IO assignments between sn1 and compute2 which are in the same cec, all the attributes in the ppc table and nodepos talbe of the two node will be swapped, and the the I/O adapters from the defective node (the original sn1) will be assigned to the available node (the original compute2). After the swapping, the sn1 will use the compute2's hardware resource and the I/O adapters from the original sn1. +To swap the service node attributes and IO assignments between sn1 and compute2 which are in the same cec, all the attributes in the ppc table and nodepos table of the two node will be swapped, and the I/O adapters from the defective node (the original sn1) will be assigned to the available node (the original compute2). After the swapping, the sn1 will use the compute2's hardware resource and the I/O adapters from the original sn1. swapnodes -c sn1 -f compute2 =item 2. -To swap the service node attributes and IO assignments between sn1 and compute2 which are NOT in the same cec, all the attributes in the ppc table and nodepos talbe of the two node will be swapped. After the swapping, the sn1 will use the compute2's hardware resource. +To swap the service node attributes and IO assignments between sn1 and compute2 which are NOT in the same cec, all the attributes in the ppc table and nodepos table of the two node will be swapped. After the swapping, the sn1 will use the compute2's hardware resource. swapnodes -c sn1 -f compute2 diff --git a/xCAT-client/pods/man1/switchdiscover.1.pod b/xCAT-client/pods/man1/switchdiscover.1.pod index 7bcdbc27b..ec16fcaad 100755 --- a/xCAT-client/pods/man1/switchdiscover.1.pod +++ b/xCAT-client/pods/man1/switchdiscover.1.pod @@ -16,13 +16,13 @@ B [I | B<--range> I] B<[-V] [-w][-r|-x|-z] =head1 DESCRIPTION -The switchdiscover command scans the subnets and discovers all the swithches on the subnets. The command takes a list of subnets as input. The default subnets are the ones that the xCAT management node is on. It uses nmap command as default to discover the switches. However, you can specify other discovery methods such as lldp or snmp with B<-s> flag. You can write the discovered switches into xCAT database with B<-w> flag. This command supports may output formats such as xml(B<-x>), raw(B<-r>) and stanza(B<-z>) in addition to the default format. +The switchdiscover command scans the subnets and discovers all the switches on the subnets. The command takes a list of subnets as input. The default subnets are the ones that the xCAT management node is on. It uses nmap command as default to discover the switches. However, you can specify other discovery methods such as lldp or snmp with B<-s> flag. You can write the discovered switches into xCAT database with B<-w> flag. This command supports may output formats such as xml(B<-x>), raw(B<-r>) and stanza(B<-z>) in addition to the default format. B<--setup> flag is for switch-based switch discovery. It will find all the discovered switches on the subnets, then match them with predefined switches in the xCATDB. Next, it will set discovered switches with static ip address and hostname based on the predefined switch. It will also enable snmpv3 configuration. The details of the process are defined in the http://xcat-docs.readthedocs.io/en/latest/advanced/networks/switchdiscover/switches_discovery.html. -To view all the switches defined in the xCAT databasee use B command. +To view all the switches defined in the xCAT database use B command. -For lldp method, make sure that lldpd package is installed and lldpd is running on the xCAT management node. lldpd comes from xcat-dep packge or you can get it from http://vincentbernat.github.io/lldpd/installation.html. +For lldp method, make sure that lldpd package is installed and lldpd is running on the xCAT management node. lldpd comes from xcat-dep package or you can get it from http://vincentbernat.github.io/lldpd/installation.html. For snmp method, make sure that snmpwalk command is installed and snmp is enabled for switches. To install snmpwalk, "yum install net-snmp-utils" for redhat and sles, "apt-get install snmp" for Ubuntu. @@ -77,11 +77,11 @@ Writes output to xCAT database. =item B<-x> -XML formated output. +XML formatted output. =item B<-z> -Stanza formated output. +Stanza formatted output. =item B<--setup> diff --git a/xCAT-client/pods/man1/updatenode.1.pod b/xCAT-client/pods/man1/updatenode.1.pod index 5f7f060f2..582a9da26 100644 --- a/xCAT-client/pods/man1/updatenode.1.pod +++ b/xCAT-client/pods/man1/updatenode.1.pod @@ -249,7 +249,7 @@ A comma-separated list of script names. The scripts must be executable and copied to the /install/postscripts directory. Each script can take zero or more parameters. -If parameters are spcified, the whole list needs to be quoted by double quotes. +If parameters are specified, the whole list needs to be quoted by double quotes. For example: "script1 p1 p2,script2" @@ -259,7 +259,7 @@ For example: Specifies one or more "attribute equals value" pairs, separated by spaces. Attr=val pairs must be specified last on the command line. The currently supported attributes are: "installp_bundle", "otherpkgs", "installp_flags", -"emgr_flags" and "rpm_flags". These attribute are only valid for AIX software +"emgr_flags" and "rpm_flags". These attributes are only valid for AIX software maintenance support. =back @@ -270,9 +270,7 @@ maintenance support. =item B<--fanout>=I -Specifies a fanout value for the maximum number of concur- -rently executing remote shell processes. Serial execution -can be specified by indicating a fanout value of B<1>. If B<--fanout> is not specified, a default fanout value of B<64> is used. +Specifies a fanout value for the maximum number of concurrently executing remote shell processes. Serial execution can be specified by indicating a fanout value of B<1>. If B<--fanout> is not specified, a default fanout value of B<64> is used. =item B<-A|--updateallsw> @@ -340,7 +338,7 @@ Specifies a non-root user name to use for remote command execution. This option AIX and Linux and updating software (-S) for Linux only. The non-root userid must be previously defined as an xCAT user. The userid sudo setup will have to be done by the admin on the node. -This is not supported in a hiearchical cluster, that is the node is serviced by a service node. +This is not supported in a hierarchical cluster, that is the node is serviced by a service node. See the document Granting_Users_xCAT_privileges for required xcat/sudo setup. diff --git a/xCAT-client/pods/man1/xcat2nim.1.pod b/xCAT-client/pods/man1/xcat2nim.1.pod index 97e7e9aee..318aad0df 100644 --- a/xCAT-client/pods/man1/xcat2nim.1.pod +++ b/xCAT-client/pods/man1/xcat2nim.1.pod @@ -98,7 +98,7 @@ B<-V|--verbose> Verbose mode. xcat2nim -l -t node clstrn02 -7. To re-create a NIM machine definiton and display verbose output. +7. To re-create a NIM machine definition and display verbose output. xcat2nim -V -t node -f clstrn05 diff --git a/xCAT-client/pods/man8/makeknownhosts.8.pod b/xCAT-client/pods/man8/makeknownhosts.8.pod index 612c04b7e..99047d1cb 100644 --- a/xCAT-client/pods/man8/makeknownhosts.8.pod +++ b/xCAT-client/pods/man8/makeknownhosts.8.pod @@ -4,7 +4,7 @@ B - Make a known_hosts file under $ROOTHOME/.ssh for input noder =head1 SYNOPSIS -B I [B<-r>|B<--remove>] [B<-V>|B<--verbose>] +B I [B<-r>|B<--remove>|B<-d>|B<--delete>] [B<-V>|B<--verbose>] B [B<-h>|B<--help>] @@ -29,10 +29,14 @@ The file should be distributed using B to all the nodes, if you want node A set of comma delimited node names and/or group names. See the I man page for details on supported formats. -=item B<-r|--remove> +=item B<-d|--delete> Only removes the entries for the nodes from the known_hosts file. +=item B<-r|--remove> + +Synonymous to B<-d|--delete>. + =item B<-V|--verbose> Verbose mode. @@ -56,7 +60,7 @@ To build the known_hosts entry for the nodes in the lpars and service groups =item 3. To remove the known_hosts entry for node02 - makeknownhosts node02 -r + makeknownhosts node02 -d =back diff --git a/xCAT-genesis-scripts/bin/bmcsetup b/xCAT-genesis-scripts/bin/bmcsetup index b8208abe8..cb2aba4a5 100755 --- a/xCAT-genesis-scripts/bin/bmcsetup +++ b/xCAT-genesis-scripts/bin/bmcsetup @@ -37,7 +37,7 @@ function cold_reset_bmc() { fi if [ "$XPROD" = "309" -o "$XPROD" = "43707" ] ; then if [ "$XPROD" = "43707" ]; then - # OpenPower SPECIFIC, the OpenPower machines with AMI BMC should NOT need a + # OpenPOWER SPECIFIC, the OpenPOWER machines with AMI BMC should NOT need a # reset after applying ipmitool commands. However, it seems there is a problem with # the BMC where after 15 seconds, it stops responding. To work around, sleep 30 # seconds before issuing the reset of the BMC. @@ -49,7 +49,7 @@ function cold_reset_bmc() { fi if [ "$XPROD" = "43707" ]; then - # OpenPower SPECIFIC, check the BMC with the following raw command to + # OpenPOWER SPECIFIC, check the BMC with the following raw command to # make sure that the bmc is really in a "ready" state before continuing SLEEP_INTERVAL=3 MAX_ITERATION=100 @@ -65,7 +65,7 @@ function cold_reset_bmc() { TOTAL_SEC=$((${SLEEP_INTERVAL} * ${MAX_ITERATION})) logger -s -t $log_label -p local4.error "ERROR, After waiting ${TOTAL_SEC} seconds, the BMC is not in a ready state." else - # for Non OpenPower servers, just sleep for some set time. + # for Non OpenPOWER servers, just sleep for some set time. sleep 15 TRIES=0 @@ -82,7 +82,7 @@ function cold_reset_bmc() { # # Function snooze() # -# The purpose of this is to work around the issue with OpenPower BMCs after +# The purpose of this is to work around the issue with OpenPOWER BMCs after # making a change to network configuration, sleep 30 to be sure the changes apply. # function snooze() { @@ -95,8 +95,8 @@ function snooze() { return fi if [ "$XPROD" = "43707" ]; then - # For OpenPower Machines - logger -s -t $log_label -p local4.debug "OpenPower, snooze for 30 seconds..." + # For OpenPOWER Machines + logger -s -t $log_label -p local4.debug "OpenPOWER, snooze for 30 seconds..." sleep 30 else logger -s -t $log_label -p local4.debug "snooze for 1 second..." @@ -167,7 +167,7 @@ logger -s -t $log_label -p local4.info "IPMIVER=$IPMIVER, IPMIMFG=$IPMIMFG, XPRO # # IPMIMFG=2 = IBM -# IPMIMFG=0 = OpenPower +# IPMIMFG=0 = OpenPOWER # IPMIMFG=42817 and XPROD=16975 = OpenBMC # if [ "$IPMIMFG" == 2 ]; then #IBM @@ -416,7 +416,7 @@ if [ ! -z "$ISOPENBMC" ]; then rm -f /tmp/ipmicfg.xml exit $bmc_config_rc fi -# After network commands are issued, pause to allow the BMC to apply (OpenPower) +# After network commands are issued, pause to allow the BMC to apply (OpenPOWER) snooze let idev=NUMBMCS-1 @@ -646,7 +646,7 @@ while [ $idev -gt 0 ]; do logger -s -t $log_label -p local4.info "Lighting Identify Light" if [ "$XPROD" = "43707" -a "$IPMIMFG" = '0' ]; then - # OpenPower BMC specific, turn on the LED beacon light. + # OpenPOWER BMC specific, turn on the LED beacon light. # - default interval, # ipmitool chassis identify # Chassis identify interval: default (15 seconds) # - 275 is too large, # ipmitool chassis identify 275 diff --git a/xCAT-server/lib/perl/xCAT/MellanoxIB.pm b/xCAT-server/lib/perl/xCAT/MellanoxIB.pm index dbfec4b69..3d9b395a6 100644 --- a/xCAT-server/lib/perl/xCAT/MellanoxIB.pm +++ b/xCAT-server/lib/perl/xCAT/MellanoxIB.pm @@ -568,11 +568,13 @@ sub setSSHcfg { my $enable_cmd = "enable\r"; my $config_cmd = "configure terminal\r"; my $exit_cmd = "exit\r"; + my $init_cmd = "no\r"; my $pwd_prompt = "Password: "; my $sw_prompt = "^.*\] > "; my $enable_prompt = "^.*\] \#"; my $config_prompt = "^.*\\\(config\\\) \#"; + my $init_prompt = "Do you want to use the wizard for initial configuration?"; my $debug = 0; @@ -664,6 +666,14 @@ sub setSSHcfg { $mysw->exp_continue(); } ], + [ + "-re", $init_prompt, + sub { + $mysw->clear_accum(); + $mysw->send($init_cmd); + $mysw->exp_continue(); + } + ], [ "-re", $sw_prompt, sub { diff --git a/xCAT-server/lib/perl/xCAT/SvrUtils.pm b/xCAT-server/lib/perl/xCAT/SvrUtils.pm index 3e306e7fb..41350d242 100755 --- a/xCAT-server/lib/perl/xCAT/SvrUtils.pm +++ b/xCAT-server/lib/perl/xCAT/SvrUtils.pm @@ -1266,7 +1266,7 @@ sub get_mac_by_arp () } else { ($ip, $mac) = (undef, undef); } - if (@$IP[1] !~ $ip) { + if (@$IP[1] ne $ip) { ($ip, $mac) = (undef, undef); } else { last; diff --git a/xCAT-server/lib/xcat/plugins/00kitnodebase.pm b/xCAT-server/lib/xcat/plugins/00kitnodebase.pm index 4eb76eacb..256ce90a3 100644 --- a/xCAT-server/lib/xcat/plugins/00kitnodebase.pm +++ b/xCAT-server/lib/xcat/plugins/00kitnodebase.pm @@ -130,7 +130,7 @@ sub process_request { if ($runconservercmd) { push @commandslist, [ 'makeconservercf', '-d' ]; } - push @commandslist, [ 'makeknownhosts', '-r' ]; + push @commandslist, [ 'makeknownhosts', '-d' ]; if ($macflag) { push @commandslist, [ 'makedhcp', '-d' ]; } diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index f263fdfe4..5fd00c2e8 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -1750,11 +1750,8 @@ sub defmk # won't remove the old one unless the force option is used my $rsp; - $rsp->{data}->[0] = "\nA definition for \'$obj\' already exists."; - $rsp->{data}->[1] = "To remove the old definition and replace it with \na new definition use the force \'-f\' option."; - $rsp->{data}->[2] = "To change the existing definition use the \'chdef\' command."; - xCAT::MsgUtils->message("E", $rsp, $::callback); - $error = 1; + $rsp->{data}->[0] = "A definition for \'$obj\' already exists. No changes will be made. Run again with \'-f\' option to force replace."; + xCAT::MsgUtils->message("W", $rsp, $::callback); delete $::FINALATTRS{$obj}; next; @@ -2002,30 +1999,53 @@ sub defmk } else { + my $nodenum = 0; + my $ret = 0; + my @nodes_updated = (); + foreach my $node (keys %::FINALATTRS) { + if ($::FINALATTRS{$node}{updated}) { + $nodenum++; + push @nodes_updated, $node; + } + if ($::FINALATTRS{$node}{error}) { + $ret = 1; + } + } if ($::verbose) { # give results my $rsp; - $rsp->{data}->[0] = "The database was updated for the following objects:"; xCAT::MsgUtils->message("I", $rsp, $::callback); my $n = 1; - foreach my $o (sort(keys %::FINALATTRS)) + foreach my $o (sort( @nodes_updated)) { $rsp->{data}->[$n] = "$o"; $n++; } + if ($n > 1) { + # Some objects were created ($n was increased), report as success + $rsp->{data}->[0] = "The database was updated for the following objects:"; + xCAT::MsgUtils->message("I", $rsp, $::callback); + } + else { + # No objects were created, report as error + $rsp->{data}->[0] = "The database was not updated."; + xCAT::MsgUtils->message("E", $rsp, $::callback); + } + } + my $rsp; + $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; + if ($nodenum > 0) { + # Some objects were created, report as success xCAT::MsgUtils->message("I", $rsp, $::callback); } - else - { - my $rsp; - my $nodenum = scalar(keys %::FINALATTRS); - $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; - xCAT::MsgUtils->message("I", $rsp, $::callback); + else { + # No objects were created, report as error + xCAT::MsgUtils->message("E", $rsp, $::callback); } - return 0; + return $ret; } } @@ -2774,18 +2794,29 @@ sub defch } else { + my $nodenum = 0; + my $ret = 0; + my @nodes_updated = (); + foreach my $node (keys %::FINALATTRS) { + if ($::FINALATTRS{$node}{updated}) { + $nodenum++; + push @nodes_updated, $node; + } + if ($::FINALATTRS{$node}{error}) { + $ret = 1; + } + } if ($::verbose) { # give results my $rsp; - my $nodenum = scalar(keys %::FINALATTRS); if ($nodenum) { $rsp->{data}->[0] = "The database was updated for the following objects:"; xCAT::MsgUtils->message("I", $rsp, $::callback); my $n = 1; - foreach my $o (sort(keys %::FINALATTRS)) + foreach my $o (sort(@nodes_updated)) { $rsp->{data}->[$n] = "$o\n"; $n++; @@ -2798,7 +2829,7 @@ sub defch else { my $rsp; - my $nodenum = scalar(keys %::FINALATTRS); + if ($nodenum) { $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; } else { @@ -2830,7 +2861,7 @@ sub defch } } } - return 0; + return $ret; } } @@ -3850,13 +3881,14 @@ sub defls $nicnames = join(',', @{ $::NicsAttrHash{$showattr} }); } my $nicsstr; + my $is_group = $defhash{$obj}{'objtype'} eq 'group'; if ($nicnames) { - $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, $nicnames); + $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, $nicnames, $is_group); } else { - $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj); + $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, undef, $is_group); } # Compress mode, format the output @@ -3909,7 +3941,8 @@ sub defls if ($showattr =~ /^nic/) { my $nicval = "$showattr=$attrval"; - my $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj); + my $is_group = $defhash{$obj}{'objtype'} eq 'group'; + my $nicsstr = xCAT::DBobjUtils->expandnicsattr($nicval, $obj, undef, $is_group); if ($nicsstr) { push(@{ $rsp_info->{data} }, "$nicsstr"); diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 0222362ba..5b61b8326 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -859,7 +859,7 @@ sub mknetboot } # turn off the selinux - if ($osver =~ m/fedora12/ || $osver =~ m/fedora13/) { + if ($osver =~ m/(fedora12|fedora13|rhels7)/) { $kcmdline .= " selinux=0 "; } diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 439203163..f78cbb687 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -29,6 +29,9 @@ use Data::Dumper; use File::Basename; use File::Path; use Cwd; +use LWP; +use HTTP::Cookies; +use HTTP::Response; use JSON; my $nmap_path; @@ -41,6 +44,8 @@ if ($tempstring =~ /debian/ || $tempstring =~ /ubuntu/) { my $parent_fd; my $bmc_user; my $bmc_pass; +my $openbmc_user; +my $openbmc_pass; #------------------------------------------------------- @@ -211,10 +216,11 @@ sub bmcdiscovery_processargs { # Get the default bmc account from passwd table, # this is only done for the discovery process ############################################ - ($bmc_user, $bmc_pass) = bmcaccount_from_passwd(); + ($bmc_user, $bmc_pass, $openbmc_user, $openbmc_pass) = bmcaccount_from_passwd(); # overwrite the default user and password if one is provided if ($::opt_U) { $bmc_user = $::opt_U; + $openbmc_user = $::opt_U; } elsif ($::opt_P) { # If password is provided, but no user, set the user to blank # Support older FSP and Tuletta machines @@ -222,6 +228,7 @@ sub bmcdiscovery_processargs { } if ($::opt_P) { $bmc_pass = $::opt_P; + $openbmc_pass = $::opt_P; } ######################################### @@ -587,7 +594,9 @@ sub scan_process { bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command); } } else { - xCAT::MsgUtils->message("E", "Can not get status of 2200 port.", $::CALLBACK); + my $rsp = {}; + push @{ $rsp->{data} }, "Can not get status of 2200 port for ip ${$live_ip}[$i].\n"; + xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); exit 1; } @@ -868,12 +877,16 @@ sub bmcdiscovery { sub bmcaccount_from_passwd { my $bmcusername = "ADMIN"; my $bmcpassword = "admin"; + my $openbmcusername = "root"; + my $openbmcpassword = "0penBmc"; my $passwdtab = xCAT::Table->new("passwd", -create => 0); if ($passwdtab) { my $bmcentry = $passwdtab->getAttribs({ 'key' => 'ipmi' }, 'username', 'password'); if (defined($bmcentry)) { $bmcusername = $bmcentry->{'username'}; $bmcpassword = $bmcentry->{'password'}; + + # if username or password is undef or empty in passwd table, bmcusername or bmcpassword is empty unless ($bmcusername) { $bmcusername = ''; } @@ -881,8 +894,21 @@ sub bmcaccount_from_passwd { $bmcpassword = ''; } } + + my $openbmcentry = $passwdtab->getAttribs({ 'key' => 'openbmc' }, 'username', 'password'); + if (defined($openbmcentry)) { + $openbmcusername = $openbmcentry->{'username'}; + $openbmcpassword = $openbmcentry->{'password'}; + # if username or password is undef or empty in passwd table, openbmcusername or openbmcpassword is empty + unless ($openbmcusername) { + $openbmcusername = ''; + } + unless ($openbmcpassword) { + $openbmcpassword = ''; + } + } } - return ($bmcusername, $bmcpassword); + return ($bmcusername, $bmcpassword, $openbmcusername, $openbmcpassword); } #---------------------------------------------------------------------------- @@ -958,6 +984,10 @@ sub bmcdiscovery_ipmi { } } + if ($mtm eq '' or $serial eq '') { + xCAT::MsgUtils->message("W", { data => ["BMC Type/Model and/or Serial is unavailable for $ip"] }, $::CALLBACK); + return; + } $node_data .= ",$mtm"; $node_data .= ",$serial"; @@ -1018,22 +1048,42 @@ sub bmcdiscovery_openbmc{ my $request_command = shift; my $node = sprintf("node-%08x", unpack("N*", inet_aton($ip))); - my $node_data = $ip; - my $cjar_file = "/tmp/cjar_$ip"; - my $data = '{"data": [ "' . $bmc_user .'", "' . $bmc_pass . '" ] }'; + my $http_protocol="https"; + my $openbmc_project_url = "xyz/openbmc_project"; + my $login_endpoint = "login"; + my $system_endpoint = "inventory/system"; - my $output = `curl -c $cjar_file -k -X POST -H \"Content-Type: application/json\" -d '$data' https://$ip/login`; + my $node_data = $ip; + my $brower = LWP::UserAgent->new( ssl_opts => { SSL_verify_mode => 0x00, verify_hostname => 0 }, ); + my $cookie_jar = HTTP::Cookies->new(); + my $header = HTTP::Headers->new('Content-Type' => 'application/json'); + my $data = '{"data": [ "' . $openbmc_user .'", "' . $openbmc_pass . '" ] }'; + $brower->cookie_jar($cookie_jar); + + my $url = "$http_protocol://$ip/$login_endpoint"; + my $login_request = HTTP::Request->new( 'POST', $url, $header, $data ); + my $login_response = $brower->request($login_request); - if ($output =~ /\"status\": \"ok\"/) { - my $req_output = `curl -b $cjar_file -k https://$ip/xyz/openbmc_project/inventory/system/chassis/motherboard`; - my $response = decode_json $req_output; + if ($login_response->is_success) { + $url = "$http_protocol://$ip/$openbmc_project_url/$system_endpoint"; + my $req = HTTP::Request->new('GET', $url, $header); + my $req_output = $brower->request($req); + return if ($req_output->is_error); + my $response = decode_json $req_output->content; my $mtm; my $serial; - if (defined($response->{data}) and defined($response->{data}->{Model}) and defined($response->{data}->{SerialNumber})) { - $mtm = $response->{data}->{Model}; - $serial = $response->{data}->{SerialNumber}; - } else { + if (defined($response->{data})) { + if (defined($response->{data}->{PartNumber}) and defined($response->{data}->{SerialNumber})) { + $mtm = $response->{data}->{PartNumber}; + $serial = $response->{data}->{SerialNumber}; + } else { + xCAT::MsgUtils->message("W", { data => ["Could not obtain Model Type and/or Serial Number for BMC at $ip"] }, $::CALLBACK); + return; + } + + } else { + xCAT::MsgUtils->message("E", { data => ["Unable to connect to REST server at $ip"] }, $::CALLBACK); return; } @@ -1059,11 +1109,11 @@ sub bmcdiscovery_openbmc{ $node =~ s/(.*)/\L$1/g; $node =~ s/[\s:\._]/-/g; } - - unlink $cjar_file; } else { - if ($output =~ /\"description\": \"Invalid username or password\"/) { + if ($login_response->status_line =~ /401 Unauthorized/) { xCAT::MsgUtils->message("W", { data => ["Invalid username or password for $ip"] }, $::CALLBACK); + } else { + xCAT::MsgUtils->message("W", { data => ["$login_response->status_line for $ip"] }, $::CALLBACK); } return; } diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index 03d0b7843..ba55424f8 100755 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -76,15 +76,24 @@ sub process_request { sub relay_response { my $resp = shift; + my $failure = 0; $callback->($resp); if ($resp and ($resp->{errorcode} and $resp->{errorcode}->[0]) or ($resp->{error} and $resp->{error}->[0])) { - $errored = 1; + $failure = 1; } - foreach (@{ $resp->{node} }) { - if ($_->{error} or $_->{errorcode}) { - $errored = 1; + # quick return when detect failure. + unless ( $failure ) { + foreach (@{ $resp->{node} }) { + if ($_->{error} or $_->{errorcode}) { + $failure = 1; + last; + } } } + if ( $failure ) { + $errored = $failure; + } + } sub setdestiny { @@ -187,8 +196,15 @@ sub setdestiny { chomp($state); my $target; my $action; + my $rawstate=$state; if ($state =~ /=/) { ($state, $target) = split '=', $state, 2; + + if(!$target){ + $callback->({ error => "invalid argument: \"$rawstate\"", errorcode => [1] }); + return; + } + if ($target =~ /:/) { ($target, $action) = split ':', $target, 2; } @@ -401,6 +417,7 @@ sub setdestiny { bootparams => \$bphash}, \&relay_response); if ($errored) { # The error messeage for mkinstall/mknetboot/mkstatelite had been output within relay_response function above, don't need to output more + xCAT::MsgUtils->trace($verbose_on_off, "d", "destiny->process_request: Failed in processing mk$tempstate. Processing will not continue."); return; } diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index e2ff8556a..301796b0a 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -2271,6 +2271,7 @@ sub addnet6 push @netent, " option domain-search $domainstring;\n"; } } + my $nameservers = $netcfgs{$net}->{nameservers}; if ($nameservers and $nameservers =~ /:/) { @@ -2574,6 +2575,7 @@ sub addnet push @netent, " option interface-mtu $mtu;\n"; } + # add domain-search if not sles10 or rh5 my $osv = xCAT::Utils->osver(); unless (($osv =~ /^sle[sc]10/) || ($osv =~ /^rh.*5$/)) { @@ -2591,6 +2593,8 @@ sub addnet push @netent, " option domain-search $domainstring;\n"; } } + #for cumulus ZTP process + push @netent, " option cumulus-provision-url \"http://$tftp/install/postscripts/cumulusztp\";\n"; my $ddnserver = $nameservers; $ddnserver =~ s/,.*//; @@ -2928,6 +2932,7 @@ sub newconfig } push @dhcpconf, "option gpxe.no-pxedhcp 1;\n"; push @dhcpconf, "option www-server code 114 = string;\n"; + push @dhcpconf, "option cumulus-provision-url code 239 = text;\n"; push @dhcpconf, "\n"; push @dhcpconf, "omapi-port 7911;\n"; #Enable omapi... push @dhcpconf, "key xcat_key {\n"; diff --git a/xCAT-server/lib/xcat/plugins/grub2.pm b/xCAT-server/lib/xcat/plugins/grub2.pm index e465db55b..14fa9702a 100644 --- a/xCAT-server/lib/xcat/plugins/grub2.pm +++ b/xCAT-server/lib/xcat/plugins/grub2.pm @@ -12,7 +12,7 @@ use File::Path; use Socket; use Getopt::Long; use xCAT::Table; - +use xCAT::Usage; my $request; my %breaknetbootnodes; our %normalnodes; @@ -426,10 +426,13 @@ sub preprocess_request { return; } - if (@ARGV == 0) { + my $ret=xCAT::Usage->validateArgs($command,@ARGV); + if ($ret->[0]!=0) { if ($usage{$command}) { my %rsp; - $rsp{data}->[0] = $usage{$command}; + $rsp{error}->[0] = $ret->[1]; + $rsp{data}->[1] = $usage{$command}; + $rsp{errorcode}->[0] = $ret->[0]; $callback1->(\%rsp); } return; @@ -465,10 +468,10 @@ sub preprocess_request { return [$req]; } if (@CN > 0) { # if compute nodes broadcast to all servicenodes - return xCAT::Scope->get_broadcast_scope($req, @_); + return xCAT::Scope->get_broadcast_scope_with_parallel($req); } } - return [$req]; + return xCAT::Scope->get_parallel_scope($req); } sub process_request { @@ -589,9 +592,10 @@ sub process_request { my $inittime = 0; if (exists($request->{inittime})) { $inittime = $request->{inittime}->[0]; } if (!$inittime) { $inittime = 0; } - $errored = 0; + my %bphash; unless ($args[0] eq 'stat') { # or $args[0] eq 'enact') { + $errored = 0; xCAT::MsgUtils->trace($verbose_on_off, "d", "grub2: issue setdestiny request"); $sub_req->({ command => ['setdestiny'], node => \@nodes, @@ -599,8 +603,11 @@ sub process_request { arg => \@args, bootparams => \%bphash }, \&pass_along); + if ($errored) { + xCAT::MsgUtils->trace($verbose_on_off, "d", "petitboot: Failed in processing setdestiny. Processing will not continue."); + return; + } } - if ($errored) { return; } my $chaintab = xCAT::Table->new('chain', -create => 1); my $chainhash = $chaintab->getNodesAttribs(\@nodes, ['currstate']); diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 596eac8ee..a096071a7 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -1936,7 +1936,6 @@ sub do_firmware_update { } } - # check for 8335-GTB Firmware above 1610A release. If below, exit if ($output =~ /8335-GTB/) { $cmd = $pre_cmd . " fru print 47"; @@ -2056,7 +2055,6 @@ RETRY_UPGRADE: } # step 4 upgrade firmware - # For firestone machines if updating from 810 to 820 version or from 820 to 810, # extra steps are needed. Hanled in "if" block, "else" block is normal update in a single step. my $rflash_log_file = xCAT::Utils->full_path($sessdata->{node}.".log", RFLASH_LOG_DIR); @@ -2537,7 +2535,7 @@ sub power { my $code; if (($sessdata->{subcommand} !~ /^on$|^off$|^reset$|^boot$|^stat$|^state$|^status$/) and isopenpower($sessdata)) { - xCAT::SvrUtils::sendmsg([ 1, "unsupported command rpower $sessdata->{subcommand} for OpenPower" ], $callback, $sessdata->{node}, %allerrornodes); + xCAT::SvrUtils::sendmsg([ 1, "unsupported command rpower $sessdata->{subcommand} for OpenPOWER" ], $callback, $sessdata->{node}, %allerrornodes); return; } @@ -6508,30 +6506,30 @@ sub vitals { $sensor_filters{leds} = 1; $doall = 1; } - if (grep /temp/, @textfilters) { + if (grep /^temp$/, @textfilters) { $sensor_filters{0x01} = 1; } - if (grep /volt/, @textfilters) { + if (grep /^voltage$/, @textfilters) { $sensor_filters{0x02} = 1; } - if (grep /watt/, @textfilters) { + if (grep /^wattage$/, @textfilters) { $sensor_filters{watt} = 1; } - if (grep /fan/, @textfilters) { + if (grep /^fanspeed$/, @textfilters) { $sensor_filters{0x04} = 1; } - if (grep /power/, @textfilters) { #power does not really include energy, but most people use 'power' to mean both + if (grep /^power$/, @textfilters) { #power does not really include energy, but most people use 'power' to mean both $sensor_filters{0x03} = 1; $sensor_filters{powerstate} = 1; $sensor_filters{energy} = 1; } - if (grep /energy/, @textfilters) { + if (grep /^energy$/, @textfilters) { $sensor_filters{energy} = 1; } - if (grep /led/, @textfilters) { + if (grep /^leds$/, @textfilters) { $sensor_filters{leds} = 1; } - if (grep /chassis/, @textfilters) { + if (grep /^chassis$/, @textfilters) { $sensor_filters{chassis} = 1; } unless (keys %sensor_filters) { diff --git a/xCAT-server/lib/xcat/plugins/makeknownhosts.pm b/xCAT-server/lib/xcat/plugins/makeknownhosts.pm index ef15946a3..f5efe5390 100644 --- a/xCAT-server/lib/xcat/plugins/makeknownhosts.pm +++ b/xCAT-server/lib/xcat/plugins/makeknownhosts.pm @@ -65,13 +65,14 @@ sub process_request if ($request && $request->{arg}) { @ARGV = @{ $request->{arg} }; } else { @ARGV = (); } - my $usage = "Usage: makeknownhosts [-r] [-V]\n makeknownhosts -h"; + my $usage = "Usage: makeknownhosts [-r|-d] [-V]\n makeknownhosts -h"; # print "argv=@ARGV\n"; if (!GetOptions( 'h|help' => \$::opt_h, 'V|verbose' => \$::opt_V, - 'r|remove' => \$::opt_r + 'r|remove' => \$::opt_r, + 'd|delete' => \$::opt_d )) { my $rsp = {}; @@ -81,23 +82,22 @@ sub process_request } # display the usage if -h - if ($::opt_h) - { + if ($::opt_h) { my $rsp = {}; $rsp->{data}->[0] = $usage; xCAT::MsgUtils->message("I", $rsp, $callback, 1); return 0; } - if ($nodes eq "") - { # no noderange + if ($nodes eq "") { + # no noderange my $rsp = {}; $rsp->{data}->[0] = "The Noderange is missing."; xCAT::MsgUtils->message("E", $rsp, $callback, 1); return 1; } my $hostkey = "/etc/xcat/hostkeys/ssh_host_rsa_key.pub"; - if (!(-e $hostkey)) - { # the key is missing, cannot create known_hosts + if (!(-e $hostkey)) { + # the key is missing, cannot create known_hosts my $rsp = {}; $rsp->{data}->[0] = "The keyfile:$hostkey is missing. Cannot create the known_hosts file."; @@ -107,35 +107,28 @@ sub process_request # Backup the existing known_hosts file to known_hosts.backup $rc = backup_known_hosts_file($callback); - if ($rc != 0) - { + if ($rc != 0) { my $rsp = {}; $rsp->{data}->[0] = "Error backing up known_hosts file."; xCAT::MsgUtils->message("E", $rsp, $callback, 1); return 1; - } # Remove the nodes from knownhosts file $rc = remove_nodes_from_knownhosts($callback, $nodes); - if ($rc != 0) - { + if ($rc != 0) { my $rsp = {}; $rsp->{data}->[0] = "Error backing up known_hosts file."; xCAT::MsgUtils->message("E", $rsp, $callback, 1); return 1; - } # if -r flag is not specified, adding the nodes back to known_hosts file - if (!$::opt_r) - { + if (!($::opt_r or $::opt_d)) { my @nodelist = @$nodes; - foreach my $node (@nodelist) - { + foreach my $node (@nodelist) { $rc = add_known_host($node, $callback); - if ($rc != 0) - { + if ($rc != 0) { my $rsp = {}; $rsp->{data}->[0] = "Error building known_hosts file."; xCAT::MsgUtils->message("E", $rsp, $callback, 1); @@ -153,8 +146,6 @@ sub process_request Backs up the old known_hosts file in roots .ssh directory, if it exists. - - =cut #------------------------------------------------------- diff --git a/xCAT-server/lib/xcat/plugins/networks.pm b/xCAT-server/lib/xcat/plugins/networks.pm index 894d0518a..49f318854 100644 --- a/xCAT-server/lib/xcat/plugins/networks.pm +++ b/xCAT-server/lib/xcat/plugins/networks.pm @@ -372,8 +372,10 @@ sub donets # For Linux systems my @ip6table = split /\n/, `/sbin/ip -6 route`; my @rtable = split /\n/, `/bin/netstat -rn`; + my @mtable = split /\n/, `/bin/netstat -i`; splice @rtable, 0, 2; + splice @mtable, 0, 2; my %netgw = (); foreach my $rtent (@rtable) @@ -517,6 +519,15 @@ sub donets } } + # get mtu value + my $mtu; + my @rowm; + foreach (grep /\s*$mgtifname\b/, @mtable) + { + @rowm = split(/\s+/, $_); + $mtu = $rowm[1]; + } + if ($::DISPLAY) { push @{ $rsp->{data} }, "\n#From $host."; push @{ $rsp->{data} }, "$netname:"; @@ -528,9 +539,13 @@ sub donets push @{ $rsp->{data} }, " gateway=$gw"; } push @{ $rsp->{data} }, " mgtifname=$mgtifname"; + if ($mtu) + { + push @{ $rsp->{data} }, " mtu=$mtu"; + } } else { if (!$foundmatch) { - $nettab->setAttribs({ 'net' => $net, 'mask' => $mask }, { 'netname' => $netname, 'mgtifname' => $mgtifname, 'gateway' => $gw }); + $nettab->setAttribs({ 'net' => $net, 'mask' => $mask }, { 'netname' => $netname, 'mgtifname' => $mgtifname, 'gateway' => $gw, 'mtu' => $mtu }); } } diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index bd1e17b6c..ff192fbbf 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -29,13 +29,22 @@ use xCAT::SvrUtils; use xCAT::GlobalDef; use xCAT_monitoring::monitorctrl; +# String constants for rpower states +$::POWER_STATE_OFF="off"; +$::POWER_STATE_ON="on"; +$::POWER_STATE_POWERING_OFF="powering-off"; +$::POWER_STATE_POWERING_ON="powering-on"; +$::POWER_STATE_QUIESCED="quiesced"; +$::POWER_STATE_RESET="reset"; + +$::NO_ATTRIBUTES_RETURNED="No attributes returned from the BMC."; + sub unsupported { my $callback = shift; if (defined($::OPENBMC_DEVEL) && ($::OPENBMC_DEVEL eq "YES")) { - xCAT::SvrUtils::sendmsg("Warning: Currently running development code, use at your own risk. Unset XCAT_OPENBMC_DEVEL to disable.", $callback); return; } else { - return ([ 1, "This openbmc related function is unsupported and disabled. To bypass, run the following: \n\texport XCAT_OPENBMC_DEVEL=YES" ]); + return ([ 1, "This openbmc related function is not yet supported. Please contact xCAT development team." ]); } } @@ -64,6 +73,18 @@ sub handled_commands { }; } +my $prefix = "xyz.openbmc_project"; + +my %sensor_units = ( + "$prefix.Sensor.Value.Unit.DegreesC" => "C", + "$prefix.Sensor.Value.Unit.RPMS" => "RPMS", + "$prefix.Sensor.Value.Unit.Volts" => "Volts", + "$prefix.Sensor.Value.Unit.Meters" => "Meters", + "$prefix.Sensor.Value.Unit.Amperes" => "Amps", + "$prefix.Sensor.Value.Unit.Watts" => "Watts", + "$prefix.Sensor.Value.Unit.Joules" => "Joules" +); + my $http_protocol="https"; my $openbmc_url = "/org/openbmc"; my $openbmc_project_url = "/xyz/openbmc_project"; @@ -98,6 +119,14 @@ my %status_info = ( process => \&reventlog_response, }, + RFLASH_LIST_REQUEST => { + method => "GET", + init_url => "$openbmc_project_url/software/enumerate", + }, + RFLASH_LIST_RESPONSE => { + process => \&rflash_response, + }, + RINV_REQUEST => { method => "GET", init_url => "$openbmc_project_url/inventory/enumerate", @@ -106,6 +135,14 @@ my %status_info = ( process => \&rinv_response, }, + RINV_FIRM_REQUEST => { + method => "GET", + init_url => "$openbmc_project_url/software/enumerate", + }, + RINV_FIRM_RESPONSE => { + process => \&rinv_response, + }, + RPOWER_ON_REQUEST => { method => "PUT", init_url => "$openbmc_project_url/state/host0/attr/RequestedHostTransition", @@ -168,6 +205,13 @@ my %status_info = ( RSPCONFIG_SET_RESPONSE => { process => \&rspconfig_response, }, + RVITALS_REQUEST => { + method => "GET", + init_url => "$openbmc_project_url/sensors/enumerate", + }, + RVITALS_RESPONSE => { + process => \&rvitals_response, + }, ); $::RESPONSE_OK = "200 OK"; @@ -315,7 +359,7 @@ sub process_request { push @donargs, [ $node,$bmcip,$node_info{$node}{username}, $node_info{$node}{password}]; } else { $login_url = "$http_protocol://$bmcip/login"; - $content = '{"data": [ "' . $node_info{$node}{username} .'", "' . $node_info{$node}{password} . '" ] }'; + $content = '{ "data": [ "' . $node_info{$node}{username} .'", "' . $node_info{$node}{password} . '" ] }'; $handle_id = xCAT::OPENBMC->new($async, $login_url, $content); $handle_id_node{$handle_id} = $node; $node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} }; @@ -338,7 +382,7 @@ sub process_request { } } - $callback->({ errorcode => $check }) if ($check); + $callback->({ errorcode => [$check] }) if ($check); return; } @@ -357,34 +401,26 @@ sub parse_args { my $noderange = shift; my $check = undef; - if (!defined($extrargs) and $command =~ /rpower|rsetboot|rspconfig/) { + if (!defined($extrargs) and $command =~ /rpower|rsetboot|rspconfig|rflash/) { return ([ 1, "No option specified for $command" ]); } - if (scalar(@ARGV) > 1 and ($command =~ /rpower|rinv|rsetboot/)) { + if (scalar(@ARGV) > 1 and ($command =~ /rpower|rinv|rsetboot|rvitals/)) { return ([ 1, "Only one option is supported at the same time" ]); } my $subcommand = $ARGV[0]; if ($command eq "rpower") { - # - # disable function until fully tested - # - $check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; } unless ($subcommand =~ /^on$|^off$|^reset$|^boot$|^status$|^stat$|^state$/) { return ([ 1, "Unsupported command: $command $subcommand" ]); } } elsif ($command eq "rinv") { - # - # disable function until fully tested - # - $check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; } $subcommand = "all" if (!defined($ARGV[0])); unless ($subcommand =~ /^cpu$|^dimm$|^model$|^serial$|^firm$|^mac$|^vpd$|^mprom$|^deviceid$|^guid$|^uuid$|^all$/) { return ([ 1, "Unsupported command: $command $subcommand" ]); } } elsif ($command eq "getopenbmccons") { - #command for openbmc rcons + # command for openbmc rcons } elsif ($command eq "rsetboot") { # # disable function until fully tested @@ -429,6 +465,36 @@ sub parse_args { return ([ 1, "Unsupported command: $command $subcommand" ]); } } + } elsif ($command eq "rvitals") { + $subcommand = "all" if (!defined($ARGV[0])); + unless ($subcommand =~ /^temp$|^voltage$|^wattage$|^fanspeed$|^power$|^altitude$|^all$/) { + return ([ 1, "Unsupported command: $command $subcommand" ]); + } + } elsif ($command eq "rflash") { + # + # disable function until fully tested + # + $check = unsupported($callback); if (ref($check) eq "ARRAY") { return $check; } + my $filename_passed = 0; + foreach my $opt (@$extrargs) { + # Only files ending on .tar are allowed + if ($opt =~ /.*\.tar$/i) { + $filename_passed = 1; + next; + } + if ($filename_passed) { + # Filename was passed, check flags allowed with file + if ($opt !~ /^-c$|^--check$|^-d$|^--delete$|^-u$|^--upload$/) { + return ([ 1, "Invalid option specified when a file is provided: $opt" ]); + } + } + else { + # Filename was not passed, check flags allowed without file + if ($opt !~ /^-c$|^--check$|^-l$|^--list/) { + return ([ 1, "Invalid option specified: $opt" ]); + } + } + } } else { return ([ 1, "Command is not supported." ]); } @@ -483,9 +549,20 @@ sub parse_command_status { $subcommand = "all"; } - $next_status{LOGIN_RESPONSE} = "RINV_REQUEST"; - $next_status{RINV_REQUEST} = "RINV_RESPONSE"; - $status_info{RINV_RESPONSE}{argv} = "$subcommand"; + if ($subcommand eq "firm") { + $next_status{LOGIN_RESPONSE} = "RINV_FIRM_REQUEST"; + $next_status{RINV_FIRM_REQUEST} = "RINV_FIRM_RESPONSE"; + } elsif ($subcommand eq "all") { + $next_status{LOGIN_RESPONSE} = "RINV_REQUEST"; + $next_status{RINV_REQUEST} = "RINV_RESPONSE"; + $status_info{RINV_RESPONSE}{argv} = "$subcommand"; + $next_status{RINV_RESPONSE} = "RINV_FIRM_REQUEST"; + $next_status{RINV_FIRM_REQUEST} = "RINV_FIRM_RESPONSE"; + } else { + $next_status{LOGIN_RESPONSE} = "RINV_REQUEST"; + $next_status{RINV_REQUEST} = "RINV_RESPONSE"; + $status_info{RINV_RESPONSE}{argv} = "$subcommand"; + } } if ($command eq "rsetboot") { @@ -539,7 +616,7 @@ sub parse_command_status { if ($command eq "rspconfig") { my @options = (); foreach $subcommand (@ARGV) { - if ($subcommand =~ /^ip$|^netmask$|^gateway$/) { + if ($subcommand =~ /^ip$|^netmask$|^gateway$|^vlan$/) { $next_status{LOGIN_RESPONSE} = "RSPCONFIG_GET_REQUEST"; $next_status{RSPCONFIG_GET_REQUEST} = "RSPCONFIG_GET_RESPONSE"; push @options, $subcommand; @@ -562,6 +639,82 @@ sub parse_command_status { return 1; } + if ($command eq "rvitals") { + if (defined($ARGV[0])) { + $subcommand = $ARGV[0]; + } else { + $subcommand = "all"; + } + + $next_status{LOGIN_RESPONSE} = "RVITALS_REQUEST"; + $next_status{RVITALS_REQUEST} = "RVITALS_RESPONSE"; + $status_info{RVITALS_RESPONSE}{argv} = "$subcommand"; + } + + if ($command eq "rflash") { + my $check_version = 0; + my $list = 0; + my $delete = 0; + my $upload = 0; + unless (GetOptions( + 'c|check' => \$check_version, + 'l|list' => \$list, + 'd|delete' => \$delete, + 'u|upload' => \$upload, + )) { + xCAT::SvrUtils::sendmsg("Error parsing arguments.", $callback); + return 1; + } + + my $update_file = $ARGV[0]; + my $filename = undef; + my $file_id = undef; + my $grep_cmd = "/usr/bin/grep -a"; + my $version_tag = '"version=IBM"'; + my $purpose_tag = '"purpose="'; + if (defined $update_file) { + # Filename or file id was specified + if ($update_file =~ /.*\.tar$/) { + # Filename ending on .tar was specified + $filename = $update_file; + if ($check_version) { + # Display firmware version of the specified .tar file + my $firmware_version_in_file = `$grep_cmd $version_tag $filename`; + my $purpose_version_in_file = `$grep_cmd $purpose_tag $filename`; + chomp($firmware_version_in_file); + chomp($purpose_version_in_file); + my ($purpose_string,$purpose_value) = split("=", $purpose_version_in_file); + my ($version_string,$version_value) = split("=", $firmware_version_in_file); + if ($purpose_value =~ /host/) { + $purpose_value = "Host"; + } + xCAT::SvrUtils::sendmsg("TAR $purpose_value Firmware Product Version\: $version_value", $callback); + } + } + else { + # TODO Process file id passed in + } + } + if ($check_version) { + # Display firmware version on BMC + $next_status{LOGIN_RESPONSE} = "RINV_FIRM_REQUEST"; + $next_status{RINV_FIRM_REQUEST} = "RINV_FIRM_RESPONSE"; + } + if ($list) { + # Display firmware update files uploaded to BMC + $next_status{LOGIN_RESPONSE} = "RFLASH_LIST_REQUEST"; + $next_status{RFLASH_LIST_REQUEST} = "RFLASH_LIST_RESPONSE"; + } + if ($delete) { + xCAT::SvrUtils::sendmsg("Delete option is not yet supported.", $callback); + return 1; + } + if ($upload) { + xCAT::SvrUtils::sendmsg("Upload option is not yet supported.", $callback); + return 1; + } + } + print Dumper(\%next_status) . "\n"; return; } @@ -710,7 +863,7 @@ sub deal_with_response { if ($response->status_line ne $::RESPONSE_OK) { my $error; if ($response->status_line eq $::RESPONSE_SERVICE_UNAVAILABLE) { - $error = "Service Unavailable"; + $error = $::RESPONSE_SERVICE_UNAVAILABLE; } else { my $response_info = decode_json $response->content; if ($response->status_line eq $::RESPONSE_SERVER_ERROR) { @@ -781,21 +934,21 @@ sub rpower_response { if ($node_info{$node}{cur_status} eq "RPOWER_ON_RESPONSE") { if ($response_info->{'message'} eq $::RESPONSE_OK) { - xCAT::SvrUtils::sendmsg("on", $callback, $node); + xCAT::SvrUtils::sendmsg("$::POWER_STATE_ON", $callback, $node); $new_status{$::STATUS_POWERING_ON} = [$node]; } } if ($node_info{$node}{cur_status} eq "RPOWER_OFF_RESPONSE") { if ($response_info->{'message'} eq $::RESPONSE_OK) { - xCAT::SvrUtils::sendmsg("off", $callback, $node); + xCAT::SvrUtils::sendmsg("$::POWER_STATE_OFF", $callback, $node); $new_status{$::STATUS_POWERING_OFF} = [$node]; } } if ($node_info{$node}{cur_status} eq "RPOWER_RESET_RESPONSE") { if ($response_info->{'message'} eq $::RESPONSE_OK) { - xCAT::SvrUtils::sendmsg("reset", $callback, $node); + xCAT::SvrUtils::sendmsg("$::POWER_STATE_RESET", $callback, $node); $new_status{$::STATUS_POWERING_ON} = [$node]; } } @@ -804,9 +957,26 @@ sub rpower_response { if ($node_info{$node}{cur_status} eq "RPOWER_STATUS_RESPONSE" and !$next_status{ $node_info{$node}{cur_status} }) { if ($response_info->{'data'}->{CurrentHostState} =~ /Off$/) { - xCAT::SvrUtils::sendmsg("off", $callback, $node); + # State is off, but check if it is transitioning + if ($response_info->{'data'}->{RequestedHostTransition} =~ /On$/) { + xCAT::SvrUtils::sendmsg("$::POWER_STATE_POWERING_ON", $callback, $node); + } + else { + xCAT::SvrUtils::sendmsg("$::POWER_STATE_OFF", $callback, $node); + } + } elsif ($response_info->{'data'}->{CurrentHostState} =~ /Quiesced$/) { + xCAT::SvrUtils::sendmsg("$::POWER_STATE_QUIESCED", $callback, $node); + } elsif ($response_info->{'data'}->{CurrentHostState} =~ /Running$/) { + # State is on, but check if it is transitioning + if ($response_info->{'data'}->{RequestedHostTransition} =~ /Off$/) { + xCAT::SvrUtils::sendmsg("$::POWER_STATE_POWERING_OFF", $callback, $node); + } + else { + xCAT::SvrUtils::sendmsg("$::POWER_STATE_ON", $callback, $node); + } } else { - xCAT::SvrUtils::sendmsg("on", $callback, $node); + my $unexpected_state = $response_info->{'data'}->{CurrentHostState}; + xCAT::SvrUtils::sendmsg("Unexpected state - $unexpected_state", $callback, $node); } } @@ -846,13 +1016,28 @@ sub rinv_response { my $response_info = decode_json $response->content; - my $grep_string = $status_info{RINV_RESPONSE}{argv}; + my $grep_string; + if ($node_info{$node}{cur_status} eq "RINV_FIRM_RESPONSE") { + $grep_string = "firm"; + } else { + $grep_string = $status_info{RINV_RESPONSE}{argv}; + } + my $src; my $content_info; + my @sorted_output; foreach my $key_url (keys %{$response_info->{data}}) { my %content = %{ ${ $response_info->{data} }{$key_url} }; + if ($grep_string eq "firm") { + if (defined($content{Version}) and $content{Version}) { + my $firm_ver = "System Firmware Product Version: " . "$content{Version}"; + xCAT::SvrUtils::sendmsg("$firm_ver", $callback, $node); + next; + } + } + if (($grep_string eq "vpd" or $grep_string eq "model") and $key_url =~ /\/motherboard$/) { my $partnumber = "BOARD Part Number: " . "$content{PartNumber}"; xCAT::SvrUtils::sendmsg("$partnumber", $callback, $node); @@ -865,20 +1050,24 @@ sub rinv_response { next if ($grep_string eq "serial"); } - if (($grep_string eq "vpd" or $grep_string eq "mprom")) { - # wait for interface + if (($grep_string eq "vpd" or $grep_string eq "mprom") and $key_url =~ /\/motherboard$/) { + xCAT::SvrUtils::sendmsg("No mprom information is available", $callback, $node); + next if ($grep_string eq "mprom"); } - if (($grep_string eq "vpd" or $grep_string eq "deviceid")) { - # wait for interface + if (($grep_string eq "vpd" or $grep_string eq "deviceid") and $key_url =~ /\/motherboard$/) { + xCAT::SvrUtils::sendmsg("No deviceid information is available", $callback, $node); + next if ($grep_string eq "deviceid"); } if ($grep_string eq "uuid") { - # wait for interface + xCAT::SvrUtils::sendmsg("No uuid information is available", $callback, $node); + last; } if ($grep_string eq "guid") { - # wait for interface + xCAT::SvrUtils::sendmsg("No guid information is available", $callback, $node); + last; } if ($grep_string eq "mac" and $key_url =~ /\/ethernet/) { @@ -887,7 +1076,7 @@ sub rinv_response { next; } - if ($grep_string eq "all" or $key_url =~ /\/$grep_string/ or ($grep_string eq "firm" and defined($content{Name}) and $content{Name} eq "OpenPOWER Firmware")) { + if ($grep_string eq "all" or $key_url =~ /\/$grep_string/) { if ($key_url =~ /\/(cpu\d*)\/(\w+)/) { $src = "$1 $2"; } else { @@ -896,10 +1085,16 @@ sub rinv_response { foreach my $key (keys %content) { $content_info = uc ($src) . " " . $key . " : " . $content{$key}; - xCAT::SvrUtils::sendmsg("$content_info", $callback, $node); + push (@sorted_output, $node . ": ". $content_info); #Save output in array } } } + # If sorted array has any contents, sort it and print it + if (scalar @sorted_output > 0) { + @sorted_output = sort @sorted_output; #Sort all output + my $result = join "\n", @sorted_output; #Join into a single string for easier display + xCAT::SvrUtils::sendmsg("$result", $callback); + } if ($next_status{ $node_info{$node}{cur_status} }) { $node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} }; @@ -992,7 +1187,7 @@ sub reventlog_response { my $response_info = decode_json $response->content; - if ($node_info{$node}{cur_status} eq "REVENTLOG_CLEAR_REQUEST") { + if ($node_info{$node}{cur_status} eq "REVENTLOG_CLEAR_RESPONSE") { if ($response_info->{'message'} eq $::RESPONSE_OK) { xCAT::SvrUtils::sendmsg("clear", $callback, $node); } @@ -1090,4 +1285,148 @@ sub rspconfig_response { } } +#------------------------------------------------------- + +=head3 rvitals_response + + Deal with response of rvitals command + Input: + $node: nodename of current response + $response: Async return response + +=cut + +#------------------------------------------------------- +sub rvitals_response { + my $node = shift; + my $response = shift; + + my $response_info = decode_json $response->content; + + my $grep_string = $status_info{RVITALS_RESPONSE}{argv}; + my $src; + my $content_info; + my @sorted_output; + + print "$node: DEBUG Processing command: rvitals $grep_string \n"; + print Dumper(%{$response_info->{data}}); + + foreach my $key_url (keys %{$response_info->{data}}) { + my %content = %{ ${ $response_info->{data} }{$key_url} }; + + # + # Skip over attributes that are not asked to be printed + # + if ($grep_string =~ "temp") { + unless ( $content{Unit} =~ "DegreesC") { next; } + } + if ($grep_string =~ "voltage") { + unless ( $content{Unit} =~ "Volts") { next; } + } + if ($grep_string =~ "wattage") { + unless ( $content{Unit} =~ "Watts") { next; } + } + if ($grep_string =~ "fanspeed") { + unless ( $content{Unit} =~ "RPMS") { next; } + } + if ($grep_string =~ "power") { + unless ( $content{Unit} =~ "Amperes" || $content{Unit} =~ "Joules" || $content{Unit} =~ "Watts" ) { next; } + } + if ($grep_string =~ "altitude") { + unless ( $content{Unit} =~ "Meters" ) { next; } + } + + my $label = (split(/\//, $key_url))[ -1 ]; + + # replace underscore with space, uppercase the first letter + $label =~ s/_/ /g; + $label =~ s/\b(\w)/\U$1/g; + + # + # Calculate the adjusted value based on the scale attribute + # + my $calc_value = $content{Value}; + if ( $content{Scale} != 0 ) { + $calc_value = ($content{Value} * (10 ** $content{Scale})); + } + + $content_info = $label . ": " . $calc_value . " " . $sensor_units{ $content{Unit} }; + push (@sorted_output, $content_info); #Save output in array + } + # If sorted array has any contents, sort it and print it + if (scalar @sorted_output > 0) { + # Sort the output, alpha, then numeric + my @sorted_output = grep {s/(^|\D)0+(\d)/$1$2/g,1} sort + grep {s/(\d+)/sprintf"%06.6d",$1/ge,1} @sorted_output; + xCAT::SvrUtils::sendmsg("$_", $callback, $node) foreach (@sorted_output); + } else { + xCAT::SvrUtils::sendmsg("$::NO_ATTRIBUTES_RETURNED", $callback, $node); + } + + if ($next_status{ $node_info{$node}{cur_status} }) { + $node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} }; + gen_send_request($node); + } else { + $wait_node_num--; + } + + return; +} + +#------------------------------------------------------- + +=head3 rflash_response + + Deal with response of rflash command + Input: + $node: nodename of current response + $response: Async return response + +=cut + +#------------------------------------------------------- +sub rflash_response { + my $node = shift; + my $response = shift; + + my $response_info = decode_json $response->content; + + print Dumper(%{$response_info->{data}}); + + my $update_id; + my $update_activation; + my $update_purpose; + my $update_version; + + if ($node_info{$node}{cur_status} eq "RFLASH_LIST_RESPONSE") { + # Display "list" option header and data + xCAT::SvrUtils::sendmsg("ID Purpose State Version", $callback, $node); + xCAT::SvrUtils::sendmsg("-" x 55, $callback, $node); + + foreach my $key_url (keys %{$response_info->{data}}) { + my %content = %{ ${ $response_info->{data} }{$key_url} }; + + $update_id = (split(/\//, $key_url))[ -1 ]; + if (defined($content{Version}) and $content{Version}) { + $update_version = $content{Version}; + } + if (defined($content{Activation}) and $content{Activation}) { + $update_activation = (split(/\./, $content{Activation}))[ -1 ]; + } + if (defined($content{Purpose}) and $content{Purpose}) { + $update_purpose = (split(/\./, $content{Purpose}))[ -1 ]; + } + xCAT::SvrUtils::sendmsg(sprintf("%-8s %-7s %-8s %s", $update_id, $update_purpose, $update_activation, $update_version), $callback, $node); + } + xCAT::SvrUtils::sendmsg("", $callback, $node); #Separate output in case more than 1 endpoint + } + + if ($next_status{ $node_info{$node}{cur_status} }) { + $node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} }; + gen_send_request($node); + } else { + $wait_node_num--; + } + return; +} 1; diff --git a/xCAT-server/lib/xcat/plugins/pdu.pm b/xCAT-server/lib/xcat/plugins/pdu.pm index 9d54d92fc..e92a7dc0d 100644 --- a/xCAT-server/lib/xcat/plugins/pdu.pm +++ b/xCAT-server/lib/xcat/plugins/pdu.pm @@ -271,8 +271,6 @@ sub powerpduoutlet { my $value; my $statstr; - my $oid = ".1.3.6.1.4.1.2.6.223.8.2.2.1.11"; - my $type = "INTEGER"; my $tmpnodestr = join(",", @$noderange); my $nodetab = xCAT::Table->new('pduoutlet'); @@ -289,11 +287,11 @@ sub powerpduoutlet { my ($pdu, $outlet) = split /:/, $pdu_outlet; my $session = connectTopdu($pdu,$callback); if (!$session) { - $callback->({ errorcode => [1],error => "Couldn't connect to $pdu"}); + $callback->({ errorcode => [1],error => "$node: Couldn't connect to $pdu"}); next; } if ($outlet > $pdunodes->{$pdu}->{outlet} ) { - $callback->({ errorcode => [1],error => "outlet number $outlet is invalid for $pdu"}); + $callback->({ error => "$node: $pdu outlet number $outlet is invalid"}); next; } my $cmd; @@ -316,7 +314,7 @@ sub powerpduoutlet { } if ($session->{ErrorStr}) { - $callback->({ errorcode => [1],error => "$session->{ErrorStr} for $pdu outlet $outlet"}); + $callback->({ errorcode => [1],error => "$node: $pdu outlet $outlet has error = $session->{ErrorStr}"}); } else { $output = "$pdu outlet $outlet is $statstr"; xCAT::SvrUtils::sendmsg($output, $callback, $node, %allerrornodes); @@ -341,6 +339,10 @@ sub outletpower { my $oid = ".1.3.6.1.4.1.2.6.223.8.2.2.1.11"; my $type = "INTEGER"; + if ($session->{newmib}) { + $oid = ".1.3.6.1.4.1.2.6.223.8.2.2.1.13"; + } + my $varbind = new SNMP::Varbind([ $oid, $outlet, $value, $type ]); return $session->set($varbind); @@ -392,6 +394,9 @@ sub outletstat { my $oid = ".1.3.6.1.4.1.2.6.223.8.2.2.1.11"; my $output; my $statstr; + if ($session->{newmib}) { + $oid = ".1.3.6.1.4.1.2.6.223.8.2.2.1.13"; + } $output = $session->get("$oid.$outlet"); if ($output eq 1) { @@ -421,6 +426,7 @@ sub connectTopdu { my $community = "public"; my $session; my $msg = "connectTopdu"; + my $versionoid = ".1.3.6.1.4.1.2.6.223.7.3.0"; $session = new SNMP::Session( DestHost => $pdu, @@ -431,12 +437,22 @@ sub connectTopdu { unless ($session) { return; } + + my $varbind = new SNMP::Varbind([ $versionoid, '' ]); + my $pduversion = $session->get($varbind); + if ($session->{ErrorStr}) { + return; + } + + $session->{newmib} = 0; + if ($pduversion =~ /sLEN/) { + $session->{newmib} = 1; + } + return $session; } - - 1; diff --git a/xCAT-server/lib/xcat/plugins/petitboot.pm b/xCAT-server/lib/xcat/plugins/petitboot.pm index faa292721..04f7bcdf7 100644 --- a/xCAT-server/lib/xcat/plugins/petitboot.pm +++ b/xCAT-server/lib/xcat/plugins/petitboot.pm @@ -6,7 +6,7 @@ use Getopt::Long; use xCAT::Table; use Sys::Syslog; use xCAT::Scope; - +use xCAT::Usage; my $globaltftpdir = xCAT::TableUtils->getTftpDir(); my %usage = ( @@ -322,11 +322,14 @@ sub preprocess_request { return; } - if (@ARGV == 0) { - if ($usage{$command}) { - my %rsp; - $rsp{data}->[0] = $usage{$command}; - $callback1->(\%rsp); + my $ret=xCAT::Usage->validateArgs($command,@ARGV); + if ($ret->[0]!=0) { + if ($usage{$command}) { + my %rsp; + $rsp{error}->[0] = $ret->[1]; + $rsp{data}->[1] = $usage{$command}; + $rsp{errorcode}->[0] = $ret->[0]; + $callback1->(\%rsp); } return; } @@ -357,10 +360,10 @@ sub preprocess_request { return [$req]; } if (@CN > 0) { # if compute nodes broadcast to all servicenodes - return xCAT::Scope->get_broadcast_scope($req, @_); + return xCAT::Scope->get_broadcast_scope_with_parallel($req); } } - return [$req]; + return xCAT::Scope->get_parallel_scope($req); } @@ -484,9 +487,10 @@ sub process_request { my $inittime = 0; if (exists($request->{inittime})) { $inittime = $request->{inittime}->[0]; } if (!$inittime) { $inittime = 0; } - $errored = 0; + my %bphash; unless ($args[0] eq 'stat') { # or $args[0] eq 'enact') { + $errored = 0; xCAT::MsgUtils->trace($verbose_on_off, "d", "petitboot: issue setdestiny request"); $sub_req->({ command => ['setdestiny'], node => \@nodes, @@ -494,8 +498,11 @@ sub process_request { arg => \@args, bootparams => \%bphash}, \&pass_along); + if ($errored) { + xCAT::MsgUtils->trace($verbose_on_off, "d", "petitboot: Failed in processing setdestiny. Processing will not continue."); + return; + } } - if ($errored) { return; } # Fix the bug 4611: PowerNV stateful CN provision will hang at reboot stage# if ($args[0] eq 'next') { diff --git a/xCAT-server/lib/xcat/plugins/rinstall.pm b/xCAT-server/lib/xcat/plugins/rinstall.pm index 6b5d70f7b..906746b33 100644 --- a/xCAT-server/lib/xcat/plugins/rinstall.pm +++ b/xCAT-server/lib/xcat/plugins/rinstall.pm @@ -18,6 +18,7 @@ require xCAT::Utils; require xCAT::MsgUtils; use xCAT::NodeRange; use xCAT::Table; +use xCAT::Usage; use Data::Dumper; use Getopt::Long; @@ -96,6 +97,16 @@ sub rinstall { } if (($command =~ /rinstall/) or ($command =~ /winstall/)) { + my $ret=xCAT::Usage->validateArgs($command,@ARGV); + if ($ret->[0]!=0) { + my $rsp={}; + $rsp->{error}->[0] = $ret->[1]; + $rsp->{errorcode}->[0] = $ret->[0]; + xCAT::MsgUtils->message("E", $rsp, $callback); + &usage($command,$callback); + return; + } + my $state = $ARGV[0]; my $reststates; ($state, $reststates) = split(/,/, $state, 2); @@ -340,7 +351,9 @@ sub rinstall { # We got an error with the nodeset my @successnodes; my @failurenodes; - foreach my $line (@$res) { + # copy into a temporary variable to avoid of circular reference + my @lines = @$res; + foreach my $line (@lines) { $rsp->{data}->[0] = $line; if (($line =~ /: install/) or ($line =~ /: netboot/)) { my $successnode; @@ -364,9 +377,11 @@ sub rinstall { } } my $rsp = {}; - $rsp->{error}->[0] = "failed to run 'nodeset' against the following nodes: @failurenodes"; - $rsp->{errorcode}->[0] = 1; - xCAT::MsgUtils->message("E", $rsp, $callback); + if (0+@failurenodes > 0) { + $rsp->{error}->[0] = "Failed to run 'nodeset' against the following nodes: @failurenodes"; + $rsp->{errorcode}->[0] = 1; + xCAT::MsgUtils->message("E", $rsp, $callback); + } @nodes = @successnodes; } @@ -401,7 +416,6 @@ sub rinstall { }, $subreq, -1, 1); - $rc = $::RUNCMD_RC; my $rsp = {}; if ($VERBOSE) { @@ -414,7 +428,9 @@ sub rinstall { # We got an error with the rnetboot my @failurenodes; - foreach my $line (@$res) { + # copy into a temporary variable to avoid of circular reference + my @lines = @$res; + foreach my $line (@lines) { $rsp->{data}->[0] = $line; if ($line =~ /: Success/) { my $successnode; @@ -430,9 +446,11 @@ sub rinstall { } } my $rsp = {}; - $rsp->{error}->[0] = "failed to run 'rnetboot' against the following nodes: @failurenodes"; - $rsp->{errorcode}->[0] = 1; - xCAT::MsgUtils->message("E", $rsp, $callback); + if (0+@failurenodes > 0) { + $rsp->{error}->[0] = "Failed to run 'rnetboot' against the following nodes: @failurenodes"; + $rsp->{errorcode}->[0] = 1; + xCAT::MsgUtils->message("E", $rsp, $callback); + } } } else { @@ -476,7 +494,9 @@ sub rinstall { # We got an error with the rsetboot my @successnodes; my @failurenodes; - foreach my $line (@$res) { + # copy into a temporary variable to avoid of circular reference + my @lines = @$res; + foreach my $line (@lines) { $rsp->{data}->[0] = $line; if ($line =~ /: Network/) { my $successnode; @@ -493,9 +513,11 @@ sub rinstall { } } my $rsp = {}; - $rsp->{error}->[0] = "failed to run 'rsetboot' against the following nodes: @failurenodes"; - $rsp->{errorcode}->[0] = 1; - xCAT::MsgUtils->message("E", $rsp, $callback); + if (0+@failurenodes > 0) { + $rsp->{error}->[0] = "Failed to run 'rsetboot' against the following nodes: @failurenodes"; + $rsp->{errorcode}->[0] = 1; + xCAT::MsgUtils->message("E", $rsp, $callback); + } @nodes = @successnodes; } } @@ -533,7 +555,9 @@ sub rinstall { unless ($rc == 0) { # We got an error with the rpower my @failurenodes; - foreach my $line (@$res) { + # copy into a temporary variable to avoid of circular reference + my @lines = @$res; + foreach my $line (@lines) { $rsp->{data}->[0] = $line; if (($line =~ /: on reset/) or ($line =~ /: off on/)) { my $successnode; @@ -549,9 +573,11 @@ sub rinstall { } } my $rsp = {}; - $rsp->{error}->[0] = "failed to run 'rpower' against the following nodes: @failurenodes"; - $rsp->{errorcode}->[0] = 1; - xCAT::MsgUtils->message("E", $rsp, $callback); + if (0+@failurenodes > 0) { + $rsp->{error}->[0] = "Failed to run 'rpower' against the following nodes: @failurenodes"; + $rsp->{errorcode}->[0] = 1; + xCAT::MsgUtils->message("E", $rsp, $callback); + } } } } diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 164e6d46c..f69689a1e 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -1707,12 +1707,10 @@ erver, if so, stop it first and try again" ], sub using_dracut { my $rootimgdir = shift; - my $chkcmd = "chroot $rootimgdir/rootimg dracut --list-modules"; - my $rc = system($chkcmd); - if ($rc) { - return 0; - } else { + if ( -f "$rootimgdir/rootimg/etc/dracut.conf" ) { return 1; + } else { + return 0; } } diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index daed8b6e6..e6f2e5e2d 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -355,6 +355,11 @@ sub process_request { xCAT::Utils->runcmd("mkdir $rootimg_dir/.statebackup", 0, 1); } + #delete useless rootimg/tmp/dracut.* files + #fix copy many dracut.* files cost too much time in liteimg + $verbose && $callback->({ info => ["removing \"$rootimg_dir/tmp/dracut.*\""] }); + unlink glob "$rootimg_dir/tmp/dracut.*"; + # recovery the files in litefile.save if necessary foreach my $line (keys %hashSaved) { my @oldentry = split(/\s+/, $line); diff --git a/xCAT-server/lib/xcat/plugins/switch.pm b/xCAT-server/lib/xcat/plugins/switch.pm index ba3d1281f..61dbce696 100644 --- a/xCAT-server/lib/xcat/plugins/switch.pm +++ b/xCAT-server/lib/xcat/plugins/switch.pm @@ -293,15 +293,19 @@ sub process_request { #discovery working. Food for thought. return; } + my $discoverswitch = 0; + if (defined $req->{nodetype} and $req->{nodetype}->[0] eq 'switch') { + $discoverswitch = 1; + } my $firstpass = 1; if ($mac) { - $node = $macmap->find_mac($mac, $req->{cacheonly}->[0]); + $node = $macmap->find_mac($mac, $req->{cacheonly}->[0], $discoverswitch); $firstpass = 0; } if (not $node) { # and $req->{checkallmacs}->[0]) { foreach (@{ $req->{mac} }) { /.*\|.*\|([\dABCDEFabcdef:]+)(\||$)/; - $node = $macmap->find_mac($1, $firstpass); + $node = $macmap->find_mac($1, $firstpass, $discoverswitch); $firstpass = 0; if ($node) { last; } } diff --git a/xCAT-server/lib/xcat/plugins/switchdiscover.pm b/xCAT-server/lib/xcat/plugins/switchdiscover.pm index ebc6cb61b..168cf6ea8 100644 --- a/xCAT-server/lib/xcat/plugins/switchdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/switchdiscover.pm @@ -37,7 +37,16 @@ my %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", + "7c:fe:90" => "Mellanox switch", + "e4:1d:2d" => "Mellanox switch", + "24:8a:07" => "Mellanox switch", + "00:25:8b" => "Mellanox switch", + "00:02:c9" => "Mellanox switch", + "f4:52:14" => "Mellanox switch", + "ec:0d:9a" => "Mellanox switch", + "cc:37:ab" => "Edgecore Networks Switch", + "a8:2b:b5" => "Edgecore Networks Switch", + "70:72:cf" => "Edgecore Networks Switch", "8c:ea:1b" => "Edgecore Networks Switch" ); @@ -54,6 +63,8 @@ my %global_switch_type = ( mellanox => "Mellanox", MLNX => "Mellanox", MELLAN => "Mellanox", + Cumulus => "onie", + cumulus => "onie", Edgecore => "onie" ); diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index eba36892d..dd8fe9d1c 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -11,6 +11,7 @@ use Getopt::Long; use xCAT::Utils; use xCAT::TableUtils; use xCAT::ServiceNodeUtils; +use xCAT::Usage; my $dhcpconf = "/etc/dhcpd.conf"; @@ -116,7 +117,7 @@ sub setstate { #Implement the kcmdline append here for #most generic, least code duplication -###hack start + ###hack start # This is my comment. There are many others like it, but this one is mine. # My comment is my best friend. It is my life. I must master it as I must master my life. # Without me, my comment is useless. Without my comment, I am useless. @@ -166,7 +167,7 @@ sub setstate { #$kern->{kcmdline} .= " ".$kern->{addkcmdline}; $kern->{kcmdline} .= " " . $kcmdlinehack; -###hack end + ###hack end } } @@ -242,7 +243,7 @@ sub setstate { if ($kern->{kernel} =~ /esxi[56]/) { #Make uefi boot provisions my $ucfg; open($ucfg, '>', $tftpdir . "/xcat/xnba/nodes/" . $node . ".uefi"); - if ($kern->{kcmdline} =~ / xcat\/netboot/) { + if ($kern->{kcmdline} =~ /xcat\/netboot/) { $kern->{kcmdline} =~ s/xcat\/netboot/\/tftpboot\/xcat\/netboot/; } print $ucfg "#!gpxe\n"; @@ -367,11 +368,14 @@ sub preprocess_request { return; } - if (@ARGV == 0) { - if ($usage{$command}) { - my %rsp; - $rsp{data}->[0] = $usage{$command}; - $callback1->(\%rsp); + my $ret=xCAT::Usage->validateArgs($command,@ARGV); + if ($ret->[0]!=0) { + if ($usage{$command}) { + my %rsp; + $rsp{error}->[0] = $ret->[1]; + $rsp{data}->[1] = $usage{$command}; + $rsp{errorcode}->[0] = $ret->[0]; + $callback1->(\%rsp); } return; } @@ -404,10 +408,10 @@ sub preprocess_request { return [$req]; } if (@CN > 0) { # if compute nodes broadcast to all servicenodes - return xCAT::Scope->get_broadcast_scope($req, @_); + return xCAT::Scope->get_broadcast_scope_with_parallel($req); } } - return [$req]; + return xCAT::Scope->get_parallel_scope($req); } sub process_request { @@ -541,9 +545,10 @@ sub process_request { my $inittime = 0; if (exists($::XNBA_request->{inittime})) { $inittime = $::XNBA_request->{inittime}->[0]; } if (!$inittime) { $inittime = 0; } - $errored = 0; + my %bphash; unless ($args[0] eq 'stat') { # or $args[0] eq 'enact') { + $errored = 0; xCAT::MsgUtils->trace($verbose_on_off, "d", "xnba: issue setdestiny request"); $sub_req->({ command => ['setdestiny'], node => \@nodes, @@ -551,10 +556,12 @@ sub process_request { arg => \@args , bootparams => \%bphash}, \&pass_along); + if ($errored) { + xCAT::MsgUtils->trace($verbose_on_off, "d", "xnba: Failed in processing setdestiny. Processing will not continue."); + return; + } } - if ($errored) { return; } - #Time to actually configure the nodes, first extract database data with the scalable calls my $chaintab = xCAT::Table->new('chain'); my $noderestab = xCAT::Table->new('noderes'); #in order to detect per-node tftp directories diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index 8e8ac37c9..1b3c3ab7e 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -12,6 +12,7 @@ use File::Path; use Socket; use Getopt::Long; use xCAT::Table; +use xCAT::Usage; my %breaknetbootnodes; our %normalnodes; @@ -422,15 +423,18 @@ sub preprocess_request { return; } - if (@ARGV == 0) { - if ($usage{$command}) { - my %rsp; - $rsp{data}->[0] = $usage{$command}; - $callback1->(\%rsp); + + my $ret=xCAT::Usage->validateArgs($command,@ARGV); + if ($ret->[0]!=0) { + if ($usage{$command}) { + my %rsp; + $rsp{error}->[0] = $ret->[1]; + $rsp{data}->[1] = $usage{$command}; + $rsp{errorcode}->[0] = $ret->[0]; + $callback1->(\%rsp); } return; - } - + } #Assume shared tftp directory for boring people, but for cool people, help sync up tftpdirectory contents when #if they specify no sharedtftp in site table diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 2bc097027..8132fad96 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -221,6 +221,20 @@ my $cmdlog_alllog = "====================================================\n"; my $cmdlog_starttime=undef; # ----used for command log end--------- +my $enable_perf = $sitetab->getAttribs({'key'=>'enableperf'},'value'); +if($enable_perf) { + # Enabled by user, check whether nytperf library is enabled + if (!defined(&DB::disable_profile)) { + xCAT::MsgUtils->message("S", "Perf is enabled in sitetable, but can not load the library."); + $enable_perf = 0; + } else { + if ($enable_perf) { + xCAT::MsgUtils->perf_log_info("start profiling"); + DB::enable_profile(); + } + } +} + $sitetab->close; @@ -926,7 +940,9 @@ unless ($foreground) { } $dbmaster = xCAT::Table::init_dbworker; - +if ($enable_perf) { + xCAT::MsgUtils->perf_log_process( "db", undef, "dbprocess", $dbmaster ); +} # Make sure DB process is ready. wait_db_process(); my $CHILDPID = 0; # Global for reapers @@ -1026,7 +1042,9 @@ $SIG{TERM} = $SIG{INT} = sub { if ($cmdlog_svrpid) { kill 'INT', $cmdlog_svrpid; } - + if ($enable_perf) { +# DB::finish_profile(); + } # ----used for command log end--------- }; @@ -1525,6 +1543,10 @@ until ($quit) { if ($sslfudgefactor) { $sslfudgefactor -= 1; } $sslclients++; # THROTTLE $cnnection->close(); + if ($enable_perf) { + xCAT::MsgUtils->perf_log_info("stop profiling"); +# DB::disable_profile(); + } } if (open($mainpidfile, "<", "/var/run/xcat/mainservice.pid")) { my $pid = <$mainpidfile>; @@ -1949,6 +1971,9 @@ sub plugin_command { } } $$progname = $oldprogname; + if ($enable_perf) { + xCAT::MsgUtils->perf_log_process('plugin', $req, "modname:$modname"); + } $parent_fd = $org_parent_fd; if ($sock) { close($parent_fd); @@ -2689,6 +2714,9 @@ sub service_connection { $req = get_request($sock, $globalencode, $line); unless ($req) { last; } + if ($enable_perf) { + xCAT::MsgUtils->perf_log_process('immediate', $req); + } # ----used for command log start---------- $cmdlog_starttime = time(); my ($sec, $min, $hour, $mday, $mon, $year) = localtime($cmdlog_starttime); diff --git a/xCAT-server/share/xcat/install/scripts/getinstdisk b/xCAT-server/share/xcat/install/scripts/getinstdisk index 743b991b1..311a7294d 100644 --- a/xCAT-server/share/xcat/install/scripts/getinstdisk +++ b/xCAT-server/share/xcat/install/scripts/getinstdisk @@ -145,13 +145,10 @@ if [ -z "$install_disk" ]; then # Work around the issue Pegas running on Power9 installation hang in anaconda # with "TypeError: argument of type 'NoneType' is not iterable", # after running of "udevadm info --attribute-walk --name=/dev/sda" in %pre section of kickstart - exec 42>&1 - anaconda_version=$(anaconda --version 2>&1 >&42) - exec 42>&- cpu_model=$(awk '/model/ { print $NF }' /proc/cpuinfo) p9_bool=$(grep POWER9 /proc/cpuinfo|head -n 1|awk '{print $3}') - if [ "$anaconda_version" == "anaconda 21.48.22.93-1" -a \ - "$cpu_model" == "0000000000000000" -a "$p9_bool" == "POWER9" ]; then + anaconda --version >/dev/null 2>&1 + if [ $? -eq 0 ] && [ "$cpu_model" = "0000000000000000" ] && [ "$p9_bool" = "POWER9" ]; then disk_driver="" else disk_driver=$(udevadm info --attribute-walk --name=$disk | grep DRIVERS| grep -v '""'| grep -v '"sd"'| diff --git a/xCAT-server/share/xcat/install/scripts/post.rhels7 b/xCAT-server/share/xcat/install/scripts/post.rhels7 index 3b36dfefe..f5c9de34e 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhels7 +++ b/xCAT-server/share/xcat/install/scripts/post.rhels7 @@ -9,11 +9,11 @@ for i in $(find /etc/sysconfig/network-scripts/ifcfg-*|egrep -v ifcfg-lo ) do nicname=$(echo $i|awk -F 'ifcfg-' '{print $2}') - if ethtool $nicname|grep -E -i "Link detected.*yes" >/dev/null 2>&1 + if ethtool $nicname|grep -E -i "Link detected.*yes" >/dev/null 2>&1; then if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then msgutil_r "$MASTER_IP" "info" "set NIC $nicname to be activated on system boot" "/var/log/xcat/xcat.log" fi - then sed -i 's/ONBOOT=no/ONBOOT=yes/' $i + sed -i 's/ONBOOT=no/ONBOOT=yes/' $i fi #remove the entry 'HWADDR' from ifcfg-ethx, this is used to skip the diff --git a/xCAT-server/share/xcat/scripts/configMellanox b/xCAT-server/share/xcat/scripts/configMellanox index 2e6f1db34..43dc783b7 100755 --- a/xCAT-server/share/xcat/scripts/configMellanox +++ b/xCAT-server/share/xcat/scripts/configMellanox @@ -26,13 +26,13 @@ use xCAT::MsgUtils; Getopt::Long::Configure("bundling"); $Getopt::Long::ignorecase = 0; -#global variables +# global variables my @nodes; my @filternodes; #--------------------------------------------------------- -#Main +# Main # parse the options if ( @@ -43,9 +43,9 @@ if ( 'ip' => \$::IP, 'name' => \$::NAME, 'snmp' => \$::SNMP, - 'user=s' => \$::USER, - 'password=s' => \$::PASSWORD, - 'auth=s' => \$::AUTH, + 'vlan=s' => \$::VLAN, + 'port=s' => \$::PORT, + 'mode=s' => \$::MODE, 'all' => \$::ALL, ) ) @@ -93,6 +93,16 @@ my $user; my $cmd; my $rc; my $master; +my $vlan; +my $port; +my $mode; + +# set community string for switch +my $community = "public"; +my @snmpcs = xCAT::TableUtils->get_site_attribute("snmpc"); +my $tmp = $snmpcs[0]; +if (defined($tmp)) { $community = $tmp } + if (($::IP) || ($::ALL)) { config_ip(); @@ -102,8 +112,7 @@ if (($::NAME) || ($::ALL)) { config_hostname(); } -if (($::SNMP) || ($::ALL)) -{ +if (($::SNMP) || ($::ALL)) { config_snmp(); } @@ -111,6 +120,9 @@ if (($::CONFIG) || ($::ALL)) { run_rspconfig(); } +if ($::VLAN) { + config_vlan(); +} sub config_ip { my @config_switches; @@ -125,14 +137,13 @@ sub config_ip { @nets = $nettab->getAllAttribs('net','mask'); } foreach my $switch (@nodes) { - print "change $switch to static ip address\n"; my $dip= $nodehash->{$switch}->[0]->{otherinterfaces}; if (!$dip) { print "Add otherinterfaces attribute for discover ip: chdef $switch otherinterfaces=x.x.x.x\n"; next; } - #Validate if this IP is reachable + # Validate if this IP is reachable my $p = Net::Ping->new(); if (!$p->ping($dip)) { print "$dip is not reachable\n"; @@ -147,7 +158,7 @@ sub config_ip { next; } - #get hostname + # get hostname my $dswitch = xCAT::NetworkUtils->gethostname($dip); # if hostnames are same, created different one for discovery name @@ -155,25 +166,38 @@ sub config_ip { $dswitch=""; } - #if not defined, need to create one for xdsh to use + # if not defined, need to create one for xdsh to use if (!$dswitch) { my $ip_str = $dip; $ip_str =~ s/\./\-/g; $dswitch = "switch-$ip_str"; } - $cmd = "chdef -t node -o $dswitch groups=switch ip=$dip switchtype=Mellanox username=admin nodetype=switch"; + $cmd = "chdef -t node -o $dswitch groups=switch ip=$dip switchtype=Mellanox username=admin password=admin mgt=switch nodetype=switch"; $rc= xCAT::Utils->runcmd($cmd, 0); $cmd = "makehosts $dswitch"; $rc= xCAT::Utils->runcmd($cmd, 0); + $cmd = "makedns $dswitch"; + $rc= xCAT::Utils->runcmd($cmd, 0); + + $cmd="rspconfig $dswitch sshcfg=enable"; + $rc= xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) { + xCAT::MsgUtils->message("E"," Failed to config ssh passwordless for $dip"); + print "Failed to config ssh passwordless for $dswitch, $dip\n"; + push (@discover_switches, $dswitch); + next; + } # verify if xdsh works $cmd = "xdsh $dswitch -l admin --devicetype IBSwitch::Mellanox 'enable;configure terminal;exit' "; $rc= xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { - xCAT::MsgUtils->message("E","Couldn't communicate with $dswitch, $dip"); + xCAT::MsgUtils->message("E","Couldn't communicate with $dip"); + print "$cmd failed, Couldn't communicate with $dswitch, $dip\n"; + push (@discover_switches, $dswitch); next; } - #get netmask + # get netmask my $mask; foreach my $net (@nets) { if (xCAT::NetworkUtils::isInSameSubnet( $net->{'net'}, $static_ip, $net->{'mask'}, 0)) { @@ -186,18 +210,23 @@ sub config_ip { push (@discover_switches, $dswitch); push (@config_switches, $switch); + print "$switch: Changing IP address to static IP $static_ip\n"; } if (@config_switches) { - #update switch status + # update switch status my $csw = join(",",@config_switches); $cmd = "chdef $csw status=ip_configed otherinterfaces="; $rc= xCAT::Utils->runcmd($cmd, 0); + $cmd = "makehosts $csw"; + $rc= xCAT::Utils->runcmd($cmd, 0); } if (@discover_switches) { my $dsw = join(",",@discover_switches); - #remove discover switch from xCATdb and /etc/hosts + # remove discover switch from xCATdb and /etc/hosts + $cmd = "makedns -d $dsw"; + $rc= xCAT::Utils->runcmd($cmd, 0); $cmd = "makehosts -d $dsw"; $rc= xCAT::Utils->runcmd($cmd, 0); $cmd = "rmdef $dsw"; @@ -223,63 +252,58 @@ sub config_hostname { xCAT::MsgUtils->message("E","Failed to setup hostname for $switch"); next; } - push (@config_switches, $switch); + push (@config_switches, $switch); + print "$switch: Changing host name to $switch\n"; } if (@config_switches) { - #update switch status + # update switch status my $csw = join(",",@config_switches); $cmd = "chdef $csw status=hostname_configed" ; $rc= xCAT::Utils->runcmd($cmd, 0); } } -#setup secure SNMP v3 +# setup secure SNMP v3 sub config_snmp { my $snmp_user; my $snmp_passwd; my $snmp_auth; my $switchtab = xCAT::Table->new('switches'); - my $switchhash = $switchtab->getNodesAttribs(\@nodes,['sshusername','username','password','auth']); + my $switchhash = $switchtab->getNodesAttribs(\@nodes,['sshusername','username','password','auth','privacy']); foreach my $switch (@nodes) { my $user = $switchhash->{$switch}->[0]->{sshusername}; if (!$user) { - print "switch ssh username is not defined, add default one\n"; - $cmd = "chdef $switch username=admin"; - $rc= xCAT::Utils->runcmd($cmd, 0); + print "switch ssh username is not defined, use default one\n"; $user="admin"; } - if ($::USER) { - $snmp_user = $::USER; - } elsif ($switchhash->{$switch}->[0]->{username}) { - $snmp_user = $switchhash->{$switch}->[0]->{username}; - } else { - $snmp_user = "xcatadmin\r"; + $snmp_user = $switchhash->{$switch}->[0]->{username}; + if (!$snmp_user) { + print "No snmp user defined for switch $switch. Will not configure snmpv3\n"; + next; } - if ($::PASSWORD) { - $snmp_passwd = $::PASSWORD; - } elsif ($switchhash->{$switch}->[0]->{password}) { - $snmp_passwd = $switchhash->{$switch}->[0]->{password}; + $snmp_passwd = $switchhash->{$switch}->[0]->{password}; + $snmp_auth = $switchhash->{$switch}->[0]->{auth}; + my $snmp_privacy = $switchhash->{$switch}->[0]->{privacy}; + + my $cmd_prefix = "xdsh $switch -l $user --devicetype IBSwitch::Mellanox"; + my $cmd; + # Build up the commands for easier readability + $cmd = $cmd . "enable\;"; + $cmd = $cmd . "configure terminal\;"; + $cmd = $cmd . "snmp-server user $snmp_user v3 enable\;"; + if ($snmp_privacy) { + $cmd = $cmd . "snmp-server user $snmp_user v3 auth $snmp_auth $snmp_passwd priv $snmp_privacy $snmp_passwd\;"; } else { - # Need a special character - $snmp_passwd = "passw0rd\r"; - } - if ($::AUTH) { - $snmp_auth = $::AUTH; - } elsif ($switchhash->{$switch}->[0]->{auth}) { - $snmp_auth = $switchhash->{$switch}->[0]->{auth}; - } else { - $snmp_auth = "sha\r"; + $cmd = $cmd . "snmp-server user $snmp_user v3 auth $snmp_auth $snmp_passwd\; no snmp-server user $snmp_user v3 require-privacy\;"; } - $cmd = "xdsh $switch -l $user --devicetype IBSwitch::Mellanox 'enable;configure terminal;snmp-server user $snmp_user v3 enable;snmp-server user $snmp_user v3 auth $snmp_auth $snmp_passwd;no snmp-server user $snmp_user v3 require-privacy;configuration write;exit' "; - $rc= xCAT::Utils->runcmd($cmd, 0); - if ($::RUNCMD_RC != 0) { - xCAT::MsgUtils->message("E","Failed to set snmpv3 for $switch"); - } else { - $cmd = "chdef $switch status=snmp_configed snmpversion=3 snmpauth=$snmp_auth snmpusername=$snmp_user snmppassword=$snmp_passwd"; - $rc= xCAT::Utils->runcmd($cmd, 0); - } + print "$switch: snmpv3 configured\n"; + + $cmd = $cmd . "configuration write\;exit\;"; + my $final_cmd = $cmd_prefix . " \"" . $cmd . "\""; + + `$final_cmd` } } @@ -288,28 +312,27 @@ sub run_rspconfig { my $switchtab = xCAT::Table->new('switches'); my $switchhash = $switchtab->getNodesAttribs(\@nodes,['sshusername']); $master = `hostname -i`; - print "master=$master\n"; foreach my $switch (@nodes) { my $user= $switchhash->{$switch}->[0]->{sshusername}; - #call rspconfig command to setup switch - #enable ssh + # call rspconfig command to setup switch + # enable ssh $cmd=`rspconfig $switch sshcfg=enable`; - #enable snmp function on the switch + # enable snmp function on the switch $cmd=`rspconfig $switch snmpcfg=enable`; - #enable the snmp trap + # enable the snmp trap $cmd=`rspconfig $switch alert=enable`; - #Logging destination: + # Logging destination: $cmd=`rspconfig $switch logdest=$master`; - #config ntp + # config ntp $cmd = `xdsh $switch -l $user --devicetype IBSwitch::Mellanox "enable;configure terminal;ntp enable;ntpdate $master; ntp server $master;configuration write;show ntp" `; push (@config_switches, $switch); } if (@config_switches) { - #update switch status + # update switch status my $csw = join(",",@config_switches); $cmd = "chdef $csw status=switch_configed" ; $rc= xCAT::Utils->runcmd($cmd, 0); @@ -317,6 +340,87 @@ sub run_rspconfig { } +sub config_vlan { + my @ports; + my $port_input; + # checking for port number, switches is checked earlier + if ($::PORT) { + $port_input = $::PORT; + foreach my $num_str (split /,/, $port_input) { + if ($num_str =~ /-/) { + my ($min, $max) = split (/-/,$num_str); + while ($min <= $max) { + push (@ports,$min); + $min++; + } + } else { + push (@ports,$num_str); + } + } + } else { + xCAT::MsgUtils->message("E"," When configuring VLAN, a port must be provided."); + &usage; + exit(1); + } + + # will default to trunk mode + if ($::MODE) { + $mode = $::MODE; + if (!($mode =~ m/(access|trunk|hybrid|access-dcb|dot1q-tunnel)/) ) + { + xCAT::MsgUtils->message("E"," Please provided supported mode"); + &usage; + exit(1); + } + } else { + $mode = "access"; + } + + $vlan = $::VLAN; + + foreach my $switch (@nodes) { + my $devicetype; + + # check if it is ethernet switch or ib switch + my $ccmd = "snmpwalk -Os -v1 -c $community $switch 1.3.6.1.2.1.1.1"; + my $result = xCAT::Utils->runcmd($ccmd, 0); + + # only supports MSX1410 and MSX1400 for Mellanox Ethernet switch now + if ( $result =~ /MSX14/ ) { + $devicetype = "EthSwitch::Mellanox"; + }else { + xCAT::MsgUtils->message("E","Config IB switch VLAN is not support yet"); + $devicetype = "IBSwitch::Mellanox"; + next; + } + + print "Tagging VLAN=$vlan for $switch port $port_input\n"; + + # create vlan + my $vlan_cmd = `xdsh $switch --devicetype $devicetype "enable;configure terminal;vlan $vlan;exit;exit" `; + + my $cmd_prefix = "xdsh $switch --devicetype $devicetype"; + foreach my $port (@ports) { + my $cmd; + # Build up the commands for easier readability + $cmd = $cmd . "enable\;"; + $cmd = $cmd . "configure terminal\;"; + $cmd = $cmd . "interface ethernet 1/$port\;"; + $cmd = $cmd . "switchport mode $mode\;"; + if ($mode =~ /access/) { + $cmd = $cmd . "switchport access vlan $vlan\;"; + } else { + $cmd = $cmd . "switchport $mode allowed-vlan $vlan\;"; + } + $cmd = $cmd . "exit\;exit\;exit\;"; + my $final_cmd = $cmd_prefix . " \"" . $cmd . "\""; + + `$final_cmd` + } + } +} + + #--------------------------------------------------------- =head3 usage @@ -332,13 +436,24 @@ sub usage configMellanox -h│--help configMellanox --switches switchnames --ip configMellanox --switches switchnames --name - configMellanox --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--auth snmp_auth] + configMellanox --switches switchnames --snmp To set the ip address, hostname, config snmp and run rspconfig command: configMellanox --switches switchnames --all To run rspconfig command: configMellanox --switches switchnames --config + + To configure VLAN on a specified port (Mellanox Ethernet switch ONLY): + configMellanox --switches switchnames --port port --vlan vlan --mode mode + + The following mode are supported for switchport: + * access Only untagged ingress Ethernet packets are allowed + * trunk Only tagged ingress Ethernet packets are allowed + * hybrid Both tagged and untagged ingress Ethernet packets are allowed + * access-dcb Only untagged ingress Ethernet packets are allowed. Egress packets will be priority tagged + * dot1q-tunnel Both tagged and untagged ingress Ethernet packets are allowed. Egress packets are tagged with a second VLAN (802.1Q) header + \n"; } diff --git a/xCAT-test/autotest/bundle/rhels7.104-ppc64el.bundle b/xCAT-test/autotest/bundle/rhels7.4-pegas_ppc64le.bundle similarity index 84% rename from xCAT-test/autotest/bundle/rhels7.104-ppc64el.bundle rename to xCAT-test/autotest/bundle/rhels7.4-pegas_ppc64le.bundle index c430a505f..c80880576 100644 --- a/xCAT-test/autotest/bundle/rhels7.104-ppc64el.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4-pegas_ppc64le.bundle @@ -38,8 +38,18 @@ rspconfig_ip_invalid rspconfig_netmask rspconfig_netmask_invalid rspconfig_gateway -rspconfig_gateway_invalid +rspconfig_gateway_invalid rspconfig_node_invalid rspconfig_ip_null +rvitals_h +rvitals_v +rvitals_errorcommand +rvitals_noderange_err +rvitals_temp +rvitals_voltage +rvitals_wattage +rvitals_fanspeed +rvitals_power +rvitals_all reg_linux_diskfull_installation_flat reg_linux_diskless_installation_flat diff --git a/xCAT-test/autotest/perfcmds.lst b/xCAT-test/autotest/perfcmds.lst index e1cf7eb3c..d41d203c5 100644 --- a/xCAT-test/autotest/perfcmds.lst +++ b/xCAT-test/autotest/perfcmds.lst @@ -6,7 +6,7 @@ makedhcp #NODES# makeknownhosts #NODES# nodech #NODES# groups,=group1 nodels #NODES# noderes -nodeset #NODES# osimage=rhels7.3-GA-ppc64le-install-compute +nodeset #NODES# osimage=#OSIMAGE# chdef -t node -o #NODES# postscripts="fake" profile="install" netboot="grub2" rmdef -t node #PERFGRP# mkdef -z < #STANZ# diff --git a/xCAT-test/autotest/testcase/confignics/cases0 b/xCAT-test/autotest/testcase/confignics/cases0 index f348f77fb..b2b5b0af1 100644 --- a/xCAT-test/autotest/testcase/confignics/cases0 +++ b/xCAT-test/autotest/testcase/confignics/cases0 @@ -264,3 +264,20 @@ check:rc==0 cmd:if [ -e /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv ]; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv; rm -f /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv*; fi check:rc==0 end +start:chdef_nicips +description:nicip could be set to null +Attribute: $$CN-The operation object of chdef command +cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi +check:rc==0 +cmd:chdef $$CN nicips.$$SECONDNIC=100.1.0.100 +check:rc==0 +cmd:lsdef $$CN -i nicips +check:output=~nicips.$$SECONDNIC=100.1.0.100 +cmd:chdef $$CN nicips.$$SECONDNIC="" +check:rc==0 +cmd:lsdef $$CN -i nicips +check:output!~100.1.0.100 +cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi +check:rc==0 +end + diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 271427394..4d0c6baa0 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -1,5 +1,6 @@ start:SN_setup_case os:Linux +#stop:yes cmd:fdisk -l cmd:df -T cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index b5ef8f841..be95f5d86 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -1,5 +1,6 @@ start:reg_linux_diskfull_installation_flat os:Linux +#stop:yes cmd:fdisk -l cmd:df -T cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index a3a04ba54..a21b71002 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -1,5 +1,6 @@ start:reg_linux_diskfull_installation_hierarchy os:Linux +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index a6e90df47..f2019566a 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -1,5 +1,6 @@ start:reg_linux_diskless_installation_flat os:Linux +#stop:yes cmd:fdisk -l cmd:df -T cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 5e16e29af..920c1d563 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -1,5 +1,6 @@ start:reg_linux_diskless_installation_hierarchy os:Linux +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat index 829460d05..4b3b6849b 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -1,5 +1,6 @@ start:reg_linux_statelite_installation_flat os:Linux +#stop:yes cmd:fdisk -l cmd:df -T diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index 7c8e83622..076a14c2d 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -1,5 +1,6 @@ start:reg_linux_statelite_installation_hierarchy_by_nfs os:Linux +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index c2140c00d..e9851d362 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -1,5 +1,6 @@ start:reg_linux_statelite_installation_hierarchy_by_ramdisk os:Linux +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0 index 64f87a839..417f3f5a8 100644 --- a/xCAT-test/autotest/testcase/makedhcp/cases0 +++ b/xCAT-test/autotest/testcase/makedhcp/cases0 @@ -176,3 +176,32 @@ check:output!~$$CN cmd:makedhcp -a end +start:makedhcp_remote_network +descriptiion:This case is to test when there is mgtifname='!remote!', makedhcp could work correctly and create entrys in dhcp lease file. +cmd:mkdef -t network -o testnetwork net=100.100.100.0 mask=255.255.255.0 mgtifname='!remote!eth0' gateway=100.100.100.1 +check:rc==0 +cmd:lsdef -t network +check:rc==0 +check:output=~testnetwork +check:rc==0 +cmd:mkdef -t node -o testnode ip=100.100.100.2 groups=all mac=42:3d:0a:05:27:0b +check:rc==0 +cmd: cp -f /etc/hosts /etc/hosts.bak +cmd:echo "100.100.100.2 testnode" >> /etc/hosts +check:rc==0 +cmd:makdhcp -d testnode +cmd:makedhcp testnode +check:rc==0 +cmd:makdhcp -q testnode +check:rc==0 +check:output=~testnode: ip-address = 100.100.100.2 +cmd:makdhcp -d testnode +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:noderm testnode +check:rc==0 +cmd:chtab -d netname=testnetwork networks +check:rc==0 +cmd:cp -f /etc/hosts.bak /etc/hosts +end diff --git a/xCAT-test/autotest/testcase/makeknownhosts/cases0 b/xCAT-test/autotest/testcase/makeknownhosts/cases0 index 3e7e2e512..afe1e371d 100644 --- a/xCAT-test/autotest/testcase/makeknownhosts/cases0 +++ b/xCAT-test/autotest/testcase/makeknownhosts/cases0 @@ -28,6 +28,18 @@ check:rc!=0 check:output!~$$CN end +start:makeknownhosts_node_d +description:delete known node entry from $ROOTHOME/.ssh +cmd:makeknownhosts $$CN +cmd:cat ~/.ssh/known_hosts|grep $$CN +check:output=~$$CN +cmd:makeknownhosts $$CN -d +check:rc==0 +cmd:cat ~/.ssh/known_hosts|grep $$CN +check:rc!=0 +check:output!~$$CN +end + start:makeknownhosts_node_v description:verbose cmd:makeknownhosts $$CN -V diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index 27a489882..c2d43ff7b 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -2,9 +2,12 @@ start:redhat_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -96,16 +99,22 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end start:redhat_migration2 os:Linux description:update xCAT from $$MIGRATION2_VERSION to latest version, these two global parameter defined in config file -stop:yes - -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +#stop:yes +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -197,5 +206,9 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index e287ec852..f20f56edb 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -1,10 +1,12 @@ start:sles_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file - -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -99,15 +101,22 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end start:sles_migration2 os:Linux description:update xCAT from $$MIGRATION22VERSION to latest version, these two global parameter defined in config file -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -202,5 +211,9 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end diff --git a/xCAT-test/autotest/testcase/nodestat/cases1 b/xCAT-test/autotest/testcase/nodestat/cases1 new file mode 100644 index 000000000..f9c7ce03a --- /dev/null +++ b/xCAT-test/autotest/testcase/nodestat/cases1 @@ -0,0 +1,5 @@ +start:nodestat_usage +description: Test the exit code when no command line argument is passed to nodestat +cmd:nodestat +check:rc!=0 +end diff --git a/xCAT-test/autotest/testcase/performance/case0 b/xCAT-test/autotest/testcase/performance/case0 new file mode 100644 index 000000000..6ed131c19 --- /dev/null +++ b/xCAT-test/autotest/testcase/performance/case0 @@ -0,0 +1,18 @@ +start:perftest_5000 +description:Default performance testing on 5000 fake nodes +os:Linux +cmd:which yum &>/dev/null && yum install -y bridge-utils || apt install -y bridge-utils +cmd:copycds $$ISO +check:rc==0 +cmd:xcatperftest 5000 /opt/xcat/share/xcat/tools/autotest/perfcmds.lst +check:rc==0 +end + +start:perftest_5000_without_conf +description:Default performance testing on 5000 fake nodes without extra configuraiton on MN +os:Linux +cmd:which yum &>/dev/null && yum install -y bridge-utils || apt install -y bridge-utils +check:rc==0 +cmd:xcatperftest 5000 /opt/xcat/share/xcat/tools/autotest/perfcmds.lst +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/rspconfig/cases0 b/xCAT-test/autotest/testcase/rspconfig/cases0 index d44e21732..a62796ae1 100644 --- a/xCAT-test/autotest/testcase/rspconfig/cases0 +++ b/xCAT-test/autotest/testcase/rspconfig/cases0 @@ -40,3 +40,65 @@ cmd:rspconfig __GETNODEATTR($$CN,hcp)__ sshcfg check:rc==0 check:output=~__GETNODEATTR($$CN,hcp)__: \w+ end + +start:rspconfig_ip +description:rspconfig change openbmc ip +Attribute: $$CN-The operation object of rspconfig command +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -i $$CN +check:rc==0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -c $$CN ip +check:rc==0 +end + +start:rspconfig_ip_invalid +description:rspconfig could not change openbmc ip using invalid ip +Attribute: $$CN-The operation object of rspconfig command +cmd:rspconfig $$CN ip=ddd +check:rc!=0 +end + +start:rspconfig_ip_null +description:rspconfig could not set ip to null +Attribute: $$CN-The operation object of rspconfig command +cmd:rspconfig $$CN ip= +check:rc!=0 +end + +start:rspconfig_netmask +description:rspconfig change openbmc netmask +Attribute: $$CN-The operation object of rspconfig command +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -n $$CN netmask +check:rc==0 +end + +start:rspconfig_netmask_invalid +despcription:rspconfig could not change openbmc netmask using invalid netmask +Attribute: $$CN-The operation object of rspconfig command +cmd:rspconfig $$CN netmask=ddd +check:rc!=0 +end + +start:rspconfig_gateway +description:rspconfig change openbmc gateway +Attribute: $$CN-The operation object of rspconfig command +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -g $$CN gateway +check:rc==0 +end + +start:rspconfig_gateway_invalid +despcription:rspconfig could not change openbmc gatway using invalid gateway +Attribute: $$CN-The operation object of rspconfig command +cmd:rspconfig $$CN gateway=ddd +check:rc!=0 +end + +start:rspconfig_node_invalid +despcription:rspconfig could not do any action using invalid node +cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi +check:rc==0 +cmd:rspconfig testnode ip +check:rc!=0 +cmd:if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi +check:rc==0 +end + diff --git a/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh b/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh new file mode 100755 index 000000000..35cebceed --- /dev/null +++ b/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh @@ -0,0 +1,211 @@ +#!/bin/bash +function test_ip() +{ + IP=$1 + VALID_CHECK=$(echo $IP|awk -F. '$1<=255&&$2<=255&&$3<=255&&$4<=255{print "yes"}') + if echo $IP|grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$">/dev/null; then + if [ ${VALID_CHECK:-no} == "yes" ]; then + echo $1; + else + return 1; + fi + else + return 1; + fi + return 0; +} +function net() +{ + a=$(echo "$1" | awk -F "." '{print $1" "$2" "$3" "$4}') + for num in $a; + do + while (($num!=0));do + echo -n $(($num%2)) >> /tmp/$$.num; + num=$(($num/2)); + done + done + rc=$(grep -o "1" /tmp/$$.num | wc -l) + rm /tmp/$$.num + ip="$2/$rc" + A=($(echo "$ip"|sed 's/[./;]/ /g')) + B=$(echo $((2**(32-${A[4]})-1))) + C=($(echo "obase=256;ibase=10; $B"|bc|awk '{if(NF==4)a=$0;if(NF==3)a="0"$0;if(NF==2)a="0 0"$0;if(NF==1)a="0 0 0"$0;print a}')) + D=$(echo ${A[*]} ${C[*]}) + rc2=echo echo $D|awk 'BEGIN{OFS="."}{print $1,$2,$3,$4"-"$1+$6,$2+$7,$3+$8,$4+$9}' |awk -F '-' '{print $2}' +} +function change_ip() +{ + test_ip $1; + if [[ $? -ne 0 ]];then return 1;fi + echo $1 > /tmp/BMCIP + ip1=`echo $1|awk -F. '{print $1}'` + ip2=`echo $1|awk -F. '{print $2}'` + ip3=`echo $1|awk -F. '{print $3}'` + ip4=`echo $1|awk -F. '{print $4}'` + echo ip is $ip1.$ip2.$ip3.$ip4 + rc=$(net $3 $1) + rc4=`echo $rc |awk -F. '{print $4}'` + rc4=`expr "$rc4"` + if [[ $rc4 > 255 ]];then rc4=255;fi + ip=$ip4 + while true; + do [[ $ip == "$rc4" ]] && return 1; + ping $ip1.$ip2.$ip3.$ip -c 2 >/dev/null ; + if [[ $? != 0 ]]; then + coutip="$ip1.$ip2.$ip3.$ip" + BMCNEWIP=$coutip; + echo $1,$2,$3 + rspconfig $2 ip=$BMCNEWIP + if [[ $? -eq 0 ]];then + echo right command; + else + return 1; + fi + chdef $2 bmc=$BMCNEWIP + check_result $2 ip $BMCNEWIP + if [[ $? -ne 0 ]] ;then + return 1; + else + return 0; + fi + fi + ip=`expr "$ip" "+" "1"` + done +} +function check_result() +{ + a=0; while true; + do [ $a -eq 20 ] && return 1; + output=`rspconfig $1 $2 |awk -F: '{print $3}'`; + echo output is $output; + if [[ $(echo $output|tr '.' '+'|bc) -eq $(echo $3|tr '.' '+'|bc) ]];then + echo checkresult is $output; + return 0 ; + else + a=$[$a+1]; + sleep 1; + fi + done + return 1; +} +function clear_env() +{ + if [[ -f /tmp/BMCIP ]];then + originip=$(cat /tmp/BMCIP); + echo originip is $originip; + rspconfig $2 ip=$originip + if [[ $? -eq 0 ]];then + echo right command; + else + return 1; + fi + rm -rf /tmp/BMCIP + chdef $2 bmc=$originip + check_result $2 $3 $originip + if [[ $? -ne 0 ]] ;then + return 1; + else + return 0; + fi + fi + return 1; +} +function change_gateway +{ + test_ip $1; + if [[ $? -ne 0 ]];then return 1;fi + rspconfig $2 gateway=$1; + if [[ $? -eq 0 ]];then + echo set gateway ok; + else + return 1; + fi + check_result $2 $3 $1 + if [[ $? -ne 0 ]] ;then + return 1; + else + return 0; + fi +} +function change_netmask +{ + test_ip $1; + if [[ $? -ne 0 ]];then return 1;fi + rspconfig $2 netmask=$1; + if [[ $? -eq 0 ]];then + echo set netmask ok; + else + return 1; + fi + check_result $2 $3 $1 + if [[ $? -ne 0 ]] ;then + return 1; + else + return 0; + fi +} +BMCIP="" +BMCGTEWAT="" +BMCNETMASK="" +while [ "$#" -gt "0" ] +do + case $1 in + "-i"|"--ip" ) + rspconfig $2 ip + if [[ $? -eq 0 ]];then + BMCIP=`rspconfig $2 ip |awk -F":" '{print $3}'` + BMCNETMASK=`rspconfig $2 netmask |awk -F":" '{print $3}'` + else + exit 1; + fi + change_ip $BMCIP $2 $BMCNETMASK + if [[ $? -eq 1 ]];then + exit 1 + else + exit 0 + fi + ;; + "-g"|"--gateway" ) + rspconfig $2 gateway + if [[ $? -eq 0 ]];then + BMCGATEWAYE=`rspconfig $2 gateway |awk -F":" '{print $3}'` + else + exit 1; + fi + change_gateway $BMCGATEWAYE $2 $3 + if [[ $? -eq 1 ]];then + exit 1 + else + exit 0 + fi + ;; + "-n"|"--netmask" ) + rspconfig $2 netmask + if [[ $? -eq 0 ]];then + BMCNETMASK=`rspconfig $2 netmask |awk -F":" '{print $3}'` + else + exit 1; + fi + change_netmask $BMCNETMASK $2 $3 + if [[ $? -eq 1 ]];then + exit 1 + else + exit 0 + fi + ;; + "-c"|"--clear" ) + clear_env $1 $2 $3 + if [[ $? -eq 1 ]];then + exit 1 + else + exit 0 + fi + ;; + *) + echo + echo "Please Insert $0: -i|-g|-n|-c" + echo + exit 1; + ;; + esac +done diff --git a/xCAT-test/autotest/testcase/rvitals/cases0 b/xCAT-test/autotest/testcase/rvitals/cases0 index 055317a88..9e759843d 100644 --- a/xCAT-test/autotest/testcase/rvitals/cases0 +++ b/xCAT-test/autotest/testcase/rvitals/cases0 @@ -1,40 +1,124 @@ +start:rvitals_h +description:get rvitals's usage +Attribute: $$CN-The operation object of rvitals command +cmd:rvitals -h +check:rc==0 +check:output=~Usage: +check:output=~rvitals +end + +start:rvitals_v +description:get rvitals's version +Attribute: $$CN-The operation object of rvitals command +cmd:rvitals -v +check:rc==0 +check:output=~Version +end + start:rvitals_temp +description:Retrieves temperatures +Attribute: $$CN-The operation object of rvitals command cmd:rvitals $$CN temp check:rc==0 -check:output=~System Temperature +check:output=~System Temperature|Ambient Temp|temperature end + +start:rvitals_disktemp +description:Retrieves disk temperatures +Attribute: $$CN-The operation object of rvitals command +arch:ppc64le +hcp:ipmi +cmd:rvitals $$CN disktemp +check:rc==0 +check:output=~Ambient Temp +end + +start:rvitals_cputemp +description:Retrieves cpu temperatures +Attribute: $$CN-The operation object of rvitals command +arch:ppc64le +hcp:ipmi +cmd:rvitals $$CN cputemp +check:rc==0 +check:output=~Ambient Temp +end + start:rvitals_voltage -hcp:hmc,ivm,fsp,ipmi +description:Retrieves power supply and VRM voltage readings +Attribute: $$CN-The operation object of rvitals command cmd:rvitals $$CN voltage check:rc==0 -check:output=~Frame Voltages +check:output=~Frame Voltages|CPU VDD Volt|SysBrd end + start:rvitals_power +description:Retrieves power status +Attribute: $$CN-The operation object of rvitals command cmd:rvitals $$CN power check:rc==0 -check:output=~Current Power Status:\s*(on|off) +check:output=~Current Power Status:\s*(on|off)|Power Status:\s*(on|off) end + start:rvitals_state +description:Retrieves the system state. +Attribute: $$CN-The operation object of rvitals command cmd:rvitals $$CN state check:rc==0 check:output=~System State: end + start:rvitals_lcds +description:Retrieves LCDs status +Attribute: $$CN-The operation object of rvitals command hcp:hmc,ivm,fsp,ipmi cmd:rvitals $$CN lcds check:rc==0 check:output=~Current LCD end + start:rvitals_all +description:Retrieves all status +Attribute: $$CN-The operation object of rvitals command cmd:rvitals $$CN all check:rc==0 -check:output=~System Temperature -check:output=~Frame Voltages -check:output=~Current Power Status:\s*(on|off) -check:output=~System State: +check:output=~System Temperature|Ambient Temp +check:output=~Frame Voltages|CPU VDD Volt|SysBrd +check:output=~Current Power Status:\s*(on|off)|Power Status:\s*(on|off) +check:output=~ System State:|System Event:|NMI State +end + +start:rvitals_leds +description:Retrieves leds status +Attribute: $$CN-The operation object of rvitals command +cmd:rvitals $$CN leds +check:rc==0 +check:output=~LED +end + +start:rvitals_fanspeed +description:Retrieves fan speeds. +Attribute: $$CN-The operation object of rvitals command +cmd:rvitals $$CN fanspeed +check:rc==0 +check:output=~Fan|Fan\s*\d:\s*\w+\s*RPM +end +start:rvitals_wattage +description:Retrieves wattage readings. +Attribute: $$CN-The operation object of rvitals command +cmd:rvitals $$CN wattage +check:rc==0 +check:output=~12V Sense|AC Avg Power +check:output=~Mem Cache Power|MEM Avg Power end start:rvitals_noderange_err +description:using not defined node cmd:rvitals testnode check:rc!=0 check:output=~Error end +start:rvitals_errorcommand +description:using wrong command +cmd: rvitals $$CN errorcommand +check:rc!=0 +check:output=~Unrecognized rvitals arguments +end diff --git a/xCAT-test/autotest/testcase/rvitals/cases1 b/xCAT-test/autotest/testcase/rvitals/cases1 deleted file mode 100644 index 8a43aedb6..000000000 --- a/xCAT-test/autotest/testcase/rvitals/cases1 +++ /dev/null @@ -1,61 +0,0 @@ -start:rvitals_temp -arch:ppc64le -hcp:ipmi -cmd:rvitals $$CN temp -check:rc==0 -check:output=~Ambient Temp -end - -start:rvitals_disktemp -arch:ppc64le -hcp:ipmi -cmd:rvitals $$CN disktemp -check:rc==0 -check:output=~Ambient Temp -end - -start:rvitals_cputemp -arch:ppc64le -hcp:ipmi -cmd:rvitals $$CN cputemp -check:rc==0 -check:output=~Ambient Temp -end - -start:rvitals_fanspeed -arch:ppc64le -hcp:ipmi -cmd:rvitals $$CN fanspeed -check:rc==0 -check:output=~Fan\s*\d:\s*\w+\s*RPM -end - -start:rvitals_voltage -arch:ppc64le -hcp:ipmi -cmd:rvitals $$CN voltage -check:rc==0 -check:output=~CPU VDD Volt -end - -start:rvitals_all -arch:ppc64le -hcp:ipmi -cmd:rvitals $$CN all -check:rc==0 -check:output=~Power Status -check:output=~Power Overload -check:output=~Power Interlock -check:output=~Power Fault -check:output=~Power Control Fault -check:output=~Power Restore Policy -check:output=~Ambient Temp -end - -start:rvitals_noderange_err -arch:ppc64le -hcp:ipmi -cmd:rvitals testnode -check:rc!=0 -check:output=~Error -end diff --git a/xCAT-test/autotest/testcase/simulator/change_ip.sh b/xCAT-test/autotest/testcase/simulator/change_ip.sh new file mode 100755 index 000000000..59fb80b0a --- /dev/null +++ b/xCAT-test/autotest/testcase/simulator/change_ip.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +flag=$1 +mnhn=$2 +cnhn=$3 + +if [ $flag = "-s" ]; then + cnip=`lsdef $cnhn -i bmc -c | awk -F '=' '{print $2}'` + echo $cnip > "/tmp/simulator" + mnip=`ping $mnhn -c 1 | grep "64 bytes from" |awk -F'(' '{print $2}'|awk -F')' '{print $1}'` + chdef $cnhn bmc=$mnip +elif [ $flag = "-c" ]; then + cnip=`cat /tmp/simulator` + chdef $cnhn bmc=$cnip + process=`ps aux | grep "simulator" | grep "python" | awk -F ' ' '{print $2}'` + if [ $process ]; then + kill $process + fi + rm -rf "openbmc_simulator" +fi +exit $? diff --git a/xCAT-test/autotest/testcase/simulator/clear_simulator b/xCAT-test/autotest/testcase/simulator/clear_simulator new file mode 100644 index 000000000..61e2207c9 --- /dev/null +++ b/xCAT-test/autotest/testcase/simulator/clear_simulator @@ -0,0 +1,5 @@ +start:clear_openbmc_simulator +description:clear evironment +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/change_ip.sh -c $$MN $$CN +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/simulator/setup_simulator b/xCAT-test/autotest/testcase/simulator/setup_simulator new file mode 100644 index 000000000..6a4bb71f6 --- /dev/null +++ b/xCAT-test/autotest/testcase/simulator/setup_simulator @@ -0,0 +1,24 @@ +start:setup_openbmc_simulator +description:install dependent packaages, setup and start openbmc simulator +cmd:#!/bin/bash +os=`cat /etc/*release*` +if [[ "$os" =~ "Red Hat" ]] || [[ "$os" =~ "suse" ]]; then + yum install git -y + if [ $? != 0 ]; then + exit 1 + fi +elif [[ "$os" =~ "ubuntu" ]]; then + apt-get install git -y + if [ $? != 0 ]; then + exit 1 + fi +fi +exit 0 +check:rc==0 +cmd:cd /root/ && git clone git@github.com:xuweibj/openbmc_simulator.git +check:rc==0 +cmd:/root/openbmc_simulator/simulator & +check:rc==0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/change_ip.sh -s $$MN $$CN +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/xdsh/cases1 b/xCAT-test/autotest/testcase/xdsh/cases1 new file mode 100644 index 000000000..37286b5d3 --- /dev/null +++ b/xCAT-test/autotest/testcase/xdsh/cases1 @@ -0,0 +1,11 @@ +start:xdsh_permission_denied +description: Test the exit code when command xdsh failed +cmd:xdsh $$CN date +check:rc==0 +cmd:mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup +check:rc==0 +cmd:xdsh $$CN date +check:rc!=0 +cmd:mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa +check:rc==0 +end diff --git a/xCAT-test/bin/xcatperftest b/xCAT-test/bin/xcatperftest index e68e6b8f4..1ec36c963 100755 --- a/xCAT-test/bin/xcatperftest +++ b/xCAT-test/bin/xcatperftest @@ -26,6 +26,17 @@ isNumber() expr $1 + 0 &>/dev/null } +# Used for prerequiste checking +preChecking() +{ + local val="" + for cmd in brctl ifconfig; do + which $cmd > /dev/null 2>&1 + [ $? -ne 0 ] && val="$cmd,$val" + done + echo $val | sed s/,$// +} + # Give a simple usage if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then echo "[PERF_DRYRUN=y] [PERF_NOCREATE=y] $0 [command-list-file]" @@ -45,6 +56,12 @@ if [ -z $XCATROOT ]; then fi fi +pass=$(preChecking) +if [ ! -z "$pass" ]; then + echo "Error: Missing required tools: $pass" + [ -z $PERF_DRYRUN ] && exit -1 +fi + # Mandatory, to specify the number of total fake nodes which will be created for testing FAKE_NODE_TOTAL=$1 @@ -73,6 +90,18 @@ if [ -z $FAKE_NETWORK_BMC ]; then FAKE_NETWORK_BMC='192.169' fi +# Optional, The network mask for the fake network object. +# By default, it is '255.255.0.0' but it could be changed when you set environment variable `FAKE_NETWORK_MASK` +if [ -z $FAKE_NETWORK_MASK ]; then + FAKE_NETWORK_MASK='255.255.0.0' +fi + +# Optional, The bridge device name for the temporary interface which is required on MN as nodeset/makedhcp will check if the MN and CN in same subnet. +# By default, it is 'perfvirbr0' but it could be changed when you set environment variable `FAKE_NETWORK_INTF` +if [ -z $FAKE_NETWORK_INTF ]; then + FAKE_NETWORK_INTF='perfvirbr0' +fi + # Optional, The node template name used for generating fake nodes. # By default, it is '-template' but it could be changed when you set environment variable `FAKE_NODE_GROUP` if [ -z $PERF_NODETEMPL ]; then @@ -81,11 +110,14 @@ fi # IP address assinged to node will be in [1-250] NODE_PER_ROW=250 +MYSUFFIX=`date +"%Y%m%d%H%M%S"` -PERFORMANCE_DIR=/tmp/xcat-performance -PERFORMANCE_NODE_TMPL=$PERFORMANCE_DIR/node.tmpl -PERFORMANCE_REPORT=$PERFORMANCE_DIR/report-$FAKE_NODE_TOTAL.$$ -PERFORMANCE_STANZ=$PERFORMANCE_DIR/stanz-$FAKE_NODE_TOTAL.$$ +if [ -z $PERFORMANCE_DIR ]; then + PERFORMANCE_DIR=$XCATROOT/share/xcat/tools/autotest/result +fi +PERFORMANCE_NODE_TMPL=$PERFORMANCE_DIR/perf-node.tmpl +PERFORMANCE_REPORT=$PERFORMANCE_DIR/perfreport-$FAKE_NODE_TOTAL.log.$MYSUFFIX +PERFORMANCE_STANZ=$PERFORMANCE_DIR/perfstanz-$FAKE_NODE_TOTAL.$MYSUFFIX # If the command list file is not specified, the tool will only create the stanz file for fake nodes. # If it is specified but not exists, the tool will exit with error. @@ -135,6 +167,45 @@ fakeNode() # bmc=$FAKE_NETWORK_BMC.$2.$3 bmcpassword=fake bmcusername=fake groups=all,performance > /dev/null 2>&1 } +# Create a fake xCAT network definition +fakeNetwork() +{ + lsdef -t network -o net-$FAKE_NODE_PREFIX > /dev/null 2>&1 + if [ 0 != $? ]; then + mkdef -t network net-$FAKE_NODE_PREFIX net=$FAKE_NETWORK_PRO.0.0 mask=$FAKE_NETWORK_MASK > /dev/null + else + chdef -t network -o net-$FAKE_NODE_PREFIX net=$FAKE_NETWORK_PRO.0.0 mask=$FAKE_NETWORK_MASK > /dev/null + fi +} + +# Create a fake xCAT network definition +fakeInterface() +{ + result=`ifconfig $1 2>/dev/null` + if [ -z "$2" ]; then + [ -z "$result" ] && brctl addbr $1 + ifconfig $1 $FAKE_NETWORK_PRO.251.254 netmask $FAKE_NETWORK_MASK || echo "$1 is not configured successfully" + elif [ ! -z "$result" ]; then + ifconfig $1 down + brctl delbr $1 || echo "$1 is not removed successfully, you may need to clean up manually." + fi +} + +getOSimage() +{ + # The OS image name used in nodeset to replace the MACRO Variable `#OSIMAGE#`. + # By default, it could be detectd automatically according to the arch + if [ -z $PERF_OSIMAGE ]; then + + # covert it to an array + osimage_array=($(lsdef -t osimage 2>/dev/null| grep `arch`|grep 'install'|awk '/compute/ {print $1}')) + index=`expr $RANDOM % ${#osimage_array[@]} 2>/dev/null` + echo ${osimage_array[$index]} + else + echo $PERF_OSIMAGE + fi +} + # Create batch fake nodes stanz file for testing bootstrap() { @@ -164,6 +235,7 @@ runTest() { cmd=$1 + [ -z $osimage ] || cmd="${cmd/\#OSIMAGE\#/$osimage}" if [[ $cmd =~ '#STANZ#' ]]; then #mkdef -z execCmd "${cmd/\#STANZ\#/$PERFORMANCE_STANZ}" "$FAKE_NODE_TOTAL" @@ -179,7 +251,7 @@ runTest() do isNumber $num || continue if [[ $num -le $FAKE_NODE_TOTAL ]]; then - cmd=$1 + #cmd=$1 execCmd "${cmd/\#NODES\#/$FAKE_NODE_PREFIX[1-$num]}" "$num" fi done @@ -195,10 +267,11 @@ runTest() # Output performance result for each command. printResult() { - cmd=`echo "$1" | awk '{print $1}'` + #TODO, more clear short desc for this command + desc=`echo "$1" | awk '{print $1}'` result=$([[ $4 = 0 ]] && echo "SUCESS" || echo "FAIL") # TOTAL, CMD, NODERANGE, TIME, SUCESS, FULL COMMAND - echo "$FAKE_NODE_TOTAL", "$cmd", "$2", "$3", $result, \"$1\" >> $PERFORMANCE_REPORT + echo "$FAKE_NODE_TOTAL; $desc; $2; $3; $result; \"$1\"" | tee -a $PERFORMANCE_REPORT } # Executing each command and print the result to report file @@ -222,19 +295,21 @@ execCmd() ################################################# # Main Loop of the performance baseline testing # ################################################# -lsxcatd -a +version=`lsxcatd -a 2>/dev/null | grep Version` if [ 0 != $? ]; then - echo "ERROR: xCAT daemon is not running" - #exit 99 + echo "ERROR: xCAT daemon is not running. Start 'xcatd' and rerun this tool." + exit 99 fi -mkdir -p /tmp/xcat-performance +mkdir -p $PERFORMANCE_DIR lsdef -t node --template $PERF_NODETEMPL > $PERFORMANCE_NODE_TMPL 2>/dev/null if [ 0 != $? ]; then - echo "ERROR: Cannot find the default template for `arch`, make sure it exists and rerun the script." + echo "ERROR: Cannot find the default template for `arch`, make sure it exists and rerun this tool." exit 99 fi +#Get available OS image, it will be used for nodeset if possible +osimage=$(getOSimage) rack=$(expr $FAKE_NODE_TOTAL / $NODE_PER_ROW) @@ -257,13 +332,24 @@ if [ -z $RUN_CMD_LIST ]; then fi echo "Continue the performance testing for commands in $RUN_CMD_LIST " +if [ -z "$osimage" ]; then + echo "WARN: Cannot determine the OS image, the commands which defined with #OSIMAGE# will be failed." +fi + +echo $version | tee $PERFORMANCE_REPORT echo "==================================================" # Initial Populate the fake nodes into DB if [ -z $PERF_NOCREATE ]; then + #create fake network for makedns, makedhcp etc... + fakeNetwork execCmd "mkdef -z -f < $PERFORMANCE_STANZ" "$FAKE_NODE_TOTAL" fi +# fake interface is required for topology with service nodes as it will determine if then Mn/Sn are +# in the same subnet with CNs +fakeInterface $FAKE_NETWORK_INTF + series=`grep '^#SERIES#' $RUN_CMD_LIST | awk '{print $2}'` if [ ! -z $series ]; then series=${series//,/ } @@ -287,6 +373,7 @@ IFS_BAK= rm -f $PERFORMANCE_NODE_TMPL rm -f $PERFORMANCE_STANZ +fakeInterface $FAKE_NETWORK_INTF del if [ -z $PERF_DRYRUN ]; then echo diff --git a/xCAT-test/debian/rules b/xCAT-test/debian/rules index ad419b385..d7863c5c1 100755 --- a/xCAT-test/debian/rules +++ b/xCAT-test/debian/rules @@ -15,6 +15,8 @@ build: mkdir -p share/doc/man1 pod2man pods/man1/xcattest.1.pod > share/man/man1/xcattest.1 pod2html pods/man1/xcattest.1.pod > share/doc/man1/xcattest.1.html + pod2man pods/man1/xcatperftest.1.pod > share/man/man1/xcatperftest.1 + pod2html pods/man1/xcatperftest.1.pod > share/doc/man1/xcatperftest.1.html pwd clean: diff --git a/xCAT-test/xCAT-test.spec b/xCAT-test/xCAT-test.spec index 0625e5de9..e5f3d0fb5 100644 --- a/xCAT-test/xCAT-test.spec +++ b/xCAT-test/xCAT-test.spec @@ -28,7 +28,9 @@ Provides automated test tool and buckets to help test xCAT commands automaticall mkdir -p share/man/man1 mkdir -p share/doc/man1 pod2man pods/man1/xcattest.1.pod > share/man/man1/xcattest.1 +pod2man pods/man1/xcatperftest.1.pod > share/man/man1/xcatperftest.1 pod2html pods/man1/xcattest.1.pod > share/doc/man1/xcattest.1.html +pod2html pods/man1/xcatperftest.1.pod > share/doc/man1/xcatperftest.1.html %install # The install phase puts all of the files in the paths they should be in when the rpm is diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 30e940801..00133e425 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -14,292 +14,650 @@ BEGIN $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; } use lib "$::XCATROOT/lib/perl"; -my $rootdir = "$::XCATROOT/share/xcat/tools/autotest"; -my $needhelp = 0; -my $configinfo = undef; -my $configfile = undef; -my $casedir = "$rootdir/testcase"; -my $bundledir = "$rootdir/bundle"; -my $resultdir = "$rootdir/result"; -my $bundlelist = undef; -my $caselist = undef; -my $cmdlist = undef; -my $showbundlesorcommands = undef; -my $needshow = 0; -my $restore = 0; -my $ret = 0; -my $string1 = undef; -my $showbundlefiles = 0; -my $showcommandslist = 0; -my $stop_to_keep_env = 0; -#----------------------------------- -=head1 - System label usage: - In order to make install xCAT to be the first case for automation daily regression, "System" label is used in this xcattest command. - xcattest -f /opt/xcat/share/xcat/tools/autotest/default.conf:System -t install_xCAT_on_rhels_sles - xcattest -f /opt/xcat/share/xcat/tools/autotest/default.conf:System -t install_xCAT_on_ubuntu - System label means only the [System] aspect will be loaded and no other inital action will be done. -=cut +#--------------global attributes---------------- +my $prpgram_path = dirname(File::Spec->rel2abs(__FILE__)); +my $program_name = basename($0); +my $rootdir = "$prpgram_path/../share/xcat/tools/autotest"; +my $casedir = "$rootdir/testcase/"; +my $bundledir = "$rootdir/bundle/"; +my $resultdir = "$rootdir/result/"; +my $rst = 0; +my $setup_env_by_config_file = 1; +my $stop_to_keep_env = 0; -#----------------------------------- -my $initallabel = undef; -my $loadsysteminfo = "System"; +#Array to save all cases planed to handle +#these cases can be passed by option -b/-t/-c +#if without value passed by option -b/-t/-c, for "show information" function, +#the search scope is the all cases shipped by xcat_test package +my @cases_to_be_run = (); -#Create result directory -mkdir $resultdir unless -d $resultdir; - -# create a log for xcattest -my $timestamp = `date +"%Y%m%d%H%M%S"`; -open(LOG, ">$resultdir/xcattest.log.$timestamp") - or die "Can't open logfile for writing: $!"; - -if ( - !GetOptions("h|?" => \$needhelp, - "f=s" => \$configinfo, - "b=s" => \$bundlelist, - "t=s" => \$caselist, - "c=s" => \$cmdlist, - "s=s" => \$showbundlesorcommands, - "l" => \$needshow, - "restore" => \$restore) - ) -{ - &usage; - exit 1; -} - -if ($needhelp) -{ - &usage; - exit 0; -} - - -if (&checkoptions) -{ - &usage; - exit 1; -} - -#show bundle files under $bundledir with .bundle as file suffix -my %bundlefilesinfo = (); -if ($showbundlefiles) -{ - &listbundlefiles; - exit 0; -} - -#show commands, which is the folder name $casedir, with case* files and test cases -if ($showcommandslist) -{ - &listcommands; - exit 0; -} - -#load case to $cases -# key type -#$cases[x](x>0): hash -# name string -# os:AIX/Linux string -# arch:ppc64/x386 string -# hcp:hmc/mm/bmc/fsp string -# cmd: array -# check: array - -my @cases = (); -if ($needshow) { - &loadcase; - exit 0; -} - - -# create a log for run test cases -&log_this("xCAT automated test started at " . scalar(localtime())); -open(LOG_ERR, ">$resultdir/failedcases.$timestamp") - or die "Can't open error logfile for writing: $!"; - -#read config file -log_this("******************************"); -log_this("Reading Configure"); -log_this("******************************"); +#A hash to save the contect of config file +#The structure of %config #config{object}{type}{name}{attr} #config{table}{name}{entry}{key} #config{script_prev}->[] #config{script_post}->[] #config{var}{varname} my %config = (); -$ret = &getConfig; -if ($ret != 0) { - goto EXIT; + +#Array of hash, to save the information of case +my @cases = (); +my %case_name_index_map; + +#when loading cases, NORUN means just load case without attribute replacement. +#this is used for "show information" function +my $NORUN = 0; +my $RUN = 1; + +#----------global logs attributes--------------- +my $running_log_fd = undef +my $running_log_name = undef; +my $failed_log_name = undef; +my $performance_log_name = undef; + +#--------------command line attrbutes-------------- +my $needhelp = 0; +my $configfile = undef; +my $bundlelist = undef; +my $caselist = undef; +my $cmdlist = undef; +my $list = undef; +my $restore = 0; +my $quiet = 0; + +#-------------usage-------------------- +$::USAGE = "Usage: +To get help: + $program_name -h + +To list the information about all cases shipped by xcat test package + $program_name -l {caselist|caseinfo|casenum} +To list the information about all bunldes shipped by xcat test package + $program_name -l bundleinfo +To list the information about cases in specific bundles + $program_name -l {caselist|caseinfo|casenum} -b +To list the information about cases related to specific commands + $program_name -l {caselist|caseinfo|casenum} -c +To list the information about specific cases + $program_name -l {caselist|caseinfo|casenum} -t + +To run test cases in specific bundles + $program_name [-f {configure_file|configure_file:System}] -b [-r] [-q] +To run specific test cases + $program_name [-f {configure_file|configure_file:System}] -t [-r] [-q] +To run all cases related to specific commands + $program_name [-f {configure_file|configure_file:System}] -c [-r] [-q] + +Options: + -h : Get $program_name usage information. + -l : list specific information. The valid options are caselist,caseinfo,casenum,bundleinfo + -f : specify the configuration file. If 'System' tag is used, only [System] section in the configuration file will be used. If 'System' is not used all other sections of the configuration file will be used, like [Table], [Object], etc. + -c : Comma separated list of command names to test. + -t : Comma separated list of test case names to test. + -b : Comma separated list of bundle names to test. If a bundle name is specified without an absolute path, bundles under $bundledir will be searched + -r : Back up the original environment settings before running test, and restore them after running test. + -q : Just record all the output of $program_name into log file under $resultdir, not print to STDOUT. Print to STDOUT by default. +"; + +#============================================================================================== +# main process +#============================================================================================== +$rst = pro_init(); +if ($rst) { + print "Program $program_name initialization failed to exit.\n"; + to_exit(1); } -#if not only load System aspects from config file, then init test enviroment -if (!defined($initallabel)){ - log_this("******************************"); - log_this("Initialize xCAT test evironment"); - log_this("******************************"); - $ret = &init; - if ($ret != 0) { - goto EXIT; +if ( + !GetOptions("h" => \$needhelp, + "f=s" => \$configfile, + "b=s" => \$bundlelist, + "t=s" => \$caselist, + "c=s" => \$cmdlist, + "l=s" => \$list, + "q" => \$quiet, + "r" => \$restore) + ) +{ + log_this($running_log_fd, "$::USAGE"); + to_exit(1); +} + +if ($needhelp) { + log_this($running_log_fd, "$::USAGE"); + to_exit(0); +} + +my $error; +$rst = check_option_validity(\$error); +if ($rst) { + log_this($running_log_fd, "$error", "$::USAGE"); + to_exit(1); +} + +$rst = calculate_cases_to_be_run(\@cases_to_be_run, \$error); +if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); +} + +#print "----case to be run-----------------\n"; +#print Dumper \@cases_to_be_run; + +if ($list) { + if ($list eq "caselist") { + if (@cases_to_be_run) { + + #list the cases indicated by option -b,-c,-t + foreach (@cases_to_be_run) { + log_this($running_log_fd, "$_"); + } + } else { + + #list the cases shipped by xcat test package + $rst = load_case(\@cases_to_be_run, \@cases, \%case_name_index_map, \$error, $NORUN); + if ($rst) { + log_this($running_log_fd, "$error"); + } + foreach my $case (@cases) { + log_this($running_log_fd, "$case->{name}"); + } + } + } elsif ($list eq "caseinfo") { + $rst = show_case_info(\@cases_to_be_run, \$error); + if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); + } + } elsif ($list eq "casenum") { + if (@cases_to_be_run) { + + #list the case number indicated by option -b,-c,-t + my $casenum = @cases_to_be_run; + log_this($running_log_fd, "$casenum"); + } else { + + #list the case number shipped by xcat test package + $rst = load_case(\@cases_to_be_run, \@cases, \%case_name_index_map, \$error, $NORUN); + if ($rst) { + log_this($running_log_fd, "$error"); + } + my $casenum = @cases; + log_this($running_log_fd, "$casenum"); + } + } elsif ($list eq "bundleinfo") { + + #list the bundle information shipped by xcat test package + $rst = show_bundle_info(\$error); + if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); + } + } + to_exit(0); +} + +unless (@cases_to_be_run) { + log_this($running_log_fd, "Please indicate the cases to run by option -b,-c,-t"); + to_exit(1); +} + +if (defined($configfile) && ($configfile =~ /(.*):(System)/)) { + $configfile = $1; + $setup_env_by_config_file = 0; +} + +log_this($running_log_fd, "xCAT automated test started at " . scalar(localtime())); +if (defined($configfile)) { + log_this($running_log_fd, "******************************"); + log_this($running_log_fd, "loading Configure file"); + log_this($running_log_fd, "******************************"); + $rst = load_config_file($configfile, \%config, \$error); + if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); + } +} else { + $setup_env_by_config_file = 0; +} + +if ($restore) { + log_this($running_log_fd, "******************************"); + log_this($running_log_fd, "Backup current xCAT database"); + log_this($running_log_fd, "******************************"); + $rst = bakup_current_env(\$error); + if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); } } -my @filespath = (); -#loading and check cases -log_this("******************************"); -log_this("loading test cases"); -log_this("******************************"); -$ret = &loadcase; -if ($ret != 0) { - goto EXIT; +if ($setup_env_by_config_file) { + log_this($running_log_fd, "******************************"); + log_this($running_log_fd, "Initialize xCAT test environment by definition in configure file"); + log_this($running_log_fd, "******************************"); + $rst = setup_env_by_configure_file(\%config, \$error); + if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); + } } -#run case -log_this("******************************"); -log_this("Start to run test cases"); -log_this("******************************"); -&reordercases if (defined($bundlelist) || defined($caselist)); -&runcase; +log_this($running_log_fd, "******************************"); +log_this($running_log_fd, "loading test cases"); +log_this($running_log_fd, "******************************"); +$rst = load_case(\@cases_to_be_run, \@cases, \%case_name_index_map, \$error, $RUN); +if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); +} + +#print "======Dumper loaded cases=======\n"; +#print Dumper \@cases; +#print "=====Dumper case_name_index_map=======================\n"; +#print Dumper \%case_name_index_map; + +log_this($running_log_fd, "******************************"); +log_this($running_log_fd, "Start to run test cases"); +log_this($running_log_fd, "******************************"); +$rst = run_case(\@cases_to_be_run, \@cases, \%case_name_index_map, \$error); +if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); +} -EXIT: -log_this("******************************"); -log_this("un-initialize xCAT test evironment"); -log_this("******************************"); if ($restore) { - &uninit; + log_this($running_log_fd, "******************************"); + log_this($running_log_fd, "restore xCAT test evironment"); + log_this($running_log_fd, "******************************"); + $rst = restore_current_env(\$error); + if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); + } } -&log_this("\nxCAT automated test finished at " . scalar(localtime())); -&log_this("Please check results in the $resultdir, \nand see $resultdir/failedcases.$timestamp file for failed cases.\nsee $resultdir/performance.report.$timestamp file for time consumption"); -close(LOG); -close(LOG_ERR); -my $reportfile = "$resultdir/performance.report.$timestamp"; -my $tmpreport = "$resultdir/xcattest.log.$timestamp"; -&getreport($tmpreport, $reportfile); +log_this($running_log_fd, "xCAT automated test finished at" . scalar(localtime())); +log_this($running_log_fd, "Please check results in the $resultdir, \nand see $failed_log_name file for failed cases."); + +#To generate performance report +$rst = generate_performance_report($running_log_name, $performance_log_name, \$error); +if ($rst) { + log_this($running_log_fd, "$error"); + to_exit(1); +} +log_this($running_log_fd, "see $performance_log_name file for time consumption"); if ($stop_to_keep_env) { - exit 1; + to_exit(1); } else { - exit 0; + to_exit(0); } -# end main -# -# logger -# +#============================================================================================== +# sub function implementation +#============================================================================================== -sub log_this -{ - print LOG join("\n", @_), "\n"; +#-------------------------------------------------------- +# Fuction name: log_this +# Description: print message to log file and STDOUT. +# Set '-q' option in command line, just print message to log file +# Atrributes: $logdf: the file description of openning log file +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub log_this { + my $logdf = shift; my $msg = join("\n", @_); - if ($msg =~ /\[Pass\]/) { - print color("green"), "$msg\n", color("reset"); - } elsif ($msg =~ /\[Failed\]/) { - print color("red"), "$msg\n", color("reset"); - } else { - print "$msg\n"; - } -} -sub log_error -{ - print LOG_ERR join("\n", @_), "\n"; -} - -sub include_file -{ - my $file = shift; - my $idir = shift; - my @text = (); - unless ($file =~ /^\//) { - $file = $idir . "/" . $file; - } - open(INCLUDE, $file) || return "#INCLUDEBAD:cannot open $file#"; - while () { - chomp($_); - s/\s+$//; #remove trailing spaces - next if /^\s*$/; #-- skip empty lines - push(@text, $_); - } - close(INCLUDE); - return join(",", @text); -} - -sub sort_caserange -{ - my @caserange = @_; - my $bundletext = join(',', @caserange); - #handle the #INLCUDE# tag recursively - my $idir = "$rootdir/bundle"; - my $doneincludes = 0; - while (not $doneincludes) { - $doneincludes = 1; - if ($bundletext =~ /#INCLUDE:[^#^\n]+#/) { - $doneincludes = 0; - $bundletext =~ s/#INCLUDE:([^#^\n]+)#/include_file($1,$idir)/eg; + #print message to STDOUT + if (!$quiet) { + if ($msg =~ /\[Pass\]/) { + print color("green"), "$msg\n", color("reset"); + } elsif ($msg =~ /\[Failed\]/) { + print color("red"), "$msg\n", color("reset"); + } else { + print "$msg\n"; } } - @caserange=split(",",$bundletext); - my @diff; - foreach my $case (@caserange) { - unless (grep { $_ eq $case } @diff) { - push @diff, $case; - } - } - my %index; - my @same = grep($index{$_}++, @caserange); - my @error =grep /INCLUDEBAD/, @caserange; - return (\@diff, \@same, \@error); + + #record message to log file + print $logdf "$msg\n"; + + return 0; } -sub getConfig -{ - my $type = undef; #Script_Prev,Script_Post,Table,Object,System,Custom - my $sub_type = undef; # The string after $type_ - # Script--> - # Script_Prev - # Script_Post - # Table---> - # Table_xxxxx - # Object--> - # Object_xxxx - # System----> - # Custom----> +#-------------------------------------------------------- +# Fuction name: pro_init +# Description: Do program initialization +# Atrributes: +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub pro_init { + mkpath("$resultdir") unless (-d "$resultdir"); - my $name = undef; - my $attr = undef; - my $value = undef; - my $c = 0; - my $cmd = undef; - my $mgt_name = undef; - - if (!open(FILE, "$configfile")) { - log_this("Error: can't open xCAT config file: $configfile"); - return 1; - } - - #Only load System information - if (defined($initallabel) && ($initallabel eq $loadsysteminfo)) { - while (my $line = ) { - $line = &trim($line); - next if (length($line) == 0); + my $timestamp = `date +"%Y%m%d%H%M%S"`; + chomp($timestamp); + $running_log_name = "$resultdir/xcattest.log.$timestamp"; + if (!open($running_log_fd, ">$running_log_name")) { + print "Failed to generate running log file for $program_name: $!\n"; + return 1; + } - #Only read System variable - if ($line =~ /\[System\]/) { - $type = "Varible"; - } - if (defined($type) && ($type eq "Varible")) { - if ($line =~ /(\w+)\s*=\s*([\w\.\-\+\/:]+)/) { - $config{var}{$1} = $2; + $failed_log_name = "$resultdir/failedcases.$timestamp"; + $performance_log_name = "$resultdir/performance.report.$timestamp"; + return 0; +} + +#-------------------------------------------------------- +# Fuction name: calculate_cases_to_be_run +# Description: calculate the case scope to be handle depending on option -b,-c,-t +# Atrributes: +# $cases_to_be_run_ref (output attribe) +# The reference of array to save the cases to be handled +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#------------------------------------------------------- +sub calculate_cases_to_be_run { + my $cases_to_be_run_ref = shift; + my $error_ref = shift; + + my $fd = undef; + my @cases = (); + + $$error_ref = ""; + if ($bundlelist) { + my @bundles = split(",", $bundlelist); + foreach my $bundle (@bundles) { + + #if $bundle doesn't include path information, find $bundle under $bundledir by default + my $bundlepath = dirname($bundle); + if ($bundlepath eq ".") { + $bundle = "$bundledir/$bundle"; + } + if (!-e "$bundle") { + $$error_ref = "There isn't file $bundle\n"; + last; + } + if (!open($fd, "$bundle")) { + $$error_ref = "Can't open file $bundle:$!\n"; + last; + } + while (my $line = <$fd>) { + chomp($line); + $line =~ s/#.+//g if ($line =~ "#" && $line !~ "^#INCLUDE"); + $line =~ s/^\s+|\s+$//g; + next if ((length($line) == 0) || ($line =~ /^description\s*:\s*(.*)/)); + push(@cases, $line); + } + close($fd); + } + + return 1 if (length($$error_ref) != 0); + + #to handle "#INCLUDE:XXXXXXX#" line + my $casetxt = join(',', @cases); + for (; ;) { + if ($casetxt =~ /#INCLUDE:[^#^\n]+#/) { + $casetxt =~ s/#INCLUDE:([^#^\n]+)#/expend_include_file($1)/eg; + } else { + last; + } + } + @cases = split(",", $casetxt); + + my @error = grep /INCLUDEBAD/, @cases; + if (@error) { + $$error_ref = join("\n", @error); + return 1; + } + @{$cases_to_be_run_ref} = @cases; + } elsif ($caselist) { + @cases_to_be_run = split(",", $caselist); + } elsif ($cmdlist) { + my @cmds = split /,/, $cmdlist; + my @files = (); + my @cmdfiles = (); + get_files_recursive("$casedir", \@files); + for (my $countfile = 0 ; $countfile < @files ; $countfile++) { + for (my $countcmd = 0 ; $countcmd < @cmds ; $countcmd++) { + if ($files[$countfile] =~ m/\/$cmds[$countcmd]\/case/) { + push(@cmdfiles, glob("$files[$countfile]")); } - } - } - }else{ - #Load all config files information - while (my $line = ) { - $line = &trim($line); + } + } + + my $fd = undef; + foreach my $file (@cmdfiles) { + if (!open($fd, "<$file")) { + $$error_ref = "can't open $file:$!"; + return 1; + } + while (my $line = <$fd>) { + $line =~ s/^\s+|#[^!].+|\s+$//g; + + #skip blank and comment lines + next if (length($line) == 0 || ($line =~ /^\s*#/)); + if ($line =~ /^start\s*:\s*(.*)/) { + push @{$cases_to_be_run_ref}, $1; + } + } + close($fd); + } + } + return 0; +} + + +#-------------------------------------------------------- +# Fuction name: expend_include_file +# Description: To support '#INCLUDE" label in bundle file, to expend the include file +# Atrributes: $bundle (input attribute): the name of bundle +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub expend_include_file { + my $bundle = shift; + + my $fd = undef; + my $bundlepath = dirname($bundle); + my @cases = (); + + if ($bundlepath eq ".") { + $bundle = "$bundledir/$bundle"; + } + if (!-e "$bundle") { + return "#INCLUDEBAD:cannot find $bundle#"; + } + if (!open($fd, "<$bundle")) { + return "#INCLUDEBAD:cannot open $bundle $!#"; + } + while (my $line = <$fd>) { + chomp($line); + $line =~ s/#.+//g if ($line =~ "#" && $line !~ "^#INCLUDE"); + $line =~ s/^\s+|\s+$//g; + next if ((length($line) == 0) || ($line =~ /^description\s*:\s*(.*)/)); + push(@cases, $line); + } + close($fd); + return join(",", @cases); +} + +#-------------------------------------------------------- +# Fuction name: to_exit +# Description: customize exit function, include clean up environment +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub to_exit { + my $exit_code = shift; + close($running_log_fd) if (defined $running_log_fd); + &runcmd("rm -rf /tmp/xCATdbbackup") if (-d "/tmp/xCATdbbackup"); + exit $exit_code; +} + + +#-------------------------------------------------------- +# Fuction name: check_option_validity +# Description: check the validity of command line +# Atrributes: +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub check_option_validity { + my $error_ref = shift; + + if ($list) { + my @vaild_list_method = (); + if ($bundlelist || $caselist || $cmdlist) { + @vaild_list_method = ("caselist", "caseinfo", "casenum"); + } else { + @vaild_list_method = ("caselist", "caseinfo", "casenum", "bundleinfo"); + } + if (!(grep { /^$list$/ } @vaild_list_method)) { + $$error_ref = "Unsupport list method for option l"; + return 1; + } + } + + return 0; +} + + +#-------------------------------------------------------- +# Fuction name: show_case_info +# Description: to show case name and description +# Atrributes: +# $cases_to_be_run_ref (input attribe) +# The reference of array to save the cases to be handled +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub show_case_info { + my $cases_to_be_run_ref = shift; + my $error_ref = shift; + + my @cases = (); + my %case_name_index_map; + my $rst = load_case($cases_to_be_run_ref, \@cases, \%case_name_index_map, $error_ref, $NORUN); + if ($rst) { + return 1; + } + + #print Dumper \@cases; + my %caseinfo; + my $case_num = @{$cases_to_be_run_ref}; + if ($case_num) { + foreach my $case (@{$cases_to_be_run_ref}) { + my $casedes = "without description"; + $casedes = $cases[ $case_name_index_map{$case} ]->{description} if ($cases[ $case_name_index_map{$case} ]->{description}); + $caseinfo{$case} = $casedes; + } + } else { + foreach my $case (@cases) { + my $casedes = "without description"; + $casedes = $case->{description} if ($case->{description}); + $caseinfo{ $case->{name} } = $casedes; + } + } + print_table(\%caseinfo); + return 0; +} + + +#-------------------------------------------------------- +# Fuction name: show_bundle_info +# Description: show bundle name and description +# Atrributes: +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub show_bundle_info { + my $error_ref = shift; + + my %bundleinfo; + my $dd = undef; + my @bundlefiles = (); + if (!opendir(DIR, $bundledir)) { + $$error_ref = "Can't open directory $bundledir: $!"; + return 1; + } + my @files = readdir(DIR); + foreach my $file (@files) { + next if (-d $file); + next if ($file =~ /^\./); + push(@bundlefiles, $file); + } + closedir(DIR); + + foreach my $bundlefile (@bundlefiles) { + $bundleinfo{$bundlefile} = "without description"; + } + my $fd = undef; + foreach my $bundlefile (@bundlefiles) { + if (!open($fd, "< $bundledir$bundlefile")) { + $$error_ref = "Can't open bundle file $bundledir$bundlefile $!"; + return 1; + } + while (my $line = <$fd>) { + $line =~ s/^\s+|#.+|\s+$//g; + if ($line =~ /^description\s*:\s*(.*)/) { + $bundleinfo{$bundlefile} = $1; + last; + } + } + close($fd); + } + + print_table(\%bundleinfo); + return 0; +} + +#-------------------------------------------------------- +# Fuction name: load_config_file +# Description: load config file indicated by option -f +# Atrributes: +# $configfile (input attribute) +# The config file name +# $config_ref (output attribute) +# The reference of a hash to save the contect of config file +# The hash %config is a global attribute. +# The structure of %config: +# config{object}{type}{name}{attr} +# config{table}{name}{entry}{key} +# config{script_prev}->[] +# config{script_post}->[] +# config{var}{varname} +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub load_config_file { + my $configfile = shift; + my $config_ref = shift; + my $error_ref = shift; + + my $type = undef; + my $sub_type = undef; + my $name = undef; + my $attr = undef; + my $value = undef; + my $c = 0; + my $cmd = undef; + my $mgt_name = undef; + my $fd = undef; + + if (!open($fd, "$configfile")) { + $$error_ref = "Error: can't open xCAT config file $configfile: $!"; + return 1; + } + + while (my $line = <$fd>) { + $line =~ s/^\s+|#.+|\s+$//g; next if (length($line) == 0); #Table name can not contain "_" @@ -315,11 +673,11 @@ sub getConfig if ($line =~ /(\w+)\s*=\s*([\w\.\-]+)/) { $attr = $1; $value = $2; - if ($name && ($config{table}{$sub_type}{$name}{__KEY__} ne $attr)) { - $config{table}{$sub_type}{$name}{$attr} = $value; + if ($name && ($$config_ref{table}{$sub_type}{$name}{__KEY__} ne $attr)) { + $$config_ref{table}{$sub_type}{$name}{$attr} = $value; } else { $name = $value; - $config{table}{$sub_type}{$name}{__KEY__} = $attr; + $$config_ref{table}{$sub_type}{$name}{__KEY__} = $attr; } } } elsif ($type eq "Object") { @@ -330,644 +688,559 @@ sub getConfig if ($attr eq "Name") { $name = $value; } elsif (!defined($name)) { - print "Please give name for Object\n"; - close FILE; + $$error = "Please give name for Object section"; + close($fd); return 1; } else { - $config{object}{$sub_type}{$name}{$attr} = $value; + $$config_ref{object}{$sub_type}{$name}{$attr} = $value; } } } elsif ($type eq "Script") { ##SCRIPT_BLOCK## if ($sub_type eq "Prev") { - $config{script_prev}->[$c] = $line; + $$config_ref{script_prev}->[$c] = $line; $c = $c + 1; } elsif ($sub_type eq "Post") { - $config{script_post}->[$c] = $line; + $$config_ref{script_post}->[$c] = $line; $c = $c + 1; } } elsif ($type eq "Varible") { ##NODE_BLOCK## if ($line =~ /(\w+)\s*=\s*([\w\.\-\+\/:]+)/) { - $config{var}{$1} = $2; + $$config_ref{var}{$1} = $2; } } } -} - if (exists $config{object}) { - foreach my $type (keys %{ $config{object} }) { - foreach my $name (keys %{ $config{object}{$type} }) { - log_this("OBJECT:$name,TYPE:$type"); - foreach my $attr (keys %{ $config{object}{$type}{$name} }) { - log_this(" $attr = $config{object}{$type}{$name}{$attr};"); + if (exists $$config_ref{object}) { + foreach my $type (keys %{ $$config_ref{object} }) { + foreach my $name (keys %{ $$config_ref{object}{$type} }) { + log_this($running_log_fd, "OBJECT:$name,TYPE:$type"); + foreach my $attr (keys %{ $$config_ref{object}{$type}{$name} }) { + log_this($running_log_fd, " $attr = $$config_ref{object}{$type}{$name}{$attr};"); } } } } - if (exists $config{table}) { - foreach my $type (keys %{ $config{table} }) { - log_this("TABLE:$type"); - foreach my $name (keys %{ $config{table}{$type} }) { - log_this(" $config{table}{$type}{$name}{__KEY__} = $name"); - foreach my $attr (keys %{ $config{table}{$type}{$name} }) { + if (exists $$config_ref{table}) { + foreach my $type (keys %{ $$config_ref{table} }) { + log_this($running_log_fd, "TABLE:$type"); + foreach my $name (keys %{ $$config_ref{table}{$type} }) { + log_this($running_log_fd, " $$config_ref{table}{$type}{$name}{__KEY__} = $name"); + foreach my $attr (keys %{ $$config_ref{table}{$type}{$name} }) { if ($attr ne '__KEY__') { - log_this(" $attr = $config{table}{$type}{$name}{$attr}"); + log_this($running_log_fd, " $attr = $$config_ref{table}{$type}{$name}{$attr}"); } } - log_this("\n"); } } } - if (exists $config{script_prev}) { - log_this("Script_Prev:"); - foreach $cmd (@{ $config{script_prev} }) { - log_this(" $cmd"); + if (exists $$config_ref{script_prev}) { + log_this($running_log_fd, "Script_Prev:"); + foreach $cmd (@{ $$config_ref{script_prev} }) { + log_this($running_log_fd, " $cmd"); } } - if (exists $config{script_post}) { - log_this("Script_Post:"); - foreach $cmd (@{ $config{script_post} }) { - log_this(" $cmd"); + if (exists $$config_ref{script_post}) { + log_this($running_log_fd, "Script_Post:"); + foreach $cmd (@{ $$config_ref{script_post} }) { + log_this($running_log_fd, " $cmd"); } } - if (exists $config{var}) { - log_this("Varible:"); - foreach my $varname (keys %{ $config{var} }) { - log_this(" $varname = $config{var}{$varname}"); + if (exists $$config_ref{var}) { + log_this($running_log_fd, "Varible:"); + foreach my $varname (keys %{ $$config_ref{var} }) { + log_this($running_log_fd, " $varname = $$config_ref{var}{$varname}"); } } - close FILE; + close($fd); return 0; } -sub init -{ - if ($restore) { - log_this("******************************"); - log_this("Backup current xCAT database"); - log_this("******************************"); - &runcmd("mkdir -p /tmp/xCATdbbackup"); - &runcmd("dumpxCATdb -p /tmp/xCATdbbackup"); - if ($::RUNCMD_RC != 0) { - &log_this("Fail to backup xCAT database"); - &runcmd("rm -rf /tmp/xCATdbbackup"); - $restore = 0; +#-------------------------------------------------------- +# Fuction name: load_case +# Description: load test case +# Atrributes: +# $cases_to_be_run_ref (input attribe) +# The reference of array to save the cases to be handled +# $case_ref (input attribe) +# The reference of a array of hash to save the contect of case +# The array @cases is a global attribute. +# The struture of @cases are: +# $cases[index]->{name} +# $cases[index]->{os} +# $cases[index]->{arch} +# $cases[index]->{hcp} +# $cases[index]->{type} +# $cases[index]->{stop} +# $cases[index]->{description} +# $cases[index]->{attribute} +# $cases[index]->{cmd}->[index][index] +# $cases[index]->{check}->[index][index] +# $cases[index]->{cmdcheck}->[index][index] +# $case_name_index_map_ref (input attribute) +# The reference of a hash to save the mapping of test name ane its index in @cases +# Due to there maybe is more than one implementation for one case +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# $run_case_flag (input attribute) +# The flag of whether run these case nex. +# 0 means no, just load case basic information, used by "searching informaiotn funtion of xcattest" +# 1 means yes, load case basic information and parse the attribure at the sametime. used by "run case funtion of xcattest" +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub load_case { + my $cases_to_be_run_ref = shift; + my $case_ref = shift; + my $case_name_index_map_ref = shift; + my $error_ref = shift; + my $run_case_flag = shift; + + #if @{$cases_to_be_run_ref} is empty, that means not indicate test case scope by command line option -b,-t,-c + #load all cases shipped by xcat test package + my $load_all_case_flag = 0; + my $case_num = @{$cases_to_be_run_ref}; + $load_all_case_flag = 1 if ($case_num == 0); + + my @files = (); + get_files_recursive("$casedir", \@files); + + my $line; + my $i = 0; + my $j = -1; + my $z = 0; + my $m = 0; + my $newcmdstart = 0; + my $skip = 0; + my $fd = undef; + + my %invalidcases; + my %case_name_index_map_bak; + foreach my $file (@files) { + if (!open($fd, "<$file")) { + $$error_ref = "Can't open $file: $!"; return 1; } - } - my $cmd = undef; - foreach $cmd (@{ $config{script_prev} }) { - log_this("$cmd"); - &runcmd($cmd); - if ($::RUNCMD_RC != 0) { - &log_this("Fail to run $cmd"); - return 1; - } - } - if (exists $config{object}) { - foreach my $type (keys %{ $config{object} }) { - foreach my $name (keys %{ $config{object}{$type} }) { - $cmd = "chdef -t $type -o $name"; - foreach my $attr (keys %{ $config{object}{$type}{$name} }) { - $cmd = $cmd . " $attr=$config{object}{$type}{$name}{$attr}"; - } - log_this($cmd); - runcmd($cmd); - if ($::RUNCMD_RC != 0) { - log_this("Fail to run $cmd"); - return 1; - } - } - } - } - if (exists $config{table}) { - foreach my $type (keys %{ $config{table} }) { - foreach my $name (keys %{ $config{table}{$type} }) { - $cmd = "chtab $config{table}{$type}{$name}{__KEY__}=$name"; - foreach my $attr (keys %{ $config{table}{$type}{$name} }) { - if ($attr ne '__KEY__') { - $cmd = $cmd . " $type.$attr=$config{table}{$type}{$name}{$attr}"; + while ($line = <$fd>) { + $line =~ s/^\s+|#[^!].+|\s+$//g; + + #skip blank and comment lines + next if (length($line) == 0 || ($line =~ /^\s*#/)); + + if ($line =~ /^start\s*:\s*(.*)/) { + my $name = $1; + if ($load_all_case_flag) { + if (is_valid_case_name($name)) { + $skip = 0; + $j = -1; + $case_ref->[$i] = {}; + $case_ref->[$i]->{name} = $name; + $case_ref->[$i]->{filename} = $file; + if(exists($$case_name_index_map_ref{"$name"})){ + $case_name_index_map_bak{"$name"}=$$case_name_index_map_ref{"$name"}; + } + $$case_name_index_map_ref{"$name"} = $i; + $newcmdstart = 0; + } else { + $skip = 1; + push @{ $invalidcases{"invalidcasename"} }, $name; + } + } else { + if (!(grep { /^$name$/ } @{$cases_to_be_run_ref})) { + $skip = 1; + next; + } else { + if (is_valid_case_name($name)) { + $skip = 0; + $j = -1; + $case_ref->[$i] = {}; + $case_ref->[$i]->{name} = $name; + $case_ref->[$i]->{filename} = $file; + if(exists($$case_name_index_map_ref{"$name"})){ + $case_name_index_map_bak{"$name"}=$$case_name_index_map_ref{"$name"}; + } + $$case_name_index_map_ref{"$name"} = $i; + $newcmdstart = 0; + } else { + $skip = 1; + push @{ $invalidcases{"invalidcasename"} }, $name; + } } } - log_this($cmd); - &runcmd($cmd); - if ($::RUNCMD_RC != 0) { - &log_this("Fail to run $cmd"); - return 1; + } elsif ($line =~ /^os\s*:\s*(\w[\w\,]+)/) { + next if $skip; + $case_ref->[$i]->{os} = $1; + + if ($run_case_flag) { + + #To judge whether need to skip the current case + my @validoslist = split(",", $case_ref->[$i]->{os}); + my @newvalidoslist = (); + foreach my $validos (@validoslist) { + if ($validos =~ /linux/i) { + push(@newvalidoslist, ("rhel", "sles", "ubuntu")); + } else { + push(@newvalidoslist, $validos); + } + } + + my $currentos = get_current_os(); + my $valid = 0; + foreach my $os (@newvalidoslist) { + if ($currentos =~ /$os/i) { + $valid = 1; + last; + } + } + unless ($valid) { + #$skip = 1; + if(exists($case_name_index_map_bak{$case_ref->[$i]->{name}})){ + $$case_name_index_map_ref{$case_ref->[$i]->{name}}=$case_name_index_map_bak{$case_ref->[$i]->{name}}; + }else{ + delete $$case_name_index_map_ref{$case_ref->[$i]->{name}}; + } + push @{ $invalidcases{"noruncases"} }, $case_ref->[$i]->{name}; + } + } + $newcmdstart = 0; + } elsif ($line =~ /^arch\s*:\s*(\w[\w\,]+)/) { + next if $skip; + $case_ref->[$i]->{arch} = $1; + + if ($run_case_flag) { + #To judge whether need to skip the current case + my $case_arch = $case_ref->[$i]->{arch}; + if($case_arch =~ /ppc/i && $case_arch !~ /le|el/i){ + $case_arch="ppc"; + }elsif($case_arch =~ /ppc/i && $case_arch =~ /le|el/i){ + $case_arch="ppc64le"; + }elsif($case_arch =~ /x86/i){ + $case_arch="x86"; + } + + my $env_arch = $config{var}{ARCH}; + if($env_arch =~ /ppc/i && $env_arch !~ /le|el/i){ + $env_arch="ppc"; + }elsif($env_arch =~ /ppc/i && $env_arch =~ /le|el/i){ + $env_arch="ppc64le"; + }elsif($env_arch =~ /x86/i){ + $env_arch="x86"; + } + + my $valid = 0; + if ($case_arch eq $env_arch) { + $valid = 1; + } + unless ($valid) { + if(exists($case_name_index_map_bak{$case_ref->[$i]->{name}})){ + $$case_name_index_map_ref{$case_ref->[$i]->{name}}=$case_name_index_map_bak{$case_ref->[$i]->{name}}; + }else{ + delete $$case_name_index_map_ref{$case_ref->[$i]->{name}}; + } + push @{ $invalidcases{"noruncases"} }, $case_ref->[$i]->{name}; + } + } + $newcmdstart = 0; + } elsif ($line =~ /^hcp\s*:\s*(\w[\w\,]+)/) { + next if $skip; + $case_ref->[$i]->{hcp} = $1; + if ($run_case_flag) { + #To judge whether need to skip the current case + my $valid = 0; + if ($case_ref->[$i]->{hcp} =~ /$config{var}{HCP}/i) { + $valid = 1; + } + unless ($valid) { + if(exists($case_name_index_map_bak{$case_ref->[$i]->{name}})){ + $$case_name_index_map_ref{$case_ref->[$i]->{name}}=$case_name_index_map_bak{$case_ref->[$i]->{name}}; + }else{ + delete $$case_name_index_map_ref{$case_ref->[$i]->{name}}; + } + push @{ $invalidcases{"noruncases"} }, $case_ref->[$i]->{name}; + } + } + $newcmdstart = 0; + } elsif ($line =~ /^type\s*:\s*(\w[\w\,-]+)/) { + next if $skip; + $case_ref->[$i]->{type} = $1; + $newcmdstart = 0; + } elsif ($line =~ /^stop\s*:\s*(\w[\w\,]+)/) { + next if $skip; + $case_ref->[$i]->{stop} = $1; + $newcmdstart = 0; + } elsif ($line =~ /^description\s*:\s*(.+)/) { + next if $skip; + $case_ref->[$i]->{description} = $1; + $newcmdstart = 0; + } elsif ($line =~ /^attribute\s*:\s*(\w[\w\,]+)/) { + next if $skip; + $case_ref->[$i]->{attribute} = $1; + $newcmdstart = 0; + } elsif ($line =~ /^cmd\s*:\s*([\#\/\$\w].+)/) { + next if $skip; + $newcmdstart = 0; + $j = $j + 1; + $z = 0; + $m = 0; + if ($run_case_flag) { + $case_ref->[$i]->{cmd}->[$j][$m] = getvar($1, \%config); + if ($case_ref->[$i]->{cmd}->[$j][$m] =~ /miss attribute/) { + my $errlog = "$case_ref->[$i]->{name} $case_ref->[$i]->{cmd}->[$j][$m]"; + if (!(grep /$errlog/, @{ $invalidcases{"missattr"} })) { + push @{ $invalidcases{"missattr"} }, $errlog; + } + } + } else { + $case_ref->[$i]->{cmd}->[$j][$m] = $1; + } + $newcmdstart = 1; + } elsif ($line =~ /^check\s*:\s*(\w.+)/) { + next if $skip; + if ($run_case_flag) { + $case_ref->[$i]->{check}->[$j][$z] = getvar($1, \%config); + if ($case_ref->[$i]->{check}->[$j][$z] =~ /miss attribute/) { + my $errlog = "$case_ref->[$i]->{name} $case_ref->[$i]->{check}->[$j][$z]"; + if (!(grep /$errlog/, @{ $invalidcases{"missattr"} })) { + push @{ $invalidcases{"missattr"} }, $errlog; + } + } + } else { + $case_ref->[$i]->{check}->[$j][$z] = $1; + } + $z = $z + 1; + $newcmdstart = 0; + } elsif ($line =~ /^cmdcheck\s*:\s*(\w.+)/) { + next if $skip; + if ($run_case_flag) { + $case_ref->[$i]->{cmdcheck}->[$j][$z] = getvar($1, \%config); + if ($case_ref->[$i]->{cmdcheck}->[$j][$z] =~ /miss attribute/) { + my $errlog = "$case_ref->[$i]->{name} $case_ref->[$i]->{cmdcheck}->[$j][$z]"; + if (!(grep /$errlog/, @{ $invalidcases{"missattr"} })) { + push @{ $invalidcases{"missattr"} }, $errlog; + } + } + } else { + $case_ref->[$i]->{cmdcheck}->[$j][$z] = $1; + } + $z = $z + 1; + $newcmdstart = 0; + } elsif ($line =~ /^end/) { + next if $skip; + $i = $i + 1; + $newcmdstart = 0; + } elsif ($newcmdstart) { + ++$m; + $case_ref->[$i]->{cmd}->[$j][$m] = $line; + } + } + close($fd); + } + + my @wrong_cases = (); + my $caseerror = 0; + if ($invalidcases{"invalidcasename"}) { + + #log_this($running_log_fd, "Case name invalid:", @{ $invalidcases{"invalidcasename"} }); + $$error_ref = "Case name invalid: " . join(",", @{ $invalidcases{"invalidcasename"} }); + push @wrong_cases, @{ $invalidcases{"invalidcasename"} }; + $caseerror = 1; + } + + if ($run_case_flag) { + if ($invalidcases{"missattr"}) { + + #log_this($running_log_fd, "Miss attribute:", @{$invalidcases{"missattr"}}); + $$error_ref = "Miss attribute: " . join(",", @{ $invalidcases{"missattr"} }); + foreach my $line (@{ $invalidcases{"missattr"} }) { + my @name = split(" ", $line); + if (!(grep /$name[0]/, @wrong_cases)) { + push @wrong_cases, $name[0]; } } + $caseerror = 1; } - } - if (!exists $config{var}{OS}) { - my @output = runcmd("uname"); - $config{var}{OS} = $output[0]; - log_this("Detecting: OS = $config{var}{OS}"); - } else { - $config{var}{OS} = lc($config{var}{OS}); - } + if ($invalidcases{"noruncases"}) { + log_this($running_log_fd, "Not to run:", @{ $invalidcases{"noruncases"} }); + push @wrong_cases, @{ $invalidcases{"noruncases"} }; + } - if (!exists $config{var}{ARCH}) { - if (!exists $config{var}{CN}) { - $config{var}{ARCH} = "Unknown"; - log_this("Error: No compute node defined, can't get ARCH of compute node"); - } else { - $config{var}{ARCH} = getnodeattr($config{var}{CN}, "arch"); - if ($config{var}{ARCH} =~ /ppc/) { - $config{var}{ARCH} = 'ppc'; - } elsif ($config{var}{ARCH} =~ /86/) { - $config{var}{ARCH} = 'x86'; + unless ($caseerror) { + my @new_cases_to_be_run = (); + foreach my $c (@{$cases_to_be_run_ref}) { + if (!(grep { /^$c$/ } @wrong_cases)) { + push @new_cases_to_be_run, $c; + } } - log_this("Detecting: ARCH = $config{var}{ARCH}"); + log_this($running_log_fd, "To run:", @new_cases_to_be_run); + #@{$cases_to_be_run_ref} = @new_cases_to_be_run; } } - if (!exists $config{var}{HCP}) { - if (!exists $config{var}{CN}) { - $config{var}{HCP} = "Unknown"; - log_this("Error: No compute node defined, can't get HCP TYPE of compute node"); - } else { - $config{var}{HCP} = getnodeattr($config{var}{CN}, "mgt"); - log_this("Detecting: HCP = $config{var}{HCP}"); - } + return $caseerror; +} +#-------------------------------------------------------- +# Fuction name: bakup_current_env +# Description: back up the xcat db +# Atrributes: +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub bakup_current_env { + my $error_ref = shift; + &runcmd("mkdir -p /tmp/xCATdbbackup"); + &runcmd("dumpxCATdb -p /tmp/xCATdbbackup"); + if ($::RUNCMD_RC != 0) { + $$error_ref = "Fail to backup xCAT database"; + &runcmd("rm -rf /tmp/xCATdbbackup"); + return 1; } return 0; } -sub uninit -{ - my $cmd = undef; - - # if(exists $config{object}){ - # foreach my $type (keys %{$config{object}}){ - # foreach my $name (keys %{$config{object}{$type}}){ - # $cmd = "rmdef -t $type -o $name"; - # log_this($cmd); - # runcmd($cmd); - # if($::RUNCMD_RC != 0){ - # log_this("Fail to run $cmd"); - # return 1; - # } - # } - # } - # } - # if(exists $config{table}){ - # foreach my $type (keys %{$config{table}}){ - # foreach my $name (keys %{$config{table}{$type}}){ - # $cmd = "chtab -d $config{table}{$type}{$name}{__KEY__}=$name $type"; - # log_this($cmd); - # runcmd($cmd); - # if($::RUNCMD_RC != 0){ - # log_this("Fail to run $cmd"); - # return 1; - # } - # } - # } - # } - foreach $cmd (@{ $config{script_post} }) { - log_this($cmd); - runcmd($cmd); - if ($::RUNCMD_RC != 0) { - log_this("Error: Fail to run $cmd"); - return 1; - } - } - +#-------------------------------------------------------- +# Fuction name: restore_current_env +# Description: restore the xcat db +# Atrributes: +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub restore_current_env { + my $error_ref = shift; &runcmd("restorexCATdb -p /tmp/xCATdbbackup"); &runcmd("rm -rf /tmp/xCATdbbackup"); return 0; } -sub Get_Files_Recursive -{ - my $dir = $_[0]; - foreach $dir (@_) - { - opendir(my $d, $dir); - for (; ;) - { - my $direntry = readdir($d); - last unless defined $direntry; - next if $direntry =~ m/^\.\w*/; - next if $direntry eq '..'; - if (-d $dir . "/" . $direntry) - { - Get_Files_Recursive($dir . "/" . $direntry); - } - else - { my $dirpath = $dir . '/' . $direntry . "\n"; - #print $dirpath; +#-------------------------------------------------------- +# Fuction name: run_case +# Description: +# Atrributes: +# $cases_to_be_run_ref (input attribe) +# The reference of array to save the cases to be handled +# $case_ref (input attribe) +# The reference of a array of hash to save the contect of case +# The array @cases is a global attribute. +# Please refer load_case function's comment to get the struture of @cases +# $case_name_index_map_ref (input attribute) +# The reference of a hash to save the mapping of test name ane its index in @cases +# Due to there maybe is more than one implementation for one case +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub run_case { + my $cases_to_be_run_ref = shift; + my $cases_ref = shift; + my $case_name_index_map_ref = shift; + my $error_ref = shift; - #print $dir."\n"; - push(@filespath, glob("$dirpath")); - - } - } - closedir($d); - } -} - -sub loadcase -{ - my @files = (); - - #if($cmdlist){ - # my @cmds = split /,/,$cmdlist; - # for my $cmd (@cmds){ - # push (@files, glob("$casedir/$cmd/*")); - # } - #} else { - # @files = glob("$casedir/*/*"); - #} - Get_Files_Recursive("$casedir"); - for (my $countfile = 0 ; $countfile < @filespath ; $countfile++) - { - #TODO:if commands are not right, no action or message now - if ($cmdlist) { - my @cmds = split /,/, $cmdlist; - for (my $countcmd = 0 ; $countcmd < @cmds ; $countcmd++) { - if ($filespath[$countfile] =~ m/\/$cmds[$countcmd]\/case/) { - push(@files, glob("$filespath[$countfile]")); - } - } - } else { - push(@files, glob("$filespath[$countfile]")); - } - } - - - my $file; - my $line; - my $i = 0; - my $j = -1; - my $z = 0; - my $skip = 0; - - my @caserange = (); - my @rightcase = (); - my @notrightcase = (); - my @wrongnamecase= (); - my @samecase = (); - my @errorcase = (); - if ($bundlelist) { - my @bundles = split /,/, $bundlelist; - foreach my $bundle (@bundles) { - if (!open(FILE, "<$bundledir/$bundle")) { - log_this("can't open $bundledir/$bundle"); - return 1; - } - while ($line = ) { - chomp($line); - next if (length($line) == 0); - push(@caserange, $line); - } - close(FILE); - my @refs=sort_caserange(@caserange); - @caserange=@{$refs[0]}; - @samecase=@{$refs[1]}; - @errorcase=@{$refs[2]}; - } - } - - #TODO:if cases are not existed, no action or message. - if ($caselist) { - @caserange = split /,/, $caselist; - } - - foreach $file (@files) { - if (!open(FILE, "<$file")) { - log_this("can't open $file"); - return 1; - } - while ($line = ) { - $line = &trim($line); - next if (length($line) == 0); - - #skip comment lines - next if ($line =~ /^\s*#/); - - #TODO: description and attribute line is treated as a comment line for now - next if ($line =~ /^description\s*:/); - next if ($line =~ /^attribute\s*:/); - - if ($line =~ /^start\s*:\s*(.*)/) { - my $name =$1; - if ($name =~ /[^a-zA-Z0-9_-]/) { - $skip = 1; - push(@wrongnamecase, $name); - next; - }else { - $skip = 0; - if ($caserange[0] && !(grep { /^$name$/ } @caserange)) { - $skip = 1; - next; - } - $j = -1; - $cases[$i] = {}; - $cases[$i]->{name} = $name; - $cases[$i]->{filename} = $file; - if (!$needshow) { - $cases[$i]->{cmd} = []; - $cases[$i]->{check} = []; - $cases[$i]->{cmdcheck} = []; - push(@rightcase, $name); - } else { - $skip = 1; - $i = $i + 1; - } - } - } elsif ($line =~ /^os\s*:\s*(\w[\w\,]+)/) { - next if $skip; - $string1 = $1; - if ($string1 =~ /^rhels\s*/ && -f "/etc/redhat-release") { - $cases[$i]->{os} = "rhels"; - } elsif ($string1 =~ /^sles\s*/ && -f "/etc/SuSE-release") { - $cases[$i]->{os} = "sles"; - } elsif ($string1 =~ /^ubuntu\s*/ && -f "/etc/lsb-release") { - $cases[$i]->{os} = "ubuntu"; - } - else { - $cases[$i]->{os} = $string1; - - } - - chomp($cases[$i]->{os}); - chomp($config{var}{OS}); - if ($cases[$i]->{os} !~ /$config{var}{OS}/) { - if ((($config{var}{OS} =~ /^Linux\s*/i) && ($cases[$i]->{os} =~ /^aix\s*/i)) || (($config{var}{OS} =~ /^aix\s*/i) && ($cases[$i]->{os} !~ /^aix\s*/i)) || (($config{var}{OS} =~ /^rhels\s*/i) && ($cases[$i]->{os} !~ /^Linux\s*/i)) || (($config{var}{OS} =~ /^sles\s*/i) && ($cases[$i]->{os} !~ /^Linux\s*/i)) || (($config{var}{OS} =~ /^ubuntu\s*/i) && ($cases[$i]->{os} !~ /^Linux\s*/i))) { - push(@notrightcase, $cases[$i]->{name}); - pop(@rightcase); - $skip = 1; - } - } - - } elsif ($line =~ /^arch\s*:\s*(\w[\w\,]+)/) { - next if $skip; - $cases[$i]->{arch} = $1; - if ($cases[$i]->{arch} !~ /$config{var}{ARCH}/) { - push(@notrightcase, $cases[$i]->{name}); - pop(@rightcase); - $skip = 1; - } - } elsif ($line =~ /^hcp\s*:\s*(\w[\w\,]+)/) { - next if $skip; - $cases[$i]->{hcp} = $1; - if ($cases[$i]->{hcp} !~ /$config{var}{HCP}/) { - push(@notrightcase, $cases[$i]->{name}); - pop(@rightcase); - $skip = 1; - } - } elsif ($line =~ /^type\s*:\s*(\w[\w\,-]+)/) { - next if $skip; - $cases[$i]->{type} = $1; - if ($cases[$i]->{type} !~ /$config{var}{TYPE}/) { - push(@notrightcase, $cases[$i]->{name}); - pop(@rightcase); - $skip = 1; - } - } elsif ($line =~ /^stop\s*:\s*(\w[\w\,]+)/) { - next if $skip; - $cases[$i]->{stop} = $1; - } elsif ($line =~ /^cmd\s*:\s*([\/\$\w].+)/) { - next if $skip; - $j = $j + 1; - $z = 0; - $cases[$i]->{cmd}->[$j] = &getvar($1); - if ($cases[$i]->{cmd}->[$j] eq '') { - close(FILE); - return 1; - } - } elsif ($line =~ /^check\s*:\s*(\w.+)/) { - next if $skip; - $cases[$i]->{check}->[$j][$z] = &getvar($1); - if ($cases[$i]->{check}->[$j][$z] eq '') { - close(FILE); - return 1; - } - $z = $z + 1; - } elsif ($line =~ /^cmdcheck\s*:\s*(\w.+)/) { - next if $skip; - $cases[$i]->{cmdcheck}->[$j][$z] = &getvar($1); - if ($cases[$i]->{cmdcheck}->[$j][$z] eq '') { - close(FILE); - return 1; - } - $z = $z + 1; - } elsif ($line =~ /^end/) { - next if $skip; - $i = $i + 1; - } - } - - close(FILE); - } - - if ($needshow) { - if (@cases) { - foreach my $case (@cases) { - log_this("$case->{name}"); - } - }else { - log_this("Error: Please check the case name or command name"); - } - log_this("Case name not supported:", @wrongnamecase) if (@wrongnamecase); - return 0; - } - - if (@rightcase) { - log_this("To run:", @rightcase); - }else { - log_this("Error: No case to run, please check the case name or command name"); - } - log_this("Not to run:", @notrightcase) if (@notrightcase); - log_this("Duplicated case:", @samecase) if (@samecase); - log_this("INCLUDEBAD case:", @errorcase) if (@errorcase); - log_this("Case name not supported:", @wrongnamecase) if (@wrongnamecase); - return 0; -} -sub getnodeattr -{ - my ($node, $attr) = @_; - my @output = runcmd("lsdef -t node -o $node -i $attr"); - my $t; - if ($::RUNCMD_RC) { - - # return "Unknown"; - foreach $t (1 .. 40) { - log_this("Error: could not get node attr $attr "); - @output = runcmd("lsdef -t node -o $node -i $attr"); - last if ($::RUNCMD_RC == 0); - } - - } - if ($::RUNCMD_RC == 0) { - foreach my $output1 (@output) { - if ($output1 =~ /$attr=(\w.+)/) { - log_this("$attr is $1"); - return $1; - } - } - } - return "Unknown"; -} - -sub gettablevalue -{ - my ($keyname, $key, $colname, $table) = @_; - my @output = runcmd("gettab $keyname=$key $table\.$colname"); - return $output[0]; -} - -#to remove space and comment -sub trim -{ - my $str = shift @_; - if ($str) { - - # $str =~ s/\#/__wellnumber__/g; - $str =~ s/^\s+|#.+|\s+$//g; - - # $str =~ s/__wellnumber__/#/g; - } - return $str; -} - -sub getvar -{ - my $str = shift @_; - while ($str =~ /\$\$(\w+)/) { - my $varname = $1; - if (exists($config{var}{$varname})) { - $str =~ s/\$\$$varname/$config{var}{$varname}/g; - } else { - log_this("Error: can't get varible $varname"); - return ''; - } - } - return $str; -} - -sub getfunc -{ - my $str = shift @_; - my $func = undef; - my @para = (); - my $parameter = undef; - my $value = undef; - while ($str =~ /__(\w+)\(([\s\,\w\$]*)\)__/) { - $func = $1; - $parameter = $2; - log_this("parameter is $parameter,fun is $func"); - @para = split /\s*,\s*/, trim($parameter); - if ($func eq "GETNODEATTR") { - $value = getnodeattr(@para); - log_this("value is $value"); - if ($value eq "Unknown") { - $value = ''; - } - } elsif ($func eq "INC") { - $value = $para[0] + 1; - } elsif ($func eq "GETTABLEVALUE") { - $value = gettablevalue(@para); - } - $str =~ s/__$func\($parameter\)__/$value/g; - } - return $str; -} - -sub runcase -{ - my @output = (); - my $rc = 0; - my $j = 0; - my $z = 0; - my $lvalue = undef; - my $rvalue = undef; - my $op = undef; - my $failed = 0; my $total = 0; my $failnum = 0; - foreach my $case (@cases) { - my @record = (); - $failed = 0; - $j = 0; - $total = $total + 1; - my $now1 = timelocal(localtime()); - my $time1 = scalar(localtime()); - log_this("------START:$$case{name}::Time:$time1------"); - push @record, "------START:$$case{name}::Time:$time1------"; - push @record, "FILENAME:$$case{filename}"; - foreach my $cmd (@{ $$case{cmd} }) { - $cmd = getfunc($cmd); + my $failed_log_fd = undef; + if (!open($failed_log_fd, ">$failed_log_name")) { + $error_ref = "Failed to generate failed log file for $program_name: $!"; + return 1; + } - #by - my $runstart = timelocal(localtime()); + foreach my $case (@{$cases_to_be_run_ref}) { + my @caselog = (); + + my $failflag = 0; + my $j = 0; + ++$total; + + my $case_start_time = timelocal(localtime()); + my $case_start_time_str = scalar(localtime()); + + log_this($running_log_fd, "------START::$cases_ref->[$case_name_index_map_ref->{$case}]->{name}::Time:$case_start_time_str------\n"); + push @caselog, "------START::$cases_ref->[$case_name_index_map_ref->{$case}]->{name}::Time:$case_start_time_str------\n"; + push @caselog, "FILENAME:$cases_ref->[$case_name_index_map_ref->{$case}]->{filename}\n"; + + foreach my $cmd (@{ $cases_ref->[ $case_name_index_map_ref->{$case} ]->{cmd} }) { + + my $runstart = timelocal(localtime()); my $runstartstr = scalar(localtime()); - log_this("\nRUN:$cmd [$runstartstr]"); - push(@record, "\nRUN:$cmd [$runstartstr]"); - @output = &runcmd($cmd); - $rc = $::RUNCMD_RC; + my $cmdlen = @{$cmd}; + my @output = (); + my $rc = 0; + if ($cmdlen == 1) { + + #to run single line command + + $cmd->[0] = getfunc($cmd->[0]); + @output = &runcmd($cmd->[0]); + $rc = $::RUNCMD_RC; + log_this($running_log_fd, "RUN:$cmd->[0] [$runstartstr]"); + push(@caselog, "RUN:$cmd->[0] [$runstartstr]"); + } else { + + #to run multiple lines command + + @output = runscript($cmd); + $rc = $::RUNCMD_RC; + log_this($running_log_fd, "RUN: [$runstartstr]", @{$cmd}); + push(@caselog, ("RUN: [$runstartstr]", @{$cmd})); + } - #by my $runstop = timelocal(localtime()); my $diffduration = $runstop - $runstart; - log_this("\n[$cmd] Running Time:$diffduration sec"); - push(@record, ("\n[$cmd] Running Time:$diffduration sec")); + log_this($running_log_fd, ("ElapsedTime:$diffduration sec", "RETURN rc = $rc", "OUTPUT:", @output)); + push(@caselog, ("ElapsedTime:$diffduration sec", "RETURN rc = $rc", "OUTPUT:", @output)); - log_this("RETURN: rc = $rc", "OUTPUT:", @output); - push(@record, ("RETURN rc = $rc", "OUTPUT:", @output)); + foreach my $check (@{ $cases_ref->[ $case_name_index_map_ref->{$case} ]->{check}->[$j] }) { + last if ($failflag); - - foreach my $check (@{ $$case{check}->[$j] }) { - if ($failed) { - last; - } if ($check =~ /rc\s*([=!]+)\s*(\d+)/) { - $lvalue = $rc; - $op = $1; - $rvalue = $2; + my $lvalue = $rc; + my $op = $1; + my $rvalue = $2; if ((($op eq '!=') && ($lvalue == $rvalue)) || (($op eq '==') && ($lvalue != $rvalue))) { - $failed = 1; + $failflag = 1; } - if ($failed) { - log_this("CHECK:rc $op $rvalue\t[Failed]"); - push(@record, "CHECK:rc $op $rvalue\t[Failed]"); + if ($failflag) { + log_this($running_log_fd, "CHECK:rc $op $rvalue\t[Failed]"); + push(@caselog, "CHECK:rc $op $rvalue\t[Failed]"); last; } else { - log_this("CHECK:rc $op $rvalue\t[Pass]"); - push(@record, "CHECK:rc $op $rvalue\t[Pass]"); + log_this($running_log_fd, "CHECK:rc $op $rvalue\t[Pass]"); + push(@caselog, "CHECK:rc $op $rvalue\t[Pass]"); } } elsif ($check =~ /output\s*([=!~]+)\s*(\S.*)/ && $check !~ /output\s*([=!~])\1/) { - $lvalue = join("\n", @output); - $op = $1; - $rvalue = $2; + my $lvalue = join("\n", @output); + my $op = $1; + my $rvalue = $2; + $rvalue = getfunc($rvalue); if ((($op eq '=~') && ($lvalue !~ /$rvalue/)) || (($op eq '!~') && ($lvalue =~ /$rvalue/)) || (($op eq '==') && ($lvalue ne $rvalue)) || (($op eq '!=') && ($lvalue eq $rvalue))) { - $failed = 1; + $failflag = 1; } - if ($failed) { - log_this("CHECK:output $op $rvalue\t[Failed]"); - push(@record, "CHECK:output $op $rvalue\t[Failed]"); + if ($failflag) { + log_this($running_log_fd, "CHECK:output $op $rvalue\t[Failed]"); + push(@caselog, "CHECK:output $op $rvalue\t[Failed]"); last; } else { - log_this("CHECK:output $op $rvalue\t[Pass]"); - push(@record, "CHECK:output $op $rvalue\t[Pass]"); + log_this($running_log_fd, "CHECK:output $op $rvalue\t[Pass]"); + push(@caselog, "CHECK:output $op $rvalue\t[Pass]"); } } elsif ($check =~ /output\s*~~\s*(\S.*)/) { - $op = "~~"; - $failed = 1; - $rvalue = $1; + my $op = "~~"; + + #my $failflag = 1; + my $rvalue = $1; + $rvalue = getfunc($rvalue); my $num; if ($rvalue =~ /(\d+)/) { @@ -982,7 +1255,7 @@ sub runcase my $min = $num * 0.9; $line =~ /.*:.*: (\d+) /; if ($1 < $max && $1 > $min) { - $failed = 0; + $failflag = 0; last; } } else { @@ -990,54 +1263,167 @@ sub runcase } } } - if ($failed) { - log_this("CHECK:output $op $rvalue $num\t[Failed]"); - push(@record, "CHECK:output $op $rvalue\t[Failed]"); + if ($failflag) { + log_this($running_log_fd, "CHECK:output $op $rvalue\t[Failed]"); + push(@caselog, "CHECK:output $op $rvalue\t[Failed]"); last; } else { - log_this("CHECK:output $op $rvalue $num\t[Pass]"); - push(@record, "CHECK:output $op $rvalue\t[Pass]"); - } - } - } - foreach my $cmdcheck (@{ $$case{cmdcheck}->[$j] }) { + log_this($running_log_fd, "CHECK:output $op $rvalue\t[Pass]"); + push(@caselog, "CHECK:output $op $rvalue\t[Pass]"); + } } } + foreach my $cmdcheck (@{ $cases_ref->[ $case_name_index_map_ref->{$case} ]->{cmdcheck}->[$j] }) { if ($cmdcheck) { &runcmd($cmdcheck); $rc = $::RUNCMD_RC; - if ($rc == 1) { - log_this("CMDCHECK:output $cmdcheck\t[Failed]"); - push(@record, "CHECK:output $cmdcheck\t[Failed]"); + if ($rc != 0 ) { + $failflag = 1; + log_this($running_log_fd, "CHECK:output $cmdcheck\t[Failed]"); + push(@caselog, "CHECK:output $cmdcheck\t[Failed]"); } elsif ($rc == 0) { - log_this("CMDCHECK:output $cmdcheck\t[Pass]"); - push(@record, "CHECK:output $cmdcheck\t[Pass]"); + log_this($running_log_fd, "CHECK:output $cmdcheck\t[Pass]"); + push(@caselog, "CHECK:output $cmdcheck\t[Pass]"); } } } $j = $j + 1; + log_this($running_log_fd, " "); + push(@caselog, " "); } - my $now2 = timelocal(localtime()); - my $time2 = scalar(localtime()); - my $diff = $now2 - $now1; - if ($failed) { - log_this("------END::$$case{name}::Failed::Time:$time2 ::Duration::$diff sec------"); - push(@record, "------END::$$case{name}::Failed::Time:$time2 ::Duration::$diff sec------"); + my $case_end_time = timelocal(localtime()); + my $case_end_time_str = scalar(localtime()); + my $diff = $case_end_time - $case_start_time; + + if ($failflag) { + log_this($running_log_fd, "------END::$cases_ref->[$case_name_index_map_ref->{$case}]->{name}::Failed::Time:$case_end_time_str ::Duration::$diff sec------"); + push(@caselog, "------END::$cases_ref->[$case_name_index_map_ref->{$case}]->{name}::Failed::Time:$case_end_time_str ::Duration::$diff sec------"); } else { - log_this("------END::$$case{name}::Passed::Time:$time2 ::Duration::$diff sec------"); - push(@record, "------END::$$case{name}::Passed::Time:$time2 ::Duration::$diff sec------"); + log_this($running_log_fd, "------END::$cases_ref->[$case_name_index_map_ref->{$case}]->{name}::Passed::Time:$case_end_time_str ::Duration::$diff sec------"); + push(@caselog, "------END::$cases_ref->[$case_name_index_map_ref->{$case}]->{name}::Passed::Time:$case_end_time_str ::Duration::$diff sec------"); } - if ($failed) { - $failnum = $failnum + 1; - log_error(@record); - if (defined($$case{stop}) && ($$case{stop} =~ /^yes$/)) { + + if ($failflag) { + ++$failnum; + print $failed_log_fd (join("\n", @caselog), "\n"); + if (defined($cases_ref->[ $case_name_index_map_ref->{$case} ]->{stop}) && ($cases_ref->[ $case_name_index_map_ref->{$case} ]->{stop} =~ /^yes$/)) { $stop_to_keep_env = 1; last; } } } - log_this("\n\n"); - log_this("------Total: $total , Failed: $failnum------"); + + log_this($running_log_fd, "------Total: $total , Failed: $failnum------\n"); + close($failed_log_fd); + return 0; } +#-------------------------------------------------------- +# Fuction name: setup_env_by_configure_file +# Description: set up environment by the settings in config file +# Atrributes: +# $config_ref (input attribute) +# The reference of global hash %config. +# The structure of %config please refer to the comment of function load_config_file +# $error_ref (output attribe) +# The reference of scalar to save the error message generated during running current function +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub setup_env_by_configure_file { + my $config_ref = shift; + my $error_ref = shift; + + my $cmd = undef; + foreach $cmd (@{ $$config_ref{script_prev} }) { + log_this($running_log_fd, "$cmd"); + &runcmd($cmd); + if ($::RUNCMD_RC != 0) { + $$error_ref = "Fail to run $cmd"; + return 1; + } + } + + if (exists $$config_ref{object}) { + foreach my $type (keys %{ $$config_ref{object} }) { + foreach my $name (keys %{ $$config_ref{object}{$type} }) { + $cmd = "chdef -t $type -o $name"; + foreach my $attr (keys %{ $$config_ref{object}{$type}{$name} }) { + $cmd = $cmd . " $attr=$$config_ref{object}{$type}{$name}{$attr}"; + } + log_this($running_log_fd, "$cmd"); + runcmd($cmd); + if ($::RUNCMD_RC != 0) { + $$error_ref = "Fail to run $cmd"; + return 1; + } + } + } + } + + if (exists $$config_ref{table}) { + foreach my $type (keys %{ $$config_ref{table} }) { + foreach my $name (keys %{ $$config_ref{table}{$type} }) { + $cmd = "chtab $$config_ref{table}{$type}{$name}{__KEY__}=$name"; + foreach my $attr (keys %{ $$config_ref{table}{$type}{$name} }) { + if ($attr ne '__KEY__') { + $cmd = $cmd . " $type.$attr=$$config_ref{table}{$type}{$name}{$attr}"; + } + } + log_this($running_log_fd, "$cmd"); + &runcmd($cmd); + if ($::RUNCMD_RC != 0) { + $$error_ref = "Fail to run $cmd"; + return 1; + } + } + } + } + + if (!exists $$config_ref{var}{OS}) { + my @output = runcmd("uname"); + $$config_ref{var}{OS} = $output[0]; + log_this($running_log_fd, "Detecting: OS = $$config_ref{var}{OS}"); + } else { + $$config_ref{var}{OS} = lc($$config_ref{var}{OS}); + } + + if (!exists $$config_ref{var}{ARCH}) { + if (!exists $$config_ref{var}{CN}) { + $$config_ref{var}{ARCH} = "Unknown"; + log_this($running_log_fd, "Warning: No compute node defined, can't get ARCH of compute node"); + } else { + $$config_ref{var}{ARCH} = getnodeattr($$config_ref{var}{CN}, "arch"); + if ($$config_ref{var}{ARCH} =~ /le|el/) { + $$config_ref{var}{ARCH} = 'ppc64le'; + } elsif ($$config_ref{var}{ARCH} =~ /ppc/) { + $$config_ref{var}{ARCH} = 'ppc'; + } elsif ($$config_ref{var}{ARCH} =~ /86/) { + $$config_ref{var}{ARCH} = 'x86'; + } + log_this($running_log_fd, "Detecting: ARCH = $$config_ref{var}{ARCH}"); + } + } + + if (!exists $$config_ref{var}{HCP}) { + if (!exists $$config_ref{var}{CN}) { + $$config_ref{var}{HCP} = "Unknown"; + log_this($running_log_fd, "Warning: No compute node defined, can't get HCP TYPE of compute node"); + } else { + $$config_ref{var}{HCP} = getnodeattr($$config_ref{var}{CN}, "mgt"); + log_this($running_log_fd, "Detecting: HCP = $$config_ref{var}{HCP}"); + } + + } + + return 0; +} + +#-------------------------------------------------------- +# 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) = @_; @@ -1056,91 +1442,269 @@ sub runcmd } -sub usage -{ - log_this("Usage:Run xcat test cases:"); - log_this(" xcattest [-?|-h]"); - log_this(" xcattest [-f configure file] [-b case bundle files]"); - log_this(" xcattest [-f configure file] [-t cases list]"); - log_this(" xcattest [-f configure file] [-c cmds list]"); - log_this("Show xcat test cases, bundle files, commands lists:"); - log_this(" xcattest [-b case bundle files] [-l]"); - log_this(" xcattest [-t cases list] [-l]"); - log_this(" xcattest [-c cmds list] [-l]"); - log_this("Show all bundle files, all commands:"); - log_this(" xcattest [-s command|bundle]"); - log_this(""); - return; + +#-------------------------------------------------------- +# Fuction name: runscript +# Description: run a script after 'cmd' label in one case +# Atrributes: +# $script_ref (input attribute) +# the reference of array where save every line of script +# Retrun code: +# $::RUNCMD_RC : the return code of command +# @$outref : the output of command +#-------------------------------------------------------- +sub runscript { + my $script_ref = shift; + my $time = time(); + my $tmpdir = "/tmp/xCATautotest$time/"; + my $tmpfile = "$tmpdir/script"; + my $rf; + mkpath("$tmpdir"); + open($rf, ">$tmpfile"); + foreach my $line (@$script_ref) { + $line = getfunc($line); + print $rf "$line\n"; + } + close($rf); + chmod 0755, "$tmpfile"; + my @output = runcmd("$tmpfile"); + + unlink("$tmpfile"); + rmdir("$tmpdir"); + return @output; } -sub listbundlefiles -{ - my @bundlefiles = (); - - #get all .bundle files from /opt/xcat/share/xcat/tools/autotest/bundle/ - opendir(DIR, $bundledir); - my @files = readdir(DIR); - foreach my $file (@files){ - next if (-d $file); - if ($file =~ /\.bundle$/){ - push(@bundlefiles, $file); - } - } - closedir(DIR); - - #read all .bundle files, get descriptions for each file. - my $skip =0; - my $line; - foreach my $bundlefile (@bundlefiles) { - if (!open(FILE, "<$bundledir/$bundlefile")) { - log_this("Error: Can't open bundle file: $bundlefile"); - log_this("Use 'xcattest -s bundle' to list out available bundles"); - return 1; - } - $skip = 0; - while ($line = ) { - $line = &trim($line); - next if (length($line) == 0); - - #description line is treated as a comment line for now - if ($line =~ /^description\s*:\s*(.*)/){ - if (length($1) != 0) { - $bundlefilesinfo{$bundlefile} = $1; - $skip=1; - last; - } +#-------------------------------------------------------- +# Fuction name: getnodeattr +# Description: get the value of node attribute form current environment +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub getnodeattr { + my $node = shift; + my $attr = shift; + my $maxtry = 40; + foreach my $try (0 .. $maxtry) { + my @output = runcmd("lsdef -t node -o $node -i $attr"); + if ($::RUNCMD_RC == 0) { + foreach my $line (@output) { + if ($line =~ /$attr=(\w.+)/) { + return $1; + } } - } - close(FILE); - if (!$skip){ - $bundlefilesinfo{$bundlefile} = "No description, add with \"description: details\" in bundle file"; - } - } - &listformatbundleinfo(%bundlefilesinfo); - + } + } + return "Unknown"; +} + +#-------------------------------------------------------- +# 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; + opendir($fd, $dir); + 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); +} + + +#-------------------------------------------------------- +# Fuction name: is_valid_case_name +# Description: to check if a case name is valid +# Atrributes: $casename (input atrribute): the target case name +# Retrun code: 0 Success 1 Failed +#-------------------------------------------------------- +sub is_valid_case_name { + my $casename = shift; + if ($casename =~ /[^a-zA-Z0-9_-]/) { + return 0; + } else { + return 1; + } +} + +#------------------------------------------------------- +# Fuction name: get_current_os +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub get_current_os { + if (-f "/etc/redhat-release") { + return "rhels"; + } elsif (-f "/etc/SuSE-release") { + return "sles"; + } elsif (-f "/etc/lsb-release") { + return "ubuntu"; + } else { + return "aix"; + } +} + + +#-------------------------------------------------------- +# Fuction name: generate_performance_report +# Description: +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub generate_performance_report { + my $runninglog = shift; + my $performancelog = shift; + my $error_ref = shift; + + my $performance_log_fd = undef; + + if (!open($performance_log_fd, ">$performancelog")) { + $$error_ref = "Failed to create performance log $performancelog: $!"; + return 1; + } + + print $performance_log_fd "Testcase Duration\n"; + print $performance_log_fd "------------------------------------------------------------------------------\n"; + + my @output = runcmd("cat $runninglog"); + my $cmdlineflag = 0; + my $line; + foreach my $line (@output) { + if ($line =~ /^------START:/) { + $line =~ s/------//g; + print $performance_log_fd "$line\n"; + } elsif ($line =~ /^RUN:/) { + $cmdlineflag = 1; + print $performance_log_fd "$line;\n"; + } elsif ($line =~ /^ElapsedTime:/) { + $cmdlineflag = 0; + print $performance_log_fd "$line\n"; + } elsif ($cmdlineflag) { + print $performance_log_fd "$line\n"; + } elsif ($line =~ /^------END:/) { + $line =~ s/------//g; + print $performance_log_fd "$line\n\n"; + } + } + close($performance_log_fd); return 0; } -sub listformatbundleinfo +#-------------------------------------------------------- +# Fuction name: getvar +# Description: replace specific attribute in case definition by the value set in config file +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub getvar { - my $maxlen = 0; - foreach my $filename (keys %bundlefilesinfo) { - $maxlen = length($filename) if (length($filename) > $maxlen); + my $str = shift; + my $config_ref = shift; + + while ($str =~ /\$\$(\w+)/) { + my $varname = $1; + if (exists($$config_ref{var}{$varname})) { + $str =~ s/\$\$$varname/$$config_ref{var}{$varname}/g; + } else { + return "miss attribute $varname"; + } } - $maxlen += 4; + return $str; +} + +#-------------------------------------------------------- +# Fuction name: getfunc +# Description: replace specific funciton in case definition +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub getfunc +{ + my $str = shift; + + while ($str =~ /__(\w+)\(([\s\,\w\$]*)\)__/) { + my $func = $1; + my $parameter = $2; + my $value = undef; + my @para = (); + + #log_this("parameter is $parameter,fun is $func"); + chomp($parameter); + @para = split /\s*,\s*/, $parameter; + if ($func eq "GETNODEATTR") { + $value = getnodeattr($para[0], $para[1]); + if ($value eq "Unknown") { + $value = ''; + } + } elsif ($func eq "INC") { + $value = $para[0] + 1; + } elsif ($func eq "GETTABLEVALUE") { + $value = gettablevalue(@para); + } + $str =~ s/__$func\($parameter\)__/$value/g; + } + return $str; +} + +#-------------------------------------------------------- +# Fuction name: gettablevalue +# Description: get specific table value from current environment +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub gettablevalue +{ + my ($keyname, $key, $colname, $table) = @_; + my @output = runcmd("gettab $keyname=$key $table\.$colname"); + return $output[0]; +} + +#-------------------------------------------------------- +# Fuction name: print_table +# Description: print a hash table in good format +# Atrributes: +# Retrun code: +#-------------------------------------------------------- +sub print_table { + my $msg_ref = shift; my $desiredwidth = 120; my $screenwidth = (`tput cols` + 0); my $finallen = ($screenwidth > $desiredwidth ? $desiredwidth : $screenwidth); - print "bundle files and descriptions:\n"; - - foreach my $filename (sort { $a cmp $b } keys %bundlefilesinfo ) { - my @desc = split(" ", $bundlefilesinfo{$filename}); + my $maxkeylen = 0; + foreach my $key (keys %{$msg_ref}) { + my $keylen = length($key); + $maxkeylen = $keylen if ($keylen > $maxkeylen); + } + $maxkeylen += 4; + + foreach my $key (sort { $a cmp $b } keys %{$msg_ref}) { + my @desc = split(" ", $msg_ref->{$key}); my $str = ""; my @formatdesc = (); foreach my $word (@desc) { - if (length($str) + length($word) > $finallen - $maxlen) { + if (length($str) + length($word) > $finallen - $maxkeylen) { $str =~ s/([^\s]+)\s$/$1/g; push @formatdesc, $str; $str = ""; @@ -1150,162 +1714,16 @@ sub listformatbundleinfo $str =~ s/([^\s]+)\s$/$1/g; push @formatdesc, $str; - print "$filename"; + print color("green"), "$key", color("reset"); - my $space = " " x ($maxlen - length($filename)); + my $space = " " x ($maxkeylen - length($key)); print "$space$formatdesc[0]\n"; delete $formatdesc[0]; - $space = " " x $maxlen; + $space = " " x $maxkeylen; foreach my $line (@formatdesc) { print "$space$line\n" if (length($line)); } } -} - -sub listcommands -{ - my @files = (); - - Get_Files_Recursive("$casedir"); - for (my $countfile = 0 ; $countfile < @ filespath ; $countfile++) - { - if ($filespath[$countfile] =~ /testcase\/(.*)\/case/) { - log_this("$1"); - } - } -} - -sub getreport -{ - open(INDOC, ">$_[1]") || die("open STDOUT failed"); - print INDOC "Testcase Duration\n"; - print INDOC "------------------------------------------------------------------------------\n"; - close(INDOC); - open(STDOUT, ">>$_[1]") || die("open STDOUT failed"); - open FD, "<$_[0]" or die "$?"; - while () { - if (/Time/) { - s/------//g; - $_ .= "\n" if /END/; - print STDOUT $_; - } - } - - close(FD); - close(STDOUT); -} - - -sub reordercases -{ - my @caserange = (); - my $line; - if ($bundlelist) { - my @bundles = split /,/, $bundlelist; - foreach my $bundle (@bundles) { - if (!open(FILE, "<$bundledir/$bundle")){ - log_this("Error: Can't open bundle file: $bundle"); - return 1; - } - while ($line = ) { - chomp($line); - next if ((length($line) == 0) || ($line =~ /^description\s*:\s*(.*)/)); - push(@caserange, $line); - } - close(FILE); - my @refs=sort_caserange(@caserange); - @caserange=@{$refs[0]}; - } - } - if ($caselist) { - @caserange = split /,/, $caselist; - } - - my @tmpcases = (); - foreach my $case (@caserange) { - my $i = 0; - my $hit = 0; - foreach my $runcase (@cases) { - if ($runcase->{name} eq $case) { - $hit = 1; - last; - } - $i++; - next; - } - push(@tmpcases, $cases[$i]) if ($hit); - } - @cases = @tmpcases; -} - -sub checkoptions -{ - #-b,-c,-t,-s should be defined at least one - if (!defined($bundlelist) && !defined($caselist) && !defined($cmdlist) && !defined($showbundlesorcommands)) { - log_this("Error: please define options correctly, see below usage information:"); - return 1; - }elsif ((defined($bundlelist) || defined($caselist) || defined($cmdlist)) && (! $needshow) && !defined($configinfo)) { - #config file must be defined if the using -c,-b,-t to run test cases - log_this("Error: To run test cases, please define the config file with -f option"); - log_this(" To show test cases, please use the -l option"); - return 1; - }elsif (defined($showbundlesorcommands) && (defined($bundlelist) || defined($caselist) || defined($cmdlist))) { - #-s can't be used together with -c,-b,-t - log_this("Error: -b,-c or -t can't be used together with -s"); - return 1; - }elsif (defined($showbundlesorcommands) && $needshow) { - log_this("Error: -s, -l can't be used together"); - return 1; - } - - #check the -s option, the value should be bundle or command - if (defined($showbundlesorcommands)) { - if (($showbundlesorcommands ne "bundle") && ($showbundlesorcommands ne "command")) { - log_this("Error: please use \"bundle\" or \"command\" as the \-s value"); - return 1; - }elsif ($showbundlesorcommands eq "bundle") { - $showbundlefiles = 1; - }else { - } - $showcommandslist= 1; - } - - #get and check config file and System label - #this System label means only the [System] variable will be loaded - if (defined($configinfo)) { - if ($configinfo =~ /(.*):(.*)/) { - $configfile = $1; - $initallabel = $2; - if ($initallabel ne $loadsysteminfo) { - log_this("Error: $initallabel is not supported!"); - return 1; - } - }else { - $configfile = $configinfo; - } - if (!(-e $configfile)) { - log_this("Error: Can't open config file: $configfile"); - return 1; - } - } - - #check bundle files - if (defined($bundlelist)) { - my @bundles = split /,/, $bundlelist; - foreach my $bundle (@bundles){ - if ("$bundledir/$bundle" !~ /\.bundle$/) { - log_this("Error: please input the .bundle file"); - log_this("Use 'xcattest -s bundle' to list all bundle files"); - return 1; - } - if (!(-e "$bundledir/$bundle")) { - log_this("Error: Can't open bundle file: $bundle"); - log_this("Use 'xcattest -s bundle' to list all bundle files"); - return 1; - } - } - } - return 0; } diff --git a/xCAT/postscripts/confignetwork b/xCAT/postscripts/confignetwork index 2398340b2..80ef76c1a 100755 --- a/xCAT/postscripts/confignetwork +++ b/xCAT/postscripts/confignetwork @@ -215,93 +215,94 @@ function find_nic_and_device_list { # ############################################################################### function sort_nics_device_order { + all_nics_list=$* eth_slot="" bond_slot="" vlan_slot="" num=1 - alone_nics=`echo "$all_nics_list"|awk '{if(01) print $0}'` - + #find stand alone nic num1=1 max1=`echo "$alone_nics"|wc -l` ((max1+=1)) while [ $num1 -lt $max1 ]; do - alonenic=`echo "$alone_nics"|sed -n "${num1}p"` + alonenic=`echo "$alone_nics"|sed -n "${num1}p"|sed "s/ //g"` echo "$nics_list"| grep "$alonenic" >/dev/null if [ $? -ne 0 ]; then echo $alonenic fi ((num1+=1)) done - # - num=1 - max=`echo "$nics_list"|wc -l` - ((max+=1)) - while [ $num -lt $max ]; - do - #for each nic and nicdevice : nic_dev base_nic_dev - #find nic type as nic_dev_type - #find nicdevice type as base_nic_type - base_nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $2}'` - if echo "$base_nic_dev"|grep "@" >/dev/null; then - for i in `echo "$base_nic_dev" |sed 's/@/ /g'` - do - temp_base_nic_type=`find_nic_type "$i"` - if [ x"$temp_base_nic_type_one" = x ]; then - temp_base_nic_type_one=$temp_base_nic_type - elif [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then - log_error "different nic device types in $base_nic_dev." - break 2 - fi - done - else - temp_base_nic_dev=$base_nic_dev - temp_base_nic_type=`find_nic_type "$temp_base_nic_dev"` - fi + if [ -n "$nics_list" ]; then + num=1 + max=`echo "$nics_list"|wc -l` + ((max+=1)) + while [ $num -lt $max ]; + do + #for each nic and nicdevice : nic_dev base_nic_dev + #find nic type as nic_dev_type + #find nicdevice type as base_nic_type + base_nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $2}'` + if echo "$base_nic_dev"|grep "@" >/dev/null; then + for i in `echo "$base_nic_dev" |sed 's/@/ /g'` + do + temp_base_nic_type=`find_nic_type "$i" | $utolcmd` + if [ x"$temp_base_nic_type_one" = x ]; then + temp_base_nic_type_one=$temp_base_nic_type + elif [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then + log_error "different nic device types in $base_nic_dev." + break 2 + fi + done + else + temp_base_nic_dev=$base_nic_dev + temp_base_nic_type=`find_nic_type "$temp_base_nic_dev" | $utolcmd` + fi - base_nic_type=$temp_base_nic_type - nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $1}'` - nic_dev_type=`find_nic_type "$nic_dev"` + base_nic_type=$temp_base_nic_type + nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $1}'` + nic_dev_type=`find_nic_type "$nic_dev" | $utolcmd` - #valid nic_dev and base_nic_dev pair as bond-ethernet or vlan-ethernet or bridge-ethernet - if [ x"$base_nic_type" = "xethernet" ]&& \ - [ x"$nic_dev_type" = "xbond" -o x"$nic_dev_type" = "xvlan" -o x"$nic_dev_type" = "xbridge" -o x"$nic_dev_type" = "xbridge_ovs" ]; then + #valid nic_dev and base_nic_dev pair as bond-ethernet or vlan-ethernet or bridge-ethernet + if [ x"$base_nic_type" = "xethernet" ]&& \ + [ x"$nic_dev_type" = "xbond" -o x"$nic_dev_type" = "xvlan" -o x"$nic_dev_type" = "xbridge" -o x"$nic_dev_type" = "xbridge_ovs" ]; then - if [ x"$eth_slot" = x ]; then - eth_slot=$num + if [ x"$eth_slot" = x ]; then + eth_slot=$num + else + eth_slot=$eth_slot" "$num + fi + + #valid nic_dev and base_nic_dev pair as vlan-bond or bridge-bond + elif [ x"$base_nic_type" = "xbond" ]&& \ + [ x"$nic_dev_type" = "xvlan" -o x"$nic_dev_type" = "xbridge" -o x"$nic_dev_type" = "xbridge_ovs" ]; then + + if [ x"$bond_slot" = x ]; then + bond_slot=$num + else + bond_slot=$bond_slot" "$num + fi + + #valid nic_dev and base_nic_dev pair as bridge-vlan + elif [ x"$base_nic_type" = "xvlan" ]&& \ + [ x"$nic_dev_type" = "xbridge" -o x"$nic_dev_type" = "xbridge_ovs" ]; then + + if [ x"$vlan_slot" = x ]; then + vlan_slot=$num + else + vlan_slot=$vlan_slot" "$num + fi else - eth_slot=$eth_slot" "$num + echo "Error: $nic_dev $base_nic_dev pair is invalid nic and nicdevice pair." fi - - #valid nic_dev and base_nic_dev pair as vlan-bond or bridge-bond - elif [ x"$base_nic_type" = "xbond" ]&& \ - [ x"$nic_dev_type" = "xvlan" -o x"$nic_dev_type" = "xbridge" -o x"$nic_dev_type" = "xbridge_ovs" ]; then - - if [ x"$bond_slot" = x ]; then - bond_slot=$num - else - bond_slot=$bond_slot" "$num - fi - - #valid nic_dev and base_nic_dev pair as bridge-vlan - elif [ x"$base_nic_type" = "xvlan" ]&& \ - [ x"$nic_dev_type" = "xbridge" -o x"$nic_dev_type" = "xbridge_ovs" ]; then - - if [ x"$vlan_slot" = x ]; then - vlan_slot=$num - else - vlan_slot=$vlan_slot" "$num - fi - else - log_error "Error: $nic_dev $base_nic_dev pair is invalid nic and nicdevice pair." - fi - ((num+=1)) - done + ((num+=1)) + done + fi new_order=$eth_slot" "$bond_slot" "$vlan_slot new_order_list="" if [ -n "$new_order" ]; then @@ -312,7 +313,6 @@ function sort_nics_device_order { echo "$nics_list" |sed -n "${i}p" done` fi - echo "$new_order_list" } @@ -332,6 +332,7 @@ function configure_nicdevice { base_temp_nic="" base_nic_for_bond="" line_num="" + noip=1 ((max+=1)) while [ $num -lt $max ]; do @@ -344,29 +345,32 @@ function configure_nicdevice { base_temp_nic=$base_nic_dev fi - base_nic_type=`find_nic_type "$base_temp_nic"` + base_nic_type=`find_nic_type "$base_temp_nic" | $utolcmd` fi nic_dev=`echo "$nics_pair" |sed -n "${num}p"|awk '{print $1}'` - nic_dev_type=`find_nic_type "$nic_dev"` + nic_dev_type=`find_nic_type "$nic_dev" | $utolcmd` echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" nic_pair=`echo "$nics_pair" |sed -n "${num}p"` echo "configure nic and its device : $nic_pair" - #configure standalone ethernet nic if [ x"$nic_dev_type" = "xethernet" ]; then - + ipaddr=`find_nic_ips $nic_dev|awk -F"|" '{print $1}'` if [ -n "$ipaddr" ]; then create_ethernet_interface ifname=$nic_dev _ipaddr=$ipaddr else - log_error "There is no ip for $nic_dev." + log_warn "There is no ip for $nic_dev." + ((noip+=1)) fi - + #All Ethernet nics have no nicips + if [ $noip -eq $max ]; then + log_error "There is no any ip configured for any nic. Check nicips in nics table first." + errorcode=1 + fi #configure bridge #linux bridge type is bridge #openvswitch bridge type is bridge_ovs elif [ x"$nic_dev_type" = "xbridge_ovs" -o x"$nic_dev_type" = "xbridge" ]; then - create_bridge_interface ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type #configure vlan @@ -385,10 +389,12 @@ function configure_nicdevice { create_bond_interface ifname=$nic_dev slave_ports=$base_nic_for_bond else log_error "Error : please check nictypes for $nic_pair." + errorcode=1 fi ((num+=1)) done + return $errorcode } ############################################################################ @@ -417,6 +423,11 @@ function enable_network_service { # ############################################################################ +errorcode=0 + +#nictypes should support capital letters, for example, Ethernet and ethernet +utolcmd="sed -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" + #replace | with "@", for example, eth1|eth2 ----> eth1@eth2 nicdevice=`echo "$NICDEVICES" | sed 's/|/@/g'` @@ -446,10 +457,19 @@ enable_network_service #sort nics device pair based on nicdevice type sorted_nicdevice_list=`sort_nics_device_order "$new_nicdevice"` + +#If there is invalid nics pair, errorcode is 1 +invalid_nicdevice_pair=`echo "$sorted_nicdevice_list" | grep "Error"` +if [ $? -eq 0 ]; then +log_error $invalid_nicdevice_pair +errorcode=1 +fi + +#delete invalid nics device pair based on Error +valid_sorted_nicdevice_list=`echo "$sorted_nicdevice_list" | sed '/Error/d'` log_info "All valid nics and device list:" -echo "$sorted_nicdevice_list" |log_lines info - - +echo "$valid_sorted_nicdevice_list" |log_lines info #config nics and ifcfg files -configure_nicdevice "$sorted_nicdevice_list" +configure_nicdevice "$valid_sorted_nicdevice_list" +exit $errorcode diff --git a/xCAT/postscripts/cumulusztp b/xCAT/postscripts/cumulusztp new file mode 100755 index 000000000..311cdfdf1 --- /dev/null +++ b/xCAT/postscripts/cumulusztp @@ -0,0 +1,34 @@ +#!/bin/bash +function error() { + echo -e "\e[0;33mERROR: The Zero Touch Provisioning script failed while running the command $BASH_COMMAND at line $BASH_LINENO.\e[0m" >&2 + exit 1 +} + +# Log all output from this script +exec >/var/log/autoprovision 2>&1 + +trap error ERR + +#Add Debian Repositories +echo "deb http://http.us.debian.org/debian jessie main" >> /etc/apt/sources.list +echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list + +#get ip address for server node +server_ip=`grep cumulus-provision-url /var/lib/dhcp/dhclient.eth0.leases | tail -1 | awk -F/ '{print $3}'` + +#push root ssh keys, config passwordless +echo "CumulusLinux!" | sudo -S mkdir -p /root/.ssh +echo "CumulusLinux!" | sudo -S /usr/bin/wget -O /root/.ssh/authorized_keys http://$server_ip/install/postscripts/_ssh/authorized_keys + +#enable and config snmpd +echo "CumulusLinux!" | sudo -S /usr/bin/wget -O /home/cumulus/enablesnmp http://$server_ip/install/postscripts/enablesnmp +sudo chmod +x /home/cumulus/enablesnmp +sudo /home/cumulus/enablesnmp + +#config base interface +echo "CumulusLinux!" | sudo -S /usr/bin/wget -O /home/cumulus/configinterface http://$server_ip/install/postscripts/configinterface +sudo chmod +x /home/cumulus/configinterface +sudo /home/cumulus/configinterface + +# CUMULUS-AUTOPROVISIONING +exit 0 diff --git a/xCAT/postscripts/hardeths b/xCAT/postscripts/hardeths index 0d51de150..9dd75dcde 100755 --- a/xCAT/postscripts/hardeths +++ b/xCAT/postscripts/hardeths @@ -47,11 +47,11 @@ network_ipv4calc () } if [ -f /etc/os-release ] && (cat /etc/os-release |grep -i '^NAME=[ "]*Cumulus Linux[ "]*$' >/dev/null 2>&1); then - osver="cumulus" + OSVER="cumulus" fi defgw=`ip route | grep default | awk '{print $3}'` -if ( pmatch $OSVER "ubuntu*" ) || (pmatch $osver "cumulus") +if ( pmatch $OSVER "ubuntu*" ) || (pmatch $OSVER "cumulus") then echo `hostname` >/etc/hostname mv /etc/network/interfaces /etc/network/interfaces.old # this file will be filled up next @@ -94,7 +94,7 @@ for nic in `ip link |grep "BROADCAST" |awk '{print $2}' | sed s/://`; do PREFIXMASK=`echo $IPADDRMASK | awk -F'/' '{print $2}'` # converts to x.x.x.x mask value maskfromprefix $PREFIXMASK - if ( pmatch $OSVER "ubuntu*" ) || (pmatch $osver "cumulus") + if ( pmatch $OSVER "ubuntu*" ) || (pmatch $OSVER "cumulus") then NETWORK=`network_ipv4calc $IPADDR $NETMASK` #BROADCAST=`ifconfig $nic | grep Bcast | awk '{print $3}' | awk -F: '{print $2}'` @@ -169,7 +169,7 @@ EOF fi done -if ( pmatch $OSVER "ubuntu*") || (pmatch $osver "cumulus") +if ( pmatch $OSVER "ubuntu*") || (pmatch $OSVER "cumulus") then cat >>/etc/network/interfaces </dev/null 2>/dev/null || echo "There is no ovs-vsctl" >&2 && exit 1 + type brctl >/dev/null 2>/dev/null || (echo "There is no ovs-vsctl" >&2 && exit 1) log_info "ovs-vsctl add-br $BNAME" ovs-vsctl add-br $BNAME elif [[ $BRIDGE == "bridge" ]]; then - type brctl >/dev/null 2>/dev/null || echo "There is no brctl" >&2 && exit 1 + type brctl >/dev/null 2>/dev/null || (echo "There is no brctl" >&2 && exit 1) log_info "brctl addbr $BNAME" brctl addbr $BNAME log_info "brctl stp $BNAME on" diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 3e2c4ffb1..7aac7ab28 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -126,9 +126,8 @@ download_postscripts() retry=0 rc=1 # this is a fail return while [ 0 -eq 0 ]; do - - if [ -e "\/$xcatpost" ]; then - rm -rf "\/$xcatpost" + if [ -e "$xcatpost" ]; then + rm -rf "$xcatpost" fi export LANG=C; wget -l inf -nH -N -r --waitretry=10 --random-wait -e robots=off -T 60 -nH --cut-dirs=2 --reject "index.html*" --no-parent http://$server$INSTALLDIR/postscripts/ -P /$xcatpost 2> /tmp/wget.log