Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion explanation/maintenance-mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,20 @@ Apply

* Audit action plan

* Execute the watcher audit action plan.
* Execute the Watcher audit action plan. By default, the plan will live migrate active
instances and cold migrate inactive instances off the node.

* Operators can control migration behavior using the ``--disable-migration`` flag:

* ``--disable-migration=live``: Disable live migration. All instances (active and
inactive) will be cold migrated.
* ``--disable-migration=cold``: Disable cold migration. Active instances will be
live migrated; inactive instances will be ignored.
* ``--disable-migration=both`` (or ``--disable-migration`` without a value): Disable
all migration. Active instances will be stopped; inactive instances will be ignored.

* This is based on the `Watcher Host Maintenance strategy`_ which supports
``disable_live_migration`` and ``disable_cold_migration`` parameters.

Verify
^^^^^^
Expand Down Expand Up @@ -283,6 +296,7 @@ Once all roles on the node meet these conditions, the node is considered to be o
**Maintenance** mode.

.. LINKS
.. _Watcher Host Maintenance strategy: https://docs.openstack.org/watcher/latest/strategies/host_maintenance.html
.. _ceph administration tool: https://docs.ceph.com/en/reef/man/8/ceph/
.. _kubectl drain: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_drain/
.. _kubectl cordon: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cordon/
Expand Down
47 changes: 45 additions & 2 deletions how-to/operations/maintenance-mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Before enabling maintenance mode, perform a dry run to check for potential issue

.. code:: text

sunbeam cluster maintenance enable <node> --dry-run
sunbeam cluster maintenance enable <node> [--disable-migration[=live|cold|both]] --dry-run

Continue to run operations to enable maintenance mode for <node>:
0: change_nova_service_state state=disabled resource=<node>
Expand All @@ -41,7 +41,7 @@ If no issues are reported, enable maintenance mode:

.. code:: text

sunbeam cluster maintenance enable <node>
sunbeam cluster maintenance enable <node> [--disable-migration[=live|cold|both]]

Continue to run operations to enable maintenance mode for <node>:
0: change_nova_service_state state=disabled resource=<node>
Expand All @@ -61,6 +61,49 @@ If no issues are reported, enable maintenance mode:
Enable maintenance for node: <node>


Controlling migration behavior
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

By default, enabling maintenance mode will live migrate active instances and cold
migrate inactive instances. The ``--disable-migration`` flag allows operators to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option should also be provided in Usage section

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hemanthnakkina , thanks for the review!

I'm a bit confused here, because it is already in Usage section. The hierarchy is Usage -> Enabling Maintenance Mode -> Controlling migration behavior

I intentionally placed it after the basic enable flow so the simple happy path is provided first, with the optional flag documented as a follow-up. Do you think this structure works, or would you prefer something different?

I attach this image for clearer visualization:

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean [ --disable-migration ] should be specified as optional parameter in commands during --dry-run since the output varies based on the this flag

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hemanthnakkina , thanks, I added in ed9546c

control this behavior during maintenance.

.. note::

If ``--disable-migration`` is not specified, the default behavior is unchanged.

To disable live migration (cold migrate both active and inactive instances):

.. code:: text

sunbeam cluster maintenance enable <node> --disable-migration=live

To disable cold migration (live migrate active instances, ignore inactive instances):

.. code:: text

sunbeam cluster maintenance enable <node> --disable-migration=cold

To disable all migration (only stop active instances, ignore inactive instances):

.. code:: text

sunbeam cluster maintenance enable <node> --disable-migration=both

Or equivalently, without specifying a value:

.. code:: text

sunbeam cluster maintenance enable <node> --disable-migration

The ``--disable-migration`` flag can be combined with ``--dry-run`` to preview the
effect before applying:

.. code:: text

sunbeam cluster maintenance enable <node> --disable-migration=live --dry-run


Disabling Maintenance Mode
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
Loading