This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.6. Updating RHEL compute machines in your cluster
After you update your cluster, you must update the Red Hat Enterprise Linux (RHEL) compute machines in your cluster.
Prerequisites
You updated your cluster.
重要Because the RHEL machines require assets that are generated by the cluster to complete the update process, you must update the cluster before you update the RHEL compute machines in it.
-
You have access to the machine that you used to add the RHEL compute machines cluster. You must have access to the
hosts
Ansible inventory file that defines your RHEL machines and theupgrade
playbook.
Procedure
Stop and disable firewalld on the host:
systemctl disable --now firewalld.service
# systemctl disable --now firewalld.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意You must not enable firewalld later. If you do, you cannot access OpenShift Container Platform logs on the worker.
Enable the repositories that are required for OpenShift Container Platform 4.5:
On the machine that you run the Ansible playbooks, update the required repositories:
subscription-manager repos --disable=rhel-7-server-ose-4.4-rpms \ --enable=rhel-7-server-ansible-2.9-rpms \ --enable=rhel-7-server-ose-4.5-rpms
# subscription-manager repos --disable=rhel-7-server-ose-4.4-rpms \ --enable=rhel-7-server-ansible-2.9-rpms \ --enable=rhel-7-server-ose-4.5-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On the machine that you run the Ansible playbooks, update the required packages, including
openshift-ansible
:yum update openshift-ansible openshift-clients
# yum update openshift-ansible openshift-clients
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On each RHEL compute node, update the required repositories:
subscription-manager repos --disable=rhel-7-server-ose-4.4-rpms \ --enable=rhel-7-server-ose-4.5-rpms
# subscription-manager repos --disable=rhel-7-server-ose-4.4-rpms \ --enable=rhel-7-server-ose-4.5-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Update a RHEL worker machine:
Review the current node status to determine which RHEL worker to update:
oc get node
# oc get node
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note which machine has the
NotReady,SchedulingDisabled
status.Review your Ansible inventory file at
/<path>/inventory/hosts
and update its contents so that only the machine with theNotReady,SchedulingDisabled
status is listed in the[workers]
section, as shown in the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change to the
openshift-ansible
directory:cd /usr/share/ansible/openshift-ansible
$ cd /usr/share/ansible/openshift-ansible
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
upgrade
playbook:ansible-playbook -i /<path>/inventory/hosts playbooks/upgrade.yml
$ ansible-playbook -i /<path>/inventory/hosts playbooks/upgrade.yml
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- For
<path>
, specify the path to the Ansible inventory file that you created.
- Follow the process in the previous step to update each RHEL worker machine in your cluster.
After you update all of the workers, confirm that all of your cluster nodes have updated to the new version:
oc get node
# oc get node
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow