Chapter 3. Rebooting data plane nodes You might need to reboot the nodes on your data plane. The reboot method is determined by the type of node. You can also configure how your data plane handles the reboot process based on the node type. 3.1. Configuring the data plane Compute node reboot behavior You can configure how the data plane handles the shut down and restart of instances that are hosted on Compute nodes if the instances are not migrated off the host node before the host Compute node is rebooted. Prerequisites You are logged on to a workstation that has access to the Red Hat OpenShift Container Platform (RHOCP) cluster as a user with cluster-admin privileges. Procedure Open the nova-extra-config.yaml definition file for the default Compute service (nova) ConfigMap custom resource (CR) named nova-extra-config and add the following configuration: 1 Set to true to return instances to the same state on the Compute node after reboot. When set to False , the instances remain down and you must start them manually. 2 Specify the number of seconds to wait for an instance to perform a controlled, clean shut down before being powered off and rebooted. Do not set this value to 0 . A value of 0 (zero) means that the instance is powered off immediately with no opportunity for instance OS clean-up. The default value is 60 . Create a file on your workstation to define the OpenStackDataPlaneDeployment CR: Replace <node_set_deployment_name> with the name of the OpenStackDataPlaneDeployment CR. The name must be unique, must consist of lower case alphanumeric characters, - (hyphen) or . (period), and must start and end with an alphanumeric character. Tip Give the definition file and the OpenStackDataPlaneDeployment CR unique and descriptive names that reflect the purpose of the node sets in the deployment. Add the OpenStackDataPlaneNodeSet CRs that configure the Compute nodes on the data plane that run the default nova service: Replace <nodeSet_name> with the names of the OpenStackDataPlaneNodeSet CRs that you want to include in your data plane deployment. Save the OpenStackDataPlaneDeployment CR deployment file. Deploy the modified OpenStackDataPlaneNodeSet CRs: You can view the Ansible logs while the deployment executes: Verify that the modified OpenStackDataPlaneNodeSet CRs are deployed: For information about the meaning of the returned status, see Data plane conditions and states in the Deploying Red Hat OpenStack Services on OpenShift guide. If the status indicates that the data plane has not been deployed, then troubleshoot the deployment. For information, see Troubleshooting the data plane creation and deployment in the Deploying Red Hat OpenStack Services on OpenShift guide. 3.2. Rebooting Object Storage service (swift) nodes To reboot Object Storage service (swift) nodes, complete the following steps for every Object Storage node in your cluster. Reboot nodes one after the other individually instead at the same time to ensure that the cluster remains available even when a node is rebooting. Procedure Log in to an Object Storage node. Reboot the node: Wait until the node boots. Repeat the reboot for each Object Storage node in the cluster. 3.3. Rebooting Compute nodes You might need to reboot the Compute nodes on the Red Hat OpenShift on OpenStack (RHOSO) data plane. You can migrate all the virtual machine instances hosted on the Compute nodes that you want to reboot to other hosts before performing the reboot, which is recommended to ensure minimal downtime of instance workloads in your RHOSO environment. If you do not migrate the instances off the host Compute nodes before reboot, then how the instances are restarted is based on how the data plane is configured to handle instances on host reboot. For more information about Compute node reboot behavior, see Configuring the data plane Compute node reboot behavior . Note If you have a Multi-RHEL environment, and you want to migrate virtual machines from a Compute node that is running RHEL 9.4 to a Compute node that is running RHEL 9.2, only cold migration is supported. For more information about cold migration, see Cold migrating an instance in Configuring the Compute service for instance creation . Procedure Access the remote shell for the openstackclient pod: Retrieve a list of your Compute nodes to identify the host name of the nodes that you want to reboot: Disable the Compute service on each Compute node that you want to reboot so that it does not provision new instances on the nodes: Replace <hostname> with the host name of the Compute node on which you are disabling the service. List all the instances that are hosted on each Compute node: Optional: Migrate the instances to another Compute node: Replace <instance> with the name or ID of the instance to migrate. Optional: Include the --host option and replace <dest> with the name or ID of the destination Compute node. If the --host option is not specified, then the nova-scheduler selects the destination node for the instances. Repeat this migration command for each instance until none remain on the Compute node. Exit the openstackclient pod: Create an OpenStackDataPlaneDeployment CR to reboot the nodes: Replace <nodeSet_name> with the names of the OpenStackDataPlaneNodeSet CRs that contain the nodes that you are rebooting. Replace <node_hostname> with the names of the nodes in the node set to reboot. If ansibleLimit is not set, all the nodes in the node set are rebooted at the same time. Verify that the compute-node-reboot deployment completed: If the deployment fails, see Troubleshooting data plane creation and deployment in the Deploying Red Hat OpenStack Services on OpenShift guide. Access the remote shell for the openstackclient pod: Re-enable the Compute service on each rebooted Compute node: Confirm that the Compute service on each Compute node is enabled: If you did not migrate the instances that are hosted on the Compute node before reboot, then check that the instances have restarted and are in the correct state: Exit the openstackclient pod:

Commands:
apiVersion: v1 kind: ConfigMap metadata: name: nova-extra-config namespace: openstack data: 30-nova-reboot.conf: | [DEFAULT] resume_guests_state_on_host_boot=true 1 shutdown_timeout=300 2
apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: <node_set_deployment_name>
spec: nodeSets: - <nodeSet_name>
oc create -f openstack_data_plane_deploy.yaml -n openstack
oc get pod -l app=openstackansibleee -w oc logs -l app=openstackansibleee -f --max-log-requests 10
oc get openstackdataplanedeployment -n openstack NAME STATUS MESSAGE openstack-data-plane True Setup Complete oc get openstackdataplanenodeset -n openstack NAME STATUS MESSAGE openstack-data-plane True NodeSet Ready
sudo reboot
oc rsh -n openstack openstackclient
openstack compute service list
openstack compute service set <hostname> nova-compute --disable
openstack server list --host <hostname> --all-projects
openstack server migrate --live-migration [--host <dest>] <instance> --wait
exit
apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: compute-node-reboot namespace: openstack spec: nodeSets: 1 - <nodeSet_name> - - <nodeSet_name> servicesOverride: - reboot-os ansibleExtraVars: edpm_reboot_strategy: force ansibleLimit: <node_hostname>,...,<node_hostname>
oc get openstackdataplanedeployment NAME STATUS MESSAGE compute-node-reboot True Setup complete
oc rsh -n openstack openstackclient
openstack compute service set <hostname> nova-compute --enable
openstack compute service list
openstack server list --host <host> --all-projects
exit