Nodes

The Nodes Object is a container for the Node Object for the associated cluster.

Description

class arcapix.fs.gpfs.nodes.Nodes

A collection of Node objects

Instantiate a collection of the nodes on the cluster.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
new(name, quorum_candidate=False, manager_candidate=False, admin_name=None, license=None)

Create a Node object, representing a particular NSD or similar within the system.

Parameters:
  • name
  • quorum_candidate
  • manager_candidate
  • admin_name
  • license
destroy(name)

Remove a node from the cluster

Parameters:name (str) – Name of the node to remove

Note - node deleting is an asynchronous process.

minQuorumNodes

Returns the minimum number of nodes required to achieve quorum.

Return type:int
tiebreakerDisks

Returns whether tiebreak disks are in use

Return type:bool

Warning

In certain situations, this will not be wholly accurate due to an issue with GPFS itself that IBM are aware of and will be providing a fix in the future.

nodesUp

Returns the number of nodes that are up

Return type:int
localNode

Returns the node on which the api is running

Return type:Node
serverLicensed()

Returns a convenience view over the Nodes collection of only those nodes with a server license

Return type:dict
incorrectlyLicensed()

Returns a convenience view over the Nodes collection of only those nodes which are not correctly licensed

Return type:dict
clientLicensed()

Returns a convenience view over the Nodes collection of only those nodes with a server license

Return type:dict
fpoLicensed()

Returns a view over the Nodes collection of only those nodes with a server license

Return type:dict
changeLicenses(licenseType, *nodes)

Change the license type of a node or collection of nodes

Parameters:
  • licenseType (str) – The type of license - either fpo, server or client
  • nodes (str or Node) – one or more nodes to change

Examples

Utilising Nodes from the Cluster Object

>>> from arcapix.fs.gpfs import Cluster
>>>
>>> # Load the cluster
... mycluster = Cluster()
>>>
>>> for n in mycluster.nodes.values():
...     print("Name: {0}\tState: {1}".format(n.name, n.state))
...
Name: pixstor-sn-001 State: active
Name: pixstor-sn-002 State: active

Utilising Nodes directly

>>> from arcapix.fs.gpfs import Nodes
>>>
>>> # Show the minimum number of nodes required for quorum
... print(Nodes().minQuorumNodes)

Change the licenses of 2 nodes

>>> from arcapix.fs.gpfs import Cluster
>>>
>>> # Load the cluster nodes
... mynodes = Cluster().nodes
>>>
>>> # Change nodes to server license
... mynodes.changeLicense('server', 'pixstor-sn-001', 'pixstor-sn-002')