diff --git a/Version b/Version index e3d069645..3b1fc7950 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -2.15 +2.15.1 diff --git a/builddep.sh b/builddep.sh index 75235fa99..acb4a8fc2 100755 --- a/builddep.sh +++ b/builddep.sh @@ -22,6 +22,7 @@ # Verifies no broken link files in ..../// # Verifies there are no multiple, real (non-link) files with the same name # Verifies all real (non-link) files have a link to it +# Verifies all files have read permission set for all # VERBOSE=1 - Set to 1 to see more VERBOSE output # This script should only be run on RPM based machines @@ -189,6 +190,15 @@ if [[ ${CHECK} -eq 1 ]]; then fi done + # Find files that have read permission missing for "all" + MISSING_PERMISSION=`find $GSA/* -type f -not -perm -444` + for file in $MISSING_PERMISSION; do + echo "Verify permission for file: " + echo " " $(ls -l $file) + ERROR=1 + done + + if [[ ${ERROR} -eq 1 ]]; then echo -e "\nErrors found verifying files. Rerun this script with CHECK=0 to skip file verification." exit 1 @@ -268,8 +278,8 @@ chgrp -R -h $SYSGRP * chmod -R g+w * # Change permission on all repodata files to be readable by all -chmod a+r */*/repodata/*.gz -chmod a+r */*/repodata/*.bz2 +chmod a+rx */*/repodata +chmod a+r */*/repodata/* TARBALL_WORKING_DIR="${XCATCOREDIR}/${DESTDIR}" echo "===> Building the tarball at: ${TARBALL_WORKING_DIR} ..." diff --git a/docs/source/advanced/hierarchy/configure_dhcp.rst b/docs/source/advanced/hierarchy/configure_dhcp.rst index 06fe9e258..bd61f2450 100644 --- a/docs/source/advanced/hierarchy/configure_dhcp.rst +++ b/docs/source/advanced/hierarchy/configure_dhcp.rst @@ -3,10 +3,9 @@ Configure DHCP Add the relevant networks into the DHCP configuration, refer to: :ref:`Setup-dhcp` -Add the defined nodes into the DHCP configuration, refer to: -`XCAT_pLinux_Clusters/#configure-dhcp `_ +Add the defined nodes into the DHCP configuration, refer to :doc:`Manually define nodes ` -In the large cluster, the size of dhcp lease file "/var/lib/dhcpd/dhcpd.leases" on the DHCP server will grow over time. At around 100MB in size, the DHCP server will take a long time to respond to DHCP requests from clients and cause DHCP timeouts: :: +In the large cluster, the size of dhcp lease file ``/var/lib/dhcpd/dhcpd.leases`` on the DHCP server will grow over time. At around 100MB in size, the DHCP server will take a long time to respond to DHCP requests from clients and cause DHCP timeouts: :: ... Mar 2 01:59:10 c656ems2 dhcpd: DHCPDISCOVER from 00:0a:f7:73:7d:d0 via eth0 diff --git a/docs/source/advanced/hierarchy/databases/mysql_install.rst b/docs/source/advanced/hierarchy/databases/mysql_install.rst index 67cb8c8c4..ef6094a8e 100644 --- a/docs/source/advanced/hierarchy/databases/mysql_install.rst +++ b/docs/source/advanced/hierarchy/databases/mysql_install.rst @@ -63,6 +63,16 @@ Suse Linux Enterprise Server libmysqlclient18-* perl-DBD-mysql-* +* For SLE15, MariaDB is shipped. Using ``zypper``, ensure that the following packages are installed on the management node: :: + + mariadb + mariadb-client + mariadb-errormessages + perl-DBD-mysql + libmariadb-devel + mariadb-tools + libmariadb_plugins + Debian/Ubuntu ------------- diff --git a/docs/source/advanced/hierarchy/databases/mysql_using.rst b/docs/source/advanced/hierarchy/databases/mysql_using.rst index 6c97859e5..c3d6f42e7 100644 --- a/docs/source/advanced/hierarchy/databases/mysql_using.rst +++ b/docs/source/advanced/hierarchy/databases/mysql_using.rst @@ -19,6 +19,11 @@ Start/Stop MySQL/MariaDB service service mysql start service mysql stop +**[SLE15]** : :: + + systemctl start mariadb + systemctl stop mariadb + Basic MySQL/MariaDB commands ----------------------------- diff --git a/docs/source/advanced/hierarchy/define_service_node.rst b/docs/source/advanced/hierarchy/define_service_node.rst index 81e6c8557..3c2d8ec1f 100644 --- a/docs/source/advanced/hierarchy/define_service_node.rst +++ b/docs/source/advanced/hierarchy/define_service_node.rst @@ -11,41 +11,41 @@ be adding the information to the database that will tell xCAT which service nodes (SN) will service which compute nodes (CN). For this example, we have two service nodes: **sn1** and **sn2**. We will call -our Management Node: **mn1**. Note: service nodes are, by convention, in a +our Management Node: **mn1**. Service nodes are, by convention, in a group called **service**. Some of the commands in this document will use the group **service** to update all service nodes. -Note: a Service Node's service node is the Management Node; so a service node -must have a direct connection to the management node. The compute nodes do not -have to be directly attached to the Management Node, only to their service -node. This will all have to be defined in your networks table. +.. note:: a Service Node's service node is the Management Node; so a service node + must have a direct connection to the management node. The compute nodes do not + have to be directly attached to the Management Node, only to their service + node. This will all have to be defined in your networks table. Add Service Nodes to the nodelist Table --------------------------------------- Define your service nodes (if not defined already), and by convention we put -them in a **service** group. We usually have a group compute for our compute +them in a **service** group. We usually have a group **compute** for our compute nodes, to distinguish between the two types of nodes. (If you want to use your -own group name for service nodes, rather than service, you need to change some -defaults in the xCAT db that use the group name service. For example, in the -postscripts table there is by default a group entry for service, with the +own group name for service nodes, rather than **service**, you need to change some +defaults in the xCAT db that use the group name **service**. For example, in the +postscripts table there is by default a group entry for **service**, with the appropriate postscripts to run when installing a service node. Also, the default ``kickstart/autoyast`` template, pkglist, etc that will be used have -files names based on the profile name service.) :: +files names based on the profile name **service**.) :: mkdef sn1,sn2 groups=service,ipmi,all Add OS and Hardware Attributes to Service Nodes ----------------------------------------------- -When you ran copycds, it creates several osimage definitions, including some +When you ran ``copycds``, it creates several osimage definitions, including some appropriate for SNs. Display the list of osimages and choose one with -"service" in the name: :: +**service** in the name: :: lsdef -t osimage For this example, let's assume you chose the stateful osimage definition for -rhels 7: rhels7-x86_64-install-service . If you want to modify any of the +rhels 7: ``rhels7-x86_64-install-service`` . If you want to modify any of the osimage attributes (e.g. ``kickstart/autoyast`` template, pkglist, etc), make a copy of the osimage definition and also copy to ``/install/custom`` any files it points to that you are modifying. @@ -60,19 +60,19 @@ Now set some of the common attributes for the SNs at the group level: :: primarynic=mac \ provmethod=rhels7-x86_64-install-service -Add Service Nodes to the servicenode Table +Add Service Nodes to the ``servicenode`` Table ------------------------------------------ -An entry must be created in the servicenode table for each service node or the -service group. This table describes all the services you would like xcat to +An entry must be created in the ``servicenode`` table for each service node or the +**service** group. This table describes all the services you would like xcat to setup on the service nodes. (Even if you don't want xCAT to set up any -services - unlikely - you must define the service nodes in the servicenode +services - unlikely - you must define the service nodes in the ``servicenode`` table with at least one attribute set (you can set it to 0), otherwise it will not be recognized as a service node.) -When the xcatd daemon is started or restarted on the service node, it will +When the ``xcatd`` daemon is started or restarted on the service node, it will make sure all of the requested services are configured and started. (To -temporarily avoid this when restarting xcatd, use "service xcatd reload" +temporarily avoid this when restarting ``xcatd``, use ``service xcatd reload`` instead.) To set up the minimum recommended services on the service nodes: :: @@ -82,23 +82,21 @@ To set up the minimum recommended services on the service nodes: :: setupnameserver=1 \ setupconserver=1 -.. TODO - See the ``setup*`` attributes in the :doc:`node manpage ` for the services available. (The HTTP server is also started when setupnfs is set.) -If you are using the setupntp postscript on the compute nodes, you should also -set setupntp=1. For clusters with subnetted management networks (i.e. the +If you are using the ``setupntp`` postscript on the compute nodes, you should also +set ``setupntp=1``. For clusters with subnetted management networks (i.e. the network between the SN and its compute nodes is separate from the network -between the MN and the SNs) you might want to also set setupipforward=1. +between the MN and the SNs) you might want to also set ``setupipforward=1``. .. _add_service_node_postscripts_label: Add Service Node Postscripts ---------------------------- -By default, xCAT defines the service node group to have the "servicenode" +By default, xCAT defines the **service** node group to have the ``servicenode`` postscript run when the SNs are installed or diskless booted. This -postscript sets up the xcatd credentials and installs the xCAT software on +postscript sets up the ``xcatd`` credentials and installs the xCAT software on the service nodes. If you have your own postscript that you want run on the SN during deployment of the SN, put it in ``/install/postscripts`` on the MN and add it to the service node postscripts or postbootscripts. For example: :: @@ -113,7 +111,7 @@ Notes: * Make sure that the servicenode postscript is set to run before the otherpkgs postscript or you will see errors during the service node deployment. - * The -p flag automatically adds the specified postscript at the end of the + * The ``-p`` flag automatically adds the specified postscript at the end of the comma-separated list of postscripts (or postbootscripts). If you are running additional software on the service nodes that need **ODBC** @@ -125,43 +123,42 @@ the xCAT supplied postbootscript called "odbcsetup". :: Assigning Nodes to their Service Nodes -------------------------------------- -The node attributes **servicenode** and **xcatmaster** define which SN -services this particular node. The servicenode attribute for a compute node -defines which SN the MN should send a command to (e.g. xdsh), and should be +The node attributes ``servicenode`` and ``xcatmaster`` define which SN +services this particular node. The ``servicenode`` attribute for a compute node +defines which SN the MN should send a command to (e.g. ``xdsh``), and should be set to the hostname or IP address of the service node that the management -node contacts it by. The xcatmaster attribute of the compute node defines +node contacts it by. The ``xcatmaster`` attribute of the compute node defines which SN the compute node should boot from, and should be set to the hostname or IP address of the service node that the compute node contacts it -by. Unless you are using service node pools, you must set the xcatmaster +by. Unless you are using service node pools, you must set the ``xcatmaster`` attribute for a node when using service nodes, even if it contains the same -value as the node's servicenode attribute. +value as the node's ``servicenode`` attribute. Host name resolution must have been setup in advance, with ``/etc/hosts``, DNS or dhcp to ensure that the names put in this table can be resolved on the Management Node, Service nodes, and the compute nodes. It is easiest to have a node group of the compute nodes for each service node. For example, if all the -nodes in node group compute1 are serviced by sn1 and all the nodes in node -group compute2 are serviced by sn2: +nodes in node group **compute1** are serviced by sn1 and all the nodes in node +group **compute2** are serviced by sn2: :: chdef -t group compute1 servicenode=sn1 xcatmaster=sn1-c chdef -t group compute2 servicenode=sn2 xcatmaster=sn2-c -Note: in this example, sn1 and sn2 are the node names of the service nodes -(and therefore the hostnames associated with the NICs that the MN talks to). -The hostnames sn1-c and sn2-c are associated with the SN NICs that communicate -with their compute nodes. +.. note:: In this example, sn1 and sn2 are the node names of the service nodes + (and therefore the hostnames associated with the NICs that the MN talks to). + The hostnames sn1-c and sn2-c are associated with the SN NICs that communicate + with their compute nodes. -Note: if not set, the attribute tftpserver's default value is xcatmaster, -but in some releases of xCAT it has not defaulted correctly, so it is safer -to set the tftpserver to the value of xcatmaster. +.. note:: If not set, the attribute tftpserver's default value is ``xcatmaster``, + but in some releases of xCAT it has not defaulted correctly, so it is safer + to set the tftpserver to the value of ``xcatmaster``. These attributes will allow you to specify which service node should run the conserver (console) and monserver (monitoring) daemon for the nodes in the group specified in the command. In this example, we are having each node's -primary SN also act as its conserver and monserver (the most typical setup). -:: +primary SN also act as its conserver and monserver (the most typical setup). :: chdef -t group compute1 conserver=sn1 monserver=sn1,sn1-c chdef -t group compute2 conserver=sn2 monserver=sn2,sn2-c @@ -176,22 +173,22 @@ for work-load balancing on the service nodes. But note that the selection of which SN will service which compute node is made at compute node boot time. After that, the selection of the SN for this compute node is fixed until the compute node is rebooted or the compute node is explicitly moved to another SN -using the `snmove `_ command. +using the :doc:`snmove ` command. To use Service Node pools, you need to architect your network such that all of the compute nodes and service nodes in a particular pool are on the same flat network. If you don't want the management node to respond to manage some of the compute nodes, it shouldn't be on that same flat network. The -site, dhcpinterfaces attribute should be set such that the SNs' DHCP daemon +``site`` table, ``dhcpinterfaces`` attribute should be set such that the SNs' DHCP daemon only listens on the NIC that faces the compute nodes, not the NIC that faces the MN. This avoids some timing issues when the SNs are being deployed (so that they don't respond to each other before they are completely ready). You -also need to make sure the `networks `_ table +also need to make sure the :doc:`networks ` table accurately reflects the physical network structure. To define a list of service nodes that support a set of compute nodes, set the -servicenode attribute to a comma-delimited list of the service nodes. When -running an xCAT command like xdsh or updatenode for compute nodes, the list +``servicenode`` attribute to a comma-delimited list of the service nodes. When +running an xCAT command like ``xdsh`` or ``updatenode`` for compute nodes, the list will be processed left to right, picking the first service node on the list to run the command. If that service node is not available, then the next service node on the list will be chosen until the command is successful. Errors will @@ -201,10 +198,10 @@ service nodes as we do below. When using service node pools, the intent is to have the service node that responds first to the compute node's DHCP request during boot also be the -xcatmaster, the tftpserver, and the NFS/http server for that node. Therefore, -the xcatmaster and nfsserver attributes for nodes should not be set. When -nodeset is run for the compute nodes, the service node interface on the -network to the compute nodes should be defined and active, so that nodeset +``xcatmaster``, the ``tftpserver``, and the NFS/http server for that node. Therefore, +the ``xcatmaster`` and ``nfsserver`` attributes for nodes should not be set. When +``nodeset`` is run for the compute nodes, the service node interface on the +network to the compute nodes should be defined and active, so that ``nodeset`` will default those attribute values to the "node ip facing" interface on that service node. @@ -213,30 +210,29 @@ For example: :: chdef -t node compute1 servicenode=sn1,sn2 xcatmaster="" nfsserver="" chdef -t node compute2 servicenode=sn2,sn1 xcatmaster="" nfsserver="" -You need to set the sharedtftp site attribute to 0 so that the SNs will not -automatically mount the ``/tftpboot`` directory from the management node: -:: +You need to set the ``sharedtftp`` site attribute to ``0`` so that the SNs will not +automatically mount the ``/tftpboot`` directory from the management node: :: chdef -t site clustersite sharedtftp=0 -For stateful (diskful) installs, you will need to use a local ``/install`` directory on each service node. The ``/install/autoinst/node`` files generated by nodeset will contain values specific to that service node for correctly installing the nodes. :: +For stateful (diskful) installs, you will need to use a local ``/install`` directory on each service node. The ``/install/autoinst/node`` files generated by ``nodeset`` will contain values specific to that service node for correctly installing the nodes. :: chdef -t site clustersite installloc="" -With this setting, you will need to remember to rsync your ``/install`` +With this setting, you will need to remember to ``rsync`` your ``/install`` directory from the xCAT management node to the service nodes anytime you change your ``/install/postscripts``, custom osimage files, os repositories, or other directories. It is best to exclude the ``/install/autoinst`` directory -from this rsync. +from this ``rsync``. :: rsync -auv --exclude 'autoinst' /install sn1:/ -Note: If your service nodes are stateless and site.sharedtftp=0, if you reboot -any service node when using servicenode pools, any data written to the local -``/tftpboot`` directory of that SN is lost. You will need to run nodeset for -all of the compute nodes serviced by that SN again. +.. note:: If your service nodes are stateless and ``site.sharedtftp=0``, if you reboot + any service node when using servicenode pools, any data written to the local + ``/tftpboot`` directory of that SN is lost. You will need to run ``nodeset`` for + all of the compute nodes serviced by that SN again. For additional information about service node pool related settings in the networks table, see ref: networks table, see :ref:`setup_networks_table_label`. @@ -246,13 +242,13 @@ Conserver and Monserver and Pools The support of conserver and monserver with Service Node Pools is still not supported. You must explicitly assign these functions to a service node using -the nodehm.conserver and noderes.monserver attribute as above. +the ``nodehm.conserver`` and ``noderes.monserver`` attribute as above. Setup Site Table ---------------- If you are not using the NFS-based statelite method of booting your compute -nodes, set the installloc attribute to ``/install``. This instructs the +nodes, set the ``installloc`` attribute to ``/install``. This instructs the service node to mount ``/install`` from the management node. (If you don't do this, you have to manually sync ``/install`` between the management node and the service nodes.) :: @@ -261,25 +257,25 @@ the service nodes.) :: For IPMI controlled nodes, if you want the out-of-band IPMI operations to be done directly from the management node (instead of being sent to the -appropriate service node), set site.ipmidispatch=n. +appropriate service node), set ``site.ipmidispatch=n``. If you want to throttle the rate at which nodes are booted up, you can set the following site attributes: -* syspowerinterval -* syspowermaxnodes -* powerinterval (system p only) +* ``syspowerinterval`` +* ``syspowermaxnodes`` +* ``powerinterval`` (system p only) -See the `site table man page `_ for details. +See the :doc:`site table man page ` for details. .. _setup_networks_table_label: Setup networks Table -------------------- -All networks in the cluster must be defined in the networks table. When xCAT -is installed, it runs makenetworks, which creates an entry in the networks +All networks in the cluster must be defined in the ``networks`` table. When xCAT +is installed, it runs ``makenetworks``, which creates an entry in the ``networks`` table for each of the networks the management node is on. You need to add entries for each network the service nodes use to communicate to the compute nodes. @@ -288,28 +284,27 @@ For example: :: mkdef -t network net1 net=10.5.1.0 mask=255.255.255.224 gateway=10.5.1.1 -If you want to set the nodes' xcatmaster as the default gateway for the nodes, -the gateway attribute can be set to keyword "". In this case, xCAT -code will automatically substitute the IP address of the node's xcatmaster for -the keyword. Here is an example: -:: +If you want to set the nodes' ``xcatmaster`` as the default gateway for the nodes, +the ``gateway`` attribute can be set to keyword ````. In this case, xCAT +code will automatically substitute the IP address of the node's ``xcatmaster`` for +the keyword. Here is an example: :: mkdef -t network net1 net=10.5.1.0 mask=255.255.255.224 gateway= -The ipforward attribute should be enabled on all the xcatmaster nodes that -will be acting as default gateways. You can set ipforward to 1 in the -servicenode table or add the line "net.ipv4.ip_forward = 1" in file -``/etc/sysctl.conf`` and then run "sysctl -p /etc/sysctl.conf" manually to +The ``ipforward`` attribute should be enabled on all the ``xcatmaster`` nodes that +will be acting as default gateways. You can set ``ipforward`` to ``1`` in the +``servicenode`` table or add the line ``net.ipv4.ip_forward = 1`` in file +``/etc/sysctl.conf`` and then run ``sysctl -p /etc/sysctl.conf`` manually to enable the ipforwarding. -Note:If using service node pools, the networks table dhcpserver attribute can -be set to any single service node in your pool. The networks tftpserver, and -nameserver attributes should be left blank. +.. note:: If using service node pools, the ``networks`` table ``dhcpserver`` attribute can + be set to any single service node in your pool. The networks ``tftpserver``, and + ``nameserver`` attributes should be left blank. Verify the Tables -------------------- -To verify that the tables are set correctly, run lsdef on the service nodes, +To verify that the tables are set correctly, run ``lsdef`` on the service nodes, compute1, compute2: :: lsdef service,compute1,compute2 @@ -318,22 +313,21 @@ Add additional adapters configuration script (optional) ------------------------------------------------------------ It is possible to have additional adapter interfaces automatically configured -when the nodes are booted. XCAT provides sample configuration scripts for +when the nodes are booted. xCAT provides sample configuration scripts for ethernet, IB, and HFI adapters. These scripts can be used as-is or they can be modified to suit your particular environment. The ethernet sample is ``/install/postscript/configeth``. When you have the configuration script that -you want you can add it to the "postscripts" attribute as mentioned above. Make +you want you can add it to the ``postscripts`` attribute as mentioned above. Make sure your script is in the ``/install/postscripts`` directory and that it is executable. -Note: For system p servers, if you plan to have your service node perform the -hardware control functions for its compute nodes, it is necessary that the SN -ethernet network adapters connected to the HW service VLAN be configured. +.. note:: For system p servers, if you plan to have your service node perform the + hardware control functions for its compute nodes, it is necessary that the SN + ethernet network adapters connected to the HW service VLAN be configured. Configuring Secondary Adapters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -To configure secondary adapters, see `Configuring_Secondary_Adapters -`_ +To configure secondary adapters, see :doc:`Configure Additional Network Interfaces ` diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_preparation.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_preparation.rst index 12fdcd6cf..9e7720886 100644 --- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_preparation.rst +++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_preparation.rst @@ -37,7 +37,7 @@ The ``mlnxofed_ib_install`` is a sample script intended to assist with the insta | | || option list. | | | || | | | || If nothing is specified, xCAT passes the the following | - | | || ``--without-32bit --with out-fw-update --force`` | + | | || ``--without-32bit --without-fw-update --force`` | +---------+------------------+----------------------------------------------------------+ |``-i`` | For diskless || The image root path of the diskless image | | | || | diff --git a/docs/source/advanced/performance_tuning/httpd_tuning.rst b/docs/source/advanced/performance_tuning/httpd_tuning.rst index 867fdb036..adb7f5f5a 100644 --- a/docs/source/advanced/performance_tuning/httpd_tuning.rst +++ b/docs/source/advanced/performance_tuning/httpd_tuning.rst @@ -6,9 +6,9 @@ In xCAT, the Operation System provisioning over network is heavily relying on th #. Tuning MaxRequestWorkers directive -By default, httpd is configured to use ``prefork`` module for **MPM**, which has a limit of 256 simultaneous requests. If any slow httpd response issue was hit during OS provisioning, you can increase **MaxRequestWorkers** directive for greater performance. +By default, httpd is configured to use ``prefork`` module for **MPM**, which has a limit of 256 simultaneous requests. If slow httpd response observed during OS provisioning, you can increase **MaxRequestWorkers** directive for better performance. -For example, to avoid some nodes provisioning failure when rebooting all nodes in a large hierarchy stateless cluster ( one service node is serving 270 compute nodes ). It is suggested to increased the value from 256 to 1000. +For example, to avoid some nodes provisioning failure when rebooting all nodes in a large hierarchy stateless cluster ( one service node is serving 270 compute nodes ), increase the value from 256 to 1000. On Red Hat, change (or add) these directives in :: @@ -24,9 +24,9 @@ For example, to avoid some nodes provisioning failure when rebooting all nodes i #. Having httpd Cache the Files It Is Serving -Note: this information was contributed by Jonathan Dye and is provided here as an example. The details may have to be changed for distro or apache version. +.. note:: this information was contributed by Jonathan Dye and is provided here as an example. The details may have to be changed for distro or apache version. -This is simplest if you set noderes.nfsserver to a separate apache server, and then you can configure it to reverse proxy and cache. For some reason mod_mem_cache doesn't seem to behave as expected, so you can use mod_disk_cache to achieve a similar result: make a tmpfs on the apache server and configure its mountpoint to be the directory that CacheRoot points to. Also tell it to ignore /install/autoinst since the caching settings are really aggressive. Do a recursive wget to warm the cache and watch the tmpfs fill up. Then do a bunch of kickstart installs. Before this, the apache server on the xcat management node may have been a bottleneck during kickstart installs. After this change, it no longer should be. +This is simplest if you set ``noderes.nfsserver`` to a separate apache server, and then you can configure it to reverse proxy and cache. For some reason ``mod_mem_cache`` doesn't seem to behave as expected, so you can use ``mod_disk_cache`` to achieve a similar result: make a ``tmpfs`` on the apache server and configure its mountpoint to be the directory that ``CacheRoot`` points to. Also tell it to ignore ``/install/autoinst`` since the caching settings are really aggressive. Do a recursive ``wget`` to warm the cache and watch the ``tmpfs`` fill up. Then do a bunch of kickstart installs. Before this, the apache server on the xcat management node may have been a bottleneck during kickstart installs. After this change, it no longer should be. Here is the apache config file: :: diff --git a/docs/source/advanced/restapi/restapi_usage/restapi_usage.rst b/docs/source/advanced/restapi/restapi_usage/restapi_usage.rst index ecca3b8e8..58d4f13f2 100644 --- a/docs/source/advanced/restapi/restapi_usage/restapi_usage.rst +++ b/docs/source/advanced/restapi/restapi_usage/restapi_usage.rst @@ -217,9 +217,9 @@ It can be used as an example script to access and control xCAT resources. From t ./xcatws-test.sh -u root -p cluster -h -t ./xcatws-test.sh -u root -p cluster -h -c -t -But for exploration and experimentation, you can make API calls from your browser or by using the **curl** command. +But for exploration and experimentation, you can make API calls from your browser or by using the ``curl`` command. -To make an API call from your browser, use the desired URL from this document. To simplify the test step, all the examples for the resources use 'curl -k' for unsecure http connection and use the 'username+password' to authenticate the user. :: +To make an API call from your browser, use the desired URL from this document. To simplify the test step, all the examples for the resources use ``curl -k`` for unsecure http connection and use the 'username+password' to authenticate the user. :: curl -X GET -k 'https://myserver/xcatws/nodes?userName=xxx&userPW=xxx&pretty=1' @@ -276,5 +276,4 @@ References * General JSON: http://www.json.org/ * JSON wrapping: http://search.cpan.org/~makamaka/JSON-2.27/lib/JSON.pm * Apache CGI: http://httpd.apache.org/docs/2.2/howto/cgi.html - * Perl CGI: http://perldoc.perl.org/CGI.html diff --git a/docs/source/advanced/sysclone/sysclone.rst b/docs/source/advanced/sysclone/sysclone.rst index 7e1fbebbe..1510aa5d8 100644 --- a/docs/source/advanced/sysclone/sysclone.rst +++ b/docs/source/advanced/sysclone/sysclone.rst @@ -101,25 +101,25 @@ To support clone, add 'otherpkglist' and 'otherpkgdir' attributes to the image d chdef -t osimage -o otherpkglist=/opt/xcat/share/xcat/install/rh/sysclone.rhels6.x86_64.otherpkgs.pkglist chdef -t osimage -o -p otherpkgdir=/install/post/otherpkgs/rhels6.4/x86_64 - updatenode -S + updatenode -S * **[CentOS6.3 and x86_64]**:: chdef -t osimage -o otherpkglist=/opt/xcat/share/xcat/install/rh/sysclone.rhels6.x86_64.otherpkgs.pkglist chdef -t osimage -o -p otherpkgdir=/install/post/otherpkgs/CentOS6.3/x86_64 - updatenode -S + updatenode -S * **[SLES11.3 and x86_64]**:: chdef -t osimage -o otherpkglist=/opt/xcat/share/xcat/install/sles/sysclone.sles11.x86_64.otherpkgs.pkglist chdef -t osimage -o -p otherpkgdir=/install/post/otherpkgs/SLES11.3/x86_64 - updatenode -S + updatenode -S * **[RH6.3 and ppc64]**:: chdef -t osimage -o otherpkglist=/opt/xcat/share/xcat/install/rh/sysclone.rhels6.ppc64.otherpkgs.pkglist chdef -t osimage -o -p otherpkgdir=/install/post/otherpkgs/rhels6.3/ppc64 - updatenode -S + updatenode -S *[Note]: If you install systemimager RPMs on CentOS 6.5 node by above steps, you maybe hit a failure. This is a known issue with CentOS6.5. Refer to known issue section for help.* diff --git a/docs/source/conf.py b/docs/source/conf.py index 715fa4035..0a3d8b2c3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,7 +59,7 @@ author = u'IBM Corporation' # The short X.Y version. version = '2' # The full version, including alpha/beta/rc tags. -release = '2.15.0' +release = '2.15.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/developers/guides/docs/doc_guidelines.rst b/docs/source/developers/guides/docs/doc_guidelines.rst index ce121d4f5..1c07bdf39 100644 --- a/docs/source/developers/guides/docs/doc_guidelines.rst +++ b/docs/source/developers/guides/docs/doc_guidelines.rst @@ -137,9 +137,9 @@ Add links to refer other web page is a very common way in writing document, it' * **Add an External Link** - Link to an external web page: `google `_: :: + Link to an external web page: `google `_: :: - `google `_ + `google `_ .. 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 9f3ad3ec8..cc170bd82 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 @@ -38,7 +38,7 @@ The partition file must follow the partitioning syntax of the respective install * Use yast2 autoyast in GUI or CLI mode to customize the installation options and create autoyast file * Use yast2 clone_system to create autoyast configuration file /root/autoinst.xml to clone an existing system - * Ubuntu: `Preseed documentation `_ + * Ubuntu: `Preseed documentation `_ * For detailed information see the files ``partman-auto-recipe.txt`` and ``partman-auto-raid-recipe.txt`` included in the debian-installer package. Both files are also available from the debian-installer source repository. 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 17b8ea5cb..cc639b4b0 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 @@ -4,7 +4,7 @@ Enable kdump Over Ethernet Overview -------- -kdump is an feature of the Linux kernel that allows the system to be booted from the context of another kernel. This second kernel reserves a small amount of memory and its only purpose is to capture the core dump in the event of a kernel crash. The ability to analyze the core dump helps to determine causes of system failures. +``kdump`` is an feature of the Linux kernel that allows the system to be booted from the context of another kernel. This second kernel reserves a small amount of memory and its only purpose is to capture the core dump in the event of a kernel crash. The ability to analyze the core dump helps to determine causes of system failures. xCAT Interface @@ -22,7 +22,7 @@ The following attributes of an osimage should be modified to enable ``kdump``: Configure the ``pkglist`` file ------------------------------ -The ``pkglist`` for the osimage needs to include the appropriate RPMs. The following list of RPMs are provided as a sample, always refer to the Operating System specific documentataion to ensure the required packages are there for ``kdump`` support. +The ``pkglist`` for the osimage needs to include the appropriate RPMs. The following list of RPMs are provided as a sample, always refer to the Operating System specific documentation to ensure the required packages are there for ``kdump`` support. * **[RHELS]** :: @@ -53,7 +53,7 @@ Run ``packimage`` to update the diskless image with the changes. The ``postinstall`` file ------------------------ -The kdump will create a new initrd which used in the dumping stage. The ``/tmp`` or ``/var/tmp`` directory will be used as the temporary directory. These 2 directory only are allocated 10M space by default. You need to enlarge it to 200M. Modify the postinstall file to increase ``/tmp`` space. +The ``kdump`` will create a new initrd which is used in the dumping stage. The ``/tmp`` or ``/var/tmp`` directory will be used as the temporary directory. These two directories are only allocated 10M space by default. You need to enlarge it to 200M. Modify the postinstall file to increase ``/tmp`` space. * **[RHELS]** :: @@ -70,7 +70,7 @@ The kdump will create a new initrd which used in the dumping stage. The ``/tmp`` The ``dump`` attribute ---------------------- -To support kernel dumps, the ``dump`` attribute **must** be set on the osimage definition. If not set, kdump service will not be enabled. The ``dump`` attribute defines the NFS remote path where the crash information is to be stored. +To support kernel dumps, the ``dump`` attribute **must** be set in the osimage definition. If not set, ``kdump`` service will not be enabled. The ``dump`` attribute defines the NFS remote path where the crash information is to be stored. Use the ``chdef`` command to set a value of the ``dump`` attribute: :: @@ -80,7 +80,7 @@ If the NFS server is the Service Node or Management Node, the server can be left chdef -t osimage dump=nfs:/// -**Note:** Only NFS is currently supported as a storage location. Make sure the NFS remote path(``nfs:///``) is exported and it is read-writeable to the node where kdump service is enabled. +.. note:: Only NFS is currently supported as a storage location. Make sure the NFS remote path (``nfs:///``) is exported and it is read-writeable on the node where ``kdump`` service is enabled. The ``crashkernelsize`` attribute @@ -102,18 +102,18 @@ For setting specific sizes, use the following example: chdef -t osimage crashkernelsize=@32M -**Notes**: the value of the ``crashkernelsize`` depends on the total physical memory size on the machine. For more about size, refer to `Appedix`_ +.. note:: The value of the ``crashkernelsize`` depends on the total physical memory size on the machine. For more about size, refer to `Appedix`_ -If kdump start error like this: :: +If ``kdump`` start displays error like this: :: Your running kernel is using more than 70% of the amount of space you reserved for kdump, you should consider increasing your crashkernel -The ``crashkernelsize`` is not large enough, you should change the ``crashkernelsize`` larger until the error message disappear. +The ``crashkernelsize`` is not large enough, you should increase the ``crashkernelsize`` until the error message disappears. The ``enablekdump`` postscript ------------------------------ -xCAT provides a postscript ``enablekdump`` that can be added to the Nodes to automatically start the ``kdump`` service when the node boots. Add to the nodes using the following command: :: +xCAT provides a postscript ``enablekdump`` that can be added to the node definition to automatically start the ``kdump`` service when the node boots. :: chdef -t node -p postscripts=enablekdump @@ -147,13 +147,13 @@ Once the system has returned from recovering the crash, you can analyze the kern #. Locate the recent vmcore dump file. -#. Locate the kernel file for the crash server. The kernel is under ``/tftpboot/xcat/netboot////kernel`` on the managenent node. +#. Locate the kernel file for the crash server. The kernel is under ``/tftpboot/xcat/netboot////kernel`` on the management node. #. Once you have located a vmcore dump file and kernel file, call ``crash``: :: crash -**Note:** If ``crash`` cannot find any files, make sure you have the ``kernel-debuginfo`` package installed. +.. note:: If ``crash`` cannot find any files, make sure you have the ``kernel-debuginfo`` package installed. Appedix ------- @@ -170,4 +170,3 @@ Appedix * http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s1-kdump-crash.htmlRHELdocument - * http://www.novell.com/support/kb/doc.php?id=3374462SLESdocument diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_ethernet_nic.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_ethernet_nic.rst index abf105bb4..cea71e849 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_ethernet_nic.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_ethernet_nic.rst @@ -28,7 +28,7 @@ Define Adapters in the nics table #. Data NIC ``eth1`` is not install NIC, configure ``eth1`` into ``nics`` table :: - chdef cn1 nicips.eth1="13.1.89.7" nicnetworks.eth1="net13" nictypes.eth1="Ethernet" nichostnamesuffixes.eth1=-eth2 + chdef cn1 nicips.eth1="13.1.89.7" nicnetworks.eth1="net13" nictypes.eth1="Ethernet" nichostnamesuffixes.eth1=-eth1 Update /etc/hosts ~~~~~~~~~~~~~~~~~ @@ -66,7 +66,7 @@ Configure adapters with static IPs updatenode cn1 -P "confignetwork" -**Notes:** Option "-s" writes the install NIC's information into configuration file for persistence. All other NIC's data defined in ``nics`` table will be written also. Without option "-s", ``confignetwork`` only configures all NIC's data defined in ``nics`` table. +.. note:: Option ``-s`` writes the install NIC's information into configuration file for persistence. All other NIC's data defined in ``nics`` table will be written also. Without option ``-s``, ``confignetwork`` only configures all NIC's data defined in ``nics`` table. Check result ~~~~~~~~~~~~ diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst index 74e33d59e..6934cbec2 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst @@ -19,3 +19,7 @@ Use ``nicextraparams`` to customize attributes in NIC configuration file. For ex HWADDR=42:f5:0a:05:6a:09 MTU=1456 + #. Example to add `nicextraparams` to `bond` interface :: + + chdef cn1 nicextraparams.bond0='BONDING_OPTS="mode=active-backup;abc=100" MTU=6400 XYZ="4800" IOP="mode=1 phase=2"' + diff --git a/docs/source/guides/admin-guides/manage_clusters/common/parallel_cmd.rst b/docs/source/guides/admin-guides/manage_clusters/common/parallel_cmd.rst index 07b52060a..a079f6082 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/parallel_cmd.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/parallel_cmd.rst @@ -31,7 +31,7 @@ Examples for xdsh - To run the ``ps`` command on node targets node1 and run the remote command with the ``-v`` and ``-t`` flag, enter: :: - xdsh node1,node2 -o"-v -t" ps =item * + xdsh node1,node2 -o "-v -t" ps - To execute the commands contained in myfile in the XCAT context on several node targets, with a fanout of 1, enter: :: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_partition.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_partition.rst index b4aeccd6b..f8a6f5b30 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_partition.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_partition.rst @@ -31,7 +31,7 @@ Partitioning disk file(For Ubuntu only) .. include:: ../../../common/deployment/cfg_partition.rst :start-after: BEGIN_Partition_Disk_File_ubuntu_only :end-before: END_Partition_Disk_File_ubuntu_only - + Additional preseed configuration file(For Ubuntu only) `````````````````````````````````````````````````````` .. include:: ../../../common/deployment/cfg_partition.rst @@ -64,14 +64,14 @@ Associate partition script with osimage :start-after: BEGIN_Partition_Definition_Script_Associate_partition_script_with_osimage_common :end-before: END_Partition_Definition_Script_Associate_partition_script_with_osimage_common -Partitioning disk script(For Ubuntu only) -````````````````````````````````````````` +Partitioning disk script (For Ubuntu only) +`````````````````````````````````````````` .. include:: ../../../common/deployment/cfg_partition.rst :start-after: BEGIN_Partition_Disk_Script_ubuntu_only :end-before: END_Partition_Disk_Script_ubuntu_only -Additional preseed configuration script(For Ubuntu only) -```````````````````````````````````````````````````````` +Additional preseed configuration script (For Ubuntu only) +````````````````````````````````````````````````````````` .. include:: ../../../common/deployment/cfg_partition.rst :start-after: BEGIN_Additional_preseed_configuration_script_ubuntu_only :end-before: END_Additional_preseed_configuration_script_ubuntu_only diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst index 4af7dd135..310f94be0 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst @@ -3,7 +3,7 @@ See :doc:`reventlog manpage ` for more information. -The ``reventlog`` command can be used to display and clear event log information on the service processor, or Baseboard Management Controller (BMC), of a physical machine. +The ``reventlog`` command can be used to display and clear event log information on the service processor, or Baseboard Management Controller (BMC), of a physical machine. OpenBMC based servers need the `IBM OpenBMC tool `_ to obtain more detailed logging messages. For example, to display all event log entries for node ``cn5``: :: diff --git a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst index 9a0962c41..dd303e369 100644 --- a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst @@ -23,7 +23,7 @@ SYNOPSIS \ **bmcdiscover**\ [\ **-v | -**\ **-version**\ ] -\ **bmcdiscover**\ [\ **-**\ **-sn**\ \ *SN_nodename*\ ] [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] \ **-**\ **-range**\ \ *ip_ranges*\ +\ **bmcdiscover**\ \ **-**\ **-range**\ \ *ip_ranges*\ [\ **-**\ **-sn**\ \ *SN_nodename*\ ] [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] *********** @@ -35,9 +35,9 @@ The \ **bmcdiscover**\ command will discover Baseboard Management Controllers ( The command uses \ **nmap**\ to scan active nodes over a specified IP range. The IP range format should be a format that is acceptable by \ **nmap**\ . -The \ **bmcdiscover**\ command can also obtain some information about the BMC. (Check username/password, IP address source, DHCP/static configuration) +\ **Note:**\ The scan method currently supported is \ **nmap**\ . -Note: The scan method currently support is \ **nmap**\ . +\ **Note:**\ Starting on January 1, 2020, some newly shipped systems will require the default BMC password to be changed before they can be managed by xCAT. \ **bmcdiscover**\ will not be able to discover such systems. Run \ */opt/xcat/share/xcat/scripts/BMC_change_password.sh*\ script to change the default password for BMCs in specified range, then rerun \ **bmcdiscover**\ with \ **-p "new bmc password"**\ flag to discover systems with the changed password. ******* @@ -48,13 +48,13 @@ OPTIONS \ **-**\ **-range**\ - Specify one or more IP ranges acceptable to \ **nmap**\ . IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return. + Specify one or more IP ranges acceptable to \ **nmap**\ . IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), IP range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return. \ **-**\ **-sn**\ - Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, \ **bmcdiscover**\ will be dispatched to the specified SNs. Then, the nodename of the service node that \ **bmcdiscover**\ is running on will be set to the 'servicenode' attribute of the discovered BMC node. + Specify one or more service nodes on which \ **bmcdiscover**\ will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. In that case, \ **bmcdiscover**\ will be dispatched to the specified SNs. Then, the nodename of the service node that \ **bmcdiscover**\ is running on will be set to the 'servicenode' attribute of the discovered BMC node. @@ -76,12 +76,6 @@ OPTIONS -\ **-i|-**\ **-bmcip**\ - - BMC IP address. - - - \ **-u|-**\ **-bmcuser**\ BMC user name. @@ -122,7 +116,7 @@ EXAMPLES ******** -1. To get all responding BMCs from IP range "10.4.23.100-254" and 50.3.15.1-2": +1. To get all responding BMCs from IP range "10.4.23.100-254" and "50.3.15.1-2": .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst b/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst index 0d35e40dc..cd8d9efd0 100644 --- a/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodechmac.1.rst @@ -29,6 +29,16 @@ DESCRIPTION *********** +\ **Note:**\ The command \ **nodechmac**\ has been deprecated. To change the MAC address of the node: + + +.. code-block:: perl + + makedhcp -d + chdef -t node -o mac= + makedhcp + + The \ **nodechmac**\ command changes the MAC address for provisioned node's network interface. You can use this command to keep an existing node configuration. For example, if an existing node has hardware problems, the replacement node can use the old configurations. By using the nodechmac command, the node name and network settings of the old node can be used by the new node. diff --git a/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst b/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst index 847eb6c7b..a8d256927 100644 --- a/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst +++ b/docs/source/guides/admin-guides/references/man1/nodepurge.1.rst @@ -31,7 +31,7 @@ DESCRIPTION The \ **nodepurge**\ automatically removes all nodes from the database and any related configurations used by the node. -After the nodes are removed, the configuration files related to these nodes are automatically updated, including the following files: /etc/hosts, DNS, DHCP. Any kits that are used by the nodes are triggered to automatically update kit configuration and services. +After the nodes are removed, the configuration files related to these nodes are automatically updated, including the following files: \ */etc/hosts*\ , DNS, DHCP. Any kits that are used by the nodes are triggered to automatically update kit configuration and services. Any related configuration files from \ */install/autoinst*\ are also removed. ******* @@ -39,17 +39,11 @@ OPTIONS ******* -\ **-h|-**\ **-help**\ +\ **-h|-**\ **-help**\ Display usage message. -Display usage message. +\ **-v|-**\ **-version**\ Command Version -\ **-v|-**\ **-version**\ - -Command Version - -\ *noderange*\ - -The nodes to be removed. +\ *noderange*\ The nodes to be removed. ************ @@ -67,7 +61,7 @@ EXAMPLES ******** -To remove nodes compute-000 and compute-001, use the following command: +To remove nodes compute-000 and compute-001: .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/rmvm.1.rst b/docs/source/guides/admin-guides/references/man1/rmvm.1.rst index 39a083ec7..304d32dc0 100644 --- a/docs/source/guides/admin-guides/references/man1/rmvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmvm.1.rst @@ -45,7 +45,7 @@ DESCRIPTION *********** -The rmvm command removes the partitions specified in noderange. If noderange is an CEC, all the partitions associated with that CEC will be removed. Note that removed partitions are automatically removed from the xCAT database. For IVM-managed systems, care must be taken to not remove the VIOS partition, or all the associated partitions will be removed as well. +The \ **rmvm**\ command removes the partitions specified in \ *noderange*\ . If \ *noderange*\ is an CEC, all the partitions associated with that CEC will be removed. Note that removed partitions are automatically removed from the xCAT database. For IVM-managed systems, care must be taken to not remove the VIOS partition, or all the associated partitions will be removed as well. For DFM-managed (short For Direct FSP Management mode) normal power machines, only partitions can be removed. No options is needed. @@ -65,7 +65,11 @@ OPTIONS \ **-**\ **-service**\ Remove the service partitions of the specified CECs. -\ **-p**\ KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. PPC: Remove the specified partition on normal power machine. +\ **-p**\ + +KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. Storage devices of "raw" or "block" type are not removed. + +PPC: Remove the specified partition on normal power machine. \ **-f**\ Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested. diff --git a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst index d85e1eb50..70deaa8c0 100644 --- a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst @@ -83,6 +83,10 @@ OpenBMC specific: \ **rspconfig**\ \ *noderange*\ \ **sshcfg**\ +\ **rspconfig**\ \ *noderange*\ \ **thermalmode**\ + +\ **rspconfig**\ \ *noderange*\ \ **thermalmode={default|custom|heavy_io|max_base_fan_floor}**\ + \ **rspconfig**\ \ *noderange*\ \ **timesyncmethod**\ \ **rspconfig**\ \ *noderange*\ \ **timesyncmethod={manual|ntp}**\ @@ -521,6 +525,12 @@ OPTIONS +\ **thermalmode**\ + + Display or set the thermal mode of the system to a setting, depending on your system, adapter, and cable type. After a factory reset of the system, the thermal mode setting is lost and must be reapplied. To choose the correct setting for your system, see https://www.ibm.com/support/knowledgecenter/POWER9/p9ei3/p9ei3_thermal_mode.htm [OpenBMC] + + + \ **timesyncmethod**\ Set the method for time synchronization on the BMC. [OpenBMC] diff --git a/docs/source/guides/admin-guides/references/man1/xcattest.1.rst b/docs/source/guides/admin-guides/references/man1/xcattest.1.rst index ba6727629..f24f6f324 100644 --- a/docs/source/guides/admin-guides/references/man1/xcattest.1.rst +++ b/docs/source/guides/admin-guides/references/man1/xcattest.1.rst @@ -21,21 +21,15 @@ SYNOPSIS \ **xcattest**\ [\ **-?|-h**\ ] -\ **xcattest**\ [\ **-f**\ \ *configure file*\ ] [\ **-b**\ \ *case bundle list*\ ] +\ **xcattest**\ [\ **-f**\ \ *configure file*\ [\ **:System**\ ]] [\ **-l**\ [{\ **caselist|caseinfo|casenum**\ }]] [\ **-r**\ ] [\ **-q**\ ] [\ **-b**\ \ *testcase bundle list*\ ] -\ **xcattest**\ [\ **-f**\ \ *configure file*\ ] [\ **-t**\ \ *case list*\ ] +\ **xcattest**\ [\ **-f**\ \ *configure file*\ [\ **:System**\ ]] [\ **-l**\ [{\ **caselist|caseinfo|casenum**\ }]] [\ **-r**\ ] [\ **-q**\ ] [\ **-t**\ \ *testcase name list*\ ] -\ **xcattest**\ [\ **-f**\ \ *configure file*\ ] [\ **-c**\ \ *cmd list*\ ] +\ **xcattest**\ [\ **-f**\ \ *configure file*\ [\ **:System**\ ]] [\ **-l**\ [{\ **caselist|caseinfo|casenum**\ }]] [\ **-r**\ ] [\ **-q**\ ] [\ **-c**\ \ *testcase command list*\ ] -\ **xcattest**\ [\ **-b**\ \ *case bundle list*\ ] [\ **-l**\ ] +\ **xcattest**\ [\ **-f**\ \ *configure file*\ [\ **:System**\ ]] [\ **-l**\ [{\ **caselist|caseinfo|casenum**\ }]] [\ **-r**\ ] [\ **-q**\ ] [\ **-s**\ \ *testcase filter expression*\ ] -\ **xcattest**\ [\ **-t**\ \ *case list*\ ] [\ **-l**\ ] - -\ **xcattest**\ [\ **-c**\ \ *cmd list*\ ] [\ **-l**\ ] - -\ **xcattest**\ [\ **-s**\ \ **command**\ ] - -\ **xcattest**\ [\ **-s**\ \ **bundle**\ ] +\ **xcattest**\ [\ **-f**\ \ *configure file*\ [\ **:System**\ ]] \ **-l bundleinfo**\ *********** @@ -43,9 +37,9 @@ DESCRIPTION *********** -The xcattest command runs test cases to verify the xCAT functions, it can be used when you want to verify the xCAT functions for whatever reason, for example, to ensure the code changes you made do not break the existing commands; to run acceptance test for new build you got; to verify the xCAT snapshot build or development build before putting it onto your production system. The xcattest command is part of the xCAT package xCAT-test. +The \ **xcattest**\ command runs test cases to verify the xCAT functions. It can be used to ensure the code changes you made do not break the existing commands; to run acceptance test for new build you got; to verify the xCAT snapshot build or development build before putting it onto your production system. The \ **xcattest**\ command is part of the xCAT package \ *xCAT-test*\ . -The root directory for the xCAT-test package is /opt/xcat/share/xcat/tools/autotest/. All test cases are in the sub directory \ *testcase*\ , indexed by the xCAT command, you can add your own test cases according to the test cases format below. The subdirectory \ *bundle*\ contains all the test cases bundles definition files, you can customize or create any test cases bundle file as required. The testing result information will be written into the subdirectory \ *result*\ , the timestamps are used as the postfixes for all the result files. xCAT-test package ships two configuration files template \ *aix.conf.template*\ and \ *linux.conf.template*\ for AIX and Linux environment, you can use the template files as the start point of making your own configuration file. +The root directory for the \ *xCAT-test*\ package is \ */opt/xcat/share/xcat/tools/autotest/*\ . All test cases are in the sub directory \ *testcase*\ , indexed by the xCAT command, you can add your own test cases according to the test cases format below. The subdirectory \ *bundle*\ contains all the test cases bundle definition files, you can customize or create any test cases bundle file as required. The testing result information will be written into the subdirectory \ *result*\ , the timestamps are used as the postfixes for all the result files. \ *xCAT-test*\ package ships two configuration file templates: \ *aix.conf.template*\ and \ *linux.conf.template*\ for AIX and Linux environment, you can use the template files as the starting point of making your own configuration file. ******* @@ -62,37 +56,49 @@ OPTIONS \ **-f**\ \ *configure file*\ - Specifies the configuration file with full-path. xCAT supports an example config file: /opt/xcat/share/xcat/tools/autotest/linux.conf.template + Specifies the configuration file with full-path. If not specified, an example config file: \ */opt/xcat/share/xcat/tools/autotest/linux.conf.template*\ is used by default. If \ **System**\ tag is used, only \ *[System]*\ section in the configuration file will be used. If \ **System**\ is not used, all other sections of the configuration file will be used, like \ *[Table]*\ , \ *[Object]*\ , etc. -\ **-b**\ \ *case bundle list*\ +\ **-b**\ \ *testcase bundle list*\ - Comma separated list of test cases bundle files, each test cases bundle can contain multiple lines and each line for one test case name. The bundle files should be listed in: /opt/xcat/share/xcat/tools/autotest/bundle. + Comma separated list of test case bundle files, each test cases bundle can contain multiple lines and each line for one test case name. The bundle files should be placed in \ */opt/xcat/share/xcat/tools/autotest/bundle*\ . -\ **-t**\ \ *cases list*\ +\ **-t**\ \ *testcase name list*\ - Comma separated list of test cases that will be run. + Comma separated list of test cases to run. -\ **-c**\ \ *cmd list*\ +\ **-c**\ \ *testcase command list*\ Comma separated list of commands which will be tested, i.e., all the test cases under the command sub directory will be run. -\ **-l**\ +\ **-s**\ \ *filter expression*\ - Display the test cases names specified by the flag -b, -t or -c. + Run testcases with testcase \ **label**\ attribute matching \ *filter expression*\ . Operators \ **|**\ , \ **+**\ , and \ **-**\ can be used. Expresson \ *"label1+label2-label3|label4|label5"*\ will match testcases that have \ **label**\ attribute matching "label1" and "label2", but not "label3" or testcases that have \ **label**\ attribute matching "label4" or testcases that have \ **label**\ attribute matching "label5" -\ **-s**\ +\ **-l {caselist|caseinfo|casenum|bundleinfo}**\ - Display the bundle files and command with value: bundle or command. + Display rather than run the test cases. The \ **caselist**\ is a default and will display a list of testcase names. \ **caseinfo**\ will display testcase names and descriptions. \ **casenum**\ will display the number of testcases. \ **bundleinfo**\ will display testcase bundle names and descriptions. + + + +\ **-r**\ + + Back up the original environment settings before running test, and restore them after running test. + + + +\ **-q**\ + + Do not print output of test cases to STDOUT, instead, log output to \ */opt/xcat/share/xcat/tools/autotest/result*\ . @@ -127,6 +133,8 @@ The xCAT-test test cases are in flat text format, the testing framework will par arch:ppc/x86 #optional, environment requirements hcp:hmc/mm/bmc/fsp + #optional, label + label:label1 #required, command need to run cmd:comand #optional, check return code of last executed command @@ -185,7 +193,7 @@ EXAMPLES 4. - To add a new case to test chvm. In the example, we assume that the min_mem should not be equal to 16 in the lpar profile of computenode. The case name is chvm_custom. It create a test lpar named testnode firstly, that change the min_mem of the lpar to 16 using chvm, then check if min_mem have changed correctly. At last, the testnode be remove to ensure no garbage produced in the cases. + To add a new case to test \ **chvm**\ . In the example, we assume that the min_mem should not be equal to 16 in the lpar profile of computenode. The case name is chvm_custom. It create a test lpar named testnode firstly, that change the min_mem of the lpar to 16 using chvm, then check if min_mem have changed correctly. At last, the testnode be remove to ensure no garbage produced in the cases. .. code-block:: perl @@ -211,6 +219,30 @@ EXAMPLES +5. + + To run all test cases that have \ *label:kdump*\ or \ *label:parallel_cmds*\ : + + + .. code-block:: perl + + xcattest -s kdump|parallel_cmds + + + + +6. + + To display all bundles and their descriptions: + + + .. code-block:: perl + + xcattest -l bundleinfo + + + + **************** INLINE FUNCTIONS @@ -219,19 +251,32 @@ INLINE FUNCTIONS The xCAT-test testing framework provides some inline functions. The inline functions can be called in test cases as __FUNCTIONNAME(PARAMTERLIST)__ to get some necessary attributes defined in the configuration file. The inline functions can be used in \ *cmd*\ section and the \ *check:output*\ section. -1. \ **GETNODEATTR(nodename, attribute)**\ To get the value of specified node's attribute -2. \ **INC(digit)**\ To get value of digit+1. - -For example, to run rscan command against the hardware control point of compute node specified in the configuration file: +1. + + \ **GETNODEATTR(nodename, attribute)**\ To get the value of specified node's attribute + -.. code-block:: perl - - rscan __GETNODEATTR($$CN, hcp)__ -z +2. + + \ **INC(digit)**\ To get value of digit+1. + + For example, to run \ **rscan**\ command against the hardware control point of compute node specified in the configuration file: + + + .. code-block:: perl + + rscan __GETNODEATTR($$CN, hcp)__ -z + + -3. \ **GETTABLEVALUE(keyname, key, colname, table)**\ To get the value of column where keyname == key in specified table. +3. + + \ **GETTABLEVALUE(keyname, key, colname, table)**\ To get the value of column where keyname == key in specified table. + + ***** diff --git a/docs/source/guides/admin-guides/references/man5/nics.5.rst b/docs/source/guides/admin-guides/references/man5/nics.5.rst index 3ef6f1716..9fdf61ac3 100644 --- a/docs/source/guides/admin-guides/references/man5/nics.5.rst +++ b/docs/source/guides/admin-guides/references/man5/nics.5.rst @@ -121,6 +121,8 @@ nics Attributes: !,!, for example, eth0!MTU=1500,ib0!MTU=65520 CONNECTED_MODE=yes. If multiple ip addresses are associated with each NIC: !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. + The semicolon separator is needed if there are multiple values for extra parameters: + bond0!BONDING_OPTS=lacp_rate=1;miimon=100;mode=802.3ad The xCAT object definition commands support to use nicextraparams. as the sub attributes. 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 2c34af76a..9254b7ea7 100644 --- a/docs/source/guides/admin-guides/references/man5/vm.5.rst +++ b/docs/source/guides/admin-guides/references/man5/vm.5.rst @@ -191,7 +191,7 @@ vm Attributes: \ **othersettings**\ - This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. + This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu mode use either:'cpumode:host-passthrough' or 'cpumode:host-model'. This improves performance on x86 VMs significantly. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. 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 13ae364b2..45b7d3f85 100644 --- a/docs/source/guides/admin-guides/references/man7/group.7.rst +++ b/docs/source/guides/admin-guides/references/man7/group.7.rst @@ -277,7 +277,7 @@ group Attributes: \ **dockerflag**\ (vm.othersettings) - This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. + This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu mode use either:'cpumode:host-passthrough' or 'cpumode:host-model'. This improves performance on x86 VMs significantly. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. @@ -629,6 +629,8 @@ group Attributes: !,!, for example, eth0!MTU=1500,ib0!MTU=65520 CONNECTED_MODE=yes. If multiple ip addresses are associated with each NIC: !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. + The semicolon separator is needed if there are multiple values for extra parameters: + bond0!BONDING_OPTS=lacp_rate=1;miimon=100;mode=802.3ad The xCAT object definition commands support to use nicextraparams. as the sub attributes. @@ -1328,7 +1330,7 @@ group Attributes: \ **vmothersetting**\ (vm.othersettings) - This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. + This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu mode use either:'cpumode:host-passthrough' or 'cpumode:host-model'. This improves performance on x86 VMs significantly. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. 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 c8f61824d..e8ae749db 100644 --- a/docs/source/guides/admin-guides/references/man7/node.7.rst +++ b/docs/source/guides/admin-guides/references/man7/node.7.rst @@ -289,7 +289,7 @@ node Attributes: \ **dockerflag**\ (vm.othersettings) - This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. + This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu mode use either:'cpumode:host-passthrough' or 'cpumode:host-model'. This improves performance on x86 VMs significantly. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. @@ -629,6 +629,8 @@ node Attributes: !,!, for example, eth0!MTU=1500,ib0!MTU=65520 CONNECTED_MODE=yes. If multiple ip addresses are associated with each NIC: !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. + The semicolon separator is needed if there are multiple values for extra parameters: + bond0!BONDING_OPTS=lacp_rate=1;miimon=100;mode=802.3ad The xCAT object definition commands support to use nicextraparams. as the sub attributes. @@ -1364,7 +1366,7 @@ node Attributes: \ **vmothersetting**\ (vm.othersettings) - This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. + This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu mode use either:'cpumode:host-passthrough' or 'cpumode:host-model'. This improves performance on x86 VMs significantly. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:"vcpupin:'0-15,^8'",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running \ **virsh nodedev-list**\ on the host. diff --git a/docs/source/overview/_files/2.15.x.csv b/docs/source/overview/_files/2.15.x.csv index a2b0eba0f..6002574dc 100644 --- a/docs/source/overview/_files/2.15.x.csv +++ b/docs/source/overview/_files/2.15.x.csv @@ -1,2 +1,5 @@ Version,Release Date,New OS Supported,Release Notes -2.15.0,2019-07-31,,`2.15.0 Release Notes `_ + +2.15.1,2020-03-06,"RHEL 8.1,RHEL 7.7,SLES 15.0",`2.15.1 Release Notes `_ +2.15.0,2019-11-11,"RHEL 8.0",`2.15.0 Release Notes `_ + diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index dff24aa86..dcbbc08f8 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -226,7 +226,7 @@ qq{ link,ro - The file is readonly, and will be placed in tmpfs on the booted no 'vncport' => 'Tracks the current VNC display port (currently not meant to be set', 'textconsole' => 'Tracks the Psuedo-TTY that maps to the serial port or console of a VM', 'powerstate' => "This flag is used by xCAT to track the last known power state of the VM.", -'othersettings' => "This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:\"vcpupin:'0-15,^8'\",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running B on the host.", +'othersettings' => "This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu mode use either:'cpumode:host-passthrough' or 'cpumode:host-model'. This improves performance on x86 VMs significantly. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:\"vcpupin:'0-15,^8'\",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running B on the host.", 'guestostype' => "This allows administrator to specify an identifier for OS to pass through to virtualization stack. Normally this should be ignored as xCAT will translate from nodetype.os rather than requiring this field be used\n", 'beacon' => "This flag is used by xCAT to track the state of the identify LED with respect to the VM.", 'datacenter' => "Optionally specify a datacenter for the VM to exist in (only applicable to VMWare)", @@ -1626,6 +1626,8 @@ zvmivp => { !,!, for example, eth0!MTU=1500,ib0!MTU=65520 CONNECTED_MODE=yes. If multiple ip addresses are associated with each NIC: !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. + The semicolon separator is needed if there are multiple values for extra parameters: + bond0!BONDING_OPTS=lacp_rate=1;miimon=100;mode=802.3ad The xCAT object definition commands support to use nicextraparams. as the sub attributes.', nicdevices => 'Comma-separated list of NIC device per NIC, multiple ethernet devices can be bonded as bond device, these ethernet devices are separated by | . !|,!, e.g. bond0!eth0|eth2,br0!bond0. The xCAT object definition commands support to use nicdevices. as the sub attributes.', nicsadapter => 'Comma-separated list of NIC information collected by getadapter. !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face', diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index efda689a9..704dfef48 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -193,6 +193,8 @@ my %usage = ( rspconfig timesyncmethod={ntp|manual} rspconfig bootmode rspconfig bootmode={safe|regular|setup} + rspconfig thermalmode + rspconfig thermalmode={default|custom|heavy_io|max_base_fan_floor} rspconfig autoreboot rspconfig autoreboot={0|1} ", diff --git a/perl-xCAT/xCAT/data/discinfo.pm b/perl-xCAT/xCAT/data/discinfo.pm index c3432566a..5f3b2724f 100755 --- a/perl-xCAT/xCAT/data/discinfo.pm +++ b/perl-xCAT/xCAT/data/discinfo.pm @@ -14,6 +14,8 @@ require Exporter; use strict; our %distnames = ( + "1578087695.538488" => "centos8.1", #x86_64 + "1578087695.537220" => "centos8.1", #ppc64le "1480943823.812754" => "centos7.3", #x86_64 "1450147276.351714" => "centos7.2", #ppc64le "1449699925.561114" => "centos7.2", #x86_64 diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup index b7ad6f850..588db7011 100755 --- a/xCAT-client/bin/mysqlsetup +++ b/xCAT-client/bin/mysqlsetup @@ -888,23 +888,25 @@ sub initmysqldb } } # end AIX only - #on debian/ubuntu should comment the bind-adress line in my.cnf + #bind-adress line in my.cnf should comment out #on Ubuntu16.04, the bind-address line is in the mariadb.conf.d/50-server.cnf - if ($::debianflag) { - my $bind_file; - if (-e "/etc/mysql/mariadb.conf.d/50-server.cnf") - { - $bind_file = "/etc/mysql/mariadb.conf.d/50-server.cnf"; - } else { - $bind_file = "/etc/mysql/my.cnf"; - } - $cmd = "sed 's/\\(^\\s*bind.*\\)/#\\1/' $bind_file > /tmp/my.cnf; mv -f /tmp/my.cnf $bind_file;chmod 644 $bind_file"; - xCAT::Utils->runcmd($cmd, 0); - if ($::RUNCMD_RC != 0) - { - xCAT::MsgUtils->message("E", " comment the bind-address line in $bind_file failed: $cmd."); - exit(1); - } + #on SLE15, the bind-address line is in the /etc/my.cnf + my $bind_file; + if (-e "/etc/mysql/mariadb.conf.d/50-server.cnf") + { + $bind_file = "/etc/mysql/mariadb.conf.d/50-server.cnf"; + } elsif (-e "/etc/mysql/my.cnf") + { + $bind_file = "/etc/mysql/my.cnf"; + } else { + $bind_file = "/etc/my.cnf"; + } + $cmd = "sed 's/^bind/#&/' $bind_file > /tmp/my.cnf; mv -f /tmp/my.cnf $bind_file;chmod 644 $bind_file"; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { + xCAT::MsgUtils->message("E", " comment the bind-address line in $bind_file failed: $cmd."); + exit(1); } # Create the MySQL data directory and initialize the grant tables @@ -926,6 +928,15 @@ sub initmysqldb } $cmd = "$sqlcmd --user=mysql"; + #on rhels7.7, /usr/bin/mysql_install_db requires /usr/libexec/resolveip, + #but it's available at the /usr/bin/resolveip + if ($::linuxos == "rhels7.7") { + my $resolveip="/usr/libexec/resolveip"; + if (!(-x ($resolveip))) { + my $linkcmd="ln -s /usr/bin/resolveip $resolveip"; + xCAT::Utils->runcmd($linkcmd, 0); + } + } } xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) @@ -971,7 +982,7 @@ sub mysqlstart else { if ($::MariaDB == 1) { # running MariaDB - if ($::linuxos =~ /rh.*/) { + if ( ($::linuxos =~ /rh.*/) || ($::linuxos =~ /sles15.*/) ) { $ret = xCAT::Utils->startservice("mariadb"); } else { # sles $ret = xCAT::Utils->startservice("mysql"); @@ -1084,7 +1095,7 @@ sub mysqlreboot { if ($::MariaDB == 1) { # MariaDB not MySQL - if ($::linuxos =~ /rh.*/) { + if ( ($::linuxos =~ /rh.*/) || ($::linuxos =~ /sles15.*/) ){ $cmd = "chkconfig mariadb on"; } else { #sles $cmd = "chkconfig mysql on"; @@ -1244,6 +1255,14 @@ sub setupxcatdb $grantall_localhost .= "\'"; $grantall_localhost .= " IDENTIFIED BY \'$::adminpassword\';\r"; + #GRAND root to host account + my $grantroot = ""; + $grantroot = "GRANT ALL on xcatdb.* TO root@"; + $grantroot .= "\'"; + $grantroot .= "$::MN"; + $grantroot .= "\'"; + $grantroot .= " IDENTIFIED BY \'$::rootpassword\';\r"; + # # -re $pwd_prompt # Enter the password for root @@ -1312,6 +1331,8 @@ sub setupxcatdb $mysql->clear_accum(); $mysql->send("$grantall_localhost"); $mysql->clear_accum(); + $mysql->send("$grantroot"); + $mysql->clear_accum(); $mysql->send("exit;\r"); } diff --git a/xCAT-client/pods/man1/bmcdiscover.1.pod b/xCAT-client/pods/man1/bmcdiscover.1.pod index 41bc9be1b..6523a77ab 100644 --- a/xCAT-client/pods/man1/bmcdiscover.1.pod +++ b/xCAT-client/pods/man1/bmcdiscover.1.pod @@ -8,7 +8,7 @@ B [B<-?>|B<-h>|B<--help>] B [B<-v>|B<--version>] -B [B<--sn> I] [B<-s> I] [B<-u> I] [B<-p> I] [B<-z>] [B<-w>] B<--range> I +B B<--range> I [B<--sn> I] [B<-s> I] [B<-u> I] [B<-p> I] [B<-z>] [B<-w>] =head1 DESCRIPTION @@ -17,9 +17,10 @@ The B command will discover Baseboard Management Controllers (BMCs) The command uses B to scan active nodes over a specified IP range. The IP range format should be a format that is acceptable by B. -The B command can also obtain some information about the BMC. (Check username/password, IP address source, DHCP/static configuration) +B The scan method currently supported is B. -Note: The scan method currently support is B. + +B Starting on January 1, 2020, some newly shipped systems will require the default BMC password to be changed before they can be managed by xCAT. B will not be able to discover such systems. Run I script to change the default password for BMCs in specified range, then rerun B with B<-p "new bmc password"> flag to discover systems with the changed password. =head1 OPTIONS @@ -27,11 +28,11 @@ Note: The scan method currently support is B. =item B<--range> -Specify one or more IP ranges acceptable to B. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B command may take a long time to return. +Specify one or more IP ranges acceptable to B. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), IP range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B command may take a long time to return. =item B<--sn> -Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, B will be dispatched to the specified SNs. Then, the nodename of the service node that B is running on will be set to the 'servicenode' attribute of the discovered BMC node. +Specify one or more service nodes on which B will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. In that case, B will be dispatched to the specified SNs. Then, the nodename of the service node that B is running on will be set to the 'servicenode' attribute of the discovered BMC node. =item B<-s> @@ -45,10 +46,6 @@ List the data returned in xCAT stanza format Write to the xCAT database. -=item B<-i|--bmcip> - -BMC IP address. - =item B<-u|--bmcuser> BMC user name. @@ -76,7 +73,7 @@ Display version information =head1 EXAMPLES -1. To get all responding BMCs from IP range "10.4.23.100-254" and 50.3.15.1-2": +1. To get all responding BMCs from IP range "10.4.23.100-254" and "50.3.15.1-2": bmcdiscover -s nmap --range "10.4.23.100-254 50.3.15.1-2" diff --git a/xCAT-client/pods/man1/nodechmac.1.pod b/xCAT-client/pods/man1/nodechmac.1.pod index c0a674cba..daf830b56 100644 --- a/xCAT-client/pods/man1/nodechmac.1.pod +++ b/xCAT-client/pods/man1/nodechmac.1.pod @@ -10,6 +10,12 @@ B I BI =head1 DESCRIPTION +B The command B has been deprecated. To change the MAC address of the node: + + makedhcp -d + chdef -t node -o mac= + makedhcp + The B command changes the MAC address for provisioned node's network interface. You can use this command to keep an existing node configuration. For example, if an existing node has hardware problems, the replacement node can use the old configurations. By using the nodechmac command, the node name and network settings of the old node can be used by the new node. diff --git a/xCAT-client/pods/man1/nodepurge.1.pod b/xCAT-client/pods/man1/nodepurge.1.pod index 714f164f2..c71ceb2c4 100644 --- a/xCAT-client/pods/man1/nodepurge.1.pod +++ b/xCAT-client/pods/man1/nodepurge.1.pod @@ -12,21 +12,15 @@ B I The B automatically removes all nodes from the database and any related configurations used by the node. -After the nodes are removed, the configuration files related to these nodes are automatically updated, including the following files: /etc/hosts, DNS, DHCP. Any kits that are used by the nodes are triggered to automatically update kit configuration and services. +After the nodes are removed, the configuration files related to these nodes are automatically updated, including the following files: I, DNS, DHCP. Any kits that are used by the nodes are triggered to automatically update kit configuration and services. Any related configuration files from I are also removed. =head1 OPTIONS -B<-h|--help> +B<-h|--help> Display usage message. -Display usage message. +B<-v|--version> Command Version -B<-v|--version> - -Command Version - -I - -The nodes to be removed. +I The nodes to be removed. =head1 RETURN VALUE @@ -36,7 +30,7 @@ The nodes to be removed. =head1 EXAMPLES -To remove nodes compute-000 and compute-001, use the following command: +To remove nodes compute-000 and compute-001: nodepurge compute-000,compute-001 diff --git a/xCAT-client/pods/man1/rmvm.1.pod b/xCAT-client/pods/man1/rmvm.1.pod index 139cf2d56..a649b5ac5 100644 --- a/xCAT-client/pods/man1/rmvm.1.pod +++ b/xCAT-client/pods/man1/rmvm.1.pod @@ -20,7 +20,7 @@ B I =head1 DESCRIPTION -The rmvm command removes the partitions specified in noderange. If noderange is an CEC, all the partitions associated with that CEC will be removed. Note that removed partitions are automatically removed from the xCAT database. For IVM-managed systems, care must be taken to not remove the VIOS partition, or all the associated partitions will be removed as well. +The B command removes the partitions specified in I. If I is an CEC, all the partitions associated with that CEC will be removed. Note that removed partitions are automatically removed from the xCAT database. For IVM-managed systems, care must be taken to not remove the VIOS partition, or all the associated partitions will be removed as well. For DFM-managed (short For Direct FSP Management mode) normal power machines, only partitions can be removed. No options is needed. @@ -37,7 +37,11 @@ B<-r> Retain the data object definitions of the nodes. B<--service> Remove the service partitions of the specified CECs. -B<-p> KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. PPC: Remove the specified partition on normal power machine. +B<-p> + +KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. Storage devices of "raw" or "block" type are not removed. + +PPC: Remove the specified partition on normal power machine. B<-f> Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested. diff --git a/xCAT-client/pods/man1/rspconfig.1.pod b/xCAT-client/pods/man1/rspconfig.1.pod index b4cd8b4d3..0087291bf 100644 --- a/xCAT-client/pods/man1/rspconfig.1.pod +++ b/xCAT-client/pods/man1/rspconfig.1.pod @@ -60,6 +60,10 @@ B I B B I B +B I B + +B I B + B I B B I B @@ -402,6 +406,10 @@ B<-d> will download a single dump or all generated dumps from the BMC to /var/lo =back +=item B + +Display or set the thermal mode of the system to a setting, depending on your system, adapter, and cable type. After a factory reset of the system, the thermal mode setting is lost and must be reapplied. To choose the correct setting for your system, see https://www.ibm.com/support/knowledgecenter/POWER9/p9ei3/p9ei3_thermal_mode.htm [OpenBMC] + =item B Set the method for time synchronization on the BMC. [OpenBMC] diff --git a/xCAT-genesis-scripts/usr/bin/bmcsetup b/xCAT-genesis-scripts/usr/bin/bmcsetup index 96d995c4e..bc0dbf899 100755 --- a/xCAT-genesis-scripts/usr/bin/bmcsetup +++ b/xCAT-genesis-scripts/usr/bin/bmcsetup @@ -170,7 +170,8 @@ logger -s -t $log_label -p local4.info "IPMIVER=$IPMIVER, IPMIMFG=$IPMIMFG, XPRO # # IPMIMFG=2 = IBM # IPMIMFG=0 = OpenPOWER -# IPMIMFG=42817 and XPROD=16975 = OpenBMC +# IPMIMFG=42817 and XPROD=16975 = OpenBMC (AC922) +# IPMIMFG=42817 and XPROD=1 = OpenBMC (IC922) # if [ "$IPMIMFG" == 2 ]; then #IBM if [ "$XPROD" == "220" ]; then @@ -291,7 +292,9 @@ elif [ "$IPMIMFG" == "674" ]; then # DELL ipmitool delloem lan set shared with lom$BMCPORT &>/dev/null ipmitool delloem lan set shared with failover all loms &>/dev/null fi -elif [ "$IPMIMFG" = "42817" -a "$XPROD" = "16975" ]; then # IBM OpenPOWER servers with OpenBMC +elif [ "$IPMIMFG" == "42817" -a "$XPROD" == "16975" ]; then # IBM OpenPOWER servers with OpenBMC (AC922) + ISOPENBMC=1 +elif [ "$IPMIMFG" == "42817" -a "$XPROD" == "1" ]; then # IBM OpenPOWER servers with OpenBMC (IC922) ISOPENBMC=1 fi @@ -466,6 +469,14 @@ for user in $BMCUS; do USERSLOT=$((`ipmitool raw 6 0x44 1 1|awk '{print $3}'` + 1)) fi if [ "$USERSLOT" == 0 -o -z "$LOCKEDUSERS" ]; then USERSLOT=2; fi + # automatically find first unlocked user slot + for slot in {1..16}; do + USERLOCKED=`ipmitool channel getaccess $LANCHAN $slot | grep Fixed | awk '{print $4}'` + if [ "$USERLOCKED" == "No" ]; then + USERSLOT=$slot + break + fi + done if [ "$ISITE" = 1 ]; then allowcred.awk & CREDPID=$! diff --git a/xCAT-genesis-scripts/usr/bin/getipmi b/xCAT-genesis-scripts/usr/bin/getipmi index fab0abb54..5fb26c4a4 100755 --- a/xCAT-genesis-scripts/usr/bin/getipmi +++ b/xCAT-genesis-scripts/usr/bin/getipmi @@ -32,7 +32,9 @@ BMCMAC=`ipmitool lan print $LANCHAN|grep ^MAC|awk '{print $4}'` #bmcconfig may o IPMIMFG=`ipmitool mc info |grep "^Manufacturer ID"|awk '{print $4}'` XPROD=`ipmitool mc info | grep "^Product ID"|awk '{print $4}'` if [ "$IPMIMFG" == "42817" -a "$XPROD" == "16975" ]; then - ISOPENBMC=1 + ISOPENBMC=1 # AC922 +elif [ "$IPMIMFG" == "42817" -a "$XPROD" == "1" ]; then + ISOPENBMC=1 # IC922 else ISOPENBMC=0 fi diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py index 2ce1a547e..fe9640919 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py @@ -234,6 +234,18 @@ RSPCONFIG_APIS = { 'setup': "xyz.openbmc_project.Control.Boot.Mode.Modes.Setup", }, }, + 'thermalmode': { + 'baseurl': "/control/thermal/0", + 'set_url': "/attr/Current", + 'get_url': "/attr/Current", + 'display_name':"BMC ThermalMode", + 'attr_values': { + 'default': "DEFAULT", + 'custom': "CUSTOM", + 'heavy_io': "HEAVY_IO", + 'max_base_fan_floor': "MAX_BASE_FAN_FLOOR", + }, + }, 'timesyncmethod': { 'baseurl': '/time/sync_method', 'get_url': '', @@ -253,7 +265,8 @@ EVENTLOG_URLS = { } RAS_POLICY_TABLE = "/opt/ibm/ras/lib/policyTable.json" -RAS_POLICY_MSG = "Install the OpenBMC RAS package to obtain more detailed logging messages." +RAS_POLICY_TABLE_RPM_LOC = "https://www.ibm.com/support/customercare/sas/f/lopdiags/scaleOutLCdebugtool.html#OpenBMC" +RAS_POLICY_MSG = "Install the openbmctool rpm from " + RAS_POLICY_TABLE_RPM_LOC + " to obtain more detailed logging messages." RAS_NOT_FOUND_MSG = " Not found in policy table: " RESULT_OK = 'ok' diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py index de8df2484..c01884876 100644 --- a/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py @@ -53,7 +53,7 @@ all_nodes_result = {} # global variables of rbeacon BEACON_OPTIONS = ('on', 'off', 'stat') -RSPCONFIG_GET_OPTIONS = ['ip','ipsrc','netmask','gateway','vlan','ntpservers','hostname','bootmode','autoreboot','powersupplyredundancy','powerrestorepolicy', 'timesyncmethod'] +RSPCONFIG_GET_OPTIONS = ['ip','ipsrc','netmask','gateway','vlan','ntpservers','hostname','bootmode','thermalmode','autoreboot','powersupplyredundancy','powerrestorepolicy', 'timesyncmethod'] RSPCONFIG_SET_OPTIONS = { 'ip':'.*', @@ -66,6 +66,7 @@ RSPCONFIG_SET_OPTIONS = { 'powersupplyredundancy':"^enabled$|^disabled$", 'powerrestorepolicy':"^always_on$|^always_off$|^restore$", 'bootmode':"^regular$|^safe$|^setup$", + 'thermalmode':"^default$|^custom$|^heavy_io$|^max_base_fan_floor$", 'admin_passwd':'.*,.*', 'timesyncmethod':'^ntp$|^manual$', } diff --git a/xCAT-probe/lib/perl/probe_utils.pm b/xCAT-probe/lib/perl/probe_utils.pm index 71e3ae8d6..6fbf59cd5 100644 --- a/xCAT-probe/lib/perl/probe_utils.pm +++ b/xCAT-probe/lib/perl/probe_utils.pm @@ -448,7 +448,7 @@ sub is_dns_ready { my $hostname = shift; my $domain = shift; - my $output = `nslookup $mnip $serverip 2>&1`; + my $output = `nslookup -type=A $mnip $serverip 2>&1`; if ($?) { return 0; diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn index 262a2c86e..f2f6ed1da 100755 --- a/xCAT-probe/subcmds/xcatmn +++ b/xCAT-probe/subcmds/xcatmn @@ -1006,7 +1006,7 @@ sub check_dns_service { } else { # if there is no sn, nslookup mnip - my $nslkp = `nslookup $serverip $serverip 2>&1`; + my $nslkp = `nslookup -type=A $serverip $serverip 2>&1`; chomp($nslkp); my $tmp = grep { $_ =~ "Server:[\t\s]*$serverip" } split(/\n/, $nslkp); if (!$tmp) { diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 8c979363b..e69b42ad1 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -51,6 +51,13 @@ my $openbmc_pass; my $done_num = 0; $::P9_WITHERSPOON_MFG_ID = "42817"; $::P9_WITHERSPOON_PRODUCT_ID = "16975"; +$::P9_MIHAWK_MFG_ID = "42817"; +$::P9_MIHAWK_PRODUCT_ID = "1"; +$::CHANGE_PW_REQUIRED="The password provided for this account must be changed before access is granted"; +$::NO_SESSION="Unable to establish IPMI v2 / RMCP"; +$::CHANGE_PW_INSTRUCTIONS_1="Run script '/opt/xcat/share/xcat/scripts/BMC_change_password.sh' to change default password"; +$::CHANGE_PW_INSTRUCTIONS_2="Rerun 'bmcdiscover' command with '-p new_bmc_password' flag"; +$::NO_MFG_OR_PRODUCT_ID="Zeros returned for Manufacturer id and Product id"; %::VPDHASH = (); my %node_in_list = (); @@ -196,7 +203,7 @@ sub bmcdiscovery_usage { push @{ $rsp->{data} }, "Usage:"; push @{ $rsp->{data} }, "\tbmcdiscover [-?|-h|--help]"; push @{ $rsp->{data} }, "\tbmcdiscover [-v|--version]"; - push @{ $rsp->{data} }, "\tbmcdiscover [--sn ] [-s scan_method] [-u bmc_user] [-p bmc_passwd] [-z] [-w] --range ip_range\n"; + push @{ $rsp->{data} }, "\tbmcdiscover --range ip_range [--sn ] [-s ] [-u ] [-p ] [-z] [-w]\n"; xCAT::MsgUtils->message("I", $rsp, $::CALLBACK); return 0; @@ -650,11 +657,11 @@ sub scan_process { $bcmd = join(" ", $nmap_path, " -sn -n $range"); } - xCAT::MsgUtils->trace(0, "I", "$log_label Try to scan live IPs by command $bcmd ..."); + xCAT::MsgUtils->trace(0, "I", "$log_label Try to scan live IPs with command $bcmd ..."); $ip_info_list = xCAT::Utils->runcmd("$bcmd", -1); if ($::RUNCMD_RC != 0) { my $rsp = {}; - push @{ $rsp->{data} }, "Nmap scan is failed.\n"; + push @{ $rsp->{data} }, "Nmap scan has failed.\n"; xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); return 2; } @@ -674,7 +681,7 @@ sub scan_process { my %pipe_map; if (scalar(@{$live_ip}) > 0) { - xCAT::MsgUtils->trace(0, "I", "$log_label Scaned live IPs " . scalar(@{$live_ip}) . " with mac " . scalar(@{$live_mac})); + xCAT::MsgUtils->trace(0, "I", "$log_label Scanned " . scalar(@{$live_ip}) . " live IPs with " . scalar(@{$live_mac}) . " MACs"); foreach (@{$live_ip}) { my $new_mac = lc(shift @{$live_mac}); $new_mac =~ s/\://g; @@ -748,9 +755,11 @@ sub scan_process { $bmcpassword = "-P $bmc_pass" if ($bmc_pass); my @mc_cmds = ("/opt/xcat/bin/ipmitool-xcat -I lanplus -H ${$live_ip}[$i] -P $openbmc_pass mc info -N 1 -R 1", - "/opt/xcat/bin/ipmitool-xcat -I lanplus -H ${$live_ip}[$i] $bmcusername $bmcpassword mc info -N 1 -R 1"); + "/opt/xcat/bin/ipmitool-xcat -I lanplus -H ${$live_ip}[$i] -U $openbmc_user -P $openbmc_pass mc info -N 1 -R 1", + "/opt/xcat/bin/ipmitool-xcat -I lanplus -H ${$live_ip}[$i] $bmcusername $bmcpassword mc info -N 1 -R 1"); my $mc_info; my $is_openbmc = 0; + my $is_ipmi = 0; foreach my $mc_cmd (@mc_cmds) { $mc_info = xCAT::Utils->runcmd($mc_cmd, -1); if ($::RUNCMD_RC != 0) { @@ -758,16 +767,50 @@ sub scan_process { } if ($mc_info =~ /Manufacturer ID\s*:\s*(\d+)\s*Manufacturer Name.+\s*Product ID\s*:\s*(\d+)/) { xCAT::MsgUtils->trace(0, "D", "$log_label Found ${$live_ip}[$i] Manufacturer ID: $1 Product ID: $2"); - if ($1 eq $::P9_WITHERSPOON_MFG_ID and $2 eq $::P9_WITHERSPOON_PRODUCT_ID) { - bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command,$parent_fd); + if (($1 eq $::P9_WITHERSPOON_MFG_ID and $2 eq $::P9_WITHERSPOON_PRODUCT_ID) or + ($1 eq $::P9_MIHAWK_MFG_ID and $2 eq $::P9_MIHAWK_PRODUCT_ID)) { + bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command,$parent_fd,$2); $is_openbmc = 1; + $is_ipmi = 0; + last; + } + elsif ($1 eq "0" and $2 eq "0") { + # Got zeros for MFG and PRODUCT ID, not sure if openbmc or ipmi. Print message and move on. + xCAT::MsgUtils->message("W", { data => ["${$live_ip}[$i]: $::NO_MFG_OR_PRODUCT_ID"] }, $::CALLBACK); + last; + } + else { + # System replied to mc info but not with either + # $::P9_WITHERSPOON_MFG_ID and $::P9_WITHERSPOON_PRODUCT_ID, or + # $::P9_MIHAWK_MFG_ID and $::P9_MIHAWK_PRODUCT_ID, + # assume IPMI + $is_openbmc = 0; + $is_ipmi = 1; last; } } } - unless ($is_openbmc) { + + if ($is_ipmi) { bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command,$parent_fd); } + if (!$is_openbmc and !$is_ipmi) { + if ($mc_info =~ /$::NO_SESSION/) { + # Did not get usefull data from ipmi mc info, could be one of two possibilities: + # 1. Incorrect pw was used + # 2. New system installed after January 1, 2020 where default password needs to be changed + # + # Verify this is case 2, by attempting to establish a RedFish session + my $redfish_session_cmd = "curl -sD - --data '{\"UserName\":\"$openbmc_user\",\"Password\":\"$openbmc_pass\"}' -k -X POST https://${$live_ip}[$i]/redfish/v1/SessionService/Sessions"; + my $redfish_session_info = xCAT::Utils->runcmd($redfish_session_cmd, -1); + if ($redfish_session_info =~ /$::CHANGE_PW_REQUIRED/) { + # RedFish session replied that password change is needed. Print instructions and exit + xCAT::MsgUtils->message("I", { data => ["${$live_ip}[$i]: $::CHANGE_PW_REQUIRED"] }, $::CALLBACK); + xCAT::MsgUtils->message("I", { data => ["$::CHANGE_PW_INSTRUCTIONS_1"] }, $::CALLBACK); + xCAT::MsgUtils->message("I", { data => ["$::CHANGE_PW_INSTRUCTIONS_2"] }, $::CALLBACK); + } + } + } close($parent_fd); exit 0; } else { @@ -1183,7 +1226,7 @@ sub bmcdiscovery_ipmi { my $mtmsip = lc($mtm)."*".lc($serial)."-".$ip; if (exists($::VPDHASH{$mtmsip})) { my $pre_node = $::VPDHASH{$mtmsip}; - xCAT::MsgUtils->message("I", { data => ["Found match node $pre_node with bmc ip address: $ip, rsetboot/rpower $pre_node to continue hardware discovery."] }, $::CALLBACK); + xCAT::MsgUtils->message("I", { data => ["Found matching node $pre_node with bmc ip address: $ip, rsetboot/rpower $pre_node to continue hardware discovery."] }, $::CALLBACK); if ($opz) { $node_data .= ","; display_output($opz,undef,$pre_node,$mac_node,$node_data,"ipmi",$request_command); @@ -1206,7 +1249,7 @@ sub bmcdiscovery_ipmi { xCAT::MsgUtils->message("W", { data => ["BMC password is incorrect for $ip"] }, $::CALLBACK); return; } else { - xCAT::MsgUtils->message("W", { data => ["Unknown error get from $ip"] }, $::CALLBACK); + xCAT::MsgUtils->message("W", { data => ["Unknown error from $ip"] }, $::CALLBACK); return; } @@ -1232,6 +1275,7 @@ sub bmcdiscovery_openbmc{ my $opw = shift; my $request_command = shift; my $fd = shift; + my $model_id = shift; my $mtms_node = ""; my $mac_node = ""; @@ -1245,6 +1289,7 @@ sub bmcdiscovery_openbmc{ my $login_endpoint = "login"; my $system_endpoint = "inventory/system"; my $motherboard_boxelder_endpoint = "$system_endpoint/chassis/motherboard/boxelder/bmc"; + my $motherboard_bmc_endpoint = "$system_endpoint/chassis/motherboard/bmc"; my $node_data = $ip; my $brower = LWP::UserAgent->new( ssl_opts => { SSL_verify_mode => 0x00, verify_hostname => 0 }, ); @@ -1263,8 +1308,14 @@ sub bmcdiscovery_openbmc{ my $req = HTTP::Request->new('GET', $url, $header); my $req_output = $brower->request($req); if ($req_output->is_error) { - # If the host system has not yet been powered on, check the boxelder bmc info for model/serial - $url = "$http_protocol://$ip/$openbmc_project_url/$motherboard_boxelder_endpoint"; + # If the host system has not yet been powered on, system_endpoint call will return error + # Instead, check the boxelder (for AC922) or bmc (for IC922) info for model/serial + if ($model_id eq $::P9_MIHAWK_PRODUCT_ID) { + $url = "$http_protocol://$ip/$openbmc_project_url/$motherboard_bmc_endpoint"; + } + else { + $url = "$http_protocol://$ip/$openbmc_project_url/$motherboard_boxelder_endpoint"; + } $req = HTTP::Request->new('GET', $url, $header); $req_output = $brower->request($req); if ($req_output->is_error) { @@ -1318,7 +1369,7 @@ sub bmcdiscovery_openbmc{ my $mtmsip = lc($mtm)."*".lc($serial)."-".$ip; if (exists($::VPDHASH{$mtmsip})) { my $pre_node = $::VPDHASH{$mtmsip}; - xCAT::MsgUtils->message("I", { data => ["Found match node $pre_node with bmc ip address: $ip, rsetboot/rpower $pre_node to continue hardware discovery."] }, $::CALLBACK); + xCAT::MsgUtils->message("I", { data => ["Found matching node $pre_node with bmc ip address: $ip, rsetboot/rpower $pre_node to continue hardware discovery."] }, $::CALLBACK); if ($opz) { $node_data .= ","; display_output($opz,undef,$pre_node,$mac_node,$node_data,"openbmc",$request_command); diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 02fb6e385..54b2c56fc 100755 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -730,6 +730,7 @@ sub build_xmldesc { my %cpupinhash; my @passthrudevices; my $memnumanodes; + my $cpumode; my $advsettings = undef; if (defined $confdata->{vm}->{$node}->[0]->{othersettings}) { $advsettings = $confdata->{vm}->{$node}->[0]->{othersettings}; @@ -740,6 +741,7 @@ sub build_xmldesc { #cpu pining: "vcpupin:" #pci passthrough: "devpassthrough:,..." #memory binding: "membind:" + #cpu mode: "cpumode:" if ($advsettings) { my @tmp_array = split ";", $advsettings; foreach (@tmp_array) { @@ -762,6 +764,9 @@ sub build_xmldesc { $memnumanodes = $1; } + if (/cpumode:(.*)/) { + $cpumode = $1; + } } } @@ -779,6 +784,12 @@ sub build_xmldesc { $xtree{vcpu}->{cpuset} =~ s/\"\'//g; } + if (defined $cpumode) { + if ($cpumode eq 'host-passthrough' or $cpumode eq 'host-model') { + $xtree{cpu}->{mode} = $cpumode; + } + } + #prepare the xml hash for pci passthrough my @prdevarray; foreach my $devname (@passthrudevices) { @@ -1791,13 +1802,13 @@ sub rmvm { unless ($driver[0]) { next; } my $drivertype = $driver[0]->getAttribute("type"); if (($drivertype eq "raw") || ($disktype eq "block")) { - #For raw or block devices, do not remove, even if purge was specified. Log info message. - xCAT::MsgUtils->trace(0, "i", "Not purging raw or block storage device: $disk"); + # For raw or block devices, do not remove device, even if purge was specified. Display info message. + xCAT::SvrUtils::sendmsg("Not purging raw or block storage device: $disk", $callback, $node); next; } my $file = $disk->getAttribute("file"); unless ($file) { - xCAT::MsgUtils->trace(0, "w", "Not able to find 'file' attribute value for: $disk"); + xCAT::SvrUtils::sendmsg("Not able to find 'file' attribute value for: $disk", $callback, $node); next; } diff --git a/xCAT-server/lib/xcat/plugins/onie.pm b/xCAT-server/lib/xcat/plugins/onie.pm index 2fb8921bc..35cae4d6d 100644 --- a/xCAT-server/lib/xcat/plugins/onie.pm +++ b/xCAT-server/lib/xcat/plugins/onie.pm @@ -382,7 +382,6 @@ sub cumulus_connect { $ssh->debug(0); $ssh->log_stdout(0); # suppress stdout output.. - $ssh->slave->stty(qw(sane -echo)); unless ($ssh->spawn($command, @parameters)) { diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index d406cbed9..6681768f9 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -91,6 +91,7 @@ $::RSPCONFIG_CONFIGURED_API_KEY = -1; $::XCAT_LOG_DIR = "/var/log/xcat"; $::RAS_POLICY_TABLE = "/opt/ibm/ras/lib/policyTable.json"; +$::RAS_POLICY_TABLE_RPM_LOC = "https://www.ibm.com/support/customercare/sas/f/lopdiags/scaleOutLCdebugtool.html#OpenBMC"; $::XCAT_LOG_RFLASH_DIR = $::XCAT_LOG_DIR . "/rflash/"; $::XCAT_LOG_DUMP_DIR = $::XCAT_LOG_DIR . "/dump/"; @@ -676,6 +677,21 @@ my %api_config_info = ( manual => "xyz.openbmc_project.Time.Synchronization.Method.Manual", }, }, + RSPCONFIG_THERMAL_MODE => { + command => "rspconfig", + url => "/control/thermal/0", + attr_url => "Current", + display_name => "BMC ThermalMode", + instruct_msg => "", + type => "attribute", + subcommand => "thermalmode", + attr_value => { + default => "DEFAULT", + custom => "CUSTOM", + heavy_io => "HEAVY_IO", + max_base_fan_floor => "MAX_BASE_FAN_FLOOR", + }, + }, ); $::RESPONSE_OK = "200 OK"; @@ -1107,7 +1123,7 @@ rmdir \"/tmp/\$userid\" \n"; while (1) { unless ($wait_node_num) { if ($event_mapping and (ref($event_mapping) ne "HASH")) { - xCAT::SvrUtils::sendmsg("$event_mapping, install the OpenBMC RAS package to obtain more details logging messages.", $callback); + xCAT::MsgUtils->message("I", { data=> ["$event_mapping, install the openbmctool rpm from $::RAS_POLICY_TABLE_RPM_LOC to obtain more detailed logging messages."]}, $callback); } if ($next_status{LOGIN_RESPONSE} eq "RSPCONFIG_SSHCFG_REQUEST") { my $home = xCAT::Utils->getHomeDir("root"); @@ -4393,6 +4409,7 @@ sub rvitals_response { my @sorted_output; my %leds = (); + my $number_of_fan_leds = 0; foreach my $key_url (keys %{$response_info->{data}}) { my %content = %{ ${ $response_info->{data} }{$key_url} }; @@ -4409,10 +4426,11 @@ sub rvitals_response { $calc_value = (split(/\./, $content{State}))[-1]; $content_info = $label . ": " . $calc_value ; - if ($key_url =~ "fan0") { $leds{fan0} = $calc_value; } - if ($key_url =~ "fan1") { $leds{fan1} = $calc_value; } - if ($key_url =~ "fan2") { $leds{fan2} = $calc_value; } - if ($key_url =~ "fan3") { $leds{fan3} = $calc_value; } + # There could be multiple fan LEDs. Match a string "fan" followed by digits, but only at the end of a string + if ($key_url =~ /fan(\d+)$/) { + $leds{"fan" . $1} = $calc_value; + $number_of_fan_leds++; + } if ($key_url =~ "front_id") { $leds{front_id} = $calc_value; } if ($key_url =~ "front_fault") { $leds{front_fault} = $calc_value; } if ($key_url =~ "front_power") { $leds{front_power} = $calc_value; } @@ -4484,7 +4502,7 @@ sub rvitals_response { } } # Fans - for (my $i = 0; $i < 4; $i++) { + for (my $i = 0; $i < $number_of_fan_leds; $i++) { my $tmp_key = "fan" . $i; $content_info = "LEDs Fan$i: $leds{$tmp_key}"; push (@sorted_output, $content_info); diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index 4a73fdcfb..6bf4f8e28 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -160,12 +160,13 @@ sub process_request { xCAT::AGENT::wait_agent($pid, $callback); } -my @rsp_common_options = qw/autoreboot bootmode powersupplyredundancy powerrestorepolicy timesyncmethod +my @rsp_common_options = qw/autoreboot bootmode thermalmode powersupplyredundancy powerrestorepolicy timesyncmethod ip netmask gateway hostname vlan ntpservers/; my @rspconfig_set_options = (@rsp_common_options, qw/admin_passwd/); my %rsp_set_valid_values = ( autoreboot => "0|1", bootmode => "regular|safe|setup", + thermalmode => "default|custom|heavy_io|max_base_fan_floor", powersupplyredundancy => "disabled|enabled", powerrestorepolicy => "always_off|always_on|restore", timesyncmethod => "manual|ntp", @@ -447,7 +448,7 @@ sub refactor_args { } } if ($command eq "reventlog") { - if (!defined($extrargs->[0])) { + if ((!defined($extrargs->[0])) or ($extrargs->[0] =~ /^-V/)) { # If no parameters are passed, default to list all records $request->{arg} = ["list","all"]; } diff --git a/xCAT-server/lib/xcat/plugins/pdu.pm b/xCAT-server/lib/xcat/plugins/pdu.pm index 9e528ca5c..9f400a3c6 100644 --- a/xCAT-server/lib/xcat/plugins/pdu.pm +++ b/xCAT-server/lib/xcat/plugins/pdu.pm @@ -835,7 +835,6 @@ sub session_connect { $ssh->debug(0); $ssh->log_stdout(0); # suppress stdout output.. - $ssh->slave->stty(qw(sane -echo)); unless ($ssh->spawn($command, @parameters)) { @@ -1494,8 +1493,8 @@ sub netcfg_for_irpdu { my $mypdu = new Expect; - $mypdu->log_stdout(1); # suppress stdout output.. - $mypdu->slave->stty(qw(sane -echo)); + $mypdu->debug(0); + $mypdu->log_stdout(0); # suppress stdout output.. unless ($mypdu->spawn($login_cmd)) { diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index b3708cf9f..38c49c51d 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -687,7 +687,7 @@ sub nodepurge { Usage: \tnodepurge \tnodepurge [-h|--help] -\tnodepurge {-v|--version}"; +\tnodepurge [-v|--version]"; my $ret = validate_args($helpmsg); if (!$ret) { @@ -735,6 +735,20 @@ Usage: $warnstr .= "Details: $retstrref->[1]"; } } + # For each node in the noderange remove its configureation files in $config_dir, if file exists + setrsp_progress("Removing configuration files..."); + my $config_dir = "/install/autoinst/"; + foreach my $one_node (@$nodes) { + if ( -e "$config_dir/$one_node") { + unlink "$config_dir/$one_node"; + } + if ( -e "$config_dir/$one_node.post") { + unlink "$config_dir/$one_node.post"; + } + if ( -e "$config_dir/$one_node.pre") { + unlink "$config_dir/$one_node.pre"; + } + } setrsp_progress("Removed all nodes."); setrsp_success($nodes, $warnstr); } diff --git a/xCAT-server/sbin/makenamed.conf b/xCAT-server/sbin/makenamed.conf index 22e1fbbc6..66487f9d9 100755 --- a/xCAT-server/sbin/makenamed.conf +++ b/xCAT-server/sbin/makenamed.conf @@ -30,7 +30,10 @@ is_lsb_ubuntu () DIRECTORY=/var/named -if [ -f /etc/SuSE-release ]; then +# check for SLES +grep -s -q sles /etc/os-release +IS_SLES=$? +if [ -f /etc/SuSE-release ] || [ $IS_SLES -eq 0 ]; then DIRECTORY=/var/lib/named fi FILE=/etc/named.conf diff --git a/xCAT-server/share/xcat/conf/goconslogrotate b/xCAT-server/share/xcat/conf/goconslogrotate index 2e5fd42ff..f972baa30 100644 --- a/xCAT-server/share/xcat/conf/goconslogrotate +++ b/xCAT-server/share/xcat/conf/goconslogrotate @@ -3,6 +3,8 @@ { missingok sharedscripts + copytruncate + delaycompress postrotate kill -HUP `systemctl show -p MainPID goconserver.service 2> /dev/null |awk -F= '{print $2}'` 2> /dev/null || true endscript diff --git a/xCAT-server/share/xcat/install/scripts/post.sle b/xCAT-server/share/xcat/install/scripts/post.sle new file mode 100644 index 000000000..2eba0eae3 --- /dev/null +++ b/xCAT-server/share/xcat/install/scripts/post.sle @@ -0,0 +1,21 @@ + + + + diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 230a12047..6f7e1ce95 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -282,7 +282,7 @@ if [ $? -eq 0 ]; then fi if [ $hassystemd -eq 1 ] ; then - if [[ $OSVER == sles12* ]]; then + if [[ $OSVER =~ sle && $OSVER != sles11* ]]; then cat >/etc/systemd/system/xcatpostinit1.service <<'EOF' #INCLUDE:/install/postscripts/xcatpostinit1.service.yast2# EOF @@ -332,7 +332,7 @@ EOF if [[ $OSVER == ubuntu* ]]; then update-rc.d xcatpostinit1 defaults else - if [[ $OSVER == sles* ]]; then + if [[ $OSVER == sle* ]]; then if [[ $OSVER == sles10* ]]; then /sbin/insserv xcatpostinit1 else @@ -515,7 +515,7 @@ cd / # To skip the conflict, the network service should be stoped in the yast first stage. Then base on the service # dependency, the service start order will be 'YaST2-Second-Stage.service'->'network'->'xcatpostinit1' in serial. # Then the Yast2 will be stopped before running the zypper in otherpkgs. -if [[ $OSVER =~ sles && $OSVER != sles11* ]]; then +if [[ $OSVER =~ sle && $OSVER != sles11* ]]; then service network stop fi diff --git a/xCAT-server/share/xcat/install/scripts/pre.sle15 b/xCAT-server/share/xcat/install/scripts/pre.sle similarity index 100% rename from xCAT-server/share/xcat/install/scripts/pre.sle15 rename to xCAT-server/share/xcat/install/scripts/pre.sle diff --git a/xCAT-server/share/xcat/install/sle/compute.sle15.pkglist b/xCAT-server/share/xcat/install/sle/compute.sle15.pkglist index fe1b6369a..40e1833ba 100644 --- a/xCAT-server/share/xcat/install/sle/compute.sle15.pkglist +++ b/xCAT-server/share/xcat/install/sle/compute.sle15.pkglist @@ -2,3 +2,7 @@ openssl rsync less iputils +insserv-compat +net-tools-deprecated +rsyslog +nfs-client diff --git a/xCAT-server/share/xcat/install/sle/compute.sle15.tmpl b/xCAT-server/share/xcat/install/sle/compute.sle15.tmpl index 488b29b4b..58a2198c0 100644 --- a/xCAT-server/share/xcat/install/sle/compute.sle15.tmpl +++ b/xCAT-server/share/xcat/install/sle/compute.sle15.tmpl @@ -94,9 +94,9 @@ - #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.sle15# + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.sle# #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/chroot.sles# - #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.sles11# + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.sle# diff --git a/xCAT-server/share/xcat/install/sles/service.sle15.pkglist b/xCAT-server/share/xcat/install/sles/service.sle15.pkglist new file mode 100644 index 000000000..63bff5bf3 --- /dev/null +++ b/xCAT-server/share/xcat/install/sles/service.sle15.pkglist @@ -0,0 +1,25 @@ +@base +@x11 +openssl +iputils +ntp +rsync +rsyslog +insserv-compat +net-tools-deprecated +nmap +perl-DBI +vsftpd +perl-IO-Tty +perl-Expect +perl-SNMP +unixODBC +perl-Net-DNS +perl-DBD-Pg +postgresql-server +postgresql +perl-DBD-mysql +mariadb-client +#libmysqlclient18 +vim + diff --git a/xCAT-server/share/xcat/install/sles/service.sle15.ppc64le.otherpkgs.pkglist b/xCAT-server/share/xcat/install/sles/service.sle15.ppc64le.otherpkgs.pkglist new file mode 100644 index 000000000..df2bb04d7 --- /dev/null +++ b/xCAT-server/share/xcat/install/sles/service.sle15.ppc64le.otherpkgs.pkglist @@ -0,0 +1,2 @@ +xcat/xcat-core/xCATsn +xcat/xcat-dep/sles15/ppc64le/goconserver diff --git a/xCAT-server/share/xcat/install/sles/service.sle15.tmpl b/xCAT-server/share/xcat/install/sles/service.sle15.tmpl new file mode 100644 index 000000000..b1ed324ea --- /dev/null +++ b/xCAT-server/share/xcat/install/sles/service.sle15.tmpl @@ -0,0 +1,99 @@ + + + + + + true + true + #XCATVAR:PERSKCMDLINE# + false + false + mbr + + + + UTC + #TABLE:site:key=timezone:value# + + + english-us + + en_US + + false + false + false + true + + + non + + + true + true + true + + + + + + XCATPARTITIONHOOK + true + all + + + + + + #INSTALL_SOURCES# + + + + + SLES + + + #INCLUDE_DEFAULT_PTRNLIST_S# + + + #INCLUDE_DEFAULT_PKGLIST_S# + + + + + + + root + #CRYPT:passwd:key=system,username=root:password# + true + + + + + + + true + true + local + linux + + + + dhcp + eth0 + onboot + + + true + + false + + + + + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.sle# + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/chroot.sles# + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.sle# + + + diff --git a/xCAT-server/share/xcat/install/sles/service.sle15.x86_64.otherpkgs.pkglist b/xCAT-server/share/xcat/install/sles/service.sle15.x86_64.otherpkgs.pkglist new file mode 100644 index 000000000..1785e3c01 --- /dev/null +++ b/xCAT-server/share/xcat/install/sles/service.sle15.x86_64.otherpkgs.pkglist @@ -0,0 +1,2 @@ +xcat/xcat-core/xCATsn +xcat/xcat-dep/sles15/x86_64/goconserver diff --git a/xCAT-server/share/xcat/netboot/centos/dracut_047 b/xCAT-server/share/xcat/netboot/centos/dracut_047 new file mode 120000 index 000000000..fe26fce05 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/centos/dracut_047 @@ -0,0 +1 @@ +../rh/dracut_047 \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist index 7c33f0d7b..3777e6445 100644 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.pkglist @@ -11,3 +11,4 @@ wget python3 tar bzip2 +bc diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall index eac5a8f4d..545ec8435 100755 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall @@ -40,6 +40,18 @@ then sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config fi +#--for redhat 8 and 8.1 +#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys +if [ -f "$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service" ] +then + rm -rf $installroot/etc/systemd/system/multi-user.target.wants/firewalld.service +fi +if [ -f "$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service" ] +then + rm -rf $installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service +fi + + #-- Example of booted image versioning #-- We want to know, with what configuration (version of the image) each node was booted. #-- Hence, we keep image definition files and postscripts in CVS. During image generation we create file /etc/IMGVERSION and fill it with CVS "$Id$" of files with image definition (.pkglist, .exlist, .repolist, .postinstall). Then, during boot, each "CVS enabled" postscript (see /install/postscripts/cvs_template.sh and /install/postscripts/cvs_template.pl) adds one line to /etc/IMGVERSION. Then you can determine in any time what image you are running and what postscipts in which versions were run. diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist index 7c33f0d7b..3777e6445 100644 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.pkglist @@ -11,3 +11,4 @@ wget python3 tar bzip2 +bc diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall index 366e3d1df..e6728e1a7 100755 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall @@ -39,6 +39,17 @@ if [ -f "$installroot/etc/selinux/config" ] then sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config fi +#--for redhat 8 and 8.1 +#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys +if [ -f "$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service" ] +then + rm -rf $installroot/etc/systemd/system/multi-user.target.wants/firewalld.service +fi +if [ -f "$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service" ] +then + rm -rf $installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service +fi + #-- Example of booted image versioning #-- We want to know, with what configuration (version of the image) each node was booted. diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 608c3e4a5..253ea36f3 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -717,7 +717,7 @@ if (@new_order) { @ndrivers = (@new_order, @ndrivers); } -if (-f "$rootimg_dir/lib/modules/$kernelver/kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko") { +if (-d "$rootimg_dir/lib/modules/$kernelver/kernel/drivers/net/ethernet/mellanox/mlx4") { for (@ndrivers) { s/mlx_en/mlx4_en/; } diff --git a/xCAT-server/share/xcat/netboot/rh/service.rhels8.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/rh/service.rhels8.ppc64le.pkglist index e15993e89..4544f99e2 100644 --- a/xCAT-server/share/xcat/netboot/rh/service.rhels8.ppc64le.pkglist +++ b/xCAT-server/share/xcat/netboot/rh/service.rhels8.ppc64le.pkglist @@ -13,3 +13,4 @@ perl-DBD-Pg python3 tar bzip2 +bc diff --git a/xCAT-server/share/xcat/netboot/rh/service.rhels8.x86_64.pkglist b/xCAT-server/share/xcat/netboot/rh/service.rhels8.x86_64.pkglist index e15993e89..4544f99e2 100644 --- a/xCAT-server/share/xcat/netboot/rh/service.rhels8.x86_64.pkglist +++ b/xCAT-server/share/xcat/netboot/rh/service.rhels8.x86_64.pkglist @@ -13,3 +13,4 @@ perl-DBD-Pg python3 tar bzip2 +bc diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sle15.exlist b/xCAT-server/share/xcat/netboot/sles/compute.sle15.exlist new file mode 100644 index 000000000..c7678ccd7 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/compute.sle15.exlist @@ -0,0 +1,36 @@ +./boot* +./etc/bootsplash/themes/SLES/images* +./opt/sci/include* +./usr/include* +./usr/lib/locale* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/auto/Encode/CN* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/auto/Encode/JP* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/auto/Encode/TW* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/auto/Encode/KR* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/Encode/CN* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/Encode/JP* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/Encode/KR* +./usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/Encode/TW* +./usr/lib64/gcc/x86_64-suse-linux/4.3/include* +./usr/local/include* +./usr/local/man* +./usr/x86_64-suse-linux/include* +./usr/share/X11/locale/* ++./usr/share/X11/locale/en_US.UTF-8* ++./usr/share/X11/locale/C* +./usr/share/cracklib* +./usr/share/doc* +./usr/share/doc/packages/cyrus-sasl/doc* +./usr/share/gnome* +./usr/share/i18n* +./usr/share/info* +./usr/share/locale/* ++./usr/share/locale/en_US* ++./usr/share/locale/C* +./usr/share/man* +./usr/share/omf* +./usr/share/vim/site/doc* +./usr/share/vim/vim72/doc* +./var/cache/man* +./var/cache/yum* + diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sle15.pkglist b/xCAT-server/share/xcat/netboot/sles/compute.sle15.pkglist new file mode 100644 index 000000000..20e05e5e8 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/compute.sle15.pkglist @@ -0,0 +1,50 @@ +aaa_base +coreutils +bash +dbus-1 +wicked +device-mapper +dracut +nfs-kernel-server +keyutils +lvm2 +openssl +dhcp-client +openssh +procps +psmisc +wget +sysconfig +rsyslog +vim +rsync +timezone +bc +ntp +gzip +e2fsprogs +parted +binutils +tar +open-iscsi +curl +btrfsprogs +cryptsetup +dmraid +mdadm +multipath-tools +gpg2 +which +cifs-utils +open-lldp +fcoe-utils +util-linux-systemd +udev +kernel-default +kernel-firmware +adaptec-firmware +xz +insserv-compat +net-tools-deprecated +rsyslog +iputils diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sle15.postinstall b/xCAT-server/share/xcat/netboot/sles/compute.sle15.postinstall new file mode 100755 index 000000000..c75134560 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/compute.sle15.postinstall @@ -0,0 +1,46 @@ +#!/bin/sh +#-- Do not remove following line if you want to make use of CVS version tracking +#-- $Id: compute.postinstall,v 1.21 2008/09/04 12:05:45 sikorsky Exp $ +#-- jurij.sikorsky@t-systems.cz +#-- +#-- this script is run after all packages from $profile.pkglist are installed +#-- +#-- it gets these arguments: +#-- +#-- $1 = install root (chroot directory for profile) +#-- $2 = OS version +#-- $3 = architecture +#-- $4 = profile name +#-- $5 = work dir (where genimage is located) +#-- +#-- +installroot=$1 +osver=$2 +arch=$3 +profile=$4 +workdir=$5 + +#-- Example how /etc/fstab can be automatically generated during image generation: +cat <$installroot/etc/fstab +proc /proc proc rw 0 0 +sysfs /sys sysfs rw 0 0 +devpts /dev/pts devpts rw,gid=5,mode=620 0 0 +${profile}_${arch} / tmpfs rw 0 1 +none /tmp tmpfs defaults,size=10m 0 2 +none /var/tmp tmpfs defaults,size=10m 0 2 +END + +#-- Uncomment the line contains "cons" in /etc/inittab +#cons:12345:respawn:/sbin/smart_agetty -L 38400 console +TMP_inittab=`sed 's/\(#\)\(cons:12345.*\)$/\2/' $installroot/etc/inittab` +echo "$TMP_inittab" > $installroot/etc/inittab + + +#-- Example of booted image versioning +#-- We want to know, with what configuration (version of the image) each node was booted. +#-- Hence, we keep image definition files and postscripts in CVS. During image generation we create file /etc/IMGVERSION and fill it with CVS "$Id$" of files with image definition (.pkglist, .exlist, .repolist, .postinstall). Then, during boot, each "CVS enabled" postscript (see /install/postscripts/cvs_template.sh and /install/postscripts/cvs_template.pl) adds one line to /etc/IMGVERSION. Then you can determine in any time what image you are running and what postscipts in which versions were run. +#cat /dev/null > $installroot/etc/IMGVERSION +#for ext in pkglist exlist postinstall repolist; do +# [ -r $workdir/$profile.$ext ] && cat $workdir/$profile.$ext | grep -E '^[[:space:]]*#.*[[:space:]]\$Id' >> $installroot/etc/IMGVERSION +#done + diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sle15.x86_64.pkglist b/xCAT-server/share/xcat/netboot/sles/compute.sle15.x86_64.pkglist new file mode 120000 index 000000000..0e114f64f --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/compute.sle15.x86_64.pkglist @@ -0,0 +1 @@ +compute.sle15.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.netboot b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.netboot index 79f85312e..d98aa6c54 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.netboot +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.netboot @@ -1,7 +1,7 @@ #!/bin/sh echo $drivers dracut_install wget tar cpio gzip modprobe touch echo cut wc xz -dracut_install grep ifconfig hostname awk egrep grep dirname expr +dracut_install grep ifconfig ip hostname awk egrep grep dirname expr dracut_install mount.nfs dracut_install parted mke2fs bc mkswap swapon chmod inst "$moddir/xcat-updateflag" "/tmp/updateflag" diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite index 2c00d3ec8..ccbdc49cf 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite @@ -1,7 +1,7 @@ #!/bin/sh echo $drivers dracut_install wget cpio gzip modprobe wc touch echo cut -dracut_install grep ifconfig hostname awk egrep grep dirname expr logger +dracut_install grep ifconfig ip hostname awk egrep grep dirname expr logger dracut_install parted mke2fs bc mkswap swapon chmod inst "$moddir/xcat-updateflag" "/tmp/updateflag" inst_hook pre-mount 5 "$moddir/xcat-premount.sh" diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh index 9471787b7..f52312e38 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh @@ -153,11 +153,11 @@ function getdevfrommac() { done } -for lf in /tmp/dhclient.*.lease; do - netif=${lf#*.} - netif=${netif%.*} - cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases" -done +bootif=$(ls /tmp/net.*.conf|sed -e s/.*net\.// -e s/\.conf//) +cat < $NEWROOT/etc/sysconfig/network/ifcfg-$bootif +BOOTPROTO='dhcp' +STARTMODE='auto' +EOF if [ -f $NEWROOT/etc/hostname ]; then echo `hostname -s` > $NEWROOT/etc/hostname diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot index 7414e5b7d..4b6c9aeaf 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot @@ -295,12 +295,12 @@ function getdevfrommac() { if [ -z $STATEMNT ]; then - for lf in /tmp/dhclient.*.lease; do - netif=${lf#*.} - netif=${netif%.*} - cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases" - [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases" - done + bootif=$(ls /tmp/net.*.conf|sed -e s/.*net\.// -e s/\.conf//) + cat < $NEWROOT/etc/sysconfig/network/ifcfg-$bootif +BOOTPROTO='dhcp' +STARTMODE='auto' +EOF + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/etc/sysconfig/network/ifcfg-$bootif" if [ ! -z "$ifname" ]; then MACX=${ifname#*:} @@ -336,6 +336,9 @@ fi [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "setting hostname..." echo `hostname` > $NEWROOT/etc/hostname +if [ ! -z $NODE ]; then + echo $NODE > $NEWROOT/etc/hostname +fi logger $SYSLOGHOST -t $log_label -p debug "Exiting xcatroot..." diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index dc6c66f09..c406cdc9c 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -72,6 +72,31 @@ sub xdie { die @_; } +sub umount { + # some rpms mounts the imageroot/proc on the /proc, need to release it, + # otherwise got kernal panic when installing + # sometimes, the proc fs is not mounted, so one warning/error message will display, + # and I add one check point here. + my $MFD; + open MFD, "/proc/mounts"; + my @lines = ; + close MFD; + + my $ret = grep m{$rootimg_dir/proc}, @lines; + if ($ret > 0) { + system("umount -l $rootimg_dir/proc"); + } + $ret = grep m{$rootimg_dir/sys}, @lines; + if ($ret > 0) { + system("umount -l $rootimg_dir/sys"); + } +} + +# Make sure we clean up all mounts everytime +END { + umount(); +} + #-- fetch current version form CVS (overwrite locally changed versions) # if (opendir(CVS,"$pathtofiles/CVS")){ # close CVS; @@ -203,7 +228,7 @@ unless (grep /af_packet/, @ndrivers) { } my $osver_host; -if (`grep VERSION /etc/SuSE-release` =~ /VERSION = (\d+)/) { +if (`grep VERSION /etc/os-release` =~ /VERSION="(\d+)/) { $osver_host = $1; } else { $osver_host = 11; @@ -225,26 +250,32 @@ unless ($onlyinitrd) { mkpath "$rootimg_dir/etc"; mkpath "$rootimg_dir/dev"; + mkpath "$rootimg_dir/proc"; + mkpath "$rootimg_dir/sys"; + + #needed for newer versions of the SLE permissions RPM. See: https://github.com/openSUSE/permissions/commit/2d0ef5d55b30f72322d18951214353ecfd9c4245 + system "mount -t proc proc $rootimg_dir/proc"; + #Create /sys to have /sys/kernel/fscaps. Fixes: "Warning: running kernel does not support fscaps" + system "mount -o bind /sys $rootimg_dir/sys"; #system "mount -o bind /dev $rootimg_dir/dev"; unless (-e "$rootimg_dir/dev/zero") { - system "mknod $rootimg_dir/dev/zero c 1 5"; + system "mknod -m 0666 $rootimg_dir/dev/zero c 1 5"; } unless (-e "$rootimg_dir/dev/null") { - system "mknod $rootimg_dir/dev/null c 1 3"; #that's neccessary for SLES11 + system "mknod -m 0666 $rootimg_dir/dev/null c 1 3"; #that's neccessary for SLES11+ } - unless (-e "$rootimg_dir/dev/random") { - system "mknod $rootimg_dir/dev/random c 1 8"; #that's neccessary for SLES11 + system "mknod -m 0666 $rootimg_dir/dev/random c 1 8"; #that's neccessary for SLES11+ } unless (-e "$rootimg_dir/dev/urandom") { - system "mknod $rootimg_dir/dev/urandom c 1 9"; #that's neccessary for SLES11 + system "mknod -m 0666 $rootimg_dir/dev/urandom c 1 9"; #that's neccessary for SLES11+ } for (my $i = 0 ; $i <= 12 ; $i++) { unless (-e "$rootimg_dir/dev/tty$i") { - system "mknod $rootimg_dir/dev/tty$i c 4 $i"; #that's neccessary for SLES11 + system "mknod $rootimg_dir/dev/tty$i c 4 $i"; #that's neccessary for SLES11+ } } @@ -264,11 +295,17 @@ unless ($onlyinitrd) { # To support multiple paths for osimage.pkgdir foreach $dir (@pkgdirs) { + my $ddir = $dir; if (-d "$dir/1") { - $dir .= "/1"; + $ddir .= "/1"; } - system("zypper -R $rootimg_dir $non_interactive ar file:$dir $osver-$i"); + system("zypper -R $rootimg_dir $non_interactive ar file:$ddir $osver-$i"); $i++; + if (-d "$dir/2") { + $ddir = $dir . "/2"; + system("zypper -R $rootimg_dir $non_interactive ar file:$ddir $osver-$i"); + $i++; + } } #if(-e "$rootimg_dir/etc/zypp/repos.d/$osver.repo") { @@ -391,6 +428,12 @@ unless ($onlyinitrd) { #my $yumcmd = "yum -y -c /tmp/genimage.$$.yum.conf --installroot=$rootimg_dir --disablerepo=* "; #$yumcmd .= "install "; #mkpath("$rootimg_dir/var/lib/yum"); + if (! -f "$rootimg_dir/etc/passwd") { + mkpath("$rootimg_dir/etc/"); + my $passwdfile; + open($passwdfile, ">", "$rootimg_dir/etc/passwd"); + print $passwdfile "root:x:0:0:root:/root:/bin/bash\n"; + } my $yumcmd; if ($osver_host < 11) { $yumcmd = "zypper -R $rootimg_dir $non_interactive install "; @@ -862,19 +905,8 @@ system("cd $rootimg_dir/usr/bin/; ln -s ../../bin/keyctl $rootimg_dir/usr/bin/ke # which is different from the Redhat family -# some rpms mounts the imageroot/proc on the /proc, need to release it, -# otherwise got kernal panic when installing -# sometimes, the proc fs is not mounted, so one warning/error message will display, -# and I add one check point here. -my $MFD; -open MFD, "/proc/mounts"; -my @lines = ; -close MFD; - -my $ret = grep m{$rootimg_dir/proc}, @lines; -if ($ret > 0) { - system("umount -l $rootimg_dir/proc"); -} +# umount /proc and /sys from rootimg +umount(); # Load driver update disk, and copy them to the root image my @dd_drivers = &load_dd(); @@ -1939,8 +1971,12 @@ sub generic_post { # This function is meant to leave the image in a state approx system("sed -i 's!\\(HWCLOCK=\\).*!\\1\"--localtime\"!' $rootimg_dir/etc/sysconfig/clock"); } + if (-e "$rootimg_dir/etc/sysconfig/network/dhcp") { + system("sed -i 's!^DHCLIENT_SET_HOSTNAME=\\\"no\\\"!DHCLIENT_SET_HOSTNAME=\\\"yes\\\"!' $rootimg_dir/etc/sysconfig/network/dhcp"); + } + unlink("$rootimg_dir/dev/null"); - system("mknod $rootimg_dir/dev/null c 1 3"); + system("mknod -m 0666 $rootimg_dir/dev/null c 1 3"); open($cfgfile, ">", "$rootimg_dir/etc/fstab"); print $cfgfile "devpts /dev/pts devpts gid=5,mode=620 0 0\n"; print $cfgfile "tmpfs /dev/shm tmpfs defaults 0 0\n"; @@ -1963,9 +1999,12 @@ sub generic_post { # This function is meant to leave the image in a state approx print $cfgfile "NETWORKING=yes\n"; close($cfgfile); - open($cfgfile, ">", "$rootimg_dir/etc/resolv.conf"); - print $cfgfile "#Dummy resolv.conf to make boot cleaner"; - close($cfgfile); + # SLE15 has a symlink to /run/netconfig/resolv.conf and does not need a dummy file + if (! -l "$rootimg_dir/etc/resolv.conf") { + open($cfgfile, ">", "$rootimg_dir/etc/resolv.conf"); + print $cfgfile "#Dummy resolv.conf to make boot cleaner"; + close($cfgfile); + } # Create the ifcfg-x file for diskless node. But keep the ONBOOT=no # to skip the break of nfs-based boot @@ -2048,8 +2087,10 @@ sub generic_post { # This function is meant to leave the image in a state approx chmod(0755, "$rootimg_dir/etc/init.d/gettyset"); } - copy("$installroot/postscripts/xcatpostinit", "$rootimg_dir/etc/init.d/xcatpostinit"); - chmod(0755, "$rootimg_dir/etc/init.d/xcatpostinit"); + system("mkdir -p $rootimg_dir/opt/xcat"); + copy("$installroot/postscripts/xcatpostinit", "$rootimg_dir/opt/xcat/xcatpostinit"); + chmod(0755, "$rootimg_dir/opt/xcat/xcatpostinit"); + copy("$installroot/postscripts/xcatpostinit.service", "$rootimg_dir/usr/lib/systemd/system/xcatpostinit.service"); # # set certain system services to start on boot, if the file exists in /etc/init.d as a script, @@ -2068,7 +2109,7 @@ sub generic_post { # This function is meant to leave the image in a state approx system("$cmd"); } else { - $cmd = $cmd . "systemctl start $service.service"; + $cmd = $cmd . "systemctl enable $service.service"; system("$cmd"); } } diff --git a/xCAT-server/share/xcat/netboot/sles/service.sle15.pkglist b/xCAT-server/share/xcat/netboot/sles/service.sle15.pkglist new file mode 100644 index 000000000..a01b69831 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/service.sle15.pkglist @@ -0,0 +1,73 @@ +aaa_base +adaptec-firmware +apache2 +apache2-prefork +bash +bind +bind-utils +binutils +bc +btrfsprogs +bzip2 +cifs-utils +coreutils +cron +cryptsetup +curl +dhcp +dhcp-client +dhcp-relay +dhcp-server +dmraid +e2fsprogs +fcoe-utils +gpg2 +gzip +xz +kernel-default +keyutils +lvm2 +mdadm +multipath-tools +nfs-kernel-server +ntp +openssh +openssl +open-iscsi +open-lldp +pam +pam-modules +parted +perl-doc +perl-Expect +plymouth +plymouth-dracut +procps +psmisc +rpm +rsync +sysconfig +tar +timezone +udev +util-linux +util-linux-systemd +vim +vsftpd +wget +which +zypper +insserv-compat +net-tools-deprecated +rsyslog +#for database +unixODBC +perl-DBD-mysql +mariadb-client +#libmysqlclient18 +# The following rpms are available on the SLES SDK +# You will need to locate and make these rpms available in your zypper +# repository for service node installs and uncomment the following lines: +#MyODBC-unixODBC +perl-DBD-Pg +iputils diff --git a/xCAT-server/share/xcat/netboot/sles/service.sle15.postinstall b/xCAT-server/share/xcat/netboot/sles/service.sle15.postinstall new file mode 100755 index 000000000..201599be0 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/service.sle15.postinstall @@ -0,0 +1,68 @@ +#!/bin/sh +#-- Do not remove following line if you want to make use of CVS version tracking +#-- $Id: compute.postinstall,v 1.21 2008/09/04 12:05:45 sikorsky Exp $ +#-- jurij.sikorsky@t-systems.cz +#-- +#-- this script is run after all packages from $profile.pkglist are installed +#-- +#-- it gets these arguments: +#-- +#-- $1 = install root (chroot directory for profile) +#-- $2 = OS version +#-- $3 = architecture +#-- $4 = profile name +#-- $5 = work dir (where genimage is located) +#-- +#-- +installroot=$1 +osver=$2 +arch=$3 +profile=$4 +workdir=$5 + +#-- Example how /etc/fstab can be automatically generated during image generation: +cp $installroot/etc/fstab $installroot/etc/fstab.prev +cat <$installroot/etc/fstab +proc /proc proc rw 0 0 +sysfs /sys sysfs rw 0 0 +devpts /dev/pts devpts rw,gid=5,mode=620 0 0 +${profile}_${arch} / tmpfs rw 0 1 +none /tmp tmpfs defaults,size=10m 0 2 +none /var/tmp tmpfs defaults,size=10m 0 2 +END + + +cat <>$installroot/etc/hosts +`getent hosts $HOSTNAME` +END + +#Prevent DHCP from starting up until xcatd has had a chance to configure it: +chroot $installroot chkconfig dhcpd off +chroot $installroot chkconfig dhcrelay off + +#turn on some services +chroot $installroot chkconfig dbus on +chroot $installroot chkconfig boot.localnet on +chroot $installroot chkconfig haldaemon on +chroot $installroot chkconfig network on +chroot $installroot chkconfig syslog on +chroot $installroot chkconfig apache2 on + +#export /install as read-only +mkdir -p /install +echo '/install *(ro,no_root_squash,sync,fsid=13)' > $installroot/etc/exports + +#uncomment out the cons line in etc/inittab +#sed -i 's/^\#\(\s\)*cons/cons/' $installroot/etc/inittab + +TMP_inittab=`sed 's/\(#\)\(cons:12345.*\)$/\2/' $installroot/etc/inittab` +echo "$TMP_inittab" > $installroot/etc/inittab + + +#-- Example of booted image versioning +#-- We want to know, with what configuration (version of the image) each node was booted. +#-- Hence, we keep image definition files and postscripts in CVS. During image generation we create file /etc/IMGVERSION and fill it with CVS "$Id$" of files with image definition (.pkglist, .exlist, .repolist, .postinstall). Then, during boot, each "CVS enabled" postscript (see /install/postscripts/cvs_template.sh and /install/postscripts/cvs_template.pl) adds one line to /etc/IMGVERSION. Then you can determine in any time what image you are running and what postscipts in which versions were run. +#cat /dev/null > $installroot/etc/IMGVERSION +#for ext in pkglist exlist postinstall repolist; do +# [ -r $workdir/$profile.$ext ] && cat $workdir/$profile.$ext | grep -E '^[[:space:]]*#.*[[:space:]]\$Id' >> $installroot/etc/IMGVERSION +#done diff --git a/xCAT-server/share/xcat/netboot/sles/service.sle15.ppc64le.otherpkgs.pkglist b/xCAT-server/share/xcat/netboot/sles/service.sle15.ppc64le.otherpkgs.pkglist new file mode 100644 index 000000000..a0927eb0f --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/service.sle15.ppc64le.otherpkgs.pkglist @@ -0,0 +1,3 @@ +-perl-doc +xcat/xcat-core/xCATsn +xcat/xcat-dep/sles15/ppc64le/goconserver diff --git a/xCAT-server/share/xcat/netboot/sles/service.sle15.x86_64.otherpkgs.pkglist b/xCAT-server/share/xcat/netboot/sles/service.sle15.x86_64.otherpkgs.pkglist new file mode 100644 index 000000000..24c1440fd --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/service.sle15.x86_64.otherpkgs.pkglist @@ -0,0 +1,3 @@ +-perl-doc +xcat/xcat-core/xCATsn +xcat/xcat-dep/sles15/x86_64/goconserver diff --git a/xCAT-server/share/xcat/scripts/BMC_change_password.sh b/xCAT-server/share/xcat/scripts/BMC_change_password.sh new file mode 100755 index 000000000..54f01c855 --- /dev/null +++ b/xCAT-server/share/xcat/scripts/BMC_change_password.sh @@ -0,0 +1,107 @@ +#!/bin/sh + +########################################################################## +# This script does the following: +# - use nmap for the range given (ex: 172.11.139.3-5) to generate list of IP address +# - try to connect using REST api +# with root/0penBmc (Witherspoon) or +# ADMIN/ADMIN (Boston) to check if this is OpenBMC system +# - check the output of the REST login to see if password needs to be changed +# - use REST call to change to user provided password +# - report error is password does not meet PAM validation rules +# +# Usage: $0 -r -n +# Note: If this script is being used in the process of discovering new BMCs, +# the new BMC password should be passed to bmcdiscover command +# using the [-p|--bmcpasswd] option. +########################################################################## + + +if [ $# -le 3 ]; then + echo " +Change the default root or ADMIN password of the BMC to the one +specified by '-n' flag. Use the same password when discovering new +BMCs, by passing it with '[-p|--bmcpasswd]' option to 'bmcdiscover' command. +" + echo "Usage:" + echo " $0 -r -n " + echo "Examples:" + echo " Target one node:" + echo " $0 -r 172.11.139.1 -n 0penBmc123" + echo " Target a range of nodes:" + echo " $0 -r 172.11.139.1-12 -n 0penBmc123" + exit +fi + +while getopts n:r:h: option +do + case "${option}" + in + r) RANGE=${OPTARG};; + n) NEW=${OPTARG};; + esac +done + +if ! [ -x "$(command -v nmap)" ]; then + echo 'Error: nmap is not installed.' >&2 + exit 1 +fi + +#Generate the list of IP addresses in the range that user provided +nmap -n -sn $RANGE -oG - | awk '/Up$/{print $2}' > /tmp/$$.ip.list + +WITHERSPOON_DEFAULT_USER="root" +WITHERSPOON_DEFAULT_PW="0penBmc" + +BOSTON_DEFAULT_USER="ADMIN" +BOSTON_DEFAULT_PW="ADMIN" + +CHANGE_PW_REQUIRED="The password provided for this account must be changed before access is granted" +PW_PAM_VALIDATION="password value failed PAM validation checks" +UNAUTHORIZED="Unauthorized" + +for name in `cat /tmp/$$.ip.list` +do + + ## Look for Witherspoon first + SYSTEM_TYPE="Witherspoon" + PasswordChangeNeeded=`curl -sD - --data '{"UserName":"'"$WITHERSPOON_DEFAULT_USER"'","Password":"'"$WITHERSPOON_DEFAULT_PW"'"}' -k -X POST https://$name/redfish/v1/SessionService/Sessions` + + if [[ "$PasswordChangeNeeded" =~ "$CHANGE_PW_REQUIRED" ]]; then + echo "$name: Password change needed for $SYSTEM_TYPE system" + PasswordChanged=`curl -u $WITHERSPOON_DEFAULT_USER:$WITHERSPOON_DEFAULT_PW --data '{"Password":"'"$NEW"'"}' -k -X PATCH https://$name/redfish/v1/AccountService/Accounts/$WITHERSPOON_DEFAULT_USER 2> /dev/null` + if [[ "$PasswordChanged" =~ "$PW_PAM_VALIDATION" ]]; then + echo "$name: Can not change password for $SYSTEM_TYPE system - $PW_PAM_VALIDATION" + elif [[ -z "$PasswordChanged" ]]; then + # If no output, password change was successful + echo "$name: Password for $SYSTEM_TYPE system changed. It might take up to 5 minutes for the BMC to update." + else + # Some unexpected output changing the password - report error and show output + echo "$name: Unable to change password for $SYSTEM_TYPE system - $PasswordChanged" + fi + + continue + fi + + ## Look for Boston next + SYSTEM_TYPE="Boston" + PasswordChangeNeeded=`curl -sD - --data '{"UserName":"'"$BOSTON_DEFAULT_USER"'","Password":"'"$BOSTON_DEFAULT_PW"'"}' -k -X POST https://$name/redfish/v1/SessionService/Sessions` + if [[ "$PasswordChangeNeeded" =~ "$CHANGE_PW_REQUIRED" ]]; then + echo "$name: Password change needed for $SYSTEM_TYPE system" + PasswordChanged=`curl -u $BOSTON_DEFAULT_USER:$BOSTON_DEFAULT_PW --data '{"Password":"'"$NEW"'"}' -k -X PATCH https://$name/redfish/v1/AccountService/Accounts/2 2> /dev/null` + if [[ "$PasswordChanged" =~ "$PW_PAM_VALIDATION" ]]; then + echo "$name: Can not change password for $SYSTEM_TYPE system - $PW_PAM_VALIDATION" + elif [[ -z "$PasswordChanged" ]]; then + # If no output, password change was successful + echo "$name: Password for $SYSTEM_TYPE system changed. It might take up to 5 minutes for the BMC to update." + else + # Some unexpected output changing the password - report error and show output + echo "$name: Unable to change password for $SYSTEM_TYPE system - $PasswordChanged" + fi + + continue + fi + +done + +rm /tmp/$$.ip.list diff --git a/xCAT-server/share/xcat/scripts/configBNT b/xCAT-server/share/xcat/scripts/configBNT index 7cc06582a..f7d25ed8f 100755 --- a/xCAT-server/share/xcat/scripts/configBNT +++ b/xCAT-server/share/xcat/scripts/configBNT @@ -409,7 +409,8 @@ sub config_snmp { my $cfg_access3="snmp-server access 5 security usm\r"; my $cfg_access4="snmp-server access 5 read-view iso\r"; - $mysw->slave->stty(qw(sane -echo)); + $mysw->debug(0); + $mysw->log_stdout(0); # suppress stdout output.. unless ($mysw->spawn($login_cmd)) { @@ -522,7 +523,8 @@ sub config_G8264 { my $main_prompt="Main#"; my $authpw_cmd = "/cfg/sys/ssnmp/snmpv3/usm 5/authpw\r"; - $mysw->slave->stty(qw(sane -echo)); + $mysw->debug(0); + $mysw->log_stdout(0); # suppress stdout output.. unless ($mysw->spawn($login_cmd)) { diff --git a/xCAT-server/share/xcat/scripts/configonie b/xCAT-server/share/xcat/scripts/configonie index debbf89b6..021fef056 100755 --- a/xCAT-server/share/xcat/scripts/configonie +++ b/xCAT-server/share/xcat/scripts/configonie @@ -226,7 +226,6 @@ sub cumulus_connect { $ssh->debug(0); $ssh->log_stdout(0); # suppress stdout output.. - $ssh->slave->stty(qw(sane -echo)); unless ($ssh->spawn($command, @parameters)) { diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index ce35926e1..948f0863a 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.44 +# Version 1.0.45 # # Copyright (C) 2016 - 2019 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -27,6 +27,8 @@ # - Added conserver-xcat to uninstall list # 2019-10-23 Mark Gurevich # - Display a list of packages that could not be uninstalled +# 2019-11-05 Mark Gurevich +# - Display a list of packages that will be installed before "Continue?" # function usage() @@ -624,7 +626,7 @@ function check_repo_version_yum() { type yum >/dev/null 2>&1 || return 255 check_executes repoquery - exit_if_bad "$?" "Install the \`yum-utils' package and rerun." + exit_if_bad "$?" "Install the \`yum-utils' or \`dnf-utils' package and rerun." local -a name=() local -a ver=() while read -r name ver @@ -2156,6 +2158,7 @@ case "${GO_XCAT_ACTION}" in ;; "install"|"update") GO_XCAT_INSTALLER="${GO_XCAT_ACTION}_xcat" + list_xcat_packages ask_to_continue "${GO_XCAT_YES[0]}" "xCAT is going to be ${GO_XCAT_ACTION/%e/}ed." # Use `-y' here. Since the STDOUT is redirected. # `yum' does not display the prompt message properly when diff --git a/xCAT-test/autotest/bundle/MN_basic.bundle b/xCAT-test/autotest/bundle/MN_basic.bundle index de3e09758..5eb686d73 100644 --- a/xCAT-test/autotest/bundle/MN_basic.bundle +++ b/xCAT-test/autotest/bundle/MN_basic.bundle @@ -171,6 +171,9 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_null nodestat_err_node restorexCAT_h restorexCATdb_a_p_V diff --git a/xCAT-test/autotest/bundle/rhels_kits.bundle b/xCAT-test/autotest/bundle/rhels_kits.bundle new file mode 100644 index 000000000..6874edb06 --- /dev/null +++ b/xCAT-test/autotest/bundle/rhels_kits.bundle @@ -0,0 +1,42 @@ +addkit_v +addkit_h +addkit_kit +addkit_i +addkit_multikit +addkit_p +addkitcomp_v +addkitcomp_h +addkitcomp_i +addkitcomp_f +buildkit_v +buildkit_h +buildkit_create +buildkit_create_l +buildkit_cleanrepo_all +buildkit_buildtar +chkkitcomp_v +chkkitcomp_h +chkkitcomp_V +lskit_v +lskit_h +lskit_F +lskit_K +lskit_R +lskit_C +lskitcomp_v +lskitcomp_h +lskitcomp_C +lskitcomp_S +lskitdeployparam_v +lskitdeployparam_h +lskitdeployparam_no_param +lskitdeployparam_k_1 +lskitdeployparam_c_1 +rmkit_v +rmkit_h +rmkit_t_no +rmkit_t_yes +rmkit_f +rmkit_V +rmkitcomp_v +rmkitcomp_h diff --git a/xCAT-test/autotest/bundle/rhels_ppc_daily.bundle b/xCAT-test/autotest/bundle/rhels_ppc_daily.bundle index 39cd43183..0d9eed54a 100644 --- a/xCAT-test/autotest/bundle/rhels_ppc_daily.bundle +++ b/xCAT-test/autotest/bundle/rhels_ppc_daily.bundle @@ -212,6 +212,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null tabdump_servicenode nodeset_check_warninginfo nodeset_errorcommand diff --git a/xCAT-test/autotest/bundle/rhels_ppcle_daily.bundle b/xCAT-test/autotest/bundle/rhels_ppcle_daily.bundle index 9184066d4..9254f0613 100644 --- a/xCAT-test/autotest/bundle/rhels_ppcle_daily.bundle +++ b/xCAT-test/autotest/bundle/rhels_ppcle_daily.bundle @@ -205,6 +205,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null nodeset_check_warninginfo nodeset_disjointdhcps_petitboot nodeset_errorcommand @@ -300,3 +304,4 @@ xcatstanzafile_normal xcatstanzafile_objtype xcatstanzafile_specificvalue xcatstanzafile_tab +go_xcat_devel_from_repo diff --git a/xCAT-test/autotest/bundle/rhels_x86_daily.bundle b/xCAT-test/autotest/bundle/rhels_x86_daily.bundle index 8da4e59e6..2bd2749c6 100644 --- a/xCAT-test/autotest/bundle/rhels_x86_daily.bundle +++ b/xCAT-test/autotest/bundle/rhels_x86_daily.bundle @@ -205,6 +205,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null nodeset_check_warninginfo nodeset_errorcommand nodeset_xnba @@ -299,3 +303,4 @@ xcatstanzafile_normal xcatstanzafile_objtype xcatstanzafile_specificvalue xcatstanzafile_tab +go_xcat_devel_from_repo diff --git a/xCAT-test/autotest/bundle/sles_ppc_daily.bundle b/xCAT-test/autotest/bundle/sles_ppc_daily.bundle index aacf5b76c..fcb5b2d5c 100644 --- a/xCAT-test/autotest/bundle/sles_ppc_daily.bundle +++ b/xCAT-test/autotest/bundle/sles_ppc_daily.bundle @@ -170,6 +170,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null nodeset_check_warninginfo nodeset_errorcommand nodeset_grub2 diff --git a/xCAT-test/autotest/bundle/sles_ppcle_daily.bundle b/xCAT-test/autotest/bundle/sles_ppcle_daily.bundle index 1e8ed265d..4e15bb1ca 100644 --- a/xCAT-test/autotest/bundle/sles_ppcle_daily.bundle +++ b/xCAT-test/autotest/bundle/sles_ppcle_daily.bundle @@ -155,6 +155,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null nodeset_check_warninginfo nodeset_disjointdhcps_petitboot nodeset_errorcommand @@ -244,3 +248,4 @@ xcatstanzafile_normal xcatstanzafile_objtype xcatstanzafile_specificvalue xcatstanzafile_tab +go_xcat_devel_from_repo diff --git a/xCAT-test/autotest/bundle/sles_ppcle_weekly.bundle b/xCAT-test/autotest/bundle/sles_ppcle_weekly.bundle index 08534fe14..557c79214 100644 --- a/xCAT-test/autotest/bundle/sles_ppcle_weekly.bundle +++ b/xCAT-test/autotest/bundle/sles_ppcle_weekly.bundle @@ -17,5 +17,3 @@ nodeset_shell reg_linux_diskfull_installation_flat reg_linux_diskless_installation_flat reg_linux_statelite_installation_flat -sles_migration1 -sles_migration2 diff --git a/xCAT-test/autotest/bundle/sles_x86_daily.bundle b/xCAT-test/autotest/bundle/sles_x86_daily.bundle index fb00734d3..a7ec89506 100644 --- a/xCAT-test/autotest/bundle/sles_x86_daily.bundle +++ b/xCAT-test/autotest/bundle/sles_x86_daily.bundle @@ -155,6 +155,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null nodeset_check_warninginfo nodeset_errorcommand nodeset_noderange @@ -243,3 +247,4 @@ xcatstanzafile_normal xcatstanzafile_objtype xcatstanzafile_specificvalue xcatstanzafile_tab +go_xcat_devel_from_repo diff --git a/xCAT-test/autotest/bundle/sles_x86_weekly.bundle b/xCAT-test/autotest/bundle/sles_x86_weekly.bundle index f6928afe4..8792401aa 100644 --- a/xCAT-test/autotest/bundle/sles_x86_weekly.bundle +++ b/xCAT-test/autotest/bundle/sles_x86_weekly.bundle @@ -17,5 +17,3 @@ nodeset_shell reg_linux_diskfull_installation_flat reg_linux_diskless_installation_flat reg_linux_statelite_installation_flat -sles_migration1 -sles_migration2 diff --git a/xCAT-test/autotest/bundle/ubuntu_ppcle_daily.bundle b/xCAT-test/autotest/bundle/ubuntu_ppcle_daily.bundle index f9dff496b..5da3ac5fe 100644 --- a/xCAT-test/autotest/bundle/ubuntu_ppcle_daily.bundle +++ b/xCAT-test/autotest/bundle/ubuntu_ppcle_daily.bundle @@ -125,6 +125,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null nodeset_errorcommand nodeset_check_warninginfo nodeset_grub2 diff --git a/xCAT-test/autotest/bundle/ubuntu_x86_daily.bundle b/xCAT-test/autotest/bundle/ubuntu_x86_daily.bundle index 280fb0f6e..46ff09f19 100644 --- a/xCAT-test/autotest/bundle/ubuntu_x86_daily.bundle +++ b/xCAT-test/autotest/bundle/ubuntu_x86_daily.bundle @@ -125,6 +125,10 @@ noderm_err_node noderm_h noderm_noderange noderm_null +nodepurge_err_node +nodepurge_h +nodepurge_noderange +nodepurge_null nodeset_errorcommand nodeset_check_warninginfo nodeset_noderange diff --git a/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 index efbace4c8..f475d5a27 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/reventlog_resolved_cases0 @@ -64,6 +64,6 @@ os:Linux hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:reventlog $$CN resolved=Led -check:rc==1 +check:rc==0 check:output=~Attempting to resolve the following log entries: Led... end diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 index 44bc46855..eac07774f 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 @@ -12,10 +12,10 @@ hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd: rinv $$CN firm | tee /tmp/xcattest.rinv_check_active_fw_count.output check:rc==0 -cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l +cmd: grep -i 'Active)\*' /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'HOST Firmware Product' | wc -l check:rc==0 check:output=~1 -cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'BMC Firmware Product'|grep -i 'Active)\*' | wc -l +cmd: grep -i 'Active)\*' /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'BMC Firmware Product' | wc -l check:rc==0 check:output=~1 cmd : rm -rf /tmp/xcattest.rinv_check_active_fw_count.output @@ -28,10 +28,10 @@ hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd: rinv $$CN firm -V | tee /tmp/xcattest.rinv_check_active_fw_count_verbose.output check:rc==0 -cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count_verbose.output| grep -i 'HOST Firmware Product' | grep -i 'Active)\*' | wc -l +cmd: grep -i 'Active)\*' /tmp/xcattest.rinv_check_active_fw_count_verbose.output| grep -i 'HOST Firmware Product' | wc -l check:rc==0 check:output=~1 -cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count_verbose.output | grep -i 'BMC Firmware Product'|grep -i 'Active)\*' | wc -l +cmd: grep -i 'Active)\*' /tmp/xcattest.rinv_check_active_fw_count_verbose.output | grep -i 'BMC Firmware Product' | wc -l check:rc==0 check:output=~1 cmd : rm -rf /tmp/xcattest.rinv_check_active_fw_count_verbose.output diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 index 9f7fc6ef1..695a6d7e7 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 @@ -1,4 +1,4 @@ -start:rspconfig_record_firmware_level +start:openbmc_rspconfig_record_firmware_level description: Record the firmware level for the start of each testcase to display in the output hcp:openbmc label:cn_bmc_ready,hctrl_openbmc @@ -6,7 +6,7 @@ cmd: rinv $$CN firm check:rc==0 end -start:rspconfig_get_all_network +start:openbmc_rspconfig_get_all_network description: Check that we can get all the network related attributes from the BMC os:Linux hcp:openbmc @@ -20,7 +20,7 @@ check:output=~$$CN: BMC Hostname: check:output=~$$CN: BMC VLAN ID: end -start:rspconfig_get_all_error +start:openbmc_rspconfig_get_all_error description: Check the parsing code for rspconfig (error cases) hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -29,7 +29,7 @@ check:rc==1 check:output=~Error: (\[.*?\]: )?Unsupported command end -start:rspconfig_get_set_error +start:openbmc_rspconfig_get_set_error description: Check the parsing code for rspconfig (error cases) - Cannot get/set in same line hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -38,7 +38,7 @@ check:rc==1 check:output=~Error: (\[.*?\]: )?Can not set and query OpenBMC information at the same time end -start:rspconfig_get_and_set_hostname +start:openbmc_rspconfig_get_and_set_hostname description: Test setting and getting hostname on the BMC os:Linux hcp:openbmc @@ -74,7 +74,7 @@ check:output=~$$CN: BMC Hostname: check:rc==0 end -start:rspconfig_admin_passwd_error +start:openbmc_rspconfig_admin_passwd_error description: Check the error handling for changing of BMC password hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -86,7 +86,7 @@ check:rc==1 check:output=~Current BMC password is incorrect, cannot set the new password. end -start:rspconfig_admin_passwd +start:openbmc_rspconfig_admin_passwd description: Check the setting of BMC password to the same value hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -95,7 +95,7 @@ check:rc==0 check:output=~$$CN: BMC Setting Password end -start:rspconfig_autoreboot +start:openbmc_rspconfig_autoreboot description: Check the getting and setting of autoreboot attribute hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -116,7 +116,7 @@ check:rc==1 check:output=~$$CN: Error: Invalid value '2' for 'autoreboot', Valid values: 0,1 end -start:rspconfig_bootmode +start:openbmc_rspconfig_bootmode description: Check the getting and setting of bootmode attribute hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -134,7 +134,7 @@ check:rc==1 check:output=~$$CN: Error: Invalid value 'abc' for 'bootmode', Valid values: regular,safe,setup end -start:rspconfig_dump +start:openbmc_rspconfig_dump description: Check dump generation, download and removal hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -150,12 +150,12 @@ check:output=~Downloading dump cmd: ls -l /var/log/xcat/dump/*$$CN* check:rc==0 #Remove last generated dump -cmd: rspconfig mid05tor12cn03 dump -l | tail -1 | cut -d ' ' -f2 | tr -d "[]" | xargs -i{} rspconfig $$CN dump -c {} +cmd: rspconfig $$CN dump -l | tail -1 | cut -d ' ' -f2 | tr -d "[]" | xargs -i{} rspconfig $$CN dump -c {} check:rc==0 check:output=clear end -start:rspconfig_ntpservers +start:openbmc_rspconfig_ntpservers description: Check the getting and setting of ntpservers attribute hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -170,7 +170,7 @@ check:rc==0 check:output=~$$CN: BMC NTP Servers: None end -start:rspconfig_powerrestorepolicy +start:openbmc_rspconfig_powerrestorepolicy description: Check the getting and setting of powerrestorepolicy attribute hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -197,7 +197,7 @@ check:rc==1 check:output=~$$CN: Error: Invalid value 'abc' for 'powerrestorepolicy', Valid values: always_off,always_on,restore end -start:rspconfig_powersupplyredundancy +start:openbmc_rspconfig_powersupplyredundancy description: Check the getting and setting of powersupplyredundancy attribute hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -209,7 +209,7 @@ check:rc==0 check:output=~$$CN: BMC PowerSupplyRedundancy: Disabled end -start:rspconfig_sshcfg +start:openbmc_rspconfig_sshcfg description: Check the copying of ssh keys to the BMC hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -218,7 +218,7 @@ check:rc==0 check:output=~$$CN: ssh keys copied to end -start:rspconfig_timesyncmethod +start:openbmc_rspconfig_timesyncmethod description: Check the getting and setting of timesyncmethod attribute hcp: openbmc label:cn_bmc_ready,hctrl_openbmc @@ -235,3 +235,21 @@ cmd: rspconfig $$CN timesyncmethod=abc check:rc==1 check:output=~$$CN: Error: Invalid value 'abc' for 'timesyncmethod', Valid values: manual,ntp end + +start:openbmc_rspconfig_thermalmode +description: Check the getting and setting of thermalmode attribute +hcp: openbmc +label:cn_bmc_ready,hctrl_openbmc +cmd: rspconfig $$CN thermalmode=heavy_io +check:rc==0 +check:output=~$$CN: BMC Setting BMC ThermalMode +cmd: rspconfig $$CN thermalmode +check:rc==0 +check:output=~$$CN: BMC BootMode: HEAVY_IO +cmd: rspconfig $$CN thermalmode=default +check:rc==0 +check:output=~$$CN: BMC Setting BMC ThermalMode +cmd: rspconfig $$CN thermalmode=abc +check:rc==1 +check:output=~$$CN: Error: Invalid value 'abc' for 'thermalmode', Valid values: default,custom,heavy_io,max_base_fan_floor +end diff --git a/xCAT-test/autotest/testcase/commoncmd/retry_install.sh b/xCAT-test/autotest/testcase/commoncmd/retry_install.sh index 4986e344f..770033781 100755 --- a/xCAT-test/autotest/testcase/commoncmd/retry_install.sh +++ b/xCAT-test/autotest/testcase/commoncmd/retry_install.sh @@ -5,25 +5,34 @@ declare -i a=0 declare -i tryreinstall=1 node=$1 osimage=$2 +vmhost=`lsdef $node -i vmhost -c | cut -d '=' -f 2` if [ $# -eq 3 ]; then times=$3+1 - echo "Try to retry rinstall $3 times ......" + echo "Try to rinstall for $3 times ......" else times=6 - echo "Try to retry rinstall 5 times ......" + echo "Try to rinstall for 5 times ......" fi for (( tryreinstall = 1 ; tryreinstall < $times ; ++tryreinstall )) do - echo "Try to install $node on the $tryreinstall time..." + echo "[$tryreinstall] Trying to install $node with $osimage ..." + + if [[ ! -z $vmhost ]];then + # Display memory and active VMs on VM host, when installing on VM + echo "Memory on vmhost $vmhost" + ssh $vmhost free -g + echo "Active VMs on vmhost $vmhost" + ssh $vmhost virsh list + fi echo "rinstall $node osimage=$osimage" rinstall $node osimage=$osimage if [ $? != 0 ];then - echo "rinstall failed, double check xcat command rinstall to see if it is a bug..." + echo "rinstall command failed ..." exit 1 fi @@ -32,7 +41,8 @@ do while [ ! `lsdef -l $node|grep status|grep booted` ] do sleep 10 - echo "The status is not booted..." + stat=`lsdef $node -i status -c | cut -d '=' -f 2` + echo "[$a] The status is not booted... ($stat)" a=++a if [ $a -gt 400 ];then a=0 @@ -53,7 +63,7 @@ do echo "The canruncmd is $canruncmd" if [[ $canruncmd -eq 0 && $tobooted -eq 0 && $pingable -eq 0 ]];then - echo "The provision succeed on the $tryreinstall time....." + echo "The provision succeeded on the $tryreinstall time....." installsuccess=1 break fi @@ -61,7 +71,7 @@ do done if [ $installsuccess -eq 1 ];then - echo "The provision succeed......" + echo "The provision succeeded......" exit 0 else echo "The provision failed......" diff --git a/xCAT-test/autotest/testcase/confignetwork/cases0 b/xCAT-test/autotest/testcase/confignetwork/cases0 index 68ba386c5..414883423 100644 --- a/xCAT-test/autotest/testcase/confignetwork/cases0 +++ b/xCAT-test/autotest/testcase/confignetwork/cases0 @@ -842,6 +842,10 @@ cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=100;var2=`echo $cnip |sed -r ' check:rc==0 cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var3=101.;var4=`echo $cnip |awk -F. '{print $2}'`;var5=.0.0;secondnet=$var3$var4$var5;mkdef -t network -o confignetworks_test2 net=$secondnet mask=255.255.0.0 mgtifname=$$THIRDNIC check:rc==0 +cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var1=101;var2=`echo $cnip |sed -r 's/[^\.]*(..\..*)/\1/'`;second1ip=$var1$var2;chdef $$CN nicips.$$THIRDNIC=$second1ip nictypes.$$THIRDNIC=Ethernet nicnetworks.$$THIRDNIC=confignetworks_test2 +check:rc==0 +cmd:updatenode $$CN -P confignetwork +check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC= nictypes.$$SECONDNIC= nicnetworks.$$SECONDNIC= nicips.$$THIRDNIC= nictypes.$$THIRDNIC= nicnetworks.$$THIRDNIC= check:rc==0 cmd:cnip=__GETNODEATTR($$CN,ip)__;echo $cnip;var3=102.;var4=`echo $cnip |awk -F. '{print $2}'`;var5=.0.0;secondnet=$var3$var4$var5;mkdef -t network -o confignetworks_test3 net=$secondnet mask=255.255.0.0 diff --git a/xCAT-test/autotest/testcase/genesis/test.sh b/xCAT-test/autotest/testcase/genesis/test.sh index bdd174318..4b46ea617 100755 --- a/xCAT-test/autotest/testcase/genesis/test.sh +++ b/xCAT-test/autotest/testcase/genesis/test.sh @@ -5,10 +5,10 @@ function runcmd(){ echo "Run command $* ..." result=`$*` if [[ $? -eq 0 ]];then - echo -e "Run command $*... [Succeed]\n"; + echo -e "Run command $* ... [Succeed]\n"; return 0; else - echo -e "Run command $*... [Failed]\n"; + echo -e "Run command $* ... [Failed]\n"; return 1; fi } @@ -23,7 +23,7 @@ MASTER_PRIVATE_NETWORK="192_168_0_0-255_255_0_0" function check_destiny() { - cmd="chdef ${TESTNODE} arch=ppc64le cons=ipmi groups=all ip=${TESTNODE_IP} mac=4e:ee:ee:ee:ee:0e netboot=$NETBOOT"; + cmd="chdef ${TESTNODE} arch=ppc64le cons=ipmi groups=all ip=${TESTNODE_IP} mac=4e:ee:ee:ee:ee:0e netboot=$NETBOOT tftpserver=$MASTER_PRIVATE_IP xcatmaster=$MASTER_PRIVATE_IP"; runcmd $cmd; lsdef ${TESTNODE} @@ -41,10 +41,14 @@ function check_destiny() { else cmd="ip addr add $MASTER_PRIVATE_IP/$MASTER_PRIVATE_NETMASK dev $NET2"; runcmd $cmd; + echo "Check if ip addess $MASTER_PRIVATE_IP/$MASTER_PRIVATE_NETMASK is added for $NET2" + ip addr show $NET2 cmd="makenetworks"; runcmd $cmd; - ip addr show - makehosts ${TESTNODE} + tabdump networks + cmd="makehosts ${TESTNODE}" + runcmd $cmd + echo "Check if ${TESTNODE} can be found in /etc/hosts" grep ${TESTNODE} /etc/hosts cmd="nodeset ${TESTNODE} shell"; runcmd $cmd; diff --git a/xCAT-test/autotest/testcase/go_xcat/case3 b/xCAT-test/autotest/testcase/go_xcat/case3 new file mode 100644 index 000000000..42edb9024 --- /dev/null +++ b/xCAT-test/autotest/testcase/go_xcat/case3 @@ -0,0 +1,166 @@ +start:go_xcat_devel_from_repo +description:test go-xcat devel on a newly provisioned node +label:go_xcat +os:Linux +#Make sure service node is not off, if it is, power it on +cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi +cmd:lsdef $$SN -i status +check:output=~booted + +#Provision compute node +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +check:output=~Provision node\(s\)\: $$CN +cmd:lsdef -l $$CN | grep status +check:output=~booted + +#Copy go-xcat script +cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" +check:rc==0 + +#Install additional packages on Red Hat +cmd:if xdsh $$CN "grep \"Red Hat\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi + +#Install devel version of xCAT +cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y install" +check:rc==0 +cmd:xdsh $$CN "cat /tmp/go-xcat.log" +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running +cmd:xdsh $$CN "service xcatd stop" +end + +start:go_xcat_stable_from_repo +description:test go-xcat GA on a newly provisioned node +label:go_xcat +os:Linux +#Make sure service node is not off, if it is, power it on +cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi +cmd:lsdef $$SN -i status +check:output=~booted + +#Provision compute node +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +check:output=~Provision node\(s\)\: $$CN +cmd:lsdef -l $$CN | grep status +check:output=~booted + +#Copy go-xcat script +cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" +check:rc==0 + +#Install additional packages on Red Hat +cmd:if xdsh $$CN "grep \"Red Hat\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi + +#Install GA version of xCAT +cmd:xdsh $$CN "cd /; ./go-xcat -y install" +check:rc==0 +cmd:xdsh $$CN "cat /tmp/go-xcat.log" +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running +cmd:xdsh $$CN "service xcatd stop" +end + +start:go_xcat_stable_from_repo_upgrade +description:test go-xcat GA on a newly provisioned node upgrade to devel +label:go_xcat +os:Linux +#Make sure service node is not off, if it is, power it on +cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi +cmd:lsdef $$SN -i status +check:output=~booted + +#Provision compute node +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +check:output=~Provision node\(s\)\: $$CN +cmd:lsdef -l $$CN | grep status +check:output=~booted + +#Copy go-xcat script +cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" +check:rc==0 + +#Install additional packages on Red Hat +cmd:if xdsh $$CN "grep \"Red Hat\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi + +#Install GA version of xCAT +cmd:xdsh $$CN "cd /; ./go-xcat -y install" +check:rc==0 +cmd:xdsh $$CN "cat /tmp/go-xcat.log" +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running + +#Update to devel version of xCAT +cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y update" +check:rc==0 +cmd:xdsh $$CN "cat /tmp/go-xcat.log" +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running +cmd:xdsh $$CN "service xcatd stop" +end + +start:go_xcat_stable_from_repo_reinstall_devel +description:test go-xcat GA on a newly provisioned node, remove, install devel +label:go_xcat +os:Linux +#Make sure service node is not off, if it is, power it on +cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi +cmd:lsdef $$SN -i status +check:output=~booted + +#Provision compute node +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +check:output=~Provision node\(s\)\: $$CN +cmd:lsdef -l $$CN | grep status +check:output=~booted + +#Copy go-xcat script +cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" +check:rc==0 + +#Install additional packages on Red Hat +cmd:if xdsh $$CN "grep \"Red Hat\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi + +#Install GA version of xCAT +cmd:xdsh $$CN "cd /; ./go-xcat -y install" +check:rc==0 +cmd:xdsh $$CN "cat /tmp/go-xcat.log" +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running + +#Uninstall xCAT +cmd:xdsh $$CN "cd /; ./go-xcat -y completely uninstall" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc!=0 +check:output=~could not be found|dead|no such service xcatd + +#Install devel version of xCAT +cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y install" +check:rc==0 +cmd:xdsh $$CN "cat /tmp/go-xcat.log" +cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a" +check:rc==0 +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running +cmd:xdsh $$CN "service xcatd stop" +end diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 75527edf2..2061dcdb3 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -46,13 +46,13 @@ check:rc==0 cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo . check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; check:rc==0 cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__ check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; check:rc==0 #add support python in sn @@ -78,7 +78,7 @@ cmd:xdsh $$SN date check:rc==0 check:output=~\d\d:\d\d:\d\d #after bug 2586 is fixed, following 2 lines should be removed. -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then xdsh $$SN service xcatd restart; fi +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN service xcatd restart; fi check:rc==0 cmd:xdsh $$SN "ps -ef |grep xcatd" check:rc==0 @@ -106,7 +106,7 @@ check:rc==0 cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN "rpm -qa|grep python2-greenlet"; else echo "there is no xCAT-openbmc-py installed in MN, skip check python2-greenlet installation in SN"; exit 0;fi check:rc==0 cmd:xdsh $$SN "cat /var/log/xcat/xcat.log" -cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi +cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi check:rc==0 cmd:makentp -a check:rc==0 diff --git a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump index 3ef555b2d..6cb63db13 100644 --- a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump +++ b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump @@ -53,10 +53,17 @@ check:rc==0 cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 +# Verify kdump related attributes showup in the osimage and node definitions +cmd:lsdef -t node $$CN -i postscripts,postbootscripts +cmd:lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute -i crashkernelsize,dump + cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN +# Verify kdump related attributes showup in tftpboot file +cmd:cat /tftpboot/boot/grub2/$$CN + cmd:sleep 300 cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done @@ -72,16 +79,31 @@ check:output=~\d\d:\d\d:\d\d cmd:xdsh $$CN "echo 'echo 1 > /proc/sys/kernel/sysrq; echo c > /proc/sysrq-trigger' > /tmp/kdump.trigger" cmd:xdsh $$CN "chmod 755 /tmp/kdump.trigger" -cmd:xdsh $$CN "rpm -q at" +# at package should have been installed during provisioning. +# If it is still missing, install it with "yum install" +cmd:a=`xdsh $$CN rpm -q at`;if [[ $a =~ "package at is not installed" ]]; then xdsh $$CN yum install -y at; fi + cmd:xdsh $$CN "service atd start" check:rc==0 +# Verify that kdump directory from management node is still mounted on the compute node +cmd:xdsh $$CN df -H + +# Verify kdump parameters are in /proc/cmdline file +cmd:xdsh $$CN cat /proc/cmdline + +# Verify enablekdump postscript was executed on the compute node +cmd:xdsh $$CN cat /var/log/xcat/xcat.log | grep "kdump" + cmd:xdsh $$CN "at now +1 minutes <<< /tmp/kdump.trigger" cmd:sleep 300 -cmd:vmcorefile=`find /opt/xcat/share/xcat/tools/autotest/kdumpdir/ -name vmcore`;if [[ -s $vmcorefile ]]; then echo "this file is not empty";else echo "this file is empty"; fi +cmd:vmcorefile=`find /opt/xcat/share/xcat/tools/autotest/kdumpdir/ -name vmcore`;if [[ -s $vmcorefile ]]; then echo "vmcore file is not empty";else echo "vmcore file is empty"; fi check:output=~not empty +# Check for errors in messages log file +cmd:xdsh $$CN grep "kdump" /var/log/messages + cmd:pkglistfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep pkglist|awk -F'=' '{print $2}'`;mv -f $pkglistfile.bak $pkglistfile cmd:exlistfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep exlist|awk -F'=' '{print $2}'`;mv -f $exlistfile.bak $exlistfile cmd:postinstallfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep postinstall|awk -F'=' '{print $2}'`;mv -f $postinstallfile.bak $postinstallfile diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0 index 89589893d..2e4661a85 100644 --- a/xCAT-test/autotest/testcase/makedhcp/cases0 +++ b/xCAT-test/autotest/testcase/makedhcp/cases0 @@ -2,7 +2,7 @@ start:makedhcp_n description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on os:Linux label:mn_only,ci_test,dhcp -cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi +cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then cp -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then cp -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n check:rc==0 cmd:cat $(ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf) @@ -36,7 +36,7 @@ start:makedhcp_n_linux description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on label:others,ci_test os:Linux -cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi +cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then cp -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then cp -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n check:rc==0 cmd:ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf @@ -44,7 +44,7 @@ check:rc==0 cmd:ps -e | grep dhcpd check:rc==0 check:output=~dhcpd -cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi +cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf.bak /etc/dhcp/dhcpd.conf ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf.bak /etc/dhcpd.conf; fi end start:makedhcp_a_linux @@ -55,7 +55,7 @@ cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64 cmd:chdef -t node -o testnode1 netboot=yaboot tftpserver=192.16.10.0 nfsserver=192.16.10.0 monserver=192.16.10.0 xcatmaster=192.16.10.0 installnic="mac" primarynic="mac" cmd:lsdef -l testnode1 -z | tee /tmp/CN.stanza cmd:chdef -t node -o testnode1 mac=11:22:33:44:55:66 -cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi +cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then cp -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then cp -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n cmd:makedhcp -a check:rc==0 @@ -64,7 +64,7 @@ check:output=~testnode1 check:output=~11:22:33:44:55:66 cmd:cat /tmp/CN.stanza | chdef -z cmd:rmdef testnode1 -cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi +cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf.bak /etc/dhcp/dhcpd.conf ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf.bak /etc/dhcpd.conf; fi end start:makedhcp_a_linux_check_invalid_mac @@ -86,7 +86,7 @@ label:mn_only,dhcp cmd:lsdef -t node -l -z > /tmp/all.nodes cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64 cmd:mkdef -t node -o testnode2 groups=compute mac=11:22:33:55:66:99 arch=ppc64 -cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi +cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then cp -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then cp -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n cmd:makedhcp -a check:rc==0 @@ -110,7 +110,7 @@ os:Linux label:mn_only,dhcp cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64 cmd:chdef -t node -o testnode1 netboot=yaboot tftpserver=192.16.10.0 nfsserver=192.16.10.0 monserver=192.16.10.0 xcatmaster=192.16.10.0 installnic="mac" primarynic="mac" -cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi +cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then cp -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then cp -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:lsdef -l testnode1 -z > /tmp/CN.stanza cmd:chdef -t node -o testnode1 mac=11:22:33:44:55:66 cmd:makedhcp -n diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm index 9e6bdeb2e..29b4af714 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm @@ -43,6 +43,7 @@ cmd:xdsh $$CN "apt-get clean all" check:rc==0 cmd:xdsh $$CN "apt-get update" check:rc==0 +cmd:xdsh $$CN "echo '* libraries/restart-without-asking boolean true' | debconf-set-selections" cmd:xdsh $$CN "apt-get -y install build-essential dpkg-dev dh-make debhelper fakeroot gnupg lintian pbuilder quilt reprepro libsoap-lite-perl libdbi-perl" check:rc==0 cmd:xdsh $$CN "rm -rf /oldxcat" diff --git a/xCAT-test/autotest/testcase/nodepurge/cases0 b/xCAT-test/autotest/testcase/nodepurge/cases0 new file mode 100644 index 000000000..451fdc46b --- /dev/null +++ b/xCAT-test/autotest/testcase/nodepurge/cases0 @@ -0,0 +1,59 @@ +start:nodepurge_noderange +description:nodepurge testnode1,testnode2 +label:mn_only,db +cmd:mkdef -t node -o testnode1 arch=ppc64le cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:01 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 netboot=petitboot +check:rc==0 +cmd:mkdef -t node -o testnode2 arch=ppc64le cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.201 mac=e6:d4:d2:3a:ad:02 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 netboot=petitboot +check:rc==0 +cmd:lsdef -t node testnode1,testnode2 +check:output=~testnode1 +check:output=~testnode2 +cmd:makehosts testnode1,testnode2 +check:rc==0 +cmd:nodeset testnode1,testnode2 osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:nodepurge testnode1,testnode2 +check:rc==0 +cmd:lsdef -t node testnode1,testnode2 +check:output=~Could not find an object named 'testnode1' of type 'node'. +check:output=~Could not find an object named 'testnode2' of type 'node'. +cmd:ls /install/autoinst/testnode1* +check:output=~No such file or directory +cmd:ls /install/autoinst/testnode2* +check:output=~No such file or directory +cmd:ping testnode1 +check:rc!=0 +cmd:ping testnode2 +check:rc!=0 +end + +start:nodepurge_h +description:nodepurge -h +label:mn_only,ci_test,db +cmd:nodepurge -h +check:output=~Usage +cmd:nodepurge --help +check:output=~Usage +end + +start:nodepurge_null +description:nodepurge +label:mn_only,ci_test,db +cmd:nodepurge +check:output=~Usage +end + +start:nodepurge_err_node +description:nodepurge err +label:mn_only,ci_test,db +cmd:rmdef -t node testnode +cmd:nodepurge testnode +check:rc!=0 +check:output=~Invalid nodes and/or groups in noderange: testnode +end + + + + + + diff --git a/xCAT-test/autotest/testcase/rmimage/case0 b/xCAT-test/autotest/testcase/rmimage/case0 index 991efd372..7e3795f01 100644 --- a/xCAT-test/autotest/testcase/rmimage/case0 +++ b/xCAT-test/autotest/testcase/rmimage/case0 @@ -23,5 +23,6 @@ check:output=~Image files have been removed successfully from this management no cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc!=0 check:output=~kernel cannot be found at /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/kernel +cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute.bak/;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute;fi end diff --git a/xCAT-test/autotest/testcase/rpower/cases0 b/xCAT-test/autotest/testcase/rpower/cases0 index 8f0c0c041..1d413dd2d 100644 --- a/xCAT-test/autotest/testcase/rpower/cases0 +++ b/xCAT-test/autotest/testcase/rpower/cases0 @@ -42,6 +42,8 @@ cmd:rpower $$CN off cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done cmd:rpower $$CN stat check:output=~Not Activated|off +# Display active VMs and memory on VM host +cmd:vmhost=`lsdef $$CN -i vmhost -c | cut -d '=' -f 2`; if [[ ! -z $vmhost ]]; then echo "Memory on vmhost $vmhost"; ssh $vmhost free -g; echo "Active VMs on vmhost $vmhost"; ssh $vmhost virsh list; fi cmd:rpower $$CN boot check:rc==0 cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done diff --git a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 index b741d6af6..bb997b9ca 100644 --- a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 +++ b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 @@ -16,7 +16,7 @@ check:rc==0 cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN -cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20;((a++));if [ $a -gt 30 ];then break;fi done +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 30 ];then break;fi done cmd:lsdef -l $$CN | grep status cmd:runcmdinstaller $$CN "ls /" check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat_inventory/validatehelper b/xCAT-test/autotest/testcase/xcat_inventory/validatehelper index 2609acaa4..f903873df 100755 --- a/xCAT-test/autotest/testcase/xcat_inventory/validatehelper +++ b/xCAT-test/autotest/testcase/xcat_inventory/validatehelper @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import yaml diff --git a/xCAT-test/pods/man1/xcattest.1.pod b/xCAT-test/pods/man1/xcattest.1.pod index 4867a731b..ce3bf1401 100644 --- a/xCAT-test/pods/man1/xcattest.1.pod +++ b/xCAT-test/pods/man1/xcattest.1.pod @@ -6,27 +6,21 @@ B - Run automated xCAT test cases. B [B<-?|-h>] -B [B<-f> I] [B<-b> I] +B [B<-f> I[B<:System>]] [B<-l> [{B}]] [B<-r>] [B<-q>] [B<-b> I] -B [B<-f> I] [B<-t> I] +B [B<-f> I[B<:System>]] [B<-l> [{B}]] [B<-r>] [B<-q>] [B<-t> I] -B [B<-f> I] [B<-c> I] +B [B<-f> I[B<:System>]] [B<-l> [{B}]] [B<-r>] [B<-q>] [B<-c> I] -B [B<-b> I] [B<-l>] +B [B<-f> I[B<:System>]] [B<-l> [{B}]] [B<-r>] [B<-q>] [B<-s> I] -B [B<-t> I] [B<-l>] - -B [B<-c> I] [B<-l>] - -B [B<-s> B] - -B [B<-s> B] +B [B<-f> I[B<:System>]] B<-l bundleinfo> =head1 DESCRIPTION -The xcattest command runs test cases to verify the xCAT functions, it can be used when you want to verify the xCAT functions for whatever reason, for example, to ensure the code changes you made do not break the existing commands; to run acceptance test for new build you got; to verify the xCAT snapshot build or development build before putting it onto your production system. The xcattest command is part of the xCAT package xCAT-test. +The B command runs test cases to verify the xCAT functions. It can be used to ensure the code changes you made do not break the existing commands; to run acceptance test for new build you got; to verify the xCAT snapshot build or development build before putting it onto your production system. The B command is part of the xCAT package I. -The root directory for the xCAT-test package is /opt/xcat/share/xcat/tools/autotest/. All test cases are in the sub directory I, indexed by the xCAT command, you can add your own test cases according to the test cases format below. The subdirectory I contains all the test cases bundles definition files, you can customize or create any test cases bundle file as required. The testing result information will be written into the subdirectory I, the timestamps are used as the postfixes for all the result files. xCAT-test package ships two configuration files template I and I for AIX and Linux environment, you can use the template files as the start point of making your own configuration file. +The root directory for the I package is I. All test cases are in the sub directory I, indexed by the xCAT command, you can add your own test cases according to the test cases format below. The subdirectory I contains all the test cases bundle definition files, you can customize or create any test cases bundle file as required. The testing result information will be written into the subdirectory I, the timestamps are used as the postfixes for all the result files. I package ships two configuration file templates: I and I for AIX and Linux environment, you can use the template files as the starting point of making your own configuration file. =head1 OPTIONS @@ -38,27 +32,36 @@ Display usage message. =item B<-f> I -Specifies the configuration file with full-path. xCAT supports an example config file: /opt/xcat/share/xcat/tools/autotest/linux.conf.template +Specifies the configuration file with full-path. If not specified, an example config file: I is used by default. If B tag is used, only I<[System]> section in the configuration file will be used. If B is not used, all other sections of the configuration file will be used, like I<[Table]>, I<[Object]>, etc. -=item B<-b> I +=item B<-b> I -Comma separated list of test cases bundle files, each test cases bundle can contain multiple lines and each line for one test case name. The bundle files should be listed in: /opt/xcat/share/xcat/tools/autotest/bundle. +Comma separated list of test case bundle files, each test cases bundle can contain multiple lines and each line for one test case name. The bundle files should be placed in I. -=item B<-t> I +=item B<-t> I -Comma separated list of test cases that will be run. +Comma separated list of test cases to run. -=item B<-c> I +=item B<-c> I Comma separated list of commands which will be tested, i.e., all the test cases under the command sub directory will be run. -=item B<-l> +=item B<-s> I -Display the test cases names specified by the flag -b, -t or -c. +Run testcases with testcase B