ceph.ceph_admin.manager module
Perform the manager operations via Ceph’s cephadm CLI.
- class ceph.ceph_admin.manager.Manager(cluster, **config)
Bases:
CephCLIManager interface for ceph mgr <action>
- get_active() str
Fetch the current active mgr node of the cluster.
- Returns
hostname of the active mgr
- get_standby() str
Fetch the current standby mgr nodes of the cluster.
- Returns
list containing the hostnames of all standby mgrs
- is_active(hostname) bool
Check whether the host with given hostname has an active mgr or not
- Parameters
hostname (str) – hostname of the node which needs to be checked for active mgr
- Returns
True if the host with given hostname has active mgr, else False
- is_standby(hostname) bool
Check whether the host with given hostname has a standby mgr or not
- Parameters
hostname (str) – hostname of the node which needs to be checked for standby mgr
- Returns
True if the host with given hostname has standby mgr, else False
- is_standby_present() bool
Returns whether a standby mgr is present in the cluster or not
- Returns
True if atleast one standby mgr is present, else False
- switch_active(node) bool
Switches active mgr node to a node other than the node passed to the input
- Parameters
node (CephNode) – The node which should not be an active mgr
- Returns
True if mgr was switched to a different node or if the given node was not an active mgr False if there is no standby mgr to switch to or if the active mgr switching failed