Chapter 4. Execute the Back Up Procedure

Before performing a fast forward upgrade, back up the undercloud and the overcloud Control Plane nodes so that they can be restored to their previous state should an error occur.

4.1. Back Up the Undercloud

To back up the undercloud node, execute the following as root in the command line interface of the undercloud node:

# rear -d -v mkbackup

The procedure creates an ISO image on the backup node under the /ctl_plane_backups directory.

4.2. Back up the control plane

To back up the control plane, you must first stop the pacemaker cluster. This can result in service interruption. You must back up the database as a precaution to ensure that you can restore it after you restore the control plane. Back up the control plane nodes simultaneously and avoid operating the stack to ensure state consistency. After you complete the backup procedure, start the pacemaker cluster.

  1. Locate the database password:

    # /bin/hiera -c /etc/puppet/hiera.yaml mysql::server::root_password
  2. Back up the databases:

    [heat-admin@overcloud-controller-x ~]$ mysql -uroot -p{{ mysql_root_password }} -s -N -e "select distinct table_schema from information_schema.tables where engine='innodb' and table_schema != 'mysql';" | xargs mysqldump -uroot -p{{ mysql_root_password }} --single-transaction --databases > openstack-backup-mysql.sql
    [heat-admin@overcloud-controller-x ~]$ mysql -uroot -p{{ mysql_root_password }} -s -N -e "SELECT CONCAT('\"SHOW GRANTS FOR ''',user,'''@''',host,''';\"') FROM mysql.user where (length(user) > 0 and user NOT LIKE 'root')" | xargs -n1 mysql -uroot -p{{ mysql_root_password }} -s -N -e | sed 's/$/;/' > openstack-backup-mysql-grants.sql
  3. Stop the pacemaker cluster and the OpenStack services:

    Important

    This procedure results in the temporary interruption of control plane services to Compute nodes. You will not be able to spin up new instances, migrate instances, authenticate requests or monitor the health of the cluster until you restore the pacemaker cluster and OpenStack services in the final step of this procedure.

    On one of the control plane nodes, enter the following command:

    # pcs cluster stop --all

    On each control plane node, stop the OpenStack services:

    # systemctl stop openstack-*
    # systemctl stop neutron-*
    # systemctl stop haproxy
    # systemctl stop httpd
  4. To back up the control plane, execute the following as root in the command line interface of each control plane node:

    # rear -d -v mkbackup

    The procedure creates an ISO image on the backup node under the /ctl_plane_backups directory.

  5. When the backup procedure generates ISO images for each of the control plane nodes, restart the control plane nodes:

    # reboot

    After you restart the control plane nodes, check the status of pacemaker to ensure that the services are running correctly:

    # pcs status