第3章 Upgrading Red Hat Satellite
If you have Satellite 6 installed in a high availability configuration, contact Red Hat Support before upgrading to Satellite 6.8.
Use the following procedures to upgrade your existing Red Hat Satellite to Red Hat Satellite 6.8:
Before upgrading, see 「Prerequisites」.
3.1. Upgrading Satellite Server リンクのコピーリンクがクリップボードにコピーされました!
This section describes how to upgrade Satellite Server from 6.7 to 6.8. You can upgrade from any minor version of Red Hat Satellite Server 6.7.
Before You Begin
- Note that you can upgrade Capsules separately from Satellite. For more information, see 「Upgrading Capsules Separately from Satellite」.
- Review and update your firewall configuration prior to upgrading your Satellite Server. For more information, see Ports and Firewalls Requirements in Installing Satellite Server from a Connected Network.
- Ensure that you do not delete the manifest from the Customer Portal or in the Satellite Web UI because this removes all the entitlements of your content hosts.
- Back up and remove all Foreman hooks before upgrading. Restore any hooks only after Satellite is known to be working after the upgrade is complete.
- If you have edited any of the default templates, back up the files either by cloning or exporting them. Cloning is the recommended method because that prevents them being overwritten in future updates or upgrades. To confirm if a template has been edited, you can view its History before you upgrade or view the changes in the audit log after an upgrade. In the web UI, Navigate to Monitor > Audits and search for the template to see a record of changes made. If you use the export method, restore your changes by comparing the exported template and the default template, manually applying your changes.
Capsule Considerations
- If you use Content Views to control updates to a Capsule Server’s base operating system, or for the Capsule Server repository, you must publish updated versions of those Content Views.
If you implemented custom certificates, you must retain the content of both the /root/ssl-build directory and the directory in which you created any source files associated with your custom certificates.
Failure to retain these files during an upgrade causes the upgrade to fail. If these files have been deleted, they must be restored from a backup in order for the upgrade to proceed.
Configuring the BASH shell
The BASH shell stores the location of a binary in a hash table. During the upgrade, the location of the satellite-maintain script is changed, but BASH does not register this change, and satellite-maintain fails if it calls the script after the change.
Optional: Before the upgrade, users of the BASH shell can set the
checkhashoption temporarily to ensuresatellite-maintainworks after the installer completes. Enter a command as follows in your BASH shell:shopt -s checkhash
# shopt -s checkhashCopy to Clipboard Copied! Toggle word wrap Toggle overflow After a successful or failed upgrade, in all currently running BASH shells, enter the following command:
hash -d satellite-maintain 2> /dev/null
# hash -d satellite-maintain 2> /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Upgrade Scenarios
- To upgrade a Satellite Server connected to the Red Hat Content Delivery Network, proceed to 「Upgrading a Connected Satellite Server」.
- To upgrade a Satellite Server not connected to the Red Hat Content Delivery Network, proceed to 「Upgrading a Disconnected Satellite Server」.
You cannot upgrade a self-registered Satellite. You must migrate a self-registered Satellite to the Red Hat Content Delivery Network (CDN) and then perform the upgrade. To migrate a self-registered Satellite to the CDN, see Migrating Self-Registered Satellites in the Satellite 6.3 Upgrading and Updating Red Hat Satellite guide.
FIPS mode
You cannot upgrade Satellite Server from a RHEL base system that is not operating in FIPS mode to a RHEL base system that is operating in FIPS mode.
To run Satellite Server on a RHEL base system operating in FIPS mode, you must install Satellite on a freshly provisioned RHEL base system operating in FIPS mode. For more information, see System Requirements in Installing Satellite Server from a Connected Network.
3.1.1. Upgrading a Connected Satellite Server リンクのコピーリンクがクリップボードにコピーされました!
Use this procedure for a Satellite Server connected to the Red Hat Content Delivery Network.
If you customize configuration files, manually or using a tool such as Hiera, these changes are overwritten when the installation script runs during upgrading or updating. You can use the --noop option with the satellite-installer script to test for changes. For more information, see the Red Hat Knowledgebase solution How to use the noop option to check for changes in Satellite config files during an upgrade.
Upgrade Satellite Server
Create a backup.
- On a virtual machine, take a snapshot.
On a physical machine, create a backup.
For more information about backups, see Backing Up Satellite Server and Capsule Server in the Administering Red Hat Satellite 6.7 guide.
-
Optional: If you made manual edits to DNS or DHCP configuration in the
/etc/zones.confor/etc/dhcp/dhcpd.conffiles, back up the configuration files because the installer only supports one domain or subnet, and therefore restoring changes from these backups might be required. Optional: If you made manual edits to DNS or DHCP configuration files and do not want to overwrite the changes, enter the following command:
satellite-installer --foreman-proxy-dns-managed=false \ --foreman-proxy-dhcp-managed=false
# satellite-installer --foreman-proxy-dns-managed=false \ --foreman-proxy-dhcp-managed=falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If you use PostgreSQL as an external database, on the PostgreSQL server, install the
rh-postgresql12-postgresql-evrpackage, which is available from therhel-7-server-satellite-6.8-rpmsrepository:yum install rh-postgresql12-postgresql-evr
# yum install rh-postgresql12-postgresql-evrCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In the Satellite web UI, navigate to Hosts > Discovered hosts. On the Discovered Hosts page, power off and then delete the discovered hosts. From the Select an Organization menu, select each organization in turn and repeat the process to power off and delete the discovered hosts. Make a note to reboot these hosts when the upgrade is complete.
Ensure that the Satellite Maintenance repository is enabled:
subscription-manager repos --enable \ rhel-7-server-satellite-maintenance-6-rpms
# subscription-manager repos --enable \ rhel-7-server-satellite-maintenance-6-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the
rubygem-foreman_maintainpackage that providessatellite-maintainis installed and up to date:yum install rubygem-foreman_maintain
# yum install rubygem-foreman_maintainCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the available versions to confirm the version you want is listed:
satellite-maintain upgrade list-versions
# satellite-maintain upgrade list-versionsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the health check option to determine if the system is ready for upgrade. When prompted, enter the hammer admin user credentials to configure
satellite-maintainwith hammer credentials. These changes are applied to the/etc/foreman-maintain/foreman-maintain-hammer.ymlfile.satellite-maintain upgrade check --target-version 6.8
# satellite-maintain upgrade check --target-version 6.8Copy to Clipboard Copied! Toggle word wrap Toggle overflow Review the results and address any highlighted error conditions before performing the upgrade.
Because of the lengthy upgrade time, use a utility such as
screento suspend and reattach a communication session. You can then check the upgrade progress without staying connected to the command shell continuously. For more information about using the screen command, see How do I use the screen command? article in the Red Hat Knowledge Base.If you lose connection to the command shell where the upgrade command is running you can see the logged messages in the
/var/log/foreman-installer/satellite.logfile to check if the process completed successfully.Perform the upgrade:
satellite-maintain upgrade run --target-version 6.8
# satellite-maintain upgrade run --target-version 6.8Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check when the kernel packages were last updated:
rpm -qa --last | grep kernel
# rpm -qa --last | grep kernelCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If a kernel update occurred since the last reboot, stop the
satellite-maintainservices and reboot the system:satellite-maintain service stop reboot
# satellite-maintain service stop # rebootCopy to Clipboard Copied! Toggle word wrap Toggle overflow If using a BASH shell, after a successful or failed upgrade, enter:
hash -d satellite-maintain service 2> /dev/null
# hash -d satellite-maintain service 2> /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Optional: If you made manual edits to DNS or DHCP configuration files, check and restore any changes required to the DNS and DHCP configuration files using the backups that you make.
If you make changes in the previous step, restart the
satellite-maintainservices.satellite-maintain service restart
# satellite-maintain service restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you have the OpenSCAP plug-in installed, but do not have the default OpenSCAP content available, enter the following command:
foreman-rake foreman_openscap:bulk_upload:default
# foreman-rake foreman_openscap:bulk_upload:defaultCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.1.2. Upgrading a Disconnected Satellite Server リンクのコピーリンクがクリップボードにコピーされました!
Use this procedure for a Satellite Server not connected to the Red Hat Content Delivery Network.
If you customize configuration files, manually or using a tool such as Hiera, these changes are overwritten when you enter the satellite-maintain command during upgrading or updating. You can use the --noop option with the satellite-installer command to review the changes that are applied during upgrading or updating. For more information, see the Red Hat Knowledgebase solution How to use the noop option to check for changes in Satellite config files during an upgrade.
Before You Begin
- Review and update your firewall configuration before upgrading your Satellite Server. For more information, see Ports and Firewalls Requirements in Installing Satellite Server from a Disconnected Network.
- Ensure that you do not delete the manifest from the Customer Portal or in the Satellite Web UI because this removes all the entitlements of your content hosts.
- Back up and remove all Foreman hooks before upgrading. Reinstate hooks only after Satellite is known to be working after the upgrade is complete.
If you implemented custom certificates, you must retain the content of both the /root/ssl-build directory and the directory in which you created any source files associated with your custom certificates.
Failure to retain these files during an upgrade causes the upgrade to fail. If these files have been deleted, they must be restored from a backup in order for the upgrade to proceed.
Upgrade Disconnected Satellite Server
Create a backup.
- On a virtual machine, take a snapshot.
- On a physical machine, create a backup.
A pre-upgrade script is available to detect conflicts and list hosts which have duplicate entries in Satellite Server that can be unregistered and deleted after upgrade. In addition, it will detect hosts which are not assigned to an organization. If a host is listed under Hosts > All hosts without an organization association and if a content host with same name has an organization already associated with it then the content host will automatically be unregistered. This can be avoided by associating such hosts to an organization before upgrading.
Run the pre-upgrade check script to get a list of hosts that can be deleted after upgrading. If any unassociated hosts are found, associating them to an organization before upgrading is recommended.
foreman-rake katello:upgrade_check
# foreman-rake katello:upgrade_checkCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the upgrade check reports a failure due to running tasks, then it is recommended that you wait for the tasks to complete. It is possible to cancel some tasks, but you should follow the guidance in the Red Hat Knowledgebase solution How to manage paused tasks on Red Hat Satellite 6 to understand which tasks are safe to cancel and which are not safe to cancel.
-
Optional: If you made manual edits to DNS or DHCP configuration in the
/etc/zones.confor/etc/dhcp/dhcpd.conffiles, back up the configuration files because the installer only supports one domain or subnet, and therefore restoring changes from these backups might be required. Optional: If you made manual edits to DNS or DHCP configuration files and do not want to overwrite the changes, enter the following command:
satellite-installer --foreman-proxy-dns-managed=false \ --foreman-proxy-dhcp-managed=false
# satellite-installer --foreman-proxy-dns-managed=false \ --foreman-proxy-dhcp-managed=falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If you use PostgreSQL as an external database, on the PostgreSQL server, install the
rh-postgresql12-postgresql-evrpackage, which is available from therhel-7-server-satellite-6.8-rpmsrepository:yum install rh-postgresql12-postgresql-evr
# yum install rh-postgresql12-postgresql-evrCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
In the Satellite web UI, navigate to Hosts > Discovered hosts. If there are discovered hosts available, turn them off and then delete all entries under the
Discovered hostspage. Select all other organizations in turn using the organization setting menu and repeat this action as required. Reboot these hosts after the upgrade has completed. - Make sure all external Capsule Servers are assigned to an organization, otherwise they might get unregistered due to host-unification changes.
Remove old repositories:
rm /etc/yum.repos.d/*
# rm /etc/yum.repos.d/*Copy to Clipboard Copied! Toggle word wrap Toggle overflow Stop the
satellite-maintainservices.satellite-maintain service stop
# satellite-maintain service stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Obtain the latest ISO files by following the Downloading the Binary DVD Images procedure in the Installing Satellite Server from a Disconnected Network guide.
-
Create directories to serve as a mount point, mount the ISO images, and configure the
rhel7-serverrepository by following the Configuring the Base System with Offline Repositories procedure in the Installing Satellite Server from a Disconnected Network guide. Do not install or update any packages at this stage. Configure the Satellite 6.8 repository from the ISO file.
Copy the ISO file’s repository data file for the Red Hat Satellite packages:
cp /media/sat6/media.repo /etc/yum.repos.d/sat6.repo
# cp /media/sat6/media.repo /etc/yum.repos.d/sat6.repoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/etc/yum.repos.d/sat6.repofile:vi /etc/yum.repos.d/sat6.repo
# vi /etc/yum.repos.d/sat6.repoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Change the default
InstallMediarepository name toSatellite-6.8:[Satellite-6.8]
[Satellite-6.8]Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the
baseurldirective:baseurl=file:///media/sat6/
baseurl=file:///media/sat6/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Configure the Red Hat Software Collections repository from the ISO file.
Copy the ISO file’s repository data file for Red Hat Software Collections packages:
cp /media/sat6/RHSCL/media.repo /etc/yum.repos.d/RHSCL.repo
# cp /media/sat6/RHSCL/media.repo /etc/yum.repos.d/RHSCL.repoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/etc/yum.repos.d/RHSCL.repofile:vi /etc/yum.repos.d/RHSCL.repo
# vi /etc/yum.repos.d/RHSCL.repoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Change the default
InstallMediarepository name toRHSCL:[RHSCL]
[RHSCL]Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the
baseurldirective:baseurl=file:///media/sat6/RHSCL/
baseurl=file:///media/sat6/RHSCL/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Configure the Red Hat Satellite Maintenance repository from the ISO file.
Copy the ISO file’s repository data file for Red Hat Satellite Maintenance packages:
cp /media/sat6/sat-maintenance/media.repo /etc/yum.repos.d/sat-maintenance.repo
# cp /media/sat6/sat-maintenance/media.repo /etc/yum.repos.d/sat-maintenance.repoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/etc/yum.repos.d/sat-maintenance.repofile:vi /etc/yum.repos.d/sat-maintenance.repo
# vi /etc/yum.repos.d/sat-maintenance.repoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Change the default
InstallMediarepository name toSatellite-Maintenance:[Satellite-Maintenance]
[Satellite-Maintenance]Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the
baseurldirective:baseurl=file:///media/sat6/sat-maintenance/
baseurl=file:///media/sat6/sat-maintenance/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Optional: If you have applied custom Apache server configurations, note that the custom configurations are reverted to the installation defaults when you perform the upgrade.
To preview the changes that are applied during the upgrade, enter the
satellite-installercommand with the--noop(no operation) option. These changes are applied when you enter thesatellite-maintain upgradecommand in a following step.Add the following line to the
/etc/httpd/conf/httpd.confconfiguration file.Include /etc/httpd/conf.modules.d/*.conf
Include /etc/httpd/conf.modules.d/*.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
httpdservice.systemctl restart httpd
# systemctl restart httpdCopy to Clipboard Copied! Toggle word wrap Toggle overflow Start the
postgresqlandrh-mongodb34-mongoddatabase services.systemctl start postgresql systemctl start rh-mongodb34-mongod
# systemctl start postgresql # systemctl start rh-mongodb34-mongodCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the
satellite-installercommand with the--noopoption:satellite-installer --scenario satellite --upgrade --verbose --noop
# satellite-installer --scenario satellite --upgrade --verbose --noopCopy to Clipboard Copied! Toggle word wrap Toggle overflow Review the
/var/log/foreman-installer/satellite.logto preview the changes that are applied during the upgrade. Locate the+++and---symbols that indicate the changes to the configurations files. Although entering thesatellite-installercommand with the--noopoption does not apply any changes to your Satellite, some Puppet resources in the module expect changes to be applied and might display failure messages.Stop the
satellite-maintainservices:satellite-maintain service stop
# satellite-maintain service stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Because of the lengthy upgrade time, use a utility such as
screento suspend and reattach a communication session. You can then check the upgrade progress without staying connected to the command shell continuously. For more information about using the screen command, see How do I use the screen command? article in the Red Hat Knowledge Base.If you lose connection to the command shell where the upgrade command is running you can see the logs in
/var/log/foreman-installer/satellite.logto check if the process completed successfully.Ensure that the
rubygem-foreman_maintainpackage that providessatellite-maintainis installed and up to date:yum install rubygem-foreman_maintain
# yum install rubygem-foreman_maintainCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the available versions to confirm the version you want is listed:
satellite-maintain upgrade list-versions
# satellite-maintain upgrade list-versionsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the health check option to determine if the system is ready for upgrade. When prompted, enter the hammer admin user credentials to configure
satellite-maintainwith hammer credentials. These changes are applied to the/etc/foreman-maintain/foreman-maintain-hammer.ymlfile.satellite-maintain upgrade check --target-version 6.8 \ --whitelist="repositories-validate,repositories-setup"
# satellite-maintain upgrade check --target-version 6.8 \ --whitelist="repositories-validate,repositories-setup"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Review the results and address any highlighted error conditions before performing the upgrade.
Perform the upgrade:
satellite-maintain upgrade run --target-version 6.8 \ --whitelist="repositories-validate,repositories-setup"
# satellite-maintain upgrade run --target-version 6.8 \ --whitelist="repositories-validate,repositories-setup"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 警告If you run the command from a directory containing a config subdirectory, you will encounter the following error:
ERROR: Scenario (config/satellite.yaml) was not found, can not continue.
ERROR: Scenario (config/satellite.yaml) was not found, can not continue.Copy to Clipboard Copied! Toggle word wrap Toggle overflow In such a case, change directory, for example to the root user’s home directory, and run the command again.
If the script fails due to missing or outdated packages, you must download and install these separately. For more information, see the Resolving Package Dependency Errors section in the Installing Satellite Server from a Disconnected Network guide.
If using a BASH shell, after a successful or failed upgrade, enter:
hash -d satellite-maintain service 2> /dev/null
# hash -d satellite-maintain service 2> /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check when the kernel packages were last updated:
rpm -qa --last | grep kernel
# rpm -qa --last | grep kernelCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If a kernel update occurred since the last reboot, stop the
satellite-maintainservices and reboot the system:satellite-maintain service stop reboot
# satellite-maintain service stop # rebootCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Optional: If you made manual edits to DNS or DHCP configuration files, check and restore any changes required to the DNS and DHCP configuration files using the backups that you made.
If you make changes in the previous step, restart the
satellite-maintainservices.satellite-maintain service restart
# satellite-maintain service restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you have the OpenSCAP plug-in installed, but do not have the default OpenSCAP content available, enter the following command.
foreman-rake foreman_openscap:bulk_upload:default
# foreman-rake foreman_openscap:bulk_upload:defaultCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In the Satellite web UI, go to Configure > Discovery Rules and associate selected organizations and locations with discovery rules.