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 20836e356..1748b8675 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 @@ -2,7 +2,6 @@ By default, xCAT will install the operating system on the first disk and with default partitions layout in the node. However, you may choose to customize the disk partitioning during the install process and define a specific disk layout. You can do this in one of two ways: '**partition definition file**' or '**partition definition script**'. -**Notes** .. note:: ``partition definition file`` can be used for RedHat, SLES, and Ubuntu. Because disk configuraiton for Ubuntu is different from RedHat, there may be some special sections required for Ubuntu. .. warning:: ``partition definition script`` has only been tested on RedHat and Ubuntu, use at your own risk for SLES. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_install.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_install.rst index 5139616fa..08b000fca 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_install.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_install.rst @@ -1,9 +1,7 @@ Synchronizing Files during the installation process ----------------------------------------------------- +--------------------------------------------------- -The policy table must have the entry to allow syncfiles postscript to access the Management Node. Make sure this entry is in your table: - - ``tabdump policy`` :: +The **policy** table must have the entry to allow **syncfiles** postscript to access the Management Node. Make sure this entry is in your **policy** table: :: #priority,name,host,commands,noderange,parameters,time,rule,comments,disable . @@ -15,23 +13,21 @@ The policy table must have the entry to allow syncfiles postscript to access the Hierarchy and Service Nodes ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If using Service nodes to manage you nodes, you should make sure that the service nodes have been synchronized with the latest files from the Management Node before installing. If you have a group of compute nodes (compute) that are going to be installed that are serviced by SN1, then run the following before the install to sync the current files to SN1. Note: the noderange is the compute node names, updatenode will figure out which service nodes need updating. +If using Service nodes to manage you nodes, you should make sure that the service nodes have been synchronized with the latest files from the Management Node before installing. If you have a group of compute nodes **compute** that are going to be installed that are serviced by SN1, then run the following before the install to sync the current files to SN1.:: -``updatenode compute -f`` + updatenode compute -f + +.. note:: ``updatenode`` will figure out which service nodes need updating. Diskful installation ~~~~~~~~~~~~~~~~~~~~ - - -The 'syncfiles' postscript is in the defaults section of the postscripts table. To enable the syn files postscript to sync files to the nodes during install the user need to do the following: +The **syncfiles** postscript is in the defaults section of the **postscripts** table. To enable the **syncfiles** postscript to sync files to the nodes during install the user need to do the following: * Create the synclist file with the entries indicating which files should be synced. (refer to :ref:`The_Format_of_synclist_file_label` ) * Put the synclist into the proper location for the node type (refer to :ref:`the_localtion_of_synclist_file_for_updatenode_label`) -Make sure your postscripts table has the syncfiles postscript listed - -``tabdump postscripts`` :: +Make sure your **postscripts** table has the syncfiles postscript listed:: #node,postscripts,postbootscripts,comments,disable "xcatdefaults","syslog,remoteshell,syncfiles","otherpkgs",, @@ -39,9 +35,8 @@ Make sure your postscripts table has the syncfiles postscript listed Diskless Installation ~~~~~~~~~~~~~~~~~~~~~ -The diskless boot is similar with the diskful installation for the synchronizing files operation, except that the packimage commands will sync files to the root directories of image during the creating image process. +The diskless boot is similar with the diskful installation for the synchronizing files operation, except that the ``packimage`` command will sync files to the root directories of image during the creating image process. -Creating the synclist file as the steps in Diskful installation section, then the synced files will be synced to the os image during the packimage and mkdsklsnode commands running. +Creating the synclist file as the steps in Diskful installation section, then the synced files will be synced to the os image during the ``packimage`` and ``mkdsklsnode`` commands running. Also the files will always be re-synced during the booting up of the diskless node. - diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst index d0d18af6f..eeb5c3de6 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_overview.rst @@ -1,24 +1,26 @@ Overview -------- -Synchronizing (sync) files to the nodes is a feature of xCAT used to distribute specific files from the management node to the new-deploying or deployed nodes. +Synchronizing (sync) files to the nodes is a feature of xCAT used to distribute specific files from the management node to the newly-deploying or deployed nodes. -This function is supported for diskful or RAMdisk-based diskless nodes. Generally, the specific files are usually the system configuration files for the nodes in the **/etc/directory**, like **/etc/hosts**, **/etc/resolve.conf**; it also could be the application programs configuration files for the nodes. The advantages of this function are: it can parallel sync files to the nodes or nodegroup for the installed nodes; it can automatically sync files to the newly-installing node after the installation. Additionally, this feature also supports the flexible format to define the synced files in a configuration file, called **'synclist'**. +This function is supported for diskful or RAMdisk-based diskless nodes. Generally, the specific files are usually the system configuration files for the nodes in the **/etc** directory, like **/etc/hosts**, **/etc/resolve.conf**; it also could be the application programs configuration files for the nodes. The advantages of this function are: it can parallel sync files to the nodes or nodegroup for the installed nodes; it can automatically sync files to the newly-installing node after the installation. Additionally, this feature also supports the flexible format to define the files to be synced in a configuration file, called "synclist". -The synclist file can be a common one for a group of nodes using the same profile or osimage, or can be the special one for a particular node. Since the location of the synclist file will be used to find the synclist file, the common synclist should be put in a given location for Linux nodes or specified by the osimage. +The synclist file can be a common one for a group of nodes using the same profile or osimage, or can be the unique for each particular node. Since the location of the synclist file will be used to find the synclist file, the common synclist should be put in a given location for Linux nodes or specified by the osimage. -``xdcp`` command supplies the basic Syncing File function. If the **'-F synclist'** option is specified in the ``xdcp`` command, it syncs files configured in the synclist to the nodes. If the **'-i PATH'** option is specified with **'-F synclist'**, it syncs files to the root image located in the PATH directory. (**Note: the '-i PATH' option is only supported for Linux nodes**) +``xdcp`` command supplies the basic Syncing File function. If the **-F synclist** option is specified in the ``xdcp`` command, it syncs files configured in the synclist to the nodes. If the **-i ** option is specified with **-F synclist**, it syncs files to the root image located in the directory. -``xdcp`` supports hierarchy where service nodes are used. If a node is serviced by a service node, ``xdcp`` will sync the files to the service node first, then sync the files from service node to the compute node. The files are place in an intermediate directory on the service node defined by the SNsyncfiledir attribute in the site table. The default is **/var/xcat/syncfiles**. +.. note:: The **-i ** option is only supported for Linux nodes + +``xdcp`` supports hierarchy where service nodes are used. If a node is serviced by a service node, ``xdcp`` will sync the files to the service node first, then sync the files from service node to the compute node. The files are placed in an intermediate directory on the service node defined by the **SNsyncfiledir** attribute in the **site** table. The default is **/var/xcat/syncfiles**. Since ``updatenode -F`` calls the ``xdcp`` to handle the Syncing File function, the ``updatenode -F`` also supports the hierarchy. -For a new-installing nodes, the Syncing File action will be triggered when performing the postscripts for the nodes. A special postscript named **'syncfiles'** is used to initiate the Syncing File process. +For a new-installing nodes, the Syncing File action will be triggered when running the postscripts for the nodes. A special postscript named **syncfiles** is used to initiate the Syncing File process. -The postscript **'syncfiles'** is located in the **/install/postscripts/**. When running, it sends a message to the xcatd on the management node or service node, then the xcatd figures out the corresponding synclist file for the node and calls the ``xdcp`` command to sync files in the synclist to the node. +The postscript **syncfiles** is located in the **/install/postscripts/**. When running, it sends a message to the **xcatd** on the management node or service node, then the **xcatd** figures out the corresponding synclist file for the node and calls the ``xdcp`` command to sync files in the synclist to the node. -**If installing nodes in a hierarchical configuration, you must sync the Service Nodes first to make sure they are updated. The compute nodes will be sync'd from their service nodes. You can use the** ``updatenode -f`` **command to sync all the service nodes for range of compute nodes provided.** +If installing nodes in a hierarchical configuration, you must sync the service nodes first to make sure they are updated. The compute nodes will be synced from their service nodes. You can use the ``updatenode -f`` command to sync all the service nodes for range of compute nodes provided. -For an installed nodes, the Syncing File action happens when performing the ``updatenode -F`` or ``xdcp -F synclist`` command to update a nodes. If performing the ``updatenode -F``, it figures out the location of the synclist files for all the nodes and classify the nodes which using same synclist file and then calls the ``xdcp -F synclist`` to sync files to the nodes. +For an installed nodes, the Syncing File action happens when performing the ``updatenode -F`` or ``xdcp -F synclist`` command to update a nodes. While performing the ``updatenode -F``, it figures out the location of the synclist files for all the nodes and groups the nodes which will be using the same synclist file and then calls the ``xdcp -F synclist`` to sync files to the nodes. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_periodically.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_periodically.rst index adaa6b332..b699f503f 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_periodically.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_periodically.rst @@ -1,24 +1,15 @@ Run the Syncing File action periodically ------------------------------------------ +---------------------------------------- If the admins want to run the Syncing File action automatically or periodically, the ``xdcp -F``, ``xdcp -i -F`` and ``updatenode -F`` commands can be used in the script, crontab or FAM directly. For example: -Use the cron daemon to sync files in the **/install/custom///..synclist** to the nodegroup 'compute' every 10 minutes by the xdcp command by adding this to crontab. : :: +Use the **cron** daemon to sync files in the **/install/custom///..synclist** to the nodegroup **compute** every 10 minutes with the **xdcp** command by adding this to **crontab**. : :: */10 * * * * root /opt/xcat/bin/xdcp compute -F /install/custom///..synclist -Use the cron daemon to sync files for the nodegroup 'compute' every 10 minutes by updatenode command. :: +Use the **cron** daemon to sync files for the nodegroup **compute** every 10 minutes with ``updatenode`` command. :: */10 * * * * root /opt/xcat/bin/updatenode compute -F -** Related To do** -Add reference - - - - - - - diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst index 46213a9e5..3d2232995 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst @@ -33,15 +33,15 @@ sync file **/etc/file2** to the file **/etc/file3** on the node (with different /etc/file2 -> /etc/file3 -sync file **/etc/file4** to the file **/etc/tmp/file5** on the node( different file name and directory). The directory will be automatically created for you. :: +sync file **/etc/file4** to the file **/etc/tmp/file5** on the node (different file name and directory). The directory will be automatically created for you. :: /etc/file4 -> /etc/tmp/file5 -sync the multiple files **/etc/file1**, **/etc/file2**, **/etc/file3**, ... to the directory **/tmp/etc** (**/tmp/etc** must be a directory when multiple files are synced at one time). If the directory does not exist, **xdcp** will create it. :: +sync the multiple files **/etc/file1**, **/etc/file2**, **/etc/file3**, ... to the directory **/tmp/etc** (**/tmp/etc** must be a directory when multiple files are synced at one time). If the directory does not exist, it will be created. :: /etc/file1 /etc/file2 /etc/file3 -> /tmp/etc -sync file **/etc/file2** to the file /etc/file2 on the node :: +sync file **/etc/file2** to the file **/etc/file2** on the node :: /etc/file2 -> /etc/ @@ -49,7 +49,7 @@ sync all files in **/home/mikev** to directory **/home/mikev** on the node :: /home/mikev/* -> /home/mikev/ -Note: Don't try to sync files to the read only directory on the target node. +.. note:: Don't try to sync files to the read only directory on the target node. An example of synclist file ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -59,7 +59,7 @@ Sync the file **/etc/common_hosts** to the two places on the target node: put on /etc/common_hosts -> /etc/hosts /etc/common_hosts -> /tmp/etc/hosts -Sync files in the directory **/tmp/prog1** to the directory **/prog1** on the target node, and the postfix **'.tmpl'** needs to be removed on the target node. (directory **/tmp/prog1/** contains two files: **conf1.tmpl** and **conf2.tmpl**) Following configuration entries should be added :: +Sync files in the directory **/tmp/prog1** to the directory **/prog1** on the target node, and the postfix **.tmpl** needs to be removed on the target node. (directory **/tmp/prog1/** contains two files: **conf1.tmpl** and **conf2.tmpl**) Following configuration entries should be added :: /tmp/prog1/conf1.tmpl -> /prog1/conf1 /tmp/prog1/conf2.tmpl -> /prog1/conf2 @@ -78,7 +78,7 @@ Sample synclist file :: /tmp/* -> /tmp/ /etc/testfile -> /etc/ -If the above syncfile is used by the **updatenode/xdcp** commands, or used in a node installation process, the following files will exist on the target node with the following contents. :: +If the above syncfile is used by the ``updatenode``/``xdcp`` commands, or used in a node installation process, the following files will exist on the target node with the following contents. :: /etc/hosts(It has the same content with /etc/common_hosts on the MN) /tmp/etc/hosts(It has the same content with /etc/common_hosts on the MN) @@ -104,29 +104,24 @@ The noderange can have several formats. Following examples show that **/etc/host /etc/hosts -> (group1) /etc/hosts # The /etc/hosts file is synced to nodes in group1 /etc/hosts -> (group1,group2) /etc/hosts # The /etc/hosts file is synced to nodes in group1 and group2 -postscript support -~~~~~~~~~~~~~~~~~~ - -Putting the filename.post in the **rsyncfile** to ``rsync`` to the node is required for hierarchical clusters. It is optional for non-hierarchical cluster. - Advanced synclist file features ''''''''''''''''''''''''''''''' **EXECUTE** -The **EXECUTE** clause is used to list all the postscripts you would like to run after the files are sync'd, only if the file is updated. The files in this list must be added to the list of files to rsync. If noderange is used in the synclistfor the file listed in the **EXECUTE** clause, the script will only be exectuted on the nodes in that noderange. +The **EXECUTE** clause is used to list all the postsync scripts (.post) you would like to run after the files are synced, only if the file is updated. For hierarchical clusters, the postsync files in this list must also be added to the list of files to sync. It is optional for non-hierarchical clusters. If noderange is used in the synclist for the file listed in the **EXECUTE** clause, the postsync script will only be executed on the nodes in that noderange. The **EXECUTE** clause is not supported oif ``-r /usr/bin/scp`` option is used with ``xdcp`` or ``updatenode`` command. **EXECUTEALWAYS** -The **EXECUTEALWAYS** clause is used to list all the postscripts you would like to run after the files are sync'd, whether or not any file is actually updated. The files in this list must be added to the list of files to rsync. If noderange is used in the synclist for the file listed in the **EXECUTEALWAYS** clause, the script will only be exectuted on the nodes in that noderange. +The **EXECUTEALWAYS** clause is used to list all the postsync scripts you would like to run after the files are synced, whether or not any file is actually updated. The files in this list must be added to the list of files to sync. If noderange is used in the synclist for the file listed in the **EXECUTEALWAYS** clause, the script will only be exectuted on the nodes in that noderange. .. note:: The path to the file to EXECUTE or EXECUTEALWAYS, is the location of the file on the MN. -For example, your rsyncfile may look like this.:: +For example, your syncfile may look like this.:: /tmp/share/file2 -> /tmp/file2 /tmp/share/file2.post -> /tmp/file2.post (required for hierarchical clusters) - /tmp/share/file3 -> /tmp/file3 + /tmp/share/file3 -> /tmp/filex /tmp/share/file3.post -> /tmp/file3.post (required for hierarchical clusters) /tmp/myscript1 -> /tmp/myscript1 /tmp/myscript2 -> /tmp/myscript2 @@ -138,7 +133,7 @@ For example, your rsyncfile may look like this.:: /tmp/myscript1 /tmp/myscript2 -If **/tmp/file2** is updated on the node in **/tmp/file2**, then **/tmp/file2**.post is automatically run on that node. If **/tmp/file3** is updated on the node in **/tmp/filex**, then **/tmp/file3**.post is automatically run on that node. +If **/tmp/file2** is updated on the node in **/tmp/file2**, then **/tmp/file2.post** is automatically executed on that node. If **/tmp/file3** is updated on the node in **/tmp/filex**, then **/tmp/file3.post** is automatically executed on that node. **APPEND** @@ -163,11 +158,11 @@ For example, your synclist file may look like this: :: When you use the **APPEND** clause, the source file to the left of the arrow is appended to the file to the right of the arrow. In this example, **/etc/myappenddir/appendfile** is appended to **/etc/mysetup/setup** file, which must already exist on the node. The **/opt/xcat/share/xcat/scripts/xdcpappend.sh** is used to accomplish this. -The script creates a backup of the original file on the node in the directory defined by the site table `nodesyncfiledir` attribute, which is **/var/xcat/node/syncfiles** by default. To update the original file when using the function, you need to rsync a new original file to the node, removed the old original from the **/var/xcat/node/syncfiles/org** directory. If you want to cleanup all the files for the append function on the node, you can use ``xdsh -c`` flag. See man page for ``xdsh``. +The script creates a backup of the original file on the node in the directory defined by the **site** table **nodesyncfiledir** attribute, which is **/var/xcat/node/syncfiles** by default. To update the original file when using the function, you need to sync a new original file to the node, removed the old original from the **/var/xcat/node/syncfiles/org** directory. If you want to cleanup all the files for the append function on the node, you can use ``xdsh -c`` command. See man page for ``xdsh``. **MERGE** (supported on Linux only). -The **MERGE** clause is used to append the contents of the input file to either the **/etc/passwd**, **/etc/shadow** or **/etc/group** files. They are the only supported files. You must not put the **/etc/passwd**, **/etc/shadow**, **/etc/group** files in an **APPEND** clause if using a **MERGE** clause. For these three files you should use the **MERGE** clause. The **APPEND** will add the information to the end of the file. The **MERGE** will add or replace the information and insure that there are no duplicate entries in these files. +The **MERGE** clause is used to append the contents of the input file to either the **/etc/passwd**, **/etc/shadow** or **/etc/group** files. They are the only supported files. You must not put the **/etc/passwd**, **/etc/shadow**, **/etc/group** files in an **APPEND** clause if using a **MERGE** clause. For these three files you should use the **MERGE** clause. The **APPEND** will add the information to the end of the file. The **MERGE** will add or replace the information and ensure that there are no duplicate entries in these files. For example, your synclist file may look like this :: @@ -187,7 +182,7 @@ For example, your synclist file may look like this :: /etc/mydir/mergeshadow -> /etc/shadow /etc/mydir/mergegroup -> /etc/group -When you use the **MERGE** clause, the source file to the left of the arrow is merged into the file to the right of the arrow. It will replace any common userid's found in those files and add new userids. The **/opt/xcat/share/xcat/scripts/xdcpmerge.sh** is used to accomplish this. +When you use the **MERGE** clause, the source file to the left of the arrow is merged into the file to the right of the arrow. It will replace any common userids found in those files and add new userids. The **/opt/xcat/share/xcat/scripts/xdcpmerge.sh** is used to accomplish this. .. note:: no order of execution may be assumed by the order of **EXECUTE, EXECUTEALWAYS, APPEND and MERGE** clauses in the synclist file. @@ -198,7 +193,7 @@ The location of synclist file for updatenode and install process In the installation process or **updatenode** process, xCAT needs to figure out the location of the synclist file automatically, so the synclist should be put into the specified place with the proper name. -If the provisioning method for the node is an osimage name, then the path to the synclist will be read from the osimage definition `synclists` attribute. You can display this information by running the following command, supplying your osimage name. :: +If the provisioning method for the node is an osimage name, then the path to the synclist will be read from the osimage definition **synclists** attribute. You can display this information by running the following command, supplying your osimage name. :: lsdef -t osimage -l --netboot-compute @@ -216,7 +211,7 @@ If the provisioning method for the node is an osimage name, then the path to the rootimgdir=/install/netboot///compute **synclists=/install/custom/netboot/compute.synclist** -You can set the `synclist` path using the following command :: +You can set the synclist path using the following command :: chdef -t osimage -o --netboot-compute synclists="/install/custom/netboot/compute.synclist @@ -229,11 +224,11 @@ If the provisioning method for the node is `install`, or `netboot` then the path , and are what you set for the node For example: -The location of synclist file for the diskful installation of RedHat 7.5 with 'compute' as the profile :: +The location of synclist file for the diskful installation of RedHat 7.5 with **compute** as the profile :: /install/custom/install/rh/compute.rhels7.5.synclist -The location of synclist file for the diskless netboot of SLES 12.3 with 'service' as the profile :: +The location of synclist file for the diskless netboot of SLES 12.3 with **service** as the profile :: /install/custom/netboot/sles/service.sles12.3.synclist diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_updatenode.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_updatenode.rst index b7cda3461..6cfdc2d2a 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_updatenode.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_updatenode.rst @@ -1,7 +1,7 @@ Run the Syncing File action in the updatenode process ------------------------------------------------------- +----------------------------------------------------- -If run ``updatenode`` command with -F option, it syncs files which configured in the synclist to the nodes. ``updatenode`` does not sync images, use ``xdcp -i -F`` option to sync images. +Running ``updatenode`` command with **-F** option, will sync files configured in the synclist file to the nodes. ``updatenode`` does not sync images, use ``xdcp -i -F`` command to sync images. ``updatenode`` can be used to sync files to to diskful or diskless nodes. ``updatenode`` cannot be used to sync files to statelite nodes. @@ -9,7 +9,7 @@ Steps to make the Syncing File working in the ``updatenode -F`` command: #. Create the synclist file with the entries indicating which files should be synced. (refer to :ref:`The_Format_of_synclist_file_label`) #. Put the synclist into the proper location (refer to :ref:`the_localtion_of_synclist_file_for_updatenode_label`). - #. Run the ``updatenode node -F`` command to initiate the Syncing File action. + #. Run the ``updatenode -F`` command to initiate the Syncing File action. -Note: Since Syncing File action can be initiated by the ``updatenode -F`` flag, the ``updatenode -P`` does NOT support to re-run the **'syncfiles'** postscript, even if you specify the **'syncfiles'** postscript in the ``updatenode`` command line or set the **'syncfiles'** in the **postscripts.postscripts** attribute. +.. note:: Since Syncing File action can be initiated by the ``updatenode -F``, the ``updatenode -P`` does NOT support to re-run the **syncfiles** postscript, even if you specify the **syncfiles** postscript on the ``updatenode`` command line or set the **syncfiles** in the **postscripts.postscripts** attribute. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_xdcp.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_xdcp.rst index 20d1bb84c..41cc01990 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_xdcp.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_xdcp.rst @@ -1,30 +1,31 @@ Run xdcp command to perform Syncing File action ------------------------------------------------ -``xdcp`` command supplies three options **'-F' , -s, and '-i'** to support the Syncing File function. +``xdcp`` command supplies three options **-F** , **-s**, and **-i** to support the Syncing File function. - * -F|--File rsync input file + * -F|--File -Specifies the full path to the synclist file that will be used to build the ``rsync`` command +Specifies the full path to the synclist file - * -s + * -s -Specifies to rsync to the service nodes only for the input compute noderange. +Specifies to sync to the service nodes only for the input compute noderange. - * -i|--rootimg install image for Linux + * -i | --rootimg -Specifies the full path to the install image on the local node. By default, if the -F option is specified, the **'rsync'** command is used to perform the syncing file function. For the ``rsync`` in ``xdcp``, only the ***ssh** remote shell is supported for ``rsync``. ``xdcp`` uses the **'-Lpotz'** as the default flags to call the rsync command. More flags for rsync command can be specified by adding **'-o'** flag to the call to ``xdcp``. +Specifies the full path to the install image on the local node. -For example: :: +By default, if the **-F** option is specified, the ``rsync`` command is used to perform the syncing file function. Only the **ssh** remote shell is supported for ``rsync``. ``xdcp`` uses the **-Lpotz** as the default flags to call the ``rsync`` command. More flags for ``rsync`` command can be specified by adding **-o** flag to the call to ``xdcp``. + +For example you can use ``xdcp`` **-F** option to sync files which are listed in the **/install/custom/commonsyncfiles/.synclist** file to the node group named **compute**. If the node group **compute** is serviced by servicenodes, then the files will be automatically staged to the correct service nodes, and then synced to the compute nodes from those service nodes. The files will be stored in **/var/xcat/syncfiles** directory on the service nodes by default, or in the directory indicated in the **site.SNsyncfiledir** attribute. See **-s** option below. :: - Using xdcp '-F' option to sync files which are listed in the /install/custom/commonsyncfiles/.synclist directory to the node group named 'compute'. If the node group compute is serviced by servicenodes, then the files will be automatically staged to the correct service nodes, and then synced to the compute nodes from those service nodes. The files will be stored in /var/xcat/syncfiles directory on the service nodes by default, or in the directory indicated in the site.SNsyncfiledir attribute. See -s option below. xdcp compute -F /install/custom/commonsynfiles/.synclist -For Linux nodes, using **xdcp '-i'** option with **'-F'** to sync files created in the **/install/custom//.synclist** to the osimage in the directory **/install/////rootimg**: :: +For Linux nodes, you can use ``xdcp`` command **-i** option with **-F** to sync files specified in the **/install/custom//.synclist** file to the osimage in the directory **/install/////rootimg**: :: xdcp -i /install/////rootimg -F /install/custom///.synclist -Using the **xdcp '-s'** option to sync the files only to the service nodes for the node group named 'compute'. The files will be placed in the default **/var/xcat/syncfiles** directory or in the directory as indicated in the **site.SNsyncfiledir** attribute. If you want the files synched to the same directory on the service node that they come from on the Management Node, set **site.SNsyncfiledir=/**. This can be setup before a node install, to have the files available to be synced during the install: :: +You can use the ``xdcp`` **-s** option to sync the files only to the service nodes for the node group named **compute**. The files will be placed in the default **/var/xcat/syncfiles** directory or in the directory as indicated in the **site.SNsyncfiledir** attribute. If you want the files synched to the same directory on the service node that they come from on the Management Node, set **site.SNsyncfiledir=/** attribute. This can be setup before a node install, to have the files available to be synced during the install: :: xdcp compute -s -F /install/custom///.synclist diff --git a/docs/source/guides/admin-guides/references/man1/lsdef.1.rst b/docs/source/guides/admin-guides/references/man1/lsdef.1.rst index 624fc171c..0c20e42d0 100644 --- a/docs/source/guides/admin-guides/references/man1/lsdef.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lsdef.1.rst @@ -22,12 +22,12 @@ SYNOPSIS \ **lsdef**\ [\ **-h | -**\ **-help**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-i**\ \ *attr-list*\ ] \ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ] -[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] +[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ **-i**\ \ *attr-list*\ | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-c | -**\ **-compress**\ ] [\ **-**\ **-osimage**\ ] [\ **-**\ **-nics**\ ] [[\ **-w**\ \ *attr*\ ==\ *val*\ ] [\ **-w**\ \ *attr*\ =~\ *val*\ ] ...] [\ *noderange*\ ] \ **lsdef**\ [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ] -[\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-**\ **-template**\ [\ *template-object-name*\ ]] +[\ **-i**\ \ *attr-list*\ | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-**\ **-template**\ [\ *template-object-name*\ ]] *********** @@ -155,7 +155,7 @@ OPTIONS \ **-z|-**\ **-stanza**\ - Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files. + Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files. And default is to list complete object definition, use \ **-i**\ to specify the attribute scope. diff --git a/docs/source/guides/admin-guides/references/man1/updatenode.1.rst b/docs/source/guides/admin-guides/references/man1/updatenode.1.rst index 48ed01138..57a821f0a 100644 --- a/docs/source/guides/admin-guides/references/man1/updatenode.1.rst +++ b/docs/source/guides/admin-guides/references/man1/updatenode.1.rst @@ -19,7 +19,7 @@ SYNOPSIS ******** -\ **updatenode**\ \ *noderange*\ [\ **-V | -**\ **-verbose**\ ] [\ **-F | -**\ **-sync**\ ] [\ **-f | -**\ **-snsync**\ ] [\ **-r | -**\ **-node-rcp**\ [\ *full_path_to_remote_copy_command*\ ]] [\ **-S | -**\ **-sw**\ ] [\ **-l**\ \ *userID*\ ] [\ **-P | -**\ **-scripts**\ [\ *script1,script2...*\ ]] [\ **-s | -**\ **-sn**\ ] [\ **-A | -**\ **-updateallsw**\ ] [\ **-c | -**\ **-cmdlineonly**\ ] [\ **-d**\ \ *alt_source_dir*\ ] [\ **-**\ **-fanout**\ =\ *fanout_value*\ ] [\ **-t**\ \ *timeout*\ } [\ *attr=val*\ [\ *attr=val...*\ ]] [\ **-n | -**\ **-noverify**\ ] +\ **updatenode**\ \ *noderange*\ [\ **-V | -**\ **-verbose**\ ] [\ **-F | -**\ **-sync**\ ] [\ **-f | -**\ **-snsync**\ ] [\ **-r | -**\ **-node-rcp**\ [\ *node_remote_copy_command*\ ]] [\ **-S | -**\ **-sw**\ ] [\ **-l**\ \ *userID*\ ] [\ **-P | -**\ **-scripts**\ [\ *script1,script2...*\ ]] [\ **-s | -**\ **-sn**\ ] [\ **-A | -**\ **-updateallsw**\ ] [\ **-c | -**\ **-cmdlineonly**\ ] [\ **-d**\ \ *alt_source_dir*\ ] [\ **-**\ **-fanout**\ =\ *fanout_value*\ ] [\ **-t**\ \ *timeout*\ } [\ *attr=val*\ [\ *attr=val...*\ ]] [\ **-n | -**\ **-noverify**\ ] \ **updatenode**\ \ **noderange**\ [\ **-k | -**\ **-security**\ ] [\ **-t**\ \ *timeout*\ ] @@ -37,7 +37,7 @@ DESCRIPTION *********** -The updatenode command is run on the xCAT management node and can be used +The \ **updatenode**\ command is run on the xCAT management node and can be used to perform the following node updates: @@ -58,9 +58,9 @@ Update the ca and credentials for the service nodes. -The default behavior when no options are input to updatenode will be to run +The default behavior when no options are input to \ **updatenode**\ will be to run the following options \ **-S**\ , \ **-P**\ and \ **-F**\ options in this order. -If you wish to limit updatenode to specific +If you wish to limit \ **updatenode**\ to specific actions you can use combinations of the \ **-S**\ , \ **-P**\ , and \ **-F**\ flags. For example, If you just want to synchronize configuration file you could @@ -74,7 +74,7 @@ The flag \ **-f**\ (\ **-**\ **-snsync**\ ) can NOT be used together with \ **- Note: In a large cluster environment the updating of nodes in an ad hoc manner can quickly get out of hand, leaving the system administrator with -a very confusing environment to deal with. The updatenode command is +a very confusing environment to deal with. The \ **updatenode**\ command is designed to encourage users to handle cluster updates in a manner that is recorded and easily repeatable. @@ -93,14 +93,14 @@ The basic process for distributing and synchronizing nodes is: -\* Run the updatenode command to update the nodes. +\* Run the \ **updatenode**\ command to update the nodes. Files may be distributed and synchronized for both diskless and diskful nodes. Syncing files to NFS-based statelite nodes is not supported. -More information on using the synchronization file function is in the following doc: Using_Updatenode. +More information on using the synchronization file function is in the following document: Create the synclist file ------------------------ @@ -111,9 +111,7 @@ where the files should be synced to. In the synclist file, each line is an entry which describes the location of the source files and the destination location for the files on the target node. -For more information on creating your synclist files and where to put them, read: - -Sync-ing_Config_Files_to_Nodes +For more information on creating your synclist files and where to put them, read here: Run updatenode to synchronize the files @@ -382,12 +380,12 @@ OPTIONS \ **-F|-**\ **-sync**\ Specifies that file synchronization should be - performed on the nodes. rsync/scp and ssh must + performed on the nodes. \ **rsync/scp**\ and \ **ssh**\ must be installed and configured on the nodes. The function is not supported for NFS-based statelite installations. For NFS-based statelite installations to sync files, you should use the read-only option for files/directories listed in - litefile table with source location specified in the litetree table. + \ **litefile**\ table with source location specified in the \ **litetree**\ table. @@ -396,33 +394,33 @@ OPTIONS Specifies that file synchronization should be performed to the service nodes that service the nodes in the noderange. This updates the service - nodes with the data to sync to the nodes. rsync/scp and ssh must + nodes with the data to sync to the nodes. \ **rsync/scp**\ and \ **ssh**\ must be installed and configured on the service nodes. For hierarchy, this optionally can be done before syncing the files - to the nodes with the -F flag. If the -f flag is not used, then - the -F flag will sync the servicenodes before the nodes automatically. + to the nodes with the \ **-F**\ flag. If the \ **-f**\ flag is not used, then + the \ **-F**\ flag will sync the service nodes before the nodes automatically. When installing nodes in a hierarchical cluster, this flag should be used to sync the service nodes before the install, since the files will - be sync'd from the service node by the syncfiles postscript during the + be synced from the service node by the \ **syncfiles**\ postscript during the install. The function is not supported for NFS-based statelite installations. For statelite installations to sync files, you should use the read-only option for files/directories listed in - litefile table with source location specified in the litetree table. + \ **litefile**\ table with source location specified in the \ **litetree**\ table. -[\ **-r | -**\ **-node-rcp**\ [\ *full_path_to_remote_copy_command*\ ]] +[\ **-r | -**\ **-node-rcp**\ [\ *node_remote_copy_command*\ ]] - Specifies the full path of the remote copy command used for syncing files to node targets, such as "/usr/bin/rsync" or "/usr/bin/scp". If not specified, rsync will be used by default. + Specifies the full path of the remote copy command used for syncing files to node targets, such as \ **/usr/bin/rsync**\ or \ **/usr/bin/scp**\ . If not specified, \ **rsync**\ will be used by default. - Notice: The synclist for "-r /usr/bin/scp" has some differences with "-r /usr/bin/rsync": + Note: The synclist processing for \ **-r /usr/bin/scp**\ has some differences with \ **-r /usr/bin/rsync**\ : - 1) the \`\`EXECUTE\`\` clause is not supported in "-r /usr/bin/scp" + 1) the \ **EXECUTE**\ clause in synclist file is not supported with \ **-r /usr/bin/scp**\ flag - 2) if the destination directory specified in synclist is an existing file on target node, "updatenode -r /usr/bin/scp" will fail with \`\`scp: : Not a directory\`\` + 2) if the destination directory specified in synclist file is an existing file on target node, \ **updatenode -r /usr/bin/scp**\ will fail with "scp: : Not a directory" - 3) if the destination file specified in synclist is an existing directory on target node, "updatenode -r /usr/bin/scp" will fail with \`\`scp: : Is a directory\`\` + 3) if the destination file specified in synclist file is an existing directory on target node, \ **updatenode -r /usr/bin/scp**\ will fail with "scp: : Is a directory" @@ -461,8 +459,8 @@ OPTIONS \ **-P|-**\ **-scripts**\ Specifies that postscripts and postbootscripts should be run on the nodes. - updatenode -P syncfiles is not supported. The syncfiles postscript can only - be run during install. You should use updatenode -F instead. + File sync with \ **updatenode -P syncfiles**\ is not supported. The \ **syncfiles**\ postscript can only + be run during install. You should use \ **updatenode -F**\ instead. @@ -546,14 +544,14 @@ EXAMPLES -3. Running updatenode -P with the syncfiles postscript is not supported. You should use updatenode -F instead. +3. Running \ **updatenode -P**\ with the \ **syncfiles**\ postscript is not supported. You should use \ **updatenode -F**\ instead. Do not run: .. code-block:: perl - updatenode clstrno1 -P syncfiles + updatenode clstrn01 -P syncfiles Run: diff --git a/docs/source/guides/admin-guides/references/man1/xdcp.1.rst b/docs/source/guides/admin-guides/references/man1/xdcp.1.rst index 7b1ea700d..fe9661d72 100644 --- a/docs/source/guides/admin-guides/references/man1/xdcp.1.rst +++ b/docs/source/guides/admin-guides/references/man1/xdcp.1.rst @@ -11,7 +11,7 @@ xdcp.1 ************ -\ **xdcp**\ - Concurrently copies files to or from multiple nodes. In addition, provides an option to use rsync to update the files on the nodes, or to an installation image on the local node. +\ **xdcp**\ - Concurrently copies files to or from multiple nodes. In addition, provides an option to use \ **rsync**\ to update the files on the managed nodes, or to an installation image on the local node. **************** @@ -19,13 +19,13 @@ xdcp.1 **************** -\ **xdcp**\ \ *noderange*\ [[\ **-B**\ | \ **-**\ **-bypass**\ ] [\ **-f**\ \ *fanout*\ ] [\ **-L**\ ] [\ **-l**\ \ *userID*\ ] [\ **-o**\ \ *node_options*\ ] [\ **-p**\ ] [\ **-P**\ ] [\ **-r**\ \ *node_remote_shell*\ ] [\ **-R**\ ] [\ **-t**\ \ *timeout*\ ] [\ **-T**\ ] [\ **-v**\ ] [\ **-q**\ ] [\ **-X**\ \ *env_list*\ ] \ *sourcefile.... targetpath*\ +\ **xdcp**\ \ *noderange*\ [[\ **-B**\ | \ **-**\ **-bypass**\ ] [\ **-f**\ \ *fanout*\ ] [\ **-L**\ ] [\ **-l**\ \ *userID*\ ] [\ **-o**\ \ *node_options*\ ] [\ **-p**\ ] [\ **-P**\ ] [\ **-r**\ \ *node remote copy command] [\ \*\*-R\*\*\ ] [\ \*\*-t\*\*\ \ \*timeout\*\ ] [\ \*\*-T\*\*\ ] [\ \*\*-v\*\*\ ] [\ \*\*-q\*\*\ ] [\ \*\*-X\*\*\ \ \*env_list\*\ ] \ \*sourcefile.... targetpath\*\ *\ -\ **xdcp**\ \ *noderange*\ [\ **-F**\ \ *rsync input file*\ ] +\ **xdcp**\ \ *noderange*\ [\ **-F**\ Irsynclist input file>] [\ **-r**\ \ *node remote copy command*\ ] -\ **xdcp**\ \ *computenoderange*\ [\ **-s**\ \ **-F**\ \ *rsync input file*\ ] +\ **xdcp**\ \ *computenoderange*\ [\ **-s**\ \ **-F**\ \ *synclist input file*\ ] [\ **-r**\ \ *node remote copy command*\ ] -\ **xdcp**\ [\ **-i**\ \ *path to install image*\ ] [\ **-F**\ \ *rsync input file*\ ] +\ **xdcp**\ [\ **-i**\ \ *install image*\ ] [\ **-F**\ \ *synclist input file*\ ] [\ **-r**\ \ *node remote copy command*\ ] \ **xdcp**\ [\ **-h**\ | \ **-V**\ | \ **-q**\ ] @@ -36,33 +36,32 @@ xdcp.1 The \ **xdcp**\ command concurrently copies files to or from remote target -nodes. The command issues a remote copy command for each node or device specified. When files are pulled from a target, they are placed into the target_path with the name of the -remote node or device appended to the copied source_file name. The -/usr/bin/rcp command is the model for syntax and security. -If using hierarchy, then xdcp runs on the service node that is servicing the compute node. The file will first be copied to the path defined in the site table, SNsyncfiledir attribute, or the default path /var/xcat/syncfiles on the service node, if the attribute is not defined. The -P flag will not automatically copy +nodes. The command issues a remote copy command for each node or device specified. When files are pulled from a target, they are placed into the \ *targetpath*\ with the name of the +remote node or device appended to the copied \ *sourcefile*\ name. The +\ **/usr/bin/rcp**\ command is the model for syntax and security. +If using hierarchy, then \ **xdcp**\ runs on the service node that is servicing the compute node. The file will first be copied to the path defined in the site table, \ **SNsyncfiledir**\ attribute, or the default path \ **/var/xcat/syncfiles**\ on the service node, if the attribute is not defined. The \ **-P**\ flag will not automatically copy the files from the compute node to the Management node, hierarchically. There is a two step process, see \ **-P**\ flag. -If the Management Node is target node, it must be defined in the xCAT database with nodetype=mn. When the \ **xdcp**\ command runs the Management Node as the target, it does not use remote commands but uses the local OS copy (\ **cp**\ ) command. +If the Management Node is target node, it must be defined in the xCAT database with \ **nodetype=mn**\ . When the \ **xdcp**\ command runs with the Management Node as the target, it does not use remote commands but uses the local OS copy (\ **cp**\ ) command. \ **REMOTE**\ \ **USER**\ : -A user_ID can be specified for the remote copy command. Remote user -specification is identical for the \ **xdcp**\ and \ **xdsh**\ commands. See the \ **xdsh**\ -command for more information. +A user_ID can be specified for the remote copy command. Remote user +specification is identical for the \ **xdcp**\ and \ **xdsh**\ commands. +See the \ **xdsh**\ command for more information. \ **REMOTE**\ \ **COMMAND**\ \ **COPY**\ : The \ **xdcp**\ command uses a configurable remote copy command to execute remote copies on remote targets. Support is explicitly provided for -Remote Shell rcp command, the OpenSSH scp command and the -/usr/bin/rsync command. +Remote Shell \ **rcp**\ command, the OpenSSH \ **scp**\ command and the +\ **/usr/bin/rsync**\ command. -For node targets, the remote copy command is determined by the follow- -ing order of precedence: +For node targets, the remote copy command is determined by the following order of precedence: 1. The \ **-r**\ flag. -2. The \ **/usr/bin/scp**\ command. +2. The \ **/usr/bin/rsync**\ command. \ **COMMAND**\ \ **EXECUTIONS**\ : @@ -75,10 +74,10 @@ appropriate. A timeout value for remote copy command execution can be specified with the \ **-t**\ flag or DSH_TIMEOUT environment variable. If any remote target -does not respond within the timeout value, the xdcp command displays an +does not respond within the timeout value, the \ **xdcp**\ command displays an error message and exits. -The \ **-T**\ flag provides diagnostic trace information for dcp command execution. Default settings and the actual remote copy commands that are executed to the remote targets are displayed. +The \ **-T**\ flag provides diagnostic trace information for \ **xdcp**\ command execution. Default settings and the actual remote copy commands that are executed to the remote targets are displayed. The \ **xdcp**\ command can be executed silently using the \ **-Q**\ flag; no target standard output or standard error is displayed. @@ -94,170 +93,45 @@ standard output or standard error is displayed. Specifies the complete path for the file to be copied to or from the target. Multiple files can be specified. When used - with the -R flag, only a single directory can be specified. - When used with the -P flag, only a single file can be specified. + with the \ **-R**\ flag, only a single directory can be specified. + When used with the \ **-P**\ flag, only a single file can be specified. \ *targetpath*\ - If one source_file file, then it specifies the file to copy the source_file - file to on the target. If multiple source_file files, it specifies - the directory to copy the source_file files to on the target. - If the -P flag is specified, the target_path is the local host location + If one source file, then it specifies the file to copy the source + file to on the target. If multiple source files, it specifies + the directory to copy the source files to on the target. + If the \ **-P**\ flag is specified, the \ *targetpath*\ is the local host location for the copied files. The remote file directory structure is recreated - under target_path and the remote target name is appended - to the copied source_file name in the target_path directory. - Note: the targetpath directory must exist. + under \ *targetpath*\ and the remote target name is appended + to the copied \ *sourcefile*\ name in the \ *targetpath*\ directory. + Note: the \ *targetpath*\ directory must exist. \ **-B | -**\ **-bypass**\ - Runs in bypass mode, use if the xcatd daemon is hung. + Runs in bypass mode, use if the \ **xcatd**\ daemon is not responding. \ **-f | -**\ **-fanout**\ \ *fanout_value*\ - Specifies a fanout value for the maximum number of concur- - rently executing remote shell processes. Serial execution + Specifies a fanout value for the maximum number of concurrently executing remote shell processes. Serial execution can be specified by indicating a fanout value of \ **1**\ . If \ **-f**\ is not specified, a default fanout value of \ **64**\ is used. -\ **-F | -**\ **-File**\ \ *rsync input file*\ +\ **-F | -**\ **-File**\ \ *synclist input file*\ Specifies the path to the file that will be used to build the \ **rsync**\ command. - The format of the input file is as follows, each line contains: + The format of the input file is described here: - - .. code-block:: perl - - ... -> < path to destination file/directory> - - - or - - - .. code-block:: perl - - -> - - - or - - - .. code-block:: perl - - -> - - - For example: - - - .. code-block:: perl - - /etc/password /etc/hosts -> /etc - - /tmp/file2 -> /tmp/file2 - - /tmp/file2 -> /tmp/ - - /tmp/filex -> /tmp/source/filey - - /etc/* -> /etc/ - - - \ **Running postscripts after files are sync'd to the nodes**\ : - - After you define the files to rsync, you can add an \ **EXECUTE:**\ clause in the synclist file. The \ **EXECUTE:**\ clause will list all the postscripts that you would like to run after the files are sync'd to the node. - The postscript file must be of the form \ **filename.post**\ , where the - is the is the from , reside in the same - directory as \ **filename**\ , and be executable. - If the file \ **filename**\ is rsync'd to the node, then the \ **filename.post**\ - will automatically be run on the node. - If the file \ **filename**\ is not updated on the node, the \ **filename.post**\ will not be run. - - Putting the \ **filename.post**\ in the file list to rsync to the node is required - for hierarchical clusters. It is optional for non-hierarchical clusters. - - Another option is the \ **EXECUTEALWAYS:**\ clause in the synclist file. The \ **EXECUTEALWAYS:**\ will list all the postscripts that you would like to run after the files are sync'd to the nodes. These scripts will run whether or not any files are sync'd to the nodes. The scripts have no special format, but must contain the fully qualified path. - - The scripts must be also added to the file list to rsync to the node for hierarchical clusters. It is optional for non-hierarchical clusters. - - For example, your rsynclist file may look like this: - - - .. code-block:: perl - - /tmp/share/file2 -> /tmp/file2 - /tmp/share/file2.post -> /tmp/file2.post - /tmp/share/file3 -> /tmp/filex - /tmp/share/file3.post -> /tmp/file3.post - /tmp/myscript -> /tmp/myscript - # the below are postscripts - EXECUTE: - /tmp/share/file2.post - /tmp/share/file3.post - EXECUTEALWAYS: - /tmp/myscript - - - If /tmp/file2 and /tmp/file3 update /tmp/file2 and /tmp/filex on the node, then the postscripts /tmp/file2.post and /tmp/file3.post are automatically run on - the node. /tmp/myscript will always be run on the node. - - Another option is the \ **APPEND:**\ clause in the synclist file. The \ **APPEND:**\ clause is used to append the contents of the input file to an existing file on the node. The file to append \ **must**\ already exist on the node and not be part of the synclist that contains the \ **APPEND:**\ clause. - - For example, your rsynclist file may look like this: - - - .. code-block:: perl - - /tmp/share/file2 -> /tmp/file2 - /tmp/share/file2.post -> /tmp/file2.post - /tmp/share/file3 -> /tmp/filex - /tmp/share/file3.post -> /tmp/file3.post - /tmp/myscript -> /tmp/myscript - # the below are postscripts - EXECUTE: - /tmp/share/file2.post - /tmp/share/file3.post - EXECUTEALWAYS: - /tmp/myscript - APPEND: - /etc/myappenddir/appendfile -> /etc/mysetup/setup - /etc/myappenddir/appendfile2 -> /etc/mysetup/setup2 - - - When you use the append script, the file (left) of the arrow is appended to the file right of the arrow. In this example, /etc/myappenddir/appendfile is appended to /etc/mysetup/setup file, which must already exist on the node. The /opt/xcat/share/xcat/scripts/xdcpappend.sh is used to accomplish this. - - Another option is the \ **MERGE:**\ clause in the synclist file. The \ **MERGE:**\ clause is used to append the contents of the input file to /etc/passwd, /etc/group, or /etc/shadow on a Linux node. It is only supported for those files and only on Linux. You must not use both the APPEND and MERGE funcion for these three files. The processing could end up not creating the file you desire. The MERGE function is the preferred method, because APPEND only adds to the file. MERGE will add to the file but also insure there are no duplicate entries. - - For example, your rsynclist file may look like this: - /tmp/share/file2 -> /tmp/file2 - /tmp/share/file2.post -> /tmp/file2.post - /tmp/share/file3 -> /tmp/filex - /tmp/share/file3.post -> /tmp/file3.post - /tmp/myscript -> /tmp/myscript - # the below are postscripts - EXECUTE: - /tmp/share/file2.post - /tmp/share/file3.post - EXECUTEALWAYS: - /tmp/myscript - APPEND: - /custom/mypasswd -> /etc/passwd - /custom/mygroups -> /etc/group - /custom/myshadow -> /etc/shadow - - Note: no order can be assumed by the order that the EXECUTE,EXECUTEALWAYS and APPEND clause fall in the synclist file. - - For more information on syncing files to node, read Sync-ing_Config_Files_to_Nodes - - On Linux rsync always uses ssh remoteshell. On AIX, ssh or rsh is used depending on the site.useSSHonAIX attribute. + On Linux \ **rsync**\ always uses ssh remoteshell. On AIX, \ **ssh**\ or \ **rsh**\ is used depending on the \ **site.useSSHonAIX**\ table attribute. @@ -269,7 +143,7 @@ standard output or standard error is displayed. \ **-i | -**\ **-rootimg**\ \ *install image*\ - Specifies the path to the install image on the local Linux node. + Specifies the path to the install image on the local Linux node. @@ -277,7 +151,7 @@ standard output or standard error is displayed. Specifies options to pass to the remote shell command for node targets. The options must be specified within double - quotation marks ("") to distinguish them from \ **xdsh**\ options. + quotation marks ("") to distinguish them from \ **xdcp**\ options. @@ -291,14 +165,14 @@ standard output or standard error is displayed. \ **-P | -**\ **-pull**\ Pulls (copies) the files from the targets and places them in - the target_path directory on the local host. The target_path + the \ *targetpath*\ directory on the local host. The \ *targetpath*\ must be a directory. Files pulled from remote machines have - ._target appended to the file name to distinguish between - them. When the \ **-P**\ flag is used with the \ **-R**\ flag, ._target is + \ **._target**\ appended to the file name to distinguish between + them. When the \ **-P**\ flag is used with the \ **-R**\ flag, \ **._target**\ is appended to the directory. Only one file per invocation of the - xdcp pull command can be pulled from the specified targets. - Hierarchy is not automatically support yet. You must first pull - the file to the Service Node and then pull the file to the Management + \ **xdcp**\ pull command can be pulled from the specified targets. + In hierarchy, you must first pull + the file to the service node and then pull the file to the management node. @@ -313,10 +187,17 @@ standard output or standard error is displayed. -\ **-r | -**\ **-node-rcp**\ \ *node_remote_copy*\ +\ **-r | -**\ **-node-rcp**\ \ *node remote copy command*\ - Specifies the full path of the remote copy command used - for remote command execution on node targets. + Specifies the full path of the remote copy command used for syncing files to node targets, such as \ **/usr/bin/rsync**\ or \ **/usr/bin/scp**\ . If not specified, \ **rsync**\ will be used by default. + + Note: The synclist processing for \ **-r /usr/bin/scp**\ has some differences with \ **-r /usr/bin/rsync**\ : + + 1) the \ **EXECUTE**\ clause in synclist file is not supported with \ **-r /usr/bin/scp**\ flag + + 2) if the destination directory specified in synclist file is an existing file on target node, \ **xdcp -r /usr/bin/scp**\ will fail with "scp: : Not a directory" + + 3) if the destination file specified in synclist file is an existing directory on target node, \ **xdcp -r /usr/bin/scp**\ will fail with "scp: : Is a directory" @@ -325,8 +206,7 @@ standard output or standard error is displayed. Recursively copies files from a local directory to the remote targets, or when specified with the \ **-P**\ flag, recursively pulls (copies) files from a remote directory to the local host. A - single source directory can be specified using the source_file - parameter. + single source directory can be specified using the \ *sourcefile*\ parameter. @@ -334,8 +214,8 @@ standard output or standard error is displayed. Will only sync the files listed in the synclist (\ **-F**\ ), to the service nodes for the input compute node list. The files will be placed in the - directory defined by the site.SNsyncfiledir attribute, or the default - /var/xcat/syncfiles directory. + directory defined by the \ **site.SNsyncfiledir**\ table attribute, or the default + \ **/var/xcat/syncfiles**\ directory. @@ -447,9 +327,8 @@ standard output or standard error is displayed. \ **DSH_TIMEOUT**\ - Specifies the time, in seconds, to wait for output from - each remote target. This variable is overridden by the \ **-t**\ - flag. + Specifies the time, in seconds, to wait for output from + each remote target. This variable is overridden by the \ **-t**\ flag. @@ -463,13 +342,12 @@ Exit values for each remote copy command execution are displayed in messages from the xdcp command, if the remote copy command exit value is non-zero. A non-zero return code from a remote copy command indicates that an error was encountered during the remote copy. If a remote copy -command encounters an error, execution of the remote copy on that tar- -get is bypassed. +command encounters an error, execution of the remote copy on that target is bypassed. -The xdcp command exit code is 0, if the xdcp command executed without +The \ **xdcp**\ command exit code is 0, if the \ **xdcp**\ command executed without errors and all remote copy commands finished with exit codes of 0. If -internal xdcp errors occur or the remote copy commands do not complete -successfully, the xdcp command exit value is greater than 0. +internal \ **xdcp**\ errors occur or the remote copy commands do not complete +successfully, the \ **xdcp**\ command exit value is greater than 0. **************** @@ -530,7 +408,7 @@ host as /var/log._target, enter: -3. To copy /localnode/smallfile and /tmp/bigfile to /tmp on node1 +3. To copy /localnode/smallfile and /tmp/bigfile to B/tmp on node1 using rsync and input -t flag to rsync, enter: @@ -587,15 +465,23 @@ from the local host to node1 in the cluster, enter: 8. To rsync the /etc/hosts file to your compute nodes: - Create a rsync file /tmp/myrsync, with this line: + First create a syncfile /tmp/myrsync, with this line: + + + .. code-block:: perl + + /etc/hosts -> /etc/hosts - /etc/hosts -> /etc/hosts or - /etc/hosts -> /etc/ (last / is required) - Run: + .. code-block:: perl + + /etc/hosts -> /etc/ (last / is required) + + + Then run: .. code-block:: perl @@ -607,11 +493,15 @@ from the local host to node1 in the cluster, enter: 9. To rsync all the files in /home/mikev to the compute nodes: - Create a rsync file /tmp/myrsync, with this line: + First create a rsync file /tmp/myrsync, with this line: - /home/mikev/\* -> /home/mikev/ (last / is required) - Run: + .. code-block:: perl + + /home/mikev/* -> /home/mikev/ (last / is required) + + + Then run: .. code-block:: perl @@ -621,18 +511,25 @@ from the local host to node1 in the cluster, enter: -10. To rsync to the compute nodes, using service nodes, the command will first -rsync the files to the /var/xcat/syncfiles directory on the service nodes and then rsync the files from that directory to the compute nodes. The /var/xcat/syncfiles default directory on the service nodes, can be changed by putting a directory value in the site table SNsyncfiledir attribute. +10. To rsync to the compute nodes, using service nodes: - Create a rsync file /tmp/myrsync, with this line: + First create a rsync file /tmp/myrsync, with this line: + + + .. code-block:: perl + + /etc/hosts /etc/passwd -> /etc - /etc/hosts /etc/passwd -> /etc or - /etc/hosts /etc/passwd -> /etc/ - Run: + .. code-block:: perl + + /etc/hosts /etc/passwd -> /etc/ + + + Then run: .. code-block:: perl @@ -640,18 +537,20 @@ rsync the files to the /var/xcat/syncfiles directory on the service nodes and t xdcp compute -F /tmp/myrsync - to update the Compute Nodes - 11. To rsync to the service nodes in preparation for rsyncing the compute nodes during an install from the service node. - Create a rsync file /tmp/myrsync, with this line: + First create a rsync file /tmp/myrsync, with this line: - /etc/hosts /etc/passwd -> /etc - Run: + .. code-block:: perl + + /etc/hosts /etc/passwd -> /etc + + + Then run: .. code-block:: perl @@ -659,19 +558,21 @@ during an install from the service node. xdcp compute -s -F /tmp/myrsync - to sync the service node for compute - 12. To rsync the /etc/file1 and file2 to your compute nodes and rename to filex and filey: - Create a rsync file /tmp/myrsync, with these line: + First create a rsync file /tmp/myrsync, with these line: - /etc/file1 -> /etc/filex - /etc/file2 -> /etc/filey + .. code-block:: perl - Run: + /etc/file1 -> /etc/filex + + /etc/file2 -> /etc/filey + + + Then run: .. code-block:: perl @@ -685,11 +586,15 @@ during an install from the service node. 13. To rsync files in the Linux image at /install/netboot/fedora9/x86_64/compute/rootimg on the MN: - Create a rsync file /tmp/myrsync, with this line: + First create a rsync file /tmp/myrsync, with this line: - /etc/hosts /etc/passwd -> /etc - Run: + .. code-block:: perl + + /etc/hosts /etc/passwd -> /etc + + + Then run: .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst index 7a3361399..33f4ac5e3 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -135,6 +135,11 @@ site Attributes: service nodes will ignore this value and always be configured to forward to the management node. + dnsforwardmode: (first or only or no). This is to set forward value in named.conf options section. + "first": causes DNS requests to be forwarded before an attempt is made to resolve them via the root name servers. + "only": all requests are forwarded and none sent to the root name servers. + "no": no request will be forwarded. This is the default value if not specified. + emptyzonesenable: (yes or no). This is to set empty-zones-enable value in named.conf options section. master: The hostname of the xCAT management node, as known by the nodes. @@ -401,7 +406,7 @@ site Attributes: dbtracelevel: The trace level for the database access log. To activate this setting, please. restart xcatd or send HUP signal to the 'xcatd: DB Access' process, Like: . - ps -ef | grep 'xcatd: DB Access' | grep -v grep | awk '{print $2}' | xargs kill -HUP + pkill -f -HUP 'xcatd: DB Access' Currrent support values: 0: disable the trace log for db 1: trace the calls of database subroutines diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index 4284b4ef0..bbf811e93 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -5936,6 +5936,11 @@ sub run_rsync_postscripts # return from rsync is tmp/file1 not /tmp/file1 substr($tmppostfile, 0, 1) = ""; + # now remove .post from the postscript file for the compare + # with the returned file name + my($tp,$post) = split(/\.post/,$tmppostfile); + $tmppostfile = $tp; + foreach my $line (@rsync_output) { my ($hostname, $ps) = split(/: /, $line); chomp $ps; @@ -5948,7 +5953,10 @@ sub run_rsync_postscripts } next; } - if ($tmppostfile eq $ps) { + + #the $postsfile .post will be run if: + # the is updated, or + if ($ps eq $tmppostfile ) { # build xdsh queue # build host and all scripts to execute diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 79fe7a80a..618bbe527 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -1059,6 +1059,10 @@ passed as argument rather than by table value', " requests it does not know to these servers. Note that the DNS servers on the\n" . " service nodes will ignore this value and always be configured to forward \n" . " to the management node.\n\n" . +" dnsforwardmode: (first or only or no). This is to set forward value in named.conf options section. \n" . +" \"first\": causes DNS requests to be forwarded before an attempt is made to resolve them via the root name servers. \n" . +" \"only\": all requests are forwarded and none sent to the root name servers.\n". +" \"no\": no request will be forwarded. This is the default value if not specified. \n\n" . " emptyzonesenable: (yes or no). This is to set empty-zones-enable value in named.conf options section. \n\n" . " master: The hostname of the xCAT management node, as known by the nodes.\n\n" . " nameservers: A comma delimited list of DNS servers that each node in the cluster should\n" . @@ -1262,7 +1266,7 @@ passed as argument rather than by table value', " delimiter, to specify delimiter for those columns as format of 'column:delimiter'.\n\n" . " dbtracelevel: The trace level for the database access log. To activate this setting, please. \n". " restart xcatd or send HUP signal to the 'xcatd: DB Access' process, Like: .\n". -" ps -ef | grep 'xcatd: DB Access' | grep -v grep | awk '{print \$2}' | xargs kill -HUP \n". +" pkill -f -HUP 'xcatd: DB Access' \n". " Currrent support values: \n" . " 0: disable the trace log for db \n" . " 1: trace the calls of database subroutines \n" . diff --git a/xCAT-client/pods/man1/updatenode.1.pod b/xCAT-client/pods/man1/updatenode.1.pod index dbfd3cb24..782722996 100644 --- a/xCAT-client/pods/man1/updatenode.1.pod +++ b/xCAT-client/pods/man1/updatenode.1.pod @@ -18,7 +18,7 @@ B [B<-h>|B<--help>] [B<-v>|B<--version>] =head1 DESCRIPTION -The updatenode command is run on the xCAT management node and can be used +The B command is run on the xCAT management node and can be used to perform the following node updates: =over 3 @@ -38,9 +38,9 @@ Update the ca and credentials for the service nodes. =back -The default behavior when no options are input to updatenode will be to run +The default behavior when no options are input to B will be to run the following options B<-S>, B<-P> and B<-F> options in this order. -If you wish to limit updatenode to specific +If you wish to limit B to specific actions you can use combinations of the B<-S>, B<-P>, and B<-F> flags. For example, If you just want to synchronize configuration file you could @@ -55,7 +55,7 @@ The flag B<-f> (B<--snsync>) can NOT be used together with B<-S>, B<-P>, and B<- Note: In a large cluster environment the updating of nodes in an ad hoc manner can quickly get out of hand, leaving the system administrator with -a very confusing environment to deal with. The updatenode command is +a very confusing environment to deal with. The B command is designed to encourage users to handle cluster updates in a manner that is recorded and easily repeatable. @@ -72,14 +72,14 @@ Create a synclist file. Indicate the location of the synclist file. =item * -Run the updatenode command to update the nodes. +Run the B command to update the nodes. =back Files may be distributed and synchronized for both diskless and diskful nodes. Syncing files to NFS-based statelite nodes is not supported. -More information on using the synchronization file function is in the following doc: Using_Updatenode. +More information on using the synchronization file function is in the following document: =head3 Create the synclist file @@ -88,9 +88,7 @@ where the files should be synced to. In the synclist file, each line is an entry which describes the location of the source files and the destination location for the files on the target node. -For more information on creating your synclist files and where to put them, read: - -Sync-ing_Config_Files_to_Nodes +For more information on creating your synclist files and where to put them, read here: =head3 Run updatenode to synchronize the files @@ -289,12 +287,12 @@ Used to specify a source directory other than the standard lpp_source directory =item B<-F|--sync> Specifies that file synchronization should be -performed on the nodes. rsync/scp and ssh must +performed on the nodes. B and B must be installed and configured on the nodes. The function is not supported for NFS-based statelite installations. For NFS-based statelite installations to sync files, you should use the read-only option for files/directories listed in -litefile table with source location specified in the litetree table. +B table with source location specified in the B table. =item B<-f|--snsync> @@ -302,19 +300,19 @@ litefile table with source location specified in the litetree table. Specifies that file synchronization should be performed to the service nodes that service the nodes in the noderange. This updates the service -nodes with the data to sync to the nodes. rsync/scp and ssh must +nodes with the data to sync to the nodes. B and B must be installed and configured on the service nodes. For hierarchy, this optionally can be done before syncing the files -to the nodes with the -F flag. If the -f flag is not used, then -the -F flag will sync the servicenodes before the nodes automatically. +to the nodes with the B<-F> flag. If the B<-f> flag is not used, then +the B<-F> flag will sync the service nodes before the nodes automatically. When installing nodes in a hierarchical cluster, this flag should be used to sync the service nodes before the install, since the files will -be sync'd from the service node by the syncfiles postscript during the +be synced from the service node by the B postscript during the install. The function is not supported for NFS-based statelite installations. For statelite installations to sync files, you should use the read-only option for files/directories listed in -litefile table with source location specified in the litetree table. +B table with source location specified in the B table. =item [B<-r>|B<--node-rcp> [I]] @@ -359,8 +357,8 @@ See the document Granting_Users_xCAT_privileges for required xcat/sudo setup. =item B<-P|--scripts> Specifies that postscripts and postbootscripts should be run on the nodes. -updatenode -P syncfiles is not supported. The syncfiles postscript can only -be run during install. You should use updatenode -F instead. +File sync with B is not supported. The B postscript can only +be run during install. You should use B instead. =item B<-S|--sw> @@ -417,11 +415,11 @@ To run postscripts,postbootscripts and file synchronization only on the node "cl updatenode clstrn01 -F -P =item 3. -Running updatenode -P with the syncfiles postscript is not supported. You should use updatenode -F instead. +Running B with the B postscript is not supported. You should use B instead. Do not run: - updatenode clstrno1 -P syncfiles + updatenode clstrn01 -P syncfiles Run: diff --git a/xCAT-client/pods/man1/xdcp.1.pod b/xCAT-client/pods/man1/xdcp.1.pod index a4f2fc9db..665823e79 100644 --- a/xCAT-client/pods/man1/xdcp.1.pod +++ b/xCAT-client/pods/man1/xdcp.1.pod @@ -1,6 +1,6 @@ =head1 B -B - Concurrently copies files to or from multiple nodes. In addition, provides an option to use rsync to update the files on the nodes, or to an installation image on the local node. +B - Concurrently copies files to or from multiple nodes. In addition, provides an option to use B to update the files on the managed nodes, or to an installation image on the local node. =head1 B @@ -11,7 +11,7 @@ B I [B<-F> I] B I [B<-s> B<-F> I] -B [B<-i> I] [B<-F> I] +B [B<-i> I] [B<-F> I] B [B<-h> | B<-V> | B<-q>] @@ -20,29 +20,28 @@ B [B<-h> | B<-V> | B<-q>] =head1 B The B command concurrently copies files to or from remote target -nodes. The command issues a remote copy command for each node or device specified. When files are pulled from a target, they are placed into the target_path with the name of the -remote node or device appended to the copied source_file name. The -/usr/bin/rcp command is the model for syntax and security. -If using hierarchy, then xdcp runs on the service node that is servicing the compute node. The file will first be copied to the path defined in the site table, SNsyncfiledir attribute, or the default path /var/xcat/syncfiles on the service node, if the attribute is not defined. The -P flag will not automatically copy +nodes. The command issues a remote copy command for each node or device specified. When files are pulled from a target, they are placed into the I with the name of the +remote node or device appended to the copied I name. The +B command is the model for syntax and security. +If using hierarchy, then B runs on the service node that is servicing the compute node. The file will first be copied to the path defined in the site table, B attribute, or the default path B on the service node, if the attribute is not defined. The B<-P> flag will not automatically copy the files from the compute node to the Management node, hierarchically. There is a two step process, see B<-P> flag. -If the Management Node is target node, it must be defined in the xCAT database with nodetype=mn. When the B command runs the Management Node as the target, it does not use remote commands but uses the local OS copy (B) command. +If the Management Node is target node, it must be defined in the xCAT database with B. When the B command runs with the Management Node as the target, it does not use remote commands but uses the local OS copy (B) command. B B: -A user_ID can be specified for the remote copy command. Remote user -specification is identical for the B and B commands. See the B -command for more information. +A user_ID can be specified for the remote copy command. Remote user +specification is identical for the B and B commands. +See the B command for more information. B B B: The B command uses a configurable remote copy command to execute remote copies on remote targets. Support is explicitly provided for -Remote Shell rcp command, the OpenSSH scp command and the -/usr/bin/rsync command. +Remote Shell B command, the OpenSSH B command and the +B command. -For node targets, the remote copy command is determined by the follow- -ing order of precedence: +For node targets, the remote copy command is determined by the following order of precedence: 1. The B<-r> flag. @@ -60,10 +59,10 @@ appropriate. A timeout value for remote copy command execution can be specified with the B<-t> flag or DSH_TIMEOUT environment variable. If any remote target -does not respond within the timeout value, the xdcp command displays an +does not respond within the timeout value, the B command displays an error message and exits. -The B<-T> flag provides diagnostic trace information for dcp command execution. Default settings and the actual remote copy commands that are executed to the remote targets are displayed. +The B<-T> flag provides diagnostic trace information for B command execution. Default settings and the actual remote copy commands that are executed to the remote targets are displayed. The B command can be executed silently using the B<-Q> flag; no target standard output or standard error is displayed. @@ -76,28 +75,27 @@ standard output or standard error is displayed. Specifies the complete path for the file to be copied to or from the target. Multiple files can be specified. When used -with the -R flag, only a single directory can be specified. -When used with the -P flag, only a single file can be specified. +with the B<-R> flag, only a single directory can be specified. +When used with the B<-P> flag, only a single file can be specified. =item I -If one source_file file, then it specifies the file to copy the source_file -file to on the target. If multiple source_file files, it specifies -the directory to copy the source_file files to on the target. -If the -P flag is specified, the target_path is the local host location +If one source file, then it specifies the file to copy the source +file to on the target. If multiple source files, it specifies +the directory to copy the source files to on the target. +If the B<-P> flag is specified, the I is the local host location for the copied files. The remote file directory structure is recreated -under target_path and the remote target name is appended -to the copied source_file name in the target_path directory. -Note: the targetpath directory must exist. +under I and the remote target name is appended +to the copied I name in the I directory. +Note: the I directory must exist. =item B<-B>|B<--bypass> -Runs in bypass mode, use if the xcatd daemon is hung. +Runs in bypass mode, use if the B daemon is not responding. =item B<-f>|B<--fanout> I -Specifies a fanout value for the maximum number of concur- -rently executing remote shell processes. Serial execution +Specifies a fanout value for the maximum number of concurrently executing remote shell processes. Serial execution can be specified by indicating a fanout value of B<1>. If B<-f> is not specified, a default fanout value of B<64> is used. @@ -105,110 +103,9 @@ If B<-f> is not specified, a default fanout value of B<64> is used. Specifies the path to the file that will be used to build the B command. -The format of the input file is as follows, each line contains: +The format of the input file is described here: - ... -> < path to destination file/directory> - -or - - -> - -or - - -> - -For example: - - /etc/password /etc/hosts -> /etc - - /tmp/file2 -> /tmp/file2 - - /tmp/file2 -> /tmp/ - - /tmp/filex -> /tmp/source/filey - - /etc/* -> /etc/ - -B: - -After you define the files to rsync, you can add an B clause in the synclist file. The B clause will list all the postscripts that you would like to run after the files are sync'd to the node. -The postscript file must be of the form B, where the -is the is the from , reside in the same -directory as B, and be executable. -If the file B is rsync'd to the node, then the B -will automatically be run on the node. -If the file B is not updated on the node, the B will not be run. - -Putting the B in the file list to rsync to the node is required -for hierarchical clusters. It is optional for non-hierarchical clusters. - -Another option is the B clause in the synclist file. The B will list all the postscripts that you would like to run after the files are sync'd to the nodes. These scripts will run whether or not any files are sync'd to the nodes. The scripts have no special format, but must contain the fully qualified path. - -The scripts must be also added to the file list to rsync to the node for hierarchical clusters. It is optional for non-hierarchical clusters. - -For example, your rsynclist file may look like this: - - /tmp/share/file2 -> /tmp/file2 - /tmp/share/file2.post -> /tmp/file2.post - /tmp/share/file3 -> /tmp/filex - /tmp/share/file3.post -> /tmp/file3.post - /tmp/myscript -> /tmp/myscript - # the below are postscripts - EXECUTE: - /tmp/share/file2.post - /tmp/share/file3.post - EXECUTEALWAYS: - /tmp/myscript - -If /tmp/file2 and /tmp/file3 update /tmp/file2 and /tmp/filex on the node, then the postscripts /tmp/file2.post and /tmp/file3.post are automatically run on -the node. /tmp/myscript will always be run on the node. - - -Another option is the B clause in the synclist file. The B clause is used to append the contents of the input file to an existing file on the node. The file to append B already exist on the node and not be part of the synclist that contains the B clause. - -For example, your rsynclist file may look like this: - - /tmp/share/file2 -> /tmp/file2 - /tmp/share/file2.post -> /tmp/file2.post - /tmp/share/file3 -> /tmp/filex - /tmp/share/file3.post -> /tmp/file3.post - /tmp/myscript -> /tmp/myscript - # the below are postscripts - EXECUTE: - /tmp/share/file2.post - /tmp/share/file3.post - EXECUTEALWAYS: - /tmp/myscript - APPEND: - /etc/myappenddir/appendfile -> /etc/mysetup/setup - /etc/myappenddir/appendfile2 -> /etc/mysetup/setup2 - -When you use the append script, the file (left) of the arrow is appended to the file right of the arrow. In this example, /etc/myappenddir/appendfile is appended to /etc/mysetup/setup file, which must already exist on the node. The /opt/xcat/share/xcat/scripts/xdcpappend.sh is used to accomplish this. - -Another option is the B clause in the synclist file. The B clause is used to append the contents of the input file to /etc/passwd, /etc/group, or /etc/shadow on a Linux node. It is only supported for those files and only on Linux. You must not use both the APPEND and MERGE funcion for these three files. The processing could end up not creating the file you desire. The MERGE function is the preferred method, because APPEND only adds to the file. MERGE will add to the file but also insure there are no duplicate entries. - -For example, your rsynclist file may look like this: - /tmp/share/file2 -> /tmp/file2 - /tmp/share/file2.post -> /tmp/file2.post - /tmp/share/file3 -> /tmp/filex - /tmp/share/file3.post -> /tmp/file3.post - /tmp/myscript -> /tmp/myscript - # the below are postscripts - EXECUTE: - /tmp/share/file2.post - /tmp/share/file3.post - EXECUTEALWAYS: - /tmp/myscript - APPEND: - /custom/mypasswd -> /etc/passwd - /custom/mygroups -> /etc/group - /custom/myshadow -> /etc/shadow - -Note: no order can be assumed by the order that the EXECUTE,EXECUTEALWAYS and APPEND clause fall in the synclist file. - -For more information on syncing files to node, read Sync-ing_Config_Files_to_Nodes - -On Linux rsync always uses ssh remoteshell. On AIX, ssh or rsh is used depending on the site.useSSHonAIX attribute. +On Linux B always uses ssh remoteshell. On AIX, B or B is used depending on the B table attribute. =item B<-h>|B<--help> @@ -218,15 +115,14 @@ Displays usage information. =item B<-i>|B<--rootimg> I -Specifies the path to the install image on the local Linux node. - +Specifies the path to the install image on the local Linux node. =item B<-o>|B<--node-options> I Specifies options to pass to the remote shell command for node targets. The options must be specified within double -quotation marks ("") to distinguish them from B options. +quotation marks ("") to distinguish them from B options. =item B<-p>|B<--preserve> @@ -236,14 +132,14 @@ the configured remote copy command. =item B<-P>|B<--pull> Pulls (copies) the files from the targets and places them in -the target_path directory on the local host. The target_path +the I directory on the local host. The I must be a directory. Files pulled from remote machines have -._target appended to the file name to distinguish between -them. When the B<-P> flag is used with the B<-R> flag, ._target is +B<._target> appended to the file name to distinguish between +them. When the B<-P> flag is used with the B<-R> flag, B<._target> is appended to the directory. Only one file per invocation of the -xdcp pull command can be pulled from the specified targets. -Hierarchy is not automatically support yet. You must first pull -the file to the Service Node and then pull the file to the Management +B pull command can be pulled from the specified targets. +In hierarchy, you must first pull +the file to the service node and then pull the file to the management node. =item B<-q>|B<--show-config> @@ -266,16 +162,15 @@ for remote command execution on node targets. Recursively copies files from a local directory to the remote targets, or when specified with the B<-P> flag, recursively pulls (copies) files from a remote directory to the local host. A -single source directory can be specified using the source_file -parameter. +single source directory can be specified using the I parameter. =item B<-s> I Will only sync the files listed in the synclist (B<-F>), to the service nodes for the input compute node list. The files will be placed in the -directory defined by the site.SNsyncfiledir attribute, or the default -/var/xcat/syncfiles directory. +directory defined by the B table attribute, or the default +B directory. =item B<-t>|B<--timeout> I @@ -361,9 +256,8 @@ variable is overridden by the B<-S> flag. =item B -Specifies the time, in seconds, to wait for output from -each remote target. This variable is overridden by the B<-t> -flag. +Specifies the time, in seconds, to wait for output from +each remote target. This variable is overridden by the B<-t> flag. =back @@ -374,13 +268,12 @@ Exit values for each remote copy command execution are displayed in messages from the xdcp command, if the remote copy command exit value is non-zero. A non-zero return code from a remote copy command indicates that an error was encountered during the remote copy. If a remote copy -command encounters an error, execution of the remote copy on that tar- -get is bypassed. +command encounters an error, execution of the remote copy on that target is bypassed. -The xdcp command exit code is 0, if the xdcp command executed without +The B command exit code is 0, if the B command executed without errors and all remote copy commands finished with exit codes of 0. If -internal xdcp errors occur or the remote copy commands do not complete -successfully, the xdcp command exit value is greater than 0. +internal B errors occur or the remote copy commands do not complete +successfully, the B command exit value is greater than 0. @@ -424,7 +317,7 @@ host as /var/log._target, enter: xdcp NodeGroup1 -f 12 -RP /var/log/testlogdir /var/log =item 3. -To copy /localnode/smallfile and /tmp/bigfile to /tmp on node1 +To copy /localnode/smallfile and /tmp/bigfile to B/tmp on node1 using rsync and input -t flag to rsync, enter: xdcp node1 -r /usr/bin/rsync -o "-t" /localnode/smallfile /tmp/bigfile /tmp @@ -456,72 +349,67 @@ To copy the /etc/hosts file from node1 and node2 to the =item 8. To rsync the /etc/hosts file to your compute nodes: -Create a rsync file /tmp/myrsync, with this line: +First create a syncfile /tmp/myrsync, with this line: -/etc/hosts -> /etc/hosts + /etc/hosts -> /etc/hosts or -/etc/hosts -> /etc/ (last / is required) + /etc/hosts -> /etc/ (last / is required) -Run: +Then run: xdcp compute -F /tmp/myrsync =item 9. To rsync all the files in /home/mikev to the compute nodes: -Create a rsync file /tmp/myrsync, with this line: +First create a rsync file /tmp/myrsync, with this line: -/home/mikev/* -> /home/mikev/ (last / is required) + /home/mikev/* -> /home/mikev/ (last / is required) -Run: +Then run: xdcp compute -F /tmp/myrsync =item 10. -To rsync to the compute nodes, using service nodes, the command will first -rsync the files to the /var/xcat/syncfiles directory on the service nodes and then rsync the files from that directory to the compute nodes. The /var/xcat/syncfiles default directory on the service nodes, can be changed by putting a directory value in the site table SNsyncfiledir attribute. +To rsync to the compute nodes, using service nodes: +First create a rsync file /tmp/myrsync, with this line: -Create a rsync file /tmp/myrsync, with this line: - -/etc/hosts /etc/passwd -> /etc + /etc/hosts /etc/passwd -> /etc or -/etc/hosts /etc/passwd -> /etc/ + /etc/hosts /etc/passwd -> /etc/ -Run: +Then run: xdcp compute -F /tmp/myrsync -to update the Compute Nodes - =item 11. To rsync to the service nodes in preparation for rsyncing the compute nodes during an install from the service node. -Create a rsync file /tmp/myrsync, with this line: +First create a rsync file /tmp/myrsync, with this line: -/etc/hosts /etc/passwd -> /etc + /etc/hosts /etc/passwd -> /etc -Run: +Then run: xdcp compute -s -F /tmp/myrsync -to sync the service node for compute =item 12. To rsync the /etc/file1 and file2 to your compute nodes and rename to filex and filey: -Create a rsync file /tmp/myrsync, with these line: +First create a rsync file /tmp/myrsync, with these line: -/etc/file1 -> /etc/filex + /etc/file1 -> /etc/filex -/etc/file2 -> /etc/filey + /etc/file2 -> /etc/filey -Run: +Then run: xdcp compute -F /tmp/myrsync @@ -530,11 +418,11 @@ to update the Compute Nodes =item 13. To rsync files in the Linux image at /install/netboot/fedora9/x86_64/compute/rootimg on the MN: -Create a rsync file /tmp/myrsync, with this line: +First create a rsync file /tmp/myrsync, with this line: -/etc/hosts /etc/passwd -> /etc + /etc/hosts /etc/passwd -> /etc -Run: +Then run: xdcp -i /install/netboot/fedora9/x86_64/compute/rootimg -F /tmp/myrsync diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py index 53a35afe1..0900f63bf 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py @@ -32,10 +32,6 @@ POWER_RESET_TYPE = { 'on' : 'ForceOn', } -manager_reset_string = '#Manager.Reset' -system_reset_string = '#ComputerSystem.Reset' -reset_type_string = 'ResetType@Redfish.AllowableValues' - BOOTSOURCE_SET_STATE = { "cd" : "Cd", "def" : "None", @@ -55,6 +51,11 @@ BOOTSOURCE_GET_STATE = { "Pxe" : "Network", } +manager_reset_string = '#Manager.Reset' +system_reset_string = '#ComputerSystem.Reset' +reset_type_string = 'ResetType@Redfish.AllowableValues' +reset_action_string = '@Redfish.ActionInfo' + class RedfishRest(object): headers = {'Content-Type': 'application/json'} @@ -101,7 +102,7 @@ class RedfishRest(object): if data: if cmd == 'login': data = data.replace('"Password": "%s"' % self.password, '"Password": "xxxxxx"') - data = '-d \'%s\'' % data + data = '-d \'%s\'' % data msg += '%s %s -v' % (url, data) else: msg += url @@ -156,7 +157,7 @@ class RedfishRest(object): if 'Name' in data: self._print_record_log('%s %s' % (code, data['Name']), cmd) elif 'error' in data: - self._print_record_log('%s %s' % (code, data['error']['Message']), cmd) + self._print_record_log('%s %s' % (code, data['error']['message']), cmd) return data def login(self): @@ -170,7 +171,7 @@ class RedfishRest(object): try: return data['Members'] except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) def get_bmc_state(self): @@ -180,7 +181,7 @@ class RedfishRest(object): try: return data['PowerState'] except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) def get_chassis_power_state(self): @@ -190,7 +191,7 @@ class RedfishRest(object): try: return data['PowerState'] except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) def get_systems_power_state(self): @@ -200,18 +201,24 @@ class RedfishRest(object): try: return data['PowerState'] except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) def _get_bmc_actions(self): members = self._get_members(MANAGER_URL) target_url = members[0]['@odata.id'] data = self.request('GET', target_url, cmd='get_bmc_actions') + try: - actions = data['Actions'][manager_reset_string][reset_type_string] - target_url = data['Actions'][manager_reset_string]['target'] + actions_dict = data['Actions'][manager_reset_string] + target_url = actions_dict['target'] + if reset_action_string in actions_dict: + action_info = self.request('GET', actions_dict[reset_action_string], cmd='get_bmc_actions') + actions = action_info['Parameters'][0]['AllowableValues'] + else: + actions = actions_dict[reset_type_string] except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) return (target_url, actions) @@ -219,7 +226,7 @@ class RedfishRest(object): target_url, actions = self._get_bmc_actions() if BMC_RESET_TYPE not in actions: - raise SelfClientException('Unsupported option: %s' % BMC_RESET_TYPE) + raise SelfClientException('Unsupported option: %s' % BMC_RESET_TYPE, 403) data = { "ResetType": BMC_RESET_TYPE } return self.request('POST', target_url, payload=data, cmd='set_bmc_state') @@ -229,11 +236,17 @@ class RedfishRest(object): members = self._get_members(SYSTEMS_URL) target_url = members[0]['@odata.id'] data = self.request('GET', target_url, cmd='get_power_actions') + try: - actions = data['Actions'][system_reset_string][reset_type_string] - target_url = data['Actions'][system_reset_string]['target'] + actions_dict = data['Actions'][system_reset_string] + target_url = actions_dict['target'] + if reset_action_string in actions_dict: + action_info = self.request('GET', actions_dict[reset_action_string], cmd='get_power_actions') + actions = action_info['Parameters'][0]['AllowableValues'] + else: + actions = actions_dict[reset_type_string] except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) return (target_url, actions) @@ -241,7 +254,7 @@ class RedfishRest(object): target_url, actions = self._get_power_actions() if POWER_RESET_TYPE[state] not in actions: - raise SelfClientException('Unsupported option: %s' % state) + raise SelfClientException('Unsupported option: %s' % state, 403) data = { "ResetType": POWER_RESET_TYPE[state] } return self.request('POST', target_url, payload=data, cmd='set_power_state') @@ -258,7 +271,7 @@ class RedfishRest(object): bootsource = data['Boot']['BootSourceOverrideTarget'] return BOOTSOURCE_GET_STATE.get(bootsource, bootsource) except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) def _get_boot_actions(self): @@ -268,7 +281,7 @@ class RedfishRest(object): try: actions = data['Boot']['BootSourceOverrideTarget@Redfish.AllowableValues'] except KeyError as e: - raise SelfServerException('Get KeyError %s' % e.message) + raise SelfServerException('Get KeyError %s' % e.args) return (target_url, actions) @@ -277,7 +290,7 @@ class RedfishRest(object): target_url, actions = self._get_boot_actions() target_data = BOOTSOURCE_SET_STATE[state] if target_data not in actions: - raise SelfClientException('Unsupported option: %s' % state) + raise SelfClientException('Unsupported option: %s' % state, 403) boot_enable = 'Once' if persistant: diff --git a/xCAT-openbmc-py/lib/python/agent/tests/__init__.py b/xCAT-openbmc-py/lib/python/agent/tests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/__init__.py b/xCAT-openbmc-py/lib/python/agent/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/bmc_action_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/bmc_action_rsp.json new file mode 100644 index 000000000..32739dada --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/bmc_action_rsp.json @@ -0,0 +1,19 @@ +{ + "@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo", + "@odata.type": "#ActionInfo.v1_1_0.ActionInfo", + "@odata.id": "/redfish/v1/Managers/BMC/ResetActionInfo", + "Id": "ResetActionInfo", + "Name": "Reset Action Info", + "Parameters": [ + { + "Name": "ResetType", + "Required": true, + "DataType": "String", + "AllowableValues": [ + "ForceRestart", + "GracefulRestart" + ] + } + ], + "Oem": {} +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/chassis_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/chassis_rsp.json new file mode 100644 index 000000000..0538f74f1 --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/chassis_rsp.json @@ -0,0 +1,45 @@ +{ + "@odata.context": "/redfish/v1/$metadata#Chassis.Chassis", + "@odata.type": "#Chassis.v1_8_0.Chassis", + "@odata.id": "/redfish/v1/Chassis/Chassis0", + "Id": "Chassis0", + "Name": "OpenPOWER System Chassis", + "ChassisType": "RackMount", + "Manufacturer": "IBM", + "Model": "SYSTEM", + "SerialNumber": "C829UAE15A10564", + "PartNumber": "9006-22P", + "AssetTag": "", + "PowerState": "On", + "IndicatorLED": "Off", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PhysicalSecurity": { + "IntrusionSensorNumber": 226, + "IntrusionSensor": "HardwareIntrusion", + "IntrusionSensorReArm": "Manual" + }, + "Thermal": { + "@odata.id": "/redfish/v1/Chassis/Chassis0/Thermal" + }, + "Power": { + "@odata.id": "/redfish/v1/Chassis/Chassis0/Power" + }, + "Assembly": { + "@odata.id": "/redfish/v1/Chassis/Chassis0/Assembly" + }, + "Links": { + "ComputerSystems": [ + { + "@odata.id": "/redfish/v1/Systems/Computer" + } + ], + "ManagedBy": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ] + } +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/login_no_auth_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/login_no_auth_rsp.json new file mode 100644 index 000000000..d87bf2998 --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/login_no_auth_rsp.json @@ -0,0 +1,18 @@ +{ + "error": { + "code": "Base.1.4.0.GeneralError", + "message": "A general error has occurred. See Resolution for information on how to resolve the error.", + "@Message.ExtendedInfo": [ + { + "MessageId": "Base.1.4.0.ResourceAtUriUnauthorized", + "Severity": "Critical", + "Resolution": "Ensure that the appropriate access is provided for the service in order for it to access the URI.", + "Message": "While accessing the resource at /redfish/v1/SessionService/Sessions, the service received an authorization error unauthorized.", + "MessageArgs": [ + "/redfish/v1/SessionService/Sessions", + "unauthorized" + ] + } + ] + } +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/login_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/login_rsp.json new file mode 100644 index 000000000..2edae3953 --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/login_rsp.json @@ -0,0 +1,10 @@ +{ + "@odata.type": "#Session.v1_1_1.Session", + "UserName": "ADMIN", + "Description": "Manager User Session", + "@odata.id": "/redfish/v1/SessionService/Sessions/a6cbc1e29e9cd559", + "@odata.context": "/redfish/v1/$metadata#Session.Session", + "Oem": {}, + "Id": "a6cbc1e29e9cd559", + "Name": "User Session" +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/manager_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/manager_rsp.json new file mode 100644 index 000000000..99c1a768a --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/manager_rsp.json @@ -0,0 +1,90 @@ +{ + "@odata.context": "/redfish/v1/$metadata#Manager.Manager", + "@odata.type": "#Manager.v1_5_0.Manager", + "@odata.id": "/redfish/v1/Managers/BMC", + "Id": "BMC", + "Description": "Aspeed BMC", + "Name": "Manager", + "ManagerType": "BMC", + "UUID": "00000000-0000-0000-0000-000000000", + "Model": "P9DSU 9006-22P", + "DateTime": "2019-01-22T06:22:55+00:00", + "DateTimeLocalOffset": "+00:00", + "FirmwareVersion": "2.04", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PowerState": "On", + "SerialConsole": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 1, + "ConnectTypesSupported": [ + "IPMI" + ] + }, + "CommandShell": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 0, + "ConnectTypesSupported": [ + "SSH" + ] + }, + "GraphicalConsole": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 4, + "ConnectTypesSupported": [ + "KVMIP" + ] + }, + "EthernetInterfaces": { + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces" + }, + "SerialInterfaces": { + "@odata.id": "/redfish/v1/Managers/BMC/SerialInterfaces" + }, + "NetworkProtocol": { + "@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol" + }, + "LogServices": { + "@odata.id": "/redfish/v1/Managers/BMC/LogServices" + }, + "VirtualMedia": { + "@odata.id": "/redfish/v1/Managers/BMC/VirtualMedia" + }, + "Links": { + "ManagerForServers": [ + { + "@odata.id": "/redfish/v1/Systems/Computer" + } + ], + "ManagerForChassis": [ + { + "@odata.id": "/redfish/v1/Chassis/Chassis0" + } + ], + "ManagerInChassis": { + "@odata.id": "/redfish/v1/Chassis/Chassis0" + } + }, + "Actions": { + "#Manager.Reset": { + "target": "/redfish/v1/Managers/BMC/Actions/Manager.Reset", + "@Redfish.ActionInfo": "/redfish/v1/Managers/BMC/ResetActionInfo" + } + }, + "Oem": { + "Supermicro": { + "@odata.type": "#SMCManager.v1_0_1.SMCManager", + "FanMode": { + "@odata.id": "/redfish/v1/Managers/BMC/Oem/Supermicro/FanMode" + }, + "MouseMode": { + "@odata.id": "/redfish/v1/Managers/BMC/Oem/Supermicro/MouseMode" + }, + "SMTP": { + "@odata.id": "/redfish/v1/Managers/BMC/Oem/Supermicro/SMTP" + } + } + } +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/manager_rsp_v123.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/manager_rsp_v123.json new file mode 100644 index 000000000..38c406265 --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/manager_rsp_v123.json @@ -0,0 +1,93 @@ +{ + "@odata.context": "/redfish/v1/$metadata#Manager.Manager", + "@odata.type": "#Manager.v1_5_0.Manager", + "@odata.id": "/redfish/v1/Managers/BMC", + "Id": "BMC", + "Description": "Aspeed BMC", + "Name": "Manager", + "ManagerType": "BMC", + "UUID": "006126AB-B608-E911-8000-0CC47AD55B4E", + "Model": "P9DSU 9006-22P", + "DateTime": "2019-01-22T06:22:55+00:00", + "DateTimeLocalOffset": "+00:00", + "FirmwareVersion": "2.04", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PowerState": "On", + "SerialConsole": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 1, + "ConnectTypesSupported": [ + "IPMI" + ] + }, + "CommandShell": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 0, + "ConnectTypesSupported": [ + "SSH" + ] + }, + "GraphicalConsole": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 4, + "ConnectTypesSupported": [ + "KVMIP" + ] + }, + "EthernetInterfaces": { + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces" + }, + "SerialInterfaces": { + "@odata.id": "/redfish/v1/Managers/BMC/SerialInterfaces" + }, + "NetworkProtocol": { + "@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol" + }, + "LogServices": { + "@odata.id": "/redfish/v1/Managers/BMC/LogServices" + }, + "VirtualMedia": { + "@odata.id": "/redfish/v1/Managers/BMC/VirtualMedia" + }, + "Links": { + "ManagerForServers": [ + { + "@odata.id": "/redfish/v1/Systems/Computer" + } + ], + "ManagerForChassis": [ + { + "@odata.id": "/redfish/v1/Chassis/Planar" + } + ], + "ManagerInChassis": { + "@odata.id": "/redfish/v1/Chassis/Planar" + } + }, + "Actions": { + "#Manager.Reset": { + "target": "/redfish/v1/Managers/BMC/Actions/Manager.Reset", + "ResetType@Redfish.AllowableValues": [ + "ForceRestart", + "GracefulRestart" + ] + } + }, + "Oem": { + "Supermicro": { + "@odata.type": "#SMCManager.v1_0_1.SMCManager", + "FanMode": { + "@odata.id": "/redfish/v1/Managers/BMC/Oem/Supermicro/FanMode" + }, + "MouseMode": { + "@odata.id": "/redfish/v1/Managers/BMC/Oem/Supermicro/MouseMode" + }, + "SMTP": { + "@odata.id": "/redfish/v1/Managers/BMC/Oem/Supermicro/SMTP" + } + } + } +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/redfish_v1_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/redfish_v1_rsp.json new file mode 100644 index 000000000..3f6e2f0ca --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/redfish_v1_rsp.json @@ -0,0 +1,42 @@ +{ + "@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot", + "@odata.type": "#ServiceRoot.v1_4_0.ServiceRoot", + "@odata.id": "/redfish/v1", + "Id": "v1", + "Name": "Root Service", + "RedfishVersion": "1.6.0", + "UUID": "00000000-0000-0000-0000-0CC47AD55B4E", + "SessionService": { + "@odata.id": "/redfish/v1/SessionService" + }, + "AccountService": { + "@odata.id": "/redfish/v1/AccountService" + }, + "Registries": { + "@odata.id": "/redfish/v1/Registries" + }, + "JsonSchemas": { + "@odata.id": "/redfish/v1/JsonSchemas" + }, + "Chassis": { + "@odata.id": "/redfish/v1/Chassis" + }, + "Managers": { + "@odata.id": "/redfish/v1/Managers" + }, + "Systems": { + "@odata.id": "/redfish/v1/Systems" + }, + "UpdateService": { + "@odata.id": "/redfish/v1/UpdateService" + }, + "EventService": { + "@odata.id": "/redfish/v1/EventService" + }, + "Links": { + "Sessions": { + "@odata.id": "/redfish/v1/SessionService/Sessions" + } + }, + "Oem": {} +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/system_action_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/system_action_rsp.json new file mode 100644 index 000000000..decbf8cac --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/system_action_rsp.json @@ -0,0 +1,23 @@ +{ + "@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo", + "@odata.type": "#ActionInfo.v1_1_0.ActionInfo", + "@odata.id": "/redfish/v1/Systems/Computer/ResetActionInfo", + "Id": "ResetActionInfo", + "Name": "Reset Action Info", + "Parameters": [ + { + "Name": "ResetType", + "Required": true, + "DataType": "String", + "AllowableValues": [ + "On", + "ForceOff", + "GracefulShutdown", + "GracefulRestart", + "ForceRestart", + "ForceOn" + ] + } + ], + "Oem": {} +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/systems_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/systems_rsp.json new file mode 100644 index 000000000..eee81f42e --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/systems_rsp.json @@ -0,0 +1,79 @@ +{ + "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", + "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", + "@odata.id": "/redfish/v1/Systems/Computer", + "Id": "Computer", + "Name": "OpenPOWER Computer System", + "Description": "OpenPOWER Computer System", + "Status": { + "State": "Enabled", + "Health": "Critical" + }, + "SerialNumber": "C829UAE15A10564", + "PartNumber": "9006-22P", + "Manufacturer": "IBM", + "Model": "SYSTEM", + "SystemType": "Physical", + "BiosVersion": "2.04 20190118", + "UUID": "00000000-0000-0000-0000-0000000000", + "ProcessorSummary": { + "Count": 2, + "Model": "POWER CPU", + "Status": { + "State": "Enabled", + "Health": "OK" + } + }, + "IndicatorLED": "Off", + "PowerState": "On", + "Boot": { + "BootSourceOverrideMode": "Legacy", + "BootSourceOverrideEnabled": "Once", + "BootSourceOverrideTarget": "None", + "BootSourceOverrideTarget@Redfish.AllowableValues": [ + "None", + "Pxe", + "Hdd", + "Diags", + "Cd", + "BiosSetup", + "Usb", + "Floppy" + ] + }, + "HostWatchdogTimer": { + "FunctionEnabled": true, + "WarningAction": "None", + "WarningAction@Redfish.AllowableValues": [ + "None" + ], + "TimeoutAction": "None", + "TimeoutAction@Redfish.AllowableValues": [ + "None", + "ResetSystem", + "PowerDown", + "PowerCycle" + ], + "Status": { + "State": "StandbyOffline" + } + }, + "Links": { + "Chassis": [ + { + "@odata.id": "/redfish/v1/Chassis/chassis0" + } + ], + "ManagedBy": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ] + }, + "Actions": { + "#ComputerSystem.Reset": { + "target": "/redfish/v1/Systems/Computer/Actions/ComputerSystem.Reset", + "@Redfish.ActionInfo": "/redfish/v1/Systems/Computer/ResetActionInfo" + } + } +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/systems_rsp_v123.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/systems_rsp_v123.json new file mode 100644 index 000000000..caee86e6b --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/systems_rsp_v123.json @@ -0,0 +1,86 @@ +{ + "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", + "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", + "@odata.id": "/redfish/v1/Systems/Computer", + "Id": "Computer", + "Name": "OpenPOWER Computer System", + "Description": "OpenPOWER Computer System", + "Status": { + "State": "Enabled", + "Health": "Critical" + }, + "SerialNumber": "C829UAE15A10564", + "PartNumber": "9006-22P", + "Manufacturer": "IBM", + "Model": "SYSTEM", + "SystemType": "Physical", + "BiosVersion": "2.04 20190118", + "UUID": "00000000-0000-0000-0000-0000000000", + "ProcessorSummary": { + "Count": 2, + "Model": "POWER CPU", + "Status": { + "State": "Enabled", + "Health": "OK" + } + }, + "IndicatorLED": "Off", + "PowerState": "On", + "Boot": { + "BootSourceOverrideMode": "Legacy", + "BootSourceOverrideEnabled": "Once", + "BootSourceOverrideTarget": "None", + "BootSourceOverrideTarget@Redfish.AllowableValues": [ + "None", + "Pxe", + "Hdd", + "Diags", + "Cd", + "BiosSetup", + "Usb", + "Floppy" + ] + }, + "HostWatchdogTimer": { + "FunctionEnabled": true, + "WarningAction": "None", + "WarningAction@Redfish.AllowableValues": [ + "None" + ], + "TimeoutAction": "None", + "TimeoutAction@Redfish.AllowableValues": [ + "None", + "ResetSystem", + "PowerDown", + "PowerCycle" + ], + "Status": { + "State": "StandbyOffline" + } + }, + "Links": { + "Chassis": [ + { + "@odata.id": "/redfish/v1/Chassis/chassis0" + } + ], + "ManagedBy": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ] + }, + "Actions": { + "#ComputerSystem.Reset": { + "target": "/redfish/v1/Systems/Computer/Actions/ComputerSystem.Reset", + "ResetType@Redfish.AllowableValues": [ + "On", + "ForceOff", + "GracefulShutdown", + "GracefulRestart", + "ForceRestart", + "ForceOn" + ] + } + } +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/with_error_rsp.json b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/with_error_rsp.json new file mode 100644 index 000000000..95630660b --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/json_data/with_error_rsp.json @@ -0,0 +1,7 @@ +{ + "error": + { + "message": "Successfully Completed Request", + "code": "Base.1.4.0.Success" + } +} diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/__init__.py b/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/test_redfish_client.py b/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/test_redfish_client.py new file mode 100644 index 000000000..0318531c8 --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/test_redfish_client.py @@ -0,0 +1,375 @@ +#!/usr/bin/env python +############################################################################### +# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html +############################################################################### +# -*- coding: utf-8 -*- +# + +import pytest +import mock +import json +import os +import logging +import time +import requests + +from hwctl import redfish_client as rf +from common.utils import Messager +from common.exceptions import SelfClientException, SelfServerException + +DATA_DIR = os.path.dirname(os.path.realpath(__file__)) + '/../json_data' +logging.basicConfig(level=logging.DEBUG) +REDFISH_URL = '/redfish/v1' + +class TestRedfishClient(object): + + nodeinfo_dict = {'bmc': 'testbmc', 'bmcip': '10.0.0.1', 'username': 'username', 'password': 'password'} + log = logging.getLogger('TestRedfishClient') + rf_rest = rf.RedfishRest(name='testnode', nodeinfo=nodeinfo_dict, messager=Messager(), + debugmode=True, verbose=False) + headers = {'Content-Type': 'application/json'} + with open("%s/redfish_v1_rsp.json" % DATA_DIR,'r') as load_f: + rf_v1 = json.load(load_f) + chassis_url = rf_v1['Chassis']['@odata.id'] + manager_url = rf_v1['Managers']['@odata.id'] + systems_url = rf_v1['Systems']['@odata.id'] + session_url = rf_v1['Links']['Sessions']['@odata.id'] + + def test__init__(self): + assert self.rf_rest.name == 'testnode' + assert self.rf_rest.bmc == 'testbmc' + assert self.rf_rest.bmcip == '10.0.0.1' + assert self.rf_rest.username == 'username' + assert self.rf_rest.password == 'password' + assert isinstance(self.rf_rest.messager, Messager) + assert self.rf_rest.verbose == True + assert self.rf_rest.root_url == 'https://10.0.0.1' + + def test__print_record_log(self): + self.rf_rest._print_record_log("test__print_record_log", "test") + assert self.rf_rest.messager.info + assert time.asctime + + def test__print_error_log(self): + self.rf_rest._print_record_log("test__print_error_log", "test") + assert self.rf_rest._print_record_log + + def test__log_request(self): + self.rf_rest._print_record_log = mock.Mock(return_value=True) + login_data = json.dumps({ "UserName": self.rf_rest.username, "Password": self.rf_rest.password }) + msg_data = login_data.replace('"Password": "%s"' % self.rf_rest.password, '"Password": "xxxxxx"') + test_data = json.dumps({ "Test": True }) + login_msg = 'curl -k -X POST -H "Content-Type: application/json" https://10.0.0.1%s -d \'%s\' -v' % (self.session_url, msg_data) + test_data_msg = 'curl -k -X POST -H "Content-Type: application/json" -H "X-Auth-Token: xxxxxx" https://10.0.0.1/redfish/v1/Managers -d \'%s\' -v' % test_data + get_msg = 'curl -k -X GET -H "Content-Type: application/json" -H "X-Auth-Token: xxxxxx" https://10.0.0.1/redfish/v1/Managers' + assert self.rf_rest._log_request('POST', self.rf_rest.root_url + self.session_url, self.headers, data=login_data, cmd='login') == login_msg + assert self.rf_rest._log_request('POST', self.rf_rest.root_url + self.manager_url, self.headers, data=test_data, cmd='test__log_request') == test_data_msg + assert self.rf_rest._log_request('GET', self.rf_rest.root_url + self.manager_url, self.headers, cmd='test__log_request') == get_msg + + def test_handle_response_not_ok(self): + test_rsp = requests.Response() + test_rsp.status_code = 401 + with open("%s/login_no_auth_rsp.json" % DATA_DIR,'r') as load_f: + test_rsp._content = json.dumps(json.load(load_f)) + with pytest.raises(SelfClientException) as excinfo: + data = self.rf_rest.handle_response(test_rsp, cmd='test_handle_response_not_ok') + assert excinfo.type == SelfClientException + assert 'the service received an authorization error unauthorized' in str(excinfo.value) + + def test_handle_response_no_auth(self): + test_rsp = requests.Response() + test_rsp.status_code = 201 + test_rsp.headers = {} + with open("%s/login_rsp.json" % DATA_DIR,'r') as load_f: + test_rsp._content = json.dumps(json.load(load_f)) + with pytest.raises(SelfServerException) as excinfo: + data = self.rf_rest.handle_response(test_rsp, cmd='login') + assert excinfo.type == SelfServerException + assert 'Login Failed: Did not get Session Token from response' in str(excinfo.value) + + def test_handle_response_name(self): + test_rsp = requests.Response() + test_rsp.status_code = 200 + test_rsp.headers = {'X-Auth-Token': 'abcdefghijklmn'} + with open("%s/login_rsp.json" % DATA_DIR,'r') as load_f: + file_data = json.load(load_f) + test_rsp._content = json.dumps(file_data) + data = self.rf_rest.handle_response(test_rsp, cmd='get_information') + assert data == file_data + + def test_handle_response_error(self): + test_rsp = requests.Response() + test_rsp.status_code = 200 + test_rsp.headers = {'X-Auth-Token': 'abcdefghijklmn'} + with open("%s/with_error_rsp.json" % DATA_DIR,'r') as load_f: + file_data = json.load(load_f) + test_rsp._content = json.dumps(file_data) + data = self.rf_rest.handle_response(test_rsp, cmd='get_information') + assert data == file_data + + def test_request_login_connect_failed(self): + login_data = { "UserName": self.rf_rest.username, "Password": self.rf_rest.password } + self.rf_rest.session.request = mock.Mock(side_effect=SelfServerException('Login to BMC failed: Can\'t connect to')) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest.request('POST', self.session_url, headers=self.headers, payload=login_data, cmd='login') + assert excinfo.type == SelfServerException + assert 'Login to BMC failed: Can\'t connect to' in str(excinfo.value) + + def test_request_connect_failed(self): + self.rf_rest.session.request = mock.Mock(side_effect=SelfServerException('BMC did not respond. Validate BMC configuration and retry the command.')) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest.request('GET', self.manager_url, headers=self.headers) + assert excinfo.type == SelfServerException + assert 'BMC did not respond. Validate BMC configuration and retry the command.' in str(excinfo.value) + + def test_request_value_error(self): + self.rf_rest.session.request = mock.Mock(return_value='Mock return value for value error') + self.rf_rest.handle_response = mock.Mock(side_effect=ValueError()) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest.request('GET', self.manager_url, headers=self.headers) + assert excinfo.type == SelfServerException + assert 'Received wrong format response:' in str(excinfo.value) + + def test_request_login_success(self): + login_data = json.dumps({ "UserName": self.rf_rest.username, "Password": self.rf_rest.password }) + with open("%s/login_rsp.json" % DATA_DIR,'r') as load_f: + response = json.load(load_f) + self.rf_rest.session.request = mock.Mock(return_value=None) + self.rf_rest.handle_response = mock.Mock(return_value=response) + data = self.rf_rest.request('POST', self.session_url, headers=self.headers, payload=login_data, cmd='login') + assert self.rf_rest.session.request + assert data == response + + def test_login_success(self): + with open("%s/login_rsp.json" % DATA_DIR,'r') as load_f: + login_rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=login_rsp) + assert self.rf_rest.login() == None + + def test_login_not_respond(self): + self.rf_rest.request = mock.Mock(side_effect=SelfServerException('BMC did not respond. Validate BMC configuration and retry the command.')) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest.login() + assert excinfo.type == SelfServerException + assert 'BMC did not respond. Validate BMC configuration and retry the command.' in str(excinfo.value) + + def test_login_value_error(self): + self.rf_rest.request = mock.Mock(side_effect=SelfServerException('Received wrong format response: xxxxxx')) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest.login() + assert excinfo.type == SelfServerException + assert 'Received wrong format response:' in str(excinfo.value) + + def test__get_members(self): + resp_data = {"Members": [ {"@odata.id": self.manager_url + "/BMC"} ] } + self.rf_rest.request = mock.Mock(return_value=resp_data) + members = self.rf_rest._get_members(self.manager_url) + assert members == [ {"@odata.id": self.manager_url + "/BMC"} ] + + def test__get_members_keyerror(self): + self.rf_rest.request = mock.Mock(return_value={"key": "value"}) + with pytest.raises(SelfServerException) as excinfo: + members = self.rf_rest._get_members(self.manager_url) + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test_get_bmc_state(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.manager_url + "/BMC"} ]) + with open("%s/manager_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + assert self.rf_rest.get_bmc_state() == "On" + + def test_get_bmc_state_keyerror(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.manager_url + "/BMC"} ]) + self.rf_rest.request = mock.Mock(return_value={"powerState": "Off"}) + with pytest.raises(SelfServerException) as excinfo: + resp_data = self.rf_rest.get_bmc_state() + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test_get_chassis_power_state(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.chassis_url + '/MotherBoard'} ]) + with open("%s/chassis_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + assert self.rf_rest.get_chassis_power_state() == 'On' + + def test_get_chassis_power_state_keyerror(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.chassis_url + '/MotherBoard'} ]) + self.rf_rest.request = mock.Mock(return_value={"Powerstate": "On"}) + with pytest.raises(SelfServerException) as excinfo: + resp_data = self.rf_rest.get_chassis_power_state() + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test_get_systems_power_state(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + assert self.rf_rest.get_systems_power_state() == 'On' + + def test_get_systems_power_state_keyerror(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + self.rf_rest.request = mock.Mock(return_value={"powerstate": "On"}) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest.get_systems_power_state() + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test__get_bmc_actions(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.manager_url + '/BMC'} ]) + with open("%s/manager_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + with open("%s/bmc_action_rsp.json" % DATA_DIR,'r') as load_f: + actioninfo = json.load(load_f) + self.rf_rest.request = mock.Mock(side_effect=[rsp, actioninfo]) + reset_string = '#Manager.Reset' + assert self.rf_rest._get_bmc_actions() == (rsp['Actions'][reset_string]['target'], actioninfo['Parameters'][0]['AllowableValues']) + + def test__get_bmc_actions_v123(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.manager_url + '/BMC'} ]) + with open("%s/manager_rsp_v123.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + reset_string = '#Manager.Reset' + assert self.rf_rest._get_bmc_actions() == (rsp['Actions'][reset_string]['target'], rsp['Actions'][reset_string]['ResetType@Redfish.AllowableValues']) + + def test__get_bmc_actions_keyerror(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.manager_url + '/BMC'} ]) + with open("%s/manager_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest._get_bmc_actions() + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test_reboot_bmc(self): + with open("%s/manager_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest._get_bmc_actions = mock.Mock(return_value=(rsp['Actions']['#Manager.Reset']['target'], ['ForceRestart'])) + self.rf_rest.request = mock.Mock(return_value=None) + assert self.rf_rest.reboot_bmc() == None + assert self.rf_rest.request + + def test_reboot_bmc_unsupported(self): + self.rf_rest._get_bmc_actions = mock.Mock(return_value=(self.manager_url + '/BMC/Reset', ['forcerestart'])) + with pytest.raises(SelfClientException) as excinfo: + self.rf_rest.reboot_bmc() + assert excinfo.type == SelfClientException + assert 'Unsupported option:' in str(excinfo.value) + + def test__get_power_actions(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + with open("%s/system_action_rsp.json" % DATA_DIR,'r') as load_f: + actioninfo = json.load(load_f) + self.rf_rest.request = mock.Mock(side_effect=[rsp, actioninfo]) + reset_string = '#ComputerSystem.Reset' + assert self.rf_rest._get_power_actions() == (rsp['Actions'][reset_string]['target'], actioninfo['Parameters'][0]['AllowableValues']) + + def test__get_power_actions_v123(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp_v123.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + reset_string = '#ComputerSystem.Reset' + assert self.rf_rest._get_power_actions() == (rsp['Actions'][reset_string]['target'], rsp['Actions'][reset_string]['ResetType@Redfish.AllowableValues']) + + def test__get_power_actions_keyerror(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest._get_power_actions() + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test_set_power_state(self): + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + with open("%s/system_action_rsp.json" % DATA_DIR,'r') as load_f: + actioninfo = json.load(load_f) + reset_string = '#ComputerSystem.Reset' + self.rf_rest._get_power_actions = mock.Mock(return_value=(rsp['Actions'][reset_string]['target'], actioninfo['Parameters'][0]['AllowableValues'])) + self.rf_rest.request = mock.Mock(return_value=None) + assert self.rf_rest.set_power_state('on') == None + assert self.rf_rest.request + + def test_set_power_state_unsupported(self): + self.rf_rest._get_power_actions = mock.Mock(return_value=(self.systems_url + '/Computer/Reset', ['ForceRestart', 'ForceOff'])) + with pytest.raises(SelfClientException) as excinfo: + self.rf_rest.set_power_state('on') + assert excinfo.type == SelfClientException + assert 'Unsupported option:' in str(excinfo.value) + + def test_get_boot_state(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + assert self.rf_rest.get_boot_state() == "boot override inactive" + rsp['Boot']['BootSourceOverrideTarget'] = 'Pxe' + self.rf_rest.request = mock.Mock(return_value=rsp) + assert self.rf_rest.get_boot_state() == 'Network' + rsp['Boot']['BootSourceOverrideEnabled'] = 'Disabled' + self.rf_rest.request = mock.Mock(return_value=rsp) + assert self.rf_rest.get_boot_state() == "boot override inactive" + + def test_get_boot_state_keyerror(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + del rsp['Boot']['BootSourceOverrideEnabled'] + self.rf_rest.request = mock.Mock(return_value=rsp) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest.get_boot_state() + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test__get_boot_actions(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest.request = mock.Mock(return_value=rsp) + assert self.rf_rest._get_boot_actions() == (self.systems_url + '/Computer', rsp['Boot']['BootSourceOverrideTarget@Redfish.AllowableValues']) + + def test__get_boot_actions_keyerror(self): + self.rf_rest._get_members = mock.Mock(return_value=[ {"@odata.id": self.systems_url + '/Computer'} ]) + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + del rsp['Boot']['BootSourceOverrideTarget@Redfish.AllowableValues'] + self.rf_rest.request = mock.Mock(return_value=rsp) + with pytest.raises(SelfServerException) as excinfo: + self.rf_rest._get_boot_actions() + assert excinfo.type == SelfServerException + assert 'Get KeyError' in str(excinfo.value) + + def test_set_boot_state(self): + with open("%s/systems_rsp.json" % DATA_DIR,'r') as load_f: + rsp = json.load(load_f) + self.rf_rest._get_boot_actions = mock.Mock(return_value=(self.systems_url + '/Computer', rsp['Boot']['BootSourceOverrideTarget@Redfish.AllowableValues'])) + self.rf_rest.request = mock.Mock(return_value=None) + assert self.rf_rest.set_boot_state(False, 'def') == None + assert self.rf_rest.request + assert self.rf_rest.set_boot_state(True, 'cd') == None + assert self.rf_rest.request + + def test_set_boot_state_unsupported(self): + allow_values = ['cd','def'] + self.rf_rest._get_boot_actions = mock.Mock(return_value=(self.systems_url + '/Computer', allow_values)) + with pytest.raises(SelfClientException) as excinfo: + self.rf_rest.set_boot_state(False, 'hd') + assert excinfo.type == SelfClientException + assert 'Unsupported option:' in str(excinfo.value) + +def test_init_no_bmcip(): + nodeinfo_dict = {'bmc': 'testbmc', 'username': 'username', 'password': 'password'} + rf_rest_new = rf.RedfishRest(name='testnode', nodeinfo=nodeinfo_dict, messager=Messager(), + debugmode=True, verbose=False) + + assert rf_rest_new.bmcip == 'testnode' diff --git a/xCAT-server/lib/xcat/plugins/ddns.pm b/xCAT-server/lib/xcat/plugins/ddns.pm index 229462157..556a217b8 100644 --- a/xCAT-server/lib/xcat/plugins/ddns.pm +++ b/xCAT-server/lib/xcat/plugins/ddns.pm @@ -785,7 +785,7 @@ sub process_request { "Update Named Conf dir $ctx->{dbdir} $ctx->{zonesdir}"; xCAT::MsgUtils->message("I", $rsp, $callback); } - + $ctx->{forwardmode} = get_forwardmode(); update_namedconf($ctx, $slave); unless ($slave) @@ -935,6 +935,27 @@ sub get_zonesdir { return "$ZonesDir"; } +sub get_forwardmode { + my $forwardmode; + my @entries = xCAT::TableUtils->get_site_attribute("dnsforwardmode"); + my $site_entry = $entries[0]; + if (defined($site_entry)) { + if ($site_entry =~ /^only$|^first$/) { + $forwardmode = $site_entry; + } elsif ($site_entry =~ /^no$/) { + $forwardmode = "" + }else { + my $rsp = {}; + $rsp->{data}->[0] = "forward mode $site_entry is not supported, supported value: only, first, no."; + xCAT::MsgUtils->message("S", "forward mode $site_entry is not supported, supported value: only, first, no."); + xCAT::MsgUtils->message("W", $rsp, $callback); + return; + } + } + return "$forwardmode"; +} + + sub get_conf { my $conf = "/etc/named.conf"; @@ -1114,6 +1135,8 @@ sub update_namedconf { push @newnamed, "\t\t" . $_ . ";\n"; } push @newnamed, "\t};\n"; + } elsif ($ctx->{forwardmode} and $line =~ /forward/) { + push @newnamed, "\tforward " . $ctx->{forwardmode} . ";\n"; } elsif ($ctx->{empty_zones_enable} and $line =~ /empty-zones-enable/) { push @newnamed, "\tempty-zones-enable " . $ctx->{empty_zones_enable} . ";\n"; } elsif ($ctx->{slaves} and $line =~ /allow-transfer \{/) { @@ -1255,6 +1278,10 @@ sub update_namedconf { push @newnamed, "\t};\n"; } + if ($ctx->{forwardmode}){ + push @newnamed, "\tforward " . $ctx->{forwardmode} . ";\n"; + } + if ($ctx->{empty_zones_enable}){ push @newnamed, "\tempty-zones-enable " . $ctx->{empty_zones_enable} . ";\n"; } diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 8245b28d1..3ab6cf491 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -610,7 +610,7 @@ sub addnode $hname = $node; } #Default to hostname equal to nodename unless ($mac) { next; } #Skip corrupt format - if ($mac !~ /^[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}$|^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$/) + if ($mac !~ /^[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5,7}$|^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5,7}$/) { $callback->( { @@ -764,6 +764,10 @@ sub addnode $hostname = $1 . "-hf" . $count; } } + } elsif (length($mac) == 23) { # 8 bytes of mac address + # Currently the only thing that has 8 bytes is an infiniband + # or infiniband like device, which is type 32 (0x20). + $hardwaretype = 32; } #syslog("local4|err", "Setting $node ($hname|$ip) to " . $mac); diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 79487429e..7054fb6b3 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -937,14 +937,12 @@ sub mkinstall # trim the "/" in /install/sles11.3/x86_64/ $pkgdir =~ s/\/$//; - if ($pkgdir =~ /^($installroot\/$os\/$arch)$/) { - if ( -d "$pkgdir/2") { - $srcdirs[0] = "$pkgdir/1,$pkgdir/2"; - }else{ - $srcdirs[0] = "$pkgdir/1"; - } - $tmppkgdir = join(",", @srcdirs); + if ( -d "$pkgdir/2") { + $srcdirs[0] = "$pkgdir/1,$pkgdir/2"; + }else{ + $srcdirs[0] = "$pkgdir/1"; } + $tmppkgdir = join(",", @srcdirs); #Call the Template class to do substitution to produce a kickstart file in the autoinst dir my $tmperr; diff --git a/xCAT-server/xCAT-wsapi/xcatws-test.py b/xCAT-server/xCAT-wsapi/xcatws-test.py index 7fa06322a..2f37126cf 100755 --- a/xCAT-server/xCAT-wsapi/xcatws-test.py +++ b/xCAT-server/xCAT-wsapi/xcatws-test.py @@ -77,20 +77,20 @@ except Exception as e: # # Send a request to get all nodes, passing in user and password # -all_nodes = requests.get(get_all_nodes + "?userName=" + username + "&userPW=" + password, verify=False) +response = requests.get(get_all_nodes + "?userName=" + username + "&userPW=" + password, verify=False) # Display returned data print "List of all nodes extracted with userid and password:" -print all_nodes.content +print response.text # # Send a request to get all nodes, passing in a token # user_data = {'userName': username,'userPW': password} token = requests.post(get_token, verify=False, headers={'Content-Type': 'application/json'}, data=json.dumps(user_data)) -all_nodes = requests.get(get_all_nodes, verify=False, headers={'X-Auth-Token': token.json()['token']['id']}) +response = requests.get(get_all_nodes, verify=False, headers={'X-Auth-Token': token.json()['token']['id']}) # Display returned data print "List of all nodes extracted with authentication token:" -print all_nodes.content +print response.text sys.exit(0) diff --git a/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle b/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle index 2ffd3fd2d..9f8403be7 100644 --- a/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle @@ -311,7 +311,6 @@ makentp_v makentp_h nodeset_check_warninginfo runcmdinstaller_h -runcmdinstaller_command get_xcat_postscripts_loginfo updatenode_postscripts_loginfo bmcdiscover_h diff --git a/xCAT-test/autotest/bundle/rhels_ppc_daily.bundle b/xCAT-test/autotest/bundle/rhels_ppc_daily.bundle new file mode 100644 index 000000000..ef275ad8e --- /dev/null +++ b/xCAT-test/autotest/bundle/rhels_ppc_daily.bundle @@ -0,0 +1,303 @@ +SN_setup_case +reg_linux_diskless_installation_hierarchy +reg_linux_diskfull_installation_hierarchy +updatenode_P_script1 +updatenode_P_script1_script2 +updatenode_P_script2 +updatenode_diskful_syncfiles +updatenode_diskful_syncfiles_P_script1 +updatenode_diskful_syncfiles_dir +updatenode_diskful_syncfiles_failing +updatenode_diskful_syncfiles_multi_files +updatenode_diskful_syncfiles_rename +updatenode_f_incompatible_flags +updatenode_h +updatenode_k_incompatible_flags +updatenode_postscripts_loginfo +updatenode_script3 +updatenode_syncfile_APPEND +updatenode_syncfile_EXECUTE +updatenode_syncfile_EXECUTEALWAYS +updatenode_syncfile_MERGE +updatenode_v +updatenode_without_flag +updatenode_without_options +xdcp_nonroot_user +xdcp_src_dst +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_i_linux +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t +assign_certain_command_permission +chdef_dynamic_group +chdef_group +chdef_group_p +chdef_m +chdef_multiple_keys +chdef_n +chdef_nicips +chdef_null +chdef_p +chdef_site_check +chdef_t_network +chdef_t_node +chdef_t_o_error +chdef_z +chtab_d +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +disable_root_permission_in_policy_table +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +gettab_H +gettab_err +gettab_h +gettab_key_table +getmacs_d +getmacs_f_D +getmacs_noderange +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lslite_h +lslite_i +lslite_noderange +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a +makedhcp_a_d +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns +makedns_d_node +makedns_h +makedns_n +makedns_n_noderange +makehost_n_r +makehosts_d +makehosts_h +makehosts_help +makehosts_l +makehosts_n +makehosts_n_noderange +makehosts_null +makeknownhosts_node_d +makentp_h +makentp_v +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_rhels73 +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderange_10-20 +noderange_XCAT_NODE_PREFIX +noderange_XCAT_NODE_SUFFIX +noderange_exclusion +noderange_group1-group3 +noderange_group_intersection +noderange_individual_grp +noderange_individual_node +noderange_node01-node10 +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_check_warninginfo +nodeset_errorcommand +nodeset_grub2 +nodeset_noderange +nodeset_yaboot +nodeset_stat +nodestat_err_node +nodestat_usage +packimage_h +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rinv_all +rinv_bus +rinv_config +rinv_firm +rinv_model +rinv_serial +rinv_noderange_err +rmdef_null +rmdef_t_err +rpower_boot +rpower_err_noderange +rpower_noderange +rpower_noderange_nodeps +rpower_off +rpower_on +rpower_stat +rscan_noderange +rscan_w +rscan_x +rscan_x_w +rscan_z +rscan_z_w +run_command_with_XCATBYPASS +runcmdinstaller_h +rvitals_all +rvitals_lcds +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_p_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +xcatconfig_c +xcatconfig_u_check_xcatsslversion_rhels_sles +xcatd_restart +xcatd_start +xcatd_stop +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab diff --git a/xCAT-test/autotest/bundle/rhels_ppc_weekly.bundle b/xCAT-test/autotest/bundle/rhels_ppc_weekly.bundle new file mode 100644 index 000000000..f523dfe2f --- /dev/null +++ b/xCAT-test/autotest/bundle/rhels_ppc_weekly.bundle @@ -0,0 +1,71 @@ +#INCLUDE:rhels_ppc_daily.bundle# +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +packimage_o_p_a_m +reg_linux_statelite_installation_hierarchy_by_nfs +reg_linux_statelite_installation_hierarchy_by_ramdisk +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 +bmcdiscover_h +bmcdiscover_nmap_range +bmcdiscover_v +bmcdiscover_range_w +bmcdiscover_range_z +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +confignetwork_static_installnic +get_xcat_postscripts_loginfo +reg_linux_diskfull_installation_flat +reg_linux_diskless_installation_flat +reg_linux_statelite_installation_flat +rmimage_diskless +rpower_reset +runcmdinstaller_command +redhat_migration1 +redhat_migration2 diff --git a/xCAT-test/autotest/bundle/rhels_ppcle_daily.bundle b/xCAT-test/autotest/bundle/rhels_ppcle_daily.bundle new file mode 100644 index 000000000..ac66a4213 --- /dev/null +++ b/xCAT-test/autotest/bundle/rhels_ppcle_daily.bundle @@ -0,0 +1,305 @@ +SN_setup_case +reg_linux_diskless_installation_hierarchy +reg_linux_diskfull_installation_hierarchy +updatenode_P_script1 +updatenode_P_script1_script2 +updatenode_P_script2 +updatenode_diskful_syncfiles +updatenode_diskful_syncfiles_P_script1 +updatenode_diskful_syncfiles_dir +updatenode_diskful_syncfiles_failing +updatenode_diskful_syncfiles_multi_files +updatenode_diskful_syncfiles_rename +updatenode_f_incompatible_flags +updatenode_h +updatenode_k_incompatible_flags +updatenode_postscripts_loginfo +updatenode_script3 +updatenode_syncfile_APPEND +updatenode_syncfile_EXECUTE +updatenode_syncfile_EXECUTEALWAYS +updatenode_syncfile_MERGE +updatenode_v +updatenode_without_flag +updatenode_without_options +xdcp_nonroot_user +xdcp_src_dst +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_i_linux +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t +assign_certain_command_permission +chdef_dynamic_group +chdef_group +chdef_group_p +chdef_m +chdef_multiple_keys +chdef_n +chdef_nicips +chdef_null +chdef_p +chdef_site_check +chdef_t_network +chdef_t_node +chdef_t_o_error +chdef_z +chtab_d +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_2eth_bridge_br0 +confignetwork_2eth_bridge_br22_br33 +confignetwork__bridge_false +confignetwork_bond_eth2_eth3 +confignetwork_bond_false +confignetwork_disable_set_to_1 +confignetwork_disable_set_to_yes +confignetwork_installnic_2eth_bridge_br22_br33 +confignetwork_niccustomscripts +confignetwork_s_installnic_secondarynic_updatenode +confignetwork_secondarynic_nicaliases_updatenode +confignetwork_secondarynic_nicextraparams_updatenode +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +confignetwork_secondarynic_thirdnic_multiplevalue_updatenode +confignetwork_secondarynic_updatenode +confignetwork_vlan_bond +confignetwork_vlan_eth0 +confignetwork_vlan_false +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +disable_root_permission_in_policy_table +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +gettab_H +gettab_err +gettab_h +gettab_key_table +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lslite_h +lslite_i +lslite_noderange +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a +makedhcp_a_d +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns +makedns_d_node +makedns_h +makedns_n +makedns_n_noderange +makehost_n_r +makehosts_d +makehosts_h +makehosts_help +makehosts_l +makehosts_n +makehosts_n_noderange +makehosts_null +makeknownhosts_node_d +makentp_h +makentp_v +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_rhels73 +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderange_10-20 +noderange_XCAT_NODE_PREFIX +noderange_XCAT_NODE_SUFFIX +noderange_exclusion +noderange_group1-group3 +noderange_group_intersection +noderange_individual_grp +noderange_individual_node +noderange_node01-node10 +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_check_warninginfo +nodeset_disjointdhcps_petitboot +nodeset_errorcommand +nodeset_grub2 +nodeset_noderange +nodeset_petitboot +nodeset_shell_incorrectmasterip +nodeset_stat +nodestat_err_node +nodestat_usage +packimage_h +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rinv_noderange_err +rmdef_null +rmdef_t_err +rpower_boot +rpower_err_noderange +rpower_noderange +rpower_noderange_nodeps +rpower_off +rpower_on +rpower_stat +run_command_with_XCATBYPASS +runcmdinstaller_h +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_p_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +xcatconfig_c +xcatconfig_u_check_xcatsslversion_rhels_sles +xcatd_restart +xcatd_start +xcatd_stop +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab diff --git a/xCAT-test/autotest/bundle/rhels_ppcle_weekly.bundle b/xCAT-test/autotest/bundle/rhels_ppcle_weekly.bundle new file mode 100644 index 000000000..52df8ce98 --- /dev/null +++ b/xCAT-test/autotest/bundle/rhels_ppcle_weekly.bundle @@ -0,0 +1,74 @@ +#INCLUDE:rhels_ppcle_daily.bundle# +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +packimage_o_p_a_m +reg_linux_statelite_installation_hierarchy_by_nfs +reg_linux_statelite_installation_hierarchy_by_ramdisk +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 +bmcdiscover_h +bmcdiscover_nmap_range +bmcdiscover_v +bmcdiscover_range_w +bmcdiscover_range_z +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +confignetwork_static_installnic +get_xcat_postscripts_loginfo +nodeset_cmdline +nodeset_runimg +nodeset_shell +reg_linux_diskfull_installation_flat +reg_linux_diskless_installation_flat +reg_linux_statelite_installation_flat +rmimage_diskless +rpower_reset +runcmdinstaller_command +redhat_migration1 +redhat_migration2 diff --git a/xCAT-test/autotest/bundle/rhels_x86_daily.bundle b/xCAT-test/autotest/bundle/rhels_x86_daily.bundle new file mode 100644 index 000000000..fe78b52d0 --- /dev/null +++ b/xCAT-test/autotest/bundle/rhels_x86_daily.bundle @@ -0,0 +1,304 @@ +SN_setup_case +reg_linux_diskless_installation_hierarchy +reg_linux_diskfull_installation_hierarchy +updatenode_P_script1 +updatenode_P_script1_script2 +updatenode_P_script2 +updatenode_diskful_syncfiles +updatenode_diskful_syncfiles_P_script1 +updatenode_diskful_syncfiles_dir +updatenode_diskful_syncfiles_failing +updatenode_diskful_syncfiles_multi_files +updatenode_diskful_syncfiles_rename +updatenode_f_incompatible_flags +updatenode_h +updatenode_k_incompatible_flags +updatenode_postscripts_loginfo +updatenode_script3 +updatenode_syncfile_APPEND +updatenode_syncfile_EXECUTE +updatenode_syncfile_EXECUTEALWAYS +updatenode_syncfile_MERGE +updatenode_v +updatenode_without_flag +updatenode_without_options +xdcp_nonroot_user +xdcp_src_dst +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_i_linux +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t +assign_certain_command_permission +chdef_dynamic_group +chdef_group +chdef_group_p +chdef_m +chdef_multiple_keys +chdef_n +chdef_nicips +chdef_null +chdef_p +chdef_site_check +chdef_t_network +chdef_t_node +chdef_t_o_error +chdef_z +chtab_d +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_2eth_bridge_br0 +confignetwork_2eth_bridge_br22_br33 +confignetwork__bridge_false +confignetwork_bond_eth2_eth3 +confignetwork_bond_false +confignetwork_disable_set_to_1 +confignetwork_disable_set_to_yes +confignetwork_installnic_2eth_bridge_br22_br33 +confignetwork_niccustomscripts +confignetwork_s_installnic_secondarynic_updatenode +confignetwork_secondarynic_nicaliases_updatenode +confignetwork_secondarynic_nicextraparams_updatenode +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +confignetwork_secondarynic_thirdnic_multiplevalue_updatenode +confignetwork_secondarynic_updatenode +confignetwork_vlan_bond +confignetwork_vlan_eth0 +confignetwork_vlan_false +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +disable_root_permission_in_policy_table +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +gettab_H +gettab_err +gettab_h +gettab_key_table +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lslite_h +lslite_i +lslite_noderange +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a +makedhcp_a_d +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns +makedns_d_node +makedns_h +makedns_n +makedns_n_noderange +makehost_n_r +makehosts_d +makehosts_h +makehosts_help +makehosts_l +makehosts_n +makehosts_n_noderange +makehosts_null +makeknownhosts_node_d +makentp_h +makentp_v +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_rhels73 +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderange_10-20 +noderange_XCAT_NODE_PREFIX +noderange_XCAT_NODE_SUFFIX +noderange_exclusion +noderange_group1-group3 +noderange_group_intersection +noderange_individual_grp +noderange_individual_node +noderange_node01-node10 +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_check_warninginfo +nodeset_errorcommand +nodeset_xnba +nodeset_noderange +nodeset_shell_incorrectmasterip +nodeset_stat +nodestat_err_node +nodestat_noderange +nodestat_usage +packimage_h +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rinv_noderange_err +rmdef_null +rmdef_t_err +rpower_boot +rpower_err_noderange +rpower_noderange +rpower_noderange_nodeps +rpower_off +rpower_on +rpower_stat +run_command_with_XCATBYPASS +runcmdinstaller_h +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_p_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +xcatconfig_c +xcatconfig_u_check_xcatsslversion_rhels_sles +xcatd_restart +xcatd_start +xcatd_stop +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab diff --git a/xCAT-test/autotest/bundle/rhels_x86_weekly.bundle b/xCAT-test/autotest/bundle/rhels_x86_weekly.bundle new file mode 100644 index 000000000..a06f89c06 --- /dev/null +++ b/xCAT-test/autotest/bundle/rhels_x86_weekly.bundle @@ -0,0 +1,74 @@ +#INCLUDE:rhels_x86_daily.bundle# +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +packimage_o_p_a_m +reg_linux_statelite_installation_hierarchy_by_nfs +reg_linux_statelite_installation_hierarchy_by_ramdisk +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 +bmcdiscover_h +bmcdiscover_nmap_range +bmcdiscover_v +bmcdiscover_range_w +bmcdiscover_range_z +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +confignetwork_static_installnic +get_xcat_postscripts_loginfo +nodeset_cmdline +nodeset_runimg +nodeset_shell +reg_linux_diskfull_installation_flat +reg_linux_diskless_installation_flat +reg_linux_statelite_installation_flat +rmimage_diskless +rpower_reset +runcmdinstaller_command +redhat_migration1 +redhat_migration2 diff --git a/xCAT-test/autotest/bundle/sles_ppc_daily.bundle b/xCAT-test/autotest/bundle/sles_ppc_daily.bundle new file mode 100644 index 000000000..2a9377444 --- /dev/null +++ b/xCAT-test/autotest/bundle/sles_ppc_daily.bundle @@ -0,0 +1,282 @@ +SN_setup_case +reg_linux_diskless_installation_hierarchy +reg_linux_diskfull_installation_hierarchy +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +xdcp_nonroot_user +xdcp_src_dst +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t +chdef_dynamic_group +chdef_group +chdef_group_p +chdef_m +chdef_multiple_keys +chdef_n +chdef_nicips +chdef_null +chdef_p +chdef_site_check +chdef_t_network +chdef_t_node +chdef_t_o_error +chdef_z +chtab_d +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +confignetwork_static_installnic +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +getmacs_d +getmacs_f_D +getmacs_noderange +gettab_H +gettab_err +gettab_h +gettab_key_table +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lslite_h +lslite_i +lslite_noderange +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a +makedhcp_a_d +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns +makedns_d_node +makedns_h +makedns_n +makedns_n_noderange +makehost_n_r +makehosts_d +makehosts_h +makehosts_help +makehosts_l +makehosts_n +makehosts_n_noderange +makehosts_null +makeknownhosts_node_d +makentp_h +makentp_v +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderange_10-20 +noderange_XCAT_NODE_PREFIX +noderange_XCAT_NODE_SUFFIX +noderange_exclusion +noderange_group1-group3 +noderange_group_intersection +noderange_individual_grp +noderange_individual_node +noderange_node01-node10 +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_check_warninginfo +nodeset_errorcommand +nodeset_grub2 +nodeset_noderange +nodeset_stat +nodeset_yaboot +nodestat_err_node +nodestat_usage +packimage_h +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rinv_all +rinv_bus +rinv_config +rinv_firm +rinv_model +rinv_noderange_err +rinv_serial +rmdef_null +rmdef_t_err +rmimage_diskless +rpower_boot +rpower_err_noderange +rpower_noderange +rpower_noderange_nodeps +rpower_off +rpower_on +rpower_reset +rpower_stat +rscan_noderange +rscan_w +rscan_x +rscan_x_w +rscan_z +rscan_z_w +rvitals_all +rvitals_lcds +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_p_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +updatenode_diskful_syncfiles_failing +xcatconfig_c +xcatconfig_u_check_xcatsslversion_rhels_sles +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab diff --git a/xCAT-test/autotest/bundle/sles_ppc_weekly.bundle b/xCAT-test/autotest/bundle/sles_ppc_weekly.bundle new file mode 100644 index 000000000..898f66a67 --- /dev/null +++ b/xCAT-test/autotest/bundle/sles_ppc_weekly.bundle @@ -0,0 +1,14 @@ +#INCLUDE:sles_ppc_daily.bundle# +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +packimage_o_p_a_m +reg_linux_statelite_installation_hierarchy_by_nfs +reg_linux_statelite_installation_hierarchy_by_ramdisk +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_ppcle_daily.bundle b/xCAT-test/autotest/bundle/sles_ppcle_daily.bundle new file mode 100644 index 000000000..bb7201f9c --- /dev/null +++ b/xCAT-test/autotest/bundle/sles_ppcle_daily.bundle @@ -0,0 +1,250 @@ +SN_setup_case +reg_linux_diskless_installation_hierarchy +reg_linux_diskfull_installation_hierarchy +assign_certain_command_permission +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +xdcp_nonroot_user +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_i_linux +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t +chdef_nicips +chdef_null +chdef_site_check +chdef_t_o_error +chdef_z +chtab_d +chtab_err_symble +chtab_err_table +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_disable_set_to_1 +confignetwork_disable_set_to_yes +confignetwork_niccustomscripts +confignetwork_s_installnic_secondarynic_updatenode +confignetwork_secondarynic_nicaliases_updatenode +confignetwork_secondarynic_nicextraparams_updatenode +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +confignetwork_secondarynic_thirdnic_multiplevalue_updatenode +confignetwork_secondarynic_updatenode +confignetwork_static_installnic +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +disable_root_permission_in_policy_table +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +gettab_H +gettab_err +gettab_h +gettab_key_table +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lslite_h +lslite_i +lslite_noderange +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a +makedhcp_a_d +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns +makedns_d_node +makedns_n +makedns_n_noderange +makehost_n_r +makehosts_h +makehosts_help +makehosts_n +makehosts_n_noderange +makeknownhosts_node_d +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_check_warninginfo +nodeset_disjointdhcps_petitboot +nodeset_errorcommand +nodeset_noderange +nodeset_shell_incorrectmasterip +nodeset_stat +nodeset_grub2 +nodeset_petitboot +nodestat_err_node +nodestat_noderange +nodestat_usage +packimage_h +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rinv_noderange_err +rmdef_null +rmdef_t_err +rmimage_diskless +rpower_err_noderange +run_command_with_XCATBYPASS +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +updatenode_diskful_syncfiles_failing +xcatconfig_c +xcatconfig_u_check_xcatsslversion_rhels_sles +xcatd_restart +xcatd_start +xcatd_stop +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab diff --git a/xCAT-test/autotest/bundle/sles_ppcle_weekly.bundle b/xCAT-test/autotest/bundle/sles_ppcle_weekly.bundle new file mode 100644 index 000000000..08534fe14 --- /dev/null +++ b/xCAT-test/autotest/bundle/sles_ppcle_weekly.bundle @@ -0,0 +1,21 @@ +#INCLUDE:sles_ppcle_daily.bundle# +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_m_tar_c_gzip +packimage_m_tar_c_pigz +packimage_m_tar_c_xz +packimage_o_p_a_m +reg_linux_statelite_installation_hierarchy_by_nfs +reg_linux_statelite_installation_hierarchy_by_ramdisk +nodeset_cmdline +nodeset_runimg +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 new file mode 100644 index 000000000..d90a2bfd5 --- /dev/null +++ b/xCAT-test/autotest/bundle/sles_x86_daily.bundle @@ -0,0 +1,248 @@ +SN_setup_case +reg_linux_diskless_installation_hierarchy +reg_linux_diskfull_installation_hierarchy +assign_certain_command_permission +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +xdcp_nonroot_user +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_i_linux +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t +chdef_nicips +chdef_null +chdef_site_check +chdef_t_o_error +chdef_z +chtab_d +chtab_err_symble +chtab_err_table +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_disable_set_to_1 +confignetwork_disable_set_to_yes +confignetwork_niccustomscripts +confignetwork_s_installnic_secondarynic_updatenode +confignetwork_secondarynic_nicaliases_updatenode +confignetwork_secondarynic_nicextraparams_updatenode +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +confignetwork_secondarynic_thirdnic_multiplevalue_updatenode +confignetwork_secondarynic_updatenode +confignetwork_static_installnic +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +disable_root_permission_in_policy_table +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +gettab_H +gettab_err +gettab_h +gettab_key_table +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lslite_h +lslite_i +lslite_noderange +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a +makedhcp_a_d +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns +makedns_d_node +makedns_n +makedns_n_noderange +makehost_n_r +makehosts_h +makehosts_help +makehosts_n +makehosts_n_noderange +makeknownhosts_node_d +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_check_warninginfo +nodeset_errorcommand +nodeset_noderange +nodeset_shell_incorrectmasterip +nodeset_stat +nodeset_xnba +nodestat_err_node +nodestat_noderange +nodestat_usage +packimage_h +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rinv_noderange_err +rmdef_null +rmdef_t_err +rmimage_diskless +rpower_err_noderange +run_command_with_XCATBYPASS +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +updatenode_diskful_syncfiles_failing +xcatconfig_c +xcatconfig_u_check_xcatsslversion_rhels_sles +xcatd_restart +xcatd_start +xcatd_stop +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab diff --git a/xCAT-test/autotest/bundle/sles_x86_weekly.bundle b/xCAT-test/autotest/bundle/sles_x86_weekly.bundle new file mode 100644 index 000000000..f6928afe4 --- /dev/null +++ b/xCAT-test/autotest/bundle/sles_x86_weekly.bundle @@ -0,0 +1,21 @@ +#INCLUDE:sles_x86_daily.bundle# +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_m_tar_c_gzip +packimage_m_tar_c_pigz +packimage_m_tar_c_xz +packimage_o_p_a_m +reg_linux_statelite_installation_hierarchy_by_nfs +reg_linux_statelite_installation_hierarchy_by_ramdisk +nodeset_cmdline +nodeset_runimg +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 new file mode 100644 index 000000000..b1cc64c19 --- /dev/null +++ b/xCAT-test/autotest/bundle/ubuntu_ppcle_daily.bundle @@ -0,0 +1,229 @@ +reg_linux_diskless_installation_flat +reg_linux_diskfull_installation_flat +assign_certain_command_permission +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +chdef_nicips +chdef_null +chdef_site_check +chdef_t_o_error +chdef_z +chtab_d +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +confignetwork_static_installnic +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +disable_root_permission_in_policy_table +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +gettab_H +gettab_err +gettab_h +gettab_key_table +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a_ubuntu +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns_d_node +makedns_n_noderange +makedns_ubuntu_n +makehost_n_r +makehosts_h +makehosts_help +makehosts_n +makehosts_n_noderange +makeknownhosts_node_d +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_errorcommand +nodeset_check_warninginfo +nodeset_grub2 +nodeset_noderange +nodeset_petitboot +nodeset_shell_incorrectmasterip +nodeset_stat +nodestat_err_node +nodestat_usage +packimage_h +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rmdef_null +rmdef_t_err +rpower_err_noderange +run_command_with_XCATBYPASS +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +updatenode_diskful_syncfiles_failing +xcatconfig_c +xcatconfig_u_check_xcatsslversion_ubuntu +xcatd_restart +xcatd_start +xcatd_stop +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab +xdcp_nonroot_user +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t diff --git a/xCAT-test/autotest/bundle/ubuntu_ppcle_weekly.bundle b/xCAT-test/autotest/bundle/ubuntu_ppcle_weekly.bundle new file mode 100644 index 000000000..f45b09f29 --- /dev/null +++ b/xCAT-test/autotest/bundle/ubuntu_ppcle_weekly.bundle @@ -0,0 +1,16 @@ +#INCLUDE:ubuntu_ppcle_daily.bundle# +nodeset_cmdline +nodeset_runimg +nodeset_shell +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_m_tar_c_gzip +packimage_m_tar_c_pigz +packimage_m_tar_c_xz +packimage_o_p_a_m +rmimage_diskless +ubuntu_migration2_p8le diff --git a/xCAT-test/autotest/bundle/ubuntu_x86_daily.bundle b/xCAT-test/autotest/bundle/ubuntu_x86_daily.bundle new file mode 100644 index 000000000..52fc1f477 --- /dev/null +++ b/xCAT-test/autotest/bundle/ubuntu_x86_daily.bundle @@ -0,0 +1,229 @@ +reg_linux_diskless_installation_flat +reg_linux_diskfull_installation_flat +assign_certain_command_permission +bmcdiscover_help +bmcdiscover_q +bmcdiscover_version +chdef_nicips +chdef_null +chdef_site_check +chdef_t_o_error +chdef_z +chtab_d +chtab_h +chtab_modify_key +chtab_modify_node +chtab_null +chtab_v +confignetwork_secondarynic_nicips_updatenode_false +confignetwork_secondarynic_nicnetworks_updatenode_false +confignetwork_secondarynic_nictype_updatenode_false +confignetwork_static_installnic +copycds_a +copycds_a_err +copycds_iso +copycds_n +copycds_n_a +copycds_n_err +disable_root_permission_in_policy_table +dumpxCATdb_a_p_nullskiptables +dumpxCATdb_a_p_nullskiptables_V +dumpxCATdb_a_p_skiptables +dumpxCATdb_h +dumpxCATdb_p_V +dumpxCATdb_p_nullskiptables +dumpxCATdb_p_nullskiptables_V +dumpxCATdb_p_skiptables +dumpxCATdb_v +encrypted_passwd_md5_diskfull +encrypted_passwd_openssl_diskfull +encrypted_passwd_sha256_diskfull +encrypted_passwd_sha512_diskfull +gettab_H +gettab_err +gettab_h +gettab_key_table +lsdef_a +lsdef_null +lsdef_t +lsdef_t_err +lsdef_t_i_o +lsdef_t_o_l +lsdef_t_o_l_z +lsdef_t_w +lsxcatd_a +lsxcatd_d +lsxcatd_h +lsxcatd_null +makeconservercf_d +makeconservercf_noderange +makeconservercf_null +makedhcp_a_ubuntu +makedhcp_d +makedhcp_n +makedhcp_remote_network +makedns_d_node +makedns_n_noderange +makedns_ubuntu_n +makehost_n_r +makehosts_h +makehosts_help +makehosts_n +makehosts_n_noderange +makeknownhosts_node_d +mkdef_null +mkdef_regex_bmc +mkdef_regex_ip +mkdef_regex_kvm +mkdef_regex_nicsip +mkdef_t_o_error +mkdef_z +nodeadd_err_symbol +nodeadd_h +nodeadd_noderange +nodeadd_noderange_nodetype +nodeadd_null +nodeadd_v +nodech_delete +nodech_error_node +nodech_error_table +nodech_h +nodech_noderanage_table_at +nodech_noderange_shortname_groups +nodech_noderange_shortname_mgt +nodech_noderange_shortname_tags +nodech_noderange_table +nodech_noderange_table_arrow +nodech_noderange_table_comma +nodech_noderange_table_equal +nodech_noderange_table_include +nodech_noderange_table_unequal +nodech_noderange_table_uninclude +nodech_v +nodegrpch_err +nodegrpch_groups +nodegrpch_h +nodegrpch_v +nodels_H +nodels_S +nodels_b +nodels_err_noderange +nodels_err_symbol +nodels_h +nodels_noderange +nodels_noderange_shortname_groups +nodels_noderange_shortname_mgt +nodels_noderange_shortname_tags +nodels_noderange_table +nodels_noderange_table_equal +nodels_noderange_table_unequal +nodels_noderange_table_uninclude +nodels_noderange_tablecolumn +nodels_null +nodels_table_include +nodels_tablevalue +nodels_tablevalue_tablecolumn +nodels_v +noderm_err_node +noderm_h +noderm_noderange +noderm_null +nodeset_errorcommand +nodeset_check_warninginfo +nodeset_noderange +nodeset_xnba +nodeset_shell_incorrectmasterip +nodeset_stat +nodestat_err_node +nodestat_usage +nodestat_noderange +packimage_h +packimage_v +pping_h +pping_invalidnode +pping_node +pping_v +prsync_dir_node +prsync_file_node +prsync_h +prsync_v +psh_h +psh_i +psh_l +psh_node_cmd_linux +psh_v +regnotif_err +regnotif_h +regnotif_null +regnotif_o +regnotif_v +restorexCAT_h +restorexCATdb_a_p_V +restorexCATdb_p_V +restorexCATdb_v +restorexCATdb_wrongpath +rmdef_null +rmdef_t_err +rpower_err_noderange +run_command_with_XCATBYPASS +rvitals_noderange_err +tabdump_d +tabdump_d_nodehm +tabdump_f_d +tabdump_h +tabdump_help +tabdump_table +tabdump_v +tabdump_w_equal +tabdump_w_ge +tabdump_w_gt +tabdump_w_le +tabdump_w_lt +tabdump_w_match +tabdump_w_ne +tabdump_w_notmatch +tabgrep_err +tabgrep_h +tabgrep_node +tabgrep_null +tabprune_V_a_eventlog +tabprune_V_n_auditlog +tabprune_a_eventlog +tabprune_h +tabprune_i_auditlog +tabprune_v +tabrestore_err +tabrestore_h +tabrestore_null +tabrestore_table +unregnotif_f +unregnotif_h +unregnotif_null +unregnotif_v +updatenode_diskful_syncfiles_failing +xcatconfig_c +xcatconfig_u_check_xcatsslversion_ubuntu +xcatd_restart +xcatd_start +xcatd_stop +xcatstanzafile_attribute +xcatstanzafile_colon +xcatstanzafile_defaultvalue +xcatstanzafile_multattr +xcatstanzafile_normal +xcatstanzafile_objtype +xcatstanzafile_specificvalue +xcatstanzafile_tab +xdcp_nonroot_user +xdsh_E +xdsh_Q_command +xdsh_T +xdsh_V +xdsh_c_cn +xdsh_e_filename +xdsh_h +xdsh_o +xdsh_permission_denied +xdsh_q +xdsh_regular_command +xdsh_t diff --git a/xCAT-test/autotest/bundle/ubuntu_x86_weekly.bundle b/xCAT-test/autotest/bundle/ubuntu_x86_weekly.bundle new file mode 100644 index 000000000..c25018857 --- /dev/null +++ b/xCAT-test/autotest/bundle/ubuntu_x86_weekly.bundle @@ -0,0 +1,16 @@ +#INCLUDE:ubuntu_x86_daily.bundle# +nodeset_cmdline +nodeset_runimg +nodeset_shell +packimage_imagename +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method +packimage_m_tar_c_gzip +packimage_m_tar_c_pigz +packimage_m_tar_c_xz +packimage_o_p_a_m +rmimage_diskless +ubuntu_migration2_vm diff --git a/xCAT-test/autotest/testcase/chtab/cases0 b/xCAT-test/autotest/testcase/chtab/cases0 index b0191bd38..68ad379e8 100644 --- a/xCAT-test/autotest/testcase/chtab/cases0 +++ b/xCAT-test/autotest/testcase/chtab/cases0 @@ -79,7 +79,7 @@ description:chtab with error table label:mn_only,ci_test,db cmd:chtab error=error site.comment=error check:rc!=0 -check:output=~no such column|column \"error\" does not exist +check:output=~no such column|column \"error\" does not exist|Unknown column \'error\' end diff --git a/xCAT-test/autotest/testcase/commoncmd/retry_install.sh b/xCAT-test/autotest/testcase/commoncmd/retry_install.sh new file mode 100755 index 000000000..4986e344f --- /dev/null +++ b/xCAT-test/autotest/testcase/commoncmd/retry_install.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +declare -i installsuccess=0 +declare -i a=0 +declare -i tryreinstall=1 +node=$1 +osimage=$2 + +if [ $# -eq 3 ]; +then + times=$3+1 + echo "Try to retry rinstall $3 times ......" +else + times=6 + echo "Try to retry rinstall 5 times ......" +fi + + +for (( tryreinstall = 1 ; tryreinstall < $times ; ++tryreinstall )) +do + echo "Try to install $node on the $tryreinstall time..." + + 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..." + exit 1 + fi + + #sleep while for installation. + sleep 360 + while [ ! `lsdef -l $node|grep status|grep booted` ] + do + sleep 10 + echo "The status is not booted..." + a=++a + if [ $a -gt 400 ];then + a=0 + break + fi + done + + lsdef -l $node|grep status|grep booted + tobooted=$? + echo "The tobooted is $tobooted" + + ping -c 2 $node + pingable=$? + echo "The pingable is $pingable" + + xdsh $node date + canruncmd=$? + echo "The canruncmd is $canruncmd" + + if [[ $canruncmd -eq 0 && $tobooted -eq 0 && $pingable -eq 0 ]];then + echo "The provision succeed on the $tryreinstall time....." + installsuccess=1 + break + fi + +done + +if [ $installsuccess -eq 1 ];then + echo "The provision succeed......" + exit 0 +else + echo "The provision failed......" + exit 1 +fi diff --git a/xCAT-test/autotest/testcase/confignetwork/cases0 b/xCAT-test/autotest/testcase/confignetwork/cases0 index 9f9c45e6e..e3de2b730 100644 --- a/xCAT-test/autotest/testcase/confignetwork/cases0 +++ b/xCAT-test/autotest/testcase/confignetwork/cases0 @@ -22,7 +22,7 @@ cmd:copycds $$ISO check:rc==0 cmd:chdef $$CN postscripts="confignetwork -s" check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 cmd:sleep 300 cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 300 ];then break;fi done @@ -70,7 +70,7 @@ cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-comput check:rc==0 cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 cmd:sleep 180 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 @@ -123,7 +123,7 @@ cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-comput check:rc==0 cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 cmd:sleep 180 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 diff --git a/xCAT-test/autotest/testcase/go_xcat/case0 b/xCAT-test/autotest/testcase/go_xcat/case0 index 7af2a8a04..5578faac9 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case0 +++ b/xCAT-test/autotest/testcase/go_xcat/case0 @@ -18,9 +18,9 @@ check:rc==0 cmd:xdsh $$CN "cd /xcat-core; ./mklocalrepo.sh" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:if grep SUSE /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=/etc/zypp/repos.d/xCAT-core.repo -y install"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=/etc/yum.repos.d/xCAT-core.repo -y install"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=/etc/apt/sources.list.d/xcat-core.list -y install";else echo "Sorry,this is not supported os"; fi @@ -57,9 +57,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:xdsh $$CN "cd /; ./go-xcat --xcat-core=/xcat-core -y install" @@ -96,9 +96,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; bunzip2 /xcat-core.tar.bz2" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:xdsh $$CN "cd /; ./go-xcat --xcat-core=/xcat-core.tar -y install" @@ -135,9 +135,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:xdsh $$CN "cd /; ./go-xcat --xcat-core=/xcat-core.tar.bz2 --xcat-dep=/xcat-dep.tar.bz2 -y install" @@ -182,9 +182,9 @@ check:rc==0 cmd:xdsh $$CN "cd /xcat-core; ./mklocalrepo.sh" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:if grep SUSE /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=/etc/zypp/repos.d/xCAT-core.repo --xcat-dep=/etc/zypp/repos.d/xCAT-dep.repo -y install"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=/etc/yum.repos.d/xCAT-core.repo --xcat-dep=/etc/yum.repos.d/xCAT-dep.repo -y install"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=/etc/apt/sources.list.d/xcat-core.list --xcat-dep=/etc/apt/sources.list.d/xcat-dep.list -y install"; else echo "Sorry,this is not supported os"; fi @@ -225,9 +225,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:xdsh $$CN "cd /; ./go-xcat --xcat-core=/xcat-core --xcat-dep=/xcat-dep -y install" @@ -262,9 +262,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:xdsh $$CN "cd /; ./go-xcat --xcat-core=/xcat-core.tar.bz2 --xcat-dep=/xcat-dep.tar.bz2 -y install" diff --git a/xCAT-test/autotest/testcase/go_xcat/case1 b/xCAT-test/autotest/testcase/go_xcat/case1 index de11a1a6a..134f0a843 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case1 +++ b/xCAT-test/autotest/testcase/go_xcat/case1 @@ -13,9 +13,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:xdsh $$CN "cd /; ./go-xcat --yes install" @@ -48,9 +48,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:migration_version=`echo $$MIGRATION2_VERSION |cut -d "." -f -2`; xdsh $$CN "cd /; ./go-xcat -x $migration_version -y install" @@ -90,9 +90,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y install" @@ -125,9 +125,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:migration_version=`echo $$MIGRATION2_VERSION |cut -d "." -f -2`; xdsh $$CN "cd /; ./go-xcat --xcat-version=$migration_version -y install" diff --git a/xCAT-test/autotest/testcase/go_xcat/case2 b/xCAT-test/autotest/testcase/go_xcat/case2 index 058a19de3..98bdef85b 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case2 +++ b/xCAT-test/autotest/testcase/go_xcat/case2 @@ -43,9 +43,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/repos/apt/$$BRANCH/core-snap/";else xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/repos/yum/$$BRANCH/core-snap/ -y install"; fi @@ -79,9 +79,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/xcat-core/devel/Ubuntu/core-snap/core-debs-snap.tar.bz2";else xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/xcat-core/devel/Linux/core-snap/core-rpms-snap.tar.bz2 -y install"; fi @@ -147,9 +147,9 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:dir="__GETNODEATTR($$CN,os)__"; if grep SUSE /etc/*release;then os=`echo $dir |cut -c 1-6` && xdsh $$CN "cd /xcat-dep/$os/__GETNODEATTR($$CN,arch)__/; ./mklocalrepo.sh" ; elif grep "Red Hat" /etc/*release;then os=`echo $dir |cut -c 1-2` && xdsh $$CN "cd /xcat-dep/$os`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/; ./mklocalrepo.sh"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cd /xcat-dep; ./mklocalrepo.sh"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/repos/apt/devel/core-snap/ --xcat-dep=http://xcat.org/files/xcat/repos/apt/xcat-dep/ -y install"; else xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/repos/yum/devel/core-snap/ --xcat-dep=http://xcat.org/files/xcat/repos/yum/xcat-dep/ -y install"; fi @@ -183,9 +183,9 @@ check:rc==0 cmd:cp /xcat-dep-*.tar.bz2 /install/ check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/go-xcat.log" cmd:dep=`ls /install/xcat-dep-*.tar.bz2`;if grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/xcat-core/devel/Ubuntu/core-snap/core-debs-snap.tar.bz2 --xcat-dep=http://$$MN/$dep -y install"; else xdsh $$CN "cd /; ./go-xcat --xcat-core=http://xcat.org/files/xcat/xcat-core/devel/Linux/core-snap/core-rpms-snap.tar.bz2 --xcat-dep=http://$$MN/$dep -y install"; fi diff --git a/xCAT-test/autotest/testcase/go_xcat/case4 b/xCAT-test/autotest/testcase/go_xcat/case4 index c5603a64b..c214cb912 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case4 +++ b/xCAT-test/autotest/testcase/go_xcat/case4 @@ -16,9 +16,9 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/hosts /etc/hosts" && xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 -cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi +cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "cd /; ./go-xcat --xcat-core=$$UBUNTU_MIGRATION2_CORE --xcat-dep=$$UBUNTU_MIGRATION2_DEP -y install";else xdsh $$CN "cd /; ./go-xcat -x $$MIGRATION1_VERSION -y install";fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case b/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case index ee1517af5..4b4f02075 100644 --- a/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_diskless_setup_case @@ -84,7 +84,7 @@ cmd:rm -rf /tmp/mountoutput cmd:packimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service check:rc==0 -cmd:rinstall $$SN osimage=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service check:rc==0 check:output=~Provision node\(s\)\: $$SN @@ -107,6 +107,11 @@ check:output=~\d\d:\d\d:\d\d cmd:xdsh $$SN mount check:rc==0 check:output=~on / type tmpfs +cmd:xdsh $$SN cat /opt/xcat/xcatinfo +check:rc==0 +check:output=~NODE=$$SN +check:output=~IMAGENAME='__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service' +check:output=~IMAGEUUID='\w+-\w+-\w+-\w+-\w+' cmd:xdsh $$SN rpm -qa|grep "xCAT-openbmc-py" check:rc==0 check:output=~xCAT-openbmc-py-\d diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 566600ba9..18a5e1f7d 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -57,7 +57,7 @@ check:rc==0 #cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkgdir="/install/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__" #check:rc==0 -cmd:rinstall $$SN osimage=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service check:rc==0 check:output=~Provision node\(s\)\: $$SN @@ -91,6 +91,10 @@ check:output=~/install on /install cmd:xdsh $$SN "mount" check:rc==0 check:output=~/tftpboot on /tftpboot +cmd:xdsh $$SN cat /opt/xcat/xcatinfo +check:rc==0 +check:output=~NODE=$$SN +check:output=~IMAGENAME=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service 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 check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index ee6747707..c82b55be7 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -7,7 +7,8 @@ cmd:df -T cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:MINIISO=NUll;if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]] && [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi check:rc==0 - +cmd: if lsdef service > /dev/null 2>&1; then chdef service -m groups=service;fi +check:rc==0 cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:makedns -n @@ -41,12 +42,10 @@ cmd:if ! ([[ "__GETNODEATTR($$CN,os)__" = "sles12.1" ]] || [[ "__GETNODEATTR($$C check:rc==0 cmd:lsdef -l $$CN check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi -cmd:sleep 300 -cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20;((a++));if [ $a -gt 300 ];then break;fi done cmd:ping $$CN -c 3 check:rc==0 check:output=~64 bytes from $$CN @@ -58,6 +57,10 @@ check:rc==0 check:output=~\d\d:\d\d:\d\d cmd:xdsh $$CN mount check:rc==0 +cmd:xdsh $$CN cat /opt/xcat/xcatinfo +check:rc==0 +check:output=~NODE=$$CN +check:output=~IMAGENAME=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute cmd:sleep 120 #comment for further discussion #cmd:if ! ([[ "__GETNODEATTR($$CN,os)__" = "sles12.1" ]] || [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" && "__GETNODEATTR($$CN,arch)__" = "x86_64" ]]) ;then xdsh $$CN service ntpd status;fi diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index b055cf563..cd76021a0 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -42,7 +42,7 @@ cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-ins check:rc==0 cmd:updatenode $$CN -f check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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 @@ -53,8 +53,6 @@ cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc" ]]; then sleep 120;elif [[ "__GE #check:rc==0 #check:output!~booted -cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 60;((a++));if [ $a -gt 50 ];then break;fi done - cmd:ping $$CN -c 3 check:rc==0 check:output=~64 bytes from $$CN @@ -66,6 +64,11 @@ check:rc==0 check:output=~\d\d:\d\d:\d\d cmd:xdsh $$CN mount check:rc==0 +cmd:xdsh $$CN cat /opt/xcat/xcatinfo +check:rc==0 +check:output=~NODE=$$CN +check:output=~IMAGENAME=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:output=~SERVICEGROUP=$$SN cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "cat /test.synclist" check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index f183bba92..4ac192916 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -4,6 +4,8 @@ label:flat_cn_diskless,provision #stop:yes cmd:fdisk -l cmd:df -T +cmd: if lsdef service > /dev/null 2>&1; then chdef service -m groups=service;fi +check:rc==0 cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 @@ -43,13 +45,11 @@ cmd:rm -rf /tmp/mountoutput cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi -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 cmd:ping $$CN -c 3 check:rc==0 @@ -63,6 +63,11 @@ check:output=~\d\d:\d\d:\d\d cmd:xdsh $$CN mount check:rc==0 check:output=~on / type tmpfs +cmd:xdsh $$CN cat /opt/xcat/xcatinfo +check:rc==0 +check:output=~NODE=$$CN +check:output=~IMAGENAME='__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute' +check:output=~IMAGEUUID='\w+-\w+-\w+-\w+-\w+' cmd:sleep 120 cmd:ping $$CN -c 3 check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 23354bf69..12b3c6167 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -49,13 +49,11 @@ check:rc==0 cmd:updatenode $$CN -f check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:xdsh $$SN "if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi" -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 cmd:ping $$CN -c 3 check:rc==0 @@ -69,6 +67,12 @@ check:output=~\d\d:\d\d:\d\d cmd:xdsh $$CN mount check:rc==0 check:output=~on / type tmpfs +cmd:xdsh $$CN cat /opt/xcat/xcatinfo +check:rc==0 +check:output=~NODE=$$CN +check:output=~IMAGENAME='__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute' +check:output=~IMAGEUUID='\w+-\w+-\w+-\w+-\w+' +check:output=~SERVICEGROUP=$$SN cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat index 2b3c37a7b..f3900601b 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -4,7 +4,8 @@ label:others,provision,statelite #stop:yes cmd:fdisk -l cmd:df -T - +cmd: if lsdef service > /dev/null 2>&1; then chdef service -m groups=service;fi +check:rc==0 cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 @@ -50,19 +51,18 @@ check:rc==0 cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak;fi check:rc==0 +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute rootfstype=nfs +check:rc==0 cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 cmd:liteimg __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi -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 - cmd:ping $$CN -c 3 check:rc==0 check:output=~64 bytes from $$CN @@ -93,13 +93,11 @@ check:rc==0 cmd:liteimg __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi -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 cmd:ping $$CN -c 3 check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index 7fdbd8707..049f802e7 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -75,13 +75,11 @@ check:rc==0 cmd:prsync /install $$SN:/ check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:xdsh $$SN "if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi" -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 cmd:ping $$CN -c 3 check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index 822c68b58..f9e6fbd32 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -69,13 +69,11 @@ cmd:prsync /install $$SN:/ check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:xdsh $$SN "if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi" -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 cmd:ping $$CN -c 3 check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker index c8e099502..f7a730b1b 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker +++ b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker @@ -21,7 +21,7 @@ cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=`cat /etc/*-re check:rc==0 cmd: chdef $$CN -p postbootscripts="setupdockerhost mynet0=$$MYNET0VALUE@$$DOCKERHOSIP:$$NICNAME" check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-dockerhost +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-dockerhost check:rc==0 check:output=~Provision node\(s\)\: $$CN diff --git a/xCAT-test/autotest/testcase/lsdef/cases0 b/xCAT-test/autotest/testcase/lsdef/cases0 index dbd717f4f..7169dfa08 100644 --- a/xCAT-test/autotest/testcase/lsdef/cases0 +++ b/xCAT-test/autotest/testcase/lsdef/cases0 @@ -214,6 +214,7 @@ end start:lsdef_nics description:lsdef --nics label:mn_only,ci_test,db +cmd:lsdef testnode1;if [ $? -eq 0 ]; then lsdef -l testnode1 -z >/tmp/testnode1.standa ; rmdef testnode1;fi cmd:mkdef -t node -o testnode1 groups=all mgt=ipmi nicips.eth0=1.1.1.1 check:rc==0 cmd:lsdef testnode1 --nics @@ -223,6 +224,7 @@ cmd:rmdef testnode1 check:rc==0 cmd:lsdef testnode1 check:output=~Could not find +cmd:if [ -e /tmp/testnode1.standa ]; then cat /tmp/testnode1.standa | mkdef -z; rm -rf /tmp/testnode1.standa; fi end start:lsdef_template diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0 index 818ca9173..c7168b57b 100644 --- a/xCAT-test/autotest/testcase/makedhcp/cases0 +++ b/xCAT-test/autotest/testcase/makedhcp/cases0 @@ -194,6 +194,7 @@ end start:makedhcp_remote_network descriptiion:This case is to test when there is mgtifname='!remote!', makedhcp could work correctly and create entrys in dhcp lease file. os:linux +stop:yes label:mn_only,dhcp cmd:mkdef -t network -o testnetwork net=100.100.100.0 mask=255.255.255.0 mgtifname='!remote!eth0' gateway=100.100.100.1 check:rc==0 @@ -213,7 +214,7 @@ cmd:if [ -f /var/lib/dhcpd/dhcpd.leases ]; then a="/var/lib/dhcpd/dhcpd.leases"; cmd:makedhcp testnode check:rc==0 cmd:if [ -f /var/lib/dhcpd/dhcpd.leases ]; then a="/var/lib/dhcpd/dhcpd.leases"; elif [ -f /var/lib/dhcp/db/dhcpd.leases ]; then a="/var/lib/dhcp/db/dhcpd.leases"; elif [ -f "/var/lib/dhcp/dhcpd.leases" ]; then a="/var/lib/dhcp/dhcpd.leases";fi; ls -l $a; cat $a -cmd:makedhcp -q testnode +cmd:a=2;while true; do [ $a -eq 64 ] && exit 1;output=$(makedhcp -q testnode);[ $? -ne 0 ] && exit 1;echo $output|grep testnode 2>/dev/null && exit 0;a=$[$a*2]; makedhcp testnode; sleep $a;done check:rc==0 check:output=~testnode: ip-address = 100.100.100.2 cmd:makedhcp -d testnode diff --git a/xCAT-test/autotest/testcase/makehosts/cases0 b/xCAT-test/autotest/testcase/makehosts/cases0 index dab769d08..d6dce15eb 100644 --- a/xCAT-test/autotest/testcase/makehosts/cases0 +++ b/xCAT-test/autotest/testcase/makehosts/cases0 @@ -141,6 +141,7 @@ start:makehost_n_r label:mn_only,dns,wait_fix descriptions:modify makehosts testcases according to special node name eg:s01 and s01r* . for issue #2717 and #2683 cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest +cmd:sed -i '/s01/d' /etc/hosts cmd:cat /etc/hosts cmd:lsdef s01;if [ $? -eq 0 ]; then lsdef -l s01 -z >/tmp/s01.standa ;rmdef s01;fi check:rc==0 @@ -149,56 +150,65 @@ check:rc==0 cmd:nodeadd s01 groups=service; chdef s01 ip=70.2.0.254;nodeadd s01r1b01 groups=compute; chdef s01r1b01 ip=80.2.0.254 check:rc==0 cmd:lsdef -l s01,s01r1b01 -cmd:makehosts +cmd:makehosts check:rc==0 -cmd:cat /etc/hosts cmd:#!/bin/bash file="/etc/hosts" -for i in {1..5}; do - if (grep "70.2.0.254 s01" $file >/dev/null 2>&1) && (grep "80.2.0.254 s01r1b01" $file >/dev/null 2>&1); then - exit 0; - else - echo "Do not find s01 and s01r1b01 in $file, sleep $[i*2] seconds and try again" - sleep $[i*2] - fi -done -exit 1 +if (! grep "s01" $file 2>&1); then + echo "makehosts failed, try XCATBYPASS=YES makehosts again" + XCATBYPASS=YES makehosts + if (! grep "s01" $file 2>&1); then + echo "XCATBYPASS=YES makehosts failed either" + exit 1 + fi +fi +if (grep "70.2.0.254 s01" $file >/dev/null 2>&1) && (grep "80.2.0.254 s01r1b01" $file >/dev/null 2>&1); then + exit 0 +else + exit 1 +fi check:rc==0 -cmd:cp -f /etc/hosts.xcatbakautotest /etc/hosts -cmd:makehosts s01 +cmd:sed -i '/s01/d' /etc/hosts +cmd:makehosts s01 check:rc==0 -cmd:cat /etc/hosts cmd:#!/bin/bash file="/etc/hosts" -for i in {1..5}; do - if (grep "70.2.0.254 s01" $file >/dev/null 2>&1) && ( ! grep "80.2.0.254 s01r1b01" $file >/dev/null 2>&1); then - exit 0; - else - echo "sleep $[i*2] seconds and try again" - sleep $[i*2] +if (! grep "s01 " $file 2>&1); then + echo "makehosts s01 failed, try XCATBYPASS=YES makehosts s01 again" + XCATBYPASS=YES makehosts s01 + if (! grep "s01 " $file 2>&1); then + echo "XCATBYPASS=YES makehosts s01 failed either" + exit 1 fi -done -exit 1 +fi +if (grep "70.2.0.254 s01" $file >/dev/null 2>&1) && ( ! grep "80.2.0.254 s01r1b01" $file >/dev/null 2>&1); then + exit 0; +else + exit 1 +fi check:rc==0 -cmd:cp -f /etc/hosts.xcatbakautotest /etc/hosts -cmd:makehosts service +cmd:sed -i '/s01/d' /etc/hosts +cmd:makehosts service check:rc==0 -cmd:cat /etc/hosts cmd:#!/bin/bash file="/etc/hosts" -for i in {1..5}; do - if (grep "70.2.0.254 s01" $file >/dev/null 2>&1) && (! grep "80.2.0.254 s01r1b01" $file >/dev/null 2>&1); then - exit 0; - else - echo "sleep $[i*2] seconds and try again" - sleep $[i*2] - fi -done -exit 1 +if (! grep "s01 " $file 2>&1); then + echo "makehosts service failed, try XCATBYPASS=YES makehosts service again" + XCATBYPASS=YES makehosts service + if (! grep "s01 " $file 2>&1); then + echo "XCATBYPASS=YES makehosts service failed either" + exit 1 + fi +fi +if (grep "70.2.0.254 s01" $file >/dev/null 2>&1) && (! grep "80.2.0.254 s01r1b01" $file >/dev/null 2>&1); then + exit 0; +else + exit 1 +fi check:rc==0 cmd:makehosts -d s01 check:rc==0 -cmd:cat /etc/hosts +cmd:grep "s01" /etc/hosts cmd:#!/bin/bash file="/etc/hosts" for i in {1..5}; do @@ -211,13 +221,14 @@ for i in {1..5}; do done exit 1 check:rc==0 -cmd:cp -f /etc/hosts.xcatbakautotest /etc/hosts -cmd:makehosts +cmd:sed -i '/s01/d' /etc/hosts +cmd:domain=$(lsdef -t site -i domain -c |awk -F'=' '{print $2}'); echo "70.2.0.254 s01 s01.$domain" >> /etc/hosts; echo "80.2.0.254 s01r1b01 s01r1b01.$domain" >> /etc/hosts check:rc==0 -cmd:cat /etc/hosts -cmd:makehosts -d service +cmd:grep "s01" /etc/hosts check:rc==0 -cmd:cat /etc/hosts +cmd:makehosts -d service +check:rc==0 +cmd:grep "s01" /etc/hosts cmd:#!/bin/bash file="/etc/hosts" for i in {1..5}; do @@ -230,13 +241,14 @@ for i in {1..5}; do done exit 1 check:rc==0 -cmd:cp -f /etc/hosts.xcatbakautotest /etc/hosts -cmd:makehosts +cmd:sed -i '/s01/d' /etc/hosts +cmd:domain=$(lsdef -t site -i domain -c |awk -F'=' '{print $2}'); echo "70.2.0.254 s01 s01.$domain" >> /etc/hosts; echo "80.2.0.254 s01r1b01 s01r1b01.$domain" >> /etc/hosts +check:rc==0 +cmd:grep "s01" /etc/hosts check:rc==0 -cmd:cat /etc/hosts cmd:makehosts -d s01r1b01 check:rc==0 -cmd:cat /etc/hosts +cmd:grep "s01" /etc/hosts cmd:#!/bin/bash file="/etc/hosts" for i in {1..5}; do diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index a11f1d807..9e6c618b1 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -32,7 +32,7 @@ cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.l check:output=~$$CN cmd:copycds $$ISO check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 600 @@ -140,7 +140,7 @@ cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.l check:output=~$$CN cmd:copycds $$ISO check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 600 diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 76acbd859..2e429094e 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -31,7 +31,7 @@ cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.l check:output=~$$CN cmd:copycds $$ISO check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 600 @@ -152,7 +152,7 @@ cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.l check:output=~$$CN cmd:copycds $$ISO check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 600 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le index 81970abc3..5bd7ce898 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le @@ -17,7 +17,7 @@ cmd:makeconservercf $$CN check:rc==0 cmd:cat /etc/conserver.cf | grep $$CN check:output=~$$CN -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 600 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm index c980c0702..9171b01e6 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm @@ -16,7 +16,7 @@ cmd:makeconservercf $$CN check:rc==0 cmd:cat /etc/conserver.cf | grep $$CN check:output=~$$CN -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 600 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le index 7fe2080ec..301d31f22 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le @@ -17,7 +17,7 @@ cmd:makeconservercf $$CN check:rc==0 cmd:cat /etc/conserver.cf | grep $$CN check:output=~$$CN -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 300 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm index ab47fd759..bd98c5e63 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm @@ -16,7 +16,7 @@ cmd:makeconservercf $$CN check:rc==0 cmd:cat /etc/conserver.cf | grep $$CN check:output=~$$CN -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +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:sleep 600 diff --git a/xCAT-test/autotest/testcase/nodeset/cases2 b/xCAT-test/autotest/testcase/nodeset/cases2 new file mode 100644 index 000000000..a0473d976 --- /dev/null +++ b/xCAT-test/autotest/testcase/nodeset/cases2 @@ -0,0 +1,33 @@ +start:nodeset_prescripts +description:This case is to run test for prescripts actions. This test case should be tested on an provisioned compute node. +os:Linux +label:others +cmd:dir="/install/prescripts/";if [ ! -e "${dir}" ];then mkdir -p $dir; fi +cmd:echo "echo all" >> /install/prescripts/test_prescripts_all.sh;chmod a+x /install/prescripts/test_prescripts_all.sh +check:rc==0 +cmd:echo "echo boot" >> /install/prescripts/test_prescripts_boot.sh;chmod a+x /install/prescripts/test_prescripts_boot.sh +check:rc==0 +cmd:echo "echo osimage" >> /install/prescripts/test_prescripts_osimage.sh;chmod a+x /install/prescripts/test_prescripts_osimage.sh +check:rc==0 +cmd:pre=`lsdef -l $$CN |grep prescripts-begin|awk -F= '{print $2}'`;echo $pre >> /tmp/prescriptssave;chdef $$CN prescripts-begin="test_prescripts_all.sh|boot:test_prescripts_boot.sh|osimage:test_prescripts_osimage.sh" +check:rc==0 +cmd:nodeset $$CN install +check:output=~Running begin script test_prescripts_all.sh for nodes $$CN +check:output!=~test_prescripts_boot.sh +check:output!=~test_prescripts_osimage.sh +cmd:nodeset $$CN boot +check:rc==0 +check:output=~Running begin script test_prescripts_all.sh for nodes $$CN +check:output=~Running begin script test_prescripts_boot.sh for nodes $$CN +check:output!=~test_prescripts_osimage.sh +cmd:nodeset $$CN osimage +check:rc==0 +check:output=~Running begin script test_prescripts_all.sh for nodes $$CN +check:output=~Running begin script test_prescripts_osimage.sh for nodes $$CN +check:output!=~test_prescripts_boot.sh +cmd:rm -rf /install/prescripts/test_prescripts_all.sh /install/prescripts/test_prescripts_boot.sh /install/prescripts/test_prescripts_osimage.sh +cmd:pre=`cat /tmp/prescriptssave`;chdef $$CN prescripts-begin=$pre +check:rc==0 +cmd:rm -rf /tmp/prescriptssave +end + diff --git a/xCAT-test/autotest/testcase/packimg/cases0 b/xCAT-test/autotest/testcase/packimg/cases0 index a8d51ba00..fcad6b946 100644 --- a/xCAT-test/autotest/testcase/packimg/cases0 +++ b/xCAT-test/autotest/testcase/packimg/cases0 @@ -72,9 +72,7 @@ check:output=~archive method:cpio check:output=~compress method:gzip cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz check:rc==0 -cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute -check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]]; then rnetboot $$CN;else rpower $$CN boot; fi +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 150 ];then break;fi done cmd:ping $$CN -c 3 @@ -118,9 +116,7 @@ check:output=~archive method:cpio check:output=~compress method:pigz cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz check:rc==0 -cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute -check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]]; then rnetboot $$CN;else rpower $$CN boot; fi +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 150 ];then break;fi done cmd:ping $$CN -c 3 @@ -160,9 +156,7 @@ check:output=~archive method:cpio check:output=~compress method:xz cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.xz check:rc==0 -cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute -check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]]; then rnetboot $$CN;else rpower $$CN boot; fi +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 150 ];then break;fi done cmd:ping $$CN -c 3 @@ -206,7 +200,7 @@ check:output=~archive method:tar check:output=~compress method:pigz cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 150 ];then break;fi done @@ -257,7 +251,7 @@ check:output=~archive method:tar check:output=~compress method:gzip cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 150 ];then break;fi done @@ -308,7 +302,7 @@ check:output=~archive method:tar check:output=~compress method:xz cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.xz check:rc==0 -cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 150 ];then break;fi done @@ -376,3 +370,29 @@ cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/ cmd:mv -f /rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg end +start:packimage_uuid +os:Linux +description:this case is to verfy bug 3542,ensure that CSM required info is not removed from /opt/xcat/xcatinfo. +label:others,packaging +cmd:lsdef -z $$CN >> /tmp/node.stanza +cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi +cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi +cmd:copycds $$ISO +cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +check:rc==0 +cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +check:rc==0 +cmd:cp /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg/opt/xcat/xcatinfo /tmp/uuid +cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +check:rc==0 +cmd:uuid=`cat /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg/opt/xcat/xcatinfo |grep UUID|awk -F= '{print $2}'`;grep $uuid /tmp/uuid +check:rc!=0 +cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz +check:rc==0 +cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz +cmd:mv -f /rootimg.cpio.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz +cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg +cmd:mv -f /rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg +cmd:if [ -e /tmp/node.stanza ]; then rmdef $$CN; cat /tmp/node.stanza | mkdef -z; rm -rf /tmp/node.stanza; fi +end + diff --git a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 index e53d25715..5cbefb419 100644 --- a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 +++ b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 @@ -524,3 +524,28 @@ check:rc != 0 check:output =~~$$CN\s*:\s*(\[.*?\]: )?Error: Deleting currently active BMC firmware is not supported end +start:rflash_d_relative_path +description:this case is to check if -d support relative directory path. This case is for issue 4511. +os:Linux +hcp:openbmc +label:cn_bmc_ready,hctrl_openbmc +cmd:lsdef testnode;if [ $? -eq 0 ]; then lsdef -l testnode -z >/tmp/testnode.standa ; rmdef testnode;fi +cmd:mkdef -t node -o testnode groups=all arch=ppc64le bmc=testnode-bmc bmcvlantag=11 cons=openbmc mgt=openbmc +check:rc == 0 +cmd:dir="/tmp/rflashdir";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi +cmd:mkdir -p /tmp/rflashdir;touch /tmp/rflashdir/witherspoon.pnor.squashfs.tar +cmd:cd /tmp;rflash testnode ./rflashdir -d +check:rc != 0 +check:output =~Error:\s*\[.*?\]:\s*No BMC tar file found in ./rflashdir +check:output =~Error:\s*\[.*?\]:\s*No Host tar file found in ./rflashdir +check:output =~testnode\s*:\s*Error:\s*Unable to resolved ip address for bmc:\s*testnode-bmc +cmd:dir="/tmp/rflashnotexist/";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi +cmd:cd /tmp;rflash testnode ./rflashnotexist -d +check:rc != 0 +check:output =~testnode\s*:\s*Error:\s*Invalid option specified with -d:\s*./rflashnotexist +cmd:dir="/tmp/rflashnotexist"; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi +cmd:dir="/tmp/rflashdir"; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi +cmd:rmdef -t node -o testnode +check:rc == 0 +cmd:if [ -e /tmp/testnode.standa ]; then cat /tmp/testnode.standa | mkdef -z; rm -rf /tmp/testnode.standa; fi +end diff --git a/xCAT-test/autotest/testcase/rmdef/cases0 b/xCAT-test/autotest/testcase/rmdef/cases0 index 84c928cfc..e5bea9ce4 100644 --- a/xCAT-test/autotest/testcase/rmdef/cases0 +++ b/xCAT-test/autotest/testcase/rmdef/cases0 @@ -88,6 +88,8 @@ end start:rmdef_dynamic_group description:rmdef to remove dynamic node group label:mn_only,ci_test,db +cmd:lsdef testnode1;if [ $? -eq 0 ]; then lsdef -l testnode1 -z >/tmp/testnode1.standa ; rmdef testnode1;fi +cmd:lsdef testnode2;if [ $? -eq 0 ]; then lsdef -l testnode2 -z >/tmp/testnode2.standa ; rmdef testnode2;fi cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:mkdef -t group -o dyngrp -d -w mgt==hmc -w cons==hmc -w groups==all,systemp @@ -105,6 +107,8 @@ cmd:rmdef -t group -o dyngrp check:rc==0 cmd:lsdef -t group -o dyngrp check:output=~Could not find an object named 'dyngrp' of type 'group'. +cmd:if [ -e /tmp/testnode1.standa ]; then cat /tmp/testnode1.standa | mkdef -z; rm -rf /tmp/testnode1.standa; fi +cmd:if [ -e /tmp/testnode2.standa ]; then cat /tmp/testnode2.standa | mkdef -z; rm -rf /tmp/testnode2.standa; fi end #start:rmdef_f_all diff --git a/xCAT-test/autotest/testcase/updatenode/cases0 b/xCAT-test/autotest/testcase/updatenode/cases0 index f917cae2f..a225eadba 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases0 +++ b/xCAT-test/autotest/testcase/updatenode/cases0 @@ -166,23 +166,33 @@ end start:updatenode_syncfile_EXECUTE label:others,updatenode -cmd:echo "echo hello > /tmp/test" > /tmp/file.post +cmd:mkdir -p /tmp/updatenode_syncfile_EXECUTE/ check:rc==0 -cmd:chmod a+x /tmp/file.post -cmd:echo "/tmp/file.post -> /tmp/file.post" > /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist -cmd:echo "EXECUTE:" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist -cmd:echo "/tmp/file.post" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist -cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:touch /tmp/updatenode_syncfile_EXECUTE/file +check:rc==0 +cmd:echo "echo hello > /tmp/test" > /tmp/updatenode_syncfile_EXECUTE/file.post +check:rc==0 +cmd:chmod a+x /tmp/updatenode_syncfile_EXECUTE/file.post +cmd:echo "/tmp/updatenode_syncfile_EXECUTE/file -> /tmp/file" > /tmp/updatenode_syncfile_EXECUTE/synclist +cmd:echo "EXECUTE:" >> /tmp/updatenode_syncfile_EXECUTE/synclist +cmd:echo "/tmp/updatenode_syncfile_EXECUTE/file.post" >> /tmp/updatenode_syncfile_EXECUTE/synclist +cmd:chdef -t osimage -o __GETNODEATTR($$CN,provmethod)__ synclists=/tmp/updatenode_syncfile_EXECUTE/synclist check:rc==0 cmd:updatenode $$CN -F check:rc==0 cmd:xdsh $$CN "cat /tmp/test" check:rc==0 check:output=~hello -cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists= +cmd:xdsh $$CN "rm -rf /tmp/test" +cmd:updatenode $$CN -F check:rc==0 -cmd:rm -rf /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:xdsh $$CN "cat /tmp/test" +check:rc!=0 +check:output=~No such file or directory +cmd:xdsh $$CN "rm -rf /tmp/test" +cmd:chdef -t osimage -o __GETNODEATTR($$CN,provmethod)__ synclists= check:rc==0 +cmd:rm -rf /tmp/updatenode_syncfile_EXECUTE/ end start:updatenode_syncfile_EXECUTEALWAYS @@ -525,3 +535,129 @@ cmd:chtab key=xcatdebugmode site.value=0 check:rc==0 end +start:updatenode_syncfile_EXECUTE_EXECUTEALWAYS_noderange +label:others,updatenode +description:this teast case is to verify pr #5834. This test case should be executed on mn with hierarchy environment, with 2 comput nodes.In this case, $$CN and $$C2 are the 2 compute nodes. +cmd:xdsh $$CN,$$C2 rm /tmp/file.post1 /tmp/file.post2 +cmd:xdsh $$CN,$$C2 rm /tmp/test1 /tmp/test2 +cmd:echo "echo hello1 >> /tmp/test1" > /tmp/file.post1 +check:rc==0 +cmd:echo "echo hello2 >> /tmp/test2" > /tmp/file.post2 +check:rc==0 +cmd:chmod a+x /tmp/file.post1 /tmp/file.post2 +cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__ +cmd:echo "/tmp/file.post1 -> ($$CN) /tmp/file.post1" > /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "/tmp/file.post2 -> ($$C2) /tmp/file.post2" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "EXECUTE:" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "/tmp/file.post1" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "EXECUTEALWAYS:" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "/tmp/file.post2" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +check:rc==0 +cmd:updatenode $$CN -F +check:output=~File synchronization has completed +check:rc==0 +cmd:xdsh $$CN "cat /tmp/test1" +check:rc==0 +check:output=~hello1 +cmd:xdsh $$CN "rm -rf /tmp/test1" +check:rc==0 +cmd:updatenode $$CN -F +check:output=~File synchronization has completed +check:rc==0 +cmd:xdsh $$CN "cat /tmp/test1" +check:rc!=0 +cmd:updatenode $$C2 -F +check:output=~File synchronization has completed +check:rc==0 +cmd:xdsh $$C2 ls /tmp/file.post2 +check:rc==0 +cmd:xdsh $$C2 "cat /tmp/test2" +check:rc==0 +check:output=~hello2 +cmd:xdsh $$C2 "rm -rf /tmp/test2" +check:rc==0 +cmd:updatenode $$C2 -F +check:output=~File synchronization has completed +check:rc==0 +cmd:xdsh $$C2 ls /tmp/file.post2 +check:rc==0 +cmd:xdsh $$C2 "cat /tmp/test2" +check:rc==0 +check:output=~hello2 +cmd:xdsh $$C2 rm -rf /tmp/file.post2 /tmp/test2 +cmd:rm -rf /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "/tmp/file.post1 -> ($$CN) /tmp/file.post1" > /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "/tmp/file.post1 -> ($$C2) /tmp/file.post1" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "EXECUTE:" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "/tmp/file.post1" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "EXECUTEALWAYS:" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:echo "/tmp/file.post2" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +check:rc==0 +cmd:updatenode $$C2 -F +check:output=~File synchronization has completed +check:rc==0 +cmd:xdsh $$C2 ls /tmp/file.post2 +check:rc!=0 +cmd:xdsh $$C2 "cat /tmp/test2" +check:rc!=0 +check:output!=~hello2 +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists= +check:rc==0 +cmd:rm -rf /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist +check:rc==0 +end + + +start:updatenode_syncfile_EXECUTEALWAYS_src_dst_diff +label:others,updatenode +description:this teast case is to verify pr #5888. +cmd:lsdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute -z >> /tmp/myimage.stanza +cmd:xdsh $$CN rm /tmp/h /tmp/script.sh /root/script2.sh /tmp/script2.sh /tmp/script3.sh +cmd:xdsh $$CN rm /tmp/test /tmp/test2 /root/test3 /root/test1 +cmd:echo "echo hello >> /tmp/test" > /tmp/script.sh +check:rc==0 +cmd:echo "echo hello2 >> /tmp/test2" > /tmp/script2.sh +check:rc==0 +cmd:echo "echo hello3 >> /tmp/test3" > /root/script3.sh +check:rc==0 +cmd:echo "echo hello1 >> /tmp/test1" > /root/script1.sh +check:rc==0 +cmd:chmod a+x /tmp/script.sh /tmp/script2.sh /root/script3.sh /root/script1.sh +cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__ +cmd:echo "/etc/hosts -> ($$CN) /tmp/h" > /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/tmp/script.sh -> ($$CN) /tmp/script.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/root/script1.sh -> ($$CN) /root/script2.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/tmp/script2.sh -> ($$CN) /tmp/script2.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/root/script3.sh -> ($$CN) /tmp/script3.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "EXECUTEALWAYS:" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/tmp/script.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/tmp/script2.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/root/script3.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:echo "/root/script1.sh" >> /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +check:rc==0 +cmd:updatenode $$CN -F +check:output=~File synchronization has completed for nodes:\s*"$$CN"\s* +check:rc==0 +cmd:xdsh $$CN ls /tmp/h +check:rc==0 +cmd:xdsh $$CN ls /tmp/test +check:rc==0 +cmd:xdsh $$CN ls /tmp/test2 +check:rc==0 +cmd:xdsh $$CN ls /tmp/test3 +check:rc==0 +cmd:xdsh $$CN ls /tmp/test1 +check:rc==0 +cmd:if [ -e /tmp/myimage.stanza ]; then rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute; cat /tmp/myimage.stanza | mkdef -z; rm -rf /tmp/myimage.stanza; fi +check:rc==0 +cmd:rm -rf /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.srcdstdiff.synclist +check:rc==0 +end + + + + + diff --git a/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage index 84347595a..cd6fb34ff 100644 --- a/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage @@ -1040,6 +1040,8 @@ cmd:dir="/opt/inventory/site/osimage";if [ -e "${dir}" ];then mv ${dir} ${dir}". cmd:xcat-inventory export -t osimage -o test_myimage1,test_myimage2 --format json -d /opt/inventory/site/osimage check:rc==0 check:output=~The osimage objects has been exported to directory /opt/inventory/site/osimage +cmd: ls -R /opt/inventory/site/osimage +check: output =~ site cmd:otherpkglist=`lsdef -t osimage -o test_myimage1 |grep otherpkglist|awk -F= '{print $2}'`;diff -y $otherpkglist /opt/inventory/site/osimage/test_myimage1$otherpkglist check:rc==0 cmd:synclists=`lsdef -t osimage -o test_myimage1 |grep synclists|awk -F= '{print $2}'`;diff -y $synclists /opt/inventory/site/osimage/test_myimage1$synclists @@ -1071,8 +1073,9 @@ check:rc==0 cmd: rmdef -t osimage -o test_myimage1,test_myimage2 check:rc==0 cmd:rm -rf /tmp/otherpkglist /tmp/synclists /tmp/postinstall /tmp/exlist /tmp/partitionfile /tmp/pkglist /tmp/template -cmd: tree /opt/inventory/site -cmd:xcat-inventory import -t osimage -o test_myimage1,test_myimage2 -d /opt/inventory/site +cmd: ls -R /opt/inventory/site +check: output =~ site +cmd:xcat-inventory import -t osimage -o test_myimage1,test_myimage2 -d /opt/inventory/site/osimage check:rc==0 check:output=~The object test_myimage1 has been imported check:output=~The object test_myimage2 has been imported diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json index 6f4a69076..124cb7e82 100644 --- a/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json @@ -18,4 +18,3 @@ }, "schema_version": "1.0" } -#Version 2.14.1 (git commit ac941fd2501e8a581bfcc4c79b9301f6ec37ab93, built Mon May 21 06:15:46 EDT 2018) diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json index 9e983695c..f57231432 100644 --- a/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json @@ -18,4 +18,3 @@ }, "schema_version": "1.0" } -#Version 2.14.1 (git commit ac941fd2501e8a581bfcc4c79b9301f6ec37ab93, built Mon May 21 06:15:46 EDT 2018) diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json index 92b5fa341..12fb845cb 100644 --- a/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json @@ -50,4 +50,3 @@ }, "schema_version": "1.0" } -#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json index 285eb92b1..5f4a4ded2 100644 --- a/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json @@ -37,4 +37,3 @@ }, "schema_version": "2.0" } -#Version 2.14.5 (git commit e9d8db94e349c383a6686ecfd853536abe7a8c2b, built Wed Nov 21 06:17:14 EST 2018) diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/cluster.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/cluster.yaml index 7b9b261b6..12bc75a13 100644 --- a/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/cluster.yaml +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/cluster.yaml @@ -1,3 +1,11 @@ +osdistro: + ubuntu17.10-ppc64el: + arch: ppc64el + basename: ubuntu + dirpaths: /install/ubuntu17.10/ppc64el + majorversion: '17' + minorversion: '10' + type: Linux network: prov: basic_attr: diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0 index f66c6cb8b..0e89ff286 100644 --- a/xCAT-test/autotest/testcase/xcatconfig/case0 +++ b/xCAT-test/autotest/testcase/xcatconfig/case0 @@ -94,7 +94,6 @@ cmd:rm -rf /tmp/xcatconfig.test check:rc==0 end - start:xcatconfig_c description:To regenerate cretials label:mn_only @@ -117,7 +116,11 @@ check:rc!=0 #step4:restore test environment cmd:rm -rf /tmp/xcatconfig.test check:rc==0 -cmd:mv -f /etc/xcat/cabak /etc/xcat/ca ;mv -f /etc/xcat/certbak /etc/xcat/cert +cmd:rm -rf /etc/xcat/cabak /etc/xcat/certbak +check:rc==0 +cmd:if lsdef service > /dev/null 2>&1; then updatenode service -P servicenode;makeconservercf;fi +check:rc==0 +cmd:if lsdef service > /dev/null 2>&1; then rpower $$CN stat;fi check:rc==0 end diff --git a/xCAT-test/autotest/testcase/xcatd/case0 b/xCAT-test/autotest/testcase/xcatd/case0 index 4a8203f15..a9f234c00 100644 --- a/xCAT-test/autotest/testcase/xcatd/case0 +++ b/xCAT-test/autotest/testcase/xcatd/case0 @@ -104,9 +104,11 @@ check:rc==0 cmd:service xcatd stop check:rc==0 cmd:sleep 3 +cmd:ps aux|tee /tmp/run_command_with_XCATBYPASS.log +cmd:awk '{print $11}' /tmp/run_command_with_XCATBYPASS.log|grep -E ^xcatd +check:rc!=0 +cmd:rm -rf /tmp/run_command_with_XCATBYPASS.log cmd:service xcatd status -check:output=~xcatd service|xcatd.service -check:output=~xcatd service is not running|inactive \(dead\) cmd:tabdump site check:rc!=0 cmd:XCATBYPASS=YES tabdump site @@ -160,4 +162,20 @@ cmd:chtab name=root policy.commands= policy.rule=allow check:rc==0 end - +start:reload_xcatd_with_XCATBYPASS +description:with XCATBYPASS=YES, there is no error when restart xcatd deamon. This case is add test case for issue 2727 : run xCAT in "XCATBYPASS" mode and simply reload xCAT to check if there is any errors. +label:mn_only,ci_test,xcatd +cmd:service xcatd status +check:rc==0 +check:output=~xcatd service|xcatd.service +check:output=~xcatd service is running|active \(running\) +cmd:XCATBYPASS=YES lsxcatd -a +check:rc==0 +check:output!=~Error|ERROR +cmd:XCATBYPASS=YES service xcatd status +check:rc==0 +check:output!=~Error|ERROR +cmd:XCATBYPASS=YES service xcatd restart +check:rc==0 +check:output!=~Error|ERROR +end diff --git a/xCAT-test/autotest/testcase/xdcp/cases1 b/xCAT-test/autotest/testcase/xdcp/cases1 index d2b9f9bf1..1f26ef5da 100644 --- a/xCAT-test/autotest/testcase/xdcp/cases1 +++ b/xCAT-test/autotest/testcase/xdcp/cases1 @@ -1,10 +1,12 @@ start:xdcp_nonroot_user label:cn_os_ready,parallel_cmds -cmd:useradd -m xyzzy +cmd:lsdef -t site -z clustersite > /tmp/site.stanza +cmd:chdef -t site SNsyncfiledir=/tmp +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "useradd -m xyzzy";useradd -m xyzzy;else useradd -m xyzzy;fi check:rc==0 -cmd:bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )" +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "bash -c \"( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )\"";bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )";else bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )";fi check:rc==0 -cmd:chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh";chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh;else chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh;fi check:rc==0 cmd:xdsh $$CN "useradd -m xyzzy" check:rc==0 @@ -18,6 +20,7 @@ cmd:xdsh $$CN "stat -c '%U' /tmp/sysctl.conf" check:output=~xyzzy cmd:xdsh $$CN "userdel xyzzy" check:rc==0 -cmd:userdel xyzzy +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "userdel xyzzy";userdel xyzzy;else userdel xyzzy;fi check:rc==0 +cmd:if [ -e /tmp/site.standa ]; then cat /tmp/site.standa | mkdef -z -f; rm -rf /tmp/site.standa; fi end diff --git a/xCAT-test/autotest/testcase/xdsh/cases0 b/xCAT-test/autotest/testcase/xdsh/cases0 index bab5e3f52..3166cbc8d 100644 --- a/xCAT-test/autotest/testcase/xdsh/cases0 +++ b/xCAT-test/autotest/testcase/xdsh/cases0 @@ -13,7 +13,7 @@ end start:xdsh_regular_command label:cn_os_ready,parallel_cmds -cmd:XCATBYPASS=1 xdsh $$CN "ps -ef" +cmd:xdsh $$CN "ps -ef" check:rc==0 check:output=~$$CN:\s+UID\s+PID\s+PPID\s+C\s+STIME\s+TTY\s+TIME\s+CMD end diff --git a/xCAT-test/autotest/testcase/xdsh/cases1 b/xCAT-test/autotest/testcase/xdsh/cases1 index f097cc54f..5da4adaa9 100644 --- a/xCAT-test/autotest/testcase/xdsh/cases1 +++ b/xCAT-test/autotest/testcase/xdsh/cases1 @@ -3,10 +3,10 @@ description: Test the exit code when command xdsh failed label:cn_os_ready,parallel_cmds cmd:xdsh $$CN date check:rc==0 -cmd:mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup;else mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup;fi check:rc==0 cmd:xdsh $$CN date check:rc!=0 -cmd:mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa;else mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa;fi check:rc==0 end diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth index 0dfe77213..a71b7b293 100755 --- a/xCAT/postscripts/configeth +++ b/xCAT/postscripts/configeth @@ -23,6 +23,15 @@ if [ -z "$UPDATENODE" ] || [ $UPDATENODE -ne 1 ] ; then reboot_nic_bool=0 fi fi +######################################################################## +# networkmanager_active=0: use network.service +# networkmanager_active=1: use NetworkManager +######################################################################## +networkmanager_active=0 +checkservicestatus NetworkManager > /dev/null +if [ $? -eq 0 ]; then + networkmanager_active=1 +fi function configipv4(){ str_if_name=$1 str_v4ip=$2 @@ -115,22 +124,29 @@ function configipv4(){ echo " vlan-raw-device ${parent_device}" >> $str_conf_file fi else + str_prefix=$(v4mask2prefix $str_v4mask) # Write the info to the ifcfg file for redhat + con_name="" str_conf_file="" - if [ $num_v4num -eq 0 ];then - str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${str_if_name}" - echo "DEVICE=${str_if_name}" > $str_conf_file - else - str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${str_if_name}:${num_v4num}" - echo "DEVICE=${str_if_name}:${num_v4num}" > $str_conf_file + if [ $num_v4num -ne 0 ]; then + str_if_name=${str_if_name}:${num_v4num} + fi + str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${str_if_name}" + if [ $networkmanager_active -eq 1 ]; then + con_name=$(nmcli dev show ${str_if_name}|grep CONNECTION|awk -F: '{print $2}'|sed 's/^[ \t]*$//g') + if [ "$con_name" == "--" ] ; then + nmcli con add type ethernet con-name ${str_if_name} ifname ${str_if_name} ipv4.method manual ipv4.addresses ${str_v4ip}/${str_prefix} + else + nmcli con mod "${con_name}" ipv4.method manual ipv4.addresses ${str_v4ip}/${str_prefix} + fi + else + echo "DEVICE=${str_if_name}" > $str_conf_file + echo "BOOTPROTO=none" >> $str_conf_file + echo "NM_CONTROLLED=no" >> $str_conf_file + echo "IPADDR=${str_v4ip}" >> $str_conf_file + echo "NETMASK=${str_v4mask}" >> $str_conf_file + echo "ONBOOT=yes" >> $str_conf_file fi - - - echo "BOOTPROTO=static" >> $str_conf_file - echo "NM_CONTROLLED=no" >> $str_conf_file - echo "IPADDR=${str_v4ip}" >> $str_conf_file - echo "NETMASK=${str_v4mask}" >> $str_conf_file - echo "ONBOOT=yes" >> $str_conf_file if [ "$str_nic_mtu" != "$str_default_token" ]; then echo "MTU=${str_nic_mtu}" >> $str_conf_file fi @@ -519,7 +535,6 @@ elif [ "$1" = "-s" ];then log_info "configeth on $NODE: config install nic, can not find information from dhcp lease file, return." exit 1 fi - str_inst_net=$(v4calcnet $str_inst_ip $str_inst_mask) num_index=1 while [ $num_index -le $NETWORKS_LINES ];do @@ -604,13 +619,25 @@ elif [ "$1" = "-s" ];then hostname $NODE echo $NODE > /etc/HOSTNAME else + #write ifcfg-* file for redhat + con_name="" + str_inst_prefix=$(v4mask2prefix ${str_inst_mask}) str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${str_inst_nic}" - echo "DEVICE=${str_inst_nic}" > $str_conf_file - echo "IPADDR=${str_inst_ip}" >> $str_conf_file - echo "NETMASK=${str_inst_mask}" >> $str_conf_file - echo "BOOTPROTO=static" >> $str_conf_file - echo "ONBOOT=yes" >> $str_conf_file - echo "HWADDR=${str_inst_mac}" >> $str_conf_file + if [ $networkmanager_active -eq 1 ]; then + con_name=$(nmcli dev show ${str_if_name}|grep CONNECTION|awk -F: '{print $2}'|sed 's/^[ \t]*$//g') + if [ "$con_name" == "--" ] ; then + nmcli con add type ethernet con-name ${str_inst_nic} ifname ${str_inst_nic} ipv4.method manual ipv4.addresses ${str_inst_ip}/${str_inst_prefix} + else + nmcli con mod "System ${str_inst_nic}" ipv4.method manual ipv4.addresses ${str_inst_ip}/${str_inst_prefix} + fi + else + echo "DEVICE=${str_inst_nic}" > $str_conf_file + echo "IPADDR=${str_inst_ip}" >> $str_conf_file + echo "NETMASK=${str_inst_mask}" >> $str_conf_file + echo "BOOTPROTO=none" >> $str_conf_file + echo "ONBOOT=yes" >> $str_conf_file + echo "HWADDR=${str_inst_mac}" >> $str_conf_file + fi if [ -n "${str_inst_mtu}" ];then echo "MTU=${str_inst_mtu}" >> $str_conf_file fi @@ -647,7 +674,7 @@ elif [ "$1" = "-s" ];then fi fi - if [ "$UPDATENODE" = "1" ] || grep "REBOOT=TRUE" /opt/xcat/xcatinfo >/dev/null 2>&1; then + if [ "$UPDATENODE" = "1" ] || [ "$NODESETSTATE" = "netboot" ] || [ "$NODESETSTATE" = "statelite" ] || grep "REBOOT=TRUE" /opt/xcat/xcatinfo >/dev/null 2>&1; then if [ "$str_os_type" = "debian" ];then ifdown --force $str_inst_nic else @@ -893,7 +920,6 @@ else bool_modify_flag=0 str_nic_status='down' str_his_file=${str_cfg_dir}xcat_history_important - str_history=`ip addr show dev $str_nic_name | grep inet | grep -iv dynamic | grep -iv link | grep $str_nic_name | awk '{print $2}'` old_ifs=$IFS IFS=$'\n' diff --git a/xCAT/postscripts/enablesnmp b/xCAT/postscripts/enablesnmp index c4b51df49..127876272 100755 --- a/xCAT/postscripts/enablesnmp +++ b/xCAT/postscripts/enablesnmp @@ -18,10 +18,7 @@ fi #get snmp attribute #NOTE: the length of SNMP Password has to be min=8 -xCATSettingsSTART="xCAT settings START" -xCATSettingsEND="xCAT settings END" -xCATSettingsOID="xCAT customized" -xCATSettingsInfo="Entries between the START and END lines will be replaced each time by running enablesnmp" +xCATSettingsOID="xCAT setting" snmpversion=$SNMPVERSION snmpuser=$SNMPUSER snmppwd=$SNMPPASSWD @@ -36,21 +33,8 @@ if [ $? -eq 0 ]; then cp ${snmp_conf}.cumulus $snmp_conf fi -grep "$xCATSettingsSTART" $snmp_conf 2>&1 1> /dev/null -if [ $? -eq 0 ]; then - #remove the previous snmp rule generated by xCAT - sed -i "/$xCATSettingsSTART/,/$xCATSettingsEND/ d" $snmp_conf -else - sed -i "/^\s*agentAddress/s/^/#/" $snmp_conf - sed -i '/agentAddress udp\:161\,udp6\:\[\:\:1\]\:161/s/^#//' $snmp_conf - sed -i "/view\s*systemonly\s*included\s*.1.3.6.1.2.1.17/s/^#//" $snmp_conf - sed -i "/pass_persist\s*.1.3.6.1.2.1.17\s*\/usr\/share\/snmp\/bridge_pp.py/s/^#//" $snmp_conf -fi - - -# Mark the start of xCAT section -echo "# $xCATSettingsSTART" >> $snmp_conf -echo "# $xCATSettingsInfo" >> $snmp_conf +# config snmpd to all the listening address +net add snmp-server listening-address all if [[ "$snmpversion" =~ "3" ]]; then #set up snmp version 3 @@ -58,21 +42,17 @@ if [[ "$snmpversion" =~ "3" ]]; then len=${#snmppwd} if [ $len -lt 8 ]; then echo "SNMP v3 specification requires password to have a minimum of 8 characters" - echo "# $xCATSettingsEND" >> $snmp_conf exit -1 fi - snmpauth=`echo $snmpauth | tr '[a-z]' '[A-Z]'` + snmpauth=`echo $snmpauth | awk '{print tolower($0)}'` if [ -n "$snmppriv" ]; then - snmppriv=`echo $snmppriv | tr '[a-z]' '[A-Z]'` - echo "createUser $snmpuser $snmpauth $snmppwd $snmppriv $snmppwd" >> $snmp_conf - echo "rwuser $snmpuser" >> $snmp_conf + snmppriv=`echo $snmppriv | awk '{print tolower($0)}'` + net add snmp-server username $snmpuser auth-$snmpauth $snmppwd encrypt-$snmppriv $snmppwd else - echo "createUser $snmpuser $snmpauth $snmppwd" >> $snmp_conf - echo "rouser $snmpuser" >> $snmp_conf + net add snmp-server username $snmpuser auth-$snmpauth $snmppwd fi else echo "Please define user/password/auth for SNMP v3 specification" - echo "# $xCATSettingsEND" >> $snmp_conf exit -1 fi elif [ -n "$snmppwd" ]; then @@ -81,10 +61,8 @@ elif [ -n "$snmpc" ]; then community=$snmpc fi -echo "rocommunity $community default" >> $snmp_conf -echo "rocommunity $community default -V systemonly" >> $snmp_conf - -echo "# $xCATSettingsEND" >> $snmp_conf +net add snmp-server readonly-community $community access any +net commit #create snmpd restart conf file mkdir -p /etc/systemd/system/snmpd.service.d diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 38ac8ca6a..a06539bbd 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -83,26 +83,6 @@ echolog() } - - - -update_VPD() -{ - if [ -f /usr/sbin/vpdupdate ]; then - vpdupdate - #logger -t xCAT -p local4.info "xcatdsklspost: updating VPD database" - echolog "info" "updating VPD database" - fi -} - -# Run updatevpd only when necessary -if [ -f /usr/sbin/lsvpd ]; then - /usr/sbin/lsvpd | grep -i -E 'cpu|processor' 2>&1 1>/dev/null - if [ "$?" = "1" ]; then - update_VPD - fi -fi - download_postscripts() { server=$1 @@ -304,6 +284,28 @@ else 3|6) MODE=$1;; esac fi + +update_VPD() +{ + if [ -f /usr/sbin/vpdupdate ]; then + echolog "info" "updating VPD database" + vpdupdate + #logger -t xCAT -p local4.info "xcatdsklspost: updating VPD database" + else + echolog "warning" "/usr/sbin/vpdupdate is not available, please check and do VPD update later" + fi +} + +if [ $NODE_DEPLOYMENT -eq 1 ] || [ "$MODE" = "4" ] || [ "$MODE" = "6" ]; then + # Run updatevpd only when necessary + if [ -f /usr/sbin/lsvpd ]; then + /usr/sbin/lsvpd | grep -i -E 'cpu|processor' 2>&1 1>/dev/null + if [ "$?" = "1" ]; then + update_VPD + fi + fi +fi + if [ $NODE_DEPLOYMENT -ne 1 ] && [ $MODE -ne 4 ] ; then echolog "info" "=============updatenode starting====================" fi