2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-28 17:46:40 +00:00

Merge pull request #7355 from xcat2/master

Merge from master to 2.16 branch for 2.16.5 release. (1)
This commit is contained in:
besawn
2023-03-02 17:47:47 -05:00
committed by GitHub
167 changed files with 1827 additions and 572 deletions
+9
View File
@@ -0,0 +1,9 @@
name: xcat_test
on: [pull_request, workflow_dispatch]
jobs:
xcat_pr_test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: sudo apt-get install -y fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl libcgi-pm-perl quilt openssh-server dpkg looptools genometools software-properties-common
- run: perl github_action_xcat_test.pl
+1 -1
View File
@@ -1 +1 @@
2.16.4
2.16.5
+1 -1
View File
@@ -105,7 +105,7 @@ for package in ${packages[@]}; do
done
# Supported distributions
dists="saucy trusty utopic xenial bionic"
dists="saucy trusty utopic xenial bionic focal"
c_flag= # xcat-core (trunk-delvel) path
d_flag= # xcat-dep (trunk) path
+16 -3
View File
@@ -239,9 +239,22 @@ if ! $GREP -q '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name xCAT Automatic Signing Key' >> $MACROS
fi
# Sign the rpms that are not already signed. The "standard input reopened" warnings are normal.
echo "===> Signing RPMs..."
$XCATCOREDIR/build-utils/rpmsign.exp `find . -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
# Sign the rpms that are not already signed. The "standard input reopened" warnings are normal.
# First, sign all non RH9 RPMS with DEFAULT algorithm, if running this script on RH7, most likely it will be SHA1
echo "===> Signing RPMs with DEFAULT algorithm..."
$XCATCOREDIR/build-utils/rpmsign.exp `find . -type f -name '*.rpm' ! -path './rh9/*'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
# Update $MACROS file so that RPMS will be signed with SHA256 algorithm
if ! $GREP -q '%_gpg_sign_cmd' $MACROS 2>/dev/null; then
echo '%__gpg_sign_cmd %{__gpg} gpg --force-v3-sigs --batch --verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename}' >> $MACROS
fi
# Second, sign all RH9 RPMS with SHA256 algorithm
echo "===> Signing RH9 RPMs with SHA265 algorithm..."
$XCATCOREDIR/build-utils/rpmsign.exp `find rh9 -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
# Remove SHA256 algorithm statement from $MACROS file, back to DEFAULT
sed -i '/__gpg_sign_cmd/d' $MACROS
# Create the repodata dirs
echo "===> Creating repodata directories..."
@@ -12,10 +12,10 @@ If you no longer want to use MySQL/MariaDB to maintain ``xcatdb``, and like to s
XCATBYPASS=1 restorexCATdb -p ~/xcat-dbback
* Change to PostgreSQL, following documentation: :doc:`/advanced/hierarchy/databases/postgres_install`
* To switch to PostgreSQL, follow: :doc:`/advanced/hierarchy/databases/postgres_install`
* Change back to default xCAT database, SQLite (**Note**: xCAT Hierarchy cluster will no longer work)
* To switch to default xCAT database, SQLite (**Note**: xCAT Hierarchy cluster will no longer work):
#. Stop the ``xcatd`` daemon on the management node. ::
@@ -33,7 +33,7 @@ If you no longer want to use MySQL/MariaDB to maintain ``xcatdb``, and like to s
mysql> drop user xcatadm;
#. Move, or remove, the ``/etc/xcat/cfglog`` file as it points xCAT to MySQL/MariaDB. (without this file, xCAT defaults to SQLite): ::
#. Move, or remove, the ``/etc/xcat/cfgloc`` file as it points xCAT to MySQL/MariaDB. (without this file, xCAT defaults to SQLite): ::
rm /etc/xcat/cfgloc
@@ -32,9 +32,9 @@ To remove ``xcatdb`` completely from the PostgreSQL database and restore xCAT da
rm -rf *
exit
#. Move, or remove, the ``/etc/xcat/cfglog`` file as it points xCAT to PostgreSQL. (without this file, xCAT defaults to SQLite): ::
#. Move, or remove, the ``/etc/xcat/cfgloc`` file as it points xCAT to PostgreSQL. (without this file, xCAT defaults to SQLite): ::
mv /etc/xcat/cfgloc /etc/xcat/cfglog.postgres
mv /etc/xcat/cfgloc /etc/xcat/cfgloc.postgres
#. Restore the PostgreSQL database into SQLite: ::
+5 -7
View File
@@ -1,17 +1,16 @@
OpenSSL Configuration
=====================
xCAT does not ship OpenSSL RPMS nor does it statically link to any OpenSSL libraries. Communication between the xCAT client and daemon utilizes OpenSSL and the administrator can configure SSL_version and SSL_cipher that should be used by xCAT daemons.
xCAT does not ship OpenSSL RPMS nor does it statically link to any OpenSSL libraries. Communication between the xCAT client and daemon utilizes OpenSSL and the administrator can configure the SSL_version and SSL_cipher that should be used by xCAT daemons.
The configuration is stored in the xCAT site table using the ``site.xcatsslversion`` and ``site.xcatsslciphers`` variables.
The configuration is stored in the xCAT site table using the ``site.xcatsslversion`` and ``site.xcatsslciphers`` attributes.
Configuration
-------------
``site.xcatsslversion`` is the ``SSL_version`` option ``xcatd`` used and passed to ``IO::Socket::SSL->start_SSL()``. By default, this value is set to empty. In this case, ``xcatd`` will use ``SSLv23:!SSLv2:!SSLv3:!TLSv1`` internally. For more detail, see https://metacpan.org/pod/IO::Socket::SSL
By default, xCAT ships with an empty value for ``site.xcatsslversion``. In this case, ``xcatd`` will use ``SSLv23:!SSLv2:!SSLv3:!TLSv1`` internally.
``site.xcatsslversion`` is the ``SSL_version`` option used by ``xcatd`` and passed to ``IO::Socket::SSL->start_SSL()``. See https://metacpan.org/pod/IO::Socket::SSL for more information. By default, xCAT ships with an empty value for ``site.xcatsslversion``. In this case, ``xcatd`` will use ``SSLv23:!SSLv2:!SSLv3:!TLSv1`` internally.
Here is an example of change ``site.xcatsslversoin`` to a different value. Say, TLS 1.2 is preferred. ::
Here is an example of changing ``site.xcatsslversion`` to a different value, ``TLSv1_2``, for example. ::
chtab key=xcatsslversion site.value=TLSv1_2
@@ -23,8 +22,7 @@ After making any changes to these configuration values, ``xcatd`` must be restar
service restart xcatd
If any mistakes have been made and communication is lost to xCAT, use ``XCATBYPASS`` to fix/remove the bad configuration: ::
If any mistakes have been made and communication is lost to xCAT, use ``XCATBYPASS`` to fix the bad configuration: ::
XCATBYPASS=1 tabedit site
+2 -2
View File
@@ -49,7 +49,7 @@ master_doc = 'index'
# General information about the project.
project = u'xCAT'
copyright = u'2015-2021, IBM Corporation'
copyright = u'2015-2022, IBM Corporation'
author = u'IBM Corporation'
# The version info for the project you're documenting, acts as replacement for
@@ -59,7 +59,7 @@ author = u'IBM Corporation'
# The short X.Y version.
version = '2'
# The full version, including alpha/beta/rc tags.
release = '2.16.4'
release = '2.16.5'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -77,31 +77,33 @@ where **/install/post/custom/<distro>/myotherlist** is another package list file
Note: the trailing **"#"** character at the end of the line. It is important to specify this character for correct pkglist parsing.
Group/Pattern Names
'''''''''''''''''''
Module/Group/Pattern Names
''''''''''''''''''''''''''
It is only supported for stateful deployment.
.. note:: On SLES pattern names are not supported for diskless deployment
In Linux, a groups of rpms can be packaged together into one package. It is called a group on RedHat, CentOS, Fedora and Scientific Linux. To get the list of available groups, run
On Linux, groups of rpms can be packaged together into one package. It can be a module or a group on RedHat, CentOS, Fedora and Scientific Linux. To get the list of available groups, run
* **[RHEL]** ::
yum grouplist
yum group list
yum module list
* **[SLES]** ::
zypper se -t pattern
You can specify in this file the group/pattern names by adding a **'@'** and a space before the group/pattern names. For example: ::
You can specify module/group/pattern names by adding a **'@'** before the module/group/pattern names. For example: ::
@ base
@base
@Security Tools
@ruby:2.6
Remove RPMs After Installing
''''''''''''''''''''''''''''
It is only supported for stateful deployment.
You can specify in this file that certain rpms to be removed after installing the new software. This is done by adding **'-'** before the rpm names you want to remove. For example: ::
You can specify that certain rpms to be removed after installing the new software. This is done by adding **'-'** before the rpm names you want to remove. For example: ::
-ntp
-@ruby:2.6
@@ -1,32 +1,31 @@
Generate Diskless Image
=======================
The ``copycds`` command copies the contents of the Linux media to ``/install/<os>/<arch>`` so that it will be available for installing nodes or creating diskless images. After executing ``copycds``, there are several ``osimage`` definitions created by default. Run ``tabdump osimage`` to view these images: ::
The ``copycds`` command copies the contents of the Linux media to ``/install/<os>/<arch>`` so that it will be available for installing nodes or creating diskless images. After executing ``copycds``, there are several ``osimage`` definitions created by default. Run ``lsdef -t osimage`` to view these images: ::
tabdump osimage
lsdef -t osimage
The output should be similar to the following: ::
"rhels7.1-ppc64le-install-compute",,"compute","linux",,"install",,"rhels7.1-ppc64le",,,"Linux","rhels7.1","ppc64le",,,,,,,,
"rhels7.1-ppc64le-install-service",,"service","linux",,"install",,"rhels7.1-ppc64le",,,"Linux","rhels7.1","ppc64le",,,,,,,,
"rhels7.1-ppc64le-stateful-mgmtnode",,"compute","linux",,"install",,"rhels7.1-ppc64le",,,"Linux","rhels7.1","ppc64le",,,,,,,,
"rhels7.1-ppc64le-netboot-compute",,"compute","linux",,"netboot",,"rhels7.1-ppc64le",,,"Linux","rhels7.1","ppc64le",,,,,,,,
rhels8.5.0-ppc64le-install-compute (osimage)
rhels8.5.0-ppc64le-install-service (osimage)
rhels8.5.0-ppc64le-netboot-compute (osimage)
The ``netboot-compute`` is the default **diskless** osimage created rhels7.1 ppc64le. Run ``genimage`` to generate a diskless image based on the "rhels7.1-ppc64le-netboot-compute" definition: ::
The ``netboot-compute`` is the default **diskless** osimage created for rhels8.5 ppc64le. Run ``genimage`` to generate a diskless image based on the `rhels8.5.0-ppc64le-netboot-compute` definition: ::
genimage rhels7.1-ppc64le-netboot-compute
genimage rhels8.5.0-ppc64le-netboot-compute
Before packing the diskless image, you have the opportunity to change any files in the image by changing to the ``rootimgdir`` and making modifications. (e.g. ``/install/netboot/rhels7.1/ppc64le/compute/rootimg``).
However it's recommended that all changes to the image are made via post install scripts so that it's easily repeatable. Although, instead, we recommend that you make all changes to the image via your postinstall script, so that it is repeatable. Refer to :doc:`/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/pre_post_script` for more details.
However it's recommended that all changes to the image are made via post install scripts so that it's easily repeatable. Refer to :doc:`/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/pre_post_script` for more details.
Pack Diskless Image
===================
After you run ``genimage`` to create the image, you can go ahead to pack the image to create the ramdisk: ::
After running ``genimage`` to create the image, run ``packimage`` to create the ramdisk: ::
packimage rhels7.1-ppc64le-netboot-compute
packimage rhels8.5.0-ppc64le-netboot-compute
Export and Import Image
=======================
@@ -34,18 +33,17 @@ Export and Import Image
Overview
--------
Note: There is a current restriction that exported 2.7 xCAT images cannot be imported on 2.8 xCAT `<https://sourceforge.net/p/xcat/bugs/3813/>`_. This is no longer a restrictions, if you are running xCAT 2.8.3 or later.
.. note:: There is a current restriction that exported 2.7 xCAT images cannot be imported on 2.8 xCAT `<https://sourceforge.net/p/xcat/bugs/3813/>`_.
We want to create a system of making xCAT images more portable so that they can be shared and prevent people from reinventing the wheel. While every install is unique there are some things that can be shared among different sites to make images more portable. In addition, creating a method like this allows us to create snap shots of images we may find useful to revert to in different situations.
Image exporting and importing are supported for stateful (diskful) and stateless (diskless) clusters. The following documentation will show how to use :doc:`imgexport </guides/admin-guides/references/man1/imgexport.1>` to export images and :doc:`imgimport </guides/admin-guides/references/man1/imgimport.1>` to import images.
Image exporting and importing is supported for stateful (diskful) and stateless (diskless) clusters. The following documentation will show how to use :doc:`imgexport </guides/admin-guides/references/man1/imgexport.1>` to export images and :doc:`imgimport </guides/admin-guides/references/man1/imgimport.1>` to import images.
Exporting an image
------------------
1, The user has a working image and the image is defined in the osimage table and linuximage table.
example: ::
Working image::
lsdef -t osimage myimage
Object name: myimage
@@ -64,34 +62,28 @@ Exporting an image
provmethod=netboot
rootimgdir=/install/netboot/sles12/ppc64le/compute1
synclists=/install/custom/netboot/sles/compute1.list
2, The user runs the imgexport command.
example: ::
Run the ``imgexport`` command::
imgexport myimage -p node1 -e /install/postscripts/myscript1 -e /install/postscripts/myscript2
(-p and -e are optional)
A bundle file called myimage.tgz will be created under the current directory. The bundle file contains the ramdisk, boot kernel, the root image and all the configuration files for generating the image for a diskless cluster. For diskful, it contains the kickstart/autoyast configuration file. (see appendix). The -p flag puts the names of the postscripts for node1 into the image bundle. The -e flags put additional files into the bundle. In this case two postscripts myscript1 and myscript2 are included.
A bundle file called `myimage.tgz` will be created under the current directory. The bundle file contains the ramdisk, boot kernel, the root image and all the configuration files for generating the image for a diskless node. For diskful, it contains the kickstart/autoyast configuration file. (see appendix). The optional **-p** flag puts the names of the postscripts for node1 into the image bundle. The optional **-e** flags put additional files into the bundle. In this case two postscripts `myscript1` and `myscript2` are included.
This image can now be used on other systems.
Importing an image
------------------
#. User downloads a image bundle file from somewhere. (Sumavi.com will be hosting many of these).
#. User runs the imgimport command.
example: ::
#. Download the image bundle file generated by the ``imgexport``.
#. Run the ``imgimport`` command.::
imgimport myimage.tgz -p group1
(-p is optional)
This command fills out the osimage and linuximage tables, and populates file directories with appropriate files from the image bundle file such as ramdisk, boot kernel, root image, configuration files for diskless. Any additional files that come with the bundle file will also be put into the appropriate directories. If -p flag is specified, the postscript names that come with the image will be put the into the postscripts table for the given node or group.
This command fills out the osimage and linuximage tables, and populates file directories with appropriate files from the image bundle file such as ramdisk, boot kernel, root image, configuration files for diskless. Any additional files that come with the bundle file will also be put into the appropriate directories. If optional **-p** flag is specified, the postscript names that come with the image will be put the into the postscripts table for the given node or group.
Copy an image to a new image name on the MN
-------------------------------------------
Very often, the user wants to make a copy of an existing image on the same xCAT mn as a start point to make modifications. In this case, you can run imgexport first as described on chapter 2, then run imgimport with -f flag to change the profile name of the image. That way the image will be copied into a different directory on the same xCAT mn.
example: ::
Very often, the user wants to make a copy of an existing image on the same xCAT MN as a start point to make modifications. In this case, you can run ``imgexport`` first as described above, then run imgimport with **-f** flag to change the profile name of the image. That way the image will be copied into a different directory on the same xCAT MN.::
imgimport myimage.tgz -p group1 -f compute2
@@ -100,37 +92,34 @@ Modify an image (optional)
Skip this section if you want to use the image as is.
1, The use can modify the image to fit his/her own need. The following can be modified.
1. You can modify the image to fit your needs. The following can be modified.
* Modify .pkglist file to add or remove packages that are from the os distro
* ``.pkglist`` file to add or remove packages that are from the os distro
* Modify .otherpkgs.pkglist to add or remove packages from other sources. Refer to ``Using_Updatenode`` for details
* ``.otherpkgs.pkglist`` to add or remove packages from other sources. Refer to :doc:`Using updatenode </guides/admin-guides/manage_clusters/ppc64le/updatenode>` for details
* For diskful, modify the .tmpl file to change the kickstart/autoyast configuration
* For diskful, ``.tmpl`` file to change the kickstart/autoyast configuration
* Modify .synclist file to change the files that are going to be synchronized to the nodes
* ``.synclist`` file to change the files that are going to be synchronized to the nodes
* Modify the postscripts table for the nodes to be deployed
* postscripts table for the nodes to be deployed
* Modify the osimage and/or linuximage tables for the location of the source rpms and the rootimage location
* the osimage and/or linuximage tables for the location of the source rpms and the rootimage location
2, Run genimage: ::
2. Run ``genimage``: ::
genimage image_name
3, Run packimage: ::
3. Run ``packimage``: ::
packimage image_name
Deploying nodes
---------------
You can change the provmethod of the node to the new image_name if different: ::
You can now deploy the node with the new `<image_name>` ::
chdef <noderange> provmethod=<image_name>
nodeset <noderange> osimage=<image_name>
and the node is ready to deploy.
rinstall <noderange> osimage=<image_name>
Appendix
--------
@@ -144,7 +133,7 @@ You can only export/import one image at a time. Each tarball will have the follo
manifest.xml
~~~~~~~~~~~~
The manifest.xml will be analogous to an autoyast or windows unattend.xml file where it tells xCAT how to store the items. The following is an example for a diskless cluster: ::
The ``manifest.xml`` will be analogous to an autoyast or windows ``unattend.xml`` file where it tells xCAT how to store the items. The following is an example for a diskless cluster: ::
manifest.xml:
@@ -207,5 +196,5 @@ For diskless: ::
x.exlist
Note: Although the postscripts names can be exported by using the -p flag. The postscripts themselves are not included in the bundle file by default. The use has to use -e flag to get them included one by one if needed.
.. note:: Although the postscripts names can be exported by using the **-p** flag, the postscripts themselves are not included in the bundle file by default. Use **-e** flag to get them included one by one if needed.
@@ -1,15 +1,16 @@
Configure passwords
===================
#. Configure the system password for the ``root`` user on the compute nodes.
#. Configure the system password for the ``root`` user on the compute nodes. This password can be provided in encrypted or clear text form using the :doc:`chtab </guides/admin-guides/references/man8/chtab.8>` command.
* Clear text: ::
* Set using the :doc:`chtab </guides/admin-guides/references/man8/chtab.8>` command: ::
chtab key=system passwd.username=root passwd.password=abc123
To encrypt the password using ``openssl``, use the following command: ::
* Encrypted using ``openssl``: ::
chtab key=system passwd.username=root passwd.password=`openssl passwd -1 abc123`
chtab key=system passwd.username=root passwd.password=`openssl passwd -6 abc123`
#. Configure the passwords for Management modules of the compute nodes.
@@ -81,7 +81,7 @@ For PPC (with HMC) specific:
============================
The first form of \ **mkvm**\ command creates new partition(s) with the same profile/resources as the partition specified by \ *singlenode*\ . The -i and \ *noderange*\ specify the starting numeric partition number and the \ *noderange*\ for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition.
The first form of \ **mkvm**\ command creates new partition(s) with the same profile/resources as the partition specified by \ *singlenode*\ . The \ **-i**\ and \ *noderange*\ specify the starting numeric partition number and the \ *noderange*\ for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition.
The second form of this command duplicates all the partitions from the source specified by \ *profile*\ to the destination specified by \ *destcec*\ . The source and destination CECs can be managed by different HMCs.
@@ -94,9 +94,9 @@ For PPC (using Direct FSP Management) specific:
===============================================
With option \ *full*\ , a partition using all the resources on a normal power machine will be created.
With option \ **-**\ **-full**\ , a partition using all the resources on a normal power machine will be created.
If no option is specified, a partition using the parameters specified with attributes such as 'vmcpus', 'vmmemory', 'vmphyslots', 'vmothersetting', 'vmnics', 'vmstorage' will be created. Those attributes can either be specified with '\*def' commands running before or be specified with this command.
If no option is specified, a partition using the parameters specified with attributes such as \ **vmcpus**\ , \ **vmmemory**\ , \ **vmphyslots**\ , \ **vmothersetting**\ , \ **vmnics**\ , \ **vmstorage**\ will be created. Those attributes can either be specified with '\*def' commands running before or be specified with this command.
For KVM and VMware:
@@ -148,9 +148,9 @@ OPTIONS
\ **vmcpus=**\ \ *value*\ \ **vmmemory=**\ \ *value*\ \ **vmphyslots=**\ \ *value*\ \ **vmothersetting=**\ \ *value*\ \ **vmnics=**\ \ *value*\ \ **vmstorage=**\ \ *value*\ [\ **-**\ **-vios**\ ]
To specify the parameters which are used to create a partition. The \ *vmcpus*\ , \ *vmmemory*\ are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to lsvm(1)|lsvm.1 for more information about 'drc_index' for \ *vmphyslots*\ .
To specify the parameters which are used to create a partition. The \ **vmcpus**\ , \ **vmmemory**\ are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to lsvm(1)|lsvm.1 for more information about 'drc_index' for \ *vmphyslots*\ .
The option \ *vios*\ is used to specify the partition that will be created is a VIOS partition. If specified, the value for \ *vmstorage*\ shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for \ *vmphyslots*\ , all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of \ *vios_name:server_slotid*\ to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition.
The option \ **vios**\ is used to specify the partition that will be created is a VIOS partition. If specified, the value for \ **vmstorage**\ shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for \ **vmphyslots**\ , all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of \ **vios_name:server_slotid**\ to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition.
@@ -37,11 +37,9 @@ DESCRIPTION
***********
\ **mysqlsetup**\ - Sets up the MySQL or MariaDB database (linux only for MariaDB) for xCAT to use. The mysqlsetup script is run on the Management Node as root after the MySQL code or MariaDB code has been installed. Before running the init option, the MySQL server should be stopped, if it is running. The xCAT daemon, xcatd, must be running, do not stop it. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to MySQL or MariaDB and restarting the xcatd daemon as well as the MySQL daemon. For full information on all the steps that will be done, read the "Configure MySQL and Migrate xCAT Data to MySQL" sections in
\ **mysqlsetup**\ - Sets up the MySQL or MariaDB database (linux only for MariaDB) for xCAT to use. The \ **mysqlsetup**\ script is run on the Management Node as root after the MySQL or MariaDB packages have been installed. Before running the \ **-**\ **-init**\ option, the MySQL server should be stopped, if it is running. The xCAT daemon, \ **xcatd**\ , must be running, do not stop it. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to MySQL or MariaDB and restarting the \ **xcatd**\ daemon as well as the MySQL daemon. For more information, see https://xcat-docs.readthedocs.io/en/stable/advanced/hierarchy/databases/index.html#mysql-mariadb
\ **Setting_Up_MySQL_as_the_xCAT_DB**\
Two passwords must be supplied for the setup, a password for the xcatadmin id and a password for the root id in the MySQL database. These will be prompted for interactively, unless the environment variables XCATMYSQLADMIN_PW and XCATMYSQLROOT_PW are set to the passwords for the xcatadmin id and root id in the database,resp.
Two passwords must be supplied for the setup, a password for the xcatadmin id and a password for the root id in the MySQL database. These will be prompted for interactively, unless the environment variables \ **XCATMYSQLADMIN_PW**\ and \ **XCATMYSQLROOT_PW**\ are set to the passwords for the xcatadmin id and root id in the database,respectively.
Note below we refer to MySQL but it works the same for MariaDB.
@@ -72,14 +70,14 @@ OPTIONS
\ **-i|-**\ **-init**\
The init option is used to setup a xCAT database on an installed MySQL or MariaDB server for xCAT to use. The mysqlsetup script will check for the installed MariaDB server rpm first and will use MariaDB if it is installed. This involves creating the xcatdb database, the xcatadmin id, allowing access to the xcatdb database by the Management Node. It customizes the my.cnf configuration file for xcat and starts the MySQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb MySQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the MySQL database and restarts the xcatd daemon using the database.
On AIX, it additionally setup the mysql id and group and corrects the permissions in the MySQL install directories. For AIX, you should be using the MySQL rpms available from the xCAT website. For Linux, you should use the MySQL or MariaDB rpms shipped with the OS. You can chose the -f and/or the -o option, to run after the init.
The \ **-**\ **-init**\ option is used to setup a xCAT database on an installed MySQL or MariaDB server for xCAT to use. The \ **mysqlsetup**\ script will check for the installed MariaDB server rpm first and will use MariaDB if it is installed. This involves creating the xcatdb database, the xcatadmin id, allowing access to the xcatdb database by the Management Node. It customizes the \ **my.cnf**\ configuration file for xcat and starts the MySQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb MySQL database. It creates the \ **/etc/xcat/cfgloc**\ file to point the xcatd daemon to the MySQL database and restarts the xcatd daemon using the database.
On AIX, it additionally setup the mysql id and group and corrects the permissions in the MySQL install directories. For AIX, you should be using the MySQL rpms available from the xCAT website. For Linux, you should use the MySQL or MariaDB rpms shipped with the OS. You can chose the \ **-f**\ and/or the \ **-o**\ option, to run after the <-**\ **-init>.
\ **-u|-**\ **-update**\
To run the update option, you must first have run the -i option and have xcat successfully running on the MySQL database. You can chose the -f and/or the -o option, to update.
To run the update option, you must first have run the \ **-i**\ option and have xcat successfully running on the MySQL database. You can chose the \ **-f**\ and/or the \ **-o**\ option, to update.
@@ -91,17 +89,13 @@ OPTIONS
\ **-o|-**\ **-odbc**\
This option sets up the ODBC /etc/../odbcinst.ini, /etc/../odbc.ini and the .odbc.ini file in roots home directory will be created and initialized to run off the xcatdb MySQL database.
See "Add ODBC Support" in
Setting_Up_MySQL_as_the_xCAT_DB
This option sets up the ODBC \ **/etc/../odbcinst.ini**\ , \ **/etc/../odbc.ini**\ and the \ **.odbc.ini**\ file in roots home directory will be created and initialized to run off the xcatdb MySQL database.
\ **-L|-**\ **-LL**\
Additional database configuration specifically for the LoadLeveler product.
See "Add ODBC Support" in
Setting_Up_MySQL_as_the_xCAT_DB
@@ -47,7 +47,7 @@ DESCRIPTION
The \ **rmvm**\ command removes the partitions specified in \ *noderange*\ . If \ *noderange*\ is an CEC, all the partitions associated with that CEC will be removed. Note that removed partitions are automatically removed from the xCAT database. For IVM-managed systems, care must be taken to not remove the VIOS partition, or all the associated partitions will be removed as well.
For DFM-managed (short For Direct FSP Management mode) normal power machines, only partitions can be removed. No options is needed.
For DFM-managed (short For Direct FSP Management mode) normal Power machines, only partitions can be removed. No options are needed.
*******
@@ -55,23 +55,50 @@ OPTIONS
*******
\ **-h|-**\ **-help**\ Display usage message.
\ **-v|-**\ **-version**\ Command Version.
\ **-h|-**\ **-help**\
Display usage message.
\ **-V|-**\ **-verbose**\ Verbose output.
\ **-r**\ Retain the data object definitions of the nodes.
\ **-v|-**\ **-version**\
Command Version.
\ **-V|-**\ **-verbose**\
Verbose output.
\ **-r**\
Retain the data object definitions of the nodes.
\ **-**\ **-service**\
Remove the service partitions of the specified CECs.
\ **-**\ **-service**\ Remove the service partitions of the specified CECs.
\ **-p**\
KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. Storage devices of "raw" or "block" type are not removed.
PPC: Remove the specified partition on normal Power machine.
KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. Storage devices of "raw" or "block" type are not removed.
PPC: Remove the specified partition on normal power machine.
\ **-f**\
Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested.
\ **-f**\ Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested.
************
@@ -172,7 +199,7 @@ Output is similar to:
gpok4: Deleting virtual server LNX4... Done
6. To remove a DFM-managed partition on normal power machine:
6. To remove a DFM-managed partition on normal Power machine:
.. code-block:: perl
@@ -777,9 +777,7 @@ EXAMPLES
4.
To display the frame number for frame 9A00-10000001
4. To display the frame number for frame 9A00-10000001
.. code-block:: perl
@@ -128,15 +128,15 @@ The xCAT-test test cases are in flat text format, the testing framework will par
#optional, description of the test case
description: what the test case is for?
#optional, environment requirements
os:AIX/Linux
os:AIX/Linux/sles/ubuntu/rhels/rhels7/rhels8
#optional, environment requirements
arch:ppc/x86
arch:ppc/ppc64/ppc64le/x86_64
#optional, environment requirements
hcp:hmc/mm/bmc/fsp
hcp:hmc/mm/bmc/fsp/ipmi/openbmc
#optional, label
label:label1
#required, command need to run
cmd:comand
cmd:command
#optional, check return code of last executed command
check:rc == or != return code
#optional, check output of last executed command
@@ -155,7 +155,7 @@ EXAMPLES
1.
To run all test cases related command rpower:
To run all test cases related to command \ **rpower**\ :
.. code-block:: perl
@@ -167,7 +167,7 @@ EXAMPLES
2.
To run customized bundle with /tmp/config file:
To run customized bundle with \ */tmp/config*\ file:
.. code-block:: perl
@@ -181,7 +181,7 @@ EXAMPLES
3.
To run specified test cases with /tmp/config file:
To run specified test cases with \ */tmp/config*\ file:
.. code-block:: perl
@@ -193,7 +193,7 @@ EXAMPLES
4.
To add a new case to test \ **chvm**\ . In the example, we assume that the min_mem should not be equal to 16 in the lpar profile of computenode. The case name is chvm_custom. It create a test lpar named testnode firstly, that change the min_mem of the lpar to 16 using chvm, then check if min_mem have changed correctly. At last, the testnode be remove to ensure no garbage produced in the cases.
To add a new test case to test \ **chvm**\ . In this example, we assume that the \ **min_mem**\ should not be equal to 16 in the lpar profile of computenode. The case name is \ **chvm_custom**\ . It creates a test lpar named \ **testnode**\ first, then changes the \ **min_mem**\ of the lpar to 16 using \ **chvm**\ , then checks if \ **min_mem**\ have changed correctly. Finally, the \ **testnode**\ is removed.
.. code-block:: perl
@@ -44,7 +44,7 @@ nodetype Attributes:
\ **os**\
The operating system deployed on this node. Valid values: AIX, rhels\*,rhelc\*, rhas\*,centos\*,rocky\*,SL\*, fedora\*, sles\* (where \* is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.
The operating system deployed on this node. Valid values: AIX, rhels\*,rhelc\*, rhas\*,centos\*, alma\*, rocky\*,SL\*, fedora\*, sles\* (where \* is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.
@@ -104,7 +104,7 @@ osimage Attributes:
\ **osvers**\
The Linux operating system deployed on this node. Valid values: rhels\*,rhelc\*, rhas\*,centos\*,rocky\*,SL\*, fedora\*, sles\* (where \* is the version #).
The Linux operating system deployed on this node. Valid values: rhels\*,rhelc\*, rhas\*,centos\*,alma\*, rocky\*,SL\*, fedora\*, sles\* (where \* is the version #).
@@ -50,7 +50,7 @@ passwd Attributes:
\ **password**\
The default password for this type of component. On Linux, a crypted form could be provided. Hashes starting with $1$, $5$ and $6$ (md5, sha256 and sha512 respectively) are supported.
The default password for this type of component. On Linux, a crypted form could be provided for the "system" component, which will be used during initial node provisioning. Hashes starting with $1$, $5$ and $6$ (md5, sha256 and sha512 respectively) are supported.
@@ -733,7 +733,7 @@ group Attributes:
\ **os**\ (nodetype.os)
The operating system deployed on this node. Valid values: AIX, rhels\*,rhelc\*, rhas\*,centos\*,rocky\*,SL\*, fedora\*, sles\* (where \* is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.
The operating system deployed on this node. Valid values: AIX, rhels\*,rhelc\*, rhas\*,centos\*, alma\*, rocky\*,SL\*, fedora\*, sles\* (where \* is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.
@@ -739,7 +739,7 @@ node Attributes:
\ **os**\ (nodetype.os)
The operating system deployed on this node. Valid values: AIX, rhels\*,rhelc\*, rhas\*,centos\*,rocky\*,SL\*, fedora\*, sles\* (where \* is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.
The operating system deployed on this node. Valid values: AIX, rhels\*,rhelc\*, rhas\*,centos\*, alma\*, rocky\*,SL\*, fedora\*, sles\* (where \* is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.
@@ -249,7 +249,7 @@ osimage Attributes:
\ **osvers**\ (osimage.osvers)
The Linux operating system deployed on this node. Valid values: rhels\*,rhelc\*, rhas\*,centos\*,rocky\*,SL\*, fedora\*, sles\* (where \* is the version #).
The Linux operating system deployed on this node. Valid values: rhels\*,rhelc\*, rhas\*,centos\*,alma\*, rocky\*,SL\*, fedora\*, sles\* (where \* is the version #).
@@ -43,10 +43,10 @@ Prepare the Management Node ``xcatmn.mydomain.com``
wget https://raw.githubusercontent.com/xcat2/xcat-core/master/xCAT-server/share/xcat/tools/go-xcat -O - >/tmp/go-xcat
chmod +x /tmp/go-xcat
go-xcat --yes install
/tmp/go-xcat --yes install
source /etc/profile.d/xcat.sh
#. Configure the system password for the root user on the compute nodes: ::
#. Configure the system password for the ```root`` user on the compute nodes: ::
chtab key=system passwd.username=root passwd.password=abc123
@@ -89,7 +89,7 @@ Stage 2 Provision a node and manage it with parallel shell
copycds RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso
After ``copycds``, the corresponding basic osimage will be generated automatically. And then you can list the new osimage name here. You can refer document to customize the package list or postscript for target compute nodes, but here just use the default one: ::
After ``copycds``, the corresponding basic osimage will be generated automatically. Later, package list or postscripts for target compute nodes can be customised. List generated osimages: ::
lsdef -t osimage
+2 -1
View File
@@ -1,5 +1,6 @@
Version,Release Date,New OS Supported,Release Notes
2.16.4,2022-06-07,"RHEL 8.5,SLES15.3",`2.16.4 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.4_Release_Notes>`_
2.16.5,2023-03-08,"RHEL 8.6",`2.16.5 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.5_Release_Notes>`_
2.16.4,2022-06-20,"RHEL 8.5,SLES15.3",`2.16.4 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.4_Release_Notes>`_
2.16.3,2021-11-17,"RHEL 8.4",`2.16.3 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.3_Release_Notes>`_
2.16.2,2021-05-25,"RHEL 8.3",`2.16.2 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.2_Release_Notes>`_
2.16.1,2020-11-06,"RHEL 8.2",`2.16.1 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.1_Release_Notes>`_
1 Version Release Date New OS Supported Release Notes
2 2.16.4 2.16.5 2022-06-07 2023-03-08 RHEL 8.5,SLES15.3 RHEL 8.6 `2.16.4 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.4_Release_Notes>`_ `2.16.5 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.5_Release_Notes>`_
3 2.16.4 2022-06-20 RHEL 8.5,SLES15.3 `2.16.4 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.4_Release_Notes>`_
4 2.16.3 2021-11-17 RHEL 8.4 `2.16.3 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.3_Release_Notes>`_
5 2.16.2 2021-05-25 RHEL 8.3 `2.16.2 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.2_Release_Notes>`_
6 2.16.1 2020-11-06 RHEL 8.2 `2.16.1 Release Notes <https://github.com/xcat2/xcat-core/wiki/XCAT_2.16.1_Release_Notes>`_
+605
View File
@@ -0,0 +1,605 @@
# IBM(c) 2022 EPL license http://www.eclipse.org/legal/epl-v10.html
use strict;
use warnings;
use Getopt::Long;
use Data::Dumper;
use Time::Local;
use File::Basename;
use File::Path;
use File::Find;
use LWP::UserAgent;
use HTTP::Request;
use Encode;
use Encode::CN;
use JSON;
use URI::Escape;
use LWP::Simple;
use Cwd;
use Term::ANSIColor qw(:constants);
$Term::ANSIColor::AUTORESET = 1;
#---Global attributes---
my $rst = 0;
my $retries = 5; # Try this many times to get response
my $check_result_str="``CI CHECK RESULT`` : ";
my $last_func_start = timelocal(localtime());
my $GITHUB_API = "https://api.github.com";
#--------------------------------------------------------
# Fuction name: runcmd
# Description: run a command after 'cmd' label in one case
# Attributes:
# Return code:
# $::RUNCMD_RC : the return code of command
# @$outref : the output of command
#--------------------------------------------------------
sub runcmd
{
my ($cmd) = @_;
my $rc = 0;
$::RUNCMD_RC = 0;
my $outref = [];
@$outref = `$cmd 2>&1`;
if ($?)
{
$rc = $?;
$rc = $rc >> 8;
$::RUNCMD_RC = $rc;
}
chomp(@$outref);
return @$outref;
}
#--------------------------------------------------------
# Fuction name: get_files_recursive
# Description: Search all file in one directory recursively
# Attributes:
# $dir (input attribute)
# The target scan directory
# $files_path_ref (output attribute)
# the reference of array where save all vaild files under $dir
# Return code:
#--------------------------------------------------------
sub get_files_recursive
{
my $dir = shift;
my $files_path_ref = shift;
my $fd = undef;
if(!opendir($fd, $dir)){
print "[get_files_recursive]: failed to open $dir :$!\n";
return 1;
}
for (; ;)
{
my $direntry = readdir($fd);
last unless (defined($direntry));
next if ($direntry =~ m/^\.\w*/);
next if ($direntry eq '..');
my $target = "$dir/$direntry";
if (-d $target) {
get_files_recursive($target, $files_path_ref);
} else {
push(@{$files_path_ref}, glob("$target\n"));
}
}
closedir($fd);
return 0;
}
#--------------------------------------------------------
# Fuction name: check_pr_format
# Description:
# Attributes:
# Return code:
#--------------------------------------------------------
sub check_pr_format{
if($ENV{'TRAVIS_EVENT_TYPE'} eq "pull_request"){
my $pr_url = "$GITHUB_API/repos/$ENV{'TRAVIS_REPO_SLUG'}/pulls/$ENV{'TRAVIS_PULL_REQUEST'}";
my $pr_url_resp;
my $counter = 1;
while($counter <= $retries) {
$pr_url_resp = get($pr_url);
if ($pr_url_resp) {
last; # Got response, no more retries
} else {
sleep($counter*2); # Sleep and try again
print "[check_pr_format] $counter Did not get response, sleeping ". $counter*2 . "\n";
$counter++;
}
}
unless ($pr_url_resp) {
print "[check_pr_format] After $retries retries, not able to get response from $pr_url \n";
# Failed after trying a few times, return error
return $counter;
}
my $pr_content = decode_json($pr_url_resp);
my $pr_title = $pr_content->{title};
my $pr_body = $pr_content->{body};
my $pr_milestone = $pr_content->{milestone};
my $pr_labels_len = @{$pr_content->{labels}};
#print "[check_pr_format] Dumper pr_content:\n";
#print Dumper $pr_content;
print "[check_pr_format] pr title = $pr_title\n";
print "[check_pr_format] pr body = $pr_body \n";
my $checkrst="";
if(! $pr_title){
$checkrst.="Missing title.";
}
if(! $pr_body){
$checkrst.="Missing description.";
}
if(! $pr_milestone){
$checkrst.="Missing milestone.";
}
if(! $pr_labels_len){
$checkrst.="Missing labels.";
}
# Guard against root user making commits
$checkrst.=check_commit_owner('root');
if(length($checkrst) == 0){
$check_result_str .= "> **PR FORMAT CORRECT**";
#send_back_comment("$check_result_str");
}else{
# Warning if missing milestone or labels, others are errors
if($checkrst =~ /milestone/ || $checkrst =~ /labels/){
$check_result_str .= "> **PR FORMAT WARNING** : $checkrst";
#send_back_comment("$check_result_str");
}else{
$check_result_str .= "> **PR FORMAT ERROR** : $checkrst";
#send_back_comment("$check_result_str");
return 1;
}
}
}
return 0;
}
#--------------------------------------------------------
# Fuction name: check_commit_owner
# Description: Verify commits are not done by specified user
# Attributes: user login to reject
# Return:
# Error string -User rejected,
# Empty string -User not rejected
#--------------------------------------------------------
sub check_commit_owner{
my $invalid_user = shift;
if($ENV{'TRAVIS_EVENT_TYPE'} eq "pull_request"){
my $commits_content;
my $commits_len = 0;
my $json = new JSON;
my $commits_url = "$GITHUB_API/repos/$ENV{'TRAVIS_REPO_SLUG'}/pulls/$ENV{'TRAVIS_PULL_REQUEST'}/commits";
my $commits_url_resp;
my $counter = 1;
while($counter <= $retries) {
$commits_url_resp = get($commits_url);
if ($commits_url_resp) {
last; # Got response, no more retries
} else {
sleep($counter*2); # Sleep and try again
print "[check_commit_owner] $counter Did not get response, sleeping ". $counter*2 . "\n";
$counter++;
}
}
if ($commits_url_resp) {
$commits_content = $json->decode($commits_url_resp);
$commits_len = @$commits_content;
} else {
print "[check_commit_owner] After $retries retries, not able to get response from $commits_url \n";
return "Unable to verify login of committer.";
}
if($commits_len > 0) {
foreach my $commit (@{$commits_content}){
my $committer = $commit->{committer};
my $committer_login = $committer->{login};
print "[check_commit_owner] Committer login $committer_login \n";
if($committer_login =~ /^$invalid_user$/) {
# Committer logins matches
return "Commits by $invalid_user not allowed";
}
}
}
}
return "";
}
#--------------------------------------------------------
# Fuction name: send_back_comment
# Description: Append to comment of the PR passed $message
# Attributes: Message to append to PR
# Return code:
#--------------------------------------------------------
sub send_back_comment{
my $message = shift;
my $comment_url = "$GITHUB_API/repos/$ENV{'TRAVIS_REPO_SLUG'}/issues/$ENV{'TRAVIS_PULL_REQUEST'}/comments";
my $json = new JSON;
my $comment_len = 0;
my $comment_content;
my $comment_url_resp;
my $counter = 1;
while($counter <= $retries) {
$comment_url_resp = get($comment_url);
if ($comment_url_resp) {
last; # Got response, no more retries
} else {
sleep($counter*2); # Sleep and try again
print "[send_back_comment] $counter Did not get response, sleeping ". $counter*2 . "\n";
$counter++;
}
}
unless ($comment_url_resp) {
print "[send_back_comment] After $retries retries, not able to get response from $comment_url \n";
# Failed after trying a few times, return
return;
}
print "\n\n>>>>>Dumper comment_url_resp:\n";
print Dumper $comment_url_resp;
$comment_content = $json->decode($comment_url_resp);
$comment_len = @$comment_content;
my $post_url = $comment_url;
my $post_method = "POST";
if($comment_len > 0){
foreach my $comment (@{$comment_content}){
if($comment->{'body'} =~ /CI CHECK RESULT/) {
$post_url = $comment->{'url'};
$post_method = "PATCH";
}
}
}
print "[send_back_comment] method = $post_method to $post_url. Message = $message\n";
if ( $ENV{'xcatbotuser'} and $ENV{'xcatbotpw'}) {
`curl -u "$ENV{'xcatbotuser'}:$ENV{'xcatbotpw'}" -X $post_method -d '{"body":"$message"}' $post_url`;
}
else {
print "Not able to update pull request with message: $message\n";
}
}
#--------------------------------------------------------
# Fuction name: build_xcat_core
# Description:
# Attributes:
# Return code:
#--------------------------------------------------------
sub build_xcat_core{
my @output;
my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1 GPGSIGN=0";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
my $lastline = $output[-1];
$lastline =~ s/[\r\n\t\\"']*//g;
print "[build_xcat_core] $cmd ....[Failed]\n";
$check_result_str .= "> **BUILD ERROR**, Please click ``Details`` label in ``Merge pull request`` box for detailed information";
print $check_result_str;
return 1;
}else{
print "[build_xcat_core] $cmd ....[Pass]\n";
$check_result_str .= "> **BUILD SUCCESSFUL** ";
print $check_result_str;
}
return 0;
}
#--------------------------------------------------------
# Fuction name: install_xcat
# Description:
# Attributes:
# Return code:
#--------------------------------------------------------
sub install_xcat{
my @cmds = ("sudo ./mklocalrepo.sh",
"sudo chmod 777 /etc/apt/sources.list",
"sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep bionic main\" >> /etc/apt/sources.list",
"sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep bionic main\" >> /etc/apt/sources.list",
"sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -",
"sudo apt-get -qq --allow-insecure-repositories update");
chdir $ENV{RUNNER_WORKSPACE};;
my @output;
foreach my $cmd (@cmds){
print "[install_xcat] running $cmd\n";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
print RED "[install_xcat] $cmd. ...[Failed]\n";
print "[install_xcat] error message:\n";
print Dumper \@output;
$check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information ";
print $check_result_str;
return 1;
}
}
my $cmd = "sudo apt-get install xcat --allow-remove-essential --allow-unauthenticated";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
my $lastline = $output[-1];
$lastline =~ s/[\r\n\t\\"']*//g;
print "[install_xcat] $cmd ....[Failed]\n";
print ">>>>>Dumper the output of '$cmd'\n";
print Dumper \@output;
$check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information";
print $check_result_str;
return 1;
}else{
print "[install_xcat] $cmd ....[Pass]\n";
print "\n------Config xcat and verify xcat is working correctly-----\n";
@cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f runner",
"sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=runner policy.rule=allow",
". /etc/profile.d/xcat.sh && tabdump policy",
". /etc/profile.d/xcat.sh && tabdump site",
". /etc/profile.d/xcat.sh && lsxcatd -a",
"ls /opt/xcat/sbin",
"service xcatd status");
my $ret = 0;
foreach my $cmd (@cmds){
print "\n[install_xcat] running $cmd.....\n";
@output = runcmd("$cmd");
print Dumper \@output;
if($::RUNCMD_RC){
print RED "[install_xcat] $cmd. ...[Failed]\n";
#print Dumper \@output;
$ret = 1;
}else{
print "[install_xcat] $cmd....[Pass]\n";
}
}
$cmd = "sudo apt-get install xcat-probe --allow-remove-essential --allow-unauthenticated";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
print RED "[install_xcat] $cmd ....[Failed]\n";
print Dumper \@output;
$ret = 1;
}else{
print "[install_xcat] $cmd ....[Pass]:\n";
}
if($ret){
$check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information\n";
print $check_result_str;
return 1;
}
$check_result_str .= "> **INSTALL XCAT SUCCESSFUL**";
print $check_result_str;
}
return 0;
}
#--------------------------------------------------------
# Fuction name: check_syntax
# Description:
# Attributes:
# Return code:
#--------------------------------------------------------
sub check_syntax{
my @output;
my @syntax_err;
my $ret = 0;
my @target_dirs=("/opt/xcat",
"/install");
foreach my $dir (@target_dirs){
my @files = ();
get_files_recursive("$dir", \@files);
foreach my $file (@files) {
next if($file =~ /\/opt\/xcat\/share\/xcat\/netboot\/genesis\//);
next if($file =~ /\/opt\/xcat\/probe\//);
@output = runcmd("file $file");
if($output[0] =~ /perl /i){
@output = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && perl -I /opt/xcat/lib/perl -I /opt/xcat/lib -I /usr/lib/perl5 -I /usr/share/perl -c $file'");
if($::RUNCMD_RC){
push @syntax_err, @output;
$ret = 1;
}
}
}
}
if(@syntax_err){
print "[check_syntax] syntax checking ....[Failed]\n";
print "[check_syntax] Dumper error message:\n";
print Dumper @syntax_err;
$check_result_str .= "> **CODE SYNTAX ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information";
print $check_result_str;
}else{
print "[check_syntax] syntax checking ....[Pass]\n";
$check_result_str .= "> **CODE SYNTAX CORRECT**";
print $check_result_str;
}
return $ret;
}
#--------------------------------------------------------
# Fuction name: run_fast_regression_test
# Description:
# Attributes:
# Return code:
#--------------------------------------------------------
sub run_fast_regression_test{
my $cmd = "sudo apt-get install xcat-test --allow-remove-essential --allow-unauthenticated";
my @output = runcmd("$cmd");
if($::RUNCMD_RC){
print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
print Dumper \@output;
return 1;
}else{
print "[run_fast_regression_test] $cmd .....:\n";
print Dumper \@output;
}
$cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -h'";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
print "[run_fast_regression_test] error dumper:\n";
print Dumper \@output;
return 1;
}else{
print "[run_fast_regression_test] $cmd .....:\n";
print Dumper \@output;
}
my $hostname = `hostname`;
chomp($hostname);
print "hostname = $hostname\n";
my $conf_file = "$ENV{'PWD'}/regression.conf";
system "sudo touch $conf_file";
system "sudo chmod 777 $conf_file";
open(my $fh, '>', $conf_file) or die "Could not open test configuration file $!";
print $fh "[System]\nMN=$hostname\n[Table_site]\nkey=domain\nvalue=pok.stglabs.ibm.com\n";
close($fh);
print "Dumper regression conf file:\n";
@output = runcmd("cat $conf_file");
print Dumper \@output;
$cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"ci_test\" -l'";
my @caseslist = runcmd("$cmd");
if($::RUNCMD_RC){
print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
print "[run_fast_regression_test] error dumper:\n";
print Dumper \@caseslist;
return 1;
}else{
print "[run_fast_regression_test] $cmd .....:\n";
print Dumper \@caseslist;
}
my $casenum = @caseslist;
my $x = 0;
my @failcase;
my $passnum = 0;
my $failnum = 0;
foreach my $case (@caseslist){
++$x;
$cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -f $conf_file -t $case'";
print "[run_fast_regression_test] run $x: $cmd\n";
@output = runcmd("$cmd");
#print Dumper \@output;
for(my $i = $#output; $i>-1; --$i){
if($output[$i] =~ /------END::(.+)::Failed/){
push @failcase, $1;
++$failnum;
print Dumper \@output;
last;
}elsif ($output[$i] =~ /------END::(.+)::Passed/){
++$passnum;
last;
}
}
}
if($failnum){
my $log_str = join (",", @failcase );
$check_result_str .= "> **FAST REGRESSION TEST Failed**: Totalcase $casenum Passed $passnum Failed $failnum FailedCases: $log_str. Please click ``Details`` label in ``Merge pull request`` box for detailed information\n";
print $check_result_str;
return 1;
}else{
$check_result_str .= "> **FAST REGRESSION TEST Successful**: Totalcase $casenum Passed $passnum Failed $failnum\n";
print $check_result_str;
}
return 0;
}
#--------------------------------------------------------
# Fuction name: mark_time
# Description:
# Attributes:
# Return code:
#--------------------------------------------------------
sub mark_time{
my $func_name=shift;
my $nowtime = timelocal(localtime());
my $nowtime_str = scalar(localtime());
my $duration = $nowtime - $last_func_start;
$last_func_start = $nowtime;
print "[mark_time] $nowtime_str, ElapsedTime of $func_name is $duration s\n";
}
#===============Main Process=============================
my @os_info = runcmd("cat /etc/os-release");
print "Current OS information:\n";
print Dumper \@os_info;
my @perl_vserion = runcmd("perl -v");
print "Current perl information:\n";
print Dumper \@perl_vserion;
my @disk = runcmd("df -h");
print "Disk information:\n";
print Dumper \@disk;
# Hacking the netmask. Not sure if we need to recover it after finish xcattest
# Note: Here has an assumption from Travis VM: only 1 UP Ethernet interface available (CHANGEME if it not as is)
my @intfinfo = runcmd("ip -o link |grep 'link/ether'|grep 'state UP' |awk -F ':' '{print \$2}'|head -1");
foreach my $nic (@intfinfo) {
print "Hacking the netmask length to 16 if it is 32: $nic\n";
runcmd("ip -4 addr show $nic|grep 'inet'|grep -q '/32' && sudo ip addr add \$(hostname -I|awk '{print \$1}')/16 dev $nic");
}
my @ipinfo = runcmd("ip addr");
print "Networking information:\n";
print Dumper \@ipinfo;
#Start to build xcat core
print GREEN "\n------ Building xCAT core package ------\n";
$rst = build_xcat_core();
if($rst){
print RED "Build of xCAT core package failed\n";
exit $rst;
}
mark_time("build_xcat_core");
#Start to install xcat
print GREEN "\n------Installing xCAT ------\n";
$rst = install_xcat();
if($rst){
print RED "Install of xCAT failed\n";
exit $rst;
}
mark_time("install_xcat");
#Check the syntax of changing code
print GREEN "\n------ Checking the syntax of changed code------\n";
$rst = check_syntax();
if($rst){
print RED "Check syntax of changed code failed\n";
exit $rst;
}
mark_time("check_syntax");
#run fast regression
print GREEN "\n------Running fast regression test ------\n";
$rst = run_fast_regression_test();
if($rst){
print RED "Run of fast regression test failed\n";
exit $rst;
}
mark_time("run_fast_regression_test");
exit 0;
-4
View File
@@ -4,7 +4,6 @@ use Text::Balanced qw/extract_bracketed/;
require xCAT::Table;
require Exporter;
use strict;
use xCAT::MsgUtils;
#Perl implementation of noderange
our @ISA = qw(Exporter);
@@ -294,9 +293,6 @@ sub expandatom {
#my @grouplist = $grptab->getAllAttribs('groupname');
for my $row (@grplist) {
if ($row->{groupname} eq $atom) {
my $rsp;
$rsp->{data}->[0] = "Could not create an object named \'$atom\' of type 'node'. A definition for a group object with the same name already exists.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return ();
}
}
+3 -3
View File
@@ -756,7 +756,7 @@ passed as argument rather than by table value',
table_desc => 'A few hardware and software characteristics of the nodes.',
descriptions => {
node => 'The node name or group name.',
os => 'The operating system deployed on this node. Valid values: AIX, rhels*,rhelc*, rhas*,centos*,rocky*,SL*, fedora*, sles* (where * is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.',
os => 'The operating system deployed on this node. Valid values: AIX, rhels*,rhelc*, rhas*,centos*, alma*, rocky*,SL*, fedora*, sles* (where * is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.',
arch => 'The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64.',
profile => 'The string to use to locate a kickstart or autoyast template to use for OS deployment of this node. If the provmethod attribute is set to an osimage name, that takes precedence, and profile need not be defined. Otherwise, the os, profile, and arch are used to search for the files in /install/custom first, and then in /opt/xcat/share/xcat.',
provmethod => 'The provisioning method for node deployment. The valid values are install, netboot, statelite or an os image name from the osimage table. If an image name is specified, the osimage definition stored in the osimage table and the linuximage table (for Linux) or nimimage table (for AIX) are used to locate the files for templates, pkglists, syncfiles, etc. On Linux, if install, netboot or statelite is specified, the os, profile, and arch are used to search for the files in /install/custom first, and then in /opt/xcat/share/xcat.',
@@ -799,7 +799,7 @@ passed as argument rather than by table value',
cfmdir => 'CFM directory name for PCM. Set to /install/osimages/<osimage name>/cfmdir by PCM. ',
profile => 'The node usage category. For example compute, service.',
osname => 'Operating system name- AIX or Linux.',
osvers => 'The Linux operating system deployed on this node. Valid values: rhels*,rhelc*, rhas*,centos*,rocky*,SL*, fedora*, sles* (where * is the version #).',
osvers => 'The Linux operating system deployed on this node. Valid values: rhels*,rhelc*, rhas*,centos*,alma*, rocky*,SL*, fedora*, sles* (where * is the version #).',
osarch => 'The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64.',
synclists => 'The fully qualified name of a file containing a list of files to synchronize on the nodes. Can be a comma separated list of multiple synclist files. The synclist generated by PCM named /install/osimages/<imagename>/synclist.cfm is reserved for use only by PCM and should not be edited by the admin.',
postscripts => 'Comma separated list of scripts that should be run on this image after diskful installation or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. See the site table runbootscripts attribute.',
@@ -884,7 +884,7 @@ passed as argument rather than by table value',
descriptions => {
key => 'The type of component this user/pw is for. Valid values: blade (management module), ipmi (BMC), system (nodes), omapi (DHCP), hmc, ivm, cec, frame, switch.',
username => 'The default userid for this type of component',
password => 'The default password for this type of component. On Linux, a crypted form could be provided. Hashes starting with $1$, $5$ and $6$ (md5, sha256 and sha512 respectively) are supported.',
password => 'The default password for this type of component. On Linux, a crypted form could be provided for the "system" component, which will be used during initial node provisioning. Hashes starting with $1$, $5$ and $6$ (md5, sha256 and sha512 respectively) are supported.',
cryptmethod => 'Indicates the method to use to encrypt the password attribute. On AIX systems, if a value is provided for this attribute it indicates that the password attribute is encrypted. If the cryptmethod value is not set it indicates the password is a simple string value. On Linux systems, the cryptmethod can be set to md5, sha256 or sha512. If not set, sha256 will be used as default to encrypt plain-text passwords.',
authdomain => 'The domain in which this entry has meaning, e.g. specifying different domain administrators per active directory domain',
comments => 'Any user-written notes.',
+3 -3
View File
@@ -2201,7 +2201,7 @@ sub CheckVersion
my $index = 0;
my $max_index = ($len_a > $len_b) ? $len_a : $len_b;
for ($index = 0 ; $index <= $max_index ; $index++)
for ($index = 0 ; $index < $max_index ; $index++)
{
my $val_a = ($len_a < $index) ? 0 : $a[$index];
my $val_b = ($len_b < $index) ? 0 : $b[$index];
@@ -3724,7 +3724,7 @@ sub filter_nostatusupdate {
#filter out the nodes which support the node provision status feedback
my @nodesfiltered = ();
if (exists $inref->{$::STATUS_INSTALLING}) {
map { if ($nttabdata->{$_}->[0]->{os} !~ /(fedora|rh|centos|rocky|sles|ubuntu)/) { push @nodesfiltered, $_; } } @{ $inref->{$::STATUS_INSTALLING} };
map { if ($nttabdata->{$_}->[0]->{os} !~ /(fedora|rh|centos|alma|rocky|sles|ubuntu)/) { push @nodesfiltered, $_; } } @{ $inref->{$::STATUS_INSTALLING} };
delete $inref->{$::STATUS_INSTALLING};
if (@nodesfiltered) {
@{ $inref->{$::STATUS_INSTALLING} } = @nodesfiltered;
@@ -3733,7 +3733,7 @@ sub filter_nostatusupdate {
@nodesfiltered = ();
if (exists $inref->{$::STATUS_NETBOOTING}) {
map { if ($nttabdata->{$_}->[0]->{os} !~ /(fedora|rh|centos|rocky|sles|ubuntu)/) { push @nodesfiltered, $_; } } @{ $inref->{$::STATUS_NETBOOTING} };
map { if ($nttabdata->{$_}->[0]->{os} !~ /(fedora|rh|centos|alma|rocky|sles|ubuntu)/) { push @nodesfiltered, $_; } } @{ $inref->{$::STATUS_NETBOOTING} };
delete $inref->{$::STATUS_NETBOOTING};
if (@nodesfiltered) {
@{ $inref->{$::STATUS_NETBOOTING} } = @nodesfiltered;
+2 -2
View File
@@ -270,12 +270,12 @@ sub getmyzonename
=head3 enableSSHbetweennodes
Arguments:
zonename
nodename
Returns:
1 if the sshbetweennodes attribute is yes/1 or undefined
0 if the sshbetweennodes attribute is no/0
Example:
xCAT::Zone->enableSSHbetweennodes($zonename);
xCAT::Zone->enableSSHbetweennodes($nodename);
=cut
#--------------------------------------------------------------------------------
+1
View File
@@ -14,6 +14,7 @@ require Exporter;
use strict;
our %distnames = (
"1668116088.755845" => "rocky8.7", #x86_64
"1652648703.486923" => "rocky8.6", #x86_64
"1636882174.934804" => "rocky8.5", #x86_64
"1624205633.869423" => "rocky8.4", #x86_64
+53 -46
View File
@@ -165,7 +165,7 @@ if ($::RUNCMD_RC == 0) {
# check to see if mysql is installed
#
$cmd = "rpm -qa | grep -i perl-DBD-mysql";
my $msg = "\nMySQL perl DBD ";
my $msg = "\nperl-DBD-mysql ";
if ($::debianflag) {
if ($::MariaDB) {
$cmd = "dpkg -l | grep -i mariadb-server";
@@ -184,39 +184,41 @@ if ($::RUNCMD_RC != 0)
exit(1);
}
# check to see if MySQL is running
# check to see if MySQL or MariaDB is running
$::mysqlrunning = 0;
$::xcatrunningmysql = 0;
my $cmd = "ps -ef | grep mysqld";
my @output = xCAT::Utils->runcmd($cmd, 0);
my $mysqlcheck = "mysql.sock"; # see if really running
if (grep(/$mysqlcheck/, @output))
{
if ($::INIT)
{
my $message =
"MySQL is running. Database initialization will not take place.";
xCAT::MsgUtils->message("I", "$message");
}
my $cmd = "pidof mysqld";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC == 0) {
$::mysqlrunning = 1;
if ($::INIT) {
my $message = "MySQL is already running. Database initialization will not take place.";
xCAT::MsgUtils->message("I", "$message");
my $ret = xCAT::Utils->stopservice("mysql");
if ($ret != 0) {
xCAT::MsgUtils->message("E", " failed to stop MySQL.");
exit(1);
} else {
$::mysqlrunning = 0; # service was stopped
}
}
}
# Stop mysql in order to setup init xcat mysql
$cmd = "pidof mysqld";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0)
{
if ($::INIT)
{
my $ret = xCAT::Utils->stopservice("mysql");
if ($ret != 0)
{
xCAT::MsgUtils->message("E", " failed to stop mysql/mariadb.");
$cmd = "pidof mariadbd";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC == 0) {
$::mysqlrunning = 1;
if ($::INIT) {
my $message = "MariaDB is already running. Database initialization will not take place.";
xCAT::MsgUtils->message("I", "$message");
my $ret = xCAT::Utils->stopservice("mariadb");
if ($ret != 0) {
xCAT::MsgUtils->message("E", " failed to stop MariaDB.");
exit(1);
}
} else {
$::mysqlrunning = 1;
} else {
$::mysqlrunning = 0; # service was stopped
}
}
}
@@ -229,7 +231,7 @@ if (-e ("/etc/xcat/cfgloc")) # check to see if xcat is using mysql
if ($::INIT)
{
my $message =
"The /etc/xcat/cfgloc file is already configured for MySQL and xCAT is using mysql as it's database. No xCAT setup is required.";
"The /etc/xcat/cfgloc file is already configured for MySQL and xCAT is using mysql or mariadb as it's database. No xCAT setup is required.";
xCAT::MsgUtils->message("I", "$message");
}
$::xcatrunningmysql = 1;
@@ -436,6 +438,12 @@ if (($::INIT) && ($::xcatrunningmysql == 0))
}
} # end initialization
else {
# MySQL not running, restart it
if ($::mysqlrunning == 0) {
&mysqlstart;
}
}
if ($::SETUPODBC)
{
@@ -952,7 +960,7 @@ sub mysqlstart
else
{
if ($::MariaDB == 1) { # running MariaDB
if ( ($::linuxos =~ /rh.*/) || ($::linuxos =~ /sles15.*/) ) {
if ( $::linuxos =~ /rh.*|ol.*|rocky.*|alma.*|sles15.*/) {
$ret = xCAT::Utils->startservice("mariadb");
} else { # sles
$ret = xCAT::Utils->startservice("mysql");
@@ -960,7 +968,7 @@ sub mysqlstart
} else { # it is mysql
if ($::linuxos =~ /rh.*/)
if ($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/)
{
$ret = xCAT::Utils->startservice("mysqld");
}
@@ -976,26 +984,25 @@ sub mysqlstart
exit(1);
}
# make sure running
$cmd = "ps -ef | grep mysqld | grep -v grep";
my $i;
for ($i = 0 ; $i < 12 ; $i++)
{
# Make sure service has started. On some OSes, mariadb service starts mysql daemon
# on others, mariadb service starts mariadb daemon. Check a few times for one,
# then the other
my $mariadb_process_name = "mariadbd";
my $mysql_process_name = "mysqld";
my $db_process_name_pattern = "\'".$mariadb_process_name."\|".$mysql_process_name."\'";
for (my $i = 0 ; $i < 6 ; $i++) {
$cmd = "ps -ef | grep -E $db_process_name_pattern | grep -v grep";
my @output = xCAT::Utils->runcmd($cmd, 0);
$mysqlcheck = "mysqld";
if (grep(/$mysqlcheck/, @output))
{
if (grep(/$mariadb_process_name/, @output) || grep(/$mysql_process_name/, @output)) {
sleep 10; # give a few extra seconds to be sure
return;
}
else
{
} else {
sleep 10; # wait for daemon
}
}
xCAT::MsgUtils->message("E",
" Could not start the mysql daemon, in time allocated (2 minutes)");
" Could not start the mysql/mariadb daemon in time allocated (1 minute)");
exit(1);
}
@@ -1063,7 +1070,7 @@ sub mysqlreboot
{
if ($::MariaDB == 1) { # MariaDB not MySQL
if ( ($::linuxos =~ /rh.*/) || ($::linuxos =~ /sles15.*/) ){
if ($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*|sles15.*/) {
$cmd = "chkconfig mariadb on";
} else { #sles
$cmd = "chkconfig mysql on";
@@ -1073,7 +1080,7 @@ sub mysqlreboot
}
} else { # mysql
if ($::linuxos =~ /rh.*/)
if ($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/)
{
$cmd = "chkconfig mysqld on";
}
@@ -1611,7 +1618,7 @@ sub setupODBC
}
# for aix and redhat
if (($::linuxos =~ /rh.*/) || ($::osname eq 'AIX'))
if (($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/) || ($::osname eq 'AIX'))
{
$cmd = "rpm -qa | grep mysql-connector-odbc";
xCAT::Utils->runcmd($cmd, 0);
@@ -1699,7 +1706,7 @@ sub setupODBC
(my $connstring, my $adminid, my $passwd) = split(/\|/, $output[0]);
(my $database, my $id, my $server) = split(/=/, $connstring);
if (($::linuxos =~ /rh.*/) || ($::osname eq 'AIX'))
if (($::linuxos =~ /rh.*|ol.*|rocky.*|alma.*/) || ($::osname eq 'AIX'))
{
$odbcinstfile = "/etc/odbcinst.ini";
$odbcfile = "/etc/odbc.ini";
+1 -1
View File
@@ -318,7 +318,7 @@ if (($INIT) && ($xcatrunningpgsql == 0))
# if that does not exist use resolved hostname
# double check site.master for resolution
my $sitefile = "$::backupdir/site.csv";
my $cmd = "grep \"master $sitefile";
my $cmd = q{grep \"master } . $sitefile;
my @output = xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0) # entry in site table
{
+5 -5
View File
@@ -42,7 +42,7 @@ B<mkvm> I<noderange> [I<source_virtual_machine>] [B<pool=> I<disk_pool>]
=head2 For PPC (with HMC) specific:
The first form of B<mkvm> command creates new partition(s) with the same profile/resources as the partition specified by I<singlenode>. The -i and I<noderange> specify the starting numeric partition number and the I<noderange> for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition.
The first form of B<mkvm> command creates new partition(s) with the same profile/resources as the partition specified by I<singlenode>. The B<-i> and I<noderange> specify the starting numeric partition number and the I<noderange> for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition.
The second form of this command duplicates all the partitions from the source specified by I<profile> to the destination specified by I<destcec>. The source and destination CECs can be managed by different HMCs.
@@ -52,9 +52,9 @@ Note that the B<mkvm> command currently only supports creating standard LPARs, n
=head2 For PPC (using Direct FSP Management) specific:
With option I<full>, a partition using all the resources on a normal power machine will be created.
With option B<--full>, a partition using all the resources on a normal power machine will be created.
If no option is specified, a partition using the parameters specified with attributes such as 'vmcpus', 'vmmemory', 'vmphyslots', 'vmothersetting', 'vmnics', 'vmstorage' will be created. Those attributes can either be specified with '*def' commands running before or be specified with this command.
If no option is specified, a partition using the parameters specified with attributes such as B<vmcpus>, B<vmmemory>, B<vmphyslots>, B<vmothersetting>, B<vmnics>, B<vmstorage> will be created. Those attributes can either be specified with '*def' commands running before or be specified with this command.
=head2 For KVM and VMware:
@@ -88,9 +88,9 @@ Request to create a new full system partition for each CEC.
=item B<vmcpus=> I<value> B<vmmemory=> I<value> B<vmphyslots=> I<value> B<vmothersetting=> I<value> B<vmnics=> I<value> B<vmstorage=> I<value> [B<--vios>]
To specify the parameters which are used to create a partition. The I<vmcpus>, I<vmmemory> are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to L<lsvm(1)|lsvm.1> for more information about 'drc_index' for I<vmphyslots>.
To specify the parameters which are used to create a partition. The B<vmcpus>, B<vmmemory> are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to L<lsvm(1)|lsvm.1> for more information about 'drc_index' for I<vmphyslots>.
The option I<vios> is used to specify the partition that will be created is a VIOS partition. If specified, the value for I<vmstorage> shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for I<vmphyslots>, all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of I<vios_name:server_slotid> to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition.
The option B<vios> is used to specify the partition that will be created is a VIOS partition. If specified, the value for B<vmstorage> shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for B<vmphyslots>, all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of B<vios_name:server_slotid> to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition.
=item B<-f|--force>
+6 -12
View File
@@ -19,11 +19,9 @@ B<mysqlsetup> {B<-L>|B<--LL>} [B<-V>|B<--verbose>]
=head1 DESCRIPTION
B<mysqlsetup> - Sets up the MySQL or MariaDB database (linux only for MariaDB) for xCAT to use. The mysqlsetup script is run on the Management Node as root after the MySQL code or MariaDB code has been installed. Before running the init option, the MySQL server should be stopped, if it is running. The xCAT daemon, xcatd, must be running, do not stop it. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to MySQL or MariaDB and restarting the xcatd daemon as well as the MySQL daemon. For full information on all the steps that will be done, read the "Configure MySQL and Migrate xCAT Data to MySQL" sections in
B<mysqlsetup> - Sets up the MySQL or MariaDB database (linux only for MariaDB) for xCAT to use. The B<mysqlsetup> script is run on the Management Node as root after the MySQL or MariaDB packages have been installed. Before running the B<--init> option, the MySQL server should be stopped, if it is running. The xCAT daemon, B<xcatd>, must be running, do not stop it. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to MySQL or MariaDB and restarting the B<xcatd> daemon as well as the MySQL daemon. For more information, see https://xcat-docs.readthedocs.io/en/stable/advanced/hierarchy/databases/index.html#mysql-mariadb
B<Setting_Up_MySQL_as_the_xCAT_DB>
Two passwords must be supplied for the setup, a password for the xcatadmin id and a password for the root id in the MySQL database. These will be prompted for interactively, unless the environment variables XCATMYSQLADMIN_PW and XCATMYSQLROOT_PW are set to the passwords for the xcatadmin id and root id in the database,resp.
Two passwords must be supplied for the setup, a password for the xcatadmin id and a password for the root id in the MySQL database. These will be prompted for interactively, unless the environment variables B<XCATMYSQLADMIN_PW> and B<XCATMYSQLROOT_PW> are set to the passwords for the xcatadmin id and root id in the database,respectively.
Note below we refer to MySQL but it works the same for MariaDB.
@@ -45,12 +43,12 @@ Displays verbose messages.
=item B<-i|--init>
The init option is used to setup a xCAT database on an installed MySQL or MariaDB server for xCAT to use. The mysqlsetup script will check for the installed MariaDB server rpm first and will use MariaDB if it is installed. This involves creating the xcatdb database, the xcatadmin id, allowing access to the xcatdb database by the Management Node. It customizes the my.cnf configuration file for xcat and starts the MySQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb MySQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the MySQL database and restarts the xcatd daemon using the database.
On AIX, it additionally setup the mysql id and group and corrects the permissions in the MySQL install directories. For AIX, you should be using the MySQL rpms available from the xCAT website. For Linux, you should use the MySQL or MariaDB rpms shipped with the OS. You can chose the -f and/or the -o option, to run after the init.
The B<--init> option is used to setup a xCAT database on an installed MySQL or MariaDB server for xCAT to use. The B<mysqlsetup> script will check for the installed MariaDB server rpm first and will use MariaDB if it is installed. This involves creating the xcatdb database, the xcatadmin id, allowing access to the xcatdb database by the Management Node. It customizes the B<my.cnf> configuration file for xcat and starts the MySQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb MySQL database. It creates the B</etc/xcat/cfgloc> file to point the xcatd daemon to the MySQL database and restarts the xcatd daemon using the database.
On AIX, it additionally setup the mysql id and group and corrects the permissions in the MySQL install directories. For AIX, you should be using the MySQL rpms available from the xCAT website. For Linux, you should use the MySQL or MariaDB rpms shipped with the OS. You can chose the B<-f> and/or the B<-o> option, to run after the <--init>.
=item B<-u|--update>
To run the update option, you must first have run the -i option and have xcat successfully running on the MySQL database. You can chose the -f and/or the -o option, to update.
To run the update option, you must first have run the B<-i> option and have xcat successfully running on the MySQL database. You can chose the B<-f> and/or the B<-o> option, to update.
=item B<-f|--hostfile>
@@ -58,15 +56,11 @@ This option runs during update, it will take all the host from the input file (p
=item B<-o|--odbc>
This option sets up the ODBC /etc/../odbcinst.ini, /etc/../odbc.ini and the .odbc.ini file in roots home directory will be created and initialized to run off the xcatdb MySQL database.
See "Add ODBC Support" in
Setting_Up_MySQL_as_the_xCAT_DB
This option sets up the ODBC B</etc/../odbcinst.ini>, B</etc/../odbc.ini> and the B<.odbc.ini> file in roots home directory will be created and initialized to run off the xcatdb MySQL database.
=item B<-L|--LL>
Additional database configuration specifically for the LoadLeveler product.
See "Add ODBC Support" in
Setting_Up_MySQL_as_the_xCAT_DB
=back
+25 -10
View File
@@ -22,28 +22,43 @@ B<rmvm [-p]> I<noderange>
The B<rmvm> command removes the partitions specified in I<noderange>. If I<noderange> is an CEC, all the partitions associated with that CEC will be removed. Note that removed partitions are automatically removed from the xCAT database. For IVM-managed systems, care must be taken to not remove the VIOS partition, or all the associated partitions will be removed as well.
For DFM-managed (short For Direct FSP Management mode) normal power machines, only partitions can be removed. No options is needed.
For DFM-managed (short For Direct FSP Management mode) normal Power machines, only partitions can be removed. No options are needed.
=head1 OPTIONS
=over 10
B<-h|--help> Display usage message.
=item B<-h|--help>
B<-v|--version> Command Version.
Display usage message.
B<-V|--verbose> Verbose output.
=item B<-v|--version>
B<-r> Retain the data object definitions of the nodes.
Command Version.
B<--service> Remove the service partitions of the specified CECs.
=item B<-V|--verbose>
B<-p>
Verbose output.
=item B<-r>
Retain the data object definitions of the nodes.
=item B<--service>
Remove the service partitions of the specified CECs.
=item B<-p>
KVM: Purge the existence of the VM from persistent storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration. Storage devices of "raw" or "block" type are not removed.
PPC: Remove the specified partition on normal power machine.
PPC: Remove the specified partition on normal Power machine.
B<-f> Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested.
=item B<-f>
Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested.
=back
=head1 RETURN VALUE
@@ -97,7 +112,7 @@ Output is similar to:
gpok4: Deleting virtual server LNX4... Done
6. To remove a DFM-managed partition on normal power machine:
6. To remove a DFM-managed partition on normal Power machine:
rmvm lpar1
-1
View File
@@ -572,7 +572,6 @@ Output is similar to:
node4: BMC SNMP Destination 1: 9.114.47.227
=item 4.
To display the frame number for frame 9A00-10000001
rspconfig> 9A00-10000001 frame
+11
View File
@@ -29,6 +29,7 @@ Requires: cpio
# fping or nmap is needed by pping (in case xCAT-client is installed by itself on a remote client)
%ifos linux
BuildRequires: perl-generators
Requires: nmap perl-XML-Simple perl-XML-Parser
%else
Requires: expat
@@ -317,6 +318,11 @@ PATH=\$XCATROOT/bin:\$XCATROOT/sbin:\$XCATROOT/share/xcat/tools:\$PATH
MANPATH=\$XCATROOT/share/man:\$MANPATH
export XCATROOT PATH MANPATH
export PERL_BADLANG=0
# If /usr/local/share/perl5 is not already in @INC, add it to PERL5LIB
perl -e "print \"@INC\"" | egrep "(^|\W)/usr/local/share/perl5($| )" > /dev/null
if [ \$? = 1 ]; then
export PERL5LIB=/usr/local/share/perl5:\$PERL5LIB
fi
EOF
# export XCATSSLVER for sles11. Others OS can work without this setting.
@@ -336,6 +342,11 @@ else
setenv MANPATH \${XCATROOT}/share/man:\${MANPATH}
endif
setenv PERL_BADLANG 0
# If /usr/local/share/perl5 is not already in @INC, add it to PERL5LIB
perl -e "print \"@INC\"" | egrep "(^|\W)/usr/local/share/perl5($| )" > /dev/null
if [ \$? = 1 ]; then
setenv PERL5LIB /usr/local/share/perl5:\${PERL5LIB}
fi
EOF
chmod 755 /etc/profile.d/xcat.*
+1 -1
View File
@@ -98,7 +98,7 @@ sub createDummyPods {
mkdir "$poddir/man7";
foreach my $d (@dummyPods) {
if (!open(TMP, ">>$d")) { warn "Could not create dummy pod file $d ($!)\n"; }
else { close TMP; }
else { print TMP "=head1 NAME"; close TMP; }
}
return @dummyPods;
+6 -2
View File
@@ -48,8 +48,12 @@ do the following (assuming 2.16.10 is your xCAT version):
```sh
cd xcat-core/xCAT-genesis-builder
sed -i 's/%%REPLACE_CURRENT_VERSION%%/2.16.10/g' xCAT-genesis-base.spec
buildrpm
```
If needed, update version number inside `xCAT-genesis-base.spec`
```
./buildrpm
```
If this command is successful, runs error free, it will generate a `xCAT-genesis-base` RPM that you can transfer
+2 -2
View File
@@ -1,5 +1,5 @@
%define version %%REPLACE_CURRENT_VERSION%%
Version: %{?version:%{version}}%{!?version:%(cat Version)}
%global version %(rpm -q xCAT --qf "%{VERSION}" 2>/dev/null | grep -Po '[0-9\.]+' || echo "2.16.5")
Version: %{version}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
%ifarch i386 i586 i686 x86
%define tarch x86
+6
View File
@@ -1,3 +1,4 @@
#!/bin/sh
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
# Lenovo (c) 2016
#
@@ -109,6 +110,11 @@ if ! ipmitool -V 2>/dev/null| grep "version"; then
fi
# Add ipmi_devintf module to allow the ipmitool operation in-band
if grep -q "^ppc64" <<< "$(uname -m)"; then
modprobe ipmi_powernv
else
modprobe ipmi_si
fi
modprobe ipmi_devintf
for parm in `cat /proc/cmdline`; do
+3
View File
@@ -12,6 +12,9 @@ Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Prefix: /opt/xcat
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
# Disable shebang mangling of python scripts
%undefine __brp_mangle_shebangs
%ifnos linux
AutoReqProv: no
%endif
+15 -2
View File
@@ -812,15 +812,28 @@ Start capturing every message during OS provision process....
my @hdls;
my $starttime = time();
my @candidate_mn_hostname_in_log = $log_parse->obtain_candidate_mn_hostname_in_log();
my $log_content_ref_last;
#read log realtimely, then handle each log
# Loop forever, reading each log file
for (; ;) {
if (@hdls = $select->can_read(0)) {
foreach my $hdl (@hdls) {
my $line = "";
chomp($line = <$hdl>);
my $log_content_ref = $log_parse->obtain_log_content($fd_filetype_map{$hdl}, $line);
dispatch_log_to_handler($log_content_ref, \@candidate_mn_hostname_in_log, \%node_state);
if ($log_content_ref->{label} == $::LOGLABEL_XCAT) {
# If reading computes or cluster log files, try to eliminate duplicated lines
unless (($log_content_ref_last->{time_record} eq $log_content_ref->{time_record}) &&
($log_content_ref_last->{sender} eq $log_content_ref->{sender}) &&
($log_content_ref_last->{msg} eq $log_content_ref->{msg})) {
dispatch_log_to_handler($log_content_ref, \@candidate_mn_hostname_in_log, \%node_state);
}
# Save messages details for later duplicate detection
$log_content_ref_last = { %$log_content_ref };
}
else {
dispatch_log_to_handler($log_content_ref, \@candidate_mn_hostname_in_log, \%node_state);
}
}
}
+3
View File
@@ -13,6 +13,9 @@ Prefix: /opt/xcat
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
Requires: xCAT-client = 4:%{version}-%{release}
# Disable shebang mangling of python scripts
%undefine __brp_mangle_shebangs
%ifos linux
BuildArch: noarch
%endif
+1 -1
View File
@@ -5,7 +5,7 @@ After=network.target syslog.service
[Service]
EnvironmentFile=-/etc/sysconfig/xcat
Type=forking
PIDFile=/var/run/xcatd.pid
PIDFile=/run/xcatd.pid
ExecStart=/etc/init.d/xcatd start
ExecStop=/etc/init.d/xcatd stop
LimitNOFILE=16000
+1 -1
View File
@@ -717,7 +717,7 @@ sub handle_ipmi_packet {
my @payload = splice(@rsp, 12, $psize);
if ($encrypted) {
my $iv = pack("C*", splice @payload, 0, 16);
my $cipher = Crypt::CBC->new(-literal_key => 1, -key => $self->{aeskey}, -cipher => "Crypt::Rijndael", -header => "none", -iv => $iv, -keysize => 16, -blocksize => 16, -padding => \&cbc_pad);
my $cipher = Crypt::CBC->new(-literal_key => 1, -key => $self->{aeskey}, -cipher => "Crypt::Rijndael", -header => "none", -iv => $iv, -keysize => 16, -padding => \&cbc_pad);
my $crypted = pack("C*", @payload);
@payload = unpack("C*", $cipher->decrypt($crypted));
}
+1
View File
@@ -1222,6 +1222,7 @@ sub getImageitems_for_node
{
if ($os =~ /rh.*/) { $platform = "rh"; }
elsif ($os =~ /centos.*/) { $platform = "centos"; }
elsif ($os =~ /alma.*/) { $platform = "alma"; }
elsif ($os =~ /rocky.*/) { $platform = "rocky"; }
elsif ($os =~ /fedora.*/) { $platform = "fedora"; }
elsif ($os =~ /SL.*/) { $platform = "SL"; }
+8 -1
View File
@@ -401,6 +401,7 @@ sub getsynclistfile()
if ($os) {
if ($os =~ /rh.*/) { $platform = "rh"; }
elsif ($os =~ /centos.*/) { $platform = "centos"; }
elsif ($os =~ /alma.*/) { $platform = "alma"; }
elsif ($os =~ /rocky.*/) { $platform = "rocky"; }
elsif ($os =~ /fedora.*/) { $platform = "fedora"; }
elsif ($os =~ /sles.*/) { $platform = "sles"; }
@@ -432,6 +433,7 @@ sub getsynclistfile()
if ($os) {
if ($os =~ /rh.*/) { $platform = "rh"; }
elsif ($os =~ /centos.*/) { $platform = "centos"; }
elsif ($os =~ /alma.*/) { $platform = "alma"; }
elsif ($os =~ /rocky.*/) { $platform = "rocky"; }
elsif ($os =~ /fedora.*/) { $platform = "fedora"; }
elsif ($os =~ /sles.*/) { $platform = "sles"; }
@@ -691,6 +693,7 @@ sub update_tables_with_templates
my $arch = shift; #like ppc64, x86, x86_64
my $ospkgdir = shift;
my $osdistroname = shift;
my $legacyUB20 = shift;
my %args = @_;
my $osname = $osver;; #like sles, rh, centos, windows
@@ -722,7 +725,7 @@ sub update_tables_with_templates
# for Focal and later Ubuntu we repurpose genos to indicate the use
# of the subiquity installer
if ($osver =~ /ubuntu(\d+\.\d+)/) {
if ($1 >= 20.04) {
if (($1 >= 20.04) and ($legacyUB20 !~ /legacy/)) {
$genos = "subiquity";
}
}
@@ -2172,6 +2175,10 @@ sub getplatform {
{
$platform = "centos";
}
elsif ($os =~ /alma.*/)
{
$platform = "alma";
}
elsif ($os =~ /rocky.*/)
{
$platform = "rocky";
+1 -1
View File
@@ -301,7 +301,7 @@ sub subvars {
my $space10 = " " x 10;
my $space12 = " " x 12;
foreach my $pkgdir (@pkgdirs) {
if ($platform =~ /^(rh|SL|centos|ol|fedora|rocky)$/) {
if ($platform =~ /^(rh|SL|centos|alma|ol|fedora|rocky)$/) {
if ($c == 0) {
# After some tests, if we put the repo in pre scripts in the kickstart like for rhels6.x
# the rhels5.9 will not be installed successfully. So put in kickstart directly.
+6
View File
@@ -2,6 +2,12 @@
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#-------------------------------------------------------
package xCAT_plugin::AAsn;
BEGIN
{
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
}
use lib "$::XCATROOT/lib/perl";
use strict;
use xCAT::Table;
+17 -6
View File
@@ -41,10 +41,10 @@ sub handled_commands
{
return {
copycd => "anaconda",
mknetboot => "nodetype:os=(^ol[0-9].*)|(centos.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)",
mkinstall => "nodetype:os=(pkvm.*)|(esxi4.1)|(esx[34].*)|(^ol[0-9].*)|(centos.*)|(rocky.*)|(rh(?!evh).*)|(fedora.*)|(SL.*)",
mksysclone => "nodetype:os=(esxi4.1)|(esx[34].*)|(^ol[0-9].*)|(centos.*)|(rocky.*)|(rh(?!evh).*)|(fedora.*)|(SL.*)",
mkstatelite => "nodetype:os=(esx[34].*)|(^ol[0-9].*)|(centos.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)",
mknetboot => "nodetype:os=(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)",
mkinstall => "nodetype:os=(pkvm.*)|(esxi4.1)|(esx[34].*)|(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh(?!evh).*)|(fedora.*)|(SL.*)",
mksysclone => "nodetype:os=(esxi4.1)|(esx[34].*)|(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh(?!evh).*)|(fedora.*)|(SL.*)",
mkstatelite => "nodetype:os=(esx[34].*)|(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)",
};
}
@@ -145,7 +145,7 @@ sub process_request
sub using_dracut
{
my $os = shift;
if ($os =~ /(rhels|rhel|centos|rocky|ol)(\d+)/) {
if ($os =~ /(rhels|rhel|centos|alma|rocky|ol)(\d+)/) {
if ($2 >= 6) {
return 1;
}
@@ -762,7 +762,7 @@ sub mknetboot
}
# turn off the selinux
if ($osver =~ m/(fedora12|fedora13|rhels7|rhels8|ol7|ol8|rocky8)/) {
if ($osver =~ m/(fedora12|fedora13|rhels7|rhels8|ol7|ol8|alma8|rocky8)/) {
$kcmdline .= " selinux=0 ";
}
@@ -2013,6 +2013,7 @@ sub copycd
}
if ($distname
and $distname !~ /^centos/
and $distname !~ /^alma/
and $distname !~ /^rocky/
and $distname !~ /^fedora/
and $distname !~ /^SL/
@@ -2070,6 +2071,8 @@ sub copycd
$distname = "centos-stream" . $1;
} elsif ($desc and $desc =~ /Rocky Linux (.*)/) {
$distname = "rocky" . $1;
} elsif ($desc and $desc =~ /AlmaLinux (.*)/) {
$distname = "alma" . $1;
}
unless ($dno) {
@@ -2156,7 +2159,11 @@ sub copycd
} elsif ($_ =~ /family\s*=\s*Rocky/i) {
$distname = "rocky" . $desc;
last;
} elsif ($_ =~ /family\s*=\s*Alma/i) {
$distname = "alma" . $desc;
last;
}
}
close($dinfo);
}
@@ -2407,6 +2414,10 @@ sub getplatform {
{
$platform = "centos";
}
elsif ($os =~ /alma.*/)
{
$platform = "alma";
}
elsif ($os =~ /rocky.*/)
{
$platform = "rocky";
+21 -5
View File
@@ -133,18 +133,34 @@ sub process_request
my $sshrootkeydir = "$root/.ssh"; # old default
if ((($parm =~ /^ssh_root_key/) || ($parm =~ /^ssh_root_pub_key/)) && ($foundkeys == 0)) {
my ($rootkeyparm, $zonename) = split(/:/, $parm);
my $client_zonename = xCAT::Zone->getmyzonename($client);
my $default_zonename = xCAT::Zone->getdefaultzone();
if ($zonename) {
$parm = $rootkeyparm; # take the zone off
xCAT::MsgUtils->trace(0, 'I', "credentials: The node ($client) is asking for sshkeys of zone: $zonename.");
$sshrootkeydir = xCAT::Zone->getzonekeydir($zonename);
if ($sshrootkeydir == 1) { # error return
xCAT::MsgUtils->trace(0, 'W', "credentials: The zone: $zonename is not defined.");
if ($client_zonename eq $zonename) {
my $sshbetweenodes_allowed = xCAT::Zone->enableSSHbetweennodes($client);
if (($sshbetweenodes_allowed == 1) || ($parm =~ /^ssh_root_pub_key/)) { # check if sshbetweennodes is allowed or pub key is requested
$sshrootkeydir = xCAT::Zone->getzonekeydir($zonename);
if ($sshrootkeydir == 1) { # error return
xCAT::MsgUtils->trace(0, 'W', "credentials: The zone: $zonename is not defined.");
} else {
$foundkeys = 1; # don't want to read the zone data twice
}
} else {
xCAT::MsgUtils->trace(0, 'E', "credentials: Not allowed to read root's private ssh key because sshbetweennodes is disabled.");
$sshrootkeydir = 1;
}
} else {
$foundkeys = 1; # don't want to read the zone data twice
xCAT::MsgUtils->trace(0, 'E', "credentials: Not allowed to read root's private ssh key of different zone.");
$sshrootkeydir = 1;
}
} elsif ($client_zonename ne $default_zonename) { # check if no zonename is submitted but node is not in default zone
xCAT::MsgUtils->trace(0, 'E', "credentials: Not allowed to read root's private ssh key of default zone.");
$sshrootkeydir = 1;
}
}
if ($parm =~ /ssh_root_key/) {
unless (-r "$sshrootkeydir/id_rsa") {
push @{ $rsp->{'error'} }, "Unable to read root's private ssh key";
+2 -2
View File
@@ -1282,10 +1282,10 @@ sub update_namedconf {
push @newnamed, "\t\t$_;\n";
}
push @newnamed, "\t};\n";
my $bind_version_cmd="/usr/sbin/named -v | cut -d' ' -f2";
my $bind_version_cmd="/usr/sbin/named -v | cut -d' ' -f2 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+'";
my @bind_version =xCAT::Utils->runcmd($bind_version_cmd, 0);
# Turn off DNSSEC if running with bind vers 9.16.6 or higher
if ((scalar @bind_version > 0) && ($bind_version[0] ge "9.16.6")) {
if ((scalar @bind_version > 0) && (xCAT::Utils::CheckVersion($bind_version[0], "9.16.6") >= 0)) {
push @newnamed, "\tdnssec-enable no;\n";
push @newnamed, "\tdnssec-validation no;\n";
}
+16 -9
View File
@@ -168,8 +168,9 @@ sub using_dracut
sub using_subiquity
{
my $os = shift;
my $tmplfile = shift;
if ($os =~ /ubuntu(\d+\.\d+)/) {
if ($1 >= 20.04) {
if (($1 >= 20.04) and ($tmplfile =~ /subiquity/)) {
return 1;
}
}
@@ -258,6 +259,7 @@ sub copycd
close($dinfo);
my $isnetinst = 0;
my $legacyUB20 = ""; # Is this a Ubuntu20.04.1 legacy ISO
my $prod = $line2[0]; # The product should be the first word
my $ver = $line2[1]; # The version should be the second word
my $darch = $line2[6]; # The architecture should be the seventh word
@@ -339,11 +341,16 @@ sub copycd
return;
}
}
if ((-r $path . "/install/vmlinuz") and ($distname =~ /ubuntu20.04/))
{
# Presence of /install/vmlinuz file on Ubuntu20.04 iso indicates
# a legacy (non subiquity installer) image
$legacyUB20 = "(legacy)";
}
if ($inspection) {
$callback->(
{
info =>
"DISTNAME:$distname\n" . "ARCH:$debarch\n" . "DISCNO:$discno\n"
info => "DISTNAME:$distname" . "$legacyUB20" ." \n" . "ARCH:$debarch\n" . "DISCNO:$discno\n"
}
);
return;
@@ -440,7 +447,7 @@ sub copycd
$callback->({ data => "Media copy operation successful" });
unless ($noosimage) {
my @ret = xCAT::SvrUtils->update_tables_with_templates($distname, $arch, $temppath, $osdistroname);
my @ret = xCAT::SvrUtils->update_tables_with_templates($distname, $arch, $temppath, $osdistroname, $legacyUB20);
if ($ret[0] != 0) {
$callback->({ data => "Error when updating the osimage tables: " . $ret[1] });
}
@@ -580,7 +587,7 @@ sub mkinstall {
my $pltfrm = getplatform($ref->{'osvers'});
my $tmplfile = xCAT::SvrUtils::get_tmpl_file_name("$installroot/custom/install/$pltfrm",
$ref->{'profile'}, $ref->{'osvers'}, $ref->{'osarch'}, $ref->{'osvers'});
if (using_subiquity($os)) {
if (using_subiquity($os,$tmplfile)) {
# in this context we use the genos parameter to search for the subiquity template
$tmplfile = xCAT::SvrUtils::get_tmpl_file_name("$installroot/custom/install/$pltfrm",
@@ -738,7 +745,7 @@ sub mkinstall {
my $autoinstfile = "$installroot/autoinst/" . $node;
# handle nocloud-net datasource for ubuntu 20.04+
if (using_subiquity($os)) {
if (using_subiquity($os,$tmplfile)) {
# clean up existing files to make way for the new directory
if (-f $autoinstfile) {
@@ -767,7 +774,7 @@ sub mkinstall {
# maybe Debian will decide to use subiquity at some point?
my $prescript = "$::XCATROOT/share/xcat/install/scripts/pre.$platform";
if (using_subiquity($os)) {
if (using_subiquity($os,$tmplfile)) {
$prescript = $prescript . ".subiquity";
}
my $postscript = "$::XCATROOT/share/xcat/install/scripts/post.$platform";
@@ -896,7 +903,7 @@ sub mkinstall {
mkpath("$tftppath");
copy($kernpath, "$tftppath/vmlinuz");
# we don't want to customise the subiquity initrd
if (using_subiquity($os)) {
if (using_subiquity($os,$tmplfile)) {
copy($initrdpath, "$tftppath/initrd.img");
} else {
copyAndAddCustomizations($initrdpath, "$tftppath/initrd.img");
@@ -927,7 +934,7 @@ sub mkinstall {
my $kcmdline = "nofb utf8 auto xcatd=" . $instserver;
if (using_subiquity($os)) {
if (using_subiquity($os,$tmplfile)) {
$kcmdline .= " autoinstall ip=dhcp netboot=nfs nfsroot=${instserver}:${pkgdir}";
$kcmdline .= " ds=nocloud-net;s=http://${instserver}:${httpport}/install/autoinst/${node}/";
} else {
+3 -3
View File
@@ -190,7 +190,7 @@ sub geninitrd {
mkpath $tftppath;
}
if ($arch =~ /x86/) {
if ($osvers =~ /(^ol[0-9].*)|(centos.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)/) {
if ($osvers =~ /(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)/) {
$kernelpath = "$tftppath/vmlinuz";
copy("$pkgdir/images/pxeboot/vmlinuz", $kernelpath);
$initrdpath = "$tftppath/initrd.img";
@@ -205,7 +205,7 @@ sub geninitrd {
return;
}
} elsif ($arch =~ /ppc/) {
if ($osvers =~ /(^ol[0-9].*)|(centos.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)|(pkvm.*)/) {
if ($osvers =~ /(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)|(pkvm.*)/) {
$kernelpath = "$tftppath/vmlinuz";
copy("$pkgdir/ppc/ppc64/vmlinuz", $kernelpath);
if (-r "$pkgdir/ppc/ppc64/ramdisk.image.gz") {
@@ -231,7 +231,7 @@ sub geninitrd {
# call the insert_dd function in the anaconda or sles to hack the initrd that:
# 1. Get the new kernel from update distro and copy it to /tftpboot
# 2. Inject the drivers to initrd in /tftpboot base on the new kernel ver
if ($osvers =~ /(^ol[0-9].*)|(centos.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)/) {
if ($osvers =~ /(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)/) {
require xCAT_plugin::anaconda;
xCAT_plugin::anaconda->insert_dd($callback, $osvers, $arch, $initrdpath, $kernelpath, $driverupdatesrc, $netdrivers, $osdisupdir, $ignorekernelchk);
} elsif ($osvers =~ /(sles.*)|(suse.*)/) {
@@ -463,6 +463,8 @@ sub getplatform {
$platform = "rh";
} elsif ($os =~ m/centos.*/) {
$platform = "centos";
} elsif ($os =~ m/alma.*/) {
$platform = "alma";
} elsif ($os =~ m/rocky.*/) {
$platform = "rocky";
} elsif ($os =~ m/fedora.*/) {
@@ -846,6 +848,12 @@ sub getOsVersion {
$version = $lines[0];
$version =~ s/[^0-9]*([0-9.]+).*/$1/;
$os = $os . $version;
}
elsif (grep (/Alma Linux/, @lines)) {
$os = "alma";
$version = $lines[0];
$version =~ s/[^0-9]*([0-9.]+).*/$1/;
$os = $os . $version;
}
elsif (grep (/Rocky/, @lines)) {
$os = "rocky";
+1
View File
@@ -1354,6 +1354,7 @@ sub change_profile {
if ($os) {
if ($os =~ /rh.*/) { $platform = "rh"; }
elsif ($os =~ /centos.*/) { $platform = "centos"; }
elsif ($os =~ /alma.*/) { $platform = "alma"; }
elsif ($os =~ /rocky.*/) { $platform = "rocky"; }
elsif ($os =~ /fedora.*/) { $platform = "fedora"; }
elsif ($os =~ /sles.*/) { $platform = "sles"; }
+2 -2
View File
@@ -970,7 +970,7 @@ sub build_xmldesc {
# do nothing for ppc64le, do not support sound at this time
;
} else {
$xtree{devices}->{sound}->{model} = 'ac97';
$xtree{devices}->{sound}->{model} = 'ich6';
}
$xtree{devices}->{console}->{type} = 'pty';
@@ -2258,7 +2258,7 @@ sub chvm {
}
if ($cpucount or $memory) {
if ($currstate eq 'on') {
if ($cpucount) { xCAT::SvrUtils::sendmsg([ 1, "Hot add of cpus not supported (VM must be powered down to successfuly change)" ], $callback, $node); }
if ($cpucount) { xCAT::SvrUtils::sendmsg([ 1, "Hot add of cpus not supported (VM must be powered down to successfully change)" ], $callback, $node); }
if ($cpucount) {
#$dom->set_vcpus($cpucount); this didn't work out as well as I hoped..
+7 -14
View File
@@ -104,7 +104,7 @@ sub process_request {
$callback->({ error => "Need to specify architecture (x86, x86_64 or ppc64)" }, { errorcode => [1] });
return;
} elsif ($arch eq "ppc64le" or $arch eq "ppc64el") {
$callback->({ data => "The arch:$arch is not supported at present, use \"ppc64\" instead" });
$callback->({ data => "The arch:$arch is not supported, using \"ppc64\" instead" });
$arch = 'ppc64';
$request->{arg}->[0] = $arch;
}
@@ -300,14 +300,10 @@ sub process_request {
print $cfg "#!gpxe\n";
if ($invisibletouch) {
print $cfg 'imgfetch -n kernel http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.kernel.' . "$arch quiet xcatd=" . $normnets->{$_} . ":$xcatdport $consolecmdline BOOTIF=01-" . '${netX/machyp}' . "\n";
if ($lzma_exit_value) {
print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.fs.' . "$arch.gz\n";
} else {
print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.fs.' . "$arch.lzma\n";
}
print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport . "$initrd_file\n";
} else {
print $cfg 'imgfetch -n kernel http://${next-server}:'.$httpport.'/tftpboot/xcat/nbk.' . "$arch quiet xcatd=" . $normnets->{$_} . ":$xcatdport $consolecmdline\n";
print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport.'/tftpboot/xcat/nbfs.' . "$arch.gz\n";
print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport . "$initrd_file\n";
}
print $cfg "imgload kernel\n";
print $cfg "imgexec kernel\n";
@@ -318,18 +314,14 @@ sub process_request {
print $cfg " delay=5\n";
print $cfg ' image=/tftpboot/xcat/genesis.kernel.' . "$arch\n";
print $cfg " label=\"xCAT Genesis (" . $normnets->{$_} . ")\"\n";
if ($lzma_exit_value) {
print $cfg " initrd=/tftpboot/xcat/genesis.fs.$arch.gz\n";
} else {
print $cfg " initrd=/tftpboot/xcat/genesis.fs.$arch.lzma\n";
}
print $cfg " initrd=$initrd_file\n";
print $cfg " append=\"quiet xcatd=" . $normnets->{$_} . ":$xcatdport destiny=discover $consolecmdline BOOTIF=%B\"\n";
close($cfg);
open($cfg, ">", "$tftpdir/xcat/xnba/nets/$net.uefi");
print $cfg "#!gpxe\n";
print $cfg 'imgfetch -n kernel http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.kernel.' . "$arch\nimgload kernel\n";
print $cfg "imgargs kernel quiet xcatd=" . $normnets->{$_} . ":$xcatdport $consolecmdline BOOTIF=01-" . '${netX/mac:hexhyp}' . " destiny=discover initrd=initrd\n";
print $cfg 'imgfetch -n initrd http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.fs.' . "$arch.gz\nimgexec kernel\n";
print $cfg 'imgfetch -n initrd http://${next-server}:'.$httpport . "$initrd_file\nimgexec kernel\n";
close($cfg);
}
} elsif ($arch =~ /ppc/) {
@@ -364,11 +356,12 @@ sub process_request {
}
}
if ($dopxe) {
my ($ignored, $tftp_initrd) = split /\/tftpboot\//, $initrd_file, 2;
open($cfgfile, ">", "$tftpdir/pxelinux.cfg/" . uc($_));
print $cfgfile "DEFAULT xCAT\n";
print $cfgfile " LABEL xCAT\n";
print $cfgfile " KERNEL xcat/nbk.$arch\n";
print $cfgfile " APPEND initrd=xcat/nbfs.$arch.gz quiet xcatd=" . $hexnets->{$_} . ":$xcatdport $consolecmdline\n";
print $cfgfile " APPEND initrd=$tftp_initrd quiet xcatd=" . $hexnets->{$_} . ":$xcatdport $consolecmdline\n";
close($cfgfile);
} elsif ($arch =~ /ppc/) {
open($cfgfile, ">", "$tftpdir/etc/" . lc($_));
+5 -5
View File
@@ -136,7 +136,7 @@ sub preprocess_request
# parse the options
$::UPDATE = 0;
$::QUITE = 0;
$::QUIET = 0;
$::MON = 0;
$::POWER = 0;
@@ -146,7 +146,7 @@ sub preprocess_request
$Getopt::Long::ignorecase = 0;
if (!GetOptions(
'm|usemon' => \$::MON,
'q|quite' => \$::QUITE, #this is a internal flag used by monitoring
'q|quiet' => \$::QUIET, #this is a internal flag used by monitoring
'u|updatedb' => \$::UPDATE,
'p|powerstat' => \$::POWER,
'h|help' => \$::HELP,
@@ -174,7 +174,7 @@ sub preprocess_request
}
$req->{'update'}->[0] = $::UPDATE;
$req->{'quite'}->[0] = $::QUITE;
$req->{'quiet'}->[0] = $::QUIET;
$req->{'mon'}->[0] = $::MON;
$req->{'power'}->[0] = $::POWER;
return [$req];
@@ -1123,11 +1123,11 @@ sub process_request {
#print Dumper($request);
my $update = $request->{'update'}->[0];
my $quite = $request->{'quite'}->[0];
my $quiet = $request->{'quiet'}->[0];
#show the output
if (!$quite) {
if (!$quiet) {
foreach my $node1 (sort keys(%$status)) {
my %rsp;
$rsp{name} = [$node1];
+1
View File
@@ -217,6 +217,7 @@ sub create_new_lun {
my %osmap = (
'rh.*' => 'linux',
'centos.*' => 'linux',
'alma.*' => 'linux',
'rocky.*' => 'linux',
'sles.*' => 'linux',
'win2k8' => 'windows_2008',
+13 -8
View File
@@ -329,6 +329,18 @@ sub process_request {
xCAT::Utils->runcmd("cp /opt/xcat/share/xcat/netboot/rh/dracut_033/install.netboot $rootimg_dir/usr/lib/dracut/modules.d/97xcat/install", 0, 1);
# timedatectl requires /etc/localtime link to the zoneinfo in /usr/share/zoneinfo
if ($timezone[0]) {
unlink("$rootimg_dir/etc/localtime");
symlink("../usr/share/zoneinfo/$timezone[0]", "$rootimg_dir/etc/localtime");
if (not stat "$rootimg_dir/etc/localtime") {
$callback->({ warning => ["Unable to set timezone to \'$timezone[0]\', check this is a valid timezone"] });
}
} else {
$callback->({ info => ["No timezone defined in site table, skipping timezone /etc/localtime configuration"] });
}
my $xcat_packimg_tmpfile = "/tmp/xcat_packimg.$$";
my $excludestr = "find . -xdev ";
my $includestr;
@@ -344,11 +356,7 @@ sub process_request {
}
close($exlist);
# timedatectl requires /etc/localtime link to the zoneinfo in /usr/share/zoneinfo
if ($timezone[0]) {
unlink("$rootimg_dir/etc/localtime");
symlink("../usr/share/zoneinfo/$timezone[0]", "$rootimg_dir/etc/localtime");
# Add the zoneinfo to the include list
$excludetext .= "+./usr/share/zoneinfo/$timezone[0]\n";
@@ -361,11 +369,8 @@ sub process_request {
$excludetext .= "+.$relativetzpath\n";
}
if (not stat "$rootimg_dir/etc/localtime") {
$callback->({ warning => ["Unable to set timezone to \'$timezone[0]\', check this is a valid timezone"] });
}
} else {
$callback->({ info => ["No timezone defined in site table, skipping timezone configuration"] });
$callback->({ info => ["No timezone defined in site table, skipping timezone exlist configuration"] });
}
#handle the #INLCUDE# tag recursively
+2 -2
View File
@@ -669,7 +669,7 @@ sub set_route {
} elsif ($os =~ /ubuntu|debian/) { #ubuntu or Debian?
addPersistentRoute_Debian($callback, $net, $mask, $gw_ip, $gw, $ifname);
}
elsif ($os =~ /rh|fedora|centos|rocky/) { #RH, Ferdora, CentOS
elsif ($os =~ /rh|fedora|centos|alma|rocky/) { #RH, Ferdora, CentOS
addPersistentRoute_RH($callback, $net, $mask, $gw_ip, $gw, $ifname);
}
} else { #AIX
@@ -756,7 +756,7 @@ sub delete_route {
} elsif ($os =~ /ubuntu/) { #ubuntu or Debian?
deletePersistentRoute_Debian($callback, $net, $mask, $gw_ip, $gw, $ifname);
}
elsif ($os =~ /rh|fedora|centos|rocky/) { #RH, Ferdora
elsif ($os =~ /rh|fedora|centos|alma|rocky/) { #RH, Ferdora
deletePersistentRoute_RH($callback, $net, $mask, $gw_ip, $gw, $ifname);
}
}
+9
View File
@@ -1770,6 +1770,15 @@ sub copycd
$distname = "sle15";
}
};
} elsif ($dsc =~ /SLE-15/ and $dsc =~ /SOURCE/) {
$discnumber = 2;
unless ($distname) {
if ($dsc =~ /SLE-15-SP(\d)/) {
$distname = "sle15.$1";
} else {
$distname = "sle15";
}
};
} elsif ($dsc =~ /SLE-15/ and $dsc =~ /Full/) {
$discnumber = 1;
$linktwo = 1;
+12 -1
View File
@@ -3352,7 +3352,7 @@ sub updateOS
$version =~ s/[^0-9]*([0-9]+).*/$1/;
}
# SUSE Linux
# SUSE Linux 12 and earlier
elsif (
`ssh -o ConnectTimeout=5 $node "test -f /etc/SuSE-release && echo 'SuSE'"`
)
@@ -3363,6 +3363,17 @@ sub updateOS
$version =~ s/[^0-9]*([0-9]+).*/$1/;
}
# SUSE Linux 15 and later
elsif (
`ssh -o ConnectTimeout=5 $node "test -f /etc/SUSE-brand && echo 'SuSE'"`
)
{
$installOS = "sles";
chomp($version =
`ssh $node "tr -d '.' < /etc/SUSE-brand" | grep VERSION`);
$version =~ s/[^0-9]*([0-9]+).*/$1/;
}
# Everything else
else
{
+13 -2
View File
@@ -63,8 +63,19 @@ do
echo " $i;"
done >>$FILE
echo " };" >>$FILE
BIND_VERSION=$(/usr/sbin/named -v | cut -d" " -f2)
if [[ $BIND_VERSION > "9.16.5" ]]; then
# Natural version compare against version of bind.
# If version 9.16.6 or higher, turn off DNSSEC
BIND_VERSION=$(/usr/sbin/named -v | cut -d" " -f2 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
CONTROL_BIND_VERSION="9.16.6"
# "sort --version-sort" takes lines of version strings and sorts them.
# Output is lines of versions in sorted order, last line is highest version number
LAST_IN_COMPARE=`printf '%s\n' $BIND_VERSION $CONTROL_BIND_VERSION | sort --version-sort | tail -n1`
if [ $BIND_VERSION = $LAST_IN_COMPARE ]; then
# current version of BIND was last in sorted order,
# therefor it is higher than CONTROL_BIND_VERSION
echo " dnssec-enable no;
dnssec-validation no;" >>$FILE
fi
@@ -376,7 +376,7 @@ EOF
# Being called from <image>.postinstall script
# Assume we are on the same machine
if [ -f /etc/SuSE-release ]; then
if [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then
chroot "$IMGROOTPATH" rpm -e --noscripts --allmatches mlnx-ofa_kernel-kmp-default 2>/dev/null
chroot "$IMGROOTPATH" rpm -e --nodeps --allmatches libibverbs 2>/dev/null
elif grep -q Ubuntu /etc/os-release 2>/dev/null; then
@@ -64,7 +64,7 @@ then
if [ -f /etc/redhat-release ]
then
OS_name="redhat"
elif [ -f /etc/SuSE-release ]
elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]
then
OS_name="suse"
else
@@ -57,7 +57,7 @@ then
if [ -f /etc/redhat-release ]
then
OS_name="redhat"
elif [ -f /etc/SuSE-release ]
elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]
then
OS_name="suse"
else
@@ -142,7 +142,7 @@ do
if [ -f /etc/redhat-release ]
then
OS_name="redhat"
elif [ -f /etc/SuSE-release ]
elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]
then
OS_name="suse"
else
@@ -0,0 +1 @@
../rh/compute.rhels8.pkglist
@@ -0,0 +1 @@
../rh/compute.rhels8.tmpl
@@ -0,0 +1 @@
../rh/service.rhels8.pkglist
@@ -0,0 +1 @@
../rh/service.rhels8.tmpl
@@ -0,0 +1 @@
../rh/service.rhels8.x86_64.otherpkgs.pkglist
@@ -22,7 +22,7 @@ done
# List of internal repos to be disabled
internet_repo_file_list="oracle-linux-ol8.repo uek-ol8.repo Rocky-AppStream.repo Rocky-BaseOS.repo Rocky-Extras.repo CentOS-Base.repo"
internet_repo_file_list="oracle-linux-ol8.repo uek-ol8.repo Rocky-AppStream.repo Rocky-BaseOS.repo Rocky-Extras.repo CentOS-Base.repo almalinux-ha.repo almalinux-nfv.repo almalinux-powertools.repo almalinux.repo almalinux-resilientstorage.repo almalinux-rt.repo"
for repo_file in $internet_repo_file_list
do
@@ -143,6 +143,8 @@ d-i preseed/late_command string \
mount -o bind /dev/pts /target/dev/pts -t devpts; \
mount -o bind /sys /target/sys; \
chroot /target /root/post.script; \
cp /target/etc/network/interfaces /etc/network/interfaces; \
if [ -f /target/etc/network/interfaces ]; then \
cp /target/etc/network/interfaces /etc/network/interfaces; \
fi; \
} >>/target/var/log/xcat/xcat.log 2>&1
@@ -101,7 +101,7 @@ echo "export PATH=\$PATH:$TORQUEDIR/\$XARCH/bin:$TORQUEDIR/\$XARCH/sbin" >>etc/p
echo "export PBS_DEFAULT=$TORQUESERVER" >>etc/profile.d/torque.sh
chmod 755 etc/profile.d/torque.*
if [ -r /etc/SuSE-release ]
if [ -r /etc/SuSE-release ] || [ -r /etc/SUSE-brand ]
then
cp $XCATROOT/share/xcat/netboot/add-on/torque/pbs_mom.suse etc/init.d/pbs_mom
cp $XCATROOT/share/xcat/netboot/add-on/torque/pbs_mom.suse sbin/rcpbs_mom
@@ -0,0 +1 @@
../rh/compute.rhels8.x86_64.exlist
@@ -0,0 +1 @@
../rh/compute.rhels8.x86_64.pkglist
@@ -0,0 +1 @@
../rh/compute.rhels8.x86_64.postinstall
+1
View File
@@ -0,0 +1 @@
../rh/dracut
+1
View File
@@ -0,0 +1 @@
../rh/dracut_033
+1
View File
@@ -0,0 +1 @@
../rh/dracut_047
+1
View File
@@ -0,0 +1 @@
../rh/genimage
+1
View File
@@ -0,0 +1 @@
genimage
+1
View File
@@ -0,0 +1 @@
../rh/kvm.exlist
+1
View File
@@ -0,0 +1 @@
../rh/kvm.rhels5.4.pkglist
@@ -0,0 +1 @@
../rh/service.rhels8.x86_64.exlist
@@ -0,0 +1 @@
../rh/service.rhels8.x86_64.otherpkgs.pkglist
@@ -0,0 +1 @@
../rh/service.rhels8.x86_64.pkglist
@@ -0,0 +1 @@
../rh/service.rhels8.x86_64.postinstall
+1
View File
@@ -0,0 +1 @@
../rh/xen.exlist
+1
View File
@@ -0,0 +1 @@
../rh/xen.pkglist
@@ -25,6 +25,7 @@
+./usr/share/locale/locale.alias
+./usr/lib/locale/locale-archive
+./usr/lib/locale/en*
+./usr/lib/locale/C*
./usr/share/man*
./usr/share/omf*
./usr/share/vim/site/doc*
@@ -25,6 +25,7 @@
+./usr/share/locale/locale.alias
+./usr/lib/locale/locale-archive
+./usr/lib/locale/en*
+./usr/lib/locale/C*
./usr/share/man*
./usr/share/omf*
./usr/share/vim/site/doc*
@@ -25,6 +25,7 @@
+./usr/share/locale/locale.alias
+./usr/lib/locale/locale-archive
+./usr/lib/locale/en*
+./usr/lib/locale/C*
./usr/share/omf*
./usr/share/vim/site/doc*
./usr/share/vim/vim74/doc*
@@ -25,6 +25,7 @@
+./usr/share/locale/locale.alias
+./usr/lib/locale/locale-archive
+./usr/lib/locale/en*
+./usr/lib/locale/C*
./usr/share/man*
./usr/share/omf*
./usr/share/vim/site/doc*
@@ -23,6 +23,7 @@
+./usr/share/locale/locale.alias
+./usr/lib/locale/locale-archive
+./usr/lib/locale/en*
+./usr/lib/locale/C*
./usr/share/omf*
./usr/share/vim/site/doc*
./usr/share/vim/vim74/doc*
@@ -23,6 +23,7 @@
+./usr/share/locale/locale.alias
+./usr/lib/locale/locale-archive
+./usr/lib/locale/en*
+./usr/lib/locale/C*
./usr/share/man*
./usr/share/omf*
./usr/share/vim/site/doc*
@@ -23,6 +23,7 @@
+./usr/share/locale/locale.alias
+./usr/lib/locale/locale-archive
+./usr/lib/locale/en*
+./usr/lib/locale/C*
./usr/share/omf*
./usr/share/vim/site/doc*
./usr/share/vim/vim74/doc*

Some files were not shown because too many files have changed in this diff Show More