Este contenido no está disponible en el idioma seleccionado.
Chapter 2. Preparing for an OpenStack Platform Upgrade
This process prepares your OpenStack Platform environment for a full update. This involves the following process:
- Update the undercloud packages and run the upgrade command
- Reboot the undercloud in case a newer kernel or newer system packages are installed
- Update the overcloud using the overcloud upgrade command
- Reboot the overcloud nodes in case a newer kernel or newer system packages are installed
- Perform a validation check on both the undercloud and overcloud
These procedures ensure your OpenStack Platform environment is in the best possible state before proceeding with the upgrade.
2.1. Performing a minor update of the current undercloud and overcloud Copiar enlaceEnlace copiado en el portapapeles!
Before upgrading to OpenStack Platform 13, you must update your existing environment to the latest minor version, which is version 12 in this case. To update your existing OpenStack Platform 12 environment, see "Keeping OpenStack Platform Updated".
2.2. Rebooting controller and composable nodes Copiar enlaceEnlace copiado en el portapapeles!
The following procedure reboots controller nodes and standalone nodes based on composable roles. This excludes Compute nodes and Ceph Storage nodes.
Procedure
- Log in to the node that you want to reboot.
Optional: If the node uses Pacemaker resources, stop the cluster:
sudo pcs cluster stop
[heat-admin@overcloud-controller-0 ~]$ sudo pcs cluster stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow Reboot the node:
sudo reboot
[heat-admin@overcloud-controller-0 ~]$ sudo rebootCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Wait until the node boots.
Check the services. For example:
If the node uses Pacemaker services, check that the node has rejoined the cluster:
sudo pcs status
[heat-admin@overcloud-controller-0 ~]$ sudo pcs statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the node uses Systemd services, check that all services are enabled:
sudo systemctl status
[heat-admin@overcloud-controller-0 ~]$ sudo systemctl statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Repeat these steps for all Controller and composable nodes.
2.3. Rebooting a Ceph Storage (OSD) cluster Copiar enlaceEnlace copiado en el portapapeles!
The following procedure reboots a cluster of Ceph Storage (OSD) nodes.
Procedure
Log in to a Ceph MON or Controller node and disable Ceph Storage cluster rebalancing temporarily:
sudo ceph osd set noout sudo ceph osd set norebalance
$ sudo ceph osd set noout $ sudo ceph osd set norebalanceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Select the first Ceph Storage node to reboot and log into it.
Reboot the node:
sudo reboot
$ sudo rebootCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Wait until the node boots.
Log in to a Ceph MON or Controller node and check the cluster status:
sudo ceph -s
$ sudo ceph -sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check that the
pgmapreports allpgsas normal (active+clean).- Log out of the Ceph MON or Controller node, reboot the next Ceph Storage node, and check its status. Repeat this process until you have rebooted all Ceph storage nodes.
When complete, log into a Ceph MON or Controller node and enable cluster rebalancing again:
sudo ceph osd unset noout sudo ceph osd unset norebalance
$ sudo ceph osd unset noout $ sudo ceph osd unset norebalanceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Perform a final status check to verify the cluster reports
HEALTH_OK:sudo ceph status
$ sudo ceph statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.4. Rebooting Compute nodes Copiar enlaceEnlace copiado en el portapapeles!
Rebooting a Compute node involves the following workflow:
- Select a Compute node to reboot and disable it so that it does not provision new instances.
- Migrate the instances to another Compute node to minimise instance downtime.
- Reboot the empty Compute node and enable it.
Procedure
-
Log in to the undercloud as the
stackuser. To identify the Compute node that you intend to reboot, list all Compute nodes:
source ~/stackrc
$ source ~/stackrc (undercloud) $ openstack server list --name computeCopy to Clipboard Copied! Toggle word wrap Toggle overflow From the overcloud, select a Compute Node and disable it:
source ~/overcloudrc
$ source ~/overcloudrc (overcloud) $ openstack compute service list (overcloud) $ openstack compute service set <hostname> nova-compute --disableCopy to Clipboard Copied! Toggle word wrap Toggle overflow List all instances on the Compute node:
(overcloud) $ openstack server list --host <hostname> --all-projects
(overcloud) $ openstack server list --host <hostname> --all-projectsCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Migrate your instances. For more information on migration strategies, see Migrating virtual machines between Compute nodes.
Log into the Compute Node and reboot it:
sudo reboot
[heat-admin@overcloud-compute-0 ~]$ sudo rebootCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Wait until the node boots.
Enable the Compute node:
source ~/overcloudrc
$ source ~/overcloudrc (overcloud) $ openstack compute service set <hostname> nova-compute --enableCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the Compute node is enabled:
(overcloud) $ openstack compute service list
(overcloud) $ openstack compute service listCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.5. Validating the undercloud Copiar enlaceEnlace copiado en el portapapeles!
The following is a set of steps to check the functionality of your undercloud.
Procedure
Source the undercloud access details:
source ~/stackrc
$ source ~/stackrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check for failed Systemd services:
(undercloud) $ sudo systemctl list-units --state=failed 'openstack*' 'neutron*' 'httpd' 'docker'
(undercloud) $ sudo systemctl list-units --state=failed 'openstack*' 'neutron*' 'httpd' 'docker'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the undercloud free space:
(undercloud) $ df -h
(undercloud) $ df -hCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the "Undercloud Requirements" as a basis to determine if you have adequate free space.
If you have NTP installed on the undercloud, check that clocks are synchronized:
(undercloud) $ sudo ntpstat
(undercloud) $ sudo ntpstatCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the undercloud network services:
(undercloud) $ openstack network agent list
(undercloud) $ openstack network agent listCopy to Clipboard Copied! Toggle word wrap Toggle overflow All agents should be
Aliveand their state should beUP.Check the undercloud compute services:
(undercloud) $ openstack compute service list
(undercloud) $ openstack compute service listCopy to Clipboard Copied! Toggle word wrap Toggle overflow All agents' status should be
enabledand their state should beup
Related Information
- The following solution article shows how to remove deleted stack entries in your OpenStack Orchestration (heat) database: https://access.redhat.com/solutions/2215131
2.6. Validating a containerized overcloud Copiar enlaceEnlace copiado en el portapapeles!
The following is a set of steps to check the functionality of your containerized overcloud.
Procedure
Source the undercloud access details:
source ~/stackrc
$ source ~/stackrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the status of your bare metal nodes:
(undercloud) $ openstack baremetal node list
(undercloud) $ openstack baremetal node listCopy to Clipboard Copied! Toggle word wrap Toggle overflow All nodes should have a valid power state (
on) and maintenance mode should befalse.Check for failed Systemd services:
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo systemctl list-units --state=failed 'openstack*' 'neutron*' 'httpd' 'docker' 'ceph*'" ; done
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo systemctl list-units --state=failed 'openstack*' 'neutron*' 'httpd' 'docker' 'ceph*'" ; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check for failed containerized services:
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker ps -f 'exited=1' --all" ; done (undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker ps -f 'status=dead' -f 'status=restarting'" ; done
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker ps -f 'exited=1' --all" ; done (undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker ps -f 'status=dead' -f 'status=restarting'" ; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the HAProxy connection to all services. Obtain the Control Plane VIP address and authentication details for the
haproxy.statsservice:(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE sudo 'grep "listen haproxy.stats" -A 6 /var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg'
(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE sudo 'grep "listen haproxy.stats" -A 6 /var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use these details in the following cURL request:
(undercloud) $ curl -s -u admin:<PASSWORD> "http://<IP ADDRESS>:1993/;csv" | egrep -vi "(frontend|backend)" | cut -d, -f 1,2,18,37,57 | column -s, -t
(undercloud) $ curl -s -u admin:<PASSWORD> "http://<IP ADDRESS>:1993/;csv" | egrep -vi "(frontend|backend)" | cut -d, -f 1,2,18,37,57 | column -s, -tCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
<PASSWORD>and<IP ADDRESS>details with the actual details from thehaproxy.statsservice. The resulting list shows the OpenStack Platform services on each node and their connection status.NoteIn case the nodes run Redis services, only one node displays an
ONstatus for that service. This is because Redis is an active-passive service, which runs only on one node at a time.Check overcloud database replication health:
(undercloud) $ for NODE in $(openstack server list --name controller -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker exec clustercheck clustercheck" ; done
(undercloud) $ for NODE in $(openstack server list --name controller -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker exec clustercheck clustercheck" ; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check RabbitMQ cluster health:
(undercloud) $ for NODE in $(openstack server list --name controller -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker exec $(ssh heat-admin@$NODE "sudo docker ps -f 'name=.*rabbitmq.*' -q") rabbitmqctl node_health_check" ; done
(undercloud) $ for NODE in $(openstack server list --name controller -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo docker exec $(ssh heat-admin@$NODE "sudo docker ps -f 'name=.*rabbitmq.*' -q") rabbitmqctl node_health_check" ; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check Pacemaker resource health:
(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE "sudo pcs status"
(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE "sudo pcs status"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Look for:
-
All cluster nodes
online. -
No resources
stoppedon any cluster nodes. -
No
failedpacemaker actions.
-
All cluster nodes
Check the disk space on each overcloud node:
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo df -h --output=source,fstype,avail -x overlay -x tmpfs -x devtmpfs" ; done
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo df -h --output=source,fstype,avail -x overlay -x tmpfs -x devtmpfs" ; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check overcloud Ceph Storage cluster health. The following command runs the
cephtool on a Controller node to check the cluster:(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE "sudo ceph -s"
(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE "sudo ceph -s"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check Ceph Storage OSD for free space. The following command runs the
cephtool on a Controller node to check the free space:(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE "sudo ceph df"
(undercloud) $ NODE=$(openstack server list --name controller-0 -f value -c Networks | cut -d= -f2); ssh heat-admin@$NODE "sudo ceph df"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check that clocks are synchronized on overcloud nodes
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo ntpstat" ; done
(undercloud) $ for NODE in $(openstack server list -f value -c Networks | cut -d= -f2); do echo "=== $NODE ===" ; ssh heat-admin@$NODE "sudo ntpstat" ; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Source the overcloud access details:
(undercloud) $ source ~/overcloudrc
(undercloud) $ source ~/overcloudrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the overcloud network services:
(overcloud) $ openstack network agent list
(overcloud) $ openstack network agent listCopy to Clipboard Copied! Toggle word wrap Toggle overflow All agents should be
Aliveand their state should beUP.Check the overcloud compute services:
(overcloud) $ openstack compute service list
(overcloud) $ openstack compute service listCopy to Clipboard Copied! Toggle word wrap Toggle overflow All agents' status should be
enabledand their state should beupCheck the overcloud volume services:
(overcloud) $ openstack volume service list
(overcloud) $ openstack volume service listCopy to Clipboard Copied! Toggle word wrap Toggle overflow All agents' status should be
enabledand their state should beup.
Related Information
- Review the article "How can I verify my OpenStack environment is deployed with Red Hat recommended configurations?". This article provides some information on how to check your Red Hat OpenStack Platform environment and tune the configuration to Red Hat’s recommendations.