diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-12-12 13:27:48 -0600 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-01 14:36:47 +0000 |
commit | aa229648283b591737b08237b09d319c1a2f19c9 (patch) | |
tree | 677aa43ba47ab9f7bd712df77c0966e929b6183f /meta-openbmc-machines/meta-openpower | |
parent | 8534ad77d8faff4f55ee6f6dd40d91be89376dee (diff) | |
download | talos-openbmc-aa229648283b591737b08237b09d319c1a2f19c9.tar.gz talos-openbmc-aa229648283b591737b08237b09d319c1a2f19c9.zip |
wspoon: Create fan rotors group with hard poweroff
In migrating to support better fan failure/missing shutdown scenarios,
currently defined shutdown scenarios should monitor the functional
states of the fan enclosures and do a soft poweroff.
A system hard poweroff will occur for the following condition:
- More than two fan rotors are nonfunctional
Change-Id: Ie5c769f6b4f272f4ff39c7f3ca036db275723997
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower')
2 files changed, 217 insertions, 39 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/air-cooled.yaml b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/air-cooled.yaml index 8cc605e86..06602132e 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/air-cooled.yaml +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/air-cooled.yaml @@ -1,12 +1,14 @@ # Air cooled Witherspoon fan policy for PDM. # -# An air cooled Witherspoon requires a minimum of three functional fans. -# If the number of functional fans drops below that -# power the system off. +# An air cooled Witherspoon requires a minimum of three functional fans +# enclosures or six functional fan rotors across all enclosures. +# If the number of functional fan enclosures is below three, soft poweroff +# the system, whereas if the number of fan rotors drop below six, an +# immediate hard poweroff of the system occurs. -- name: fans +- name: fan enclosures description: > - 'An air cooled Witherspoon has four fans to monitor.' + 'An air cooled Witherspoon has four fan enclosures to monitor.' class: group group: path members: @@ -19,6 +21,29 @@ - meta: FAN path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3 +- name: fan rotors + description: > + 'An air cooled Witherspoon has eight fan rotors to monitor.' + class: group + group: path + members: + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_0 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_1 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_0 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_1 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_0 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_1 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_0 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_1 + - name: chassis state description: > 'Witherspoon has a single chassis to monitor.' @@ -83,19 +108,28 @@ - name: watch fan present description: > - 'Trigger logic on fan presence state changes.' + 'Trigger logic on fan enclosure presence state changes.' class: watch watch: property - paths: fans + paths: fan enclosures properties: fan present callback: check cooling type - name: watch fan functional description: > - 'Trigger logic on fan functional state changes.' + 'Trigger logic on fan enclosure functional state changes.' + class: watch + watch: property + paths: fan enclosures + properties: fan functional + callback: check cooling type + +- name: watch fan rotor functional + description: > + 'Trigger logic on fan rotor functional state changes.' class: watch watch: property - paths: fans + paths: fan rotors properties: fan functional callback: check cooling type @@ -144,12 +178,14 @@ - name: check fans description: > - 'Verify there are at least three functional fans, power off if not.' + 'Verify there are at least three functional fan enclosures and at least + six functional fan rotors, power off if not.' class: callback callback: group members: - check group presence - - check group functional + - check group functional enclosures + - check group functional rotors - name: check group presence description: > @@ -163,7 +199,7 @@ of the fan inventory object implementation.' class: condition condition: count - paths: fans + paths: fan enclosures properties: fan present defer: 25000000us callback: log and shutdown @@ -172,9 +208,9 @@ op: '==' bound: true -- name: check group functional +- name: check group functional enclosures description: > - 'If this condition passes more than one fan in the group has been + 'If this condition passes more than one fan enclosure in the group has been marked as nonfunctional for ten seconds. Shut the system down. For a more detailed definition of nonfunctional, consult the documentation @@ -182,7 +218,7 @@ documentation of the fan inventory object implementation.' class: condition condition: count - paths: fans + paths: fan enclosures properties: fan functional defer: 10000000us callback: log and shutdown @@ -191,6 +227,36 @@ op: '==' bound: false +- name: check group functional rotors + description: > + 'If this condition passes more than two fan rotors in the group have been + marked as nonfunctional for five seconds. Immediately power off. + + For a more detailed definition of nonfunctional, consult the documentation + of xyz.openbmc_project.State.Decorator.OperationalStatus and/or the + documentation of the fan inventory object implementation.' + class: condition + condition: count + paths: fan rotors + properties: fan functional + defer: 5000000us + callback: log and poweroff + countop: '>' + countbound: 2 + op: '==' + bound: false + +- name: log and poweroff + description: > + 'Immediately poweroff, log an event in the journal, and create an + error log.' + class: callback + callback: group + members: + - hard poweroff + - log hard poweroff + - create shutdown error + - name: log and shutdown description: > 'Shut the system down, log an event in the journal, and create an @@ -199,9 +265,24 @@ callback: group members: - shutdown - - log + - log shutdown - create shutdown error +- name: hard poweroff + description: > + 'Immediately power off the system.' + class: callback + callback: method + service: org.freedesktop.systemd1 + path: /org/freedesktop/systemd1 + interface: org.freedesktop.systemd1.Manager + method: StartUnit + args: + - value: obmc-chassis-hard-poweroff@0.target + type: string + - value: replace + type: string + - name: shutdown description: > 'Shut down the system.' @@ -212,12 +293,22 @@ interface: org.freedesktop.systemd1.Manager method: StartUnit args: - - value: obmc-chassis-hard-poweroff@0.target + - value: obmc-host-shutdown@0.target type: string - value: replace type: string -- name: log +- name: log hard poweroff + description: > + 'Log a hard poweroff event to the systemd journal.' + class: callback + callback: journal + paths: chassis state + properties: chassis powered + severity: ERR + message: Immediate poweroff of system. There are not enough functional fans. + +- name: log shutdown description: > 'Log a shutdown event to the systemd journal.' class: callback @@ -225,7 +316,7 @@ paths: chassis state properties: chassis powered severity: ERR - message: Shutting down system. There are not enough functional fans. + message: Request shutdown of system. There are not enough functional fans. - name: create shutdown error description: > diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/water-cooled.yaml b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/water-cooled.yaml index c58e4b208..886375d8a 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/water-cooled.yaml +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-policy/water-cooled.yaml @@ -1,12 +1,14 @@ # Water cooled Witherspoon fan policy for PDM. # -# A water cooled Witherspoon requires a minimum of two functional fans. -# If the number of functional fans drops below that -# power the system off. +# A water cooled Witherspoon requires a minimum of two functional fan +# enclosures or four functional fan rotors across all enclosures. +# If the number of functional fan enclosures is below two, soft poweroff +# the system, whereas if the number of fan rotors drop below four, an +# immediate hard poweroff of the system occurs. -- name: fans +- name: fan enclosures description: > - 'A water cooled Witherspoon has three fans to monitor.' + 'A water cooled Witherspoon has three fan enclosures to monitor.' class: group group: path members: @@ -17,6 +19,25 @@ - meta: FAN path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3 +- name: fan rotors + description: > + 'A water cooled Witherspoon has six fan rotors to monitor.' + class: group + group: path + members: + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_0 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_1 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_0 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_1 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_0 + - meta: FAN + path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_1 + - name: chassis state description: > 'Witherspoon has a single chassis to monitor.' @@ -81,19 +102,28 @@ - name: watch fan present description: > - 'Trigger logic on fan presence state changes.' + 'Trigger logic on fan enclosure presence state changes.' class: watch watch: property - paths: fans + paths: fan enclosures properties: fan present callback: check cooling type - name: watch fan functional description: > - 'Trigger logic on fan functional state changes.' + 'Trigger logic on fan enclosure functional state changes.' class: watch watch: property - paths: fans + paths: fan enclosures + properties: fan functional + callback: check cooling type + +- name: watch fan rotor functional + description: > + 'Trigger logic on fan rotor functional state changes.' + class: watch + watch: property + paths: fan rotors properties: fan functional callback: check cooling type @@ -142,12 +172,14 @@ - name: check fans description: > - 'Verify there are at least two functional fans, power off if not.' + 'Verify there are at least two functional fan enclosures and at least + four functional fan rotors, power off if not.' class: callback callback: group members: - check group presence - - check group functional + - check group functional enclosures + - check group functional rotors - name: check group presence description: > @@ -161,7 +193,7 @@ of the fan inventory object implementation.' class: condition condition: count - paths: fans + paths: fan enclosures properties: fan present defer: 25000000us callback: log and shutdown @@ -170,17 +202,17 @@ op: '==' bound: true -- name: check group functional +- name: check group functional enclosures description: > - 'If this condition passes more than one fan in the group has been marked - as nonfunctional for ten seconds. Shut the system down. + 'If this condition passes more than one fan enclosure in the group has been + marked as nonfunctional for ten seconds. Shut the system down. For a more detailed definition of nonfunctional, consult the documentation of xyz.openbmc_project.State.Decorator.OperationalStatus and/or the documentation of the fan inventory object implementation.' class: condition condition: count - paths: fans + paths: fan enclosures properties: fan functional defer: 10000000us callback: log and shutdown @@ -189,6 +221,36 @@ op: '==' bound: false +- name: check group functional rotors + description: > + 'If this condition passes more than two fan rotors in the group have been + marked as nonfunctional for five seconds. Immediately power off. + + For a more detailed definition of nonfunctional, consult the documentation + of xyz.openbmc_project.State.Decorator.OperationalStatus and/or the + documentation of the fan inventory object implementation.' + class: condition + condition: count + paths: fan rotors + properties: fan functional + defer: 5000000us + callback: log and poweroff + countop: '>' + countbound: 2 + op: '==' + bound: false + +- name: log and poweroff + description: > + 'Immediately poweroff, log an event in the journal, and create an + error log.' + class: callback + callback: group + members: + - hard poweroff + - log hard poweroff + - create shutdown error + - name: log and shutdown description: > 'Shut the system down, log an event in the journal, and create an @@ -197,9 +259,24 @@ callback: group members: - shutdown - - log + - log shutdown - create shutdown error +- name: hard poweroff + description: > + 'Immediately power off the system.' + class: callback + callback: method + service: org.freedesktop.systemd1 + path: /org/freedesktop/systemd1 + interface: org.freedesktop.systemd1.Manager + method: StartUnit + args: + - value: obmc-chassis-hard-poweroff@0.target + type: string + - value: replace + type: string + - name: shutdown description: > 'Shut down the system.' @@ -210,12 +287,22 @@ interface: org.freedesktop.systemd1.Manager method: StartUnit args: - - value: obmc-chassis-hard-poweroff@0.target + - value: obmc-host-shutdown@0.target type: string - value: replace type: string -- name: log +- name: log hard poweroff + description: > + 'Log a hard poweroff event to the systemd journal.' + class: callback + callback: journal + paths: chassis state + properties: chassis powered + severity: ERR + message: Immediate poweroff of system. There are not enough functional fans. + +- name: log shutdown description: > 'Log a shutdown event to the systemd journal.' class: callback @@ -223,7 +310,7 @@ paths: chassis state properties: chassis powered severity: ERR - message: Shutting down system. There are not enough functional fans. + message: Request shutdown of system. There are not enough functional fans. - name: create shutdown error description: > |