Questo contenuto non è disponibile nella lingua selezionata.
Chapter 7. Keeping OpenStack Platform Updated
This process provides instructions on how to keep your OpenStack Platform environment updated from minor versions to minor version. This is a minor update within Red Hat OpenStack Platform 12.
Prerequisites
- You have upgraded the overcloud to Red Hat OpenStack Platform 12.
- New packages and container images are available within Red Hat OpenStack Platform 12.
7.1. Validating the Undercloud before an Update Copia collegamentoCollegamento copiato negli appunti!
The following is a set of steps to check the functionality of your Red Hat OpenStack Platform 12 undercloud before an update.
Procedure
Source the undercloud access details:
source ~/stackrc
$ source ~/stackrc
Copy 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 -h
Copy to Clipboard Copied! Toggle word wrap Toggle overflow +Use the "Undercloud Reqirements" as a basis to determine if you have adequate free space.
Check that clocks are synchronized on the undercloud:
(undercloud) $ sudo ntpstat
(undercloud) $ sudo ntpstat
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the undercloud network services:
(undercloud) $ openstack network agent list
(undercloud) $ openstack network agent list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow All agents should be
Alive
and their state should beUP
.Check the undercloud compute services:
(undercloud) $ openstack compute service list
(undercloud) $ openstack compute service list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow All agents' status should be
enabled
and 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
7.2. Validating the Overcloud before an Update Copia collegamentoCollegamento copiato negli appunti!
The following is a set of steps to check the functionality of your Red Hat OpenStack Platform 12 overcloud before an update.
Procedure
Source the undercloud access details:
source ~/stackrc
$ source ~/stackrc
Copy 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 list
Copy 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*'" ; done
Copy 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'" ; done
Copy 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.stats
service:(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)" | awk -F',' '{ print $1" "$2" "$18 }'
(undercloud) $ curl -s -u admin:<PASSWORD> "http://<IP ADDRESS>:1993/;csv" | egrep -vi "(frontend|backend)" | awk -F',' '{ print $1" "$2" "$18 }'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
<PASSWORD>
and<IP ADDRESS>
details with the respective details from thehaproxy.stats
service. The resulting list shows the OpenStack Platform services on each node and their connection status.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" ; done
Copy 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" ; done
Copy 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
stopped
on any cluster nodes. -
No
failed
pacemaker 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" ; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check overcloud Ceph Storage cluster health. The following command runs the
ceph
tool 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
ceph
tool 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" ; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Source the overcloud access details:
(undercloud) $ source ~/overcloudrc
(undercloud) $ source ~/overcloudrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the overcloud network services:
(overcloud) $ openstack network agent list
(overcloud) $ openstack network agent list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow All agents should be
Alive
and their state should beUP
.Check the overcloud compute services:
(overcloud) $ openstack compute service list
(overcloud) $ openstack compute service list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow All agents' status should be
enabled
and their state should beup
Check the overcloud volume services:
(overcloud) $ openstack volume service list
(overcloud) $ openstack volume service list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow All agents' status should be
enabled
and 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.
7.3. Keeping the Undercloud Updated Copia collegamentoCollegamento copiato negli appunti!
The director provides commands to update the packages on the undercloud node. This allows you to perform a minor update within the current version of your OpenStack Platform environment. This is a minor update within Red Hat OpenStack Platform 12.
Prerequisites
- You are using Red Hat OpenStack Platform 12.
- You have performed a backup of the undercloud.
Procedure
-
Log into the director as the
stack
user. Update the
python-tripleoclient
package and its dependencies to ensure you have the latest scripts for the minor version update:sudo yum update -y python-tripleoclient
$ sudo yum update -y python-tripleoclient
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The director uses the
openstack undercloud upgrade
command to update the Undercloud environment. Run the command:openstack undercloud upgrade
$ openstack undercloud upgrade
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reboot the node:
sudo reboot
$ sudo reboot
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Wait until the node boots.
Check the status of all services:
sudo systemctl list-units "openstack*" "neutron*" "openvswitch*"
$ sudo systemctl list-units "openstack*" "neutron*" "openvswitch*"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIt might take approximately 10 minutes for the
openstack-nova-compute
to become active after a reboot.Verify the existence of your overcloud and its nodes:
source ~/stackrc openstack server list openstack baremetal node list openstack stack list
$ source ~/stackrc $ openstack server list $ openstack baremetal node list $ openstack stack list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
It is important to keep your overcloud images up to date to ensure the image configuration matches the requirements of the latest openstack-tripleo-heat-template
package. To ensure successful deployments and scaling operations in the future, update your overclouds images using the instructions in Section 7.4, “Keeping the Overcloud Images Updated”.
7.4. Keeping the Overcloud Images Updated Copia collegamentoCollegamento copiato negli appunti!
The undercloud update process might download new image archives from the rhosp-director-images
and rhosp-director-images-ipa
packages. This process updates these images on your undercloud within Red Hat OpenStack Platform 12.
Prerequisites
- You are using Red Hat OpenStack Platform 12.
- You have updated to the latest minor release of your current undercloud.
Procedure
Check the
yum
log to determine if new image archives are available:sudo grep "rhosp-director-images" /var/log/yum.log
$ sudo grep "rhosp-director-images" /var/log/yum.log
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If new archives are available, replace your current images with new images. To install the new images, first remove any existing images from the
images
directory on thestack
user’s home (/home/stack/images
):rm -rf ~/images/*
$ rm -rf ~/images/*
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Extract the archives:
cd ~/images for i in /usr/share/rhosp-director-images/overcloud-full-latest-12.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-12.0.tar; do tar -xvf $i; done
$ cd ~/images $ for i in /usr/share/rhosp-director-images/overcloud-full-latest-12.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-12.0.tar; do tar -xvf $i; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Import the latest images into the director and configure nodes to use the new images:
cd ~ openstack overcloud image upload --update-existing --image-path /home/stack/images/ openstack overcloud node configure $(openstack baremetal node list -c UUID -f csv --quote none | sed "1d" | paste -s -d " ")
$ cd ~ $ openstack overcloud image upload --update-existing --image-path /home/stack/images/ $ openstack overcloud node configure $(openstack baremetal node list -c UUID -f csv --quote none | sed "1d" | paste -s -d " ")
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To finalize the image update, verify the existence of the new images:
openstack image list ls -l /httpboot
$ openstack image list $ ls -l /httpboot
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The director is now updated and using the latest images. You do not need to restart any services after the update.
7.5. Keeping the Overcloud Updated Copia collegamentoCollegamento copiato negli appunti!
The director provides commands to update the packages on all overcloud nodes. This allows you to perform a minor update within the current version of your OpenStack Platform environment. This is a minor update within Red Hat OpenStack Platform 12.
Prerequisites
- You are using Red Hat OpenStack Platform 12.
- You have updated to the latest minor release of your current undercloud.
- You have performed a backup of the overcloud.
Procedure
Find the latest tag for the containerized service images:
openstack overcloud container image tag discover \ --image registry.access.redhat.com/rhosp12/openstack-base:latest \ --tag-from-label version-release
$ openstack overcloud container image tag discover \ --image registry.access.redhat.com/rhosp12/openstack-base:latest \ --tag-from-label version-release
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Make a note of the most recent tag.
Create an updated environment file for your container image source. Run using the
openstack overcloud container image prepare
command. For example, to use images fromregistry.access.redhat.com
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For more information about generating this environment file for different source types, see "Configuring Container Registry Details" in the Director Installation and Usage guide.
Run the
openstack overcloud update stack
command to update the container image locations in your overcloud:openstack overcloud update stack --init-minor-update \ --container-registry-file /home/stack/templates/overcloud_images.yaml
$ openstack overcloud update stack --init-minor-update \ --container-registry-file /home/stack/templates/overcloud_images.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
--init-minor-update
only performs an update of the parameters in the overcloud stack. It does not perform the actual package or container update. Wait until this command completes.Perform a package and container update using the
openstack overcloud update
command. Using the--nodes
option to upgrade node for each role. For example, the following command updates nodes in theController
roleopenstack overcloud update stack --nodes Controller
$ openstack overcloud update stack --nodes Controller
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run this command for each role group in the following order:
-
Controller
-
CephStorage
-
Compute
-
ObjectStorage
-
Any custom roles such as
Database
,MessageBus
,Networker
, and so forth.
-
- The update process starts for the chosen role starts. The director uses an Ansible playbook to perform the update and displays the output of each task.
- Update the next role group. Repeat until you have updated all nodes.
-
The update process does not reboot any nodes in the Overcloud automatically. Updates to the kernel or Open vSwitch require a reboot. Check the
/var/log/yum.log
file on each node to see if either thekernel
oropenvswitch
packages have updated their major or minor versions. If they have, reboot each node using the "Rebooting Nodes" procedures in the Director Installation and Usage guide.