Chapter 5. Sample Optimize service workflows
See practical examples to learn how to consolidate resources, balance workloads, and prepare infrastructure for maintenance by using the Optimize service (watcher). These workflows demonstrate real world optimization scenarios to help you apply the service effectively.
5.2. Consolidating node resources Copy linkLink copied to clipboard!
Release Compute node resources by consolidating instances onto fewer nodes to reduce energy consumption and operating costs. This workflow demonstrates how to use the node resource consolidation strategy to migrate instances while keeping all nodes available for future workloads.
| Goal | Strategy |
|---|---|
|
|
|
Prerequisites
- You have an operational RHOSO 18.0 on which the Optimize service (watcher) is running.
- Your RHOSO environment contains at least two Compute nodes that run at least one instance on each node.
-
You have the
occommand line tool installed on your workstation. -
You are logged on to a workstation that has access to the RHOSO control plane as a user with
cluster-adminprivileges.
Procedure
Access the remote shell for the OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclientVerify that your RHOSO environment contains at least two Compute nodes that run at least one instance on each node:
$ openstack server list --long -c Name -c HostSample output
In this example, instance
test01is running oncompute1and instancetest02is running oncompute2:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test02 | compute2.ctlplane.localdomain | | test01 | compute1.ctlplane.localdomain | +--------+-------------------------------+Create an audit template that uses the strategy,
node_resource_consolidation, and the goal,server_consolidation.Example
In this example, the audit template is named
NodeResourceConsolidation:$ openstack optimize audittemplate create -s node_resource_consolidation NodeResourceConsolidation server_consolidationSample output
+-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | UUID | 6e7f98fc-c311-4097-9370-fa66e5bfedcf | | Created At | 2025-07-11T17:39:37.776106+00:00 | | Updated At | None | | Deleted At | None | | Description | None | | Name | NodeResourceConsolidation | | Goal | server_consolidation | | Strategy | node_resource_consolidation | | Audit Scope | [] | +-------------+--------------------------------------+Confirm that the audit template has been created:
$ openstack optimize audittemplate listSample output
+----------------------+-----------------------------+ | Goal | Strategy | +----------------------+-----------------------------+ | server_consolidation | node_resource_consolidation | +----------------------+-----------------------------+Run an audit that uses an audit template based on the strategy,
node_resource_consolidation, and the goal,server_consolidation.Example
In this audit the
NodeResourceConsolidationaudit template is used, and checks the resource usage of both Compute nodes. The strategy parameterhost_choice=specifyis set, which means that the strategy will specify the node where the instances will be migrated:$ openstack optimize audit create -a NodeResourceConsolidation \ -p host_choice=specifyFor more information about the parameters this strategy uses, see Node resource consolidation strategy.
Sample output
+---------------+--------------------------------------------------------+ | Field | Value | +---------------+--------------------------------------------------------+ | UUID | 7984626e-cc14-4b87-ab96-f0127f2da51e | | Name | node_resource_consolidation-2025-07-11T17:45:36.604178 | | Created At | 2025-07-11T17:45:36.615613+00:00 | | Updated At | None | | Deleted At | None | | State | PENDING | | Audit Type | ONESHOT | | Parameters | {'host_choice': 'specify'} | | Interval | None | | Goal | server_consolidation | | Strategy | node_resource_consolidation | | Audit Scope | [] | | Auto Trigger | False | | Next Run Time | None | | Hostname | None | | Start Time | None | | End Time | None | | Force | False | +---------------+--------------------------------------------------------+Confirm that the Optimize service ran the audit:
$ openstack optimize audit listSample output
If the audit
Statehas a value ofSUCCEEDEDthen the audit ran and has created an action plan:+----------------------------+-----------+-----------------------------+ | UUID | State | Strategy | +----------------------------+-----------+-----------------------------+ | 7984626e-cc14-4b87-ab96- | SUCCEEDED | node_resource_consolidation | | f0127f2da51e | | | +----------------------------+-----------+-----------------------------+Review the action plan.
Example
$ openstack optimize actionplan list \ --audit 7984626e-cc14-4b87-ab96-f0127f2da51eSample output
In this example,
Global efficacyisReleased_nodes_ratio: 50.00 %.This value indicates that if you run the action plan, the Compute service will live migrate the instances so that half of the Compute nodes in the environment will be freed up, and host no running instances:+---------------------------+-------------+----------------------------+ | UUID | State | Global efficacy | +---------------------------+-------------+----------------------------+ | 71fc5c0c-5890-4cd8-b919- | RECOMMENDED | Released_nodes_ratio: | | f06eb94da94b | | 50.00 % | | | | | +---------------------------+-------------+----------------------------+List the actions contained in the action plan.
Example
$ openstack optimize action list \ --action-plan 71fc5c0c-5890-4cd8-b919-f06eb94da94bSample output
In this example, the action plan contains one action,
migrate:+--------------------------------------+---------+---------+ | UUID | State | Action | +--------------------------------------+---------+---------+ | bda5053b-2489-49fe-bc04-5b2ad3bc5075 | PENDING | migrate | +--------------------------------------+---------+---------+You can view more detail about the action:
Example
$ openstack optimize action show bda5053b-2489-49fe-bc04-5b2ad3bc5075Sample output
In this example, the action plan will live migrate all of the instances running on one of the Compute nodes, to free up the node:
+-------------+--------------------------------------------------------+ | Field | Value | +-------------+--------------------------------------------------------+ | UUID | bda5053b-2489-49fe-bc04-5b2ad3bc5075 | | Created At | 2025-07-11T17:45:36+00:00 | | Updated At | None | | Deleted At | None | | Parents | [] | | State | PENDING | | Action Plan | 71fc5c0c-5890-4cd8-b919-f06eb94da94b | | Action | migrate | | Parameters | {'migration_type': 'live', 'source_node': | | | 'compute1.ctlplane.localdomain', 'resource_name': | | | 'test01', 'destination_node': | | | 'compute2.ctlplane.localdomain', 'resource_id': | | | '331141f0-2335-4bef-8129-c27041c4d632'} | | Description | Moving a VM instance from source_node to | | | destination_node | +-------------+--------------------------------------------------------+Run the action plan.
Example
$ openstack optimize actionplan start \ 71fc5c0c-5890-4cd8-b919-f06eb94da94bSample output
+---------------------+------------------------------------------------+ | Field | Value | +---------------------+------------------------------------------------+ | UUID | 71fc5c0c-5890-4cd8-b919-f06eb94da94b | | Created At | 2025-07-11T17:45:36+00:00 | | Updated At | 2025-07-11T18:04:55+00:00 | | Deleted At | None | | Audit | 7984626e-cc14-4b87-ab96-f0127f2da51e | | Strategy | node_resource_consolidation | | State | PENDING | | Efficacy indicators | [{'name': 'compute_nodes_count', | | | 'description': 'The total number of enabled | | | compute nodes.', 'unit': None, 'value': 2.0}, | | | {'name': 'released_compute_nodes_count', | | | 'description': 'The number of compute nodes to | | | be released.', 'unit': None, 'value': 1.0}, | | | {'name': 'instance_migrations_count', | | | 'description': 'The number of VM migrations to | | | be performed.', 'unit': None, 'value': 1.0}] | | Global efficacy | [{'name': 'released_nodes_ratio', | | | 'description': 'Ratio of released compute | | | nodes divided by the total number of enabled | | | compute nodes.', 'unit': '%', 'value': 50.0}] | | Hostname | None | +---------------------+------------------------------------------------+Confirm that the action succeeded.
Example
$ openstack optimize action list \ --action-plan 71fc5c0c-5890-4cd8-b919-f06eb94da94Sample output
+-----------------------+-----------+------------------------+---------+ | UUID | State | Action Plan | Action | +-----------------------+-----------+------------------------+---------+ | bda5053b-2489-49fe- | SUCCEEDED | 71fc5c0c-5890-4cd8- | migrate | | bc04-5b2ad3bc5075 | | b919-f06eb94da94b | | +-----------------------+-----------+------------------------+---------+Confirm that one of the Compute nodes no longer hosts any instances:
$ openstack server list --longSample output
In this example, both instances,
test01andtest02, are now running on the same Compute node,compute2. This means that thecompute1node is freed up:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test02 | compute2.ctlplane.localdomain | | test01 | compute2.ctlplane.localdomain | +--------+-------------------------------+Exit the
openstackclientpod:$ exit
5.3. Consolidating VM instances Copy linkLink copied to clipboard!
Use the VM workload consolidation strategy to move a VM instance workload when the physical host CPU or RAM utilization percentage exceeds a specified threshold. This workflow shows you how to achieve balanced CPU utilization.
The instance that is migrated should cause the workload for the host to approximate the average workload of all the Compute nodes in the Red Hat OpenStack Services on OpenShift (RHOSO) cluster. Unlike the node resource consolidation strategy, the VM workload consolidation strategy sets the status of the source Compute node to disabled.
| Goal | Strategy |
|---|---|
|
|
|
Prerequisites
- You have an operational RHOSO 18.0 on which the Optimize service (watcher) is running.
- Your RHOSO environment contains at least two Compute nodes that run at least one instance on each node.
-
You have the
occommand line tool installed on your workstation. -
You are logged on to a workstation that has access to the RHOSO control plane as a user with
cluster-adminprivileges.
Procedure
Access the remote shell for the OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclientVerify that your RHOSO environment contains at least two Compute nodes that run at least one instance on each node:
$ openstack server list --longSample output
In this example, instances
test01andtest03that are running oncompute1have a heavy RAM load. Use the Optimize service with the workload balance strategy to migrate at least one of these instances to a Compute node that has more capacity without user interruption:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test04 | compute2.ctlplane.localdomain | | test03 | compute1.ctlplane.localdomain | | test02 | compute2.ctlplane.localdomain | | test01 | compute1.ctlplane.localdomain | +--------+-------------------------------+Create an audit template that uses the strategy,
vm_workload_consolidation, and the goalserver_consolidation.Example
In this example, the audit template is named
WorkLoadConsolidation:$ openstack optimize audittemplate create -s vm_workload_consolidation \ WorkLoadConsolidation server_consolidationSample output
+-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | UUID | eebd556d-b95b-4f1b-91fa-8a08a04a765b | | Created At | 2025-07-11T19:18:28.283497+00:00 | | Updated At | None | | Deleted At | None | | Description | None | | Name | WorkLoadConsolidation | | Goal | server_consolidation | | Strategy | vm_workload_consolidation | | Audit Scope | [] | +-------------+--------------------------------------+Confirm that the audit template has been created:
$ openstack optimize audittemplate listSample output
+----------------------+-----------------------------+ | Goal | Strategy | +----------------------+-----------------------------+ | server_consolidation | vm_workload_consolidation | +----------------------+-----------------------------+Run an audit that uses an audit template based on the strategy,
vm_workload_consolidation, and the goalserver_consolidation. Update the strategy parameters with values appropriate for your environment.Example
In this audit the
WorkLoadConsolidationaudit template is used, and checks for CPU usage by using theworkload_balancestrategy:$ openstack optimize audit create -a WorkLoadConsolidationFor more information about the parameters this strategy uses, see VM workload consolidation strategy.
Sample output
+---------------+------------------------------------------------------+ | Field | Value | +---------------+------------------------------------------------------+ | UUID | bdb0edfa-344a-4897-a7fd-3b1994d87db7 | | Name | vm_workload_consolidation-2025-07-11T19:23:52.285726 | | Created At | 2025-07-11T19:23:52.296188+00:00 | | Updated At | None | | Deleted At | None | | State | PENDING | | Audit Type | ONESHOT | | Parameters | {'period': 3600, 'granularity': 300} | | Interval | None | | Goal | server_consolidation | | Strategy | vm_workload_consolidation | | Audit Scope | [] | | Auto Trigger | False | | Next Run Time | None | | Hostname | None | | Start Time | None | | End Time | None | | Force | False | +---------------+------------------------------------------------------+Confirm that the Optimize service ran the audit:
$ openstack optimize audit listSample output
If the audit
Statehas a value ofSUCCEEDEDthen the audit ran and has created an action plan:+----------------------------+-----------+-----------------------------+ | UUID | State | Strategy | +----------------------------+-----------+-----------------------------+ | bdb0edfa-344a-4897-a7fd- | SUCCEEDED | vm_workload_consolidation | | 3b1994d87db7 | | | +----------------------------+-----------+-----------------------------+Review the action plan.
Example
$ openstack optimize actionplan list \ --audit bdb0edfa-344a-4897-a7fd-3b1994d87db7Sample output
In this example,
Global efficacyisLive_migrations_count: 50.00 %.This value indicates that if you run the action plan, the Compute service will migrate 50 percent of the currently running instances:+---------------------------+-------------+----------------------------+ | UUID | State | Global efficacy | +---------------------------+-------------+----------------------------+ | 71bb6d02-50a9-4e18-b030- | RECOMMENDED | Released_nodes_ratio: | | c070d5b36cde | | 50.00 % | | | | | +---------------------------+-------------+----------------------------+List the actions contained in the action plan.
Example
$ openstack optimize action list \ --action-plan 71bb6d02-50a9-4e18-b030-c070d5b36cdeSample output
In this example, the action plan contains one action,
migrate:+-----------------------------+---------+---------------------------+ | UUID | State | Action | +-----------------------------+---------+---------------------------+ | 7207af7a-569f-4d72-9a9a- | PENDING | change_nova_service_state | | 0be7f9c9b175 | | | | 29404127-f9ad-4124-b3d3- | PENDING | migrate | | 497420f46e6b | | | | c6cb91d7-26e8-4864-8a5c- | PENDING | migrate | | 5ebfe23d6c91 | | | +-----------------------------+---------+---------------------------+You can view more detail about an action:
Example
$ openstack optimize action show 7207af7a-569f-4d72-9a9a-0be7f9c9b175Sample output
In this example, the action plan will live migrate one of the instances with a heavy CPU usage to a Compute node where the instance CPU usage is lower.
+-------------+--------------------------------------------------------+ | Field | Value | +-------------+--------------------------------------------------------+ | UUID | 7207af7a-569f-4d72-9a9a-0be7f9c9b175 | | Created At | 2025-07-11T19:23:52+00:00 | | Updated At | None | | Deleted At | None | | Parents | [] | | State | PENDING | | Action Plan | 71bb6d02-50a9-4e18-b030-c070d5b36cde | | Action | change_nova_service_state | | Parameters | {'state': 'disabled', 'disabled_reason': | | | 'watcher_disabled', 'resource_name': | | | 'compute1.ctlplane.localdomain', 'resource_id': | | | '87254b5a-257b-48ea-aee0-0d4189d84fc7'} | | Description | Disables or enables the nova-compute service. A | | | disabled nova-compute service can not be selected by | | | the nova for future deployment of new server. | +-------------+--------------------------------------------------------+Run the action plan.
Example
$ openstack optimize actionplan start \ 71bb6d02-50a9-4e18-b030-c070d5b36cdeSample output
+---------------------+------------------------------------------------+ | Field | Value | +---------------------+------------------------------------------------+ | UUID | 71bb6d02-50a9-4e18-b030-c070d5b36cde | | Created At | 2025-07-11T19:23:52+00:00 | | Updated At | 2025-07-11T19:30:45+00:00 | | Deleted At | None | | Audit | bdb0edfa-344a-4897-a7fd-3b1994d87db7 | | Strategy | vm_workload_consolidation | | State | PENDING | | Efficacy indicators | [{'name': 'compute_nodes_count', | | | 'description': 'The total number of enabled | | | compute nodes.', 'unit': None, 'value': 2.0}, | | | {'name': 'released_compute_nodes_count', | | | 'description': 'The number of compute nodes to | | | be released.', 'unit': None, 'value': 1.0}, | | | {'name': 'instance_migrations_count', | | | 'description': 'The number of VM migrations to | | | be performed.', 'unit': None, 'value': 2.0}] | | Global efficacy | [{'name': 'released_nodes_ratio', | | | 'description': 'Ratio of released compute | | | nodes divided by the total number of enabled | | | compute nodes.', 'unit': '%', 'value': 50.0}] | | Hostname | None | +---------------------+------------------------------------------------+Confirm that the action succeeded.
Example
$ openstack optimize action list \ --action-plan 71bb6d02-50a9-4e18-b030-c070d5b36cdeSample output
+-----------+----------------------------+---------------------------+ | State | Action Plan | Action | +-----------+----------------------------+---------------------------+ | SUCCEEDED | 71bb6d02-50a9-4e18-b030- | change_nova_service_state | | | c070d5b36cde | | | SUCCEEDED | 71bb6d02-50a9-4e18-b030- | migrate | | | c070d5b36cde | | | SUCCEEDED | 71bb6d02-50a9-4e18-b030- | migrate | | | c070d5b36cde | | +-----------+----------------------------+---------------------------+Confirm that one of the instances with a heavy CPU usage has been migrated to a different Compute node:
$ openstack server list --longSample output
In this example, the instances
test01andtest03are now running on a different node,compute2:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test04 | compute2.ctlplane.localdomain | | test03 | compute2.ctlplane.localdomain | | test02 | compute2.ctlplane.localdomain | | test01 | compute2.ctlplane.localdomain | +--------+-------------------------------+Exit the
openstackclientpod:$ exit
5.4. Stabilizing multiple workloads Copy linkLink copied to clipboard!
Use the Optimize service (watcher) to improve cluster stability. This workflow demonstrates redistributing VM instances when workloads become uneven across Compute nodes to prevent performance issues caused by resource imbalances.
| Goal | Strategy |
|---|---|
|
|
|
Prerequisites
- You have an operational RHOSO 18.0 on which the Optimize service (watcher) is running.
- You have created at least two instances that run on different nodes.
- You have the Dashboard service (horizon) installed on your workstation.
-
You have the
occommand line tool installed on your workstation. -
You are logged on to a workstation that has access to the RHOSO control plane as a user with
cluster-adminprivileges.
Procedure
Ensure that you are in the project where you have the
Adminrole assigned:
Click the
Computemenu, and chooseInstances.
Verify that your RHOSO environment contains at least two Compute nodes that run at least one instance on each node:
In this example, instances
test01andtest03that are running oncompute1have a heavy CPU load. Use the Optimize service with the workload stabilization strategy to live migrate at least one of these instances to a Compute node that has more capacity without user interruption:
Click the
Admintab:
Click the
Optimizationmenu, and selectAudit Templates:
In the
Audit Templatespanel, clickCreate Template.
The
Create Audit Templatedialog box displays.Create an
Audit TemplatenamedWorkLoadStabilization, select the goalWorkload Balancing, and select the strategyWorkload stabilization. When you are finished, click theCreate Audit Templatebutton.
Click the
Auditssub tab, and then click theCreate Auditbutton.
The
Create Auditdialog box displays.Select the following values, and then click the
Create Auditbutton:-
In
Audit Template, chooseWorkLoadStabilization. -
In
Audit Type, chooseCONTINUOUS. -
In
Interval, enter in cron syntax0 15 * * *to run cron at 15:00 UTC daily. -
Optional. In
Strategy Parameters, specify additional required parameters in JSON format -
Optional. In
Start timeandEnd time, specify the window of time for theCONTINUOUSaudit in ISO 8601 date time format.
-
In
Click the UUID for the
Auditto see the action plans created for the new audit.
Click the UUID for the action plan to see more detail.
Click the UUID under
Related Actions.
In the
Actionspanel, you can see more information about the recommended action.In this example, the
test01instance, an instance that has a heavy CPU load, will be live migrated from thecompute1node to thecompute2node.
When you are finished reviewing the action, click the
Action planssub menu:
In the
Action Planspanel, for theRECOMMENDEDaction plan, click theStart Action Planbutton:
The value of
Statechanges toONGOING.Monitor the Action Plans panel, until the
Stateshows a value ofSUCCEEDED.Click the
Computemenu, and chooseInstances.
Confirm that one of the instances with a heavy CPU usage has been migrated to a different Compute node.
In this example, instance
test01now is running on a different node,compute2:
Click the
Optimizationmenu, and chooseAudits.
In the
Auditspanel, from theGo to Action Plandrop-down, selectCancel Auditto stop theCONTINUOUSaudit.
5.5. Balancing single instance workloads Copy linkLink copied to clipboard!
Prevent performance bottlenecks by automatically migrating instances when individual Compute nodes exceed specified thresholds. This workflow shows you how to balance workload distribution to ensure consistent performance across your infrastructure.
| Goal | Strategy |
|---|---|
|
|
|
Prerequisites
- You have an operational RHOSO 18.0 on which the Optimize service (watcher) is running.
- Your RHOSO environment contains at least two Compute nodes that run at least one instance on each node.
-
You have the
occommand line tool installed on your workstation. -
You are logged on to a workstation that has access to the RHOSO control plane as a user with
cluster-adminprivileges.
Procedure
Access the remote shell for the OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclientVerify that your RHOSO environment contains at least two Compute nodes that run at least one instance on each node:
$ openstack server list --longSample output
In this example, instances
test01andtest03that are running oncompute1have a heavy CPU load. Use the Optimize service with the workload balance strategy to live migrate at least one of these instances to a Compute node that has more capacity without user interruption:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test04 | compute2.ctlplane.localdomain | | test03 | compute1.ctlplane.localdomain | | test02 | compute2.ctlplane.localdomain | | test01 | compute1.ctlplane.localdomain | +--------+-------------------------------+Create an audit template that uses the strategy,
workload_balance, and the goalworkload_balancing.Example
In this example, the audit template is named
WorkLoadBalance:$ openstack optimize audittemplate create -s workload_balance \ WorkLoadBalance workload_balancingSample output
+-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | UUID | 5990155a-e3f2-46f8-a81e-c87d0b2f09a2 | | Created At | 2025-07-03T14:05:23.231411+00:00 | | Updated At | None | | Deleted At | None | | Description | None | | Name | WorkLoadBalance | | Goal | workload_balancing | | Strategy | workload_balance | | Audit Scope | [] | +-------------+--------------------------------------+Confirm that the audit template has been created:
$ openstack optimize audittemplate listSample output
+----------------------+------------------+ | Goal | Strategy | +----------------------+------------------+ | workload_balancing | workload_balance | +----------------------+------------------+Run an audit that uses an audit template based on the strategy,
workload_balance, and the goalworkload_balancing. Update the strategy parameters with values appropriate for your environment.Example
In this audit the
WorkLoadBalanceaudit template is used, and checks for CPU usage by usingworkload_balancestrategy parameters with various values:$ openstack optimize audit create -a WorkLoadBalance -p granularity=30 \ -p threshold=20 -p period=300 -p metrics=instance_cpu_usageFor more information about the parameters this strategy uses, see Workload balance migration strategy.
Sample output
+---------------+------------------------------------------------------+ | Field | Value | +---------------+------------------------------------------------------+ | UUID | ad815d54-5b7d-4562-aa12-17e1b64d0868 | | Name | workload_balance-2025-07-03T15:55:08.016161 | | Created At | 2025-07-03T15:55:08.026706+00:00 | | Updated At | None | | Deleted At | None | | State | PENDING | | Audit Type | ONESHOT | | Parameters | {'granularity': 30, 'threshold': 20, 'period': 300, | | | 'metrics': 'instance_cpu_usage'} | | Interval | None | | Goal | workload_balancing | | Strategy | workload_balance | | Audit Scope | [] | | Auto Trigger | False | | Next Run Time | None | | Hostname | None | | Start Time | None | | End Time | None | | Force | False | +---------------+------------------------------------------------------+Confirm that the Optimize service ran the audit:
$ openstack optimize audit listSample output
If the audit
Statehas a value ofSUCCEEDEDthen the audit ran and has created an action plan:+--------------------------------------+-----------+------------------+ | UUID | State | Strategy | +--------------------------------------+-----------+------------------+ | ad815d54-5b7d-4562-aa12-17e1b64d0868 | SUCCEEDED | workload_balance | +--------------------------------------+-----------+------------------+Review the action plan.
Example
$ openstack optimize actionplan list \ --audit ad815d54-5b7d-4562-aa12-17e1b64d0868Sample output
In this example,
Global efficacyisLive_migrations_count: 25.00 %.This value indicates that if you run the action plan, the Compute service will migrate 25% of the currently running instances:+---------------------------+-------------+----------------------------+ | UUID | State | Global efficacy | +---------------------------+-------------+----------------------------+ | f40dfa4e-1b96-4883-b85f- | RECOMMENDED | Live_migrations_count: | | 3bfa73554359 | | 25.00 % | | | | | +---------------------------+-------------+----------------------------+List the actions contained in the action plan.
Example
$ openstack optimize action list \ --action-plan f40dfa4e-1b96-4883-b85f-3bfa73554359Sample output
In this example, the action plan contains one action,
migrate:+--------------------------------------+---------+---------+ | UUID | State | Action | +--------------------------------------+---------+---------+ | 9a510bf9-ebac-450d-a4ea-a10b66d6d869 | PENDING | migrate | +--------------------------------------+---------+---------+You can view more detail about the action:
Example
$ openstack optimize action show 9a510bf9-ebac-450d-a4ea-a10b66d6d869Sample output
In this example, the action plan will live migrate one of the instances with a heavy CPU usage to a Compute node where the instance CPU usage is lower.
+-------------+--------------------------------------------------------+ | Field | Value | +-------------+--------------------------------------------------------+ | UUID | 9a510bf9-ebac-450d-a4ea-a10b66d6d869 | | Created At | 2025-07-03T15:55:08+00:00 | | Updated At | None | | Deleted At | None | | Parents | [] | | State | PENDING | | Action Plan | f40dfa4e-1b96-4883-b85f-3bfa73554359 | | Action | migrate | | Parameters | {'migration_type': 'live', 'source_node': | | | 'compute1.ctlplane.localdomain', 'destination_node': | | | 'compute2.ctlplane.localdomain', 'resource_name': | | | 'test03', 'resource_id': | | | 'd6ae1c7c-8e69-45ae-92b3-6218b8c1570b'} | | Description | Moving a VM instance from source_node to | | | destination_node | +-------------+--------------------------------------------------------+Run the action plan.
Example
$ openstack optimize actionplan start \ f40dfa4e-1b96-4883-b85f-3bfa73554359Sample output
+---------------------+------------------------------------------------+ | Field | Value | +---------------------+------------------------------------------------+ | UUID | f40dfa4e-1b96-4883-b85f-3bfa73554359 | | Created At | 2025-07-03T15:55:08+00:00 | | Updated At | 2025-07-03T16:00:23+00:00 | | Deleted At | None | | Audit | f878bd64-96bc-4063-97a6-dc7500edfb55 | | Strategy | workload_balance | | State | PENDING | | Efficacy indicators | [{'name': 'instance_migrations_count', | | | 'description': 'The number of VM migrations to | | | be performed.', 'unit': None, 'value': 1.0}, | | | {'name': 'instances_count', 'description': | | | 'The total number of audited instances in | | | strategy.', 'unit': None, 'value': 4.0}] | | Global efficacy | [{'name': 'live_migrations_count', | | | 'description': 'Ratio of migrated virtual | | | machines to audited virtual machines', 'unit': | | | '%', 'value': 25.0}] | | Hostname | None | +---------------------+------------------------------------------------+Confirm that the action succeeded.
Example
$ openstack optimize action list \ --action-plan dfdcb491-89c5-4c07-a5ed-65d2085c488cSample output
+------------------+---------+-----------+-------------------+---------+ | UUID | Parents | State | Action Plan | Action | +------------------+---------+-----------+-------------------+---------+ | 9a510bf9-ebac- | [] | SUCCEEDED | f40dfa4e-1b96- | migrate | | 450d-a4ea- | | | 4883-b85f- | | | a10b66d6d869 | | | 3bfa73554359 | | +------------------+---------+-----------+-------------------+---------+Confirm that one of the instances with a heavy CPU usage has been migrated to a different Compute node:
$ openstack server list --longSample output
In this example, instance
test03now is running on a different node,compute2:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test04 | compute2.ctlplane.localdomain | | test03 | compute2.ctlplane.localdomain | | test02 | compute2.ctlplane.localdomain | | test01 | compute1.ctlplane.localdomain | +--------+-------------------------------+Exit the
openstackclientpod:$ exit
5.6. Streamlining workload migrations Copy linkLink copied to clipboard!
Migrate multiple instances efficiently and without downtime across user-defined zones of Compute nodes to prepare for infrastructure maintenance.
The term zone in the zone migration strategy refers to a user-defined set of Compute nodes and storage pools. Zone does not refer to Openstack availability zones.
| Goal | Strategy |
|---|---|
|
|
|
Prerequisites
- You have an operational RHOSO 18.0 on which the Optimize service (watcher) is running.
- Your RHOSO environment contains at least two Compute nodes that run at least one instance on each node.
-
You have the
occommand line tool installed on your workstation. -
You are logged on to a workstation that has access to the RHOSO control plane as a user with
cluster-adminprivileges.
Procedure
Access the remote shell for the OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclientVerify that your RHOSO environment contains at least two Compute nodes that run at least one instance on each node:
$ openstack server list --longSample output
In this example, two instances are running on
compute1and one instance is running oncompute2. Thecompute1node is scheduled for maintenance. Use the Optimize service with the zone migration strategy to live migrate the instances to the other Compute node without user interruption:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test03 | compute2.ctlplane.localdomain | | test02 | compute1.ctlplane.localdomain | | test01 | compute1.ctlplane.localdomain | +--------+-------------------------------+Create an audit template that uses the strategy,
zone_migration, and the goal,hardware_maintenance.Example
In this example, the audit template is named
ZoneMigration:$ openstack optimize audittemplate create -s zone_migration ZoneMigration hardware_maintenanceFor more information about the parameters this strategy uses, see Zone migration.
Sample output
+-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | UUID | 519d3a5e-30b2-48ae-aabf-83b246a12e13 | | Created At | 2025-07-04T12:34:54.691287+00:00 | | Updated At | None | | Deleted At | None | | Description | None | | Name | ZoneMigration | | Goal | hardware_maintenance | | Strategy | zone_migration | | Audit Scope | [] | +-------------+--------------------------------------+Confirm that the audit template has been created:
$ openstack optimize audittemplate listSample output
+----------------------+------------------+ | Goal | Strategy | +----------------------+------------------+ | hardware_maintenance | zone_migration | +----------------------+------------------+Run an audit that uses an audit template based on the strategy,
zone_migration, and the goal,hardware_maintenance. Update the strategy parameters with values appropriate for your environment.Example
The
ZoneMigrationaudit template is used in this example with the following strategy parameter values:-
src_node: contains the value,compute1, which is the node where maintenance will be performed. dst_node: contains the value,compute2, which is the node where the instances running oncompute1will be migrated.$ openstack optimize audit create -a ZoneMigration -p compute_nodes=\ '[{"src_node":"compute1.ctlplane.localdomain", "dst_node":"compute2.ctlplane.localdomain"}]'Sample output
+---------------+------------------------------------------------------+ | Field | Value | +---------------+------------------------------------------------------+ | UUID | 9e9eeb70-63bd-427e-a5a6-a2f049f1bc73 | | Name | zone_migration-2025-07-04T12:38:25.151645 | | Created At | 2025-07-04T12:38:25.163096+00:00 | | Updated At | None | | Deleted At | None | | State | PENDING | | Audit Type | ONESHOT | | Parameters | {'compute_nodes': [{'src_node': 'compute1.ctlplane. | | | localdomain', 'dst_node': 'compute2.ctlplane. | | | localdomain'}], 'parallel_total': 6, | | | 'parallel_per_node': | | | 2, 'parallel_per_pool': 2, 'with_attached_volume': | | | False} | | Interval | None | | Goal | hardware_maintenance | | Strategy | zone_migration | | Audit Scope | [] | | Auto Trigger | False | | Next Run Time | None | | Hostname | None | | Start Time | None | | End Time | None | | Force | False | +---------------+------------------------------------------------------+
-
Confirm that the Optimize service created the audit:
$ openstack optimize audit listSample output
If
Statehas a value ofSUCCEEDEDthen the audit ran and has created an action plan:+--------------------------------------+-----------+------------------+ | UUID | State | Strategy | +--------------------------------------+-----------+------------------+ | 9e9eeb70-63bd-427e-a5a6-a2f049f1bc73 | SUCCEEDED | zone_migration | +--------------------------------------+-----------+------------------+Review the action plan.
Example
$ openstack optimize actionplan list \ --audit 9e9eeb70-63bd-427e-a5a6-a2f049f1bc73 \ -c UUID -c State -c "Global efficacy"Sample output
In this example, the
Live_instance_migrate_ratiorepresents the percentage of instances that are live migrated in the action plan: the number of live migrations in the action plan divided by the number of instances that could be migrated according to user input. For example, if thesrc_nodehad 4 active instances but 2 are migrated in the action plan, the ratio would be 50%+---------------------------+-------------+----------------------------+ | UUID | State | Global efficacy | +---------------------------+-------------+----------------------------+ | 40305df2-c240-464b-ac56- | RECOMMENDED | Live_instance_migrate_rati | | 62e51bf139ef | | o: 100.00 % | | | | Cold_instance_migrate_rati | | | | o: 0.00 % | | | | Volume_migrate_ratio: 0.00 | | | | % | | | | Volume_update_ratio: 0.00 | | | | % | | | | | +---------------------------+-------------+----------------------------+List the actions contained in the action plan.
Example
$ openstack optimize action list \ --action-plan 40305df2-c240-464b-ac56-62e51bf139ef \ -c 'UUID' -c 'State' -c 'Action'Sample output
In this example, the action plan contains two actions to migrate two instances:
+--------------------------------------+---------+---------+ | UUID | State | Action | +--------------------------------------+---------+---------+ | 680e6152-e163-443d-9bd4-178b73494aa4 | PENDING | migrate | | 51a04b16-7231-4001-b3be-d5125bcd2365 | PENDING | migrate | +--------------------------------------+---------+---------+You can view more detail about an action:
Example
In this example, more detail is requested for the migrate action,
680e6152-e163-443d-9bd4-178b73494aa4:$ openstack optimize action show 680e6152-e163-443d-9bd4-178b73494aa4Sample output
In this example, the action plan will migrate the
test01instance from thecompute1node to thecompute2node:+-------------+--------------------------------------------------------+ | Field | Value | +-------------+--------------------------------------------------------+ | UUID | 680e6152-e163-443d-9bd4-178b73494aa4 | | Created At | 2025-07-04T12:38:26+00:00 | | Updated At | None | | Deleted At | None | | Parents | [] | | State | PENDING | | Action Plan | 40305df2-c240-464b-ac56-62e51bf139ef | | Action | migrate | | Parameters | {'migration_type': 'live', 'source_node': | | | 'compute1.ctlplane.localdomain', 'resource_name': | | | 'test01', 'destination_node': | | | 'compute2.ctlplane.localdomain', 'resource_id': | | | 'd6ae1c7c-8e69-45ae-92b3-6218b8c1570b'} | | Description | Moving a VM instance from source_node to | | | destination_node | +-------------+--------------------------------------------------------+Run the action plan.
Example
$ openstack optimize actionplan start \ 40305df2-c240-464b-ac56-62e51bf139efSample output
In this example, both instances are being live migrated from
compute1tocompute2:+---------------------+------------------------------------------------+ | Field | Value | +---------------------+------------------------------------------------+ | UUID | 40305df2-c240-464b-ac56-62e51bf139ef | | Created At | 2025-07-04T12:38:26+00:00 | | Updated At | 2025-07-04T13:06:53+00:00 | | Deleted At | None | | Audit | 9e9eeb70-63bd-427e-a5a6-a2f049f1bc73 | | Strategy | zone_migration | | State | PENDING | | Efficacy indicators | [{'name': 'live_migrate_instance_count', | | | 'description': 'The number of instances | | | actually live migrated.', 'unit': None, | | | 'value': 2.0}, {'name': | | | 'planned_live_migrate_instance_count', | | | 'description': 'The number of instances | | | planned to live migrate.', 'unit': None, | | | 'value': 2.0}, {'name': | | | 'cold_migrate_instance_count', 'description': | | | 'The number of instances actually cold | | | migrated.', 'unit': None, 'value': 0.0}, | | | {'name': | | | 'planned_cold_migrate_instance_count', | | | 'description': 'The number of instances | | | planned to cold migrate.', 'unit': None, | | | 'value': 0.0}, {'name': | | | 'volume_migrate_count', 'description': 'The | | | number of detached volumes actually | | | migrated.', 'unit': None, 'value': 0.0}, | | | {'name': 'planned_volume_migrate_count', | | | 'description': 'The number of detached volumes | | | planned to migrate.', 'unit': None, 'value': | | | 0.0}, {'name': 'volume_update_count', | | | 'description': 'The number of attached volumes | | | actually migrated.', 'unit': None, 'value': | | | 0.0}, {'name': 'planned_volume_update_count', | | | 'description': 'The number of attached volumes | | | planned to migrate.', 'unit': None, 'value': | | | 0.0}] | | Global efficacy | [{'name': 'live_instance_migrate_ratio', | | | 'description': 'Ratio of actual live migrated | | | instances to planned live migrate instances.', | | | 'unit': '%', 'value': 100.0}, {'name': | | | 'cold_instance_migrate_ratio', 'description': | | | 'Ratio of actual cold migrated instances to | | | planned cold migrate instances.', 'unit': '%', | | | 'value': 0}, {'name': 'volume_migrate_ratio', | | | 'description': 'Ratio of actual detached | | | volumes migrated to planned detached volumes | | | migrate.', 'unit': '%', 'value': 0}, {'name': | | | 'volume_update_ratio', 'description': 'Ratio | | | of actual attached volumes migrated to planned | | | attached volumes migrate.', 'unit': '%', | | | 'value': 0}] | | Hostname | None | +---------------------+------------------------------------------------+Confirm that the actions succeeded.
Example
$ openstack optimize action list \ --action-plan 40305df2-c240-464b-ac56-62e51bf139efSample output
+--------------------------------------+-----------+---------+ | UUID | State | Action | +--------------------------------------+-----------+---------+ | 680e6152-e163-443d-9bd4-178b73494aa4 | SUCCEEDED | migrate | | 51a04b16-7231-4001-b3be-d5125bcd2365 | SUCCEEDED | migrate | +--------------------------------------+-----------+---------+Confirm that all of the instances have been migrated to a different Compute node:
$ openstack server list --longSample output
In this example, the two instances that were running on
compute1are now running oncompute2:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test03 | compute2.ctlplane.localdomain | | test02 | compute2.ctlplane.localdomain | | test01 | compute2.ctlplane.localdomain | +--------+-------------------------------+Exit the
openstackclientpod:$ exit
5.7. Preparing Compute nodes for planned maintenance Copy linkLink copied to clipboard!
Use the Optimize service (watcher) with the host maintenance strategy to prepare Compute nodes for scheduled maintenance by migrating all instances to other nodes without interrupting user services.
Use the host maintenance strategy in a planned maintenance window where the load is low to minimize impact on the workloads. When you run the audit, ensure that you do not change the default audit_type value, ONESHOT.
| Goal | Strategy |
|---|---|
|
|
|
Prerequisites
- You have an operational RHOSO 18.0 on which the Optimize service (watcher) is running.
You have at least two Compute nodes:
- One Compute node with at least one instance running.
- A second Compute node that serves as a backup node.
-
You have the
occommand line tool installed on your workstation. -
You are logged on to a workstation that has access to the RHOSO control plane as a user with
cluster-adminprivileges.
Procedure
Access the remote shell for the OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclientVerify that there are at least two compute nodes and at least one instance.
$ openstack server list --longSample output
In this example, one instance is running on
compute1and one instance running oncompute2. Thecompute1node is scheduled for maintenance. Use the Optimize service with the host maintenance strategy to migrate the instances fromcompute1tocompute2without user interruption:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test02 | compute2.ctlplane.localdomain | | test01 | compute1.ctlplane.localdomain | +--------+-------------------------------+Create an audit template that uses the strategy,
host_maintenance, and the goal,cluster_maintaining.Example
In this example, the audit template is named
HostMaintenance:$ openstack optimize audittemplate create -s host_maintenance \ HostMaintenance cluster_maintainingSample output
+-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | UUID | 96c46352-352d-43eb-97ef-4bf3235d9574 | | Created At | 2025-07-04T14:52:19.919765+00:00 | | Updated At | None | | Deleted At | None | | Description | None | | Name | HostMaintenance | | Goal | cluster_maintaining | | Strategy | host_maintenance | | Audit Scope | [] | +-------------+--------------------------------------+Confirm that the audit template has been created:
$ openstack optimize audittemplate listSample output
+----------------------+------------------+ | Goal | Strategy | +----------------------+------------------+ | cluster_maintaining | host_maintenance | +----------------------+------------------+Run an audit that uses an audit template based on the strategy,
host_maintenance, and the goal,cluster_maintaining. Update the strategy parameters with values appropriate for your environment.Example
The
HostMaintenanceaudit template is used in this example, with thecompute1host scheduled for maintenance:$ openstack optimize audit create -a HostMaintenance \ -p maintenance_node=compute1.ctlplane.localdomainFor more information about the parameters this strategy uses, see Host maintenance strategy.
Sample output
+---------------+-------------------------------------------------------+ | Field | Value | +---------------+-------------------------------------------------------+ | UUID | 8cfb4abe-3720-4af2-a8a9-fba8fff1f442 | | Name | host_maintenance-2025-07-04T14:54:58.410413 | | Created At | 2025-07-04T14:54:58.419668+00:00 | | Updated At | None | | Deleted At | None | | State | PENDING | | Audit Type | ONESHOT | | Parameters | {'maintenance_node': 'compute1.ctlplane.localdomain'} | | Interval | None | | Goal | cluster_maintaining | | Strategy | host_maintenance | | Audit Scope | [] | | Auto Trigger | False | | Next Run Time | None | | Hostname | None | | Start Time | None | | End Time | None | | Force | False | +---------------+-------------------------------------------------------+Confirm that the Optimize service created the audit:
$ openstack optimize audit listSample output
If
Statehas a value ofSUCCEEDEDthen the audit ran and has created an action plan:+--------------------------------------+-----------+------------------+ | UUID | State | Strategy | +--------------------------------------+-----------+------------------+ | 8cfb4abe-3720-4af2-a8a9-fba8fff1f442 | SUCCEEDED | host_maintenance | +--------------------------------------+-----------+------------------+Review the action plan.
Example
$ openstack optimize actionplan list \ --audit 8cfb4abe-3720-4af2-a8a9-fba8fff1f442Sample output
+--------------------------------------+-------------+-----------------+ | UUID | State | Global efficacy | +--------------------------------------+-------------+-----------------+ | 40017617-7698-4ce7-b5ce-2917ec522a08 | RECOMMENDED | | +--------------------------------------+-------------+-----------------+List the actions contained in the action plan.
Example
$ openstack optimize action list \ --action-plan 40017617-7698-4ce7-b5ce-2917ec522a08Sample output
In this example, the action plan contains two actions:
+--------------------------------------+---------+---------------------------+ | UUID | State | Action | +--------------------------------------+---------+---------------------------+ | 19afe53e-4cf4-4b67-b910-92bca5f40186 | PENDING | change_nova_service_state | | 6e3154ac-279a-4b26-b993-9a6eea70309b | PENDING | migrate | +--------------------------------------+---------+---------------------------+You can view more detail about an action.
Example
$ openstack optimize action show \ 6e3154ac-279a-4b26-b993-9a6eea70309bSample output
In this example, the action plan will migrate the one instance currently running on the
compute1node to thecompute2node:+-------------+--------------------------------------------------------+ | Field | Value | +-------------+--------------------------------------------------------+ | UUID | 6e3154ac-279a-4b26-b993-9a6eea70309b | | Created At | 2025-07-04T14:54:58+00:00 | | Updated At | None | | Deleted At | None | | Parents | ['19afe53e-4cf4-4b67-b910-92bca5f40186'] | | State | PENDING | | Action Plan | 40017617-7698-4ce7-b5ce-2917ec522a08 | | Action | migrate | | Parameters | {'migration_type': 'live', 'source_node': | | | '87254b5a-257b-48ea-aee0-0d4189d84fc7', | | | 'resource_name': 'test01', 'resource_id': | | | '19bb7593-1b6d-43aa-a0a1-f88921fb4b42'} | | Description | Moving a VM instance from source_node to | | | destination_node | +-------------+--------------------------------------------------------+Example
$ openstack optimize action show \ 19afe53e-4cf4-4b67-b910-92bca5f40186Sample output
In this example, the action plan will change the
compute1node state todisabled.+-------------+--------------------------------------------------------+ | Field | Value | +-------------+--------------------------------------------------------+ | UUID | 19afe53e-4cf4-4b67-b910-92bca5f40186 | | Created At | 2025-07-04T14:54:58+00:00 | | Updated At | None | | Deleted At | None | | Parents | [] | | State | PENDING | | Action Plan | 40017617-7698-4ce7-b5ce-2917ec522a08 | | Action | change_nova_service_state | | Parameters | {'state': 'disabled', 'disabled_reason': | | | 'watcher_maintaining', 'resource_name': | | | 'compute1.ctlplane.localdomain', 'resource_id': | | | '87254b5a-257b-48ea-aee0-0d4189d84fc7'} | | Description | Disables or enables the nova-compute service. A | | | disabled nova-compute service can not be selected by | | | the nova for future deployment of new server. | +-------------+--------------------------------------------------------+Run the action plan.
Example
$ openstack optimize actionplan start \ 40017617-7698-4ce7-b5ce-2917ec522a08Sample output
+---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | UUID | 40017617-7698-4ce7-b5ce-2917ec522a08 | | Created At | 2025-07-04T14:54:58+00:00 | | Updated At | 2025-07-04T15:04:47+00:00 | | Deleted At | None | | Audit | 8cfb4abe-3720-4af2-a8a9-fba8fff1f442 | | Strategy | host_maintenance | | State | PENDING | | Efficacy indicators | [] | | Global efficacy | [] | | Hostname | None | +---------------------+--------------------------------------+Confirm that the action succeeded.
Example
$ openstack optimize action list \ --action-plan 40017617-7698-4ce7-b5ce-2917ec522a08For more information about the parameters this strategy uses, see Host maintenance strategy.
Sample output
In this example, the instance was migrated from the
compute1node, and the state ofcompute1was set to disabled:+--------------------------------------+-----------+---------------------------+ | UUID | State | Action | +--------------------------------------+-----------+---------------------------+ | 19afe53e-4cf4-4b67-b910-92bca5f40186 | SUCCEEDED | change_nova_service_state | | 6e3154ac-279a-4b26-b993-9a6eea70309b | SUCCEEDED | migrate | +--------------------------------------+-----------+---------------------------+Confirm that all instances running on the maintenance node have been migrated:
$ openstack server list --longSample output
In this example, the instance that was running on the
compute1node,test01now is running on thecompute2node:+--------+-------------------------------+ | Name | Host | +--------+-------------------------------+ | test02 | compute2.ctlplane.localdomain | | test01 | compute2.ctlplane.localdomain | +--------+-------------------------------+Confirm that the maintenance node has been disabled.
$ openstack compute service listSample output
In this example, the
compute1node has aStatusofdisabled:+-------------------------------+----------+ | Host | Status | +-------------------------------+----------+ | nova-cell0-conductor-0 | enabled | | nova-scheduler-0 | enabled | | nova-cell1-conductor-0 | enabled | | compute2.ctlplane.localdomain | enabled | | compute1.ctlplane.localdomain | disabled | +-------------------------------+----------+Exit the
openstackclientpod:$ exit
5.8. Migrating volumes for planned maintenance Copy linkLink copied to clipboard!
Use the Optimize service (watcher) with the zone migration strategy to move volumes between storage pools or types to prepare for storage cluster maintenance.
Prerequisites
- You have an operational RHOSO 18.0 on which the Optimize service (watcher) is running.
-
You have the
occommand line tool installed on your workstation. -
You are logged on to a workstation that has access to the RHOSO control plane as a user with
cluster-adminprivileges.
Migrating a volume to a different pool while changing its volume type in the same operation is not supported.
Procedure
Access the remote shell for the OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclientCreate an audit template that uses the strategy, zone_migration, and the goal, hardware_maintenance:
openstack optimize audittemplate create -s zone_migration <zone_migration_template> hardware_maintenance-
Replace
<zone_migration_template>with the name of your audit template.
-
Replace
Run your
<zone_migration_template>. Specify the source pool and the destination volume type to trigger volume migration. In the following example, volumes that are in pool_slow_hdd and are not associated with the fast_ssd_type are scheduled to be retyped to the volume type fast_ssd_type. The underlying storage configuration determines whether theretypeoperation also causes a required migration:$ openstack optimize audit create -a <zone_migration_template> -p storage_pools='[{"src_pool":"pool_slow_hdd", "dst_type":"fast_ssd_type"}]' --name volume_migration_audit-
Replace
<zone_migration_template>with the name of your audit template.
-
Replace
Confirm that the Optimize service created the audit:
$ openstack optimize audit listReview the action plan:
$ openstack optimize actionplan list --audit <uuid>List the actions contained in the action plan:
$ openstack optimize action list --action-plan <uuid>Optional. You can view more detail about an action plan:
$ openstack optimize action show <uuid>Run the action plan:
$ openstack optimize actionplan start <uuid>Exit the
openstackclientpod:$ exit
Verification
Access the remote shell for the OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclientConfirm that the actions succeeded:
$ openstack optimize action list --action-plan <uuid>Exit the
openstackclientpod:$ exit