From a613bd2ac88a1c17f81d6d16f4b6c5e409b7b3d9 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Tue, 14 Feb 2017 14:08:09 -0500 Subject: [PATCH] Add PDU documentation --- docs/source/advanced/index.rst | 1 + docs/source/advanced/pdu/index.rst | 10 +++ docs/source/advanced/pdu/pdu.rst | 125 ++++++++++++++++++++++++++++ xCAT-server/lib/xcat/plugins/esx.pm | 2 +- 4 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 docs/source/advanced/pdu/index.rst create mode 100644 docs/source/advanced/pdu/pdu.rst diff --git a/docs/source/advanced/index.rst b/docs/source/advanced/index.rst index 7193f3b71..3a78e0ac9 100755 --- a/docs/source/advanced/index.rst +++ b/docs/source/advanced/index.rst @@ -15,6 +15,7 @@ Advanced Topics kit/index.rst mixed_cluster/index.rst networks/index.rst + pdu/index.rst ports/xcat_ports.rst probe/index.rst raid/index.rst diff --git a/docs/source/advanced/pdu/index.rst b/docs/source/advanced/pdu/index.rst new file mode 100644 index 000000000..5141a09f5 --- /dev/null +++ b/docs/source/advanced/pdu/index.rst @@ -0,0 +1,10 @@ +PDUs +==== + +Power Distribution Units (PDUs) are devices that distribute power to servers in a frame. Intelligent PDUs have the capability of monitoring the amount of power that is being used by devices plugged into it. + + +.. toctree:: + :maxdepth: 2 + + pdu.rst diff --git a/docs/source/advanced/pdu/pdu.rst b/docs/source/advanced/pdu/pdu.rst new file mode 100644 index 000000000..781a7dbc9 --- /dev/null +++ b/docs/source/advanced/pdu/pdu.rst @@ -0,0 +1,125 @@ +PDU +=== + +xCAT provides basic remote management for each power outlet plugged into the PDUs using SNMP communication. This documentation will focus on configuration of the PDU and Node objects to allow xCAT to control power at the PDU outlet level. + + +Define PDU Objects +------------------ + + + +#. Define pdu object :: + + mkdef f5pdu3 groups=pdu ip=50.0.0.8 mgt=pdu nodetype=pdu + +#. Add hostname to /etc/hosts:: + + makehosts f5pdu3 + +#. Verify the SNMP command responds against the PDU: :: + + snmpwalk -v1 -cpublic -mALL f5pdu3 .1.3.6.1.2.1.1 + + +Define PDU Attribute +-------------------- + +Administrators will need to know the exact mapping of the outlets to each server in the frame. xCAT cannot validate the physical cable is connected to the correct server. + +Add a ``pdu`` attribute to the compute node definition in the form "PDU_Name:outlet": :: + + # + # Compute server cn01 has two power supplies + # connected to outlet 6 and 7 on pdu=f5pdu3 + # + chdef cn01 pdu=f5pdu3:6,f5pdu3:7 + + +Verify the setting: ``lsdef cn01 -i pdu`` + + +PDU Commands +------------ + +The following commands are supported against a compute node: + + * Check the pdu status for a compute node: :: + + # rpower cn01 pdustat + cn01: f5pdu3 outlet 6 is on + cn01: f5pdu3 outlet 7 is on + + + * Power off the PDU outlets on a compute node: :: + + # rpower cn01 pduoff + cn01: f5pdu3 outlet 6 is off + cn01: f5pdu3 outlet 7 is off + + * Power on the PDU outlets on a compute node: :: + + # rpower cn01 pduon + cn01: f5pdu3 outlet 6 is on + cn01: f5pdu3 outlet 7 is on + +The following commands are supported against a PDU: + + * Check the status of the full PDU: :: + + # rinv f5pdu3 + f5pdu3: outlet 1 is on + f5pdu3: outlet 2 is on + f5pdu3: outlet 3 is on + f5pdu3: outlet 4 is on + f5pdu3: outlet 5 is on + f5pdu3: outlet 6 is off + f5pdu3: outlet 7 is off + f5pdu3: outlet 8 is on + f5pdu3: outlet 9 is on + f5pdu3: outlet 10 is on + f5pdu3: outlet 11 is on + f5pdu3: outlet 12 is on + + * Power off the full PDU: :: + + # rpower f5pdu3 off + f5pdu3: outlet 1 is off + f5pdu3: outlet 2 is off + f5pdu3: outlet 3 is off + f5pdu3: outlet 4 is off + f5pdu3: outlet 5 is off + f5pdu3: outlet 6 is off + f5pdu3: outlet 7 is off + f5pdu3: outlet 8 is off + f5pdu3: outlet 9 is off + f5pdu3: outlet 10 is off + f5pdu3: outlet 11 is off + f5pdu3: outlet 12 is off + + * Power on the full PDU: :: + + # rpower f5pdu3 on + f5pdu3: outlet 1 is on + f5pdu3: outlet 2 is on + f5pdu3: outlet 3 is on + f5pdu3: outlet 4 is on + f5pdu3: outlet 5 is on + f5pdu3: outlet 6 is on + f5pdu3: outlet 7 is on + f5pdu3: outlet 8 is on + f5pdu3: outlet 9 is on + f5pdu3: outlet 10 is on + f5pdu3: outlet 11 is on + f5pdu3: outlet 12 is on + + +**Note:** For BMC based compute nodes, turning the PDU outlet power on does not automatically power on the compute side. Users will need to issue ``rpower on`` to power on the compute node after the BMC boots. + + + + + + + + diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index f40dc53f1..ece31bb02 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -407,7 +407,7 @@ sub process_request { } #pdu commands will be handled in the pdu plugin - if ($command eq "rpower" and grep(/^pduon|pduoff|pdustat/, @exargs)) { + if ($command eq "rpower" and grep(/^pduon|pduoff|pdustat$/, @exargs)) { return; } #my $sitetab = xCAT::Table->new('site');