diff --git a/buildcore.sh b/buildcore.sh index 400eb4620..d9e7a7899 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -67,14 +67,14 @@ if [ -z "$UP" ]; then fi # These are the rpms that should be built for each kind of xcat build -ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-SoftLayer xCAT-vlan xCAT-confluent xCAT-probe" +ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-SoftLayer xCAT-vlan xCAT-confluent xCAT-probe xCAT-csm" ZVMBUILD="perl-xCAT xCAT-server xCAT-UI" ZVMLINK="xCAT-client xCAT xCATsn" # xCAT and xCATsn have PCM specific configuration - conserver-xcat, syslinux-xcat # xCAT-server has PCM specific configuration - RESTAPI(perl-JSON) # xCAT-client has PCM specific configuration - getxcatdocs(perl-JSON) PCMBUILD="xCAT xCAT-server xCAT-client xCATsn" -PCMLINK="perl-xCAT xCAT-buildkit xCAT-genesis-scripts-x86_64 xCAT-genesis-scripts-ppc64 xCAT-vlan" +PCMLINK="perl-xCAT xCAT-buildkit xCAT-genesis-scripts-x86_64 xCAT-genesis-scripts-ppc64 xCAT-vlan xCAT-probe" # Note: for FSM, the FlexCAT rpm is built separately from gsa/git FSMBUILD="perl-xCAT xCAT-client xCAT-server" FSMLINK="" @@ -299,7 +299,7 @@ if [ "$OSNAME" = "AIX" ]; then fi # Build the rest of the noarch rpms -for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT-SoftLayer xCAT-vlan xCAT-confluent xCAT-probe; do +for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT-SoftLayer xCAT-vlan xCAT-confluent xCAT-probe xCAT-csm; do if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi # do not build xCAT-buildkit on aix if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-SoftLayer" ]; then continue; fi # do not build xCAT-softlayer on aix diff --git a/docs/source/advanced/chain/chain_table.rst b/docs/source/advanced/chain/chain_table.rst index a2e0dc0a9..b12a86863 100644 --- a/docs/source/advanced/chain/chain_table.rst +++ b/docs/source/advanced/chain/chain_table.rst @@ -7,7 +7,7 @@ The chain table (``tabdump chain``) is an xCAT database table that holds the cha * currchain * chain -To know how are those three attributes used, pls reference the picture: +To know how are those three attributes used, reference the picture: .. image:: chain_tasks_logic.png diff --git a/docs/source/advanced/chain/chain_tasks.rst b/docs/source/advanced/chain/chain_tasks.rst index 326d14adf..dc979ee71 100644 --- a/docs/source/advanced/chain/chain_tasks.rst +++ b/docs/source/advanced/chain/chain_tasks.rst @@ -25,7 +25,7 @@ The ``image.tgz`` **must** have the following properties: * Created using the ``tar zcvf`` command * The tarball must include a ``runme.sh`` script to initiate the execution of the runimage -To create your own image, please reference :ref:`creating image for runimage `. +To create your own image, reference :ref:`creating image for runimage `. **Tip**: You could try to run ``wget http:////image.tgz`` manually to make sure the path has been set correctly. diff --git a/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst index faffe3cbe..e99134962 100644 --- a/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst +++ b/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst @@ -36,11 +36,11 @@ Database Connection Changes Granting or revoking access privilege in the database for the service node. -* For mysql, please refer to :ref:`grante_revoke_mysql_access_label`. +* For mysql, refer to :ref:`grante_revoke_mysql_access_label`. .. There is no procedure in old document on sourceforge for postgress to grant or revoke the access privilege for service node. -* For postgress, please refer to `TODO `_. +* For postgress, refer to `TODO `_. Update Provision Environment on Service Node -------------------------------------------- diff --git a/docs/source/advanced/confluent/server/confluent_server.rst b/docs/source/advanced/confluent/server/confluent_server.rst index ea9bf1ebc..6bdecb832 100644 --- a/docs/source/advanced/confluent/server/confluent_server.rst +++ b/docs/source/advanced/confluent/server/confluent_server.rst @@ -56,8 +56,7 @@ The following example describes the steps for **rhels7.1** on **ppc64le**:: cd confluent-dep-rh7-ppc64le/ ./mklocalrepo.sh -**Note:** If the OS/architecture you are looking for is not provided under confluent-dep, -please send an email to the xcat-user mailing list: xcat-user@lists.sourceforge.net +**Note:** If the OS/architecture you are looking for is not provided under confluent-dep, send an email to the xcat-user mailing list: xcat-user@lists.sourceforge.net Install diff --git a/docs/source/advanced/docker/docker_registry.rst b/docs/source/advanced/docker/docker_registry.rst index 57553e096..920629dc8 100644 --- a/docs/source/advanced/docker/docker_registry.rst +++ b/docs/source/advanced/docker/docker_registry.rst @@ -5,7 +5,7 @@ Docker Registry is a stateless, highly scalable server side application that sto This document describes how to set up a local private docker registry on Ubuntu 15.04 on x86_64. -**Note:** Please ensure that docker registry is not already set up on this docker host. +**Note:** Ensure that docker registry is not already set up on this docker host. Setting Up Docker Host ---------------------- @@ -17,7 +17,7 @@ Setting Up Docker Registry Manually Docker registry needed to be set up on xCAT's MN. -This section describes two methods of setting up docker registry manullay. +This section describes two methods of setting up docker registry manually. First, create some folders where files for this tutorial will live. :: diff --git a/docs/source/advanced/docker/dockerized_xcat/dockerized_xcat.rst b/docs/source/advanced/docker/dockerized_xcat/dockerized_xcat.rst index db49faa1b..e1d9dba6b 100644 --- a/docs/source/advanced/docker/dockerized_xcat/dockerized_xcat.rst +++ b/docs/source/advanced/docker/dockerized_xcat/dockerized_xcat.rst @@ -24,7 +24,7 @@ By pulling xCAT Docker image and running xCAT Docker image in a container, you g xCAT Docker images ------------------ -xCAT shippes 2 Docker images for Docker host with different architecture: +xCAT ships 2 Docker images for Docker host with different architecture: * "xcat/xcat-ubuntu-x86_64": run on x86_64 Docker host * "xcat/xcat-ubuntu-ppc64le": run on ppc64le Docker host @@ -81,12 +81,12 @@ Once you attach or ssh to the container, you will find that xCAT is running and Currently, since xCAT can only generate the diskless osimages of Linux distributions with the same OS version and architecture with xCAT MN. If you need to provision diskless osimages besides ubuntu x86_64 with xCAT running in the Docker, you can use ``imgexport`` and ``imgimport`` to import the diskless osimages generated before. -If you start up the xCAT Docker container by following the steps described in sections above strictly, without specifying "--dns=IP_ADDRESS...", "--dns-search=DOMAIN...", or "--dns-opt=OPTION..." options, Docker uses the /etc/resolv.conf of the host machine (where the docker daemon runs). Any DNS problem inside container, please make sure the DNS server on the Docker host works well. +If you start up the xCAT Docker container by following the steps described in sections above strictly, without specifying "--dns=IP_ADDRESS...", "--dns-search=DOMAIN...", or "--dns-opt=OPTION..." options, Docker uses the /etc/resolv.conf of the host machine (where the docker daemon runs). Any DNS problem inside container, make sure the DNS server on the Docker host works well. Save and Restore xCAT data ---------------------------- -According to the policy of Docker, Docker image should only be the service deployment unit, it is not recommended to save data in Docker image. Docker uses "Data Volume" to save persisent data inside container, which can be simply taken as a shared directory between Docker host and Docker container. +According to the policy of Docker, Docker image should only be the service deployment unit, it is not recommended to save data in Docker image. Docker uses "Data Volume" to save persistent data inside container, which can be simply taken as a shared directory between Docker host and Docker container. For dockerized xCAT, there are 3 volumes recommended to save and restore xCAT user data. diff --git a/docs/source/advanced/docker/dockerized_xcat/run_xcat_in_docker_native.rst b/docs/source/advanced/docker/dockerized_xcat/run_xcat_in_docker_native.rst index 481ec15a1..2dc90076c 100644 --- a/docs/source/advanced/docker/dockerized_xcat/run_xcat_in_docker_native.rst +++ b/docs/source/advanced/docker/dockerized_xcat/run_xcat_in_docker_native.rst @@ -69,7 +69,7 @@ Now run the xCAT Docker container with the Docker image "xcat/xcat-ubuntu-x86_64 * use ``--privileged=true`` to give extended privileges to this container * use ``--hostname`` to specify the hostname of the container, which is available inside the container * use ``--name`` to assign a name to the container, this name can be used to manipulate the container on Docker host -* use ``--add-host="xcatmn.clusers.com xcatmn:10.5.107.101"`` to write the ``/etc/hosts`` entries of Docker container inside container. Since xCAT use the FQDN(Fully Qualified Domain Name) to determine the cluster domain on startup, please make sure the format to be " : ", otherwise, you need to set the cluster domain with ``chdef -t site -o clustersite domain="clusters.com"`` inside the container manually +* use ``--add-host="xcatmn.clusers.com xcatmn:10.5.107.101"`` to write the ``/etc/hosts`` entries of Docker container inside container. Since xCAT use the FQDN(Fully Qualified Domain Name) to determine the cluster domain on startup, make sure the format to be " : ", otherwise, you need to set the cluster domain with ``chdef -t site -o clustersite domain="clusters.com"`` inside the container manually * use ``--volume /docker/xcatdata/:/install`` to mount a pre-created "/docker/xcatdata" directory on Docker host to "/install" directory inside container as a data volume. This is optional, it is mandatory if you want to backup and restore xCAT data. * use ``--net=mgtnet`` to connect the container to the Docker network "mgtnet" * use ``--ip=10.5.107.101`` to specify the IP address of the xCAT Docker container diff --git a/docs/source/advanced/docker/dockerized_xcat/setup_docker_host.rst b/docs/source/advanced/docker/dockerized_xcat/setup_docker_host.rst index d01367fe7..6ba2218cb 100644 --- a/docs/source/advanced/docker/dockerized_xcat/setup_docker_host.rst +++ b/docs/source/advanced/docker/dockerized_xcat/setup_docker_host.rst @@ -4,7 +4,7 @@ Setup Docker host Install Docker Engine --------------------- -The Docker host to run xCAT Docker image should be a baremental or virtual server with Docker v1.10 or above installed. For the details on system requirements and Docker installation, please refer to `Docker Installation Docs `_. +The Docker host to run xCAT Docker image should be a baremental or virtual server with Docker v1.10 or above installed. For the details on system requirements and Docker installation, refer to `Docker Installation Docs `_. **Note:** diff --git a/docs/source/advanced/docker/lifecycle_management.rst b/docs/source/advanced/docker/lifecycle_management.rst index 2943bd75f..869b57da9 100644 --- a/docs/source/advanced/docker/lifecycle_management.rst +++ b/docs/source/advanced/docker/lifecycle_management.rst @@ -3,7 +3,7 @@ Docker life-cycle management in xCAT The Docker linux container technology is currently very popular. xCAT can help managing Docker containers. xCAT, as a system management tool has the natural advantage for supporting multiple operating systems, multiple architectures and large scale clusters. -This document describes how to use xCAT for docker management, from Docker Host setup to docker container operationis. +This document describes how to use xCAT for docker management, from Docker Host setup to docker container operations. **Note:** The document was verified with **Docker Version 1.10, 1.11** and **Docker API version 1.22.** The Docker Host was verified on **ubuntu14.04.3 x86_64**, **ubuntu15.10 x86_64**, **ubuntu16.04 x86_64** and **ubuntu16.04 ppc64el**. 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 acf30517d..d8745b6ee 100644 --- a/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst +++ b/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst @@ -101,7 +101,7 @@ You must set the **forwarders** attribute in the xCAT cluster **site** definitio An xCAT **network** definition must be defined for each management network used in the cluster. The **net** and **mask** attributes will be used by the ``makedns`` command. -A network **domain** and **nameservers** value must be provided either in the network definiton corresponding to the nodes or in the site definition. +A network **domain** and **nameservers** value must be provided either in the network definition corresponding to the nodes or in the site definition. For example, if the cluster domain is **mycluster.com**, the IP address of the management node, (as known by the cluster nodes), is **100.0.0.41** and the site DNS servers are **50.1.2.254,50.1.3.254** then you would run the following command. :: @@ -249,7 +249,7 @@ To use this support you must set one or more of the following node definition at The additional NIC information may be set by directly editing the xCAT **nics** table or by using the **xCAT *defs** commands to modify the node definitions. The details for how to add the additional information is described below. As you will see, entering this -information manually can be tedious and error prone. This support is primarily targetted to be used in +information manually can be tedious and error prone. This support is primarily targeted to be used in conjunction with other IBM products that have tools to fill in this information in an automated way. Managing additional interface information using the **xCAT *defs** commands @@ -269,7 +269,7 @@ For example, the expanded format for the **nicips** and **nichostnamesuffixes** nicips.eth1=10.1.1.6 nichostnamesuffixes.eth1=-eth1 -If we assume that your xCAT node name is **compute02** then this would mean that you have an additonal interface **("eth1")** and that the hostname and IP address are **compute02-eth1** and **10.1.1.6**. +If we assume that your xCAT node name is **compute02** then this would mean that you have an additional interface **("eth1")** and that the hostname and IP address are **compute02-eth1** and **10.1.1.6**. A "|" delimiter is used to specify multiple values for an interface. For example: :: @@ -285,7 +285,7 @@ For the **nicaliases** attribute a list of additional aliases may be provided. : This indicates that the **compute02-eth1** hostname would get the additional two aliases, alias1 alias2, included in the **/etc/hosts** file, (when using the ``makehosts`` command). -The second line indicates that **compute02-eth2** would get the additonal alias **alias3** and that **compute02-eth-lab** would get **alias4** +The second line indicates that **compute02-eth2** would get the additional alias **alias3** and that **compute02-eth-lab** would get **alias4** Setting individual nic attribute values ''''''''''''''''''''''''''''''''''''''' diff --git a/docs/source/advanced/hamn/high_available_management_node.rst b/docs/source/advanced/hamn/high_available_management_node.rst index 4375d553b..da94390ae 100644 --- a/docs/source/advanced/hamn/high_available_management_node.rst +++ b/docs/source/advanced/hamn/high_available_management_node.rst @@ -13,15 +13,15 @@ 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 syncronization, but considering the specific xCAT HAMN requirements, only several of the data syncronziation 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 synchronziation 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. -**2\. Shared data**: the two management nodes use the 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 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. +**2\. Shared data**: the two management nodes use the 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. -**3\. Mirroring**: each of the management node has its own copy of the xCAT data, and the two copies of data are syncronized through mirroring mechanism. DRBD is used widely in the high availability configuration scenarios, to provide data replication by mirroring a whole block device via network. If we put all the important data for xCAT onto the DRBD devices, then it could assure the data is synchronized between the two management nodes. Some parallel file system also provides capability to mirror data through network. +**3\. Mirroring**: each of the management node has its own copy of the xCAT data, and the two copies of data are synchronized through mirroring mechanism. DRBD is used widely in the high availability configuration scenarios, to provide data replication by mirroring a whole block device via network. If we put all the important data for xCAT onto the DRBD devices, then it could assure the data is synchronized between the two management nodes. Some parallel file system also provides capability to mirror data through network. Manual vs. Automatic Failover ----------------------------- @@ -36,7 +36,7 @@ From xCAT perspective, if the management node needs to provide network services **2\. Configuration complexity** -The configuration for the high availability applications is usually complex, it may take a long time to configure, debug and stablize the high availability configuration. +The configuration for the high availability applications is usually complex, it may take a long time to configure, debug and stabilize the high availability configuration. **3\. Maintenance effort** diff --git a/docs/source/advanced/hamn/index.rst b/docs/source/advanced/hamn/index.rst index 649ac74e0..1d7bcecab 100644 --- a/docs/source/advanced/hamn/index.rst +++ b/docs/source/advanced/hamn/index.rst @@ -1,12 +1,12 @@ -High Avaiability -================ +High Availability +================= -The xCAT management node plays an important role in the cluster, if the management node is down for whatever reason, the administrators will lose the management capability for the whole cluster, until the management node is back up and running. In some configuration, like the Linux nfs-based statelite in a non-hierarchy cluster, the compute nodes may not be able to run at all without the management node. So, it is important to consider the high availability for the management node. +The xCAT management node plays an important role in the cluster, if the management node is down for whatever reason, the administrators will lose the management capability for the whole cluster, until the management node is back up and running. In some configurations, like the Linux NFSROOT-based statelite in a non-hierarchy cluster, the compute nodes may not be able to run at all without the management node. So, it is important to consider the high availability for the management node. -The goal of the HAMN(High Availability Management Node) configuration is, when the primary xCAT management node fails, the standby management node can take over the role of the management node, either through automatic failover or through manual procedure performed by the administrator, and thus avoid long periods of time during which your cluster does not have active cluster management function available. +The goal of the HAMN (High Availability Management Node) configuration is, when the primary xCAT management node fails, the standby management node can take over the role of the management node, either through automatic failover or through manual procedure performed by the administrator, and thus avoid long periods of time during which your cluster does not have active cluster management function available. -The following pages describes ways to configure the xCAT Management Node for High Availbility. +The following pages describes ways to configure the xCAT Management Node for High Availability. .. toctree:: :maxdepth: 2 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 708d59ac7..766580dad 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 @@ -149,7 +149,7 @@ So, in this documentation, we will setup xCAT on both management nodes before we chdef -t site nameservers=10.1.0.1 chdef -t network 10_1_0_0-255_255_255_0 tftpserver=10.1.0.1 -#. Install and configure MySQL. MySQL will be used as the xCAT database system, please refer to the doc [ **todo** Setting_Up_MySQL_as_the_xCAT_DB]. +#. Install and configure MySQL. MySQL will be used as the xCAT database system, refer to the doc [ **todo** Setting_Up_MySQL_as_the_xCAT_DB]. Verify xcat is running on MySQL by running: :: @@ -219,7 +219,7 @@ Setup xCAT on the Standby Management Node #. Install xCAT. The procedure described in :doc:`xCAT Install Guide <../../guides/install-guides/index>` should be used for the xCAT setup on the standby management node. -#. Install and configure MySQL. MySQL will be used as the xCAT database system, please refer to the doc [Setting_Up_MySQL_as_the_xCAT_DB]. +#. Install and configure MySQL. MySQL will be used as the xCAT database system, refer to the doc [Setting_Up_MySQL_as_the_xCAT_DB]. Verify xcat is running on MySQL by running: :: @@ -689,7 +689,7 @@ Configure Pacemaker All the cluster resources are managed by Pacemaker, here is an example ``pacemaker`` configuration that has been used by different HA MN customers. You might need to do some minor modifications based on your cluster configuration. -Please be aware that you need to apply ALL the configuration at once. You cannot pick and choose which pieces to put in, and you cannot put some in now, and some later. Don't execute individual commands, but use crm configure edit instead. :: +Be aware that you need to apply ALL the configuration at once. You cannot pick and choose which pieces to put in, and you cannot put some in now, and some later. Don't execute individual commands, but use crm configure edit instead. :: node x3550m4n01 node x3550m4n02 @@ -1043,7 +1043,7 @@ Add a crontab entry to check the differences 0 6 * * * /sbin/drbdadm verify all -Please note that this process will take a few hours. You could schedule it at a time when it can be expected to run when things are relatively idle. You might choose to only run it once a week, but nightly seems to be a nice choice as well. You should only put this cron job on one side or the other of the DRBD mirror . not both. +Note that this process will take a few hours. You could schedule it at a time when it can be expected to run when things are relatively idle. You might choose to only run it once a week, but nightly seems to be a nice choice as well. You should only put this cron job on one side or the other of the DRBD mirror . not both. Correcting the differences automatically ---------------------------------------- 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 7e4a20530..5a80aade9 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 @@ -408,7 +408,7 @@ The operating system is installed on the internal disks. #. Connect the shared disk to both management nodes - To verify the shared disks are connected correctly, run the sginfo command on both management nodes and look for the same serial number in the output. Please be aware that the sginfo command may not be installed by default on Linux, the sginfo command is shipped with package sg3_utils, you can manually install the package sg3_utils on both management nodes. + To verify the shared disks are connected correctly, run the sginfo command on both management nodes and look for the same serial number in the output. Be aware that the sginfo command may not be installed by default on Linux, the sginfo command is shipped with package sg3_utils, you can manually install the package sg3_utils on both management nodes. Once the sginfo command is installed, run sginfo -l command on both management nodes to list all the known SCSI disks, for example, enter: :: diff --git a/docs/source/advanced/hamn/setup_xcat_high_available_management_node_in_softlayer.rst b/docs/source/advanced/hamn/setup_xcat_high_available_management_node_in_softlayer.rst index b8dcd63b6..a8b40f11a 100644 --- a/docs/source/advanced/hamn/setup_xcat_high_available_management_node_in_softlayer.rst +++ b/docs/source/advanced/hamn/setup_xcat_high_available_management_node_in_softlayer.rst @@ -329,7 +329,7 @@ Install corosync and pacemaker on both rhmn2 and rhmn1 Customize corosync/pacemaker configuration for xCAT ------------------------------------------------------ -Please be aware that you need to apply ALL the configuration at once. You cannot pick and choose which pieces to put in, and you cannot put some in now, and some later. Don't execute individual commands, but use crm configure edit instead. +Be aware that you need to apply ALL the configuration at once. You cannot pick and choose which pieces to put in, and you cannot put some in now, and some later. Don't execute individual commands, but use crm configure edit instead. Check that both rhmn2 and chetha are standby state now: :: diff --git a/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst b/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst index 9bc99086e..ca259ecb3 100644 --- a/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst +++ b/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst @@ -16,7 +16,7 @@ Appendix B: Diagnostics * **otherpkgs(including xCAT rpms) installation failed on the SN** --The OS repository is not created on the SN. When the "yum" command is processing the dependency, the rpm packages (including expect, nmap, and httpd, etc) - required by xCATsn can't be found. In this case, please check whether the + required by xCATsn can't be found. In this case, check whether the ``/install/postscripts/repos///`` directory exists on the MN. If it is not on the MN, you need to re-run the "copycds" command, and there will be some file created under the diff --git a/docs/source/advanced/hierarchy/databases/mysql_remove.rst b/docs/source/advanced/hierarchy/databases/mysql_remove.rst index 53cc15e71..6a25ab488 100644 --- a/docs/source/advanced/hierarchy/databases/mysql_remove.rst +++ b/docs/source/advanced/hierarchy/databases/mysql_remove.rst @@ -12,7 +12,7 @@ If you no longer want to use MySQL/MariaDB to maintain ``xcatdb``, and like to s XCATBYPASS=1 restorexCATdb -p ~/xcat-dbback -* Change to PostgreSQL, please following documentation: :doc:`/advanced/hierarchy/databases/postgres_install` +* Change to PostgreSQL, following documentation: :doc:`/advanced/hierarchy/databases/postgres_install` * Change back to default xCAT database, SQLite (**Note**: xCAT Hierarchy cluster will no longer work) diff --git a/docs/source/advanced/hierarchy/provision/diskless_sn.rst b/docs/source/advanced/hierarchy/provision/diskless_sn.rst index 1413c246e..4f521aa48 100644 --- a/docs/source/advanced/hierarchy/provision/diskless_sn.rst +++ b/docs/source/advanced/hierarchy/provision/diskless_sn.rst @@ -1,7 +1,7 @@ Diskless (Stateless) Installation ================================= -**Note: The stateless Service Node is not supported in ubuntu hierarchy cluster. For ubuntu, please skip this section.** +**Note: The stateless Service Node is not supported in ubuntu hierarchy cluster. For ubuntu, skip this section.** If you want, your Service Nodes can be stateless (diskless). The Service Node must contain not only the OS, but also the xCAT software and its dependencies. diff --git a/docs/source/advanced/index.rst b/docs/source/advanced/index.rst index dacf235d0..7193f3b71 100755 --- a/docs/source/advanced/index.rst +++ b/docs/source/advanced/index.rst @@ -16,6 +16,7 @@ Advanced Topics mixed_cluster/index.rst networks/index.rst ports/xcat_ports.rst + probe/index.rst raid/index.rst restapi/index.rst security/index.rst diff --git a/docs/source/advanced/kit/custom/using/addkitcomp.rst b/docs/source/advanced/kit/custom/using/addkitcomp.rst index b5b7acbae..f716770b8 100644 --- a/docs/source/advanced/kit/custom/using/addkitcomp.rst +++ b/docs/source/advanced/kit/custom/using/addkitcomp.rst @@ -63,4 +63,4 @@ If the kit does contain a deployment parameter file, the contents of the file wi addkitcomp -i vi /install/osimages//kits/KIT_DEPLOY_PARAMS.otherpkgs.pkglist -NOTE: Please be sure to know how changing any kit deployment parameters will impact the install of the product into the OS image. Many parameters include settings for automatic license acceptance and other controls to ensure proper unattended installs into a diskless image or remote installs into a diskful node. Changing these values will cause problems with genimage, updatenode, and other xCAT deployment commands. +NOTE: Be sure to know how changing any kit deployment parameters will impact the install of the product into the OS image. Many parameters include settings for automatic license acceptance and other controls to ensure proper unattended installs into a diskless image or remote installs into a diskful node. Changing these values will cause problems with genimage, updatenode, and other xCAT deployment commands. diff --git a/docs/source/advanced/kit/hpc/quickstart.rst b/docs/source/advanced/kit/hpc/quickstart.rst index 5a6174215..d76814907 100644 --- a/docs/source/advanced/kit/hpc/quickstart.rst +++ b/docs/source/advanced/kit/hpc/quickstart.rst @@ -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``. Please 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 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 #. Add the **Parallel ESSL** kitcomponents to osimage. diff --git a/docs/source/advanced/kit/index.rst b/docs/source/advanced/kit/index.rst index 8f1325f5a..83f4d44c1 100644 --- a/docs/source/advanced/kit/index.rst +++ b/docs/source/advanced/kit/index.rst @@ -5,7 +5,7 @@ xCAT supports a unique software bundling concept called **software kits**. Soft Prebuilt software kits are available as a tar file which can be downloaded and then added to the xCAT installation. After the kits are added to xCAT, kit components are then added to specific xCAT osimages to automatically install the software bundled with the kit during OS deployment. In some instances, software kits may be provided as partial kits. Partial kits need additional effort to complete the kit before it can be used by xCAT. -Software kits are supported for both diskful and diskless image provisionig. +Software kits are supported for both diskful and diskless image provisioning. .. toctree:: :maxdepth: 2 diff --git a/docs/source/advanced/mixed_cluster/building_stateless_images.rst b/docs/source/advanced/mixed_cluster/building_stateless_images.rst index cc3a75965..7d1145095 100644 --- a/docs/source/advanced/mixed_cluster/building_stateless_images.rst +++ b/docs/source/advanced/mixed_cluster/building_stateless_images.rst @@ -5,9 +5,9 @@ A **stateless**, or **diskless**, provisioned nodes is one where the operating s 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. -In a homogenous cluster, the management node is the same hardware architecture and running the same Operating System (OS) as the compute nodes, so ``genimage`` can directly be executed from the management node. +In a homogeneous cluster, the management node is the same hardware architecture and running the same Operating System (OS) as the compute nodes, so ``genimage`` can directly be executed from the management node. -The issues arises in a heterogenous cluster, where the management node is running a different level operating system *or* hardware architecture as the compute nodes in which to deploy the image. The ``genimage`` command that builds stateless images depends on various utilities provided by the base operating system and needs to be run on a node with the same hardware architecture and *major* Operating System release as the nodes that will be booted from the image. +The issues arises in a heterogeneous cluster, where the management node is running a different level operating system *or* hardware architecture as the compute nodes in which to deploy the image. The ``genimage`` command that builds stateless images depends on various utilities provided by the base operating system and needs to be run on a node with the same hardware architecture and *major* Operating System release as the nodes that will be booted from the image. Same Operating System, Different Architecture --------------------------------------------- @@ -27,7 +27,7 @@ The following describes creating stateless images of the same Operating System, lsdef -t osimage -z rhels6.3-x86_64-netboot-compute | sed 's/^[^ ]\+:/mycomputeimage:/' | mkdef -z -#. To obtain the ``genimage`` command to execte on ``n01``, execute the ``genimage`` command with the ``--dryrun`` option: :: +#. To obtain the ``genimage`` command to execute on ``n01``, execute the ``genimage`` command with the ``--dryrun`` option: :: genimage --dryrun mycomputeimage diff --git a/docs/source/advanced/networks/ethernet_switches/ethernet_switches.rst b/docs/source/advanced/networks/ethernet_switches/ethernet_switches.rst index 3fe88cf15..946a02362 100644 --- a/docs/source/advanced/networks/ethernet_switches/ethernet_switches.rst +++ b/docs/source/advanced/networks/ethernet_switches/ethernet_switches.rst @@ -1,7 +1,7 @@ Configure Ethernet Switches --------------------------- -It is recommended that spanning tree be set in the switches to portfast or edge-port for faster boot performance. Please see the relevant switch documentation as to how to configure this item. +It is recommended that spanning tree be set in the switches to portfast or edge-port for faster boot performance. See the relevant switch documentation as to how to configure this item. It is recommended that lldp protocol in the switches is enabled to collect the switch and port information for compute node during discovery process. @@ -71,9 +71,9 @@ Running Remote Commands in Parallel You can use xdsh to run parallel commands on Ethernet switches. The following shows how to configure xCAT to run xdsh on the switches: -**[Note]**:Configure the switch to allow **ssh** or **telnet**. This varies for switch to switch. Please refer to the switch command references to find out how to do it. +**[Note]**:Configure the switch to allow **ssh** or **telnet**. This varies for switch to switch. Refer to the switch command references to find out how to do it. -Add the switch in xCAT DB. Please refer to the "Discovering Switches" section if you want xCAT to discover and define the switches for you. :: +Add the switch in xCAT DB. Refer to the "Discovering Switches" section if you want xCAT to discover and define the switches for you. :: mkdef bntc125 groups=switch mgt=switch ip=10.4.25.1 nodetype=switch switchtype=BNT @@ -97,9 +97,9 @@ Set the ssh or telnet username an d password. :: xdsh bntc125 --devicetype EthSwitch::BNT "enable;configure terminal;vlan 3;end;show vlan" -Please note that you can run multiple switch commands, they are separated by comma. +Note that you can run multiple switch commands, they are separated by comma. -Please also note that --devicetype is used here. xCAT supports the following switch types out of the box: :: +Also note that --devicetype is used here. xCAT supports the following switch types out of the box: :: * BNT * Cisco @@ -178,7 +178,7 @@ The new configuration file will look like this: :: For **BNT** switches, the **command-to-set-term-length-to-0** is **terminal-length 0**. -Please make sure to add a semi-colon at the end of the "pre-command" line. +Make sure to add a semi-colon at the end of the "pre-command" line. Then you can run the xdsh like this: :: diff --git a/docs/source/advanced/networks/infiniband/firmware_updates.rst b/docs/source/advanced/networks/infiniband/firmware_updates.rst index b48296e8f..a963c3356 100644 --- a/docs/source/advanced/networks/infiniband/firmware_updates.rst +++ b/docs/source/advanced/networks/infiniband/firmware_updates.rst @@ -5,7 +5,7 @@ Firmware Updates Adapter Firmware Update ----------------------- -Please download the OFED IB adapter firmware from the Mellanox site `http://www.mellanox.com/page/firmware_table_IBM `_ . +Download the OFED IB adapter firmware from the Mellanox site `http://www.mellanox.com/page/firmware_table_IBM `_ . Obtain device id: :: diff --git a/docs/source/advanced/networks/infiniband/switch_configuration.rst b/docs/source/advanced/networks/infiniband/switch_configuration.rst index b1c6824bf..58e50e0ad 100644 --- a/docs/source/advanced/networks/infiniband/switch_configuration.rst +++ b/docs/source/advanced/networks/infiniband/switch_configuration.rst @@ -72,7 +72,7 @@ Use the following command to consolidate the syslog to the Management Node or Se Configure xdsh for Mellanox Switch ---------------------------------- -To run xdsh commands to the Mellanox Switch, you must use the --devicetype input flag to xdsh. In addition, for xCAT versions less than 2.8, you must add a configuration file, please see `Setup ssh connection to the Mellanox Switch`_ section. +To run xdsh commands to the Mellanox Switch, you must use the --devicetype input flag to xdsh. In addition, for xCAT versions less than 2.8, you must add a configuration file, see `Setup ssh connection to the Mellanox Switch`_ section. For the Mellanox Switch the ``--devicetype`` is ``IBSwitch::Mellanox``. See :doc:`xdsh man page ` for details. 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 3c034259a..f67b76d10 100644 --- a/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst +++ b/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst @@ -8,7 +8,7 @@ Pre-requirement In order to do switch-based switch discovery, the admin -1. Needs to manually setup and configure core-switch, SNMP v3 needs to be enabled in order for xCAT access to it. **username** and **userpassword** attributes are for the remote login. It can be for **ssh** or **telnet**. If it is for **telnet**, please set protocol to “telnet”. If the **username** is blank, the **username** and **password** will be retrieved from the passwd table with “switch” as the key. SNMP attributes will used for SNMPv3 communication. **nodetype** has to be set to "switch" to differentiate between switch-based node discovery or switch-based switch discovery. Refer to switches table attributes. Example of core-switch definition: +1. Needs to manually setup and configure core-switch, SNMP v3 needs to be enabled in order for xCAT access to it. **username** and **userpassword** attributes are for the remote login. It can be for **ssh** or **telnet**. If it is for **telnet**, set protocol to “telnet”. If the **username** is blank, the **username** and **password** will be retrieved from the passwd table with “switch” as the key. SNMP attributes will used for SNMPv3 communication. **nodetype** has to be set to "switch" to differentiate between switch-based node discovery or switch-based switch discovery. Refer to switches table attributes. Example of core-switch definition: :: diff --git a/docs/source/advanced/networks/switchdiscover/switches_discovery.rst b/docs/source/advanced/networks/switchdiscover/switches_discovery.rst index 3163db74b..295bad80e 100644 --- a/docs/source/advanced/networks/switchdiscover/switches_discovery.rst +++ b/docs/source/advanced/networks/switchdiscover/switches_discovery.rst @@ -37,5 +37,5 @@ The discovery process works with the following four kind of switches: :: BNT Juniper -The ``switchdiscover`` command can display the output in xml format, stanza forma and normal list format. Please see the man pages for this command for details. +The ``switchdiscover`` command can display the output in xml format, stanza forma and normal list format. See the man pages for this command for details. diff --git a/docs/source/advanced/networks/vlan/vlan.rst b/docs/source/advanced/networks/vlan/vlan.rst index f1d116bb6..0e3e3840c 100644 --- a/docs/source/advanced/networks/vlan/vlan.rst +++ b/docs/source/advanced/networks/vlan/vlan.rst @@ -53,7 +53,7 @@ For example: :: This means port 42 of switch1 is connected to port 50 of switch2. And switch1 can be accessed using SNMP version 3 and switch 2 can be accessed using SNMP version 2. -Note: The **username** and the **password** on the switches table are NOT the same as SSH user name and password. You have to configure SNMP on the switch for these parameters and then fill up this table. Please use **tabdump switches -d** command to find out the meaning of each column. +Note: The **username** and the **password** on the switches table are NOT the same as SSH user name and password. You have to configure SNMP on the switch for these parameters and then fill up this table. Use **tabdump switches -d** command to find out the meaning of each column. **2. Populate the switch table** @@ -80,7 +80,7 @@ The interface eth1 is for the application network on node1, node2 and node3. Not **3. Configure the switch for SNMP access** -Please make sure that the MN can access the switch using SNMP and the switch is configured such that it has SNMP read and write permissions. +Make sure that the MN can access the switch using SNMP and the switch is configured such that it has SNMP read and write permissions. You can use **snmpwalk/snmpget** and **snmpset** commands on the mn to check. These commands are from **net-snmp-utils** rpm. @@ -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. Please 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 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. Limitation ---------- diff --git a/docs/source/advanced/probe/detect_dhcpd.rst b/docs/source/advanced/probe/detect_dhcpd.rst new file mode 100644 index 000000000..fe7449497 --- /dev/null +++ b/docs/source/advanced/probe/detect_dhcpd.rst @@ -0,0 +1,5 @@ +detect_dhcpd +============ + +**detect_dhcp** can be used to detect the dhcp server in a network for a specific mac address. + diff --git a/docs/source/advanced/probe/discovery.rst b/docs/source/advanced/probe/discovery.rst new file mode 100644 index 000000000..611dba27e --- /dev/null +++ b/docs/source/advanced/probe/discovery.rst @@ -0,0 +1,5 @@ +discovery +========= + +**discovery** can be used to probe the discovery process, including pre-check for required configuration and realtime monitor of discovery process. + diff --git a/docs/source/advanced/probe/image.rst b/docs/source/advanced/probe/image.rst new file mode 100644 index 000000000..31d20dbfa --- /dev/null +++ b/docs/source/advanced/probe/image.rst @@ -0,0 +1,3 @@ +image +===== + diff --git a/docs/source/advanced/probe/index.rst b/docs/source/advanced/probe/index.rst new file mode 100644 index 000000000..4e6932de7 --- /dev/null +++ b/docs/source/advanced/probe/index.rst @@ -0,0 +1,27 @@ +xCAT probe +========== + +To help identify some of the common issues with xCAT, a new tool suite is now available **xCAT probe**. + +You can use ``xcatprobe -l`` to list all valid subcommands, output will be as below :: + + # xcatprobe -l + osdeploy Probe operating system provision process. Supports two modes - 'Realtime monitor' and 'Replay history'. + xcatmn After xcat installation, use this command to check if xcat has been installed correctly and is + ready for use. Before using this command, install 'tftp', 'nslookup' and 'wget' commands. + switch-macmap To retrieve MAC address mapping for the specified switch, or all the switches defined in + 'switches' table in xCAT db. + ...... + +.. toctree:: + :maxdepth: 2 + + xcatmn.rst + detect_dhcpd.rst + image.rst + osdeploy.rst + discovery.rst + switch-macmap.rst + nodecheck.rst + osimagecheck.rst + diff --git a/docs/source/advanced/probe/nodecheck.rst b/docs/source/advanced/probe/nodecheck.rst new file mode 100644 index 000000000..479846e75 --- /dev/null +++ b/docs/source/advanced/probe/nodecheck.rst @@ -0,0 +1,2 @@ +nodecheck +========= diff --git a/docs/source/advanced/probe/osdeploy.rst b/docs/source/advanced/probe/osdeploy.rst new file mode 100644 index 000000000..546d33198 --- /dev/null +++ b/docs/source/advanced/probe/osdeploy.rst @@ -0,0 +1,99 @@ +osdeploy +======== + +**osdeploy** operating system provision process. Supports two modes - 'Realtime monitor' and 'Replay history'. + +Realtime monitor: This is a default. This tool with monitor provision state of the node. Trigger 'Realtime monitor' before rebooting target node to do provisioning. + +Replay history: Used after provisioning is finished to probe the previously completed provisioning. + +**Note**: Currently, hierarchical structure is not supported. + +Usage +----- + +:: + + xcatprobe osdeploy -h + xcatprobe osdeploy -n [-t ] [-V] + xcatprobe osdeploy -n -r [-V] + +Options: + +* **-n**: The range of nodes to be monitored or replayed. +* **-r**: Trigger 'Replay history' mode. Follow the duration of rolling back. Units are 'h' (hour) or 'm' (minute). If unit is not specified, hour will be used by default. +* **-t**: The maximum time to wait when doing monitor, unit is minutes. default is 60. +* **-V**: Output more information. + +``-r`` means replay history of OS provision, if no ``-r`` means to do realtime monitor. + +Realtime monitor +---------------- + +To monitor OS provisioning in real time, open at least 2 terminal windows. One to run ``osdeploy`` probe: :: + + xcatprobe osdeploy -n cn1 [-V] + +After some pre-checks, the probe will wait for provisioning information, similar to output below: :: + + # xcatprobe osdeploy -n c910f03c17k20 + The install NIC in current server is enp0s1 [INFO] + All nodes which will be deployed are valid [ OK ] + ------------------------------------------------------------- + Start capturing every message during OS provision process...... + ------------------------------------------------------------- + +Open second terminal window to run provisioning: :: + + nodeset cn1 osimage= + rpower cn1 boot + +When all the nodes complete provisioning, the probe will exit and display output similar to: :: + + # xcatprobe osdeploy -n c910f03c17k20 + The install NIC in current server is enp0s1 [INFO] + All nodes which will be deployed are valid [ OK ] + ------------------------------------------------------------- + Start capturing every message during OS provision process...... + ------------------------------------------------------------- + + [c910f03c17k20] Use command rinstall to reboot node c910f03c17k20 + [c910f03c17k20] Node status is changed to powering-on + [c910f03c17k20] Receive DHCPDISCOVER via enp0s1 + [c910f03c17k20] Send DHCPOFFER on 10.3.17.20 back to 42:d0:0a:03:11:14 via enp0s1 + [c910f03c17k20] DHCPREQUEST for 10.3.17.20 (10.3.5.4) from 42:d0:0a:03:11:14 via enp0s1 + [c910f03c17k20] Send DHCPACK on 10.3.17.20 back to 42:d0:0a:03:11:14 via enp0s1 + [c910f03c17k20] Via TFTP download /boot/grub2/grub2-c910f03c17k20 + [c910f03c17k20] Via TFTP download /boot/grub2/powerpc-ieee1275/normal.mod + ...... + [c910f03c17k20] Postscript: otherpkgs exited with code 0 + [c910f03c17k20] Node status is changed to booted + [c910f03c17k20] done + [c910f03c17k20] provision completed.(c910f03c17k20) + [c910f03c17k20] provision completed [ OK ] + All nodes specified to monitor, have finished OS provision process [ OK ] + ==================osdeploy_probe_report================= + 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) :: + + + xcatprobe osdeploy -n cn1 -t 30 + +Replay history +-------------- + +To replay history of OS provision from 1 hour 20 minutes ago, use command as :: + + xcatprobe osdeploy -n cn1 -r 1h20m + +Outout will be similar to: :: + + # xcatprobe osdeploy -n c910f03c17k20 + The install NIC in current server is enp0s1 [INFO] + All nodes which will be deployed are valid [ OK ] + Start to scan logs which are later than *********, waiting for a while............. + ==================osdeploy_probe_report================= + All nodes provisioned successfully [ OK ] + diff --git a/docs/source/advanced/probe/osimagecheck.rst b/docs/source/advanced/probe/osimagecheck.rst new file mode 100644 index 000000000..9bf8d6c81 --- /dev/null +++ b/docs/source/advanced/probe/osimagecheck.rst @@ -0,0 +1,2 @@ +osimagecheck +============ diff --git a/docs/source/advanced/probe/switch-macmap.rst b/docs/source/advanced/probe/switch-macmap.rst new file mode 100644 index 000000000..bf600a239 --- /dev/null +++ b/docs/source/advanced/probe/switch-macmap.rst @@ -0,0 +1,3 @@ +switch-macmap +============= + diff --git a/docs/source/advanced/probe/xcatmn.rst b/docs/source/advanced/probe/xcatmn.rst new file mode 100644 index 000000000..469bffcf5 --- /dev/null +++ b/docs/source/advanced/probe/xcatmn.rst @@ -0,0 +1,56 @@ +xcatmn +====== + +**xcatmn** can be used to check if xcat has been installed correctly and is ready for use. + +**Note**: For several check items(eg. tftp service, dns service, http service), 'tftp', 'nslookup' and 'wget' are need. If not installed, a warning message will be displayed.. + +Command is as below :: + + xcatprobe xcatmn -i [-V] + +* **-i**: [Required] Specify the network interface name of provision network on management node. +* **-V**: Output more information for debug. + +For example, run command on Management Node :: + + xcatprobe xcatmn -i eth0 + +Output will be similar to: :: + + # xcatprobe xcatmn -i eth0 + [MN]: Sub process 'xcatd: SSL listener' is running [ OK ] + [MN]: Sub process 'xcatd: DB Access' is running [ OK ] + [MN]: Sub process 'xcatd: UDP listener' is running [ OK ] + [MN]: Sub process 'xcatd: install monitor' is running [ OK ] + [MN]: Sub process 'xcatd: Discovery worker' is running [ OK ] + [MN]: Sub process 'xcatd: Command log writer' is running [ OK ] + [MN]: xcatd is listening on port 3001 [ OK ] + [MN]: xcatd is listening on port 3002 [ OK ] + [MN]: 'lsxcatd -a' works [ OK ] + [MN]: The value of 'master' in 'site' table is an IP address [ OK ] + [MN]: NIC enp0s1 exists on current server [ OK ] + [MN]: Get IP address of NIC eth0 [ OK ] + [MN]: The IP *.*.*.* of eth0 equals the value of 'master' in 'site' table [ OK ] + [MN]: IP *.*.*.* of NIC eth0 is a static IP on current server [ OK ] + [MN]: *.*.*.* belongs to one of networks defined in 'networks' table [ OK ] + [MN]: There is domain definition in 'site' table [ OK ] + [MN]: There is a configuration in 'passwd' table for 'system' for node provisioning [ OK ] + [MN]: There is /install directory on current server [ OK ] + [MN]: There is /tftpboot directory on current server [ OK ] + [MN]: The free space of '/' is less than 12 G [ OK ] + [MN]: SELinux is disabled on current server [ OK ] + [MN]: Firewall is closed on current server [ OK ] + [MN]: HTTP service is ready on *.*.*.* [ OK ] + [MN]: TFTP service is ready on *.*.*.* [ OK ] + [MN]: DNS server is ready on *.*.*.* [ OK ] + [MN]: The size of /var/lib/dhcpd/dhcpd.leases is less than 100M [ OK ] + [MN]: DHCP service is ready on *.*.*.* [ OK ] + ======================do summary===================== + [MN]: Check on MN PASS. [ OK ] + +**[MN]** means that the verification is performed on the Management Node. Overall status of ``PASS`` or ``FAILED`` will be displayed after all items are verified.. + +Service Nodes are checked automatically for hierarchical clusters. + +For Service Nodes, the output will contain ``[SN:nodename]`` to distinguish different Service Nodes. diff --git a/docs/source/advanced/raid/hardware_raid.rst b/docs/source/advanced/raid/hardware_raid.rst index ca616790a..d6e0f3c8e 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 vender and device ID. For example, power8 SAS adapter pci_id is ``1014:034a``, ``1014`` is vender 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 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/``. Here are steps to use ``diskdiscover``: @@ -70,19 +70,19 @@ Here are the input parameters introduction: #. **delete_raid** : List raid arrays which should be removed. * If its value is all, all raid arrays detected should be deleted. - * If its value is a list of raid array names, these raid arrays will be deleted. Raid array names should be seperated by ``#``. + * If its value is a list of raid array names, these raid arrays will be deleted. Raid array names should be separated by ``#``. * If its value is null or there is no delete_raid, no raid array will be deleted. * If there is no delete_raid, the default value is null. #. **stripe_size** : It is optional used when creating RAID arrays. If stripe size is not specified, it will default to the recommended stripe size for the selected RAID level. -#. **create_raid** : To create a raid array, add a line beginning with create_raid, all attributes keys and values are seperated by ``#``. The formats are as followings: +#. **create_raid** : To create a raid array, add a line beginning with create_raid, all attributes keys and values are separated by ``#``. The formats are as followings: - * ``rl`` means RAID level, RAID level can be any supported RAID level for the given adapter, such as 0, 10, 5, 6. ``rl`` is a mandatory attribute for every create_raid. Supported RAID level is depend on pysical server's RAID adapter. + * ``rl`` means RAID level, RAID level can be any supported RAID level for the given adapter, such as 0, 10, 5, 6. ``rl`` is a mandatory attribute for every create_raid. Supported RAID level is depend on physical server's RAID adapter. * User can select disks based on following attributes value. User can find these value based on ``diskdiscover`` outputs as above section described. - a. ``pci_id`` is PCI vender and device ID. + a. ``pci_id`` is PCI vendor and device ID. b. ``pci_slot_name`` is the specified PCI location. If using ``pci_slot_name``, this RAID array will be created using disks from it. c. ``disk_names`` is a list of advanced format disk names. If using ``disk_names``, this RAID array will be created using these disks. @@ -139,7 +139,7 @@ Configuring RAID manually in xcat genesis system shell xdsh cn1 'configraid delete_raid=all create_raid="rl#0|pci_id#1014:034a|disk_num#2"' -Monitoring and debuging RAID configration process +Monitoring and debuging RAID configuration process '''''''''''''''''''''''''''''''''''''''''''''''''' #. Creating some RAID level arrays take very long time, for example, If user creates RAID 10, it will cost tens of minutes or hours. During this period, you can use xCAT xdsh command to monitor the progress of raid configuration. :: diff --git a/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst b/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst index a2abb4498..9855ef848 100644 --- a/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst +++ b/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst @@ -44,7 +44,7 @@ Enabling the certificate functionality of https server is useful for the Rest AP The certificate for xcatd has already been generated when installing xCAT, it can be reused by the https server. To enable the server certificate authentication, the hostname of xCAT MN must be a fully qualified domain name (FQDN). The REST API client also must use this FQDN when accessing the https server. If the hostname of the xCAT MN is not a FQDN, you need to change the hostname first. -Typically the hostname of the xCAT MN is initially set to the NIC which faces to the cluster (usually an internal/private NIC). If you want to enable the REST API for public client, please set the hostname of xCAT MN to one of the public NIC. +Typically the hostname of the xCAT MN is initially set to the NIC which faces to the cluster (usually an internal/private NIC). If you want to enable the REST API for public client, set the hostname of xCAT MN to one of the public NIC. To change the hostname, edit /etc/sysconfig/network (RHEL) or /etc/HOSTNAME (SLES) and run: :: diff --git a/docs/source/advanced/security/security.rst b/docs/source/advanced/security/security.rst index 628bf6d16..a0be534ed 100644 --- a/docs/source/advanced/security/security.rst +++ b/docs/source/advanced/security/security.rst @@ -1,7 +1,7 @@ Transmission Channel -------------------- -The xCAT daemon uses SSL to only allow authorized users to run xCAT commands. All xCAT commands are initiated as an xCAT **client**, even when run commands from the xCAT management node. This **client** opens an SSL socket to the xCAT daemon, sends the command and receives responses through this one socket. xCAT has configured the certificate for root, if you nee to authorize other users, please refer to below section. +The xCAT daemon uses SSL to only allow authorized users to run xCAT commands. All xCAT commands are initiated as an xCAT **client**, even when run commands from the xCAT management node. This **client** opens an SSL socket to the xCAT daemon, sends the command and receives responses through this one socket. xCAT has configured the certificate for root, if you nee to authorize other users, refer to the section below. Create SSL Certificate So That User Can Be Authenticated By xCAT @@ -25,7 +25,7 @@ This will create the following files in the 's ``$HOME/.xcat`` direct Commands Access Control ----------------------- -Except SSL channel, xCAT only authorize root on the management node to run **xCAT** commands by default. But xCAT can be configured to allow both **non-root users** and **remote users** to run limited xCAT commands. For remote users, we mean the users who triggers the xCAT commands from other nodes and not have to login to the management node. xCAT uses the **policy** table to control who has authority to run specific xCAT commands. For a full explanation of the **policy** table, please refer to :doc:`policy ` man page. +Except SSL channel, xCAT only authorize root on the management node to run **xCAT** commands by default. But xCAT can be configured to allow both **non-root users** and **remote users** to run limited xCAT commands. For remote users, we mean the users who triggers the xCAT commands from other nodes and not have to login to the management node. xCAT uses the **policy** table to control who has authority to run specific xCAT commands. For a full explanation of the **policy** table, refer to :doc:`policy ` man page. Granting Users xCAT Privileges @@ -74,7 +74,7 @@ Below are the steps of how to set up a login node. 1. Install the xCAT client - In order to avoid stucking in dependence problem in different distro. We recommand to create repository first by referring to below links. + In order to avoid dependency problems on different distros, we recommend creating repository first by referring to links below. * :doc:`Configure xCAT Software Repository in RHEL` @@ -111,11 +111,11 @@ Below are the steps of how to set up a login node. The remote not-root user still needs to set up the credentials for communication with management node. By running the ``/opt/xcat/share/xcat/scripts/setup-local-client.sh `` command as root in management node, the credentials are generated in 's ``$HOME/.xcat`` directory in management node. These credential files must be copied to the 's ``$HOME/.xcat`` directory on the login node. **Note**: After ``scp``, in the login node, you must make sure the owner of the credentials is . - Setup your ``policy`` table on the managment node with the permissions that you would like the non-root id to have. + Setup your ``policy`` table on the management node with the permissions that you would like the non-root id to have. At this time, the non-root id should be able to execute any commands that have been set in the ``policy`` table from the Login Node. - If any remote shell commmands (psh,xdsh) are needed, then you need to follow `Extra Setup For Remote Commands`_. + If any remote shell commands (psh,xdsh) are needed, then you need to follow `Extra Setup For Remote Commands`_. Auditing @@ -142,7 +142,7 @@ Password Management xCAT is required to store passwords for various logons so that the application can login to the devices without having to prompt for a password. The issue is how to securely store these passwords. -Currently xCAT stores passwords in ``passwd`` table. You can store them as plaintext, you also can store them as MD5 ciphertext. +Currently xCAT stores passwords in ``passwd`` table. You can store them as plain text, you can also store them as MD5 ciphertext. Here is an example about how to store a MD5 encrypted password for root in ``passwd`` table. :: @@ -178,5 +178,5 @@ This setting of site.sshbetweennodes will only enable root ssh between nodes of Secure Zones ```````````` -You can set up multiple zones in an xCAT cluster. A node in the zone can ssh without password to any other node in the zone, but not to nodes in other zones. Please refer :doc:`Zones ` for more information. +You can set up multiple zones in an xCAT cluster. A node in the zone can ssh without password to any other node in the zone, but not to nodes in other zones. Refer to :doc:`Zones ` for more information. diff --git a/docs/source/advanced/sysclone/sysclone.rst b/docs/source/advanced/sysclone/sysclone.rst index 5aa301f80..df3ed17c1 100644 --- a/docs/source/advanced/sysclone/sysclone.rst +++ b/docs/source/advanced/sysclone/sysclone.rst @@ -40,7 +40,7 @@ This document describes how to install and configure a template node (called gol Prepare the xCAT Management Node for Support Sysclone ````````````````````````````````````````````````````` -How to configure xCAT management node please refer to section :ref:`install_guides` +To configure xCAT management node refer to section :ref:`install_guides` For support Sysclone, we need to install some extra rpms on management node and the golden client. @@ -93,7 +93,7 @@ Install and Configure the Golden Client The Golden Client acts as a regular node for xCAT, just have some extra rpms to support clone. When you deploy golden client with xCAT, you just need to add a few additional definitions to the image which will be used to deploy golden client. -For information of how to install a regular node, please refer to section :ref:`Diskful Installation ` +For information of how to install a regular node, refer to section :ref:`Diskful Installation ` For support clone, add 'otherpkglist' and 'otherpkgdir' attributes to the image definition which will be used to deploy golden client, then deploy golden client as normal. then the golden client will have extra rpms to support clone. If you have deployed your golden client already, using 'updatenode' command to push these extra rpms to golden client. CentOS share the same pkglist file with RHEL. For example: @@ -121,7 +121,7 @@ For support clone, add 'otherpkglist' and 'otherpkgdir' attributes to the image chdef -t osimage -o -p otherpkgdir=/install/post/otherpkgs/rhels6.3/ppc64 updatenode -S -*[Note]: If you install systemimager RPMs on CentOS 6.5 node by above steps, you maybe hit failure. this is a known issue because some defect of CentOS6.5 itself. Please refer to known issue section for help.* +*[Note]: If you install systemimager RPMs on CentOS 6.5 node by above steps, you maybe hit failure. this is a known issue because some defect of CentOS6.5 itself. Refer to known issue section for help.* Capture Image from Golden Client ```````````````````````````````` @@ -159,7 +159,7 @@ If, at a later time, you need to make changes to the golden client (install new **[Limitation]**: In xcat2.8.5, this feature has limitation in RHEL and CentOS. when your delta changes related bootloader, it would encounter error. This issue will be fixed in xcat higher version. So up to now, in RHEL and CentOS, this feature just update files not related bootloader. -Update delta changes please follow below steps: +Update delta changes follow below steps: 1. Make changes to your golden node (install new rpms, change config files, etc.). @@ -199,7 +199,7 @@ Known Issue Can not install systemimager RPMs in CentOS6.5 by yum `````````````````````````````````````````````````````` -If you install systemimager RPMs on CentOS 6.5 node by yum, you maybe hit failure because some defect of CentOS6.5 itself. So please copy related RPMs to CentOS 6.5 node and install them by hand. +If you install systemimager RPMs on CentOS 6.5 node using yum, you may experience some problems due to CentOS6.5 itself. If that happens, copy related RPMs to CentOS 6.5 node and install them by hand. * **On management node**:: diff --git a/docs/source/developers/guides/code/builds.rst b/docs/source/developers/guides/code/builds.rst index 3b4447ed2..7afb55b1b 100644 --- a/docs/source/developers/guides/code/builds.rst +++ b/docs/source/developers/guides/code/builds.rst @@ -12,7 +12,7 @@ Clone the xCAT project from `GitHub `_:: xcat-deps --------- -The ``xcat-deps`` package is currently owned and maintained by the core development on our internal servers. Please use the packages created at: http://xcat.org/download.html#xcat-dep +The ``xcat-deps`` package is currently owned and maintained by the core development on our internal servers. Use the packages created at: http://xcat.org/download.html#xcat-dep man pages diff --git a/docs/source/developers/guides/docs/doc_guidelines.rst b/docs/source/developers/guides/docs/doc_guidelines.rst index 3fe458d0c..0a245fe01 100644 --- a/docs/source/developers/guides/docs/doc_guidelines.rst +++ b/docs/source/developers/guides/docs/doc_guidelines.rst @@ -161,7 +161,7 @@ Add links to refer other web page is a very common way in writting document, it Add OS or ARCH Specific Contents -------------------------------- -When writing a common xCAT doc, we always encounter the case that certain small part of content needs to be OS or ARCH specific. In this case, please use the following format to add specific branches. +When writing a common xCAT doc, we always encounter the case that certain small part of content needs to be OS or ARCH specific. In this case, use the following format to add specific branches. The keyword in the **[]** can be an OS name or ARCH name, or any name which can distinguish the content from other part. diff --git a/docs/source/developers/license/index.rst b/docs/source/developers/license/index.rst index 949bcdd11..3725a1d9c 100644 --- a/docs/source/developers/license/index.rst +++ b/docs/source/developers/license/index.rst @@ -3,7 +3,7 @@ Contributor and Maintainer Agreements We welcome developers willing to contribute to the xCAT project to help make it better. -Please follow the guidelines below. +Follow the guidelines below. .. toctree:: :maxdepth: 1 diff --git a/docs/source/developers/license/xcat_corporate_contributor_license_agreement.rst b/docs/source/developers/license/xcat_corporate_contributor_license_agreement.rst index d6cd3f678..2e0ec40c6 100644 --- a/docs/source/developers/license/xcat_corporate_contributor_license_agreement.rst +++ b/docs/source/developers/license/xcat_corporate_contributor_license_agreement.rst @@ -7,7 +7,7 @@ In order to clarify the intellectual property license granted with Contributions This version of the Agreement allows an entity (the "Corporation") to submit Contributions to the xCAT Community, to authorize Contributions submitted by its designated employees to the xCAT Community, and to grant copyright and patent licenses thereto. -If you have not already done so, please complete and sign, then scan and email a PDF file of this Agreement to: **xcat-legal@lists.sourceforge.net**. Please read this document carefully before signing and keep a copy for your records. +If you have not already done so, complete and sign, then scan and email a PDF file of this Agreement to: **xcat-legal@lists.sourceforge.net**. Read this document carefully before signing and keep a copy for your records. Corporation name: ___________________________________________________ diff --git a/docs/source/developers/license/xcat_individual_contributor_license_agreement.rst b/docs/source/developers/license/xcat_individual_contributor_license_agreement.rst index a39e250d9..d85e87a2f 100644 --- a/docs/source/developers/license/xcat_individual_contributor_license_agreement.rst +++ b/docs/source/developers/license/xcat_individual_contributor_license_agreement.rst @@ -5,7 +5,7 @@ The xCAT Community Individual Contributor License Agreement ("Agreement") In order to clarify the intellectual property license granted with Contributions from any person or entity made for the benefit of the xCAT Community, a Contributor License Agreement ("CLA") must be on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the xCAT Community and its users; it does not change your rights to use your own Contributions for any other purpose. -If you have not already done so, please complete and sign, then scan and email a PDF file of this Agreement to: **xcat-legal@lists.sourceforge.net**. +If you have not already done so, complete and sign, then scan and email a PDF file of this Agreement to: **xcat-legal@lists.sourceforge.net**. diff --git a/docs/source/guides/admin-guides/basic_concepts/global_cfg/index.rst b/docs/source/guides/admin-guides/basic_concepts/global_cfg/index.rst index 052836083..1ad7a72ff 100644 --- a/docs/source/guides/admin-guides/basic_concepts/global_cfg/index.rst +++ b/docs/source/guides/admin-guides/basic_concepts/global_cfg/index.rst @@ -1,9 +1,9 @@ Global Configuration ==================== -All the xCAT global configurations are stored in site table, xCAT Admin can adjust the configuration by modifing the site attibute with ``tabedit``. +All the xCAT global configurations are stored in site table, xCAT Admin can adjust the configuration by modifying the site attribute with ``tabedit``. -This section only presents some key global configurations, for the complete reference on the xCAT global configurations, please refer to the ``tabdump -d site``. +This section only presents some key global configurations, for the complete reference on the xCAT global configurations, refer to the ``tabdump -d site``. Database Attributes @@ -71,7 +71,7 @@ Install/Deployment Attributes The local directory name used to hold the node deployment packages. * runbootscripts: - If set to ``yes`` the scripts listed in the postbootscripts attribute in the osimage and postscripts tables will be run during each reboot of stateful (diskful) nodes. This attribute has no effect on stateless nodes. Please run the following command after you change the value of this attribute :: + If set to ``yes`` the scripts listed in the postbootscripts attribute in the osimage and postscripts tables will be run during each reboot of stateful (diskful) nodes. This attribute has no effect on stateless nodes. Run the following command after you change the value of this attribute :: updatenode -P setuppostbootscripts @@ -83,9 +83,9 @@ Install/Deployment Attributes '0': disable debug mode '1': enable basic debug mode - '2': enalbe expert debug mode + '2': enable expert debug mode - For the details on 'basic debug mode' and 'expert debug mode', please refer to xCAT documentation. + For the details on 'basic debug mode' and 'expert debug mode', refer to xCAT documentation. Remoteshell Attributes diff --git a/docs/source/guides/admin-guides/basic_concepts/network_planning/index.rst b/docs/source/guides/admin-guides/basic_concepts/network_planning/index.rst index ef87c28d2..f88967131 100644 --- a/docs/source/guides/admin-guides/basic_concepts/network_planning/index.rst +++ b/docs/source/guides/admin-guides/basic_concepts/network_planning/index.rst @@ -19,7 +19,7 @@ For a cluster, several networks are necessary to enable the cluster management a * DHCP(Dynamic Host Configuration Protocol) - The dhcp server, usually the management node or service node, privides the dhcp service for the entire cluster. + The dhcp server, usually the management node or service node, provides the dhcp service for the entire cluster. * TFTP(Trivial File Transfer Protocol) diff --git a/docs/source/guides/admin-guides/basic_concepts/network_planning/xcat_net_planning.rst b/docs/source/guides/admin-guides/basic_concepts/network_planning/xcat_net_planning.rst index dbf66a9e1..598173d11 100644 --- a/docs/source/guides/admin-guides/basic_concepts/network_planning/xcat_net_planning.rst +++ b/docs/source/guides/admin-guides/basic_concepts/network_planning/xcat_net_planning.rst @@ -54,7 +54,7 @@ It is important to note that some HA-related software like DRDB, Pacemaker, and HA Service Nodes ```````````````` -When you have NFS-based diskless (statelite) nodes, there is sometimes the motivation make the NFS serving highly available among all of the service nodes. This is not recommended because it is a very complex configuration. In our opinion, the complexity of this setup can nullify much of the availibility you hope to gain. If you need your compute nodes to be highly available, you should strongly consider stateful or stateless nodes. +When you have NFS-based diskless (statelite) nodes, there is sometimes the motivation make the NFS serving highly available among all of the service nodes. This is not recommended because it is a very complex configuration. In our opinion, the complexity of this setup can nullify much of the availability you hope to gain. If you need your compute nodes to be highly available, you should strongly consider stateful or stateless nodes. If you still have reasons to pursue HA service nodes: diff --git a/docs/source/guides/admin-guides/basic_concepts/node_type.rst b/docs/source/guides/admin-guides/basic_concepts/node_type.rst index 4f7a84169..235286218 100644 --- a/docs/source/guides/admin-guides/basic_concepts/node_type.rst +++ b/docs/source/guides/admin-guides/basic_concepts/node_type.rst @@ -1,7 +1,7 @@ xCAT Cluster OS Running Type ============================ -Whether a node is a pyhsical server or a virtual machine, it needs to run an Operating System to support user applications. Generally, the OS is installed in the hard disk of the compute node. But xCAT also support the type that running OS in the RAM. +Whether a node is a physical server or a virtual machine, it needs to run an Operating System to support user applications. Generally, the OS is installed in the hard disk of the compute node. But xCAT also support the type that running OS in the RAM. This section gives the pros and cons of each OS running type, and describes the cluster characteristics that will impact from each. @@ -32,7 +32,7 @@ Nodes boot from a RAMdisk OS image downloaded from the xCAT mgmt node or service You can't use a large image with many different applications in the image for varied users, because it uses too much of the node's memory to store the ramdisk. (To mitigate this disadvantage, you can put your large application binaries and libraries in shared storage to reduce the ramdisk size. This requires some manual configuration of the image). - Each node can also have a local "scratch" disk for ``swap``, ``/tmp``, ``/var``, ``log`` files, dumps, etc. The purpose of the scratch disk is to provide a location for files that are written to by the node that can become quite large or for files that you don't want to disappear when the node reboots. There should be nothing put on the scratch disk that represents the node's "state", so that if the disk fails you can simply replace it and reboot the node. A scratch disk would typically be used for situations like: job scheduling preemption is required (which needs a lot of swap space), the applications write large temp files, or you want to keep gpfs log or trace files persistently. (As a partial alternative to using the scratch disk, customers can choose to put ``/tmp`` ``/var/tmp``, and log files (except GPFS logs files) in GPFS, but must be willing to accept the dependency on GPFS). This can be done by enabling the 'localdisk' support. For the details, please refer to the section [TODO Enabling the localdisk Option]. + Each node can also have a local "scratch" disk for ``swap``, ``/tmp``, ``/var``, ``log`` files, dumps, etc. The purpose of the scratch disk is to provide a location for files that are written to by the node that can become quite large or for files that you don't want to disappear when the node reboots. There should be nothing put on the scratch disk that represents the node's "state", so that if the disk fails you can simply replace it and reboot the node. A scratch disk would typically be used for situations like: job scheduling preemption is required (which needs a lot of swap space), the applications write large temp files, or you want to keep gpfs log or trace files persistently. (As a partial alternative to using the scratch disk, customers can choose to put ``/tmp`` ``/var/tmp``, and log files (except GPFS logs files) in GPFS, but must be willing to accept the dependency on GPFS). This can be done by enabling the 'localdisk' support. For the details, refer to the section [TODO Enabling the localdisk Option]. OSimage Definition diff --git a/docs/source/guides/admin-guides/basic_concepts/xcat_db/index.rst b/docs/source/guides/admin-guides/basic_concepts/xcat_db/index.rst index 29cfa8eb4..b6351d6ca 100644 --- a/docs/source/guides/admin-guides/basic_concepts/xcat_db/index.rst +++ b/docs/source/guides/admin-guides/basic_concepts/xcat_db/index.rst @@ -40,7 +40,7 @@ For a complete reference, see the man page for xcatdb: ``man xcatdb``. **Manipulate xCAT Database Tables** -xCAT offers 5 commands to manipulate the databse tables: +xCAT offers 5 commands to manipulate the database tables: * ``tabdump`` diff --git a/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst b/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst index 02bc88ed4..1e3c8482b 100644 --- a/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst +++ b/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst @@ -26,7 +26,7 @@ Another example is if "node1" is assigned the IP address "10.0.0.1", node2 is as #node,ip,hostnames,otherinterfaces,comments,disable "compute","|node(\d+)|10.0.0.($1+0)|",,,, -In this example, the regular expression in the ``ip`` attribute uses ``|`` to separate the 1st and 2nd part. This means that xCAT will allow arithmetic operations in the 2nd part. In the 1st part, ``(\d+)``, will match the number part of the node name and put that in a variable called ``$1``. The 2nd part is what value to give the ``ip`` attribute. In this case it will set it to the string "10.0.0." and the number that is in ``$1``. (Zero is added to ``$1`` just to remove any leading zeroes.) +In this example, the regular expression in the ``ip`` attribute uses ``|`` to separate the 1st and 2nd part. This means that xCAT will allow arithmetic operations in the 2nd part. In the 1st part, ``(\d+)``, will match the number part of the node name and put that in a variable called ``$1``. The 2nd part is what value to give the ``ip`` attribute. In this case it will set it to the string "10.0.0." and the number that is in ``$1``. (Zero is added to ``$1`` just to remove any leading zeros.) A more involved example is with the ``vm`` table. If your kvm nodes have node names c01f01x01v01, c01f02x03v04, etc., and the kvm host names are c01f01x01, c01f02x03, etc., then you might have an ``vm`` table like :: @@ -45,14 +45,14 @@ Before you panic, let me explain each column: ``|\D+(\d+)\D+(\d+)\D+(\d+)\D+(\d+)|dir:///install/vms/vm($4+0)|`` - This item is similar to the one above. This substituion pattern will produce the value for the 5th column (a list of storage files or devices to be used). Because this row was the match for "c01f02x03v04", the produced value is "dir:///install/vms/vm4". + This item is similar to the one above. This substitution pattern will produce the value for the 5th column (a list of storage files or devices to be used). Because this row was the match for "c01f02x03v04", the produced value is "dir:///install/vms/vm4". Just as the explained above, when the node definition "c01f02x03v04" is created with :: # mkdef -t node -o c01f02x03v04 groups=kvms 1 object definitions have been created or modified. -The generated node deinition is :: +The generated node definition is :: # lsdef c01f02x03v04 Object name: c01f02x03v04 diff --git a/docs/source/guides/admin-guides/basic_concepts/xcat_object/index.rst b/docs/source/guides/admin-guides/basic_concepts/xcat_object/index.rst index ea1e715da..7c11a9e0a 100644 --- a/docs/source/guides/admin-guides/basic_concepts/xcat_object/index.rst +++ b/docs/source/guides/admin-guides/basic_concepts/xcat_object/index.rst @@ -67,7 +67,7 @@ You can get the detail description of each object by ``man `` e.g. * **group Object** - **group** is an object which includes multiple **node object**. When you set **group** attribute for a **node object** to a group name like **x86_64**, the group **x86_64** is automatically genereated and the node is assigned to the group. + **group** is an object which includes multiple **node object**. When you set **group** attribute for a **node object** to a group name like **x86_64**, the group **x86_64** is automatically generated and the node is assigned to the group. The benefits of using **group object**: 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 da723e72b..273c6c13c 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 @@ -18,15 +18,15 @@ The paralell compression tool ``pigz`` can be enabled by installing ``pigz`` pac EPEL has an ``epel-release`` package that includes gpg keys for package signing and repository information. Installing this package for your Enterprise Linux version should allow you to use normal tools such as ``yum`` to install packages and their dependencies. - Please refer to the http://fedoraproject.org/wiki/EPEL for more details on EPEL + Refer to the http://fedoraproject.org/wiki/EPEL for more details on EPEL 1) Enabling the ``pigz`` in ``genimage`` (only supported in RHELS6 or above) - ``pigz`` should be installed in the diskless rootimg. Please 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. + ``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`` - ``pigz`` should be installed on the management server. Please download ``pigz`` package from https://dl.fedoraproject.org/pub/epel/ , then install the ``pigz`` with ``yum`` or ``rpm``. + ``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``. * **[UBUNTU]** 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 30384df3a..77651f270 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 @@ -33,7 +33,7 @@ If you have newer updates to some of your operating system packages that you wou createrepo . chdef -t osimage --- pkgdir=/install//,/install/osupdates// -Note:If the objective node is not installed by xCAT,please make sure the correct osimage pkgdir attribute so that you could get the correct repository data. +Note:If the objective node is not installed by xCAT, make sure the correct osimage pkgdir attribute so that you could get the correct repository data. .. _File-Format-for-pkglist-label: diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_partition.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_partition.rst index 44e05eebd..39f523947 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_partition.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/cfg_partition.rst @@ -72,7 +72,7 @@ Here is partition definition file example for RedHat LVM partition in IBM Power .. BEGIN_partition_definition_file_example_RedHat_RAID1_for_IBM_Power_machines -Partition definition file example for RedHat RAID1 please refer to :doc:`Configure RAID before Deploy OS ` +To partition definition file example for RedHat RAID1 refer to :doc:`Configure RAID before Deploy OS ` .. END_partition_definition_file_example_RedHat_RAID1_for_IBM_Power_machines @@ -287,7 +287,7 @@ Here is partition definition file example for SLES standard partition in ppc64 m .. BEGIN_partition_definition_file_example_SLES_RAID1 -Partition definition file example for SLES RAID1 please refer to `Configure RAID before Deploy OS `_ +To partition definition file example for SLES RAID1 refer to `Configure RAID before Deploy OS `_ .. END_partition_definition_file_example_SLES_RAID1 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 28a329966..85973cc1c 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 @@ -150,7 +150,7 @@ Currently, only NFS is supported for the setup of kdump. If the dump attribute is not set, the kdump service will not be enabled. -Please make sure the NFS remote path(nfs:///) is exported and it is read-writeable to the node where kdump service is enabled. +Make sure the NFS remote path(nfs:///) is exported and it is read-writeable to the node where kdump service is enabled. How to trigger kernel panic on Linux ------------------------------------ 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 910ebf581..a5dcf5382 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 @@ -104,7 +104,7 @@ Skip this section if you want to use the image as is. * Modify .pkglist file to add or remove packges that are from the os distro -* Modify .otherpkgs.pkglist to add or remove packages from other sources. Please refer to ``Using_Updatenode`` for details +* Modify .otherpkgs.pkglist to add or remove packages from other sources. Refer to ``Using_Updatenode`` for details * For diskful, modify the .tmpl file to change the kickstart/autoyast configuration 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 273307a5b..cc7a1fc49 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 @@ -109,7 +109,7 @@ To create the virtual machine "vm1" with 20G hard disk on a hypervisor directory mkvm vm1 -s 20G -When "vm1" is created successfully, a VM hard disk file with a name like "vm1.sda.qcow2" will be found in the location specified by **vmstorage**. What's more, the **mac** attribute of "vm1" is set automatically, please check it with: :: +When "vm1" is created successfully, a VM hard disk file with a name like "vm1.sda.qcow2" will be found in the location specified by **vmstorage**. What's more, the **mac** attribute of "vm1" is set automatically, check it with: :: lsdef vm1 -i mac @@ -132,7 +132,7 @@ or running the following command on the kvm hypervisor "kvmhost1" :: Monitoring the Virtual Machine `````````````````````````````` -When the VM has been created and powered on, please choose one of the following methods to monitor and access it. +When the VM has been created and powered on, choose one of the following methods to monitor and access it. * Open the console on kvm hypervisor: :: 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 d9bcd36fd..67444a2cd 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/updatenode.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/updatenode.rst @@ -29,7 +29,7 @@ Installing Additional OS Distro Packages For packages from the OS distro, add the new package names (without the version number) in the .pkglist file. If you have newer updates to some of your operating system packages that you would like to apply to your OS image, you can place them in another directory, and add that directory to your osimage pkgdir attribute. How to add additional OS distro packages, go to :ref:`Install-Additional-OS-Packages-label` -Note:If the objective node is not installed by xCAT, please make sure the correct osimage pkgdir attribute so that you could get the correct repository data. +Note:If the objective node is not installed by xCAT, make sure the correct osimage pkgdir attribute so that you could get the correct repository data. Install Additional non-OS Packages `````````````````````````````````` @@ -132,8 +132,8 @@ Linux: xdsh -e /install/postscripts/xcatdsklspost -m 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. Please 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. Please make sure /tmp and /xcatpost have enough space to hold the rpms and please 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. Please 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, please make sure all the necessary depended rpms are copied in the same source directory. + * 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. * 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/discovery_using_defined.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst index a310c908e..d9fe7c2a0 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst @@ -69,8 +69,6 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi mgt=ipmi mtm=8247-22L serial=10112CA - nodetype=mp - hwtype=bmc #. Edit the ``predefined.stanzas`` file and change the discovered nodes to the intended ``hostname`` and ``IP address``. @@ -87,7 +85,7 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi ip=10.1.2.1 - #. Remove ``nodetype`` and ``hwtype`` from ``predefined.stanza`` file based on the MTMS mapping. + #. Remove ``nodetype`` and ``hwtype`` if defined in the ``predefined.stanza``. #. Repeat for additional nodes in the ``predefined.stanza`` file based on the MTMS mapping. diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst index e30c834b1..d2ad59575 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst @@ -22,7 +22,7 @@ The discovered PBMC node will be like this:: postscripts=syslog,remoteshell,syncfiles serial=10112CA -**Note**: Pls note that the PBMC node is just used to control the physical during hardware discovery process, it will be deleted after the correct server node object is found. +**Note**: Note that the PBMC node is just used to control the physical during hardware discovery process, it will be deleted after the correct server node object is found. Start discovery process ----------------------- diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst index 91934420a..fbb43f7c6 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/seq_discovery.rst @@ -26,7 +26,7 @@ Set the target `osimage` into the chain table to automatically provision the ope chdef cn1 -p chain="osimage=" -For more information about chain, please refer to :doc:`Chain <../../../../../advanced/chain/index>` +For more information about chain, refer to :doc:`Chain <../../../../../advanced/chain/index>` Initialize the discovery process ```````````````````````````````` diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst index 857bc35be..cb5c2d9f4 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/switch_discovery.rst @@ -62,7 +62,7 @@ Set the target `osimage` into the chain table to automatically provision the ope chdef cn1 -p chain="osimage=" -For more information about chain, please refer to :doc:`Chain <../../../../../advanced/chain/index>` +For more information about chain, refer to :doc:`Chain <../../../../../advanced/chain/index>` Add cn1 into DNS:: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management.rst index 85f2c22ec..17c6af73e 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management.rst @@ -14,7 +14,7 @@ With xCAT, the end user can turn the beacon light on or off with the commands sh rbeacon cn1 on rbeacon cn1 off -Please notice, the current state of the beacon light can not be inquery remotely. As a workaround, one can always use the ``rbeacon`` command to turn all the beacon lights in one frame off, and then turn a particular beancon light on. :: +The current state of the beacon light can not be queried remotely. As a workaround, one can always use the ``rbeacon`` command to turn all the beacon lights in one frame off, and then turn a particular beacon light on. :: rbeacon a_group_of_cn off rbeacon cn5 on @@ -35,7 +35,7 @@ Or do a hardware reset, run :: rpower cn1 reset -Get the current rpower state of a machine, please refer to the example below. :: +Get the current rpower state of a machine, refer to the example below. :: # rpower cn1 state cn1: Running @@ -80,16 +80,16 @@ To get all the hardware information, which including the model type, serial numb rinv cn1 all -As an example, in order to get only the information of firmware version, the follwing command can be used. :: +As an example, in order to get only the information of firmware version, the following command can be used. :: rinv cn1 firm Remote Hardware Vitals `````````````````````` -Collect runtime information from running physical machine is also a big requirement for real life system administrators. This kind of information includes, temperature of CPU, internal voltage of paricular socket, wattage with workload, speed of cooling fan, et al. +Collect runtime information from running physical machine is also a big requirement for real life system administrators. This kind of information includes, temperature of CPU, internal voltage of particular socket, wattage with workload, speed of cooling fan, et al. -In order to get such information, please use ``rvitals`` command. Please also notice, this kind of information various among different model types of the machine. Thus, please check the actual output of the ``rvitals`` command against your machine, to verify which kinds of information can be get. The information may change due to the firmware updating of the machine. :: +In order to get such information, use ``rvitals`` command. This kind of information varies among different model types of the machine. Thus, check the actual output of the ``rvitals`` command against your machine, to verify which kinds of information can be extracted. The information may change after the firmware update of the machine. :: rvitals cn1 all @@ -115,7 +115,7 @@ Update node firmware to the version of the HPM file Configures Nodes' Service Processors ```````````````````````````````````` -Here comes the command, ``rspconfig``. It is used to configure the service processor of a physical machine. On a OpenPower system, the service processor is the BMC, Baseboard Management Controller. Various variables can be set through the command. But, please also notice, the actual configuration may change among different machine-model types. +Here comes the command, ``rspconfig``. It is used to configure the service processor of a physical machine. On a OpenPower system, the service processor is the BMC, Baseboard Management Controller. Various variables can be set through the command. Also notice, the actual configuration may change among different machine-model types. Examples 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 32686df62..7a00d46e6 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 @@ -28,7 +28,7 @@ rpower fails with "Error: internal error Process exited while reading console lo Then restart the NFS services and try to power on the VM again... - **Note**: For stateless hypervisor, please purge the VM by ``rmvm -p vm1``, reboot the hypervisor and then create the VM. + **Note**: For stateless hypervisor, purge the VM by ``rmvm -p vm1``, reboot the hypervisor and then create the VM. rpower fails with "Error: internal error: process exited while connecting to monitor qemu: Permission denied" ------------------------------------------------------------------------------------------------------------- @@ -77,7 +77,7 @@ Error: Cannot communicate via libvirt to kvmhost1 The kvm related commands complain "Error: Cannot communicate via libvirt to kvmhost1" **Solution**: - Usually caused by incorrect ssh configuration between xCAT management node and hypervisor. Please make sure it is possible to access the hypervisor from management node via ssh without password. + Usually caused by incorrect ssh configuration between xCAT management node and hypervisor. Make sure it is possible to access the hypervisor from management node via ssh without password. Fail to ping the installed VM @@ -89,7 +89,7 @@ Fail to ping the installed VM ADDRCONF(NETDEV_UP): eth0 link is not ready. **Solutoin**: - Usually caused by the incorrect VM NIC model. Please try the following steps to specify "virtio": :: + Usually caused by the incorrect VM NIC model. Try the following steps to specify "virtio": :: rmvm vm1 chdef vm1 vmnicnicmodel=virtio diff --git a/docs/source/guides/admin-guides/manage_clusters/x86_64/index.rst b/docs/source/guides/admin-guides/manage_clusters/x86_64/index.rst index ac1e1a950..88577cbae 100644 --- a/docs/source/guides/admin-guides/manage_clusters/x86_64/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/x86_64/index.rst @@ -3,4 +3,4 @@ x86_64 This section is not available at this time. -Please refer to `xCAT Documentation `_ on SourceForge for information on System X servers. +Refer to `xCAT Documentation `_ on SourceForge for information on System X servers. diff --git a/docs/source/guides/admin-guides/references/man1/chvlanports.1.rst b/docs/source/guides/admin-guides/references/man1/chvlanports.1.rst index 99f6a012f..1f1e27fff 100644 --- a/docs/source/guides/admin-guides/references/man1/chvlanports.1.rst +++ b/docs/source/guides/admin-guides/references/man1/chvlanports.1.rst @@ -47,7 +47,7 @@ OPTIONS -\ **-n|-**\ **-nodes**\ The nodes or groups to be added or removed. It takes the noderange format. Please check the man page for noderange for details. +\ **-n|-**\ **-nodes**\ The nodes or groups to be added or removed. It takes the noderange format. Check the man page for noderange for details. 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 bd81a7f17..01e9afc33 100644 --- a/docs/source/guides/admin-guides/references/man1/chvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/chvm.1.rst @@ -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, please 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 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. @@ -838,7 +838,7 @@ The resource information after modification is similar to: lpar1: 128. -Note: The physical I/O resources specified with \ *add_physlots*\ will be appended to the specified partition. The physical I/O resources which are not specified but belonged to the partition will not be removed. For more information about \ *add_physlots*\ , please refer to lsvm(1)|lsvm.1. +Note: The physical I/O resources specified with \ *add_physlots*\ will be appended to the specified partition. The physical I/O resources which are not specified but belonged to the partition will not be removed. For more information about \ *add_physlots*\ , refer to lsvm(1)|lsvm.1. VMware/KVM specific: 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 f02131f38..6d0f8adfd 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. Please use \ **-**\ **-interactive**\ flag if you want the yum/zypper command to prompt you for the answers. +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. 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/getmacs.1.rst b/docs/source/guides/admin-guides/references/man1/getmacs.1.rst index 68c38c47b..05bfd6ff0 100644 --- a/docs/source/guides/admin-guides/references/man1/getmacs.1.rst +++ b/docs/source/guides/admin-guides/references/man1/getmacs.1.rst @@ -86,7 +86,7 @@ Display MAC only. The default is to write the first valid adapter MAC to the xCA \ **-D**\ -Perform discovery for mac address. By default, it will run ping test to test the connection between adapter and xCAT management node. Use '--noping' can skip the ping test to save time. Please be aware that in this way, the lpars will be reset. +Perform discovery for mac address. By default, it will run ping test to test the connection between adapter and xCAT management node. Use '--noping' can skip the ping test to save time. Be aware that in this way, the lpars will be reset. \ **-f**\ diff --git a/docs/source/guides/admin-guides/references/man1/imgcapture.1.rst b/docs/source/guides/admin-guides/references/man1/imgcapture.1.rst index 440f94d26..d68369fe9 100644 --- a/docs/source/guides/admin-guides/references/man1/imgcapture.1.rst +++ b/docs/source/guides/admin-guides/references/man1/imgcapture.1.rst @@ -39,7 +39,7 @@ The \ **diskless**\ type: The attributes of osimage will be used to capture and prepare the root image. The \ **osver**\ , \ **arch**\ and \ **profile**\ attributes for the stateless/statelite image to be created are duplicated from the \ **node**\ 's attribute. If the \ **-p|-**\ **-profile**\ \ *profile*\ option is specified, the image will be created under "/<\ *installroot*\ >/netboot///<\ *profile*\ >/rootimg". -The default files/directories excluded in the image are specified by /opt/xcat/share/xcat/netboot//<\ *profile*\ >...imgcapture.exlist; also, you can put your customized file (<\ *profile*\ >...imgcapture.exlist) to /install/custom/netboot/. The directories in the default \ *.imgcapture.exlist*\ file are necessary to capture image from the diskful Linux node managed by xCAT, please don't remove it. +The default files/directories excluded in the image are specified by /opt/xcat/share/xcat/netboot//<\ *profile*\ >...imgcapture.exlist; also, you can put your customized file (<\ *profile*\ >...imgcapture.exlist) to /install/custom/netboot/. The directories in the default \ *.imgcapture.exlist*\ file are necessary to capture the image from the diskful Linux node managed by xCAT, don't remove it. The image captured will be extracted into the /<\ *installroot*\ >/netboot/<\ **osver**\ >/<\ **arch**\ >/<\ **profile**\ >/rootimg directory. 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 e4f5a028f..0d16d5f50 100644 --- a/docs/source/guides/admin-guides/references/man1/lsslp.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lsslp.1.rst @@ -31,7 +31,7 @@ DESCRIPTION *********** -The lsslp command discovers selected service types using the -s flag. All service types are returned if the -s flag is not specified. If a specific IP address is not specified using the -i flag, the request is sent out all available network adapters. The optional -r, -x, -z and --vpdtable flags format the output. If you can't receive all the hardware, please use -T to increase the waiting time. +The lsslp command discovers selected service types using the -s flag. All service types are returned if the -s flag is not specified. If a specific IP address is not specified using the -i flag, the request is sent out all available network adapters. The optional -r, -x, -z and --vpdtable flags format the output. If you can't receive all the hardware, use -T to increase the waiting time. NOTE: SLP broadcast requests will propagate only within the subnet of the network adapter broadcast IPs specified by the -i flag. @@ -41,7 +41,7 @@ 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). Please do not use noderange with the flag -s. +\ **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. \ **-i**\ IP(s) the command will send out (defaults to all available adapters). @@ -75,7 +75,7 @@ OPTIONS \ **-z**\ Stanza formated output. -\ **-I**\ Give the warning message for the nodes in database which have no SLP responses. Please 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 noly can be used after the database migration finished successfully. ************ @@ -298,7 +298,7 @@ Output is similar to: bpa 9458-100 BPCF017 B-0 40.17.0.2 f17c00bpcb_a -8. To find the nodes within the user specified. Please make sure the noderange input have been defined in xCAT database. +8. To find the nodes within the user specified. Make sure the noderange input have been defined in xCAT database. .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/makentp.1.rst b/docs/source/guides/admin-guides/references/man1/makentp.1.rst index 34f143dc1..715ce800f 100644 --- a/docs/source/guides/admin-guides/references/man1/makentp.1.rst +++ b/docs/source/guides/admin-guides/references/man1/makentp.1.rst @@ -32,7 +32,7 @@ By default, it sets up the NTP server for xCAT management node. If -a flag is sp \ *site.ntpservers*\ -- the NTP servers for the service node and compute node to sync with. The keyword means that the node's NTP server is the node that is managing it (either its service node or the management node). -To setup NTP on the compute node, please add \ **setupntp**\ postscript to the \ *postscripts*\ table and run \ *updatenode node -P setupntp*\ command. +To setup NTP on the compute node, add \ **setupntp**\ postscript to the \ *postscripts*\ table and run \ *updatenode node -P setupntp*\ command. ******* 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 451948976..87559be1c 100644 --- a/docs/source/guides/admin-guides/references/man1/mkdocker.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkdocker.1.rst @@ -54,7 +54,7 @@ OPTIONS \ **dockerflag**\ - A JSON string which will be used as parameters to create a docker. Please reference https://docs.docker.com/engine/reference/api/docker_remote_api_v1.22/ for more information about which parameters can be specified. + A JSON string which will be used as parameters to create a docker. Reference https://docs.docker.com/engine/reference/api/docker_remote_api_v1.22/ for more information about which parameters can be specified. Some useful flags are: 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 7851f5f74..f1a4294e7 100644 --- a/docs/source/guides/admin-guides/references/man1/mkdsklsnode.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkdsklsnode.1.rst @@ -61,7 +61,7 @@ You can use the force option to reinitialize a node if it already has resources 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. Please 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 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. ******* diff --git a/docs/source/guides/admin-guides/references/man1/mkvlan.1.rst b/docs/source/guides/admin-guides/references/man1/mkvlan.1.rst index 05d9125f7..e97321fbe 100644 --- a/docs/source/guides/admin-guides/references/man1/mkvlan.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkvlan.1.rst @@ -66,7 +66,7 @@ For example: This command will automatically configure the cross-over ports if the given nodes are on different switches. -For added security, the root guard and bpdu guard will be enabled for the ports in this vlan. However, the guards will not be disabled if the ports are removed from the vlan using chvlan or rmvlan commands. To disable them, you need to use the switch command line interface. Please refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. +For added security, the root guard and bpdu guard will be enabled for the ports in this vlan. However, the guards will not be disabled if the ports are removed from the vlan using chvlan or rmvlan commands. To disable them, you need to use the switch command line interface. Refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. ********** @@ -83,7 +83,7 @@ OPTIONS -\ **-n|-**\ **-nodes**\ The nodes or groups to be included in the vlan. It can be stand alone nodes or KVM guests. It takes the noderange format. Please check the man page for noderange for details. +\ **-n|-**\ **-nodes**\ The nodes or groups to be included in the vlan. It can be stand alone nodes or KVM guests. It takes the noderange format. Check the man page for noderange for details. @@ -137,7 +137,7 @@ To start, the xCAT switches and switches table needs to be filled with switch an "node3","switch1","12",,"primary:eth0",, "node3","switch2","3",,"eth1",, -Please note that the interface value for the management (primary) network can be empty, the word "primary" or "primary:ethx". For other networks, the interface attribute must be specified. +Note that the interface value for the management (primary) network can be empty, the word "primary" or "primary:ethx". For other networks, the interface attribute must be specified. The following is an example of the switches table 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 970519f99..753ddd42e 100644 --- a/docs/source/guides/admin-guides/references/man1/mkvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkvm.1.rst @@ -85,9 +85,9 @@ The first form of \ **mkvm**\ command creates new partition(s) with the same pr The second form of this command duplicates all the partitions from the source specified by \ *profile*\ to the destination specified by \ *destcec*\ . The source and destination CECs can be managed by different HMCs. -Please make sure the nodes in the \ *noderange*\ is defined in the \ *nodelist*\ table and the \ *mgt*\ is set to 'hmc' in the \ *nodehm*\ table before running this command. +Make sure the nodes in the \ *noderange*\ is defined in the \ *nodelist*\ table and the \ *mgt*\ is set to 'hmc' in the \ *nodehm*\ table before running this command. -Please note that the \ **mkvm**\ command currently only supports creating standard LPARs, not virtual LPARs working with VIOS server. +Note that the \ **mkvm**\ command currently only supports creating standard LPARs, not virtual LPARs working with VIOS server. For PPC (using Direct FSP Management) specific: 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 ec75b7c62..df2c69af8 100644 --- a/docs/source/guides/admin-guides/references/man1/monadd.1.rst +++ b/docs/source/guides/admin-guides/references/man1/monadd.1.rst @@ -41,7 +41,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. -\ *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 ...*\ Please 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 possbile setting keys for a plug-in module. ******* diff --git a/docs/source/guides/admin-guides/references/man1/monrm.1.rst b/docs/source/guides/admin-guides/references/man1/monrm.1.rst index 85cf6e045..27d4563b9 100644 --- a/docs/source/guides/admin-guides/references/man1/monrm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/monrm.1.rst @@ -75,7 +75,7 @@ EXAMPLES monrm gangliamon -Please note that gangliamon must have been registered in the xCAT \ *monitoring*\ table. For a list of registered plug-in modules, use command \ **monls**\ . +Note that gangliamon must have been registered in the xCAT \ *monitoring*\ table. For a list of registered plug-in modules, use command \ **monls**\ . ***** diff --git a/docs/source/guides/admin-guides/references/man1/monstop.1.rst b/docs/source/guides/admin-guides/references/man1/monstop.1.rst index 45a7ce47e..4a0502ba4 100644 --- a/docs/source/guides/admin-guides/references/man1/monstop.1.rst +++ b/docs/source/guides/admin-guides/references/man1/monstop.1.rst @@ -79,7 +79,7 @@ EXAMPLES monstop gangliamon -Please note that gangliamon must have been registered in the xCAT \ *monitoring*\ table. For a list of registered plug-in modules, use command \ *monls*\ . +Note that gangliamon must have been registered in the xCAT \ *monitoring*\ table. For a list of registered plug-in modules, use command \ *monls*\ . ***** 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 021aad1e7..8c03d0fd7 100644 --- a/docs/source/guides/admin-guides/references/man1/nimnodeset.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nimnodeset.1.rst @@ -64,7 +64,7 @@ This command will also create a NIM script resource to enable the xCAT support f 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. Please 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 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. ******* diff --git a/docs/source/guides/admin-guides/references/man1/packimage.1.rst b/docs/source/guides/admin-guides/references/man1/packimage.1.rst index 0ab919668..5be66f428 100644 --- a/docs/source/guides/admin-guides/references/man1/packimage.1.rst +++ b/docs/source/guides/admin-guides/references/man1/packimage.1.rst @@ -31,12 +31,9 @@ DESCRIPTION *********** -Packs the stateless image from the chroot file system into a file system to be -sent to the node for a diskless install. -The install dir is setup by using "installdir" attribute set in the site table. -The nodetype table "profile" attribute for the node should reflect the profile of the install image. +Packs the stateless image from the chroot file system into a file to be sent to the node for a diskless boot. -This command will get all the necessary os image definition files from the \ *osimage*\ and \ *linuximage*\ tables. +Note: For an osimage that is deployed on a cluster, running packimage will overwrite the existing rootimage file and be unavailable to the compute nodes while the command executes. ********** @@ -44,7 +41,7 @@ PARAMETERS ********** -\ *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. +\ *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. ******* @@ -76,7 +73,7 @@ EXAMPLES ******** -1. To pack the osimage rhels7.1-x86_64-netboot-compute: +1. To pack the osimage 'rhels7.1-x86_64-netboot-compute': .. code-block:: perl @@ -84,7 +81,7 @@ EXAMPLES packimage rhels7.1-x86_64-netboot-compute -2. To pack the osimage rhels7.1-x86_64-netboot-compute with "tar" to archive and "pigz" to compress: +2. To pack the osimage 'rhels7.1-x86_64-netboot-compute' with "tar" to archive and "pigz" to compress: .. code-block:: perl 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 b405c6975..8df12fca5 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 run \ **rflash**\ , please use \ **rspconfig**\ to check if the related HMC ssh is enabled. If enable a HMC ssh connection, please 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**\ comamnd. \ **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. @@ -91,7 +91,7 @@ Any previously activated code on the affected systems will be automatically acce \ **IMPORTANT!**\ If the power subsystem is recycled, all of its attached managed systems will be recycled. -If it outputs \ **"Timeout waiting for prompt"**\ during the upgrade, please set the \ **"ppctimeout"**\ larger in the \ **site**\ table. After the upgrade, remeber to change it back. If run the \ **"rflash"**\ command on an AIX management node, need to make sure the value of \ **"useSSHonAIX"**\ is \ **"yes"**\ in the site table. +If it outputs \ **"Timeout waiting for prompt"**\ during the upgrade, set the \ **"ppctimeout"**\ larger in the \ **site**\ table. After the upgrade, remeber to change it back. If run the \ **"rflash"**\ command on an AIX management node, need to make sure the value of \ **"useSSHonAIX"**\ is \ **"yes"**\ in the site table. PPC (using Direct FSP Management) specific: diff --git a/docs/source/guides/admin-guides/references/man1/rmvlan.1.rst b/docs/source/guides/admin-guides/references/man1/rmvlan.1.rst index 38223b457..67b48992a 100644 --- a/docs/source/guides/admin-guides/references/man1/rmvlan.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmvlan.1.rst @@ -33,7 +33,7 @@ DESCRIPTION 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. -For added security, the root guard and bpdu guard were enabled for the ports in this vlan by mkvlan and chvlan commands. However, the guards will not be disabled by this command. To disable them, you need to use the switch command line interface. Please refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. +For added security, the root guard and bpdu guard were enabled for the ports in this vlan by mkvlan and chvlan commands. However, the guards will not be disabled by this command. To disable them, you need to use the switch command line interface. Refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. ********** 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 0c7585b88..86239842f 100644 --- a/docs/source/guides/admin-guides/references/man1/rpower.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rpower.1.rst @@ -200,7 +200,7 @@ OPTIONS Don't try to run \ **wake**\ against the 'on' state node, it would cause the node gets to 'off' state. - For some of xCAT hardware such as NeXtScale, it may need to enable S3 before using \ **wake**\ . The following steps can be used to enable S3. Please reference pasu(1)|pasu.1 for "pasu" usage. + For some of xCAT hardware such as NeXtScale, it may need to enable S3 before using \ **wake**\ . The following steps can be used to enable S3. Reference pasu(1)|pasu.1 for "pasu" usage. .. code-block:: perl 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 878ab39f5..74cb1bc39 100644 --- a/docs/source/guides/admin-guides/references/man1/rvitals.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rvitals.1.rst @@ -28,8 +28,8 @@ FSP/LPAR (with HMC) specific: \ **rvitals**\ \ *noderange*\ {\ **temp | voltage | lcds | all**\ } -CEC/LPAR/Frame (using Direct FSP Management ) specific: -======================================================= +CEC/LPAR/Frame (using Direct FSP Management) specific: +====================================================== \ **rvitals**\ \ *noderange*\ {\ **rackenv | lcds | all**\ } [\ **-V**\ | \ **-**\ **-verbose**\ ] @@ -56,6 +56,13 @@ BMC specific: \ **rvitals**\ \ *noderange*\ {\ **temp | voltage | wattage | fanspeed | power | leds | all**\ } +OpenPOWER server specific: +========================== + + +\ **rvitals**\ \ *noderange*\ {\ **temp | voltage | wattage | fanspeed | power | leds | all**\ } + + ******************* \ **Description**\ 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 fa9a7004f..f1274c9d6 100644 --- a/docs/source/guides/admin-guides/references/man1/sinv.1.rst +++ b/docs/source/guides/admin-guides/references/man1/sinv.1.rst @@ -167,8 +167,8 @@ Command Protocol can be used. See man \ **xdsh**\ for more details. xCAT ships some default configuration files for Ethernet switches and and IB switches under \ */opt/xcat/share/xcat/devicetype*\ directory. If you want to overwrite - any of the configuration files, please copy it to \ */var/opt/xcat/*\ - directory and cutomize it. + any of the configuration files, copy them to \ */var/opt/xcat/*\ + directory and cutomize. For example, \ *base/IBSwitch/Qlogic/config*\ is the configuration file location if devicetype is specified as IBSwitch::Qlogic. xCAT will first search config file using \ */var/opt/xcat/*\ as the base. 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 c7341bcf4..1ba9aff9b 100644 --- a/docs/source/guides/admin-guides/references/man1/switchdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/switchdiscover.1.rst @@ -29,9 +29,9 @@ The switchdiscover command scans the subnets and discovers all the swithches on To view all the switches defined in the xCAT databasee use \ **lsdef -w "nodetype=switch"**\ command. -For lldp method, please 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 packge or you can get it from http://vincentbernat.github.io/lldpd/installation.html. -For snmp method, please 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. +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. ******* diff --git a/docs/source/guides/admin-guides/references/man1/xdsh.1.rst b/docs/source/guides/admin-guides/references/man1/xdsh.1.rst index d89998b0e..fb84e802b 100644 --- a/docs/source/guides/admin-guides/references/man1/xdsh.1.rst +++ b/docs/source/guides/admin-guides/references/man1/xdsh.1.rst @@ -234,8 +234,8 @@ running commands, are terminated (SIGTERM). xCAT ships some default configuration files for Ethernet switches and and IB switches under \ */opt/xcat/share/xcat/devicetype*\ directory. If you want to overwrite - any of the configuration files, please copy it to \ */var/opt/xcat/*\ - directory and cutomize it. + any of the configuration files, copy them to \ */var/opt/xcat/*\ + directory and cutomize. For example, \ *base/IBSwitch/Qlogic/config*\ is the configuration file location if devicetype is specified as IBSwitch::Qlogic. xCAT will first search config file using \ */var/opt/xcat/*\ as the base. diff --git a/docs/source/guides/admin-guides/references/man3/noderange.3.rst b/docs/source/guides/admin-guides/references/man3/noderange.3.rst index 8d80914bc..da8266d5e 100644 --- a/docs/source/guides/admin-guides/references/man3/noderange.3.rst +++ b/docs/source/guides/admin-guides/references/man3/noderange.3.rst @@ -191,28 +191,20 @@ In plain English, a node or group name is in \ **xCAT Node Name Format**\ i from the begining there are: -\* - - one or more alpha characters of any case and any number of "-" in any combination - +\* one or more alpha characters of any case and any number of "-" in any combination -\* - - followed by one or more numbers - + +\* followed by one or more numbers -\* - - then optionally followed by one alpha character of any case or "-" - + +\* then optionally followed by one alpha character of any case or "-" -\* - - followed by any combination of case mixed alphanumerics and "-" - + +\* followed by any combination of case mixed alphanumerics and "-" + \ **noderange**\ supports node/group names in \ *any*\ format. \ **xCAT Node Name Format**\ is diff --git a/docs/source/guides/admin-guides/references/man5/linuximage.5.rst b/docs/source/guides/admin-guides/references/man5/linuximage.5.rst index e89b345d5..e49d27e55 100644 --- a/docs/source/guides/admin-guides/references/man5/linuximage.5.rst +++ b/docs/source/guides/admin-guides/references/man5/linuximage.5.rst @@ -96,6 +96,7 @@ linuximage Attributes: IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"), IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"), IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"), + IMG_KERNELVERSION(the "kernelver" attribute of the osimage), IMG_PROFILE(the profile of the osimage, such as "service","compute"), IMG_PKGLIST(the "pkglist" attribute of the osimage), IMG_PKGDIR(the "pkgdir" attribute of the osimage), diff --git a/docs/source/guides/admin-guides/references/man5/litefile.5.rst b/docs/source/guides/admin-guides/references/man5/litefile.5.rst index c745c46be..3691949ad 100644 --- a/docs/source/guides/admin-guides/references/man5/litefile.5.rst +++ b/docs/source/guides/admin-guides/references/man5/litefile.5.rst @@ -57,11 +57,11 @@ litefile Attributes: tmpfs - It is the default option if you leave the options column blank. 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. Please 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. Please do not use it for one directory. + 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. diff --git a/docs/source/guides/admin-guides/references/man5/nodelist.5.rst b/docs/source/guides/admin-guides/references/man5/nodelist.5.rst index 25bf8c377..bb70e22b4 100644 --- a/docs/source/guides/admin-guides/references/man5/nodelist.5.rst +++ b/docs/source/guides/admin-guides/references/man5/nodelist.5.rst @@ -50,7 +50,7 @@ nodelist Attributes: \ **status**\ - The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Please note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI). + The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI). diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst index 35c59d2b7..0b547c409 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -274,7 +274,7 @@ site Attributes: runbootscripts: If set to 'yes' the scripts listed in the postbootscripts attribute in the osimage and postscripts tables will be run during each reboot of stateful (diskful) nodes. This attribute has no - effect on stateless and statelite nodes. Please run the following + effect on stateless and statelite nodes. Run the following command after you change the value of this attribute: 'updatenode -P setuppostbootscripts' @@ -309,7 +309,7 @@ site Attributes: '1': enable basic debug mode '2': enable expert debug mode For the details on 'basic debug mode' and 'expert debug mode', - please refer to xCAT documentation. + refer to xCAT documentation. -------------------- REMOTESHELL ATTRIBUTES diff --git a/docs/source/guides/admin-guides/references/man5/switches.5.rst b/docs/source/guides/admin-guides/references/man5/switches.5.rst index 5cdb6d33e..86b4ec0f7 100644 --- a/docs/source/guides/admin-guides/references/man5/switches.5.rst +++ b/docs/source/guides/admin-guides/references/man5/switches.5.rst @@ -74,19 +74,19 @@ switches Attributes: \ **linkports**\ - The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Please refer to the switch table for details on how to specify the port numbers. + The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Refer to the switch table for details on how to specify the port numbers. \ **sshusername**\ - The remote login user name. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. + The remote login user name. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. \ **sshpassword**\ - The remote login password. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. + The remote login password. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. diff --git a/docs/source/guides/admin-guides/references/man5/vm.5.rst b/docs/source/guides/admin-guides/references/man5/vm.5.rst index f16c9f3d2..604429dad 100644 --- a/docs/source/guides/admin-guides/references/man5/vm.5.rst +++ b/docs/source/guides/admin-guides/references/man5/vm.5.rst @@ -197,7 +197,7 @@ vm Attributes: \ **physlots**\ - Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, please reference to manpage of 'lsvm'. + Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, reference manpage for 'lsvm'. 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 25a2486a3..9515ac052 100644 --- a/docs/source/guides/admin-guides/references/man7/group.7.rst +++ b/docs/source/guides/admin-guides/references/man7/group.7.rst @@ -425,7 +425,7 @@ group Attributes: \ **linkports**\ (switches.linkports) - The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Please refer to the switch table for details on how to specify the port numbers. + The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Refer to the switch table for details on how to specify the port numbers. @@ -745,7 +745,7 @@ group Attributes: or - The remote login password. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. + The remote login password. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. @@ -1148,7 +1148,7 @@ group Attributes: or - The remote login user name. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. + The remote login user name. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. @@ -1226,7 +1226,7 @@ group Attributes: \ **vmphyslots**\ (vm.physlots) - Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, please reference to manpage of 'lsvm'. + Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, reference manpage for 'lsvm'. 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 52581902c..1ff923cbb 100644 --- a/docs/source/guides/admin-guides/references/man7/node.7.rst +++ b/docs/source/guides/admin-guides/references/man7/node.7.rst @@ -437,7 +437,7 @@ node Attributes: \ **linkports**\ (switches.linkports) - The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Please refer to the switch table for details on how to specify the port numbers. + The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Refer to the switch table for details on how to specify the port numbers. @@ -751,7 +751,7 @@ node Attributes: or - The remote login password. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. + The remote login password. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. @@ -1032,7 +1032,7 @@ node Attributes: \ **status**\ (nodelist.status) - The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Please note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI). + The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI). @@ -1184,7 +1184,7 @@ node Attributes: or - The remote login user name. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. + The remote login user name. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. @@ -1262,7 +1262,7 @@ node Attributes: \ **vmphyslots**\ (vm.physlots) - Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, please reference to manpage of 'lsvm'. + Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, reference manpage for 'lsvm'. diff --git a/docs/source/guides/admin-guides/references/man7/osimage.7.rst b/docs/source/guides/admin-guides/references/man7/osimage.7.rst index 6c318a877..287d406b6 100644 --- a/docs/source/guides/admin-guides/references/man7/osimage.7.rst +++ b/docs/source/guides/admin-guides/references/man7/osimage.7.rst @@ -317,6 +317,7 @@ osimage Attributes: IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"), IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"), IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"), + IMG_KERNELVERSION(the "kernelver" attribute of the osimage), IMG_PROFILE(the profile of the osimage, such as "service","compute"), IMG_PKGLIST(the "pkglist" attribute of the osimage), IMG_PKGDIR(the "pkgdir" attribute of the osimage), diff --git a/docs/source/guides/admin-guides/references/tools/reorgtbls.rst b/docs/source/guides/admin-guides/references/tools/reorgtbls.rst index 1830cb636..a544a13e9 100644 --- a/docs/source/guides/admin-guides/references/tools/reorgtbls.rst +++ b/docs/source/guides/admin-guides/references/tools/reorgtbls.rst @@ -8,7 +8,7 @@ reorgtbls Usage: --V - Verbose mode --h - usage - --t -comma delimitated list of tables. + --t -comma delimited list of tables. Without this flag it reorgs all tables in the xcatdb database . Author: Lissa Valletta diff --git a/docs/source/guides/admin-guides/references/tools/test_hca_state.rst b/docs/source/guides/admin-guides/references/tools/test_hca_state.rst index 6771e8f40..abe5e6781 100644 --- a/docs/source/guides/admin-guides/references/tools/test_hca_state.rst +++ b/docs/source/guides/admin-guides/references/tools/test_hca_state.rst @@ -26,7 +26,7 @@ test_hca_state Having consistent OFED settings, and even HCA firmware, can be very important for a properly functioning InfiniBand fabric. This tool can help you confirm that your nodes are using the settings you - want, and if any nodes have settings descrepancies. + want, and if any nodes have settings discrepancies. Example output: diff --git a/docs/source/guides/install-guides/apt/automatic_install.rst b/docs/source/guides/install-guides/apt/automatic_install.rst new file mode 100644 index 000000000..84dd06fd8 --- /dev/null +++ b/docs/source/guides/install-guides/apt/automatic_install.rst @@ -0,0 +1,6 @@ +Automatic Install Using ``go-xcat`` +=================================== + +.. include:: ../common_sections.rst + :start-after: BEGIN_automatic_install + :end-before: END_automatic_install diff --git a/docs/source/guides/install-guides/apt/install.rst b/docs/source/guides/install-guides/apt/install.rst index 06a597a7e..0396dd0ba 100644 --- a/docs/source/guides/install-guides/apt/install.rst +++ b/docs/source/guides/install-guides/apt/install.rst @@ -2,15 +2,11 @@ Installing xCAT =============== .. include:: ../common_sections.rst - :start-after: BEGIN_install_xcat_introduction - :end-before: END_install_xcat_introduction - -xCAT is installed by configuring software repositories for ``xcat-core`` and ``xcat-dep`` and using apt-get package manager. The repositories can be publically hosted or locally hosted. + :start-after: BEGIN_installation_methods + :end-before: END_installation_methods .. toctree:: :maxdepth: 2 - configure_xcat.rst - install_xcat.rst - verify_xcat.rst - update_xcat.rst + automatic_install.rst + manual_install.rst diff --git a/docs/source/guides/install-guides/apt/manual_install.rst b/docs/source/guides/install-guides/apt/manual_install.rst new file mode 100644 index 000000000..0f048e5f0 --- /dev/null +++ b/docs/source/guides/install-guides/apt/manual_install.rst @@ -0,0 +1,16 @@ +Manual Install Using Software Repositories +========================================== + +.. include:: ../common_sections.rst + :start-after: BEGIN_install_xcat_introduction + :end-before: END_install_xcat_introduction + +xCAT is installed by configuring software repositories for ``xcat-core`` and ``xcat-dep`` and using yum package manager. The repositories can be publicly hosted or locally hosted. + +.. toctree:: + :maxdepth: 2 + + configure_xcat.rst + install_xcat.rst + verify_xcat.rst + update_xcat.rst diff --git a/docs/source/guides/install-guides/common_sections.rst b/docs/source/guides/install-guides/common_sections.rst index 840532675..d4fdad136 100644 --- a/docs/source/guides/install-guides/common_sections.rst +++ b/docs/source/guides/install-guides/common_sections.rst @@ -52,6 +52,28 @@ xCAT consists of two software packages: ``xcat-core`` and ``xcat-dep`` .. END_install_xcat_introduction +.. BEGIN_installation_methods + +The following sections describe the different methods for installing xCAT. + +.. END_installation_methods + +.. BEGIN_automatic_install + +``go-xcat`` is a tool that can be used to fully install or update xCAT. ``go-xcat`` will automatically download the correct package manager repository file from xcat.org and use the public repository to install xCAT. If the xCAT management node does not have internet connectivity, use process described in the Manual Installation section of the guide. + +#. Download the ``go-xcat`` tool using ``wget``: :: + + wget http://xcat.org/files/go-xcat -O - >/tmp/go-xcat + chmod +x /tmp/go-xcat + +#. Run the ``go-xcat`` tool: :: + + /tmp/go-xcat install # installs the latest stable version of xCAT + /tmp/go-xcat -x devel install # installs the latest development version of xCAT + +.. END_automatic_install + .. BEGIN_configure_xcat_local_repo_xcat-core_RPM **[xcat-core]** diff --git a/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst b/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst index 8a2721aec..bfc60691f 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. below list maybe helpful for you. They are the packages list of xcat installation tarball. These list are the whole RPMs list, it's possible for some RPMs not to be installed due to them are not suitable for your environment. Please do judgment by yourself. + 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. * XCAT Core Packages list (xcat-core): diff --git a/docs/source/guides/install-guides/yum/automatic_install.rst b/docs/source/guides/install-guides/yum/automatic_install.rst new file mode 100644 index 000000000..84dd06fd8 --- /dev/null +++ b/docs/source/guides/install-guides/yum/automatic_install.rst @@ -0,0 +1,6 @@ +Automatic Install Using ``go-xcat`` +=================================== + +.. include:: ../common_sections.rst + :start-after: BEGIN_automatic_install + :end-before: END_automatic_install diff --git a/docs/source/guides/install-guides/yum/install.rst b/docs/source/guides/install-guides/yum/install.rst index f21dddef4..0396dd0ba 100644 --- a/docs/source/guides/install-guides/yum/install.rst +++ b/docs/source/guides/install-guides/yum/install.rst @@ -2,15 +2,11 @@ Installing xCAT =============== .. include:: ../common_sections.rst - :start-after: BEGIN_install_xcat_introduction - :end-before: END_install_xcat_introduction - -xCAT is installed by configuring software repositories for ``xcat-core`` and ``xcat-dep`` and using yum package manager. The repositories can be publically hosted or locally hosted. + :start-after: BEGIN_installation_methods + :end-before: END_installation_methods .. toctree:: :maxdepth: 2 - configure_xcat.rst - install_xcat.rst - verify_xcat.rst - update_xcat.rst + automatic_install.rst + manual_install.rst diff --git a/docs/source/guides/install-guides/yum/manual_install.rst b/docs/source/guides/install-guides/yum/manual_install.rst new file mode 100644 index 000000000..0f048e5f0 --- /dev/null +++ b/docs/source/guides/install-guides/yum/manual_install.rst @@ -0,0 +1,16 @@ +Manual Install Using Software Repositories +========================================== + +.. include:: ../common_sections.rst + :start-after: BEGIN_install_xcat_introduction + :end-before: END_install_xcat_introduction + +xCAT is installed by configuring software repositories for ``xcat-core`` and ``xcat-dep`` and using yum package manager. The repositories can be publicly hosted or locally hosted. + +.. toctree:: + :maxdepth: 2 + + configure_xcat.rst + install_xcat.rst + verify_xcat.rst + update_xcat.rst diff --git a/docs/source/guides/install-guides/zypper/automatic_install.rst b/docs/source/guides/install-guides/zypper/automatic_install.rst new file mode 100644 index 000000000..84dd06fd8 --- /dev/null +++ b/docs/source/guides/install-guides/zypper/automatic_install.rst @@ -0,0 +1,6 @@ +Automatic Install Using ``go-xcat`` +=================================== + +.. include:: ../common_sections.rst + :start-after: BEGIN_automatic_install + :end-before: END_automatic_install diff --git a/docs/source/guides/install-guides/zypper/install.rst b/docs/source/guides/install-guides/zypper/install.rst index fc8a46235..0396dd0ba 100644 --- a/docs/source/guides/install-guides/zypper/install.rst +++ b/docs/source/guides/install-guides/zypper/install.rst @@ -2,16 +2,11 @@ Installing xCAT =============== .. include:: ../common_sections.rst - :start-after: BEGIN_install_xcat_introduction - :end-before: END_install_xcat_introduction - -xCAT is installed by configuring software repositories for ``xcat-core`` and ``xcat-dep`` and using zypper package manager. The repositories can be publically hosted or locally hosted. - + :start-after: BEGIN_installation_methods + :end-before: END_installation_methods .. toctree:: :maxdepth: 2 - configure_xcat.rst - install_xcat.rst - verify_xcat.rst - update_xcat.rst + automatic_install.rst + manual_install.rst diff --git a/docs/source/guides/install-guides/zypper/manual_install.rst b/docs/source/guides/install-guides/zypper/manual_install.rst new file mode 100644 index 000000000..0f048e5f0 --- /dev/null +++ b/docs/source/guides/install-guides/zypper/manual_install.rst @@ -0,0 +1,16 @@ +Manual Install Using Software Repositories +========================================== + +.. include:: ../common_sections.rst + :start-after: BEGIN_install_xcat_introduction + :end-before: END_install_xcat_introduction + +xCAT is installed by configuring software repositories for ``xcat-core`` and ``xcat-dep`` and using yum package manager. The repositories can be publicly hosted or locally hosted. + +.. toctree:: + :maxdepth: 2 + + configure_xcat.rst + install_xcat.rst + verify_xcat.rst + update_xcat.rst diff --git a/docs/source/help.rst b/docs/source/help.rst index abbac5ecf..15e0dde1e 100644 --- a/docs/source/help.rst +++ b/docs/source/help.rst @@ -9,4 +9,4 @@ For support, we encourage the use of the GitHub issues system. * `documentation `_ issues can be opened against xcat-core project -The older email list is still availble: xcat-user@list.sourceforge.net +The older email list is still available: xcat-user@list.sourceforge.net diff --git a/docs/source/index.rst b/docs/source/index.rst index fb662bd60..d507a22b7 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,7 +18,7 @@ renderfarms, online gaming infrastructure, and whatever tomorrows next buzzword You've reached xCAT documentation site, The main page product page is http://xcat.org **xCAT** is an open source project hosted on `GitHub `_. -Go to GitHub to view the source, open issues, ask questions, and particpate in the project. +Go to GitHub to view the source, open issues, ask questions, and participate in the project. Enjoy! diff --git a/docs/source/overview/architecture.rst b/docs/source/overview/architecture.rst index a0c7863a9..07004e672 100644 --- a/docs/source/overview/architecture.rst +++ b/docs/source/overview/architecture.rst @@ -9,7 +9,7 @@ xCAT Management Node (xCAT Mgmt Node): The server where xCAT software is installed and used as the single point to perform system management over the entire cluster. On this node, a database is configured to store the xCAT node definitions. Network services (dhcp, tftp, http, etc) are enabled to respond in Operating system deployment. Service Node: - One or more defined "slave" servers operating under the Management Node to assist in system management to reduce the load (cpu, network badnwidth) when using a single Management Node. This concept is necessary when managing very large clusters. + One or more defined "slave" servers operating under the Management Node to assist in system management to reduce the load (cpu, network bandwidth) when using a single Management Node. This concept is necessary when managing very large clusters. Compute Node: The compute nodes are the target servers which xCAT is managing. diff --git a/docs/source/overview/differentiators.rst b/docs/source/overview/differentiators.rst index b975bce9e..f84bf0a8a 100644 --- a/docs/source/overview/differentiators.rst +++ b/docs/source/overview/differentiators.rst @@ -8,7 +8,7 @@ Differentiators * Open Source - Eclipse Public License. Support contracts are also available, please contact IBM. + Eclipse Public License. Support contracts are also available, contact IBM. * Supports Multiple Operating Systems diff --git a/docs/source/overview/quick_start.rst b/docs/source/overview/quick_start.rst index 7c64ee80b..8bf22dfae 100644 --- a/docs/source/overview/quick_start.rst +++ b/docs/source/overview/quick_start.rst @@ -65,7 +65,7 @@ When managing a cluster with hundreds or thousands of nodes, operating on many n #. Contribute to xCAT (Optional) -While using xCAT, if you find something (code, documentation, ...) that can be improved and you want to contribute that to xCAT, please do that for your and other xCAT users benefit. And welcome to xCAT community! +While using xCAT, if you find something (code, documentation, ...) that can be improved and you want to contribute that to xCAT, do that for your and other xCAT users benefit. And welcome to xCAT community! Refer to the :doc:`/developers/index` to learn how to contribute to xCAT community. diff --git a/docs/source/security/2015/20150312_openssl.rst b/docs/source/security/2015/20150312_openssl.rst index 698b5e76c..aa9a9e096 100644 --- a/docs/source/security/2015/20150312_openssl.rst +++ b/docs/source/security/2015/20150312_openssl.rst @@ -15,6 +15,6 @@ Action xCAT does not use RSA_EXPORT ciphers for ssl communication by default. However, xCAT does allow user to choose the ciphers from the site.xcatsslciphers attribute. -Please make sure you do not put RSA_EXPORT related ciphers in this attribute. +Make sure you do not put RSA_EXPORT related ciphers in this attribute. -It is recommended that you upgrade openssl to 1.0.1L and upper version for the fix of this problem. Please go to the os distribution to get the latest openssl package. +It is recommended that you upgrade openssl to 1.0.1L and upper version for the fix of this problem. Go to the os distribution to get the latest openssl package. diff --git a/docs/source/security/2015/20150324_openssl.rst b/docs/source/security/2015/20150324_openssl.rst index 973bfa57f..d7080600b 100644 --- a/docs/source/security/2015/20150324_openssl.rst +++ b/docs/source/security/2015/20150324_openssl.rst @@ -9,4 +9,4 @@ This issue affects OpenSSL version: 1.0.2 Action ------ -xCAT uses OpenSSL for client-server communication but **does not** ship it. Please upgrade OpenSSL to 1.0.2a or higher. +xCAT uses OpenSSL for client-server communication but **does not** ship it. Upgrade OpenSSL to 1.0.2a or higher. diff --git a/docs/source/security/2015/20150519_openssl.rst b/docs/source/security/2015/20150519_openssl.rst index 280cf6eb7..35220c4d0 100644 --- a/docs/source/security/2015/20150519_openssl.rst +++ b/docs/source/security/2015/20150519_openssl.rst @@ -22,6 +22,6 @@ The VENOM bug (CVE-2015-3456) exists in the virtual Floppy Disk Controller for t Action ------ -xCAT does not ship any rpms that have QEMU component directly. However xCAT does make system calls to QEMU when doing KVM/Xen visualization. If you are using xCAT to manage KVM or Xen hosts and quests, please get the latest rpms that have QEMU component from the os distro and do a upgrade on both xCAT management node and the KVM/Xen hosts. +xCAT does not ship any rpms that have QEMU component directly. However xCAT does make system calls to QEMU when doing KVM/Xen visualization. If you are using xCAT to manage KVM or Xen hosts and quests, get the latest rpms that have QEMU component from the os distro and do a upgrade on both xCAT management node and the KVM/Xen hosts. diff --git a/docs/source/security/2015/20150520_openssl.rst b/docs/source/security/2015/20150520_openssl.rst index 8cbaf20c0..9bb2ae6bd 100644 --- a/docs/source/security/2015/20150520_openssl.rst +++ b/docs/source/security/2015/20150520_openssl.rst @@ -1,13 +1,13 @@ 2015-05-20 - OpenSSL Vulnerabilities (LOGJAM) ============================================= -A Logjam vulnerability attacks openssl and web services on weak (512-bit) Diffie-Hellman key groups. Please refer to the following documents for details. +A Logjam vulnerability attacks openssl and web services on weak (512-bit) Diffie-Hellman key groups. Refer to the following documents for details. Main site: https://weakdh.org/ Server test: https://weakdh.org/sysadmin.html -Please refer to the following openssl link for more details regarding the fix: https://www.openssl.org/blog/blog/2015/05/20/logjam-freak-upcoming-changes/ +Refer to the following openssl link for more details regarding the fix: https://www.openssl.org/blog/blog/2015/05/20/logjam-freak-upcoming-changes/ OpenSSL 1.0.2 users should upgrade to 1.0.2b OpenSSL 1.0.1 users should upgrade to 1.0.1n @@ -15,6 +15,6 @@ Please refer to the following openssl link for more details regarding the fix: h Action ------ -xCAT uses OpenSSL for client-server communication but **does not** ship it. It uses the default ciphers from openssl. It also allows the user to customize it through site.xcatsslversion and site.xcatsslciphers. Please make sure you do not enable DH or DHE ciphers. +xCAT uses OpenSSL for client-server communication but **does not** ship it. It uses the default ciphers from openssl. It also allows the user to customize it through site.xcatsslversion and site.xcatsslciphers. Make sure you do not enable DH or DHE ciphers. -Please get the latest openssl package from the os distros and upgrade it on all the xCAT management nodes, the service nodes and xCAT client nodes. +Get the latest openssl package from the os distros and upgrade it on all the xCAT management nodes, the service nodes and xCAT client nodes. diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 91fbf6638..056437d7c 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -10,7 +10,7 @@ use xCAT::ExtTab; # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # -# When making additions or deletions to this file please be sure to +# When making additions or deletions to this file be sure to # modify BOTH the tabspec and defspec definitions. This includes # adding descriptions for any new attributes. # @@ -154,9 +154,9 @@ use xCAT::ExtTab; file => "The full pathname of the file. e.g: /etc/hosts. If the path is a directory, then it should be terminated with a '/'. ", options => "Options for the file:\n\n" . qq{ tmpfs - It is the default option if you leave the options column blank. 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..\n\n} . -qq{ rw - Same as Above.Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Please do not confuse it with the "rw" permission in the file system. \n\n} . +qq{ 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. \n\n} . qq{ 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. \n\n} . -qq{ 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. Please do not use it for one directory.\n\n} . +qq{ 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.\n\n} . qq{ 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.\n\n} . qq{ link - It provides one file/directory for the node to use when booting, it is copied from the server, and will be placed in tmpfs on the booted node. In the local file system of the booted node, it is one symbolic link to one file/directory in tmpfs. And the permission of the symbolic link is "lrwxrwxrwx", which is not the real permission of the file/directory on the node. So for some application sensitive to file permissions, it will be one issue to use "link" as its option, for example, "/root/.ssh/", which is used for SSH, should NOT use "link" as its option. It is non-persistent, when the node is rebooted, all changes to the file/directory will be lost. This option can be performed on files and directories. \n\n} . qq{ link,con - It works similar to the "con" option. All the files found in the litetree hierarchy will be concatenated to the file when found. The final file will be put to the tmpfs on the booted node. In the local file system of the booted node, it is one symbolic link to the file/directory in tmpfs. It is non-persistent, when the node is rebooted, all changes to the file will be lost. The option can only be performed on files. \n\n} . @@ -232,7 +232,7 @@ qq{ link,ro - The file is readonly, and will be placed in tmpfs on the booted no 'datacenter' => "Optionally specify a datacenter for the VM to exist in (only applicable to VMWare)", 'cluster' => 'Specify to the underlying virtualization infrastructure a cluster membership for the hypervisor.', 'vidproto' => "Request a specific protocol for remote video access be set up. For example, spice in KVM.", -'physlots' => "Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, please reference to manpage of 'lsvm'.", +'physlots' => "Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, reference manpage for 'lsvm'.", 'vidmodel' => "Model of video adapter to provide to guest. For example, qxl in KVM", 'vidpassword' => "Password to use instead of temporary random tokens for VNC and SPICE access", 'storagecache' => "Select caching scheme to employ. E.g. KVM understands 'none', 'writethrough' and 'writeback'", @@ -609,7 +609,7 @@ passed as argument rather than by table value', descriptions => { node => 'The hostname of a node in the cluster.', groups => "A comma-delimited list of groups this node is a member of. Group names are arbitrary, except all nodes should be part of the 'all' group. Internal group names are designated by using __. For example, __Unmanaged, could be the internal name for a group of nodes that is not managed by xCAT. Admins should avoid using the __ characters when defining their groups.", - status => 'The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Please note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).', + status => 'The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).', statustime => "The data and time when the status was updated.", appstatus => "A comma-delimited list of application status. For example: 'sshd=up,ftp=down,ll=down'", appstatustime => 'The date and time when appstatus was updated.', @@ -690,9 +690,9 @@ passed as argument rather than by table value', password => 'The password string for SNMPv3 or community string for SNMPv1/SNMPv2. Falls back to passwd table, and site snmpc value if using SNMPv1/SNMPv2.', privacy => 'The privacy protocol to use for v3. xCAT will use authNoPriv if this is unspecified. DES is recommended to use if v3 enabled, as it is the most readily available.', auth => 'The authentication protocol to use for SNMPv3. SHA is assumed if v3 enabled and this is unspecified', - linkports => 'The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Please refer to the switch table for details on how to specify the port numbers.', - sshusername => 'The remote login user name. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.', - sshpassword => 'The remote login password. It can be for ssh or telnet. If it is for telnet, please set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.', + linkports => 'The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Refer to the switch table for details on how to specify the port numbers.', + sshusername => 'The remote login user name. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.', + sshpassword => 'The remote login password. It can be for ssh or telnet. If it is for telnet, set protocol to "telnet". If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key.', protocol => 'Protocol for running remote commands for the switch. The valid values are: ssh, telnet. ssh is the default. If the sshusername is blank, the username, password and protocol will be retrieved from the passwd table with "switch" as the key. The passwd.comments attribute is used for protocol.', switchtype => 'The type of switch. It is used to identify the file name that implements the functions for this switch. The valid values are: Mellanox, Cisco, BNT and Juniper.', }, @@ -778,6 +778,7 @@ passed as argument rather than by table value', IMG_ARCH(The architecture of the osimage, such as "ppc64le","x86_64"), IMG_NAME(The name of the osimage, such as "rhels7.3-ppc64le-netboot-compute"), IMG_OSVER(The os release of the osimage, such as "rhels7.3","sles11.4"), + IMG_KERNELVERSION(the "kernelver" attribute of the osimage), IMG_PROFILE(the profile of the osimage, such as "service","compute"), IMG_PKGLIST(the "pkglist" attribute of the osimage), IMG_PKGDIR(the "pkgdir" attribute of the osimage), @@ -1114,7 +1115,7 @@ passed as argument rather than by table value', " runbootscripts: If set to 'yes' the scripts listed in the postbootscripts\n" . " attribute in the osimage and postscripts tables will be run during\n" . " each reboot of stateful (diskful) nodes. This attribute has no\n" . -" effect on stateless and statelite nodes. Please run the following\n" . +" effect on stateless and statelite nodes. Run the following\n" . " command after you change the value of this attribute: \n" . " 'updatenode -P setuppostbootscripts'\n\n" . " precreatemypostscripts: (yes/1 or no/0). Default is no. If yes, it will \n" . @@ -1144,7 +1145,7 @@ passed as argument rather than by table value', " '1': enable basic debug mode\n" . " '2': enable expert debug mode\n" . " For the details on 'basic debug mode' and 'expert debug mode',\n" . - " please refer to xCAT documentation.\n\n" . + " refer to xCAT documentation.\n\n" . " --------------------\n" . "REMOTESHELL ATTRIBUTES\n" . " --------------------\n" . diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 79fe2b32e..5dfb9494c 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -60,14 +60,16 @@ my %usage = ( rvitals [-h|--help|-v|--version] FSP/LPAR (with HMC) specific: rvitals noderange {temp|voltage|lcds|all} - CEC/LPAR/Frame (using Direct FSP Management)specific: + CEC/LPAR/Frame (using Direct FSP Management) specific: rvitals noderange {rackenv|lcds|all} MPA specific: rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|summary|all} Blade specific: rvitals noderange {temp|wattage|fanspeed|leds|summary|all} BMC specific: - rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|lcds|summary|all} + rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|all} + OpenPOWER server specific: + rvitals noderange {temp|voltage|wattage|fanspeed|power|leds|all} MIC specific: rvitals noderange {thermal|all}", "reventlog" => diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 499c838f2..d158858f2 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -3362,6 +3362,7 @@ my %MTM_P6P7 = ( '9117-MMB' => 1, '9179-MHB' => 1, '9119-FHB' => 1, + '9125-F2C' => 1, ); #----------------------------------------------------------------------------- diff --git a/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 new file mode 100644 index 000000000..11d5b3445 --- /dev/null +++ b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 @@ -0,0 +1,15 @@ +Alias /xcat "/opt/xcat/ui" +PHPINIDir "/opt/xcat/ui" + +# Redirect all http request to https +RewriteEngine On +RewriteCond %{SERVER_PORT} 80 +RewriteCond %{HTTPS} !=on +RewriteRule ^/?xcat/(.*) https://%{SERVER_NAME}/xcat/$1 [R,L] + + + Options FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all + diff --git a/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 new file mode 100644 index 000000000..c6a9de325 --- /dev/null +++ b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 @@ -0,0 +1,14 @@ +Alias /xcat "/opt/xcat/ui" +PHPINIDir "/opt/xcat/ui" + +# Redirect all http request to https +RewriteEngine On +RewriteCond %{SERVER_PORT} 80 +RewriteCond %{HTTPS} !=on +RewriteRule ^/?xcat/(.*) https://%{SERVER_NAME}/xcat/$1 [R,L] + + + Options +FollowSymLinks + AllowOverride None + Require all granted + diff --git a/xCAT-client/pods/man1/chvm.1.pod b/xCAT-client/pods/man1/chvm.1.pod index 615ec1fca..99ec573f7 100644 --- a/xCAT-client/pods/man1/chvm.1.pod +++ b/xCAT-client/pods/man1/chvm.1.pod @@ -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, please 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 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. =back @@ -572,7 +572,7 @@ The resource information after modification is similar to: lpar1: 1/2/2 lpar1: 128. -Note: The physical I/O resources specified with I will be appended to the specified partition. The physical I/O resources which are not specified but belonged to the partition will not be removed. For more information about I, please refer to L. +Note: The physical I/O resources specified with I will be appended to the specified partition. The physical I/O resources which are not specified but belonged to the partition will not be removed. For more information about I, refer to L. =head2 VMware/KVM specific: diff --git a/xCAT-client/pods/man1/genimage.1.pod b/xCAT-client/pods/man1/genimage.1.pod index 7438a8329..7d2414604 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. Please use B<--interactive> flag if you want the yum/zypper command to prompt you for the answers. +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. 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/getmacs.1.pod b/xCAT-client/pods/man1/getmacs.1.pod index 110d6ba54..68572339f 100644 --- a/xCAT-client/pods/man1/getmacs.1.pod +++ b/xCAT-client/pods/man1/getmacs.1.pod @@ -54,7 +54,7 @@ Display MAC only. The default is to write the first valid adapter MAC to the xCA B<-D> -Perform discovery for mac address. By default, it will run ping test to test the connection between adapter and xCAT management node. Use '--noping' can skip the ping test to save time. Please be aware that in this way, the lpars will be reset. +Perform discovery for mac address. By default, it will run ping test to test the connection between adapter and xCAT management node. Use '--noping' can skip the ping test to save time. Be aware that in this way, the lpars will be reset. B<-f> diff --git a/xCAT-client/pods/man1/imgcapture.1.pod b/xCAT-client/pods/man1/imgcapture.1.pod index 7dbd35c31..96b0b44a3 100644 --- a/xCAT-client/pods/man1/imgcapture.1.pod +++ b/xCAT-client/pods/man1/imgcapture.1.pod @@ -20,7 +20,7 @@ The B type: The attributes of osimage will be used to capture and prepare the root image. The B, B and B attributes for the stateless/statelite image to be created are duplicated from the B's attribute. If the B<-p|--profile> I option is specified, the image will be created under "/>/netboot///>/rootimg". -The default files/directories excluded in the image are specified by /opt/xcat/share/xcat/netboot//>...imgcapture.exlist; also, you can put your customized file (>...imgcapture.exlist) to /install/custom/netboot/. The directories in the default I<.imgcapture.exlist> file are necessary to capture image from the diskful Linux node managed by xCAT, please don't remove it. +The default files/directories excluded in the image are specified by /opt/xcat/share/xcat/netboot//>...imgcapture.exlist; also, you can put your customized file (>...imgcapture.exlist) to /install/custom/netboot/. The directories in the default I<.imgcapture.exlist> file are necessary to capture the image from the diskful Linux node managed by xCAT, don't remove it. The image captured will be extracted into the />/netboot/>/>/>/rootimg directory. diff --git a/xCAT-client/pods/man1/lsslp.1.pod b/xCAT-client/pods/man1/lsslp.1.pod index b93181db4..81d5cfdef 100755 --- a/xCAT-client/pods/man1/lsslp.1.pod +++ b/xCAT-client/pods/man1/lsslp.1.pod @@ -13,13 +13,13 @@ B [I] [B<-V>] [B<-i> I] B<[-w] [-r|-x|-z] [-n] [-s =head1 DESCRIPTION -The lsslp command discovers selected service types using the -s flag. All service types are returned if the -s flag is not specified. If a specific IP address is not specified using the -i flag, the request is sent out all available network adapters. The optional -r, -x, -z and --vpdtable flags format the output. If you can't receive all the hardware, please use -T to increase the waiting time. +The lsslp command discovers selected service types using the -s flag. All service types are returned if the -s flag is not specified. If a specific IP address is not specified using the -i flag, the request is sent out all available network adapters. The optional -r, -x, -z and --vpdtable flags format the output. If you can't receive all the hardware, use -T to increase the waiting time. NOTE: SLP broadcast requests will propagate only within the subnet of the network adapter broadcast IPs specified by the -i flag. =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). Please do not use noderange with the flag -s. +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<-i> IP(s) the command will send out (defaults to all available adapters). @@ -54,7 +54,7 @@ B<-x> XML format. B<-z> Stanza formated output. -B<-I> Give the warning message for the nodes in database which have no SLP responses. Please 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 noly can be used after the database migration finished successfully. =head1 RETURN VALUE @@ -227,7 +227,7 @@ Output is similar to: bpa 9458-100 BPCF017 B-0 40.17.0.2 f17c00bpcb_a -8. To find the nodes within the user specified. Please make sure the noderange input have been defined in xCAT database. +8. To find the nodes within the user specified. Make sure the noderange input have been defined in xCAT database. lsslp CEC1-CEC3 or lsslp CEC1,CEC2,CEC3 diff --git a/xCAT-client/pods/man1/makentp.1.pod b/xCAT-client/pods/man1/makentp.1.pod index 81bae817b..eab9c1cb5 100755 --- a/xCAT-client/pods/man1/makentp.1.pod +++ b/xCAT-client/pods/man1/makentp.1.pod @@ -28,7 +28,7 @@ I -- the NTP servers for the service node and compute node to s =back -To setup NTP on the compute node, please add B postscript to the I table and run I command. +To setup NTP on the compute node, add B postscript to the I table and run I command. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/mkdocker.1.pod b/xCAT-client/pods/man1/mkdocker.1.pod index 95479f404..1f9ee535c 100644 --- a/xCAT-client/pods/man1/mkdocker.1.pod +++ b/xCAT-client/pods/man1/mkdocker.1.pod @@ -29,7 +29,7 @@ The command that the instance will run based on the B specified. The B -A JSON string which will be used as parameters to create a docker. Please reference https://docs.docker.com/engine/reference/api/docker_remote_api_v1.22/ for more information about which parameters can be specified. +A JSON string which will be used as parameters to create a docker. Reference https://docs.docker.com/engine/reference/api/docker_remote_api_v1.22/ for more information about which parameters can be specified. Some useful flags are: diff --git a/xCAT-client/pods/man1/mkdsklsnode.1.pod b/xCAT-client/pods/man1/mkdsklsnode.1.pod index 9437186ea..5e0a95278 100644 --- a/xCAT-client/pods/man1/mkdsklsnode.1.pod +++ b/xCAT-client/pods/man1/mkdsklsnode.1.pod @@ -45,7 +45,7 @@ You can use the force option to reinitialize a node if it already has resources 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. Please 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 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. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/mkvm.1.pod b/xCAT-client/pods/man1/mkvm.1.pod index c3d02232c..700521841 100644 --- a/xCAT-client/pods/man1/mkvm.1.pod +++ b/xCAT-client/pods/man1/mkvm.1.pod @@ -46,9 +46,9 @@ The first form of B command creates new partition(s) with the same profile The second form of this command duplicates all the partitions from the source specified by I to the destination specified by I. The source and destination CECs can be managed by different HMCs. -Please make sure the nodes in the I is defined in the I table and the I is set to 'hmc' in the I table before running this command. +Make sure the nodes in the I is defined in the I table and the I is set to 'hmc' in the I table before running this command. -Please note that the B command currently only supports creating standard LPARs, not virtual LPARs working with VIOS server. +Note that the B command currently only supports creating standard LPARs, not virtual LPARs working with VIOS server. =head2 For PPC (using Direct FSP Management) specific: diff --git a/xCAT-client/pods/man1/monadd.1.pod b/xCAT-client/pods/man1/monadd.1.pod index 8c336ffc3..1e587afdd 100644 --- a/xCAT-client/pods/man1/monadd.1.pod +++ b/xCAT-client/pods/man1/monadd.1.pod @@ -20,7 +20,7 @@ This command is used to register a monitoring plug-in module to monitor the xCAT 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 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 ...> Please 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 possbile setting keys for a plug-in module. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/monrm.1.pod b/xCAT-client/pods/man1/monrm.1.pod index a38793e11..d535317b9 100644 --- a/xCAT-client/pods/man1/monrm.1.pod +++ b/xCAT-client/pods/man1/monrm.1.pod @@ -39,7 +39,7 @@ B<-v | --version> Command Version. monrm gangliamon -Please note that gangliamon must have been registered in the xCAT I table. For a list of registered plug-in modules, use command B. +Note that gangliamon must have been registered in the xCAT I table. For a list of registered plug-in modules, use command B. diff --git a/xCAT-client/pods/man1/monstop.1.pod b/xCAT-client/pods/man1/monstop.1.pod index 0d0511bfe..230b8cd91 100644 --- a/xCAT-client/pods/man1/monstop.1.pod +++ b/xCAT-client/pods/man1/monstop.1.pod @@ -46,7 +46,7 @@ B<-v | -version> Command Version. monstop gangliamon -Please note that gangliamon must have been registered in the xCAT I table. For a list of registered plug-in modules, use command I. +Note that gangliamon must have been registered in the xCAT I table. For a list of registered plug-in modules, use command I. diff --git a/xCAT-client/pods/man1/nimnodeset.1.pod b/xCAT-client/pods/man1/nimnodeset.1.pod index 6b3ad0b91..2e9b9835f 100644 --- a/xCAT-client/pods/man1/nimnodeset.1.pod +++ b/xCAT-client/pods/man1/nimnodeset.1.pod @@ -41,7 +41,7 @@ This command will also create a NIM script resource to enable the xCAT support f 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. Please 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 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. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/packimage.1.pod b/xCAT-client/pods/man1/packimage.1.pod index c3cf60d65..5b2b2a837 100644 --- a/xCAT-client/pods/man1/packimage.1.pod +++ b/xCAT-client/pods/man1/packimage.1.pod @@ -12,16 +12,13 @@ B [B<-m>|B<--method> I] [B<-c>|B<--compress> I and I tables. +Note: For an osimage that is deployed on a cluster, running packimage will overwrite the existing rootimage file and be unavailable to the compute nodes while packimage is running. =head1 PARAMETERS -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. +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 @@ -43,11 +40,11 @@ B<-c| --compress> Compress Method (pigz,gzip,xz, default is pigz/gzip) =head1 EXAMPLES -1. To pack the osimage rhels7.1-x86_64-netboot-compute: +1. To pack the osimage 'rhels7.1-x86_64-netboot-compute': packimage rhels7.1-x86_64-netboot-compute -2. To pack the osimage rhels7.1-x86_64-netboot-compute with "tar" to archive and "pigz" to compress: +2. To pack the osimage 'rhels7.1-x86_64-netboot-compute' with "tar" to archive and "pigz" to compress: packimage -m tar -c pigz rhels7.1-x86_64-netboot-compute diff --git a/xCAT-client/pods/man1/rflash.1.pod b/xCAT-client/pods/man1/rflash.1.pod index 440caebf8..9f501f3cf 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 run B, please use B to check if the related HMC ssh is enabled. If enable a HMC ssh connection, please 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 comamnd. 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. @@ -58,7 +58,7 @@ Any previously activated code on the affected systems will be automatically acce B If the power subsystem is recycled, all of its attached managed systems will be recycled. -If it outputs B<"Timeout waiting for prompt"> during the upgrade, please set the B<"ppctimeout"> larger in the B table. After the upgrade, remeber to change it back. If run the B<"rflash"> command on an AIX management node, need to make sure the value of B<"useSSHonAIX"> is B<"yes"> in the site table. +If it outputs B<"Timeout waiting for prompt"> during the upgrade, set the B<"ppctimeout"> larger in the B table. After the upgrade, remeber to change it back. If run the B<"rflash"> command on an AIX management node, need to make sure the value of B<"useSSHonAIX"> is B<"yes"> in the site table. =head2 PPC (using Direct FSP Management) specific: diff --git a/xCAT-client/pods/man1/rpower.1.pod b/xCAT-client/pods/man1/rpower.1.pod index c81492af3..a15206d67 100644 --- a/xCAT-client/pods/man1/rpower.1.pod +++ b/xCAT-client/pods/man1/rpower.1.pod @@ -123,7 +123,7 @@ Wake up the target nodes which is in B state. Don't try to run B against the 'on' state node, it would cause the node gets to 'off' state. -For some of xCAT hardware such as NeXtScale, it may need to enable S3 before using B. The following steps can be used to enable S3. Please reference L for "pasu" usage. +For some of xCAT hardware such as NeXtScale, it may need to enable S3 before using B. The following steps can be used to enable S3. Reference L for "pasu" usage. [root@xcatmn home]# echo "set Power.S3Enable Enable" > power-setting [root@xcatmn home]# pasu -b power-setting node01 diff --git a/xCAT-client/pods/man1/rvitals.1.pod b/xCAT-client/pods/man1/rvitals.1.pod index b1bd0e81b..c34a42b6b 100644 --- a/xCAT-client/pods/man1/rvitals.1.pod +++ b/xCAT-client/pods/man1/rvitals.1.pod @@ -10,7 +10,7 @@ B [B<-h>|B<--help>|B<-v>|B<--version>] B I {B|B|B|B} -=head2 CEC/LPAR/Frame (using Direct FSP Management ) specific: +=head2 CEC/LPAR/Frame (using Direct FSP Management) specific: B I {B|B|B} [B<-V>| B<--verbose>] @@ -26,6 +26,10 @@ B I {B|B|B|B|B|B I {B|B|B|B|B|B|B} +=head2 OpenPOWER server specific: + +B I {B|B|B|B|B|B|B} + =head1 B B retrieves hardware vital information from the on-board Service diff --git a/xCAT-client/pods/man1/sinv.1.pod b/xCAT-client/pods/man1/sinv.1.pod index 04ac578d7..9c08ced7e 100644 --- a/xCAT-client/pods/man1/sinv.1.pod +++ b/xCAT-client/pods/man1/sinv.1.pod @@ -139,8 +139,8 @@ correspond to a valid device configuration file. xCAT ships some default configuration files for Ethernet switches and and IB switches under I directory. If you want to overwrite -any of the configuration files, please copy it to I -directory and cutomize it. +any of the configuration files, copy them to I +directory and cutomize. For example, I is the configuration file location if devicetype is specified as IBSwitch::Qlogic. xCAT will first search config file using I as the base. diff --git a/xCAT-client/pods/man1/switchdiscover.1.pod b/xCAT-client/pods/man1/switchdiscover.1.pod index d0730f423..7bcdbc27b 100755 --- a/xCAT-client/pods/man1/switchdiscover.1.pod +++ b/xCAT-client/pods/man1/switchdiscover.1.pod @@ -22,9 +22,9 @@ B<--setup> flag is for switch-based switch discovery. It will find all the disc To view all the switches defined in the xCAT databasee use B command. -For lldp method, please 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 packge or you can get it from http://vincentbernat.github.io/lldpd/installation.html. -For snmp method, please 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. +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. =head1 OPTIONS diff --git a/xCAT-client/pods/man1/xdsh.1.pod b/xCAT-client/pods/man1/xdsh.1.pod index 6693e4795..72d3ede24 100644 --- a/xCAT-client/pods/man1/xdsh.1.pod +++ b/xCAT-client/pods/man1/xdsh.1.pod @@ -206,8 +206,8 @@ correspond to a valid device configuration file. xCAT ships some default configuration files for Ethernet switches and and IB switches under I directory. If you want to overwrite -any of the configuration files, please copy it to I -directory and cutomize it. +any of the configuration files, copy them to I +directory and cutomize. For example, I is the configuration file location if devicetype is specified as IBSwitch::Qlogic. xCAT will first search config file using I as the base. diff --git a/xCAT-client/pods/man3/noderange.3.pod b/xCAT-client/pods/man3/noderange.3.pod index f80504f79..b89434bab 100644 --- a/xCAT-client/pods/man3/noderange.3.pod +++ b/xCAT-client/pods/man3/noderange.3.pod @@ -128,19 +128,15 @@ from the begining there are: =over 2 =item * - one or more alpha characters of any case and any number of "-" in any combination =item * - followed by one or more numbers =item * - then optionally followed by one alpha character of any case or "-" =item * - followed by any combination of case mixed alphanumerics and "-" =back diff --git a/xCAT-csm/csm.compute.rhels7.ppc64le.pkglist b/xCAT-csm/csm.compute.rhels7.ppc64le.pkglist new file mode 100644 index 000000000..a187e38a2 --- /dev/null +++ b/xCAT-csm/csm.compute.rhels7.ppc64le.pkglist @@ -0,0 +1 @@ +#csm compute diff --git a/xCAT-csm/csm.launch.rhels7.ppc64le.pkglist b/xCAT-csm/csm.launch.rhels7.ppc64le.pkglist new file mode 100644 index 000000000..f24861fbb --- /dev/null +++ b/xCAT-csm/csm.launch.rhels7.ppc64le.pkglist @@ -0,0 +1 @@ +#csm launch diff --git a/xCAT-csm/csm.login.rhels7.ppc64le.pkglist b/xCAT-csm/csm.login.rhels7.ppc64le.pkglist new file mode 100644 index 000000000..4410939e0 --- /dev/null +++ b/xCAT-csm/csm.login.rhels7.ppc64le.pkglist @@ -0,0 +1 @@ +#csm login diff --git a/xCAT-csm/csm.service.rhels7.ppc64le.pkglist b/xCAT-csm/csm.service.rhels7.ppc64le.pkglist new file mode 100644 index 000000000..932d448df --- /dev/null +++ b/xCAT-csm/csm.service.rhels7.ppc64le.pkglist @@ -0,0 +1 @@ +#csm service diff --git a/xCAT-csm/csm.workloadmanager.rhels7.ppc64le.pkglist b/xCAT-csm/csm.workloadmanager.rhels7.ppc64le.pkglist new file mode 100644 index 000000000..80ea18046 --- /dev/null +++ b/xCAT-csm/csm.workloadmanager.rhels7.ppc64le.pkglist @@ -0,0 +1 @@ +#csm workload manager diff --git a/xCAT-csm/install/postscripts/csm_post b/xCAT-csm/install/postscripts/csm_post new file mode 100644 index 000000000..bfad0d20e --- /dev/null +++ b/xCAT-csm/install/postscripts/csm_post @@ -0,0 +1 @@ +#example postscript for CSM diff --git a/xCAT-csm/xCAT-csm.spec b/xCAT-csm/xCAT-csm.spec new file mode 100644 index 000000000..23c1a9b92 --- /dev/null +++ b/xCAT-csm/xCAT-csm.spec @@ -0,0 +1,53 @@ +Summary: Packages for installation of CSM nodes +Name: xCAT-csm +Version: %{?version:%{version}}%{!?version:%(cat Version)} +Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")} +Epoch: 4 +License: IBM +Group: Applications/System +Source: xCAT-csm-%{version}.tar.gz +Packager: IBM Corp. +Vendor: IBM Corp. +Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} +Prefix: /opt/xcat +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root + +%ifos linux +BuildArch: noarch +%endif + +Provides: xCAT-csm = %{epoch}:%{version} + +Requires: xCAT + +%description +xCAT-csm provides Packages for installation of CSM nodes + +%prep +%setup -q -n xCAT-csm + + +%build + +%install +rm -rf %{buildroot} + +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/rh/ +mkdir -p $RPM_BUILD_ROOT/install/postscripts/csm/ + +cp csm* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/rh/ +cp install/postscripts/* $RPM_BUILD_ROOT/install/postscripts/csm/ + +%clean +# This step does not happen until *after* the %files packaging below +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%{prefix} +/install/postscripts +%doc + + + +%changelog diff --git a/xCAT-genesis-builder/buildrpm b/xCAT-genesis-builder/buildrpm index 6bc49ed3d..94f3399c5 100755 --- a/xCAT-genesis-builder/buildrpm +++ b/xCAT-genesis-builder/buildrpm @@ -32,7 +32,7 @@ if [ $BUILDARCH = 'ppc64' -a $HOSTOS != 'mcp' -a $HOSTOS != '-y' ]; then echo "2. Download Mellanox EN Driver for Linux from http://www.mellanox.com/downloads/Drivers/mlnx-en-3.2-1.0.1.1.tgz" echo "3. Extract it and run ./install.sh from the extracted directory" echo " tar -xvf mlnx-en-3.2-1.0.1.1.tgz" - echo " ./mlnx-en-3.2-1.0.1/install.sh" + echo " ./mlnx-en-3.2-1.0.1.1/install.sh" echo "4. Check whether the mlx4 driver is updated" echo " modprobe mlx4-en" echo " modinfo mlx4-en | grep version" diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index b64cc251c..f90bfa022 100755 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -1,3 +1,4 @@ +%define version 2.12 Version: %{?version:%{version}}%{!?version:%(cat Version)} Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")} %ifarch i386 i586 i686 x86 diff --git a/xCAT-probe/lib/perl/LogParse.pm b/xCAT-probe/lib/perl/LogParse.pm index 85b0c6ca5..a7c6e5379 100644 --- a/xCAT-probe/lib/perl/LogParse.pm +++ b/xCAT-probe/lib/perl/LogParse.pm @@ -489,12 +489,20 @@ sub obtain_log_content { $log_content{label} = $::LOGLABEL_DHCPD; } elsif ($split_line[2] =~ /in.tftpd/i) { $log_content{label} = $::LOGLABEL_TFTP; + } elsif ($split_line[2] =~ /^xcat.genesis.doxcat/i or $split_line[3] =~ /^xcat.genesis.doxcat/i) { + $log_content{label} = $::LOGLABEL_DOXCAT; + } elsif ($split_line[2] =~ /^xcat.genesis.dodiscovery/i or $split_line[3] =~ /^xcat.genesis.dodiscovery/i) { + $log_content{label} = $::LOGLABEL_DISCOVERY; } elsif ($split_line[2] =~ /^xcat/i) { $log_content{label} = $::LOGLABEL_XCAT; } else { $log_content{label} = $::LOGLABEL_UNDEF; } - $log_content{msg} = join(" ", @split_line[ 3 .. @split_line - 1 ]); + if ($split_line[3] =~ /^xcat.genesis.doxcat/i or $split_line[3] =~ /^xcat.genesis.dodiscovery/i) { + $log_content{msg} = join(" ", @split_line[ 4 .. @split_line - 1 ]); + } else { + $log_content{msg} = join(" ", @split_line[ 3 .. @split_line - 1 ]); + } } else { my $timestamp = join(" ", @split_line[ 0 .. 2 ]); $log_content{time} = $self->convert_to_epoch_seconds($timestamp); @@ -508,12 +516,20 @@ sub obtain_log_content { $log_content{label} = $::LOGLABEL_DHCPD; } elsif ($split_line[4] =~ /in.tftpd/i) { $log_content{label} = $::LOGLABEL_TFTP; - } elsif ($split_line[4] =~ /^xcat/i) { + } elsif ($split_line[4] =~ /^xcat.genesis.doxcat/i or $split_line[5] =~ /^xcat.genesis.doxcat/i) { + $log_content{label} = $::LOGLABEL_DOXCAT; + } elsif ($split_line[4] =~ /^xcat.genesis.dodiscovery/i or $split_line[5] =~ /^xcat.genesis.dodiscovery/i) { + $log_content{label} = $::LOGLABEL_DISCOVERY; + } elsif ($split_line[4] =~ /^xcat/i or $split_line[5] =~ /^xcat/i) { $log_content{label} = $::LOGLABEL_XCAT; } else { $log_content{label} = $::LOGLABEL_UNDEF; } - $log_content{msg} = join(" ", @split_line[ 5 .. @split_line - 1 ]); + if ($split_line[5] =~ /^xcat.genesis.doxcat/i or $split_line[5] =~ /^xcat.genesis.dodiscovery/i) { + $log_content{msg} = join(" ", @split_line[ 6 .. @split_line - 1 ]); + } else { + $log_content{msg} = join(" ", @split_line[ 5 .. @split_line - 1 ]); + } } } elsif ($log_type == $::LOGTYPE_HTTP) { $split_line[3] =~ s/^\[(.+)/$1/g; diff --git a/xCAT-probe/lib/perl/probe_global_constant.pm b/xCAT-probe/lib/perl/probe_global_constant.pm index a40f3c1e3..44b683117 100644 --- a/xCAT-probe/lib/perl/probe_global_constant.pm +++ b/xCAT-probe/lib/perl/probe_global_constant.pm @@ -7,11 +7,13 @@ $::LOGTYPE_RSYSLOG = 0; #rsyslog $::LOGTYPE_HTTP = 1; #apache log #The lable of specific line log -$::LOGLABEL_DHCPD = 0; -$::LOGLABEL_TFTP = 1; -$::LOGLABEL_HTTP = 2; -$::LOGLABEL_XCAT = 3; -$::LOGLABEL_UNDEF = 4; +$::LOGLABEL_DHCPD = 0; +$::LOGLABEL_TFTP = 1; +$::LOGLABEL_HTTP = 2; +$::LOGLABEL_XCAT = 3; +$::LOGLABEL_UNDEF = 4; +$::LOGLABEL_DOXCAT = 5; +$::LOGLABEL_DISCOVERY = 6; #The important stage of provision process $::STATE_POWER_ON = 1; @@ -44,4 +46,32 @@ $::STATE_COMPLETED = 13; $::STATE_POSTBOOTSCRIPT => "running_postbootscripts", $::STATE_COMPLETED => "complete", ); + +# The important stage of discovery process +$::STATE_DISCOVER_DHCP = 1; +$::STATE_DISCOVER_BOOTLODER = 2; +$::STATE_DISCOVER_KERNEL = 3; +$::STATE_DISCOVER_INITRD = 4; +$::STATE_DISCOVER_DOXCAT = 5; +$::STATE_DISCOVER_DISCOVERY = 6; +$::STATE_DISCOVER_REPORT = 7; +$::STATE_DISCOVER_UPDATE = 8; +$::STATE_DISCOVER_FAILED = 9; +$::STATE_DISCOVER_COMPLETED = 10; + +#The description of every important stage of discovery process +%::STATE_DISCOVER_DESC = ( + $::STATE_DISCOVER_DHCP => "got_ip_from_dhcp", + $::STATE_DISCOVER_BOOTLODER => "download_bootloder", + $::STATE_DISCOVER_KERNEL => "download_genesis_kernel", + $::STATE_DISCOVER_INITRD => "download_genesis_initrd", + $::STATE_DISCOVER_DOXCAT => "enter_genesis", + $::STATE_DISCOVER_DISCOVERY => "start_to_discovery", + $::STATE_DISCOVER_REPORT => "send_discovery_request", + $::STATE_DISCOVER_UPDATE => "start_update_node_information", + $::STATE_DISCOVER_FAILED => "can't_find_related_node", + $::STATE_DISCOVER_COMPLETED => "discovery_complete", +); + + 1; diff --git a/xCAT-probe/subcmds/discovery b/xCAT-probe/subcmds/discovery index 4d4859c27..28f71bb7c 100755 --- a/xCAT-probe/subcmds/discovery +++ b/xCAT-probe/subcmds/discovery @@ -5,34 +5,40 @@ BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/o use lib "$::XCATROOT/probe/lib/perl"; use probe_utils; +use LogParse; +use probe_global_constant; use xCAT::NetworkUtils; use File::Basename; use IO::Select; +use Time::Local; use Getopt::Long qw(:config no_ignore_case); use Data::Dumper; -my $program_name = basename("$0"); -my $help; -my $test; -my $output = "stdout"; -my $verbose = 0; -my $rst = 0; -my $no_pre_check = 0; -my $discovery_type; -my @valid_discovery_type = ("mtms", "switch"); -my $valid_discovery_type_str = join(",", @valid_discovery_type); -my $noderange; -my $nics; #reservation attribute, format : xxx|xxx|xxx +#--------------------------------------------- +# Global attributes +#--------------------------------------------- -#used for discovery monitor -my %rawdata; +#------IP to mac map list------- +# $ipmacmap{ip_arrd} = "x.x.x.x" +#-------------------------------- my %ipmacmap; -my $terminal = 0; -my %monitor_nodes; +#Used by customer or developer, to obtain more output information +my $verbose = 0; + +#if no specific instruction, do monitor by default +my $monitor = 1; + +#used by developer, to debug the detail information about function running +my $debug = 0; + +#--------------------------------------------- +# Command Usage +#--------------------------------------------- +my $program_name = basename("$0"); $::USAGE = "Usage: $program_name -h - $program_name [-V] [-m -n ] [--noprecheck] + $program_name -n -m [-t ] [-V] [--noprecheck] Description: Probe the discovery process, including pre-check for required configuration and realtime monitor of discovery process. @@ -46,15 +52,413 @@ Options: -m : The method of discovery, the valid values are $valid_discovery_type_str. -n : The range of predefined nodes, must be used with option -m. --noprecheck : skip pre-checking discovery to validate correct configuration. + -t : The maximum time to wait when doing monitor, unit is minutes. default is 60. "; +#---------------------------------------------- +# Main process +#---------------------------------------------- + +# parse command line arguments +my $help = 0; +my $test = 0; +my $maxwaittime = 60; #unit is minute, the max wait time of monitor +my $rollforward_time_of_replay; #used by feature replay discovery log +my $noderange; +my $discovery_type; +my @valid_discovery_type = ("mtms", "switch"); +my $valid_discovery_type_str = join(",", @valid_discovery_type); +my $no_pre_check = 0; +my $nics; +if ( + !GetOptions("--help|h|?" => \$help, + "T" => \$test, + "V" => \$verbose, + "--noprecheck" => \$no_pre_check, + "m=s" => \$discovery_type, + "n=s" => \$noderange, + "t=s" => \$maxwaittime, +# "r=s" => \$rollforward_time_of_replay, + "i=s" => \$nics)) #option i is a reservation option, dosen't show up in usage now +{ + probe_utils->send_msg("stdout", "f", "Invalid parameter for $program_name"); + probe_utils->send_msg("stdout", "", "$::USAGE"); + exit 1; +} + +if ($help) { + probe_utils->send_msg("stdout", "", "$::USAGE"); + exit 0; +} + +if ($test) { + probe_utils->send_msg("stdout", "o", "Probe for discovery process, including pre-check for required configuration and realtime monitor of discovery process."); + exit 0; +} + +unless ($noderange) { + probe_utils->send_msg("stdout", "f", "A noderange is required"); + probe_utils->send_msg("stdout", "", "$::USAGE"); + exit 1; +} + +unless ($discovery_type) { + probe_utils->send_msg("stdout", "f", "Option '-n' must used with '-m'"); + probe_utils->send_msg("stdout", "", "$::USAGE"); + exit 1; +} + +if (defined($discovery_type)) { + unless (grep(/^$discovery_type$/, @valid_discovery_type)) { + probe_utils->send_msg("stdout", "f", "Invalid discovery type. the vaild types are $valid_discovery_type_str"); + probe_utils->send_msg("stdout", "", "$::USAGE"); + exit 1; + } +} + +if ($rollforward_time_of_replay) { + if (($rollforward_time_of_replay !~ /(\d+)h(\d+)m/i) && ($rollforward_time_of_replay !~ /^(\d+)h*$/i) && ($rollforward_time_of_replay !~ /^(\d+)m$/i)) { + probe_utils->send_msg("stdout", "f", "Unsupported time format for option '-r'"); + probe_utils->send_msg("stdout", "", "$::USAGE"); + exit 1; + } +} + +if (!$no_pre_check) { + $rst = do_pre_check(); + exit 1 if ($rst); +} + +if ($rollforward_time_of_replay) { + $monitor = 0; + + my $start_time_of_replay = time(); + my $end_time_of_replay = $start_time_of_replay; + if ($rollforward_time_of_replay =~ /(\d+)h(\d+)m/i) { + $start_time_of_replay -= ($1 * 3600 + $2 * 60) + } elsif ($rollforward_time_of_replay =~ /^(\d+)h*$/i) { + $start_time_of_replay -= $1 * 3600; + } elsif ($rollforward_time_of_replay =~ /^(\d+)m$/) { + $start_time_of_replay -= $1 * 60; + } + + $rst = do_replay($start_time_of_replay, $end_time_of_replay); + exit $rst; +} + +$rst = do_monitor(); + +exit $rst; + #------------------------------------------ =head3 Description: - Check if all genesis files are available. + Check if all predefined node are valid + Returns: + 0: pass + 1: failed +=cut + +#------------------------------------------ +sub check_pre_defined_node { + my $rst = 0; + my @cmdoutput; + my %nodecheckrst; + my @errornodes; + my $currentnode = ""; + + @cmdoutput = `lsdef $noderange 2>&1`; + foreach (@cmdoutput) { + if ($_ =~ /^Error: Could not find an object named '(\w+)' .+/i) { + $currentnode = $1; + push @errornodes, $currentnode; + $rst = 1; + } elsif ($_ =~ /^\s*Object name: (\w+)/i) { + $currentnode = $1; + $monitor_nodes{$1} = 0; + } elsif ($_ =~ /^\s+(\w+)\s*=\s*(\w+)/) { + $nodecheckrst{$currentnode}{$1} = $2; + } + } + + if ($rst) { + my $errornode = join(",", @errornodes); + probe_utils->send_msg("stdout", "f", "[$errornode] : Could not find node definition"); + } + + # check whether there is bmc node in noderange + my @bmcnodes = (); + foreach my $node (keys %nodecheckrst) { + if (($nodecheckrst{$node}{"nodetype"} eq "mp") and ($nodecheckrst{$node}{"hwtype"} eq "bmc")) { + push @bmcnodes, $node; + } + } + if (@bmcnodes) { + my $bmcnode = join(",", @bmcnodes); + probe_utils->send_msg("stdout", "f", "[$bmcnode] : bmc node(s)"); + $rst = 1; + } + + # if discover type is mtms, check whether mtms is only for per-define node and bmc node + @errornodes = (); + if ($discovery_type eq "mtms") { + + # get all nodes and their mtms in vpd table, %mtms_node save mtms and node map + my %mtms_node = (); + my @vpd = `tabdump vpd`; + foreach my $vpd_line (@vpd) { + next if ($vpd_line =~ /#node,serial,mtm,side,asset,uuid,comments,disable/); + chomp ($vpd_line); + $vpd_line =~ s/"//g; + my @split_vpd = split(",", $vpd_line); + if (($split_vpd[1] ne "") and ($split_vpd[2] ne "")) { + my $mtmsvpd = "$split_vpd[2]*$split_vpd[1]"; + push @{ $mtms_node{$mtmsvpd} }, $split_vpd[0]; + } + } + + my @error_mtms; + foreach my $node (keys %nodecheckrst) { + + # check pre-define node whether has mtm and serial + # if nodetype is mp and hwtye is bmc, the node is bmc node, do not check whether exists mtms + if (!(exists($nodecheckrst{$node}{"mtm"}) && exists($nodecheckrst{$node}{"serial"}))) { + next if (($nodecheckrst{$node}{"nodetype"} eq "mp") and ($nodecheckrst{$node}{"hwtype"} eq "bmc")); + push @errornodes, $node; + } else { + + # check if there is one or more node has the same mtms with current node + my $mtms = "$nodecheckrst{$node}{\"mtm\"}*$nodecheckrst{$node}{\"serial\"}"; + my $mtms_num = @{$mtms_node{$mtms}}; + if ($mtms_num > 2) { + push @error_mtms, $mtms if (!grep {$_ eq $mtms} @error_mtms); + } elsif ($mtms_num == 2) { + foreach my $mtmsnode (@{$mtms_node{$mtms}}) { + next if ($mtmsnode eq $node); + if (exists($nodecheckrst{$mtmsnode})) { + if (($nodecheckrst{$mtmsnode}{"nodetype"} eq $nodecheckrst{$node}{"nodetype"}) and ($nodecheckrst{$mtmsnode}{"mp"} eq $nodecheckrst{$node}{"hwtype"})) { + push @error_mtms, $mtms if (!grep {$_ eq $mtms} @error_mtms); + } + } else { + my $nodetype = `lsdef $mtmsnode -i nodetype -c |awk -F"=" '{print \$2}'`; + my $hwtype = `lsdef $mtmsnode -i hwtype -c |awk -F"=" '{print \$2}'`; + chomp($nodetype); + chomp($hwtype); + if (($nodetype eq $nodecheckrst{$node}{"nodetype"}) and ($hwtype eq $nodecheckrst{$node}{"hwtype"})) { + push @error_mtms, $mtms if (!grep {$_ eq $mtms} @error_mtms); + } + } + } + } + } + } + + if (@errornodes) { + my $errornode = join(",", @errornodes); + probe_utils->send_msg("stdout", "f", "[$errornode] : No mtm or serival for '$discovery_type' type discovery"); + $rst = 1; + } + + if (@error_mtms) { + foreach (@error_mtms) { + my $errornode = join(",", @{$mtms_node{$_}}); + probe_utils->send_msg("stdout", "f", "[$errornode] : Duplicate node definition found for the same mtms $_."); + $rst = 1; + } + } + } + + if ($discovery_type eq "switch") { + my @switchnodes = (); + foreach my $node (keys %nodecheckrst) { + if ($nodecheckrst{$node}{"nodetype"} eq "switch") { + push @switchnodes, $node; + } + } + + if (@switchnodes){ + my $switchnode = join(",", @switchnodes); + probe_utils->send_msg("stdout", "f", "[$switchnode] : switch node(s)"); + $rst = 1; + } + + my %switch_node = (); + my @switchoutput = `tabdump switch`; + foreach my $switch_line (@switchoutput) { + next if ($switch_line =~ /#node,switch,port,vlan,interface,comments,disable/); + chomp ($switch_line); + $switch_line =~ s/"//g; + my @split_switch = split(",", $switch_line); + if (($split_switch[1] ne "") and ($split_switch[2] ne "")) { + my $switchport = "$split_switch[1]*$split_switch[2]"; + push @{ $switch_node{$switchport} }, $split_switch[0]; + } + } + + my @error_switchport; + my %errorhash = (); + my $keystring; + foreach my $node (keys %nodecheckrst) { + { + $keystring = ""; + if (!(exists($nodecheckrst{$node}{"switch"}) && exists($nodecheckrst{$node}{"switchport"}))) { + last if ($nodecheckrst{$node}{"nodetype"} eq "switch"); + $keystring = "Atrribute 'switch' or 'switchport' isn't defined for '$discovery_type' type discovery"; + last; + } else { + my $switchport = "$nodecheckrst{$node}{\"switch\"}*$nodecheckrst{$node}{\"switchport\"}"; + my $switch_num = @{ $switch_node{$switchport} }; + if ($switch_num > 1) { + if (!grep {$_ eq $switchport} @error_switchport) { + push @error_switchport, $switchport; + } + } + } + + my $tmpoutput = `lsdef $nodecheckrst{$node}{"switch"} 2>&1`; + if ($?) { + $keystring = "Missing definition for related switch $nodecheckrst{$node}{\"switch\"}"; + last; + } + if ($tmpoutput !~ /snmpversion=/) { + $keystring = "Missing attribute 'snmpversion' definition for related switch $nodecheckrst{$node}{\"switch\"}"; + last; + } + if ($tmpoutput !~ /username=/) { + $keystring = "Missing attribute 'username' definition for related switch $nodecheckrst{$node}{\"switch\"}"; + last; + } + if ($tmpoutput !~ /password=/) { + $keystring = "Missing attribute 'password' definition for related switch $nodecheckrst{$node}{\"switch\"}"; + last; + } + } + + if ($keystring) { + if (exists($errorhash{$keystring})) { + $errorhash{$keystring} .= ",$node"; + } else { + $errorhash{$keystring} = $node; + } + } + } + + foreach my $key (keys %errorhash) { + probe_utils->send_msg("stdout", "f", "[$errorhash{$key}] : $key"); + $rst = 1; + } + foreach my $switch_port (@error_switchport) { + my $switchnode = join(",", @{ $switch_node{$switch_port} }); + probe_utils->send_msg("stdout", "f", "[$switchnode] : Duplicate node definition found for the same switch and switchport $switch_port."); + $rst = 1; + } + } + + return $rst; +} + +#----------------------------------------- + +=head3 + Description: + Do pre_checking Arguments: - arch: valid value are ppc64 and x86_64 + nics: target network interface + if not specified, using the network which master belongs to + Returns: + 0: pass + 1: failed +=cut + +#----------------------------------------- +sub do_pre_check { + my @nets = (); + my $rst = 0; + my $msg; + + $rst = check_pre_defined_node(); + probe_utils->send_msg("stdout", "o", "All pre_defined nodes are valid") unless ($rst); + return $rst if ($rst); + + # $nics is undef now, this part is for reservation + if ($nics) { + if ($nics =~/[^\w|]/) { + probe_utils->send_msg("stdout", "f", "Invalid NIC list"); + probe_utils->send_msg("stdout", "", "$::USAGE"); + exit 1; + } + + $msg = "The input network interfaces $nics exist and are configured correctly on current server"; + my @errors = (); + my @nic_array = split(",", $nics); + + foreach my $nic (@nic_array) { + my $tmp_nic = `ip addr show $nic >/dev/null 2>&1`; + if ($?) { + push @errors, "Network interface $nic doesn't exist on current server"; + } else { + my $tmp = `echo $tmp_nic |awk -F" " '/inet / {print \$2}'`; + chomp($tmp); + if (!length($tmp)) { + push @errors, "Network interface $nic isn't set IP address"; + } else { + my ($ip, $mask) = split("/", $tmp); + my $strmask = xCAT::NetworkUtils::formatNetmask($mask, 1, 0); + push(@nets, probe_utils->get_network($ip, $strmask)); + } + } + } + + if (@errors) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "$_") foreach (@errors); + } + } else { + $msg = "Attribute 'master' in 'site' table is configured well"; + my $masteripinsite = `tabdump site | awk -F',' '/^"master",/ { gsub(/"/, "", \$2) ; print \$2 }'`; + chomp($masteripinsite); + if ($masteripinsite eq "") { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "There isn't 'master' definition in 'site' table"); + exit 1; + } + + if (!xCAT::NetworkUtils->isIpaddr("$masteripinsite")) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "The value of 'master' in 'site' table isn't an IP address"); + exit 1; + } + my $tmpoutput = `ip addr 2>&1 |grep $masteripinsite`; + if ($?) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "The IP $masteripinsite of 'master' in 'site' table dosen't belong to any network on current server"); + exit 1; + } + probe_utils->send_msg("stdout", "o", $msg); + + chomp($tmpoutput); + my $tmp = `echo $tmpoutput | awk -F" " '{print \$2}'`; + chomp($tmp); + my ($ip, $mask) = split("/", $tmp); + my $strmask = xCAT::NetworkUtils::formatNetmask($mask, 1, 0); + push(@nets, probe_utils->get_network($ip, $strmask)); + } + + $sub_func_rst = dhcp_dynamic_range_check(\@nets); + $rst |= $sub_func_rst; + + $sub_func_rst = check_genesis_file(); + $rst |= $sub_func_rst; + + return $rst; +} + +#------------------------------------------ + +=head3 + Description: + Check if all genesis files are available. Returns: 0 : pass 1 : failed @@ -62,41 +466,35 @@ Options: #------------------------------------------ sub check_genesis_file { - my $arch = shift; - if (($arch ne "ppc64") and ($arch ne "x86_64")) { - probe_utils->send_msg("$output", "d", "Specify correct arch type") if ($verbose); - return 1; - } - - my $rst_f = 0; - probe_utils->send_msg("$output", "d", "Starting to check genesis files for $arch...") if ($verbose); + my $msg = "Genesis files are avaliable"; + my $rst = 0; my $os = probe_utils->get_os(); - my $genesis_base; - my $genesis_scripts; - - if ($arch eq "x86_64") { - $arch_tmp = "amd64"; - } else { - $arch_tmp = $arch; - } - if ($os =~ "unknown") { - probe_utils->send_msg("$output", "d", "The OS is not supported.") if ($verbose); + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "The OS is not supported."); return 1; } elsif ($os =~ "ubuntu") { - $genesis_base = `dpkg -l | grep -iE "ii\\s+xcat-genesis-base" | grep -i "$arch_tmp"`; - $genesis_scripts = `dpkg -l | grep -iE "ii\\s+xcat-genesis-scripts" | grep -i "$arch_tmp"`; + my $genesis_output = `dpkg -l | grep -iE "ii\\s+xcat-genesis"`; + unless (($genesis_output =~ /base/ and $genesis_output =~ /ppc64/) and + ($genesis_output =~ /scripts/ and $genesis_output =~ /ppc64/) and + ($genesis_output =~ /base/ and $genesis_output =~ /amd64/) and + ($genesis_output =~ /scripts/ and $genesis_output =~ /amd64/)) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "xCAT-genesis is not installed."); + return 1; + } } else { - $genesis_base = `rpm -qa | grep -i "xcat-genesis-base" | grep -i "$arch"`; - $genesis_scripts = `rpm -qa | grep -i "xcat-genesis-scripts" | grep -i "$arch"`; + my $genesis_output = `rpm -qa | grep -i "xcat-genesis"`; + unless (($genesis_output =~ /base/ and $genesis_output =~ /ppc64/) and + ($genesis_output =~ /scripts/ and $genesis_output =~ /ppc64/) and + ($genesis_output =~ /base/ and $genesis_output =~ /x86_64/) and + ($genesis_output =~ /scripts/ and $genesis_output =~ /x86_64/)) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "xCAT-genesis is not installed."); + return 1; + } } - unless ($genesis_base and $genesis_scripts) { - probe_utils->send_msg("$output", "d", "xCAT-genesis for $arch is not installed.") if ($verbose); - return 1; - } - - probe_utils->send_msg("$output", "d", "xCAT-genesis for $arch is installed, starting to check files...") if ($verbose); my $tftpdir = `tabdump site | awk -F',' '/^"tftpdir",/ { gsub(/"/, "", \$2) ; print \$2 }'`; chomp($tftpdir); @@ -105,20 +503,22 @@ sub check_genesis_file { my @genesis_files; my $genesis_line; my $wget_rst; + my @errors; - if ($arch eq "ppc64") { + { # check genesis files for ppc64 arch $genesis_folder = "$tftpdir/pxelinux.cfg/p"; unless (-d "$genesis_folder") { - probe_utils->send_msg("$output", "d", "There is no genesis file for $arch. Run 'mknb ppc64' if using ppc64/ppc64le machine.") if ($verbose); - return 1; + push @errors, "There is no genesis file for ppc64. Run 'mknb ppc64' if using ppc64/ppc64le machine."; + $rst = 1; + last; } @genesis_files = glob("$genesis_folder/*"); foreach (@genesis_files) { unless (open(FILE, $_)) { - probe_utils->send_msg("$output", "d", "Cannot open file $_.") if ($verbose); - $rst_f = 1; + push @errors, "Cannot open file $_."; + $rst = 1; next; } @@ -131,10 +531,8 @@ sub check_genesis_file { $initrd_path = $initrd_info[1]; $wget_rst = system("wget -q --spider $initrd_path -T 0.5 -t 3"); if ($wget_rst) { - probe_utils->send_msg("$output", "d", "'initrd' cannot be downloaded from $initrd_path.") if ($verbose); - $rst_f = 1; - } else { - probe_utils->send_msg("$output", "d", "Check initrd file: $initrd_path PASS.") if ($verbose); + push @errors, "'initrd' cannot be downloaded from $initrd_path."; + $rst = 1; } } @@ -143,19 +541,20 @@ sub check_genesis_file { $kernel_path = $kernel_info[1]; $wget_rst = system("wget -q --spider $kernel_path -T 0.5 -t 3"); if ($wget_rst) { - probe_utils->send_msg("$output", "d", "kernel cannot be downloaded from $kernel_path.") if ($verbose); - $rst_f = 1; - } else { - probe_utils->send_msg("$output", "d", "Check kernel file: $kernel_path PASS.") if ($verbose); + push @errors, "kernel cannot be downloaded from $kernel_path."; + $rst = 1; } - } + } } - } - } else { + } + } + + { # check genesis files for x86_64 arch $genesis_folder = "$tftpdir/xcat/xnba/nets"; unless (-d "$genesis_folder") { - probe_utils->send_msg("$output", "d", "There is no genesis file for $arch. Run 'mknb x86_64' if using x86_64 machine.") if ($verbose); - return 1; + push @errors, "There is no genesis file for x86_64. Run 'mknb x86_64' if using x86_64 machine."; + $rst = 1; + last; } my @host_ip_arr; @@ -169,6 +568,7 @@ sub check_genesis_file { } @genesis_files = glob("$genesis_folder/*"); + foreach (@genesis_files) { if ($_ =~ /uefi$/) { my $file_name = basename($_); @@ -185,14 +585,14 @@ sub check_genesis_file { } unless ($host_ip) { - probe_utils->send_msg("$output", "d", "There is no IP for range $ip_range") if ($verbose); - $rst_f = 1; + push @errors, "There is no IP for range $ip_range"; + $rst = 1; next; } unless (open(FILE, $_)) { - probe_utils->send_msg("$output", "d", "Cannot open file $_."); - $rst_f = 1; + push @errors, "Cannot open file $_."; + $rst = 1; next; } @@ -208,22 +608,19 @@ sub check_genesis_file { $wget_rst = system("wget -q --spider $elilo_efi -T 0.5 -t 3"); if ($wget_rst) { - probe_utils->send_msg("$output", "d", "elilo-x64.efi cannot be downloaded from $elilo_efi.") if ($verbose); - $rst_f = 1; - } else { - probe_utils->send_msg("$output", "d", "Check elilo-x64.efi file: $elilo_efi PASS.") if ($verbose); + push @errors, "elilo-x64.efi cannot be downloaded from $elilo_efi."; + $rst = 1; } my $elilo_http = "http://$host_ip/$elilo_path"; $wget_rst = system("wget -q --spider $elilo_http -T 0.5 -t 3"); if ($wget_rst) { - probe_utils->send_msg("$output", "d", "elilo file cannot be downloaded from $elilo_http.") if ($verbose); - $rst_f = 1; + push @errors, "elilo file cannot be downloaded from $elilo_http."; + $rst = 1; } else { - probe_utils->send_msg("$output", "d", "Check elilo file: $elilo_http PASS.") if ($verbose); unless (open(FILE_ELILO, $elilo_path)) { - probe_utils->send_msg("$output", "d", "Cannot open file $_.") if ($verbose); - $rst_f = 1; + push @errors, "Cannot open file $_."; + $rst = 1; next; } @@ -237,10 +634,8 @@ sub check_genesis_file { $wget_rst = system("wget -q --spider $image_http -T 0.5 -t 3"); if ($wget_rst) { - probe_utils->send_msg("$output", "d", "image cannot be downloaded from $image_http.") if ($verbose); - $rst_f = 1; - } else { - probe_utils->send_msg("$output", "d", "Check image file: $image_http PASS.") if ($verbose); + push @errors, "image cannot be downloaded from $image_http."; + $rst = 1; } } if ($line_elilo =~ /^initrd/) { @@ -250,20 +645,164 @@ sub check_genesis_file { $wget_rst = system("wget -q --spider $initrd_http -T 0.5 -t 3"); if ($wget_rst) { - probe_utils->send_msg("$output", "d", "'initrd' cannot be downloaded from $initrd_http.") if ($verbose); - $rst_f = 1; - } else { - probe_utils->send_msg("$output", "d", "Check initrd file: $initrd_http PASS.") if ($verbose); + push @errors, "'initrd' cannot be downloaded from $initrd_http."; + $rst = 1; } } } } } } + } + } + } + + if ($rst) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", $_) foreach (@errors); + } else { + probe_utils->send_msg("stdout", "o", $msg); + } + + return $rst; +} + +#------------------------------------------ + +=head3 + Description: + 1. check if there are dynamic range for specific networks defineded in dhcp conf file + 2. check if these specific networks have corresponding genesis configuration + Arguments: + networks: Array of networks. Every network is combined by network address and mask(i.e. network/mask). + For example: (10.0.0.0/255.0.0.0, 50.1.0.0/255.255.0.0) + Returns: + 0 : pass + 1 : failed +=cut + +#------------------------------------------ +sub dhcp_dynamic_range_check { + my $nets = shift; + my $rst = 0; + my $msg = "DHCP dynamic range is configured well"; + + my $dhcpconfig; + if (-e "/etc/dhcp/dhcpd.conf") { + $dhcpconfig = "/etc/dhcp/dhcpd.conf"; + } elsif (-e "/etc/dhcp3/dhcpd.conf") { + $dhcpconfig = "/etc/dhcp3/dhcpd.conf"; + } elsif (-e "/etc/dhcpd.conf") { + $dhcpconfig = "/etc/dhcpd.conf"; + } + + unless ($dhcpconfig) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "Cannot find the dhcpd.conf file."); + return 1; + } + + my $config_line; + my $subnet; + my @dynamic_range; + my %subnet_hash; + + unless (open(FILE, $dhcpconfig)) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "Cannot open file $dhcpconfig."); + return 1; + } + + while ($config_line = ) { + chomp($config_line); + $config_line =~ s/^\s+|\s+$//g; + + if ($config_line =~ /^subnet\s+(\d+\.\d+\.\d+\.\d+)\s+netmask\s+(\d+\.\d+\.\d+\.\d+)\s+/) { + $subnet = "$1/$2"; + $subnet_hash{$subnet} = "unknown"; + } + if ($config_line =~ /subnet_end/) { + $subnet_hash{$subnet} = [@dynamic_range] if (@dynamic_range); + $subnet = ""; + @dynamic_range = (); + } + if ($config_line =~ /^range dynamic-bootp (\d+.\d+.\d+.\d+) (\d+.\d+.\d+.\d+)/) { + if (compare_ip_value($1, $2)) { + push @dynamic_range, "$1-$2"; + } else { + push @dynamic_range, "$2-$1"; } } } - return $rst_f; + + my $net_ip; + my $netmask; + my $net_file_p; + my $net_file_x; + my $net_cdir; + my $tftpdir = `lsdef -t site -i tftpdir -c | awk -F "=" '{print \$2}'`; + chomp($tftpdir); + + unless ($tftpdir) { + $tftpdir = "/tftpboot"; + } + + my %node_ip; + if ($noderange) { + %node_ip = get_node_ip(); + } + + my @errors = (); + foreach my $net (@$nets) { + if (!exists($subnet_hash{$net})) { + push @errors, "The net $net is not matched."; + $rst = 1; + next; + } + + if ($subnet_hash{$net} ne "unknown") { + if (%node_ip) { + foreach my $node (keys %node_ip) { + foreach my $dr (@{ $subnet_hash{$net} }) { + my @dr_ip = split(/-/, $dr); + + if (compare_ip_value($dr_ip[0], $node_ip{$node}) and compare_ip_value($node_ip{$node}, $dr_ip[1])) { + push @errors, "$node ip $node_ip{$node} is conflicting with dynamic range."; + $rst = 1; + next; + } + } + } + } + } else { + push @errors, "Dynamic range for net $net is not configured."; + $rst = 1; + next; + } + + ($net_ip, $net_mask) = split('/', $net); + $net_cdir = xCAT::NetworkUtils::formatNetmask($net_mask, 0, 1); + $net_file_p = "$tftpdir/pxelinux.cfg/p/$net_ip" . "_$net_cdir"; + $net_file_x = "$tftpdir/xcat/xnba/nets/$net_ip" . "_$net_cdir.uefi"; + + if (! -e "$net_file_p") { + push @errors, "The default petitboot configuration file $net_file_p for net $net dose not exist."; + $rst = 1; + } + + if (! -e "$net_file_x") { + push @errors, "The default netboot configuration file $net_file_x for net $net dose not exist."; + $rst = 1; + } + } + + if ($rst) { + probe_utils->send_msg("stdout", "f", $msg); + probe_utils->send_msg("stdout", "d", "$_") foreach (@errors); + } else { + probe_utils->send_msg("stdout", "o", $msg); + } + return $rst; } sub get_node_ip { @@ -286,13 +825,13 @@ sub get_node_ip { foreach my $node (keys %nodeip) { $ip_net = xCAT::NetworkUtils->getipaddr($node); if ($nodeip{$node} and ($nodeip{$node} ne $ip_net)) { - probe_utils->send_msg("$output", "d", "IP $nodeip{$node} definition for $node is not correct") if ($verbose); + probe_utils->send_msg("stdout", "d", "IP $nodeip{$node} definition for $node is not correct") if ($verbose); } $nodeip{$node} = $ip_net; } foreach my $node (keys %nodecheckrst) { - probe_utils->send_msg("$output", "d", "$node : $nodecheckrst{$node}{error}") if (exists($nodecheckrst{$node}{error})); + probe_utils->send_msg("stdout", "d", "$node : $nodecheckrst{$node}{error}") if (exists($nodecheckrst{$node}{error})); } return %nodeip; @@ -319,647 +858,7 @@ sub compare_ip_value { =head3 Description: - 1. check if there are dynamic range for specific networks defineded in dhcp conf file - 2. check if these specific networks have corresponding genesis configuration - Arguments: - networks: Array of networks. Every network is combined by network address and mask(i.e. network/mask). - For example: (10.0.0.0/255.0.0.0, 50.1.0.0/255.255.0.0) - Returns: - 0 : pass - 1 : failed -=cut - -#------------------------------------------ -sub dhcp_dynamic_range_check { - my $nets = shift; - my $rst = 0; - - my $dhcpconfig; - if (-e "/etc/dhcp/dhcpd.conf") { - $dhcpconfig = "/etc/dhcp/dhcpd.conf"; - } elsif (-e "/etc/dhcp3/dhcpd.conf") { - $dhcpconfig = "/etc/dhcp3/dhcpd.conf"; - } elsif (-e "/etc/dhcpd.conf") { - $dhcpconfig = "/etc/dhcpd.conf"; - } - - unless ($dhcpconfig) { - probe_utils->send_msg("$output", "d", "Cannot find the dhcpd.conf file.") if ($verbose); - return 1; - } - - my $config_line; - my $subnet; - my @dynamic_range; - my %subnet_hash; - - unless (open(FILE, $dhcpconfig)) { - probe_utils->send_msg("$output", "d", "Cannot open file $dhcpconfig.") if ($verbose); - ($net_ip, $net_mask) = split('/', $net); - return 1; - } - - while ($config_line = ) { - chomp($config_line); - $config_line =~ s/^\s+|\s+$//g; - - if ($config_line =~ /^subnet\s+(\d+\.\d+\.\d+\.\d+)\s+netmask\s+(\d+\.\d+\.\d+\.\d+)\s+/) { - $subnet = "$1/$2"; - $subnet_hash{$subnet} = "unknown"; - } - if ($config_line =~ /subnet_end/) { - $subnet_hash{$subnet} = [@dynamic_range] if (@dynamic_range); - $subnet = ""; - @dynamic_range = ""; - } - if ($config_line =~ /^range dynamic-bootp (\d+.\d+.\d+.\d+) (\d+.\d+.\d+.\d+)/) { - if (compare_ip_value($1, $2)) { - push @dynamic_range, "$1-$2"; - } else { - push @dynamic_range, "$2-$1"; - } - - } - } - - my $net_ip; - my $netmask; - my $netfile; - my $net_cdir; - my $arch = `uname -i`; - chomp($arch); - my $tftpdir = `lsdef -t site -i tftpdir -c | awk -F "=" '{print \$2}'`; - chomp($tftpdir); - - unless ($tftpdir) { - $tftpdir = "/tftpboot"; - } - - my %node_ip; - if ($noderange) { - %node_ip = get_node_ip(); - } - - foreach my $net (@$nets) { - - if (!exists($subnet_hash{$net})) { - probe_utils->send_msg("$output", "d", "The net $net is not matched.") if ($verbose); - $rst = 1; - next; - } - - if ($subnet_hash{$net} ne "unknown") { - probe_utils->send_msg("$output", "d", "Dynamic range for net $net is @{$subnet_hash{$net}}.") if ($verbose); - - if (%node_ip) { - foreach my $node (keys %node_ip) { - foreach my $dr (@{ $subnet_hash{$net} }) { - my @dr_ip = split(/-/, $dr); - - if (compare_ip_value($dr_ip[0], $node_ip{$node}) and compare_ip_value($node_ip{$node}, $dr_ip[1])) { - probe_utils->send_msg("$output", "d", "$node ip $node_ip{$node} is conflicting with dynamic range.") if ($verbose); - $rst = 1; - } - } - } - } - } else { - probe_utils->send_msg("$output", "d", "Dynamic range for net $net is not configured.") if ($verbose); - $rst = 1; - next; - } - - ($net_ip, $net_mask) = split('/', $net); - $net_cdir = xCAT::NetworkUtils::formatNetmask($net_mask, 0, 1); - if ($arch =~ /ppc64/i) { - $net_file = "$tftpdir/pxelinux.cfg/p/$net_ip" . "_$net_cdir"; - } else { - $net_file = "$tftpdir/xcat/xnba/nets/$net_ip" . "_$net_cdir.uefi"; - } - - if (-e "$net_file") { - probe_utils->send_msg("$output", "d", "The genesis file $net_file for net $net exists.") if ($verbose); - } else { - probe_utils->send_msg("$output", "d", "The genesis file $net_file for net $net dose not exist.") if ($verbose); - $rst = 1; - } - } - - return $rst; -} - -#------------------------------------------ - -=head3 - Description: - Handle one line log come from tftp log file - Arguments: - msg: one line tftp log - Returns: - 0 : pass - 1 : failed -=cut - -#------------------------------------------ -sub handle_tftp_msg { - my $msg = shift; - if ($msg =~ /RRQ\s+from\s+(.+)\s+filename\s+(.+)/i) { - my $ip = $1; - my $file = $2; - my $record = "Via TFTP $ip download $file"; - probe_utils->send_msg("$output", "d", "$record"); - if (exists($rawdata{"$ipmacmap{$ip}"})) { - push(@{ $rawdata{ $ipmacmap{$ip} }{"history"} }, $record); - } - } - return 0; -} - -#------------------------------------------ - -=head3 - Description: - Handle one line log come from http log file - Arguments: - msg: one line http log - Returns: - 0 : pass - 1 : failed -=cut - -#------------------------------------------ -sub handle_http_msg { - my $msg = shift; - if ($msg =~ /(\d+\.\d+.\d+.\d+)\s.+GET\s+(.+)\s+HTTP.+/) { - my $ip = $1; - my $file = $2; - my $record = "Via HTTP $ip download $file"; - probe_utils->send_msg("$output", "d", "$record"); - if (exists($rawdata{"$ipmacmap{$ip}"})) { - push(@{ $rawdata{ $ipmacmap{$ip} }{"history"} }, $record); - } - } - return 0; -} - -#------------------------------------------ - -=head3 - Description: - Handle one line log come from dhcp log file - Arguments: - msg: one line http log - nics: target network interfaces - Returns: - 0 : pass - 1 : failed -=cut - -#------------------------------------------ -sub handle_dhcp_msg { - my $msg = shift; - - if ($msg =~ /.+DHCPDISCOVER\s+from\s+(.+)\s+via\s+([^:]+)(.*)/i) { - my $mac = $1; - my $nic = $2; - if ($3 =~ /no free leases/) { - probe_utils->send_msg("$output", "d", "Receive DHCPDISCOVER from $mac via $nic, no free leases"); - return 0; - } - my $record = "Receive DHCPDISCOVER from $mac via $nic"; - probe_utils->send_msg("$output", "d", "$record"); - push(@{ $rawdata{$mac}{"history"} }, $record); - } elsif ($msg =~ /.+DHCPOFFER\s+on\s+(.+)\s+to\s+(.+)\s+via\s+(.+)/i) { - my $ip = $1; - my $mac = $2; - my $nic = $3; - my $record = "Send DHCPOFFER on $ip back to $mac via $nic"; - probe_utils->send_msg("$output", "d", "$record"); - if (exists($rawdata{$mac})) { - push(@{ $rawdata{$mac}{"history"} }, $record); - } - } elsif ($msg !~ /unknown lease/ && $msg !~ /ignored/ && $msg =~ /.+DHCPREQUEST\s+for\s+(.+)\s\((.+)\)\s+from\s+(.+)\s+via\s+(.+)/) { - my $ip = $1; - my $server = $2; - my $mac = $3; - my $nic = $4; - my $record = "Receive DHCPREQUEST from $mac for $ip via $nic"; - probe_utils->send_msg("$output", "d", "$record"); - if (exists($rawdata{$mac})) { - push(@{ $rawdata{$mac}{"history"} }, $record); - } - } elsif ($msg =~ /.+DHCPACK\s+on\s+(.+)\s+to\s+(.+)\s+via\s+(.+)/) { - my $ip = $1; - my $mac = $2; - my $nic = $3; - my $record = "Send DHCPACK on $ip back to $mac via $nic"; - probe_utils->send_msg("$output", "d", "$record"); - if (exists($rawdata{$mac})) { - $rawdata{$mac}{"ip"} = $ip; - push(@{ $rawdata{$mac}{"history"} }, $record); - $ipmacmap{$ip} = $mac; - } - } elsif ($msg =~ /.+BOOTREQUEST\s+from\s+(.+)\s+via\s+([^:]+)(.*)/) { - my $mac = $1; - my $nic = $2; - if ($3 =~ /no dynamic leases/) { - probe_utils->send_msg("$output", "d", "Receive DHCPDISCOVER from $mac via $nic, no dynamic leases"); - return 0; - } - my $record = "Receive BOOTREQUEST from $mac via $nic"; - probe_utils->send_msg("$output", "d", "$record"); - push(@{ $rawdata{$mac}{"history"} }, $record); - } elsif ($msg =~ /.+BOOTREPLY\s+for\s+(.+)\s+to\s+.+(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w).+via\s+(.+)/) { - my $ip = $1; - my $mac = $2; - my $nic = $3; - my $record = "Send BOOTREPLY on $ip back to $mac via $nic"; - probe_utils->send_msg("$output", "d", "$record"); - if (exists($rawdata{$mac})) { - $rawdata{$mac}{"ip"} = $ip; - push(@{ $rawdata{$mac}{"history"} }, $record); - $ipmacmap{$ip} = $mac; - } - } - return 0; -} - -#------------------------------------------ - -=head3 - Description: - Handle one line log come from computes.log - Arguments: - msg: one line compute log - Returns: - 0 : pass - 1 : failed -=cut - -#------------------------------------------ -sub handle_compute_msg { - - my $line = shift; - my $sender = ""; - my $ip = ""; - my $msg; - - my @splitline = split(/\s+/, $line); - if (($splitline[4] =~ /^xcat/i) || ($splitline[5] =~ /^xcat/i)) { - $sender = $splitline[3]; - if (($splitline[4] =~ /^xcat/i) && ($splitline[5] !~ /^xcat/i)) { - splice(@splitline, 0, 4); - } else { - splice(@splitline, 0, 5); - } - $msg = join(" ", @splitline); - - if (!xCAT::NetworkUtils->isIpaddr($sender)) { - $ip = xCAT::NetworkUtils->getipaddr($sender); - } else { - $ip = $sender; - } - - if ($ip ne "" && defined($ipmacmap{$ip})) { - my $record = "Recv from $ip : $msg"; - probe_utils->send_msg("$output", "d", "$record"); - push(@{ $rawdata{ $ipmacmap{$ip} }{"history"} }, $record); - } - - # There is a node finish discovry process - if ($msg =~ /xcat.genesis.dodiscovery: Restart/) { - my $node = `lsdef -i mac -c 2>&1 | awk -F: '/$ipmacmap{$ip}/ {print \$1}'`; - chomp($node); - $monitor_nodes{$node} = 1 if (defined($monitor_nodes{$node})); - probe_utils->send_msg("$output", "o", "Node $node has finished its discovery process"); - my $output = `lsdef $node 2>&1`; - print "-------------------\n$output-------------------\n"; - } - } - return 0; -} - -#------------------------------------------ - -=head3 - Description: - Handle one line log come from cluster.log - Arguments: - msg: one line log - Returns: - 0 : pass - 1 : failed -=cut - -#------------------------------------------ -sub handle_cluster_msg { - my $line = shift; - my $sender = ""; - my $ip = ""; - my $msg; - - my @splitline = split(/\s+/, $line); - if (($splitline[4] =~ /^xcat/i) || ($splitline[5] =~ /^xcat/i)) { - if (($splitline[5] =~ /^xcat.discovery/i) && ($splitline[6] =~ /^\((.+)\)$/)) { - my $mac = $1; - if (xCAT::NetworkUtils->isValidMAC($mac) && defined($rawdata{$mac})) { - splice(@splitline, 0, 5); - splice(@splitline, 1, 1); - $msg = join(" ", @splitline); - if (defined($rawdata{$mac}{"ip"})) { - $record = "Recv from $rawdata{$mac}{ip} : $msg"; - } else { - $record = "Recv from $mac : $msg"; - } - probe_utils->send_msg("$output", "d", "$record"); - push(@{ $rawdata{$mac}{"history"} }, $record); - } - } - } - return 0; -} - -#------------------------------------------ - -=head3 - Description: - Dump monitor history, categorised by mac address. - Arguments: - NULL - Returns: -=cut - -#------------------------------------------ -sub dump_history { - - my $title = " -============================================================= -= The summary of discovery: -============================================================= -"; - print "$title\n"; - - foreach $mac (keys %rawdata) { - my $nodehostname = `lsdef -i mac -c 2>&1 | awk -F: '/$mac/ {print \$1}'`; - chomp($nodehostname); - if ($nodehostname ne "") { - probe_utils->send_msg("$output", "d", "[$mac ($nodehostname)]"); - } else { - probe_utils->send_msg("$output", "d", "[$mac]:"); - } - foreach my $line (@{ $rawdata{$mac}{"history"} }) { - probe_utils->send_msg("$output", "d", "\t$line"); - } - print "\n"; - } -} - -#------------------------------------------ - -=head3 - Description: - Check if all predefined node are valid - Arguments: - discovery_type: valid value are mtms and switch - noderange: node range - Returns: - 0: pass - 1: failed -=cut - -#------------------------------------------ -sub check_pre_defined_node { - my $discovery_type = shift; - my $noderange = shift; - - my $rst = 0; - my @cmdoutput; - my %nodecheckrst; - my $currentnode = ""; - - @cmdoutput = `lsdef $noderange 2>&1`; - foreach (@cmdoutput) { - if ($_ =~ /^Error: Could not find an object named '(\w+)' .+/i) { - $currentnode = $1; - $nodecheckrst{$currentnode}{"error"} = "Could not find node definition"; - $rst = 1; - } elsif ($_ =~ /^\s*Object name: (\w+)/i) { - $currentnode = $1; - $monitor_nodes{$1} = 0; - } elsif ($_ =~ /^\s+(\w+)\s*=\s*(\w+)/) { - $nodecheckrst{$currentnode}{$1} = $2; - } - } - - #print Dumper(%nodecheckrst); - - foreach my $node (keys %nodecheckrst) { - if (!exists($nodecheckrst{$node}{error})) { - if ($discovery_type eq "mtms") { - if (!(exists($nodecheckrst{$node}{"mtm"}) && exists($nodecheckrst{$node}{"serial"}))) { - $nodecheckrst{$node}{"error"} = "Node definition is wrong for '$discovery_type' type discovery"; - $rst = 1; - } - } elsif ($discovery_type eq "switch") { - { #important to hold a block - if (!(exists($nodecheckrst{$node}{"switch"}) && exists($nodecheckrst{$node}{"switchport"}))) { - $nodecheckrst{$node}{"error"} = "Atrribute 'switch' or 'switchport' isn't defined for '$discovery_type' type discovery"; - $rst = 1; - last; - } - - my $tmpoutput = `lsdef $nodecheckrst{$node}{"switch"} 2>&1`; - if ($?) { - $nodecheckrst{$node}{"error"} = "Missing definition for related switch $nodeswitch"; - $rst = 1; - last; - } - - if ($tmpoutput !~ /snmpversion=/) { - $nodecheckrst{$node}{"error"} = "Missing attribute 'snmpversion' definition for related switch $nodeswitch"; - $rst = 1; - last; - } - if ($tmpoutput !~ /username=/) { - $nodecheckrst{$node}{"error"} = "Missing attribute 'username' definition for related switch $nodeswitch"; - $rst = 1; - last; - } - if ($tmpoutput !~ /password=/) { - $nodecheckrst{$node}{"error"} = "Missing attribute 'password' definition for related switch $nodeswitch"; - $rst = 1; - last; - } - } - } - } - } - - foreach my $node (keys %nodecheckrst) { - probe_utils->send_msg("$output", "d", "$node : $nodecheckrst{$node}{error}") if (exists($nodecheckrst{$node}{error})); - } - - return $rst; -} - -#------------------------------------------ - -=head3 - Description: - Test if all nodes have finished job - Arguments: - One golble attribute %monitor_nodes; - Returns: -=cut - -#------------------------------------------ -sub all_monitor_node_done { - my $done = 1; - foreach my $node (keys %monitor_nodes) { - if ($monitor_nodes{$node} == 0) { - $done = 0; - last; - } - } - return $done; -} - -#------------------------------------------ - -=head3 - Description: - Do pre_checking - Arguments: - nics: target network interface - if not specified, using the network which master belongs to - Returns: - 0: pass - 1: failed -=cut - -#------------------------------------------ -sub do_pre_check { - my $nics = shift; - my @nets = (); - my $rst = 0; - my $msg; - - #The block of $nics is ture is a reservation part, this part don't show up in usage - if ($nics) { - if ($nics =~ /[^\w|]/) { - probe_utils->send_msg("$output", "f", "Invalid NIC list"); - probe_utils->send_msg("$output", "d", "$::USAGE"); - exit 1; - } - - $msg = "The input network interfaces $nics exist and are configured correctly on current server"; - my $miss = 0; - my @nic_array = split(",", $nics); - foreach my $nic (@nic_array) { - my $tmp_nic = `ip addr show $nic >/dev/null 2>&1`; - if ($?) { - probe_utils->send_msg("$output", "d", "Network interface $nic doesn't exist on current server") if ($verbose); - $miss = 1; - } else { - my $tmp = `echo $tmp_nic |awk -F" " '/inet / {print \$2}'`; - chomp($tmp); - if (!length($tmp)) { - probe_utils->send_msg("$output", "d", "Network interface $nic isn't set IP address") if ($verbose); - $miss = 1; - } else { - my ($ip, $mask) = split("/", $tmp); - my $strmask = xCAT::NetworkUtils::formatNetmask($mask, 1, 0); - push(@nets, probe_utils->get_network($ip, $strmask)); - } - } - } - if ($miss) { - probe_utils->send_msg("$output", "f", $msg); - $rst = 1; - } else { - probe_utils->send_msg("$output", "o", $msg); - } - } else { - $msg = "Attribute 'master' in 'site' table is configured well"; - my $masteripinsite = `tabdump site | awk -F',' '/^"master",/ { gsub(/"/, "", \$2) ; print \$2 }'`; - chomp($masteripinsite); - if ($masteripinsite eq "") { - probe_utils->send_msg("$output", "d", "There isn't 'master' definition in 'site' table") if ($verbose); - probe_utils->send_msg("$output", "f", $msg); - exit 1; - } - - if (!xCAT::NetworkUtils->isIpaddr("$masteripinsite")) { - probe_utils->send_msg("$output", "d", "The value of 'master' in 'site' table isn't an IP address") if ($verbose); - probe_utils->send_msg("$output", "f", $msg); - exit 1; - } - my $tmpoutput = `ip addr 2>&1 |grep $masteripinsite`; - if ($?) { - probe_utils->send_msg("$output", "d", "The IP $masteripinsite of 'master' in 'site' table dosen't belong to any network on current server") if ($verbose); - probe_utils->send_msg("$output", "f", $msg); - exit 1; - } - probe_utils->send_msg("$output", "o", $msg); - - chomp($tmpoutput); - my $tmp = `echo $tmpoutput | awk -F" " '{print \$2}'`; - chomp($tmp); - my ($ip, $mask) = split("/", $tmp); - my $strmask = xCAT::NetworkUtils::formatNetmask($mask, 1, 0); - push(@nets, probe_utils->get_network($ip, $strmask)); - } - - my $arch = `uname -i`; - chomp($arch); - $msg = "Genesis files for $arch are available"; - if ($arch =~ /ppc64/i) { - if (check_genesis_file("ppc64")) { - probe_utils->send_msg("$output", "f", $msg); - $rst = 1; - } else { - probe_utils->send_msg("$output", "o", $msg); - if (check_genesis_file("x86_64")) { - probe_utils->send_msg("$output", "w", "Genesis files for x86 are not available"); - probe_utils->send_msg("$output", "i", "Ignore above warning if not planning on managing x86 server"); - } else { - probe_utils->send_msg("$output", "o", "Genesis files for x86 are available"); - } - } - } elsif ($arch =~ /x86/i) { - if (check_genesis_file("x86_64")) { - probe_utils->send_msg("$output", "f", $msg); - $rst = 1; - } else { - probe_utils->send_msg("$output", "o", $msg); - if (check_genesis_file("ppc64")) { - probe_utils->send_msg("$output", "w", "Genesis files for ppc64/ppc64le are not available"); - probe_utils->send_msg("$output", "i", "ignore above warning if not planning on managing ppc64/ppc64le server"); - } else { - probe_utils->send_msg("$output", "o", "Genesis files for ppc64/ppc64le are available"); - } - } - } - - $msg = "DHCP dynamic range is configured well"; - if (dhcp_dynamic_range_check(\@nets)) { - probe_utils->send_msg("$output", "f", $msg); - $rst = 1; - } else { - probe_utils->send_msg("$output", "o", $msg); - } - - return $rst; -} - -#------------------------------------------ - -=head3 - Description: - Monitor the process of discovery - Arguments: - nics: target network interface - if not specified, using the network which master belongs to + Monitor the process of discovery Returns: 0: pass 1: failed @@ -967,22 +866,13 @@ sub do_pre_check { #------------------------------------------ sub do_monitor { + my $rst = 0; + my $terminal = 0; $SIG{TERM} = $SIG{INT} = sub { $terminal = 1; }; - if (!$nics) { - my $masteripinsite = `tabdump site | awk -F',' '/^"master",/ { gsub(/"/, "", \$2) ; print \$2 }'`; - chomp($masteripinsite); - $nics = `ip addr |grep -B2 $masteripinsite|awk -F" " '/mtu/{gsub(/:/,"",\$2); print \$2}'`; - chomp($nics); - if (!$nics) { - probe_utils->send_msg("$output", "f", "The value of 'master' in 'site' table is $masteripinsite, can't get corresponding network interface"); - return 1; - } - } - my $startline = " ------------------------------------------------------------- ___ @@ -993,183 +883,659 @@ sub do_monitor { /_/\\_\\\\____/_/ \\_\\_| .+|______|__.-||__)`-'(((/ (((/ ------------------------------------------------------------- "; - print "$startline\nStart capturing every message during discovery process......\n"; - my $varlogmsg = "/var/log/messages"; - my $clusterlog = "/var/log/xcat/cluster.log"; - my $computelog = "/var/log/xcat/computes.log"; + probe_utils->send_msg("stdout", "", "$startline\nStart capturing every message during discovery process......\n"); - #http logs are saved in different file in different distro - my $httplog; - if (-e "/var/log/httpd/access_log") { - $httplog = "/var/log/httpd/access_log"; - } elsif (-e "/var/log/apache2/access_log") { - $httplog = "/var/log/apache2/access_log"; - } elsif (-e "/var/log/apache2/access.log") { - $httplog = "/var/log/apache2/access.log"; - } + my @openfilepids; + my @openfilefds; + my %fd_filetype_map; - my $clusterpid; - my $httppid; - my $computerpid; - my $varlogpid; - my $rst = 0; - { #important to hold a block - if (!-e "$varlogmsg") { - probe_utils->send_msg("$output", "w", "$varlogmsg doesn't exist"); - } - if (!-e "$clusterlog") { - probe_utils->send_msg("$output", "w", "$clusterlog doesn't exist"); - } - if (!-e "$computelog") { - probe_utils->send_msg("$output", "w", "$computelog doesn't exist"); - } - if (!-e "$httplog") { - probe_utils->send_msg("$output", "w", "$httplog doesn't exist"); + { #a very important brace to hold a code block + my $log_parse = LogParse->new($verbose); + my $candidate_log_ref = $log_parse->obtain_log_file_list(); + + #open candidate log file to obtain realtime log + if (%$candidate_log_ref) { + foreach my $logfile (keys %$candidate_log_ref) { + my $pid; + my $fd; + if (!($pid = open($fd, "tail -f -n 0 $candidate_log_ref->{$logfile}{file} 2>&1 |"))) { + probe_utils->send_msg("stdout", "f", "Can't open $candidate_log_ref->{$logfile}{file} to get logs"); + $rst = 1; + last; + } else { + push @openfilepids, $pid; + push @openfilefds, $fd; + $fd_filetype_map{$fd} = $candidate_log_ref->{$logfile}{type}; + } + } + } else { + probe_utils->send_msg("stdout", "f", "There are no valid log files to be scanned"); + $rst = 1; } - # start ot obtain logs from every log file - if (!($varlogpid = open(VARLOGMSGFILE, "tail -f -n 0 $varlogmsg 2>&1 |"))) { - probe_utils->send_msg("$output", "f", "Can't open $varlogmsg to get logs"); - $rst = 1; - last; - } - if (!($clusterpid = open(CLUSTERLOGFILE, "tail -f -n 0 $clusterlog 2>&1 |"))) { - probe_utils->send_msg("$output", "f", "Can't open $clusterlog to get logs"); - $rst = 1; - last; - } - if (!($httppid = open(HTTPLOGFILE, "tail -f -n 0 $httplog 2>&1 |"))) { - probe_utils->send_msg("$output", "f", "Can't open $httplog to get logs"); - $rst = 1; - last; - } - if (!($computerpid = open(COMPUTERFILE, "tail -f -n 0 $computelog 2>&1 |"))) { - probe_utils->send_msg("$output", "f", "Can't open $computelog to get logs"); - $rst = 1; - last; - } + last if ($rst); + + my %node_state; + init_node_state($noderange, \%node_state); my $select = new IO::Select; - $select->add(\*VARLOGMSGFILE); - $select->add(\*CLUSTERLOGFILE); - $select->add(\*HTTPLOGFILE); - $select->add(\*COMPUTERFILE); + $select->add(\*$_) foreach (@openfilefds); $| = 1; - my $line = ""; my @hdls; - my $hdl; + my $starttime = time(); + my @candidate_mn_hostname_in_log = $log_parse->obtain_candidate_mn_hostname_in_log(); + + #read log realtimely, then handle each log for (; ;) { if (@hdls = $select->can_read(0)) { - foreach $hdl (@hdls) { - if ($hdl == \*VARLOGMSGFILE) { - chomp($line = ); - my @tmp = split(/\s+/, $line); - if ($tmp[4] =~ /dhcpd:/i && $line =~ /$nics/) { - handle_dhcp_msg("$line"); - } elsif ($tmp[4] =~ /in.tftpd/i) { - handle_tftp_msg("$line"); - } - } elsif ($hdl == \*CLUSTERLOGFILE) { - chomp($line = ); - handle_cluster_msg("$line"); - } elsif ($hdl == \*HTTPLOGFILE) { - chomp($line = ); - handle_http_msg("$line"); - } elsif ($hdl == \*COMPUTERFILE) { - chomp($line = ); - handle_compute_msg("$line"); - } + foreach my $hdl (@hdls) { + my $line = ""; + chomp($line = <$hdl>); + my $log_content_ref = $log_parse->obtain_log_content($fd_filetype_map{$hdl}, $line); + dispatch_log_to_handler($log_content_ref, \@candidate_mn_hostname_in_log, \%node_state); } } - if ($terminal || (%monitor_nodes && all_monitor_node_done())) { - if ($terminal) { - probe_utils->send_msg("$output", "d", "Got from STDIN"); - } else { - probe_utils->send_msg("$output", "o", "All nodes specified to monitor have finished discovery process"); - } + # stop reading log at below 3 scenarios + # 1 receive terminal signal from customer + if ($terminal) { + probe_utils->send_msg("stdout", "d", "Get INT or TERM signal from STDIN"); last; + + # 2 all node have finished the discovery + } elsif (all_monitor_node_done(\%node_state)) { + probe_utils->send_msg("stdout", "o", "All nodes specified to monitor, have finished discovery process"); + last; + + # 3 exceed the max waiting time + } elsif (time() - $starttime > ($maxwaittime * 60)) { + probe_utils->send_msg("stdout", "i", "$maxwaittime minutes have expired, stop monitoring"); + last; + } else { + sleep 0.01; } - sleep 0.01; } - &dump_history; + + conclusion_report(\%node_state); + $log_parse->destory(); } - kill 'INT', $clusterpid if ($clusterpid); - kill 'INT', $httppid if ($httppid); - kill 'INT', $computerpid if ($computerpid); - kill 'INT', $varlogpid if ($varlogpid); - close(VARLOGMSGFILE) if (VARLOGMSGFILE); - close(CLUSTERLOGFILE) if (CLUSTERLOGFILE); - close(COMPUTERFILE) if (COMPUTERFILE); - close(HTTPLOGFILE) if (HTTPLOGFILE); + # close all running sub process + my $existrunningpid = 0; + $existrunningpid = 1 if (@openfilepids); + my $trytime = 0; + while ($existrunningpid) { + + #send terminal signal to all running process at same time + if ($try < 5) { #try INT 5 up to 5 times + foreach my $pid (@openfilepids) { + kill 'INT', $pid if ($pid); + } + } elsif ($try < 10) { #try TERM 5 up to 5 times + foreach my $pid (@openfilepids) { + kill 'TERM', $pid if ($pid); + } + } else { #try KILL 1 time + foreach my $pid (@openfilepids) { + kill 'KILL', $pid if ($pid); + } + } + ++$try; + sleep 1; + + #To check how many process exit, set the flag of exited process to 0 + for (my $i = 0 ; $i <= $#openfilepids ; $i++) { + $openfilepids[$i] = 0 if (waitpid($openfilepids[$i], WNOHANG)); + } + + #To check if there are processes still running, if there are, try kill again in next loop + $existrunningpid = 0; + $existrunningpid |= $_ foreach (@openfilepids); + + #just try 10 times, if still can't kill some process, give up + if ($try > 10) { + my $leftpid; + foreach my $pid (@openfilepids) { + $leftpid .= "$pid " if ($pid); + } + probe_utils->send_msg("stdout", "d", "Can't stop process $leftpid, please handle manually."); + last; + } + } + + # close all openning file descriptors + close($_) foreach (@openfilefds); return $rst; } -#------------------------------------- -## main process -#------------------------------------- -if ( - !GetOptions("--help|h|?" => \$help, - "T" => \$test, - "V" => \$verbose, - "--noprecheck" => \$no_pre_check, - "m=s" => \$discovery_type, - "n=s" => \$noderange, - "N=s" => \$nics)) #option N is a reservation option, dosen't show up in usage now -{ - probe_utils->send_msg("$output", "f", "Invalid parameter for $program_name"); - probe_utils->send_msg("$output", "d", "$::USAGE"); - exit 1; +#------------------------------------------ + +=head3 + Description: + Implement the replay feature. + Arguments: + start_time_of_replay: the start time point of scaning log + end_time_of_replay: the end time point of scaning log + + Returns: + 0: success + 1: failed +=cut + +#------------------------------------------ +sub do_replay { + my $start_time_of_replay = shift; + my $end_time_of_replay = shift; + + my $rc = 0; + + #handle INT/TERM signal + my $terminal = 0; + $SIG{TERM} = $SIG{INT} = sub { + $terminal = 1; + }; + + my $timestr = scalar(localtime($start_time_of_replay)); + probe_utils->send_msg("stdout", "d", "Starting to scan logs which are later than '$timestr', please waiting for a while............."); + + my %node_state; + init_node_state($noderange, \%node_state); + if ($debug) { + print "Dumper node_state-------\n"; + print Dumper \%node_state; + } + + my $log_parse = LogParse->new($verbose); + my @candidate_mn_hostname_in_log = $log_parse->obtain_candidate_mn_hostname_in_log(); + + while ($start_time_of_replay < $end_time_of_replay) { + my @valid_one_second_log_set; + my $rst = $log_parse->obtain_one_second_logs($start_time_of_replay, \@valid_one_second_log_set); + if ($rst) { + probe_utils->send_msg("stdout", "d", "Failed to obtain logs from log files"); + $rc = 1; + last; + } + + foreach my $log_ref (@valid_one_second_log_set) { + dispatch_log_to_handler($log_ref, \@candidate_mn_hostname_in_log, \%node_state); + } + + $start_time_of_replay = $log_parse->obtain_next_second(); + + # receive terminal signal from customer + if ($terminal) { + probe_utils->send_msg("stdout", "d", "Get INT or TERM signal!!!"); + probe_utils->send_msg("stdout", "w", "Haven't scaned all valid logs, report based on the logs have been scaned"); + last; + } + } + $log_parse->destory(); + + conclusion_report(\%node_state); + return $rc; } -if ($help) { - if ($output ne "stdout") { - probe_utils->send_msg("$output", "d", "$::USAGE"); +#------------------------------------------ + +=head3 + Description: + Initailize a very important hash "%node_state" which will save the state information of every node + Arguments: + noderange: (input attribute) The range of node + node_state_ref: (output attribute) the reference of hash "%node_state" + The strucuture of hash "%node_state" are : + $node_state{}{statehistory} Array. save the latest loop discovery states + $node_state{}{allstatehistory} Array. save the history states before the latest loop discovery. Used in debug mode. + $node_state{}{log} Array. save all related logs of mac. Used in debug mode. + $node_state{}{id} Scalar. the node related withe the mac. + $node_state{}{type} Scalar. the flag of if the node have finished the discovery + Returns: + NULL +=cut + +#------------------------------------------ +sub init_node_state { + my $noderange = shift; + my $node_state_ref = shift; + + my @nodes = probe_utils->parse_node_range($noderange); + foreach my $node (@nodes) { + $node_state_ref->{$node}{type} = "node"; + $node_state_ref->{$node}{done} = 0; + } +} + +#------------------------------------------ + +=head3 + Description: + Dispatch log to related handler + Arguments: + log_ref: (input attribute) the reference of hash which save one line log comes from computes.log. + candidate_mn_hostname_in_log_ref: (input attribute) The reference of array which save the candidate host name of MN + node_state_ref: (output attribute), the reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + NULL +=cut + +#------------------------------------------ +sub dispatch_log_to_handler { + my $log_ref = shift; + my $candidate_mn_hostname_in_log_ref = shift; + my $node_state_ref = shift; + + if ($log_ref->{label} == $::LOGLABEL_DHCPD) { + handle_dhcp_msg($log_ref, $node_state_ref); + } elsif ($log_ref->{label} == $::LOGLABEL_TFTP) { + handle_tftp_msg($log_ref, $node_state_ref); + } elsif ($log_ref->{label} == $::LOGLABEL_XCAT or $log_ref->{label} == $::LOGLABEL_DOXCAT or $log_ref->{label} == $::LOGLABEL_DISCOVERY) { + if (grep(/$log_ref->{sender}/, @$candidate_mn_hostname_in_log_ref)) { + handle_cluster_msg($log_ref, $node_state_ref); + } else { + handle_compute_msg($log_ref, $node_state_ref); + } + } elsif ($log_ref->{label} == $::LOGLABEL_HTTP) { + handle_http_msg($log_ref, $node_state_ref); + } +} + +#------------------------------------------ + +=head3 + Description: + Handle one line DHCP log + Arguments: + log_ref: (input attribute) the reference of hash which save one line dhcp log. + node_state_ref: (output attribute), the reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + NULL +=cut + +#------------------------------------------ +sub handle_dhcp_msg { + my $log_ref = shift; + my $node_state_ref = shift; + + if ($log_ref->{msg} =~ /DHCPDISCOVER\s+from\s+(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w).+via\s+([^:]+)(.*)/i) { + my $mac = $1; + my $nic = $2; + + if ($3 =~ /no free leases/) { + probe_utils->send_msg("stdout", "d", "[$mac] Receive DHCPDISCOVER from $mac via $nic, no free leases") if ($monitor); + return 0; + } + my $record = "Receive DHCPDISCOVER from $mac via $nic"; + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + } elsif ($log_ref->{msg} =~ /DHCPOFFER\s+on\s+(.+)\s+to\s+(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w).+via\s+(.+)/i) { + my $ip = $1; + my $mac = $2; + my $nic = $3; + my $record = "Send DHCPOFFER on $ip back to $mac via $nic"; + + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + } elsif ($log_ref->{msg} =~ /DHCPREQUEST\s+for\s+(.+)\s+[\(\)0-9\.]*\s*from\s+(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w).+via\s+(.+)/) { + my $ip = $1; + my $mac = $2; + my $nic = $3; + my $record = "Receive DHCPREQUEST from $mac for $ip via $nic"; + + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + } elsif ($log_ref->{msg} =~ /DHCPACK\s+on\s+(.+)\s+to\s+(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w).+via\s+(.+)/) { + my $ip = $1; + my $mac = $2; + my $nic = $3; + my $record = "Send DHCPACK on $ip back to $mac via $nic"; + + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + $ipmacmap{$ip} = $mac; + $node_state_ref->{$mac}{type} = "mac"; + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_DHCP); + } elsif ($log_ref->{msg} =~ /BOOTREQUEST\s+from\s+(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w).+via\s+([^:]+)(.*)/) { + my $mac = $1; + my $nic = $2; + if ($3 =~ /no dynamic leases/) { + probe_utils->send_msg("stdout", "d", "Receive DHCPDISCOVER from $mac via $nic, no free leases") if ($monitor); + return 0; + } + my $record = "Receive BOOTREQUEST from $mac via $nic"; + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + } elsif ($log_ref->{msg} =~ /BOOTREPLY\s+for\s+(.+)\s+to\s+.+(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w).+via\s+(.+)/) { + my $ip = $1; + my $mac = $2; + my $nic = $3; + my $record = "Send BOOTREPLY on $ip back to $mac via $nic"; + + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + $ipmacmap{$ip} = $mac; + $node_state_ref->{$mac}{type} = "mac"; + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_DHCP); + } +} + +#------------------------------------------ + +=head3 + Description: + Handle one line TFTP log + Arguments: + log_ref: (input attribute) the reference of hash which save one line TFTP log. + node_state_ref: (output attribute), the reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + NULL +=cut + +#------------------------------------------ +sub handle_tftp_msg { + my $log_ref = shift; + my $node_state_ref = shift; + + if ($log_ref->{msg} =~ /RRQ\s+from\s+(.+)\s+filename\s+(.+)/i) { + my $ip = $1; + my $file = $2; + my $mac = $ipmacmap{$ip}; + + if (exists($node_state_ref->{$mac})) { + my $record = "Via TFTP $ip download $file"; + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + + if ($file =~ /\/pxelinux.cfg\//i or $file =~ /\/xcat\/xnba\/nets\//i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_BOOTLODER); + } elsif ($file =~ /genesis\.kernel/i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_KERNEL); + } elsif ($file =~ /genesis\.fs/i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_INITRD); + } + } + } +} + +#------------------------------------------ + +=head3 + Description: + Handle one line HTTP log + Arguments: + log_ref: (input attribute) the reference of hash which save one line HTTP log. + node_state_ref: (output attribute), the reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + NULL +=cut + +#------------------------------------------ +sub handle_http_msg { + my $log_ref = shift; + my $node_state_ref = shift; + my $ip = $log_ref->{sender}; + my $mac = $ipmacmap{$ip}; + + if (exists($node_state_ref->{$mac})) { + if ($log_ref->{msg} =~ /GET\s+(.+)\s+HTTP.+/ or $log_ref->{msg} =~ /HEAD\s+(.+)\s+HTTP.+/) { + my $file = $1; + my $record = "Via HTTP $ip get $file"; + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + + if ($file =~ /\/pxelinux.cfg\//i or $file =~ /\/xcat\/xnba\/nets\//i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_BOOTLODER); + } elsif ($file =~ /genesis\.kernel/i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_KERNEL); + } elsif ($file =~ /genesis\.fs/i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_INITRD); + } + } + } +} + +#------------------------------------------ + +=head3 + Description: + Handle one line log comes from cluster.log + Arguments: + log_ref: (input attribute) the reference of hash which save one line log comes from cluster.log. + node_state_ref: (output attribute), the reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + NULL +=cut + +#------------------------------------------ +sub handle_cluster_msg { + my $log_ref = shift; + my $node_state_ref = shift; + my $log_msg = $log_ref->{msg}; + + if ($log_ref->{msg} =~ /xcat.discovery.$discovery_type: \((.+)\) Found node: (.+)/) { + my $mac = $1; + my $node = $2; + $node_state_ref->{$mac}{id} = $node; + $node_state_ref->{$node}{id} = $mac; + my $record = "Start to update node information"; + probe_utils->send_msg("stdout", "d", "[$mac] $record") if ($monitor); + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_UPDATE); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + } elsif ($log_ref->{msg} =~ /xcat.discovery.$discovery_type: \((.+)\) Warning: Could not find any nodes using (.+) discovery/i) { + my $mac = $1; + my $type = $2; + probe_utils->send_msg("stdout", "w", "[$mac] Could not find any nodes using $type discovery") if ($monitor); + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_FAILED); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + } +} + +#------------------------------------------ + +=head3 + Description: + Handle one line log comes from computes.log + Arguments: + log_ref: (input attribute) the reference of hash which save one line log comes from computes.log. + node_state_ref: (output attribute), the reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + NULL +=cut + +#------------------------------------------ +sub handle_compute_msg { + my $log_ref = shift; + my $node_state_ref = shift; + my $ip = $log_ref->{sender}; + my $mac = $ipmacmap{$ip}; + + if (exists $node_state_ref->{$mac}) { + probe_utils->send_msg("stdout", "d", "[$mac] ($ip) $log_ref->{msg}") if ($monitor); + push(@{ $node_state_ref->{$mac}{log} }, $log_ref->{msg}) if ($debug); + + if ($log_ref->{label} == $::LOGLABEL_DOXCAT) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_DOXCAT); + } elsif ($log_ref->{label} == $::LOGLABEL_DISCOVERY) { + if ($log_ref->{msg} =~ /Beginning node discovery process/i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_DISCOVERY); + } elsif ($log_ref->{msg} =~ /Sending the discovery packet to xCAT/i) { + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_REPORT); + } elsif ($log_ref->{msg} =~ /Restart network interfaces/i) { + my $node = ""; + if (exists ($node_state_ref->{$mac}{id})) { + $node = $node_state_ref->{$mac}{id}; + } else { + $node = `lsdef -i mac -c 2>&1 | awk -F: '/$mac/ {print \$1}'`; + chomp($node); + $node_state_ref->{$mac}{id} = $node; + $node_state_ref->{$node}{id} = $mac; + } + if ($node ne "") { + $node_state_ref->{$node}{done} = 1; + probe_utils->send_msg("stdout", "o", "[$mac] node $node discovery completed") if ($monitor); + set_node_state($node_state_ref, $mac, $::STATE_DISCOVER_COMPLETED); + } + } + } + } +} + +#------------------------------------------ + +=head3 + Description: + Set node state in hash %node_state + Arguments: + node_state_ref: (input/output attribute), the reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + node : (input attribute) The node name + newstate : (input attribute) The new state of node + Returns: + NULL +=cut + +#------------------------------------------ +sub set_node_state { + my $node_state_ref = shift; + my $node = shift; + my $newstate = shift; + + if ($newstate == $::STATE_DISCOVER_BOOTLODER) { + pop(@{ $node_state_ref->{$node}{statehistory} }); + push @{ $node_state_ref->{$node}{allstatehistory} }, @{ $node_state_ref->{$node}{statehistory} }; + @{ $node_state_ref->{$node}{statehistory} } = (); + push @{ $node_state_ref->{$node}{statehistory} }, $::STATE_DISCOVER_DHCP; + push @{ $node_state_ref->{$node}{statehistory} }, $newstate; } else { - print "$::USAGE"; - } - exit 0; -} + my $index = @{ $node_state_ref->{$node}{statehistory} } - 1; -if ($test) { - probe_utils->send_msg("$output", "o", "Probe the discovery process, including pre-check for required configuration and realtime monitor of discovery process. Before using this command, please install 'nslookup' command. Currently, this command does not support hierarchy."); - exit 0; -} - -if (defined($noderange) && !defined($discovery_type)) { - probe_utils->send_msg("$output", "f", "Option '-n' must used with '-m'"); - probe_utils->send_msg("$output", "d", "$::USAGE"); - exit 1; -} - -if (defined($discovery_type)) { - unless (grep(/^$discovery_type$/, @valid_discovery_type)) { - probe_utils->send_msg("$output", "f", "Invalid discovery type. the vaild types are $valid_discovery_type_str"); - probe_utils->send_msg("$output", "d", "$::USAGE"); - exit 1; + if ($node_state_ref->{$node}{statehistory}->[$index] != $newstate) { + push @{ $node_state_ref->{$node}{statehistory} }, $newstate; + } } } -if (defined($noderange) && defined($discovery_type)) { - $msg = "All pre_defined nodes are valid"; - my $rc = check_pre_defined_node($discovery_type, $noderange); - if ($rc) { - probe_utils->send_msg("$output", "f", $msg); - exit 1; +#------------------------------------------ + +=head3 + Description: + Check if all node have been finished the discovery process + Arguments: + node_state_ref: The reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + 0: success + 1: failed +=cut + +#------------------------------------------ +sub all_monitor_node_done { + my $node_state_ref = shift; + my $done = 1; + + foreach my $node (keys %$node_state_ref) { + if (($node_state_ref->{$node}{type} eq "node") and ($node_state_ref->{$node}{done} == 0)) { + $done = 0; + last; + } + } + + return $done; +} + +#------------------------------------------ + +=head3 + Description: + Calculate the discovery of every node. offer a report to customer + Arguments: + node_state_ref: The reference of hash "%node_state". refer to function "init_node_state" for the structure of "%node_state" + Returns: + 0: success + 1: failed +=cut + +#------------------------------------------ +sub conclusion_report { + my $node_state_ref = shift; + + probe_utils->send_msg("stdout", "", "==================discovery_probe_report================="); + + if ($debug) { + print "---->the result of %node_state<------\n"; + print Dumper $node_state_ref; + } + + if ($verbose) { + probe_utils->send_msg("stdout", "d", "----------MAC state history----------"); + foreach my $identify (keys %$node_state_ref) { + if ($node_state_ref->{$identify}{type} eq "mac") { + my $allhistorystate; + my $historystate; + probe_utils->send_msg("stdout", "d", "[$identify]:"); + if (@{ $node_state_ref->{$identify}{allstatehistory} }) { + $allhistorystate .= "$::STATE_DISCOVER_DESC{$_}=>" foreach (@{ $node_state_ref->{$identify}{allstatehistory} }); + $allhistorystate =~ s/=>$//g; + probe_utils->send_msg("stdout", "d", "Setps executed prior to last discoverying attempt:"); + probe_utils->send_msg("stdout", "d", "$allhistorystate"); + } + + $historystate .= "$::STATE_DISCOVER_DESC{$_}=>" foreach (@{ $node_state_ref->{$identify}{statehistory} }); + $historystate =~ s/=>$//g; + probe_utils->send_msg("stdout", "d", "Steps executed for last discoverying attempt:"); + probe_utils->send_msg("stdout", "d", "$historystate"); + + if (exists($node_state_ref->{$identify}{id})) { + probe_utils->send_msg("stdout", "d", "Node $node_state_ref->{$identify}{id} matched"); + } + } + } + + probe_utils->send_msg("stdout", "d", "--------------------------------------"); + } + + my %failed_mac; + my @success_node; + my @failed_node; + foreach my $identify (keys %$node_state_ref) { + if ($node_state_ref->{$identify}{type} eq "node") { + my $mac = $node_state_ref->{$identify}{id}; + if ($mac) { + push @success_node, $identify; + } else { + push @failed_node, $identify; + } + } elsif ($node_state_ref->{$identify}{type} eq "mac") { + foreach (@{ $node_state_ref->{$identify}{statehistory} }) { + $stop_stage = $_ if ($stop_stage < $_); + } + if ($stop_stage != $::STATE_DISCOVER_COMPLETED) { + $failed_mac{$identify}{stop_point} = $stop_stage; + } + } + } + + if (@failed_node) { + my $success_node_num = @success_node; + my $failed_node_num = @failed_node; + my $failed_nodes = join(",", @failed_node); + probe_utils->send_msg("stdout", "", "Discover $success_node_num node(s) successfully, $failed_node_num node(s) failed."); + probe_utils->send_msg("stdout", "", "Unmatched node(s):"); + probe_utils->send_msg("stdout", "", "$failed_nodes"); + + if (%failed_mac) { + probe_utils->send_msg("stdout", "", "Unmatched MAC(s):"); + } + foreach my $mac (keys %failed_mac) { + probe_utils->send_msg("stdout", "f", "[$mac] : stop at stage '$::STATE_DISCOVER_DESC{$failed_mac{$mac}{stop_point}}'"); + } } else { - probe_utils->send_msg("$output", "o", $msg); + probe_utils->send_msg("stdout", "o", "All nodes matched successfully"); } + + return 0; } -if (!$no_pre_check) { - $rst = do_pre_check(); - exit 1 if ($rst); -} -$rst = do_monitor(); -exit $rst; diff --git a/xCAT-probe/subcmds/image b/xCAT-probe/subcmds/image index f7a26745a..406668ab6 100755 --- a/xCAT-probe/subcmds/image +++ b/xCAT-probe/subcmds/image @@ -19,20 +19,22 @@ my $test; my $output = "stdout"; my $verbose = 0; my $rst = 0; +my $large_system = 20; # Number of nodes to treat as a large system $::USAGE = "Usage: $program_name -h - $program_name {-c|-d} [-n noderange] [-V] + $program_name {-c|-d|-u uuid} [-n noderange] [-V] Description: - Use this command to check if diskless, pingable compute nodes have the same images installed as defines in xCAT DB. - Use this command to check if all diskless, pingable compute nodes have the same identical installed. + Use this command to check if diskless nodes have the same images installed as defines in xCAT DB. + Use this command to check if all diskless nodes have the identical images installed. Options: -h : Get usage information of $program_name -n : Range of nodes to check - -d : To verify diskless, pingable compute nodes have the same images installed as defines in xCAT DB. - -c : To verify all diskless, pingable compute nodes have the identical images installed. + -d : To verify diskless nodes have the same images installed as defines in xCAT DB. + -c : To verify all diskless nodes have the identical images installed. + -u : To display a list of diskless nodes running an OS with the specified UUID -V : To print additional debug information. "; @@ -45,7 +47,8 @@ if ( "V" => \$VERBOSE, "n=s" => \$noderange, "c" => \$CONSISTENCY_CHECK, - "d" => \$DEFINITION_CHECK)) + "d" => \$DEFINITION_CHECK, + "u=s" => \$UUID_specified)) { probe_utils->send_msg("$output", "f", "Invalid parameter for $program_name"); probe_utils->send_msg("$output", "d", "$::USAGE"); @@ -62,16 +65,21 @@ if ($help) { } if ($test) { - probe_utils->send_msg("$output", "o", "Use this command to check if specified compute nodes have the same images installed or if compute nodes are installed with the same image as defined on MN."); + probe_utils->send_msg("$output", "o", "Use this command to check if specified diskless nodes have the same images installed or if nodes are installed with the same image as defined on the management node."); exit 0; } -unless (defined($CONSISTENCY_CHECK) || defined($DEFINITION_CHECK)) { - probe_utils->send_msg("$output", "f", "At least one of -c or -d flags is required"); +unless (defined($CONSISTENCY_CHECK) || defined($DEFINITION_CHECK) || defined($UUID_specified)) { + probe_utils->send_msg("$output", "f", "At least one of -c or -d or -u flags is required"); probe_utils->send_msg("$output", "d", "$::USAGE"); exit 1; } +if ($UUID_specified) { + # Looking for nodes running with specific UUID. Do consistency check processing first to get the data + $CONSISTENCY_CHECK = 1; +} + if (scalar(@ARGV) >= 1) { # After processing all the expected flags and arguments, @@ -153,25 +161,30 @@ foreach (@all_nodes_provmethod_lines) { print "Node $node_name has defined image $node_osimage_name at $rootimagedir with UUID $defined_UUID\n" if ($VERBOSE); } else { - probe_utils->send_msg("$output", "w", "$node_name is not diskless. No image consistency verification will be performed."); + probe_utils->send_msg("$output", "w", "$node_name is not diskless. No image consistency verification will be performed.") if ($VERBOSE); } } else { - probe_utils->send_msg("$output", "w", "$node_name has no provision method defined. No image consistency verification will be performed."); + my $nodetype = `lsdef -i nodetype -c $node_name`; + my ($node, $type) = split "=", $nodetype; + # If node object happens to be switch, do not display this warning message + unless ($type =~ /switch/) { + probe_utils->send_msg("$output", "w", "$node_name has no provision method defined. No image consistency verification will be performed.") if ($VERBOSE); + } } } if (scalar(@diskless_nodes) <= 0) { # There were no diskless nodes found. Issue a warning and exit. - probe_utils->send_msg("$output", "w", "No diskless compute nodes were found."); + probe_utils->send_msg("$output", "w", "No diskless nodes were found."); exit 1; } if (scalar(@diskless_nodes) <= 0) { # There were no diskless nodes found. Issue a warning and exit. - probe_utils->send_msg("$output", "w", "No diskless compute nodes were found"); + probe_utils->send_msg("$output", "w", "No diskless nodes were found"); exit 1; } @@ -196,7 +209,7 @@ foreach (@pping_lines) { if (scalar(@pingable_nodes) <= 0) { # There were no pingable, diskless nodes found. Issue a warning and exit. - probe_utils->send_msg("$output", "w", "No diskless, pingable compute nodes were found"); + probe_utils->send_msg("$output", "w", "No diskless, pingable nodes were found"); exit 1; } @@ -204,12 +217,12 @@ if ((scalar(@pingable_nodes) == 1) && ($CONSISTENCY_CHECK)) { # There was only one node in noderange and comparison check was requested. # Nothing to compare the single node to. - probe_utils->send_msg("$output", "w", "Comparison check for a single diskless pingable node will not be performed. Minimum of 2 nodes are needed for that."); + probe_utils->send_msg("$output", "w", "Comparison check for a single diskless node $pingable_nodes[0] will not be performed.\nMinimum of 2 nodes are needed for that."); exit 1; } # Next, from all pingable nodes get the IMAGENAME and IMAGEUUID entries from xcatinfo file -probe_utils->send_msg("$output", "d", "---- Gathering information from all diskless pingable compute nodes ----"); +probe_utils->send_msg("$output", "d", "---- Gathering information from all diskless nodes (pingable) ----"); my $pingable_hostname_list = join ",", @pingable_nodes; my $all_xdsh_output = `xdsh $pingable_hostname_list "cat /opt/xcat/xcatinfo"`; @@ -217,7 +230,7 @@ my $xcatinfo_image_UUID = ` echo "$all_xdsh_output" | awk -F"=" '/IMAGEUUID/ {gs # Check to verify xdsh worked and returned some usefull information if (length($xcatinfo_image_UUID) <= 1) { - probe_utils->send_msg("$output", "w", "Unable to extract image UUID information from compute nodes using xdsh command. No image consistency verification will be performed."); + probe_utils->send_msg("$output", "w", "Unable to extract image UUID information from nodes using xdsh command. No image consistency verification will be performed."); exit 1; } my @xdsh_UUID_lines = split("[\n\r]", $xcatinfo_image_UUID); @@ -226,7 +239,7 @@ my $xcatinfo_image_name = ` echo "$all_xdsh_output" | awk -F"=" '/IMAGENAME/ {gs # Check to verify xdsh worked and returned some usefull information if (length($xcatinfo_image_name) <= 1) { - probe_utils->send_msg("$output", "w", "Unable to extract image name information from compute nodes using xdsh command. No image consistency verification will be performed."); + probe_utils->send_msg("$output", "w", "Unable to extract image name information from nodes using xdsh command. No image consistency verification will be performed."); exit 1; } my @xdsh_name_lines = split("[\n\r]", $xcatinfo_image_name); @@ -247,7 +260,7 @@ foreach (@xdsh_UUID_lines) { } } -# It is possible that some older version xCAT compute nodes will not have an IMAGEUUID line in +# It is possible that some older version xCAT nodes will not have an IMAGEUUID line in # the xcatinfo file, for those nodes insert $na as the running UUID value foreach (@pingable_nodes) { unless (exists($node_running_image_uuid_hash{$_})) { @@ -281,17 +294,17 @@ if ($DEFINITION_CHECK) { if (($node_running_image_name_hash{$_} eq $node_defined_image_name_hash{$_}) && ($node_running_image_uuid_hash{$_} eq $node_defined_image_uuid_hash{$_})) { if ($node_running_image_uuid_hash{$_} eq $na) { - $msg = "$_: Not able to determine installed os image name or uuid"; + $msg = "$_: Not able to determine installed os image name or UUID"; } else { - $msg = "OS image installed on compute node $_ matches the image defined for it on management node"; + $msg = "OS image installed on diskless node $_ matches its image definition on the management node"; probe_utils->send_msg("$output", "o", "$msg") if ($VERBOSE); $success_nodes++; next; } } else { - $msg = "$_: Unmatched os image name or image UUID.\n Defined: name = $node_defined_image_name_hash{$_}" . + $msg = "$_: Unmatched OS image name or image UUID.\n Defined: name = $node_defined_image_name_hash{$_}" . " uuid = $node_defined_image_uuid_hash{$_}\n Installed: name = $node_running_image_name_hash{$_}" . " uuid = $node_running_image_uuid_hash{$_}"; } @@ -300,7 +313,7 @@ if ($DEFINITION_CHECK) { if (scalar(@pingable_nodes) eq $success_nodes) { # All pingable nodes were tested with success - probe_utils->send_msg("$output", "o", "OS image installed on each diskless compute node matches the image defined for it on management node"); + probe_utils->send_msg("$output", "o", "OS image installed on each diskless node matches its image definition on the management node"); } } @@ -311,11 +324,15 @@ if ($CONSISTENCY_CHECK) { my $image_name_and_uuid; my $image_uuid; my %unique_image_hash; + - # Go throug the nodes and build a hash of key=image_name+image_uuid and value of nodename + # Go through the nodes and build a hash of key=image_name+image_uuid and value of nodename foreach (@pingable_nodes) { $image_name_and_uuid = $node_running_image_name_hash{$_} . ":" . $node_running_image_uuid_hash{$_}; - unless (exists $unique_image_hash{$image_name_and_uuid}) { + if (exists $unique_image_hash{$image_name_and_uuid}) { + $unique_image_hash{$image_name_and_uuid} = $unique_image_hash{$image_name_and_uuid} . "," . $_; + } + else { $unique_image_hash{$image_name_and_uuid} = $_; } } @@ -326,21 +343,55 @@ if ($CONSISTENCY_CHECK) { if ($number_of_keys == 1) { my @image_names = keys %unique_image_hash; if ($image_names[0] =~ /$na/) { - $msg = "Not able to determine os image name or uuid of the image installed on any compute node."; + $msg = "Not able to determine OS image name or UUID of the image installed on any diskless node."; $status = "f"; } else { - $msg = "All compute nodes have the same os image installed: @image_names."; + $msg = "All diskless nodes have the same OS image installed: @image_names."; $status = "o"; } } else { my $node_image_table; - foreach $compute_node (keys %node_running_image_name_hash) { - $node_image_table .= sprintf(" %-15s %-30s : %-20s\n", $compute_node, $node_running_image_name_hash{$compute_node}, $node_running_image_uuid_hash{$compute_node}); + if ($UUID_specified) { + # Produce list of nodes running with a specified UUID + foreach $os_uuid (sort keys %unique_image_hash) { + my ($os_name, $uuid) = split(":", $os_uuid); + if ($uuid eq $UUID_specified) { + # Found UUID match + foreach my $node_name (split(",",$unique_image_hash{$os_uuid})) { + $node_image_table .= sprintf("$node_name\n"); + } + $msg = "Compute nodes running OS=>$os_name UUID=>$uuid:\n" . $node_image_table; + $status = "d"; + last; + } + } + if (length($node_image_table) < 1) { + # At the end of the loop, no UUID match found + $msg = "No diskless nodes running UUID $UUID_specified were found."; + $status = "d"; + } + } + else { + if (scalar(@pingable_nodes) > $large_system) { + # Produce summary output for a large system + foreach $os_uuid (sort keys %unique_image_hash) { + my ($os_name, $uuid) = split(":", $os_uuid); + my $count = scalar(split(",",$unique_image_hash{$os_uuid})); + $node_image_table .= sprintf(" $count diskless nodes running OS=>$os_name UUID=>$uuid\n"); + } + $node_image_table .= "Run 'xcatprobe image -u UUID' to display a list of diskless nodes that have OS installed with the specified UUID"; + } + else { + # Produce list output for small system + foreach $compute_node (sort keys %node_running_image_name_hash) { + $node_image_table .= sprintf(" %-15s %-30s : %-20s\n", $compute_node, $node_running_image_name_hash{$compute_node}, $node_running_image_uuid_hash{$compute_node}); + } + } + $msg = "Not all diskless nodes are installed with the same OS image.\n" . $node_image_table; + $status = "f"; } - $msg = "Not all compute nodes are installed with the same os image.\n" . $node_image_table; - $status = "f"; } probe_utils->send_msg("$output", "$status", "$msg"); diff --git a/xCAT-probe/subcmds/nodecheck b/xCAT-probe/subcmds/nodecheck index bd198b4d0..2e75e3e6b 100755 --- a/xCAT-probe/subcmds/nodecheck +++ b/xCAT-probe/subcmds/nodecheck @@ -23,7 +23,7 @@ my $rst = 0; # Match pattern for discovered nodes: node-1234-ABCDE-123456 # node- d+ -[a-z]- d+ #my $discovered_node_pattern = '^node-\d+-[a-zA-Z]+-\d+'; -my $discovered_node_pattern = '^node-*'; +my $discovered_node_pattern = '^node-'; $::USAGE = "Usage: $program_name -h @@ -118,9 +118,12 @@ sub check_for_duplicate_mtms_sn { if ($node_name =~ /$discovered_node_pattern/) { probe_utils->send_msg("$output", "d", "Pattern match discovered for node: $node_name") if ($VERBOSE); - # Build a hash of key="mtm+serial" and value="nodename". Later entry will be removed if - # predefined node found with the same mtm + serial found - $waiting_to_be_discovered{$value} = $node_name; + # Check if mtm and serial are set + unless ($value eq " mtm= serial=") { + # Build a hash of key="mtm+serial" and value="nodename". Later, this entry + # will be removed if predefined node found with the same mtm + serial found + $waiting_to_be_discovered{$value} = $node_name; + } } } $node_mtm_serial_hash{$node_name} = $value; @@ -141,7 +144,19 @@ sub check_for_duplicate_mtms_sn { probe_utils->send_msg("$output", "d", "No mtm and no serial for node $node_name") if ($VERBOSE); next; } - probe_utils->send_msg("$output", "f", "Duplicate found for machine with $mtm_serial : $node_name and $mtm_serial_node_hash{$mtm_serial}"); + + # Check whioh of the 2 matching node definitions is the discovered node + # for proper message display + if ($node_name =~ /$discovered_node_pattern/) { + probe_utils->send_msg("$output", "f", "$node_name has been discovered as $mtm_serial_node_hash{$mtm_serial} and can be removed using \"rmdef $node_name\""); + } + elsif ($mtm_serial_node_hash{$mtm_serial} =~ /$discovered_node_pattern/) { + probe_utils->send_msg("$output", "f", "$mtm_serial_node_hash{$mtm_serial} has been discovered as $node_name and can be removed using \"rmdef $mtm_serial_node_hash{$mtm_serial}\""); + } + else { + # None of the node names start with discovered_node_pattern, display generic message + probe_utils->send_msg("$output", "f", "Duplicate node definition found for the same $mtm_serial : $node_name and $mtm_serial_node_hash{$mtm_serial}"); + } if ($DELETE_DUPLICATE) { # Removing node definition of the duplicate node entry diff --git a/xCAT-probe/subcmds/osdeploy b/xCAT-probe/subcmds/osdeploy index fb8120158..ff8e927f6 100755 --- a/xCAT-probe/subcmds/osdeploy +++ b/xCAT-probe/subcmds/osdeploy @@ -908,23 +908,26 @@ sub handle_cluster_msg { } } } elsif ($log_ref->{msg} =~ /(.+)\s+status:\s+(.+)\s+statustime:/) { - my $node = $1; + my $nodes = $1; my $status = $2; my $record = "Node status is changed to $status"; + my @split_node = split(" ", $nodes); - if (exists $node_state_ref->{$node}) { - probe_utils->send_msg("stdout", "d", "[$node] $record") if ($monitor); - push(@{ $node_state_ref->{$node}{log} }, $log_ref->{msg}) if ($debug); + foreach my $node (@split_node) { + if (exists $node_state_ref->{$node}) { + probe_utils->send_msg("stdout", "d", "[$node] $record") if ($monitor); + push(@{ $node_state_ref->{$node}{log} }, $log_ref->{msg}) if ($debug); - if ($status eq "installing") { - set_node_state($node_state_ref, $node, $::STATE_INSTALLING); - } elsif ($status eq "powering-on") { - set_node_state($node_state_ref, $node, $::STATE_POWERINGON); - } elsif ($status eq "booting") { - set_node_state($node_state_ref, $node, $::STATE_BOOTING); - } elsif ($status eq "failed") { - $node_state_ref->{$node}{done} = 1; - } + if ($status eq "installing") { + set_node_state($node_state_ref, $node, $::STATE_INSTALLING); + } elsif ($status eq "powering-on") { + set_node_state($node_state_ref, $node, $::STATE_POWERINGON); + } elsif ($status eq "booting") { + set_node_state($node_state_ref, $node, $::STATE_BOOTING); + } elsif ($status eq "failed") { + $node_state_ref->{$node}{done} = 1; + } + } } } } diff --git a/xCAT-probe/subcmds/osimagecheck b/xCAT-probe/subcmds/osimagecheck index eafaf5c67..ea3c51611 100755 --- a/xCAT-probe/subcmds/osimagecheck +++ b/xCAT-probe/subcmds/osimagecheck @@ -99,9 +99,10 @@ sub check_for_duplicate_rootimgdir { probe_utils->send_msg("$output", "d", "No rootimgdir for osimage $osimage_name") if ($VERBOSE); next; } - # Check if hash already has the same key indicating another osimage definition has the same rootimgdir + # Check if hash already has the same key, indicating another osimage definition has the same rootimgdir if (exists($rootimgdir_osimage_hash{$rootimgdir})) { - probe_utils->send_msg("$output", "w", "Duplicate found for osimage with $rootimgdir : \n $osimage_name and $rootimgdir_osimage_hash{$rootimgdir}"); + # Build a list of osimages that have the same rootimgdir + $rootimgdir_osimage_hash{$rootimgdir} .= "," . $osimage_name; $any_dups = 1; } else { @@ -110,11 +111,24 @@ sub check_for_duplicate_rootimgdir { } - print Dumper(\%rootimgdir_osimage_hash) if ($VERBOSE); - + #print Dumper(\%rootimgdir_osimage_hash) if ($VERBOSE); my $rc = 1; - unless ($any_dups) { - probe_utils->send_msg("$output", "o", "No osimages with duplicate rootimgdir were found."); + + if ($any_dups) { + # Loop through each entry in hash to print a list of osimgage objects that point to the same rootimgdir + foreach $rootimgdirpath (keys %rootimgdir_osimage_hash) { + my @list_of_osimages = split ",", $rootimgdir_osimage_hash{$rootimgdirpath}; + if (scalar(@list_of_osimages) > 1) { + # More than one entry in the hash value, means we + # have more than one osimage point to the same rootimgdir + my $print_list = join("\n ",@list_of_osimages); + $rootimgdirpath=~s/^\s+//; #discard leading space + probe_utils->send_msg("$output", "w", "Identical root image directory ($rootimgdirpath) is configured for the diskless osimages: \n $print_list"); + } + } + } + else { + probe_utils->send_msg("$output", "o", "No diskless osimages with identical root image directories were found."); $rc = 0; } @@ -127,5 +141,36 @@ sub check_for_valid_osimage_attributes { my $rc = 0; + my %rootimgdir_osimage_hash; + my $any_dups = 0; + + # Check if any osimage object has "template" attribute set to service.tmpl or compute.tmpl + my $all_osimages_template = `lsdef -t osimage -i template -c 2> /dev/null`; + chomp($all_osimages_template); + my @all_osimages_template_lines = split("[\n\r]", $all_osimages_template); + + if (scalar(@all_osimages_template_lines) <= 0) { + + # There were no osimages found. Issue a warning and exit. + probe_utils->send_msg("$output", "w", "No osimages were found."); + return 1; + } + foreach (@all_osimages_template_lines) { + probe_utils->send_msg("$output", "d", "Processing $_.") if ($VERBOSE); + my ($osimage_name, $template) = split ":", $_; + if ($template eq " template=") { + # Exclude entries that do not have template attribute set + probe_utils->send_msg("$output", "d", "No template for osimage $osimage_name") if ($VERBOSE); + next; + } + my ($junk, $template_file) = split "=", $template; + if (($template_file =~ /compute.tmpl/) || ($template_file =~ /service.tmpl/)) { + if ($template_file !~ /ubuntu/) { + # Skip Ubintu osimages, currently ok to have service.tmpl and compute.tmpl for them + probe_utils->send_msg("$output", "w", "$osimage_name contains depricated 'template' value \n $template_file"); + } + } + } + return $rc; } diff --git a/xCAT-server/lib/perl/xCAT/IPMI.pm b/xCAT-server/lib/perl/xCAT/IPMI.pm index a4e3cf5cd..bb332bb13 100644 --- a/xCAT-server/lib/perl/xCAT/IPMI.pm +++ b/xCAT-server/lib/perl/xCAT/IPMI.pm @@ -864,8 +864,10 @@ sub got_rakp2 { return; } if ($rmcp_codes{$byte}) { + $self->{sessionestablishmentcontext} = STATE_FAILED; $self->{onlogon}->("ERROR: " . $rmcp_codes{$byte}, $self->{onlogon_args}); #TODO: errors } else { + $self->{sessionestablishmentcontext} = STATE_FAILED; $self->{onlogon}->("ERROR: $byte code on opening RMCP+ session", $self->{onlogon_args}); #TODO: errors } return 9; diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index ecf5449f4..54d7ce8b7 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -645,10 +645,6 @@ sub format_stanza { if ($bmcpass) { $result .= "\tbmcpassword=$bmcpass\n"; } - if ($nodetype && $hwtype) { - $result .= "\tnodetype=$nodetype\n"; - $result .= "\thwtype=$hwtype\n"; - } my $rsp = {}; push @{ $rsp->{data} }, "$result"; xCAT::MsgUtils->message("I", $rsp, $::CALLBACK); diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 1dd63c717..165cde2e2 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -1383,6 +1383,8 @@ sub process_request my $querynics = 1; if (xCAT::Utils->isServiceNode() and $dhcpinterfaces and $dhcpinterfaces->{dhcpinterfaces}) { + # The keyword 'noboot' was appended to the NICs that doesn't need to reply DHCP configuration file, only used for mknb at present. + $dhcpinterfaces->{dhcpinterfaces} =~ s/:noboot//g; my @dhcpifs = split ',', $dhcpinterfaces->{dhcpinterfaces}; foreach my $nic (@dhcpifs) { $activenics{$nic} = 1; @@ -1404,6 +1406,9 @@ sub process_request #depending on complexity of network wished to be described { my $dhcpinterfaces = $t_entry; + # The keyword 'noboot' was appended to the NICs that doesn't need to reply DHCP configuration file, only used for mknb at present. + $dhcpinterfaces =~ s/:noboot//g; + my $dhcpif; INTF: foreach $dhcpif (split /;/, $dhcpinterfaces) { my $host; diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index a763bad68..b4fd10250 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -2460,6 +2460,7 @@ sub beacon_answer { sub inv { my $sessdata = shift; + my $command = $sessdata->{command}; my $subcommand = $sessdata->{subcommand}; my $rc = 0; @@ -2515,9 +2516,9 @@ sub inv { @types = qw(guid); } else { - @types = ($subcommand); - - #return(1,"unsupported BMC inv argument $subcommand"); + my $usage_string = xCAT::Usage->getUsage($command); + $callback->({ error => ["$usage_string"], errorcode => [1] }); + return 1; } $sessdata->{invtypes} = \@types; initfru($sessdata); diff --git a/xCAT-server/lib/xcat/plugins/localrest.pm b/xCAT-server/lib/xcat/plugins/localrest.pm index 24e5a6b4f..1d58e95a7 100644 --- a/xCAT-server/lib/xcat/plugins/localrest.pm +++ b/xCAT-server/lib/xcat/plugins/localrest.pm @@ -143,7 +143,7 @@ sub handle_rest_request { #------------------------------------------------------- sub list_adapters { - my ($rsp, $cmd, $tmpres, $vline); + my ($rsp, $cmd, $vline); my ($mac, $ip, $adapter, $preadapter, $samenic); my (@cmdres, @origin, @eachline, @line, @result); $cmd = "ip -o addr"; @@ -174,29 +174,31 @@ sub list_adapters { } } # get net ip and mac + my $i=0; foreach my $key (keys %{$samenic}){ $vline=${$samenic}{$key}; @line = split(' ',$vline); - $tmpres->{'name'} = $key; + my %tmpres = (); + $tmpres{'name'} = $key; for (my $i=0; $i<@line; $i++) { if ( $line[$i] =~ /^inet$/ ) { $ip = $line[$i+1]; - $tmpres->{'ip'} = $ip; + $tmpres{'ip'} = $ip; } if ( $line[$i] =~ 'ether' ) { $mac = $line[$i+1]; - $tmpres->{'mac'} = $mac; + $tmpres{'mac'} = $mac; } } - push (@result, $tmpres); + push (@result, \%tmpres); + } return \@result; } - #------------------------------------------------------- =head3 handler to download credential files diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index 520bf11b4..9e68b6887 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -18,6 +18,7 @@ sub process_request { my $serialport; my $serialspeed; my $serialflow; + my %nobootnicips = (); my $initrd_file = undef; my $xcatdport = 3001; my @entries = xCAT::TableUtils->get_site_attribute("defserialport"); @@ -43,6 +44,41 @@ sub process_request { if (defined($t_entry)) { $xcatdport = $t_entry; } + + @entries = xCAT::TableUtils->get_site_attribute("dhcpinterfaces"); + $t_entry = $entries[0]; + if (defined($t_entry)) { + my %nobootnics = (); + foreach my $dhcpif (split /;/, $t_entry) { + if ($dhcpif =~ /\|/) { + my $isself = 0; + (my $ngroup, $dhcpif) = split /\|/, $dhcpif; + foreach my $host (noderange($ngroup)) { + unless(xCAT::NetworkUtils->thishostisnot($host)) { + $isself = 1; + } + } + unless(xCAT::NetworkUtils->thishostisnot($ngroup)) { + $isself = 1; + } + unless ($isself) { + next; + } + } + foreach (split /[,\s]+/, $dhcpif) { + my ($nicname, $flag) = split /:/; + if ($flag and $flag =~ /noboot/i) { + $nobootnics{$nicname} = 1; + } + } + } + my $nicips = xCAT::NetworkUtils->get_nic_ip(); + foreach (keys %nobootnics) { + if (defined($nicips->{$_})) { + $nobootnicips{$nicips->{$_}} = 1; + } + } + } my $tftpdir = xCAT::TableUtils->getTftpDir(); my $arch = $request->{arg}->[0]; @@ -207,7 +243,14 @@ sub process_request { my $dopxe = 0; foreach (keys %{$normnets}) { my $net = $_; + my $nicip = $normnets->{$net}; $net =~ s/\//_/; + if (defined($nobootnicips{$nicip})) { + if ($arch =~ /ppc/ and -r "$tftpdir/pxelinux.cfg/p/$net") { + unlink("$tftpdir/pxelinux.cfg/p/$net"); + } + next; + } $dopxe = 0; if ($arch =~ /x86/) { #only do pxe if just x86 or x86_64 and no x86 if ($arch =~ /x86_64/ and not $invisibletouch) { diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index ded392492..2cffabf5c 100644 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1748,7 +1748,11 @@ sub plugin_command { # make the request handler process to take care all the plugin children $SIG{TERM} = $SIG{INT} = sub { foreach (keys %plugin_children) { + # Send signal to the whole process group + kill 'INT', -$_; kill 'INT', $_; + kill 'TERM', -$_; + kill 'TERM', $_; } $SIG{ALRM} = sub { xexit 0; }; # wait 1s for grace exit alarm(1); @@ -1873,6 +1877,14 @@ sub plugin_command { binmode($parfd, ':utf8'); binmode($pfd, ':utf8'); $child = xCAT::Utils->xfork; + unless (defined $child) { + xCAT::MsgUtils->message("S", "Fork failed"); + die; + } + # Fix github issue #448. For the child process, setpgrp() + # here. In this way, the parent can send SIGINT or SIGTERM + # to all the process group. + setpgrp unless $child; } else { if ($req_back) { $req = dclone($req_back); @@ -1881,10 +1893,6 @@ sub plugin_command { } $child = 0; } - unless (defined $child) { - xCAT::MsgUtils->message("S", "Fork failed"); - die; - } if ($child == 0) { if ($parfd) { # If xCAT is doing multiple requests in same communication PID, things would get unfortunate otherwise $parent_fd = $parfd; @@ -2918,7 +2926,10 @@ sub relay_fds { # Relays file descriptors from pipes to children to the SSL sock print "Aborting..."; foreach (keys %plugin_children) { print "Sending INT to $_\n"; + # Send signal to the whole process group + kill 'INT', -$_; kill 'INT', $_; + kill 'TERM', -$_; kill 'TERM', $_; } foreach my $cin ($fds->handles) { diff --git a/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist b/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist index f951d4ac9..a7de3c96b 100644 --- a/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist +++ b/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist @@ -16,5 +16,4 @@ atk cairo gcc createrepo -libnl ethtool diff --git a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 index a8ea15ea7..dc4df9918 100755 --- a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 +++ b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 @@ -157,7 +157,11 @@ function hack_uname() echo "\$ARCH" ;; "-r") - cd /lib/modules && for d in * ; do : ; done && echo \$d + if [ -n "\$KERNELVERSION" ]; then + echo \$KERNELVERSION + else + for d in \$(ls /lib/modules | sort -V) ; do : ; done && echo \$d + fi ;; "-s"|"") echo "Linux" @@ -169,7 +173,7 @@ function hack_uname() chmod 0755 "$1/bin/uname" AFTER_UNAME_R="$($1/bin/uname -r)" AFTER_UNAME_M="$($1/bin/uname -m)" - echo "After hack_uname(), -r='${AFTER_UNAME_R}', -m='${AFTER_UNAME_M}'" + echo "After hack_uname(), -r=>'${AFTER_UNAME_R}', -m=>'${AFTER_UNAME_M}'" } function cleanup() diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot index 69f13b8c0..8c567823d 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot @@ -300,6 +300,9 @@ if [ -z $STATEMNT ]; then [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases" done + ifname="$(getarg ifname=)" + netdev="$(getarg netdev=)" + BOOTIF="$(getarg BOOTIF=)" if [ ! -z "$ifname" ]; then MACX=${ifname#*:} ETHX=${ifname%:$MACX*} diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index c1a66d1c4..ea50b4a6c 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -367,20 +367,20 @@ unless ($onlyinitrd) { my $pa = $pkg_hash{$pass}{$_}; my @npa = (); - # replace the kernel package with the name has the specific version + # replace the kernel package (and headers, tools, etc) with the specific version foreach my $p (@$pa) { - if ($p =~ /^kernel$/ && $kernelver) { + if ($kernelver && $p =~ /^kernel(-headers|-devel|-bootwrapper|-tools)?$/) { my $kernelname; if ($krpmver) { - $kernelname = "kernel-" . $krpmver; + $kernelname = $p . "-" . $krpmver; } else { - $kernelname = "kernel-" . $kernelver; + $kernelname = $p . "-" . $kernelver; } my $searchkern = $yumcmd . " list $kernelname -q"; my @kernpkgs = `$searchkern`; my $found = 0; foreach my $k (@kernpkgs) { - if ($k =~ /\s*kernel[^\s]*\s+([\w\.-]+)/) { + if ($k =~ /\s*$p\.[^\s]*\s+([\w\.-]+)/) { my $version = $1; if ($kernelver =~ /$version/) { $found++; @@ -388,7 +388,7 @@ unless ($onlyinitrd) { } } if ($found eq 0) { - print "Cannot find the kernel with version $kernelver.\n"; + print "Cannot find the $p package with version $kernelver.\n"; umount_chroot($rootimg_dir); exit 1; } @@ -467,7 +467,7 @@ unless ($onlyinitrd) { # } # Hack uname when deal otherpkgs - use_hackuname(); + use_hackuname($arch, $kernelver); use_devnull(); @@ -546,7 +546,9 @@ unless ($onlyinitrd) { # run yum update to update any installed rpms # needed when running genimage again after updating software in repositories - my $yumcmd_update = $yumcmd_base . " update "; + # exclude updating the kernel if a specific version was specified + my $excludecmd = $kernelver ? " --exclude=kernel\*" : ""; + my $yumcmd_update = $yumcmd_base . $excludecmd . " update "; $rc = system("$yumcmd_update"); } } @@ -713,31 +715,7 @@ unless ($imagename) { if ($postinstall_filename) { - #For Mellonax IB script. In diskless image, the uname -r not returning the rootimg level, - #because the "uname -r" only returns the version of the kernel in use - #create a temporary uname script. for every flag except for -r, it should just call the real - #uname with the same flags and return that info. - if (!(-e "$rootimg_dir/bin/orig_uname")) { - system("mv $rootimg_dir/bin/uname $rootimg_dir/bin/orig_uname"); - } - my $tmpuname; - open($tmpuname, ">", "$rootimg_dir/bin/uname"); - print $tmpuname </dev/null || rpm -q kernel-\$(\"\$0\" -r) --qf '%{arch}' 2>/dev/null)\" + if [ -z "\$ARCH" ]; then + ARCH=\"\$(dpkg --print-architecture 2>/dev/null || rpm -q kernel-\$(\"\$0\" -r) --qf '%{arch}' 2>/dev/null)\" + fi case "\$ARCH" in "amd64") ARCH="x86_64" ;; "ppc64el") ARCH="ppc64le" ;; esac echo "\$ARCH" ;; "-r") - cd /lib/modules && for d in * ; do : ; done && echo \$d ;; + if [ -n "\$KERNELVER" ]; then + echo \$KERNELVER + else + for d in \$(ls /lib/modules | sort -V) ; do : ; done && echo \$d + fi + ;; "-s"|"") echo "Linux";; +*) + /bin/uname-binary \$1;; esac exit 0 diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index 26799e72e..01884a946 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -729,6 +729,7 @@ EOS_UNAME $ENV{IMG_NAME}=$imagename if("" ne $imagename); $ENV{IMG_ARCH}=$arch if("" ne $arch); $ENV{IMG_OSVER}=$osver if("" ne $osver); + $ENV{IMG_KERNELVERSION} = $kernelver if("" ne $kernelver); $ENV{IMG_PROFILE}=$profile if("" ne $profile); $ENV{IMG_PKGLIST}=$pkglist if("" ne $pkglist); $ENV{IMG_PKGDIR}=$srcdir if("" ne $srcdir); @@ -749,7 +750,7 @@ EOS_UNAME } #delete the osimage attributes from environment variable - delete @ENV{qw(IMG_ARCH IMG_NAME IMG_OSVER IMG_PROFILE IMG_PKGLIST IMG_PKGDIR IMG_OTHERPKGLIST IMG_OTHERPKGDIR IMG_ROOTIMGDIR)}; + delete @ENV{qw(IMG_ARCH IMG_NAME IMG_OSVER IMG_KERNELVERSION IMG_PROFILE IMG_PKGLIST IMG_PKGDIR IMG_OTHERPKGLIST IMG_OTHERPKGDIR IMG_ROOTIMGDIR)}; # restore the orig uname system("mv $rootimg_dir/bin/orig_uname $rootimg_dir/bin/uname"); diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index 1e9ccf0e8..14ddf618c 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -622,6 +622,7 @@ if ($postinstall_filename) { $ENV{IMG_ARCH}=$arch if("" ne $arch); $ENV{IMG_NAME}=$imagename if("" ne $imagename); $ENV{IMG_OSVER}=$osver if("" ne $osver); + $ENV{IMG_KERNELVERSION} = $kernelver if("" ne $kernelver); $ENV{IMG_PROFILE}=$profile if("" ne $profile); $ENV{IMG_PKGLIST}=$pkglist if("" ne $pkglist); $ENV{IMG_PKGDIR}=$srcdir if("" ne $srcdir); @@ -642,7 +643,7 @@ if ($postinstall_filename) { } #delete the osimage attributes from environment variable - delete @ENV{qw(IMG_ARCH IMG_NAME IMG_OSVER IMG_PROFILE IMG_PKGLIST IMG_PKGDIR IMG_OTHERPKGLIST IMG_OTHERPKGDIR IMG_ROOTIMGDIR)}; + delete @ENV{qw(IMG_ARCH IMG_NAME IMG_OSVER IMG_KERNELVERSION IMG_PROFILE IMG_PKGLIST IMG_PKGDIR IMG_OTHERPKGLIST IMG_OTHERPKGDIR IMG_ROOTIMGDIR)}; } diff --git a/xCAT-server/share/xcat/scripts/configMellanox b/xCAT-server/share/xcat/scripts/configMellanox index ca5d80e25..f0a771488 100755 --- a/xCAT-server/share/xcat/scripts/configMellanox +++ b/xCAT-server/share/xcat/scripts/configMellanox @@ -42,6 +42,10 @@ if ( 'config' => \$::CONFIG, 'ip' => \$::IP, 'name' => \$::NAME, + 'snmp' => \$::SNMP, + 'user=s' => \$::USER, + 'password=s' => \$::PASSWORD, + 'auth=s' => \$::AUTH, 'all' => \$::ALL, ) ) @@ -98,6 +102,10 @@ if (($::NAME) || ($::ALL)) { config_hostname(); } +if (($::SNMP) || ($::ALL)) +{ + config_snmp(); +} if (($::CONFIG) || ($::ALL)) { run_rspconfig(); @@ -175,6 +183,7 @@ sub config_ip { $cmd="xdsh $dswitch -t 10 -l admin --devicetype IBSwitch::Mellanox 'enable;configure terminal;no interface mgmt0 dhcp;interface mgmt0 ip address $static_ip $mask;configuration write;exit;exit' "; $rc= xCAT::Utils->runcmd($cmd, 0); + push (@discover_switches, $dswitch); push (@config_switches, $switch); } @@ -224,6 +233,56 @@ sub config_hostname { } } +#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']); + 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); + $user="admin"; + } + if ($::USER) { + $snmp_user = $::USER; + } elsif ($switchhash->{$switch}->[0]->{username}) { + $snmp_user = $switchhash->{$switch}->[0]->{username}; + } else { + $snmp_user = "xcatadmin\r"; + } + if ($::PASSWORD) { + $snmp_passwd = $::PASSWORD; + } elsif ($switchhash->{$switch}->[0]->{password}) { + $snmp_passwd = $switchhash->{$switch}->[0]->{password}; + } 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 = "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); + } + } +} + sub run_rspconfig { my @config_switches; my $switchtab = xCAT::Table->new('switches'); @@ -274,6 +333,7 @@ sub usage configMellanox [--switches switchnames] [--all] configMellanox [--switches switchnames] [--ip] configMellanox [--switches switchnames] [--name] + configMellanox [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--auth snmp_auth] configMellanox [--switches switchnames] [--config] \n"; } diff --git a/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle b/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle index aa5c1bbd2..2a5935deb 100644 --- a/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle @@ -310,4 +310,6 @@ reg_linux_diskfull_installation_hierarchy reg_linux_diskless_installation_hierarchy reg_linux_statelite_installation_hierarchy_by_ramdisk reg_linux_statelite_installation_hierarchy_by_nfs +redhat_migration1 +redhat_migration2 clean_up_env diff --git a/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle b/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle index 2f8978948..67ccc3c22 100644 --- a/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle @@ -216,4 +216,6 @@ reg_linux_diskfull_installation_hierarchy reg_linux_diskless_installation_hierarchy reg_linux_statelite_installation_hierarchy_by_ramdisk reg_linux_statelite_installation_hierarchy_by_nfs +redhat_migration1 +redhat_migration2 clean_up_env diff --git a/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle b/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle index aa5c1bbd2..2a5935deb 100644 --- a/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle @@ -310,4 +310,6 @@ reg_linux_diskfull_installation_hierarchy reg_linux_diskless_installation_hierarchy reg_linux_statelite_installation_hierarchy_by_ramdisk reg_linux_statelite_installation_hierarchy_by_nfs +redhat_migration1 +redhat_migration2 clean_up_env diff --git a/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle b/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle index 6ad518749..24f9bb87e 100644 --- a/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle @@ -210,4 +210,6 @@ reg_linux_diskfull_installation_hierarchy reg_linux_diskless_installation_hierarchy reg_linux_statelite_installation_hierarchy_by_ramdisk reg_linux_statelite_installation_hierarchy_by_nfs +redhat_migration1 +redhat_migration2 clean_up_env diff --git a/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle b/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle index 69eae50c3..0b0b36ea0 100644 --- a/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle @@ -216,4 +216,6 @@ reg_linux_diskfull_installation_hierarchy reg_linux_diskless_installation_hierarchy reg_linux_statelite_installation_hierarchy_by_ramdisk reg_linux_statelite_installation_hierarchy_by_nfs +redhat_migration1 +redhat_migration2 clean_up_env diff --git a/xCAT-test/autotest/testcase/go-xcat/case4 b/xCAT-test/autotest/testcase/go-xcat/case4 new file mode 100644 index 000000000..b2dfeeb86 --- /dev/null +++ b/xCAT-test/autotest/testcase/go-xcat/case4 @@ -0,0 +1,44 @@ +start:go_xcat_update_case1 +description:test go_xcat with the option update +os:Linux +cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi +check:rc!=0 +cmd:if xdsh $$CN "grep \"Red Hat\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils bzip2"; fi +check:rc==0 +cmd:xdsh $$CN "cd /; rm -rf /xcat-core* /xcat-dep* /go-xcat" +check:rc==0 +cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" +check:rc==0 +cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" +check:rc==0 +cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" +check:rc==0 +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://sourceforge.net/projects/xcat/files/ubuntu/apt.key/download | apt-key add -"; fi +check:rc==0 +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +check:rc==0 +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=$$UBUNTU_MIGRATION2_CORE --xcat-dep=$$UBUNTU_MIGRATION2_DEP -y install";else xdsh $$CN "cd /; ./go-xcat -x $$MIGRATION1_VERSION -y install";fi +check:rc==0 +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -v" +check:rc==0 +cmd:xdsh $$CN "lsxcatd -v" +check:rc==0 +check:output=~Version $$MIGRATION1_VERSION +cmd:xdsh $$CN "cd /; ./go-xcat update -y" +check:rc==0 +check:output=~xCAT has been successfully updated +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -v" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running +cmd:xdsh $$CN "service xcatd stop" +cmd:if grep SUSE /etc/*release;then xdsh $$CN "zypper remove -y *xCAT*" && xdsh $$CN "rm -rf /etc/zypp/repos.d/xCAT-*.repo"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "yum remove -y *xCAT*" && xdsh $$CN "rm -rf /etc/yum.repos.d/xCAT-*.repo"; elif grep Ubuntu /etc/*release;then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y" && xdsh $$CN "rm -rf /etc/apt/sources.list.d/xcat-*.list"; fi +check:rc==0 +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa|grep -i perl-xcat";fi +check:rc!=0 +cmd:xdsh $$CN "cd /; rm -rf /xcat-core* /xcat-dep* /go-xcat" +end + diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 3f0d0d21e..05bc1f7c7 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -12,9 +12,7 @@ cmd:ls /go-xcat check:rc==0 cmd:chmod 777 /go-xcat; /go-xcat --xcat-core=/install_xCAT_xcat-core.tar.bz2 --xcat-dep=/install_xCAT_xcat-dep.tar.bz2 -y install; check:rc==0 -cmd:source "/etc/profile.d/xcat.sh" -check:rc==0 -cmd:lsxcatd -v +cmd:source "/etc/profile.d/xcat.sh";env;lsxcatd -v check:rc==0 check:output=~Version cmd:service xcatd status @@ -39,9 +37,7 @@ cmd:ls /go-xcat check:rc==0 cmd:chmod 777 /go-xcat; /go-xcat --xcat-core=/install_xCAT_xcat-core.tar.bz2 --xcat-dep=/install_xCAT_xcat-dep.tar.bz2 -y install; check:rc==0 -cmd:source "/etc/profile.d/xcat.sh" -check:rc==0 -cmd:lsxcatd -v +cmd:source "/etc/profile.d/xcat.sh";env;lsxcatd -v check:rc==0 check:output=~Version cmd:service xcatd status diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 679ad61ba..2b32fc850 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -1,12 +1,18 @@ start:SN_setup_case os:Linux +stop:yes cmd:/opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ check:rc==0 cmd:chtab key=nameservers site.value="" check:rc==0 -cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$SN,vmstorage)__" =~ "phy" ]]; then rmvm $$SN -f -p && mkvm $$SN; else rmvm $$SN -f -p && mkvm $$SN -s 20G; fi;fi +#cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$SN,vmstorage)__" =~ "phy" ]]; then rmvm $$SN -f -p && mkvm $$SN; else rmvm $$SN -f -p && mkvm $$SN -s 20G; fi;fi +#Add for debug rmvm issue +cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$SN kvm_nodedata |grep -i $$SN; fi +check:rc==0 +cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$SN,vmstorage)__" =~ "phy" ]]; then rmvm $$SN -f -p && mkvm $$SN; else rmvm $$SN -f -p;mkvm $$SN;rmvm $$SN -f -p;mkvm $$SN -s 20G; fi;fi +check:rc==0 cmd:makedns -n check:rc==0 diff --git a/xCAT-test/autotest/testcase/signal/cases0 b/xCAT-test/autotest/testcase/signal/cases0 new file mode 100644 index 000000000..efd959a5e --- /dev/null +++ b/xCAT-test/autotest/testcase/signal/cases0 @@ -0,0 +1,4 @@ +start:genimage_sigint +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/signal/test-sigint-genimage.sh +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/signal/test-sigint-genimage.sh b/xCAT-test/autotest/testcase/signal/test-sigint-genimage.sh new file mode 100755 index 000000000..53fff28b1 --- /dev/null +++ b/xCAT-test/autotest/testcase/signal/test-sigint-genimage.sh @@ -0,0 +1,167 @@ +#!/bin/bash + +# Author: GONG Jie +# Create: 2016-10-17 +# Update: 2016-10-21 +# Version: 1.3.0 + +# +# warn_if_bad Put out warning message(s) if $1 has bad RC. +# +# $1 0 (pass) or non-zero (fail). +# $2+ Remaining arguments printed only if the $1 is non-zero. +# +# Incoming $1 is returned unless it is 0 +# +function warn_if_bad() +{ + local -i rc="$1" + local script="${0##*/}" + + # Ignore if no problems + [ "${rc}" -eq "0" ] && return 0 + + # Broken + shift + echo "${script}: $@" >&2 + return "${rc}" +} + +# +# exit_if_bad Put out error message(s) if $1 has bad RC. +# +# $1 0 (pass) or non-zero (fail). +# $2+ Remaining arguments printed only if the $1 is non-zero. +# +# Exits with 1 unless $1 is 0 +# +function exit_if_bad() +{ + warn_if_bad "$@" || exit 1 + return 0 +} + +# +# check_root_or_break +# +# Breaks the script if not running as root. +# +# If this returns 1, the invoker MUST abort the script. +# +# returns 0 if running as root +# returns 1 if not (and breaks the script) +# +function check_root_or_exit() +{ + [ "${UID}" -eq "0" ] + exit_if_bad "$?" "Must be run by UID=0. Actual UID=${UID}." + return 0 +} + +# +# check_executes Check for executable(s) +# +# Returns 0 if true. +# Returns 1 if not. +# +function check_executes() +{ + local cmd + local all_ok="yes" + for cmd in "$@" + do + if ! type "${cmd}" &>/dev/null + then + echo "Command \"${cmd}\" not found" >&2 + all_ok="no" + fi + done + [ "${all_ok}" = "yes" ] +} + +# +# check_exec_or_exit Check for required executables. +# +# Exits (not returns) if commands listed on command line do not exist. +# +# Returns 0 if true. +# Exits with 1 if not. +# +function check_exec_or_exit() +{ + check_executes "$@" + exit_if_bad "$?" "Above listed required command(s) not found" + return 0 +} + +# +# internal_setup Script setup +# +# Returns 0 on success. +# Exits (not returns) with 1 on failure. +# +function internal_setup() +{ + # Trap exit for internal_cleanup function. + trap "internal_cleanup" 0 + + umask 0077 + + check_exec_or_exit cat cpio find grep tail tee touch xargs +} + +# +# internal_cleanup Script cleanup (reached via trap 0) +# +# Destory any temporarily facility created by internal_setup. +# +function internal_cleanup() +{ + custom_cleanup +} + +function custom_cleanup() +{ + rm -rf "/install/netboot/testing0000" +} + + +PATH="/opt/xcat/bin:/opt/xcat/sbin:/bin:/sbin:/usr/bin:/usr/sbin" + +OSIMAGE="$(lsdef -t osimage | grep -- -netboot-compute | head -n 1)" +[ -n "${OSIMAGE}" ] +exit_if_bad "$?" "Diskless osimage not found" + +lsdef -t osimage "${OSIMAGE}" -z | sed -e 's/^.*:$/compute_9999z/' | mkdef -z + +# The new osimage name is compute_9999z +OSIMAGE="compute_9999z" + +lsdef -t osimage "${OSIMAGE}" +exit_if_bad "$?" "Diskless osimage ${OSIMAGE} not created" + +chdef -t osimage "${OSIMAGE}" "rootimgdir=/install/netboot/testing0000/${OSIMAGE}" +exit_if_bad "$?" "Command chdef failed" + +genimage "${OSIMAGE}" & +CHILD="$!" + +sleep 1 + +kill -0 "${CHILD}" +exit_if_bad "$?" "Process not found" + +kill -SIGINT "${CHILD}" +exit_if_bad "$?" "Send SIGINT failed" + +sleep 2 + +ps axo comm | grep genimage +[ "$?" -ne "0" ] +exit_if_bad "$?" "Still running 000" + +ps axo pgrp | grep "${CHILD}" +[ "$?" -ne "0" ] +exit_if_bad "$?" "Still running 001" + +exit 0 diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0 index ffdb5407a..ef0776219 100644 --- a/xCAT-test/autotest/testcase/xcatconfig/case0 +++ b/xCAT-test/autotest/testcase/xcatconfig/case0 @@ -85,3 +85,36 @@ check:output=~version|Version cmd:xcatconfig --version check:output=~version|Version end + +start:xcatconfig_u_check_xcatsslversion_rhels_sles +description:after xcatconfig -u the site.xcatsslversion will not be changed +cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$' +check:rc==0 +cmd:chtab key=xcatsslversion site.value=TLSv12 +check:rc==0 +cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv12$' +check:rc==0 +cmd:xcatconfig -u +check:rc==0 +cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv12$' +check:rc==0 +cmd:chtab key=xcatsslversion site.value=TLSv1 +check:rc==0 +end + + +start:xcatconfig_u_check_xcatsslversion_ubuntu +description:after xcatconfig -u the site.xcatsslversion will not be changed +cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$' +check:rc==0 +cmd:chtab key=xcatsslversion site.value=TLSv1_2 +check:rc==0 +cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1_2$' +check:rc==0 +cmd:xcatconfig -u +check:rc==0 +cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1_2$' +check:rc==0 +cmd:chtab key=xcatsslversion site.value=TLSv1 +check:rc==0 +end diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 0b931a528..7e35a5149 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -6,6 +6,8 @@ use Getopt::Long; use Data::Dumper; use Term::ANSIColor; use Time::Local; +use File::Basename; +use File::Path; BEGIN { @@ -206,6 +208,52 @@ 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; + } + } + @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); +} + sub getConfig { my $type = undef; #Script_Prev,Script_Post,Table,Object,System,Custom @@ -564,6 +612,8 @@ sub loadcase my @rightcase = (); my @notrightcase = (); my @wrongnamecase= (); + my @samecase = (); + my @errorcase = (); if ($bundlelist) { my @bundles = split /,/, $bundlelist; foreach my $bundle (@bundles) { @@ -572,11 +622,15 @@ sub loadcase return 1; } while ($line = ) { - $line = trim($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]}; } } @@ -731,6 +785,8 @@ sub loadcase 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; } @@ -1150,11 +1206,13 @@ sub reordercases return 1; } while ($line = ) { - $line = trim($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) { diff --git a/xCAT-vlan/pods/man1/chvlanports.1.pod b/xCAT-vlan/pods/man1/chvlanports.1.pod index b93cb0ea0..cb1da85e4 100755 --- a/xCAT-vlan/pods/man1/chvlanports.1.pod +++ b/xCAT-vlan/pods/man1/chvlanports.1.pod @@ -26,7 +26,7 @@ I is a unique vlan number. =over 10 -=item B<-n|--nodes> The nodes or groups to be added or removed. It takes the noderange format. Please check the man page for noderange for details. +=item B<-n|--nodes> The nodes or groups to be added or removed. It takes the noderange format. Check the man page for noderange for details. =item B<-i|--interface> The interface name where the vlan will be tagged on. diff --git a/xCAT-vlan/pods/man1/mkvlan.1.pod b/xCAT-vlan/pods/man1/mkvlan.1.pod index bb9ab0366..99b357f8d 100755 --- a/xCAT-vlan/pods/man1/mkvlan.1.pod +++ b/xCAT-vlan/pods/man1/mkvlan.1.pod @@ -35,7 +35,7 @@ For example: This command will automatically configure the cross-over ports if the given nodes are on different switches. -For added security, the root guard and bpdu guard will be enabled for the ports in this vlan. However, the guards will not be disabled if the ports are removed from the vlan using chvlan or rmvlan commands. To disable them, you need to use the switch command line interface. Please refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. +For added security, the root guard and bpdu guard will be enabled for the ports in this vlan. However, the guards will not be disabled if the ports are removed from the vlan using chvlan or rmvlan commands. To disable them, you need to use the switch command line interface. Refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. =head1 PARAMETERS @@ -46,7 +46,7 @@ I is a unique vlan number. If it is omitted, xCAT will automatically gen =over 10 -=item B<-n|--nodes> The nodes or groups to be included in the vlan. It can be stand alone nodes or KVM guests. It takes the noderange format. Please check the man page for noderange for details. +=item B<-n|--nodes> The nodes or groups to be included in the vlan. It can be stand alone nodes or KVM guests. It takes the noderange format. Check the man page for noderange for details. =item B<-t|--net> The subnet for the vlan. @@ -81,7 +81,7 @@ To start, the xCAT switches and switches table needs to be filled with switch an "node3","switch1","12",,"primary:eth0",, "node3","switch2","3",,"eth1",, -Please note that the interface value for the management (primary) network can be empty, the word "primary" or "primary:ethx". For other networks, the interface attribute must be specified. +Note that the interface value for the management (primary) network can be empty, the word "primary" or "primary:ethx". For other networks, the interface attribute must be specified. The following is an example of the switches table diff --git a/xCAT-vlan/pods/man1/rmvlan.1.pod b/xCAT-vlan/pods/man1/rmvlan.1.pod index 5f428edfa..ac6a27c97 100755 --- a/xCAT-vlan/pods/man1/rmvlan.1.pod +++ b/xCAT-vlan/pods/man1/rmvlan.1.pod @@ -14,7 +14,7 @@ B [B<-v>|B<--version>] The B 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. -For added security, the root guard and bpdu guard were enabled for the ports in this vlan by mkvlan and chvlan commands. However, the guards will not be disabled by this command. To disable them, you need to use the switch command line interface. Please refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. +For added security, the root guard and bpdu guard were enabled for the ports in this vlan by mkvlan and chvlan commands. However, the guards will not be disabled by this command. To disable them, you need to use the switch command line interface. Refer to the switch command line interface manual to see how to disable the root guard and bpdu guard for a port. =head1 Parameters diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index cdf6e0fcb..45b021da9 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -853,7 +853,7 @@ run_ps () { local compt=\$(file \$1) local reg=\"shell script\" if [[ \"\$compt\" =~ \$reg ]]; then - bash -x ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug + bash -x ./\$@ 2>&1 | tee -a \$logfile | tee >(logger -t xcat -p debug) ret_local=\${PIPESTATUS[0]} else ./\$@ 2>&1 | tee -a \$logfile | logger -t xcat -p debug diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 3c74a8517..1d0f1d234 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -64,12 +64,12 @@ Requires: elilo-xcat xnba-undi %ifarch i386 i586 i686 x86 x86_64 Requires: syslinux -Requires: ipmitool-xcat >= 1.8.15-2 +Requires: ipmitool-xcat >= 1.8.17 %endif %ifos linux %ifarch ppc ppc64 ppc64le -Requires: ipmitool-xcat >= 1.8.15-2 +Requires: ipmitool-xcat >= 1.8.17 %endif %endif diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index 84cbcf5e5..688cffb2c 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -59,11 +59,11 @@ Requires: elilo-xcat xnba-undi %ifarch i386 i586 i686 x86 x86_64 Requires: syslinux -Requires: ipmitool-xcat >= 1.8.15-2 +Requires: ipmitool-xcat >= 1.8.17 %endif %ifos linux %ifarch ppc ppc64 ppc64le -Requires: ipmitool-xcat >= 1.8.15-2 +Requires: ipmitool-xcat >= 1.8.17 %endif %endif