mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
Merge branch 'master' into rflash_python
This commit is contained in:
commit
2e405d6678
@ -213,7 +213,7 @@ then
|
||||
for file in $packages
|
||||
do
|
||||
file_low=`echo $file | tr '[A-Z]' '[a-z]'`
|
||||
if [ "$file" = "xCAT" -o "$file" = "xCAT-genesis-scripts" ]; then
|
||||
if [ "$file" = "xCAT" -o "$file" = "xCAT-genesis-scripts" -o "$file" = "xCATsn" ]; then
|
||||
target_archs="amd64 ppc64el"
|
||||
else
|
||||
target_archs="all"
|
||||
@ -250,7 +250,7 @@ then
|
||||
# shipping bmcsetup and getipmi scripts as part of postscripts
|
||||
files=("bmcsetup" "getipmi")
|
||||
for f in "${files[@]}"; do
|
||||
cp ${CURDIR}/../xCAT-genesis-scripts/bin/$f ${CURDIR}/postscripts/$f
|
||||
cp ${CURDIR}/../xCAT-genesis-scripts/usr/bin/$f ${CURDIR}/postscripts/$f
|
||||
sed -i "s/xcat.genesis.$f/$f/g" ${CURDIR}/postscripts/$f
|
||||
done
|
||||
fi
|
||||
|
109
docs/source/advanced/pdu/crpdu.rst
Normal file
109
docs/source/advanced/pdu/crpdu.rst
Normal file
@ -0,0 +1,109 @@
|
||||
Collaborative PDU
|
||||
=================
|
||||
|
||||
Collaborative PDU is also referred as Coral PDU, it controls power for compute Rack. User can access PDU via SSH and can use the **PduManager** command to configure and manage the PDU product.
|
||||
|
||||
|
||||
Pre-Defined PDU Objects
|
||||
-----------------------
|
||||
|
||||
A pre-defined PDU node object is required before running pdudiscover command. ::
|
||||
|
||||
mkdef coralpdu groups=pdu mgt=pdu nodetype=pdu (required)
|
||||
|
||||
all other attributes can be set by chdef command or pdudisocover command. ::
|
||||
|
||||
--switch required for pdudiscover command to do mapping
|
||||
--switchport required for pdudiscover command to do mapping
|
||||
--ip ip address of the pdu.
|
||||
--mac can be filled in by pdudiscover command
|
||||
--pdutype crpdu(for coral pdu) or irpdu(for infrastructure PDUs)
|
||||
|
||||
|
||||
The following attributes need to be set in order to configure snmp with non-default values. ::
|
||||
|
||||
--community community string for coral pdu
|
||||
--snmpversion snmp version number, required if configure snmpv3 for coral pdu
|
||||
--snmpuser snmpv3 user name, required if configure snmpv3 for coral pdu
|
||||
--authkey auth passphrase for snmpv3 configuration
|
||||
--authtype auth protocol (MD5|SHA) for snmpv3 configuration
|
||||
--privkey priv passphrase for snmpv3 configuration
|
||||
--privtype priv protocol (AES|DES) for snmpv3 configuration
|
||||
--seclevel security level (noAuthNoPriv|authNoPriv|authPriv) for snmpv3 configuration
|
||||
|
||||
Make sure to run makehosts after pre-defined PDU. ::
|
||||
|
||||
makehosts coralpdu
|
||||
|
||||
|
||||
Configure PDUs
|
||||
--------------
|
||||
|
||||
After pre-defining PDUs, user can use **pdudisocver --range ip_range --setup** to configure the PDUs, or following commands can be used:
|
||||
|
||||
* To configure passwordless of Coral PDU: ::
|
||||
|
||||
# rspconfig coralpdu sshcfg
|
||||
|
||||
* To change hostname of Coral PDU: ::
|
||||
|
||||
# rspconfig coralpdu hosname=f5pdu3
|
||||
|
||||
* To change ip address of PDU: ::
|
||||
|
||||
# rsconfig coralpdu ip=x.x.x.x netmaks=255.x.x.x
|
||||
|
||||
* To configure SNMP community string or snmpv3 of PDU (the attribute needs to pre-defined): ::
|
||||
|
||||
# rspconfig coralpdu snmpcfg
|
||||
|
||||
|
||||
Remote Power Control of PDU
|
||||
---------------------------
|
||||
|
||||
Use the rpower command to remotely power on and off PDU.
|
||||
|
||||
* To check power stat of PDU: ::
|
||||
|
||||
# rpower coralpdu stat
|
||||
|
||||
* To power off the PDU: ::
|
||||
|
||||
# rpower coralpdu off
|
||||
|
||||
* To power on the PDU: ::
|
||||
|
||||
# rpower coralpdu on
|
||||
|
||||
Coral PDUs have three relays, the following commands are for individual relay support of PDU:
|
||||
|
||||
* To check power stat of relay: ::
|
||||
|
||||
# rpower coralpdu relay=1 stat
|
||||
|
||||
* To power off the relay: ::
|
||||
|
||||
# rpower coralpdu relay=2 off
|
||||
|
||||
* To power on the relay: ::
|
||||
|
||||
# rpower coralpdu relay=3 on
|
||||
|
||||
|
||||
Show Monitor Data
|
||||
-----------------
|
||||
|
||||
Use the rvitals command to show realtime monitor data(input voltage, current, power) of PDU. ::
|
||||
|
||||
# rvitals coralpdu
|
||||
|
||||
|
||||
Show manufacture information
|
||||
-----------------------------
|
||||
|
||||
Use the rinv command to show MFR information of PDU ::
|
||||
|
||||
# rinv coralpdu
|
||||
|
||||
|
||||
|
@ -1,10 +1,14 @@
|
||||
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.
|
||||
Power Distribution Units (PDUs) are devices that distribute power to servers in a frame. They have the capability of monitoring the amount of power that is being used by devices plugged into it and cycle power to individual receptacles. xCAT can support two kinds of PDUs, infrastructure PDU (irpdu) and collaborative PDU (crpdu).
|
||||
|
||||
The Infrastructure rack PDUs are switched and monitored 1U PDU products which can connect up to nine C19 devices or up to 12 C13 devices and an additional three C13 peripheral devices to a signle dedicated power source. The Collaborative PDU is on the compute rack and has the 6x IEC 320-C13 receptacles that feed the rack switches. These two types of PDU have different design and implementation. xCAT has different code path to maintains PDU commands via **pdutype**.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
pdu.rst
|
||||
irpdu.rst
|
||||
crpdu.rst
|
||||
|
153
docs/source/advanced/pdu/irpdu.rst
Normal file
153
docs/source/advanced/pdu/irpdu.rst
Normal file
@ -0,0 +1,153 @@
|
||||
Infrastructure PDU
|
||||
==================
|
||||
|
||||
Users can access Infrastructure PDU via telnet and use the **IBM PDU Configuration Utility** to set up and configure the PDU. xCAT supports PDU commands for power management and monitoring through SNMP.
|
||||
|
||||
|
||||
PDU Commands
|
||||
------------
|
||||
|
||||
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
|
||||
|
||||
|
||||
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 for a compute node: ::
|
||||
|
||||
# rpower cn01 pduoff
|
||||
cn01: f5pdu3 outlet 6 is off
|
||||
cn01: f5pdu3 outlet 7 is off
|
||||
|
||||
* Power on the PDU outlets for a compute node: ::
|
||||
|
||||
# rpower cn01 pduon
|
||||
cn01: f5pdu3 outlet 6 is on
|
||||
cn01: f5pdu3 outlet 7 is on
|
||||
|
||||
* Power cycling the PDU outlets for a compute node: ::
|
||||
|
||||
# rpower cn01 pdureset
|
||||
cn01: f5pdu3 outlet 6 is reset
|
||||
cn01: f5pdu3 outlet 7 is reset
|
||||
|
||||
The following commands are supported against a PDU:
|
||||
|
||||
* Check the status of the full PDU: ::
|
||||
|
||||
# rpower f5pdu3 stat
|
||||
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
|
||||
|
||||
* Power reset the full PDU: ::
|
||||
|
||||
# rpower f5pdu3 reset
|
||||
f5pdu3: outlet 1 is reset
|
||||
f5pdu3: outlet 2 is reset
|
||||
f5pdu3: outlet 3 is reset
|
||||
f5pdu3: outlet 4 is reset
|
||||
f5pdu3: outlet 5 is reset
|
||||
f5pdu3: outlet 6 is reset
|
||||
f5pdu3: outlet 7 is reset
|
||||
f5pdu3: outlet 8 is reset
|
||||
f5pdu3: outlet 9 is reset
|
||||
f5pdu3: outlet 10 is reset
|
||||
f5pdu3: outlet 11 is reset
|
||||
f5pdu3: outlet 12 is reset
|
||||
|
||||
* PDU inventory information: ::
|
||||
|
||||
# rinv f6pdu16
|
||||
f6pdu16: PDU Software Version: "OPDP_sIBM_v01.3_2"
|
||||
f6pdu16: PDU Machine Type: "1U"
|
||||
f6pdu16: PDU Model Number: "dPDU4230"
|
||||
f6pdu16: PDU Part Number: "46W1608"
|
||||
f6pdu16: PDU Name: "IBM PDU"
|
||||
f6pdu16: PDU Serial Number: "4571S9"
|
||||
f6pdu16: PDU Description: "description"
|
||||
|
||||
* PDU and outlet power information: ::
|
||||
|
||||
# rvitals f6pdu15
|
||||
f6pdu15: Voltage Warning: 0
|
||||
f6pdu15: outlet 1 Current: 0 mA
|
||||
f6pdu15: outlet 1 Max Capacity of the current: 16000 mA
|
||||
f6pdu15: outlet 1 Current Threshold Warning: 9600 mA
|
||||
f6pdu15: outlet 1 Current Threshold Critical: 12800 mA
|
||||
f6pdu15: outlet 1 Last Power Reading: 0 Watts
|
||||
f6pdu15: outlet 2 Current: 0 mA
|
||||
f6pdu15: outlet 2 Max Capacity of the current: 16000 mA
|
||||
f6pdu15: outlet 2 Current Threshold Warning: 9600 mA
|
||||
f6pdu15: outlet 2 Current Threshold Critical: 12800 mA
|
||||
f6pdu15: outlet 2 Last Power Reading: 0 Watts
|
||||
f6pdu15: outlet 3 Current: 1130 mA
|
||||
f6pdu15: outlet 3 Max Capacity of the current: 16000 mA
|
||||
f6pdu15: outlet 3 Current Threshold Warning: 9600 mA
|
||||
f6pdu15: outlet 3 Current Threshold Critical: 12800 mA
|
||||
f6pdu15: outlet 3 Last Power Reading: 217 Wattsv
|
||||
|
||||
**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 <node> on`` to power on the compute side after the BMC boots.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,17 +1,39 @@
|
||||
PDU
|
||||
===
|
||||
Discovering PDUs
|
||||
================
|
||||
|
||||
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.
|
||||
xCAT provides `pdudiscover` command to discover the PDUs that are attached to the neighboring subnets on xCAT management node. ::
|
||||
|
||||
pdudiscover [<noderange>|--range ipranges] [-r|-x|-z] [-w] [-V|--verbose] [--setup]
|
||||
|
||||
xCAT uses snmp scan method to discover PDU. Make sure net-snmp-utils package is installed on xCAT MN in order to use snmpwalk command. ::
|
||||
|
||||
Options:
|
||||
--range Specify one or more IP ranges. Each can be an ip address (10.1.2.3) or an ip range
|
||||
(10.1.2.0/24). If the range is huge, for example, 192.168.1.1/8, the pdu
|
||||
discover may take a very long time to scan. So the range should be exactly
|
||||
specified. It accepts multiple formats. For example:
|
||||
192.168.1.1/24, 40-41.1-2.3-4.1-100.
|
||||
|
||||
If the range is not specified, the command scans all the subnets that the active
|
||||
network interfaces (eth0, eth1) are on where this command is issued.
|
||||
-r Display Raw responses.
|
||||
-x XML formatted output.
|
||||
-z Stanza formatted output.
|
||||
-w Writes output to xCAT database.
|
||||
--setup Process switch-based pdu discovery and configure the PDUs(it included passwordless , change ip address from dhcp to static and snmp configuration). It required predefined PDU node definition with switch name and switch port attributes for mapping. (Notes: only support for crpdu for now for this options)
|
||||
|
||||
|
||||
Define PDU Objects
|
||||
------------------
|
||||
|
||||
|
||||
|
||||
#. Define pdu object ::
|
||||
|
||||
mkdef f5pdu3 groups=pdu ip=50.0.0.8 mgt=pdu nodetype=pdu
|
||||
mkdef f5pdu3 groups=pdu ip=50.0.0.8 mgt=pdu nodetype=pdu pdutype=irpdu
|
||||
|
||||
#. Define switch attribute for pdu object which will be used for pdudiscover **--setup** options. ::
|
||||
|
||||
chdef f5pdu3 switch=mid08 switchport=3
|
||||
|
||||
#. Add hostname to /etc/hosts::
|
||||
|
||||
@ -19,129 +41,6 @@ Define PDU Objects
|
||||
|
||||
#. 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
|
||||
|
||||
* Power cycling the PDU outlets on a compute node: ::
|
||||
|
||||
# rpower cn01 pdureset
|
||||
cn01: f5pdu3 outlet 6 is reset
|
||||
cn01: f5pdu3 outlet 7 is reset
|
||||
|
||||
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
|
||||
|
||||
* Power reset the full PDU: ::
|
||||
|
||||
# rpower f5pdu3 reset
|
||||
f5pdu3: outlet 1 is reset
|
||||
f5pdu3: outlet 2 is reset
|
||||
f5pdu3: outlet 3 is reset
|
||||
f5pdu3: outlet 4 is reset
|
||||
f5pdu3: outlet 5 is reset
|
||||
f5pdu3: outlet 6 is reset
|
||||
f5pdu3: outlet 7 is reset
|
||||
f5pdu3: outlet 8 is reset
|
||||
f5pdu3: outlet 9 is reset
|
||||
f5pdu3: outlet 10 is reset
|
||||
f5pdu3: outlet 11 is reset
|
||||
f5pdu3: outlet 12 is reset
|
||||
|
||||
|
||||
**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 <node> on`` to power on the compute node after the BMC boots.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
snmpwalk -v1 -cpublic -mALL f5pdu3 system
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ nodelist Attributes:
|
||||
|
||||
\ **status**\
|
||||
|
||||
The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).
|
||||
The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->[postbooting]->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->[postbooting]->booted->[alive], For booting: [alive/unreachable]->booting->[postbooting]->booted->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).
|
||||
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ servicenode Attributes:
|
||||
|
||||
\ **conserver**\
|
||||
|
||||
Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service.
|
||||
Do we set up console service on this service node? Valid values: 0, 1, or 2. If 0, it does not change the current state of the service. If 1, configures and starts conserver daemon. If 2, configures and starts goconserver daemon.
|
||||
|
||||
|
||||
|
||||
|
@ -1131,7 +1131,7 @@ node Attributes:
|
||||
|
||||
\ **status**\ (nodelist.status)
|
||||
|
||||
The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).
|
||||
The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->[postbooting]->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->[postbooting]->booted->[alive], For booting: [alive/unreachable]->booting->[postbooting]->booted->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).
|
||||
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ VER=`cat Version`
|
||||
REL="--define"
|
||||
EASE='usedate 1'
|
||||
RPMROOT=/root/rpmbuild
|
||||
|
||||
mkdir -p $RPMROOT/SOURCES
|
||||
rpmbuild --version > /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Error: rpmbuild does not appear to be installed or working."
|
||||
|
2
makerpm
2
makerpm
@ -126,7 +126,7 @@ function makexcat {
|
||||
# shipping bmcsetup and getipmi scripts as part of postscripts
|
||||
files=("bmcsetup" "getipmi")
|
||||
for f in "${files[@]}"; do
|
||||
cp "xCAT-genesis-scripts/bin/"$f ${RPMNAME}/postscripts/$f
|
||||
cp "xCAT-genesis-scripts/usr/bin/"$f ${RPMNAME}/postscripts/$f
|
||||
sed -i "s/xcat.genesis.$f/$f/g" ${RPMNAME}/postscripts/$f
|
||||
done
|
||||
cd `dirname $0`/$RPMNAME
|
||||
|
@ -46,6 +46,7 @@ $::STATUS_INACTIVE = "unreachable";
|
||||
$::STATUS_INSTALLING = "installing";
|
||||
$::STATUS_INSTALLED = "installed";
|
||||
$::STATUS_BOOTING = "booting";
|
||||
$::STATUS_POSTBOOTING = "postbooting";
|
||||
$::STATUS_NETBOOTING = "netbooting";
|
||||
$::STATUS_BOOTED = "booted";
|
||||
$::STATUS_POWERING_ON = "powering-on";
|
||||
@ -66,6 +67,7 @@ $::STATUS_BMCREADY = "bmcready";
|
||||
$::STATUS_INSTALLING => 1,
|
||||
$::STATUS_INSTALLED => 1,
|
||||
$::STATUS_BOOTING => 1,
|
||||
$::STATUS_POSTBOOTING => 1,
|
||||
$::STATUS_NETBOOTING => 1,
|
||||
$::STATUS_BOOTED => 1,
|
||||
$::STATUS_POWERING_ON => 1,
|
||||
@ -86,15 +88,16 @@ $::STATUS_BMCREADY = "bmcready";
|
||||
$::STATUS_SYNCED => 1,
|
||||
);
|
||||
|
||||
#defined->[discovering]->[configuring]->[standingby]->installing->[installed]->booting->alive, defined->[discovering]->[configuring]-[standingby]->netbooting->booted->alive, alive/unreachable->booting->alive, powering-off->unreachable, alive->unreachable
|
||||
#defined->[discovering]->[configuring]->[standingby]->installing->[installed]->booting->[postbooting]->booted->alive, defined->[discovering]->[configuring]-[standingby]->netbooting->[postbooting]->booted->alive, alive/unreachable->booting->alive, powering-off->unreachable, alive->unreachable
|
||||
%::NEXT_NODESTAT_VAL = (
|
||||
$::STATUS_DEFINED => { $::STATUS_DISCOVERING => 1, $::STATUS_INSTALLING => 1, $::STATUS_NETBOOTING => 1, $::STATUS_POWERING_OFF => 1, $::STATUS_POWERING_ON => 1, $::STATUS_BOOTING => 1, $::STATUS_CONFIGURING => 1 },
|
||||
$::STATUS_DISCOVERING => { $::STATUS_INSTALLING => 1, $::STATUS_NETBOOTING => 1, $::STATUS_CONFIGURING => 1, $::STATUS_BOOTING => 1 },
|
||||
$::STATUS_CONFIGURING => { $::STATUS_INSTALLING => 1, $::STATUS_NETBOOTING => 1, $::STATUS_STANDING_BY => 1 },
|
||||
$::STATUS_INSTALLING => { $::STATUS_INSTALLED => 1, $::STATUS_BOOTING => 1 },
|
||||
$::STATUS_INSTALLED => { $::STATUS_BOOTING => 1 },
|
||||
$::STATUS_BOOTING => { $::STATUS_BOOTED => 1, $::STATUS_ACTIVE => 1, $::STATUS_INACTIVE => 1 },
|
||||
$::STATUS_NETBOOTING => { $::STATUS_BOOTED => 1 },
|
||||
$::STATUS_BOOTING => { $::STATUS_BOOTED => 1, $::STATUS_ACTIVE => 1, $::STATUS_INACTIVE => 1, $::STATUS_POSTBOOTING => 1 },
|
||||
$::STATUS_POSTBOOTING => { $::STATUS_BOOTED => 1 },
|
||||
$::STATUS_NETBOOTING => { $::STATUS_POSTBOOTING => 1, $::STATUS_BOOTED => 1 },
|
||||
$::STATUS_BOOTED => { $::STATUS_ACTIVE => 1, $::STATUS_INACTIVE => 1 },
|
||||
$::STATUS_ACTIVE => { $::STATUS_INACTIVE => 1, $::STATUS_DISCOVERING => 1, $::STATUS_CONFIGURING => 1, $::STATUS_INSTALLING => 1, $::STATUS_NETBOOTING => 1, $::STATUS_POWERING_OFF => 1, $::STATUS_POWERING_ON => 1 },
|
||||
$::STATUS_INACTIVE => { $::STATUS_ACTIVE => 1, $::STATUS_DISCOVERING => 1, $::STATUS_CONFIGURING => 1, $::STATUS_INSTALLING => 1, $::STATUS_NETBOOTING => 1, $::STATUS_POWERING_OFF => 1, $::STATUS_POWERING_ON => 1 },
|
||||
|
@ -624,7 +624,7 @@ passed as argument rather than by table value',
|
||||
descriptions => {
|
||||
node => 'The hostname of a node in the cluster.',
|
||||
groups => "A comma-delimited list of groups this node is a member of. Group names are arbitrary, except all nodes should be part of the 'all' group. Internal group names are designated by using __<groupname>. For example, __Unmanaged, could be the internal name for a group of nodes that is not managed by xCAT. Admins should avoid using the __ characters when defining their groups.",
|
||||
status => 'The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->booted->[alive], For booting: [alive/unreachable]->booting->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).',
|
||||
status => 'The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, configuring, installing, alive, standingby, powering-off, unreachable. If blank, defined is assumed. The possible status change sequences are: For installation: defined->[discovering]->[configuring]->[standingby]->installing->booting->[postbooting]->booted->[alive], For diskless deployment: defined->[discovering]->[configuring]->[standingby]->netbooting->[postbooting]->booted->[alive], For booting: [alive/unreachable]->booting->[postbooting]->booted->[alive], For powering off: [alive]->powering-off->[unreachable], For monitoring: alive->unreachable. Discovering and configuring are for x Series discovery process. Alive and unreachable are set only when there is a monitoring plug-in start monitor the node status for xCAT. Note that the status values will not reflect the real node status if you change the state of the node from outside of xCAT (i.e. power off the node using HMC GUI).',
|
||||
statustime => "The data and time when the status was updated.",
|
||||
appstatus => "A comma-delimited list of application status. For example: 'sshd=up,ftp=down,ll=down'",
|
||||
appstatustime => 'The date and time when appstatus was updated.',
|
||||
@ -962,7 +962,7 @@ passed as argument rather than by table value',
|
||||
dhcpserver => 'Do we set up DHCP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, runs makedhcp -n. If 0, it does not change the current state of the service. ',
|
||||
tftpserver => 'Do we set up TFTP on this service node? Not supported on AIX. Valid values:1 or 0. If 1, configures and starts atftp. If 0, it does not change the current state of the service. ',
|
||||
nfsserver => 'Do we set up file services (HTTP,FTP,or NFS) on this service node? For AIX will only setup NFS, not HTTP or FTP. Valid values:1 or 0.If 0, it does not change the current state of the service. ',
|
||||
conserver => 'Do we set up Conserver on this service node? Valid values:1 or 0. If 1, configures and starts conserver daemon. If 0, it does not change the current state of the service.',
|
||||
conserver => 'Do we set up console service on this service node? Valid values: 0, 1, or 2. If 0, it does not change the current state of the service. If 1, configures and starts conserver daemon. If 2, configures and starts goconserver daemon. ',
|
||||
monserver => 'Is this a monitoring event collection point? Valid values: 1 or 0. If 0, it does not change the current state of the service.',
|
||||
ldapserver => 'Do we set up ldap caching proxy on this service node? Not supported on AIX. Valid values:1 or 0. If 0, it does not change the current state of the service.',
|
||||
ntpserver => 'Not used. Use setupntp postscript to setup a ntp server on this service node? Valid values:1 or 0. If 0, it does not change the current state of the service.',
|
||||
@ -1057,6 +1057,7 @@ passed as argument rather than by table value',
|
||||
" requests it does not know to these servers. Note that the DNS servers on the\n" .
|
||||
" service nodes will ignore this value and always be configured to forward \n" .
|
||||
" to the management node.\n\n" .
|
||||
" emptyzonesenable: (yes or no). This is to set empty-zones-enable value in named.conf options section. \n\n" .
|
||||
" master: The hostname of the xCAT management node, as known by the nodes.\n\n" .
|
||||
" nameservers: A comma delimited list of DNS servers that each node in the cluster should\n" .
|
||||
" use. This value will end up in the nameserver settings of the\n" .
|
||||
@ -1151,6 +1152,7 @@ passed as argument rather than by table value',
|
||||
" defserialflow: The default serial flow - currently only used by the mknb command.\n\n" .
|
||||
" defserialport: The default serial port - currently only used by mknb.\n\n" .
|
||||
" defserialspeed: The default serial speed - currently only used by mknb.\n\n" .
|
||||
" disablenodesetwarning: Allow the legacy xCAT non-osimage style nodeset to execute.\n\n" .
|
||||
" genmacprefix: When generating mac addresses automatically, use this manufacturing\n" .
|
||||
" prefix (e.g. 00:11:aa)\n\n" .
|
||||
" genpasswords: Automatically generate random passwords for BMCs when configuring\n" .
|
||||
|
@ -218,8 +218,8 @@ sub install_xcat{
|
||||
|
||||
my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh",
|
||||
"sudo chmod 777 /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -",
|
||||
"sudo apt-get -qq update");
|
||||
my @output;
|
||||
|
63
xCAT-genesis-builder/debuild-xcat-genesis-base
Executable file
63
xCAT-genesis-builder/debuild-xcat-genesis-base
Executable file
@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This is a dirty script for convert an xCAT-genesis-base rpm package to
|
||||
# a debian package.
|
||||
#
|
||||
|
||||
# xCAT-genesis-base-x86_64-2.13.10-snap201801090246.noarch.rpm
|
||||
RPM_PACKAGE="$1"
|
||||
if [ -z "${RPM_PACKAGE}" ]
|
||||
then
|
||||
echo "Usage: ${0##*/} /path/to/xCAT-genesis-base.rpm"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
[ -n "${RPM_PACKAGE}" ] || exit 1
|
||||
[ -f "${RPM_PACKAGE}" ] || exit 1
|
||||
|
||||
umask 0022
|
||||
|
||||
EXTRACT_DIR="${RPM_PACKAGE##*/}"
|
||||
EXTRACT_DIR="${EXTRACT_DIR%%-snap*}"
|
||||
|
||||
rm -rf "${EXTRACT_DIR}"
|
||||
rm -rf "${EXTRACT_DIR}.orig"
|
||||
alien -d -g -c -k "${RPM_PACKAGE}" || exit 1
|
||||
|
||||
PACKAGE_ARCH="${EXTRACT_DIR%-*}"
|
||||
PACKAGE_ARCH="${PACKAGE_ARCH##*-}"
|
||||
|
||||
if [[ ${EXTRACT_DIR} =~ -x86_64- ]]
|
||||
then
|
||||
rm -rf "${EXTRACT_DIR//x86_64/amd64}"
|
||||
mv "${EXTRACT_DIR}" "${EXTRACT_DIR//x86_64/amd64}"
|
||||
EXTRACT_DIR="${EXTRACT_DIR//x86_64/amd64}"
|
||||
|
||||
sed -i -e 's/x86-64/amd64/g' "${EXTRACT_DIR}/debian/control"
|
||||
sed -i -e 's/x86-64/amd64/g' "${EXTRACT_DIR}/debian/changelog"
|
||||
fi
|
||||
|
||||
sed -i -e "/^Description:/i Breaks: xcat-genesis-scripts-${PACKAGE_ARCH//x86_64/amd64} (<< 2.13.10)" "${EXTRACT_DIR}/debian/control"
|
||||
|
||||
cat >"${EXTRACT_DIR}/debian/preinst" <<EOF
|
||||
#!/bin/bash
|
||||
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/bin ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/bin
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/sbin ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/sbin
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib64 ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib64
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/var/run ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/var/run
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
chmod 0755 "${EXTRACT_DIR}/debian/preinst"
|
||||
|
||||
( cd "${EXTRACT_DIR}" && debian/rules binary )
|
@ -29,7 +29,7 @@ Vendor: IBM Corp.
|
||||
Summary: xCAT Genesis netboot image
|
||||
URL: https://xcat.org/
|
||||
Source1: xCAT-genesis-base-%{tarch}.tar.bz2
|
||||
Conflicts: xCAT-genesis-scripts-%{tarch} < 1:2.13.9
|
||||
Conflicts: xCAT-genesis-scripts-%{tarch} < 1:2.13.10
|
||||
|
||||
Buildroot: %{_localstatedir}/tmp/xCAT-genesis
|
||||
BuildRequires: /usr/sbin/ntp-wait
|
||||
|
@ -33,7 +33,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/genesis/builder
|
||||
cd $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/genesis/builder
|
||||
tar jxvf %{SOURCE1}
|
||||
chmod +x $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/genesis/builder/buildrpm
|
||||
chmod 0755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/genesis/builder/buildrpm
|
||||
chmod 0755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/genesis/builder/debuild-xcat-genesis-base
|
||||
cd -
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ Standards-Version: 3.9.4
|
||||
|
||||
Package: xcat-genesis-scripts-amd64
|
||||
Architecture: all
|
||||
Depends: xcat-genesis-base-amd64 (>=2.13.2)
|
||||
Depends: xcat-genesis-base-amd64 (>= 2.13.10)
|
||||
Conflicts: xcat-genesis-scripts, xcat-genesis-scripts-x86-64
|
||||
Replaces: xcat-genesis-scripts, xcat-genesis-scripts-x86-64
|
||||
Description: xCAT genesis
|
||||
|
@ -7,7 +7,7 @@ Standards-Version: 3.9.4
|
||||
|
||||
Package: xcat-genesis-scripts-ppc64
|
||||
Architecture: all
|
||||
Depends: xcat-genesis-base-ppc64 (>=2.13.2)
|
||||
Depends: xcat-genesis-base-ppc64 (>= 2.13.10)
|
||||
Conflicts: xcat-genesis-scripts
|
||||
Replaces: xcat-genesis-scripts
|
||||
Description: xCAT genesis
|
||||
|
@ -33,8 +33,7 @@ install:
|
||||
dh_installdirs $(installdir)
|
||||
dh_install -X".svn"
|
||||
dh_install ./etc/ $(installtodir)
|
||||
dh_install ./bin/ $(installtodir)
|
||||
dh_install ./sbin/ $(installtodir)
|
||||
dh_install ./usr/ $(installtodir)
|
||||
dh_compress
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
|
@ -29,7 +29,7 @@ Vendor: IBM Corp.
|
||||
Summary: xCAT Genesis netboot image - Core content
|
||||
URL: https://xcat.org/
|
||||
Source1: xCAT-genesis-scripts.tar.bz2
|
||||
Requires: xCAT-genesis-base-%{tarch} >= 2:2.13.2
|
||||
Requires: xCAT-genesis-base-%{tarch} >= 2:2.13.10
|
||||
|
||||
Buildroot: %{_localstatedir}/tmp/xCAT-genesis
|
||||
Packager: IBM Corp.
|
||||
@ -71,32 +71,32 @@ touch /etc/xcat/genesis-scripts-updated
|
||||
%Files
|
||||
%defattr(-,root,root)
|
||||
#%dir %attr(-,root,root) %{rpminstallroot}
|
||||
%{rpminstallroot}/bin/allowcred.awk
|
||||
%{rpminstallroot}/bin/bmcsetup
|
||||
%{rpminstallroot}/bin/raidcmd
|
||||
%{rpminstallroot}/bin/raidutils
|
||||
%{rpminstallroot}/bin/diskdiscover
|
||||
%{rpminstallroot}/bin/configraid
|
||||
%{rpminstallroot}/bin/dodiscovery
|
||||
%{rpminstallroot}/bin/dosysclone
|
||||
%{rpminstallroot}/bin/doxcat
|
||||
%{rpminstallroot}/bin/getadapter
|
||||
%{rpminstallroot}/bin/getcert
|
||||
%{rpminstallroot}/bin/getdestiny
|
||||
%{rpminstallroot}/bin/getipmi
|
||||
%{rpminstallroot}/bin/ifup
|
||||
%{rpminstallroot}/bin/minixcatd.awk
|
||||
%{rpminstallroot}/bin/nextdestiny
|
||||
%{rpminstallroot}/bin/remoteimmsetup
|
||||
%{rpminstallroot}/bin/udpcat.awk
|
||||
%{rpminstallroot}/bin/updateflag.awk
|
||||
%{rpminstallroot}/bin/pseries_platform
|
||||
%{rpminstallroot}/bin/update_flash
|
||||
%{rpminstallroot}/bin/update_flash_nv
|
||||
%{rpminstallroot}/bin/restart
|
||||
%{rpminstallroot}/usr/bin/allowcred.awk
|
||||
%{rpminstallroot}/usr/bin/bmcsetup
|
||||
%{rpminstallroot}/usr/bin/raidcmd
|
||||
%{rpminstallroot}/usr/bin/raidutils
|
||||
%{rpminstallroot}/usr/bin/diskdiscover
|
||||
%{rpminstallroot}/usr/bin/configraid
|
||||
%{rpminstallroot}/usr/bin/dodiscovery
|
||||
%{rpminstallroot}/usr/bin/dosysclone
|
||||
%{rpminstallroot}/usr/bin/doxcat
|
||||
%{rpminstallroot}/usr/bin/getadapter
|
||||
%{rpminstallroot}/usr/bin/getcert
|
||||
%{rpminstallroot}/usr/bin/getdestiny
|
||||
%{rpminstallroot}/usr/bin/getipmi
|
||||
%{rpminstallroot}/usr/bin/ifup
|
||||
%{rpminstallroot}/usr/bin/minixcatd.awk
|
||||
%{rpminstallroot}/usr/bin/nextdestiny
|
||||
%{rpminstallroot}/usr/bin/remoteimmsetup
|
||||
%{rpminstallroot}/usr/bin/udpcat.awk
|
||||
%{rpminstallroot}/usr/bin/updateflag.awk
|
||||
%{rpminstallroot}/usr/bin/pseries_platform
|
||||
%{rpminstallroot}/usr/bin/update_flash
|
||||
%{rpminstallroot}/usr/bin/update_flash_nv
|
||||
%{rpminstallroot}/usr/bin/restart
|
||||
%{rpminstallroot}/etc/init.d/functions
|
||||
%{rpminstallroot}/etc/udev/rules.d/99-imm.rules
|
||||
%{rpminstallroot}/etc/udev/rules.d/98-mlx.rules
|
||||
%{rpminstallroot}/sbin/setupimmnic
|
||||
%{rpminstallroot}/sbin/loadmlxeth
|
||||
%{rpminstallroot}/usr/sbin/setupimmnic
|
||||
%{rpminstallroot}/usr/sbin/loadmlxeth
|
||||
%exclude %{rpminstallroot}/debian/*
|
||||
|
@ -30,7 +30,7 @@ xCAT-openbmc-py provides openbmc related functions.
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT/%{prefix}/lib/python/agent
|
||||
install -d $RPM_BUILD_ROOT/%{prefix}/lib/python/agent/xcatagent
|
||||
install -m644 lib/python/agent/*.py $RPM_BUILD_ROOT/%{prefix}/lib/python/agent
|
||||
install -m755 lib/python/agent/*.py $RPM_BUILD_ROOT/%{prefix}/lib/python/agent
|
||||
install -m644 lib/python/agent/xcatagent/*.py $RPM_BUILD_ROOT/%{prefix}/lib/python/agent/xcatagent
|
||||
|
||||
%ifnos linux
|
||||
|
@ -587,6 +587,18 @@ sub process_request {
|
||||
$ctx->{forwarders} = \@forwarders;
|
||||
}
|
||||
|
||||
my @options = xCAT::TableUtils->get_site_attribute("emptyzonesenable");
|
||||
my $empty_zones = $options[0];
|
||||
if (defined($empty_zones)) {
|
||||
if ($empty_zones =~ /^yes$|^no$/) {
|
||||
$ctx->{empty_zones_enable} = $empty_zones;
|
||||
} else {
|
||||
my $rsp;
|
||||
push @{ $rsp->{data} }, "emptyzonesenable from xCAT site table should be yes or no.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
return;
|
||||
}
|
||||
}
|
||||
my @slave_ips;
|
||||
my $dns_slaves = get_dns_slave();
|
||||
if (scalar @$dns_slaves) {
|
||||
@ -1098,6 +1110,8 @@ sub update_namedconf {
|
||||
push @newnamed, "\t\t" . $_ . ";\n";
|
||||
}
|
||||
push @newnamed, "\t};\n";
|
||||
} elsif ($ctx->{empty_zones_enable} and $line =~ /empty-zones-enable/) {
|
||||
push @newnamed, "\tempty-zones-enable " . $ctx->{empty_zones_enable} . ";\n";
|
||||
} elsif ($ctx->{slaves} and $line =~ /allow-transfer \{/) {
|
||||
push @newnamed, "\tallow-transfer \{\n";
|
||||
$skip = 1;
|
||||
@ -1237,6 +1251,10 @@ sub update_namedconf {
|
||||
push @newnamed, "\t};\n";
|
||||
}
|
||||
|
||||
if ($ctx->{empty_zones_enable}){
|
||||
push @newnamed, "\tempty-zones-enable " . $ctx->{empty_zones_enable} . ";\n";
|
||||
}
|
||||
|
||||
if ($slave) {
|
||||
push @newnamed, "\tallow-transfer { any; };\n";
|
||||
} else {
|
||||
|
@ -4696,7 +4696,7 @@ sub parseboard {
|
||||
my $macdata = $boardinf{extra}->[6]->{value};
|
||||
my $macstring = "1";
|
||||
my $macprefix;
|
||||
while ($macdata and $macstring !~ /00:00:00:00:00:00/ and not ref $global_sessdata->{currmacs}) {
|
||||
while ($macdata and ref $macdata and $macstring !~ /00:00:00:00:00:00/ and not ref $global_sessdata->{currmacs}) {
|
||||
my @currmac = splice @$macdata, 0, 6;
|
||||
unless ((scalar @currmac) == 6) {
|
||||
last;
|
||||
|
@ -542,6 +542,14 @@ my %status_info = (
|
||||
RSPCONFIG_API_CONFIG_OFF_RESPONSE => {
|
||||
process => \&rspconfig_api_config_response,
|
||||
},
|
||||
RSPCONFIG_API_CONFIG_ATTR_REQUEST => {
|
||||
method => "PUT",
|
||||
init_url => "$openbmc_project_url",
|
||||
data => "false",
|
||||
},
|
||||
RSPCONFIG_API_CONFIG_ATTR_RESPONSE => {
|
||||
process => \&rspconfig_api_config_response,
|
||||
},
|
||||
RSPCONFIG_API_CONFIG_QUERY_REQUEST => {
|
||||
method => "GET",
|
||||
init_url => "$openbmc_project_url",
|
||||
@ -555,6 +563,7 @@ my %status_info = (
|
||||
# For example: rspconfig <subcommand>
|
||||
# rspconfig <subcommand>=0
|
||||
# rspconfig <subcommand>=1
|
||||
# rspconfig <subcommand>=<attr_value>
|
||||
#
|
||||
#
|
||||
my %api_config_info = (
|
||||
@ -574,6 +583,19 @@ my %api_config_info = (
|
||||
type => "boolean",
|
||||
subcommand => "powersupplyredundency",
|
||||
},
|
||||
RSPCONFIG_POWERRESTORE_POLICY => {
|
||||
command => "rspconfig",
|
||||
url => "/control/host0/power_restore_policy",
|
||||
attr_url => "PowerRestorePolicy",
|
||||
display_name => "PowerRestorePolicy",
|
||||
type => "attribute",
|
||||
subcommand => "powerrestorepolicy",
|
||||
attr_value => {
|
||||
restore => "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.Restore",
|
||||
always_on => "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn",
|
||||
always_off => "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOff",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
$::RESPONSE_OK = "200 OK";
|
||||
@ -1519,18 +1541,25 @@ sub parse_command_status {
|
||||
my $subcommand_key = $1;
|
||||
my $subcommand_value = $2;
|
||||
|
||||
if ($subcommand_value eq "1") {
|
||||
if (($subcommand_value eq "1") && ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean")) {
|
||||
# Setup chain for subcommand=1
|
||||
$next_status{LOGIN_RESPONSE} = "RSPCONFIG_API_CONFIG_ON_REQUEST";
|
||||
$status_info{RSPCONFIG_API_CONFIG_ON_REQUEST}{init_url} = $status_info{RSPCONFIG_API_CONFIG_ON_REQUEST}{init_url} . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{url} . "/attr/" . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_url};
|
||||
$next_status{RSPCONFIG_API_CONFIG_ON_REQUEST} = "RSPCONFIG_API_CONFIG_ON_RESPONSE";
|
||||
}
|
||||
elsif ($subcommand_value eq "0") {
|
||||
elsif (($subcommand_value eq "0") && ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean")) {
|
||||
# Setup chain for subcommand=0
|
||||
$next_status{LOGIN_RESPONSE} = "RSPCONFIG_API_CONFIG_OFF_REQUEST";
|
||||
$status_info{RSPCONFIG_API_CONFIG_OFF_REQUEST}{init_url} = $status_info{RSPCONFIG_API_CONFIG_OFF_REQUEST}{init_url} . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{url} . "/attr/" . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_url};
|
||||
$next_status{RSPCONFIG_API_CONFIG_OFF_REQUEST} = "RSPCONFIG_API_CONFIG_OFF_RESPONSE";
|
||||
}
|
||||
elsif (($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "attribute") && (exists $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}{$subcommand_value})) {
|
||||
# Setup chain for subcommand=<attribute key>
|
||||
$next_status{LOGIN_RESPONSE} = "RSPCONFIG_API_CONFIG_ATTR_REQUEST";
|
||||
$status_info{RSPCONFIG_API_CONFIG_ATTR_REQUEST}{init_url} = $status_info{RSPCONFIG_API_CONFIG_ATTR_REQUEST}{init_url} . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{url} . "/attr/" . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_url};
|
||||
$status_info{RSPCONFIG_API_CONFIG_ATTR_REQUEST}{data} = $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}{$subcommand_value};
|
||||
$next_status{RSPCONFIG_API_CONFIG_ATTR_REQUEST} = "RSPCONFIG_API_CONFIG_ATTR_RESPONSE";
|
||||
}
|
||||
else {
|
||||
# Everything else is invalid
|
||||
xCAT::SvrUtils::sendmsg([1, "Invalid value $subcommand_value for 'rspconfig $subcommand_key=$subcommand_value' command"], $callback);
|
||||
@ -3471,6 +3500,14 @@ sub rspconfig_api_config_response {
|
||||
xCAT::SvrUtils::sendmsg("Error unsetting RSPCONFIG_API_CONFIG_OFF_RESPONSE", $callback, $node);
|
||||
}
|
||||
}
|
||||
elsif ($node_info{$node}{cur_status} eq "RSPCONFIG_API_CONFIG_ATTR_RESPONSE") {
|
||||
if ($response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
xCAT::SvrUtils::sendmsg("BMC Setting ". $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . "...", $callback, $node);
|
||||
}
|
||||
else {
|
||||
xCAT::SvrUtils::sendmsg("Error unsetting RSPCONFIG_API_CONFIG_OFF_RESPONSE", $callback, $node);
|
||||
}
|
||||
}
|
||||
elsif ($node_info{$node}{cur_status} eq "RSPCONFIG_API_CONFIG_QUERY_RESPONSE") {
|
||||
if ($response_info->{'message'} eq $::RESPONSE_OK) {
|
||||
foreach my $key_url (keys %{$response_info->{data}}) {
|
||||
@ -3480,11 +3517,21 @@ sub rspconfig_api_config_response {
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (scalar($value) >= 0) {
|
||||
if (($value eq "0") || ($value eq "1")) {
|
||||
# If 0 or 1 display as a boolean value
|
||||
xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . ": $value", $callback, $node);
|
||||
}
|
||||
else {
|
||||
xCAT::SvrUtils::sendmsg("Unable to query value for " . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_url}, $callback, $node);
|
||||
# If not a boolean value, display the last component of the attribute
|
||||
# For example "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.Restore"
|
||||
# will be displayed as "Restore"
|
||||
my @attr_value = split('\.', $value);
|
||||
if (@attr_value[-1]) {
|
||||
xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . ": @attr_value[-1]", $callback, $node);
|
||||
}
|
||||
else {
|
||||
xCAT::SvrUtils::sendmsg("Unable to query value for " . $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_url}, $callback, $node);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
0
xCAT-vlan/debian/changelog
Executable file → Normal file
0
xCAT-vlan/debian/changelog
Executable file → Normal file
0
xCAT-vlan/debian/compat
Executable file → Normal file
0
xCAT-vlan/debian/compat
Executable file → Normal file
0
xCAT-vlan/debian/control
Executable file → Normal file
0
xCAT-vlan/debian/control
Executable file → Normal file
0
xCAT-vlan/debian/copyright
Executable file → Normal file
0
xCAT-vlan/debian/copyright
Executable file → Normal file
0
xCAT-vlan/debian/dirs
Executable file → Normal file
0
xCAT-vlan/debian/dirs
Executable file → Normal file
0
xCAT-vlan/debian/docs
Executable file → Normal file
0
xCAT-vlan/debian/docs
Executable file → Normal file
0
xCAT-vlan/debian/install
Executable file → Normal file
0
xCAT-vlan/debian/install
Executable file → Normal file
0
xCAT-vlan/debian/postinst
Executable file → Normal file
0
xCAT-vlan/debian/postinst
Executable file → Normal file
@ -28,7 +28,7 @@ fi
|
||||
|
||||
case $1 in
|
||||
stop)
|
||||
[ "$NODESTATUS" != "n" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus powering-off"
|
||||
[ "$NODESTATUS" != "n" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus powering-off"
|
||||
;;
|
||||
start)
|
||||
# check for the REBOOT specified in xcatinfo to run post boot scripts on reboot
|
||||
@ -37,11 +37,14 @@ start)
|
||||
fi
|
||||
# if the xcatdsklspost file exists and this is a reboot - run xcatdsklspost with a mode of 6
|
||||
if [ "$REBOOT" = "TRUE" -a -r /opt/xcat/xcatdsklspost ] && [[ "$RUNBOOTSCRIPTS" =~ ^(1|yes|y)$ ]]; then
|
||||
[ "$NODESTATUS" != "n" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus postbooting"
|
||||
# xcatdsklspost will set the status to 'booted' or 'failed'
|
||||
/opt/xcat/xcatdsklspost 6
|
||||
elif [ "$REBOOT" = "TRUE" ] && [[ "$NODESTATUS" =~ ^(1|yes|y)$ ]]; then
|
||||
/xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus booted"
|
||||
/xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus booted"
|
||||
else
|
||||
# run /opt/xcat/xcatinstallpost
|
||||
[ "$NODESTATUS" != "n" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus postbooting"
|
||||
# run /opt/xcat/xcatinstallpost, it will set the status to 'booted' or 'failed'
|
||||
if [ -r /opt/xcat/xcatinstallpost ]; then
|
||||
/opt/xcat/xcatinstallpost
|
||||
fi
|
||||
|
@ -34,7 +34,7 @@ status)
|
||||
stop)
|
||||
echo -n "nothing to stop "
|
||||
logger -t xcat -p local4.info "nothing to stop"
|
||||
grep nonodestatus /proc/cmdline 2>/dev/null || [ -n "$XCATSERVER" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus powering-off"
|
||||
grep nonodestatus /proc/cmdline 2>/dev/null || [ -n "$XCATSERVER" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus powering-off"
|
||||
;;
|
||||
start)
|
||||
# Node is stateless by default
|
||||
@ -56,10 +56,12 @@ start)
|
||||
# Test for script existance
|
||||
if ! [ -x "$SCRIPT" ]; then
|
||||
msg "can't locate executable $SCRIPT"
|
||||
grep nonodestatus /proc/cmdline 2>/dev/null || [ -n "$XCATSERVER" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus failed"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Run $SCRIPT according to node type
|
||||
grep nonodestatus /proc/cmdline 2>/dev/null || [ -n "$XCATSERVER" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus postbooting"
|
||||
if [ $STATELITE -ne 0 ]; then
|
||||
logger -t xcat -p local4.info "Call $SCRIPT for statelite mode"
|
||||
"$SCRIPT" 4
|
||||
|
@ -7,7 +7,7 @@ Standards-Version: 3.9.4
|
||||
Homepage: https://xcat.org/
|
||||
|
||||
Package: xcatsn
|
||||
Architecture: all
|
||||
Architecture: amd64 ppc64el
|
||||
Depends: ${perl:Depends}, xcat-server (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000), libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, conserver-xcat, libnet-telnet-perl, isc-dhcp-server, apache2, nfs-kernel-server, xcat-genesis-scripts-ppc64 (>= 2.13-snap000000000000), xcat-genesis-scripts-amd64 (>= 2.13-snap000000000000)
|
||||
Recommends: bind9, nmap, tftp-hpa, ipmitool-xcat (>= 1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, elilo-xcat, xcat-buildkit (>= 2.13-snap000000000000), xcat-probe (>= 2.13-snap000000000000)
|
||||
Suggests: yaboot-xcat
|
||||
|
Loading…
x
Reference in New Issue
Block a user