.. _platform-maintenance-mode:

Maintenance Mode
-------------------------

.. index:: cluster;cluster maintenance-mode

.. _21.4-PB4|VOSS-567:


CLI commands are available to also place the VOSS Automate system in a *maintenance mode*
during system upgrade, to suspend any scheduled transactions. Scheduled transactions that
are in progress, will be allowed to complete.

See also: :ref:`cluster-commands`.

.. The maintenance mode enables an administrator to safely finalize hung transactions - 
   transactions that remain in a ``Processing``  state and do not complete. 
   In the case of data sync, such transactions block subsequent data sync transactions.


Maintenance Mode Commands
...........................


* Put node or cluster into maintenance mode
  
  * For all nodes in a cluster: **cluster maintenance-mode start**
  

  Running this command prompts for confirmation and then shows:

  ::

    System is now in maintenance mode

  When the node or cluster is in maintenance mode:

  * Upon login on the CLI or when obtaining a health report, e.g. **diag health**, the message
    is then shown:  

    ::

       SYSTEM IN MAINTENANCE MODE

  * No scheduled Platform tasks will be started while in maintenance mode.
  * No scheduled Automate transactions will be started while in maintenance mode.



* Check the status of the maintenance mode

  * For all nodes in a cluster: **cluster maintenance-mode status**
  
  The command returns a message, for example
  
  ::
  
     System is in maintenance mode
  

* Take node or cluster out of maintenance mode
   
  * For all nodes in a cluster: **cluster maintenance-mode stop**

  Running the command requests confirmation and then shows:

  ::

    System is now out of maintenance mode

  * Scheduled tasks will resume once the system is out of maintenance mode. 

..  * An SNMP info message is also sent to indicate that the system has left maintenance mode and SNMP traps are resumed  - see :ref:`snmp-trap-maintenance-mode`.


.. 
.. Scheduling Maintenance Mode
.. ............................
.. 
.. 
.. * **system maintenance-mode schedule add <yyyy-mm-dd-HH:MM> <message>** - 
..   
..   Schedule maintenance mode:
..  
..   * to start at date ``<yyyy-mm-dd-HH:MM>``
..   * with message text displayed on CLI ``<message>`` - max 100 characters
.. 
..   Running the command requests confirmation and then returns:
.. 
..   ::
.. 
..     System is now scheduled for maintenance mode
.. 
..   Upon login and when running a health report, e.g. **diag health**, a message is then shown:
.. 
..   ::
.. 
..     SYSTEM MAINTENANCE SCHEDULED FOR yyyy-mm-dd-HH:MM - message
.. 
.. 
.. * **system maintenance-mode schedule del** - Remove a maintenance mode schedule
.. 
..   The command requests confirmation and then returns:
.. 
..   ::
..     
..     System schedule for maintenance mode removed   
