Gunnar Mills | f15b0e9 | 2017-10-30 16:43:57 -0500 | [diff] [blame] | 1 | # Witherspoon fan error policy for PDM. |
| 2 | # |
| 3 | # Create a NotPresent error if fan 0, 1, 2, or 3 is not present for more |
| 4 | # than 20 seconds. Create a Nonfunctional error if fan 0, 1, 2, or 3 is not |
| 5 | # functional for any amount of time. |
| 6 | # The system must be powered on in both of these cases. |
| 7 | # If a water cooled system, don't create errors for fan 1. |
| 8 | # Note: An error is created each time the chassis powers on. |
| 9 | |
| 10 | - name: fan0 |
| 11 | class: group |
| 12 | group: path |
| 13 | members: |
| 14 | - meta: FAN |
| 15 | path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0 |
| 16 | |
| 17 | - name: fan1 |
| 18 | class: group |
| 19 | group: path |
| 20 | members: |
| 21 | - meta: FAN |
| 22 | path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1 |
| 23 | |
| 24 | - name: fan2 |
| 25 | class: group |
| 26 | group: path |
| 27 | members: |
| 28 | - meta: FAN |
| 29 | path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2 |
| 30 | |
| 31 | - name: fan3 |
| 32 | class: group |
| 33 | group: path |
| 34 | members: |
| 35 | - meta: FAN |
| 36 | path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3 |
| 37 | |
| 38 | - name: chassis state |
| 39 | description: > |
| 40 | 'Witherspoon has a single chassis to monitor.' |
| 41 | class: group |
| 42 | group: path |
| 43 | members: |
| 44 | - meta: CHASSISSTATE |
| 45 | path: /xyz/openbmc_project/state/chassis0 |
| 46 | |
| 47 | - name: chassis |
| 48 | description: > |
| 49 | 'Witherspoon has a single chassis to monitor.' |
| 50 | class: group |
| 51 | group: path |
| 52 | members: |
| 53 | - meta: CHASSIS |
| 54 | path: /xyz/openbmc_project/inventory/system/chassis |
| 55 | |
| 56 | |
| 57 | - name: fan present |
| 58 | description: > |
| 59 | 'Monitor the presence state of each fan.' |
| 60 | class: group |
| 61 | group: property |
| 62 | type: boolean |
| 63 | members: |
| 64 | - interface: xyz.openbmc_project.Inventory.Item |
| 65 | meta: PRESENT |
| 66 | property: Present |
| 67 | |
| 68 | - name: fan functional |
| 69 | description: > |
| 70 | 'Monitor the functional state of each fan.' |
| 71 | class: group |
| 72 | group: property |
| 73 | type: boolean |
| 74 | members: |
| 75 | - interface: xyz.openbmc_project.State.Decorator.OperationalStatus |
| 76 | meta: FUNCTIONAL |
| 77 | property: Functional |
| 78 | |
| 79 | - name: chassis powered |
| 80 | description: > |
| 81 | 'Monitor the chassis power state.' |
| 82 | class: group |
| 83 | group: property |
| 84 | type: string |
| 85 | members: |
| 86 | - interface: xyz.openbmc_project.State.Chassis |
| 87 | meta: CHASSIS_STATE |
| 88 | property: CurrentPowerState |
| 89 | |
| 90 | - name: chassis air cooled |
| 91 | description: > |
| 92 | 'The chassis cooling type.' |
| 93 | class: group |
| 94 | group: property |
| 95 | type: boolean |
| 96 | members: |
| 97 | - interface: xyz.openbmc_project.Inventory.Decorator.CoolingType |
| 98 | meta: COOLING_TYPE |
| 99 | property: WaterCooled |
| 100 | |
| 101 | - name: watch chassis state |
| 102 | description: > |
| 103 | 'Trigger logic on chassis power state changes.' |
| 104 | class: watch |
| 105 | watch: property |
| 106 | paths: chassis state |
| 107 | properties: chassis powered |
| 108 | callback: check power |
| 109 | |
| 110 | - name: watch fan0 presence |
| 111 | description: > |
| 112 | 'Trigger logic on fan0 presence state changes.' |
| 113 | class: watch |
| 114 | watch: property |
| 115 | paths: fan0 |
| 116 | properties: fan present |
| 117 | callback: check power fan0 presence |
| 118 | |
| 119 | - name: watch fan0 functional |
| 120 | description: > |
| 121 | 'Trigger logic on fan0 functional state changes.' |
| 122 | class: watch |
| 123 | watch: property |
| 124 | paths: fan0 |
| 125 | properties: fan functional |
| 126 | callback: check power fan0 functional |
| 127 | |
| 128 | - name: watch fan1 presence |
| 129 | description: > |
| 130 | 'Trigger logic on fan1 presence state changes.' |
| 131 | class: watch |
| 132 | watch: property |
| 133 | paths: fan1 |
| 134 | properties: fan present |
| 135 | callback: check power fan1 presence |
| 136 | |
| 137 | - name: watch fan1 functional |
| 138 | description: > |
| 139 | 'Trigger logic on fan1 functional state changes.' |
| 140 | class: watch |
| 141 | watch: property |
| 142 | paths: fan1 |
| 143 | properties: fan functional |
| 144 | callback: check power fan1 functional |
| 145 | |
| 146 | - name: watch fan2 presence |
| 147 | description: > |
| 148 | 'Trigger logic on fan2 presence state changes.' |
| 149 | class: watch |
| 150 | watch: property |
| 151 | paths: fan2 |
| 152 | properties: fan present |
| 153 | callback: check power fan2 presence |
| 154 | |
| 155 | - name: watch fan2 functional |
| 156 | description: > |
| 157 | 'Trigger logic on fan2 functional state changes.' |
| 158 | class: watch |
| 159 | watch: property |
| 160 | paths: fan2 |
| 161 | properties: fan functional |
| 162 | callback: check power fan2 functional |
| 163 | |
| 164 | - name: watch fan3 presence |
| 165 | description: > |
| 166 | 'Trigger logic on fan3 presence state changes.' |
| 167 | class: watch |
| 168 | watch: property |
| 169 | paths: fan3 |
| 170 | properties: fan present |
| 171 | callback: check power fan3 presence |
| 172 | |
| 173 | - name: watch fan3 functional |
| 174 | description: > |
| 175 | 'Trigger logic on fan3 functional state changes.' |
| 176 | class: watch |
| 177 | watch: property |
| 178 | paths: fan3 |
| 179 | properties: fan functional |
| 180 | callback: check power fan3 functional |
| 181 | |
| 182 | - name: check power |
| 183 | description: > |
| 184 | 'If the chassis has power, check all fans.' |
| 185 | class: condition |
| 186 | condition: count |
| 187 | paths: chassis state |
| 188 | properties: chassis powered |
| 189 | callback: check fans |
| 190 | countop: '>' |
| 191 | countbound: 0 |
| 192 | op: '==' |
| 193 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 194 | |
| 195 | - name: check power fan0 presence |
| 196 | description: > |
| 197 | 'If the chassis has power, check presence of fan0.' |
| 198 | class: condition |
| 199 | condition: count |
| 200 | paths: chassis state |
| 201 | properties: chassis powered |
| 202 | callback: check fan0 presence |
| 203 | countop: '>' |
| 204 | countbound: 0 |
| 205 | op: '==' |
| 206 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 207 | |
| 208 | - name: check power fan0 functional |
| 209 | description: > |
| 210 | 'If the chassis has power, check functional of fan0.' |
| 211 | class: condition |
| 212 | condition: count |
| 213 | paths: chassis state |
| 214 | properties: chassis powered |
| 215 | callback: check fan0 functional |
| 216 | countop: '>' |
| 217 | countbound: 0 |
| 218 | op: '==' |
| 219 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 220 | |
| 221 | - name: check power fan1 presence |
| 222 | description: > |
| 223 | 'If the chassis has power, check presence of fan1.' |
| 224 | class: condition |
| 225 | condition: count |
| 226 | paths: chassis state |
| 227 | properties: chassis powered |
| 228 | callback: check fan1 presence |
| 229 | countop: '>' |
| 230 | countbound: 0 |
| 231 | op: '==' |
| 232 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 233 | |
| 234 | - name: check power fan1 functional |
| 235 | description: > |
| 236 | 'If the chassis has power, check functional of fan1.' |
| 237 | class: condition |
| 238 | condition: count |
| 239 | paths: chassis state |
| 240 | properties: chassis powered |
| 241 | callback: check fan1 functional |
| 242 | countop: '>' |
| 243 | countbound: 0 |
| 244 | op: '==' |
| 245 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 246 | |
| 247 | - name: check power fan2 presence |
| 248 | description: > |
| 249 | 'If the chassis has power, check presence of fan2.' |
| 250 | class: condition |
| 251 | condition: count |
| 252 | paths: chassis state |
| 253 | properties: chassis powered |
| 254 | callback: check fan2 presence |
| 255 | countop: '>' |
| 256 | countbound: 0 |
| 257 | op: '==' |
| 258 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 259 | |
| 260 | - name: check power fan2 functional |
| 261 | description: > |
| 262 | 'If the chassis has power, check functional of fan2.' |
| 263 | class: condition |
| 264 | condition: count |
| 265 | paths: chassis state |
| 266 | properties: chassis powered |
| 267 | callback: check fan2 functional |
| 268 | countop: '>' |
| 269 | countbound: 0 |
| 270 | op: '==' |
| 271 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 272 | |
| 273 | - name: check power fan3 presence |
| 274 | description: > |
| 275 | 'If the chassis has power, check presence of fan3.' |
| 276 | class: condition |
| 277 | condition: count |
| 278 | paths: chassis state |
| 279 | properties: chassis powered |
| 280 | callback: check fan3 presence |
| 281 | countop: '>' |
| 282 | countbound: 0 |
| 283 | op: '==' |
| 284 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 285 | |
| 286 | - name: check power fan3 functional |
| 287 | description: > |
| 288 | 'If the chassis has power, check functional of fan3.' |
| 289 | class: condition |
| 290 | condition: count |
| 291 | paths: chassis state |
| 292 | properties: chassis powered |
| 293 | callback: check fan3 functional |
| 294 | countop: '>' |
| 295 | countbound: 0 |
| 296 | op: '==' |
| 297 | bound: xyz.openbmc_project.State.Chassis.PowerState.On |
| 298 | |
| 299 | - name: check fans |
| 300 | description: > |
| 301 | 'Verify each of the 3 fans are present.' |
| 302 | class: callback |
| 303 | callback: group |
| 304 | members: |
| 305 | - check fan0 presence |
| 306 | - check fan1 presence |
| 307 | - check fan2 presence |
| 308 | - check fan3 presence |
| 309 | - check fan0 functional |
| 310 | - check fan1 functional |
| 311 | - check fan2 functional |
| 312 | - check fan3 functional |
| 313 | |
| 314 | - name: check fan0 presence |
| 315 | description: > |
| 316 | 'If this condition passes fan0 has been unplugged for more than 20 seconds.' |
| 317 | class: condition |
| 318 | condition: count |
| 319 | paths: fan0 |
| 320 | properties: fan present |
| 321 | defer: 20000000us |
| 322 | callback: notpresent fan0 error |
| 323 | countop: '<' |
| 324 | countbound: 1 |
| 325 | op: '==' |
| 326 | bound: true |
| 327 | |
| 328 | - name: check fan0 functional |
| 329 | description: > |
| 330 | 'If this condition passes fan0 has been marked as nonfunctional.' |
| 331 | class: condition |
| 332 | condition: count |
| 333 | paths: fan0 |
| 334 | properties: fan functional |
| 335 | callback: nonfunctional fan0 error |
| 336 | countop: '>' |
| 337 | countbound: 0 |
| 338 | op: '==' |
| 339 | bound: false |
| 340 | |
| 341 | - name: check fan1 presence |
| 342 | description: > |
| 343 | 'If this condition passes fan1 has been unplugged for more than 20 seconds. |
| 344 | Fan 1 is not in a water cooled Witherspoon, so check for cooling type |
| 345 | before creating an error.' |
| 346 | class: condition |
| 347 | condition: count |
| 348 | paths: fan1 |
| 349 | properties: fan present |
| 350 | defer: 20000000us |
| 351 | callback: check cooling type notpresent error |
| 352 | countop: '<' |
| 353 | countbound: 1 |
| 354 | op: '==' |
| 355 | bound: true |
| 356 | |
| 357 | - name: check fan1 functional |
| 358 | description: > |
| 359 | 'If this condition passes fan1 has been marked as nonfunctional. |
| 360 | Fan 1 is not in a water cooled Witherspoon, so check for cooling type |
| 361 | before creating an error.' |
| 362 | class: condition |
| 363 | condition: count |
| 364 | paths: fan1 |
| 365 | properties: fan functional |
| 366 | callback: check cooling type nonfunctional error |
| 367 | countop: '>' |
| 368 | countbound: 0 |
| 369 | op: '==' |
| 370 | bound: false |
| 371 | |
| 372 | - name: check fan2 presence |
| 373 | description: > |
| 374 | 'If this condition passes fan2 has been unplugged for more than 20 seconds.' |
| 375 | class: condition |
| 376 | condition: count |
| 377 | paths: fan2 |
| 378 | properties: fan present |
| 379 | defer: 20000000us |
| 380 | callback: notpresent fan2 error |
| 381 | countop: '<' |
| 382 | countbound: 1 |
| 383 | op: '==' |
| 384 | bound: true |
| 385 | |
| 386 | - name: check fan2 functional |
| 387 | description: > |
| 388 | 'If this condition passes fan2 has been marked as nonfunctional.' |
| 389 | class: condition |
| 390 | condition: count |
| 391 | paths: fan2 |
| 392 | properties: fan functional |
| 393 | callback: nonfunctional fan2 error |
| 394 | countop: '>' |
| 395 | countbound: 0 |
| 396 | op: '==' |
| 397 | bound: false |
| 398 | |
| 399 | - name: check fan3 presence |
| 400 | description: > |
| 401 | 'If this condition passes fan3 has been unplugged for more than 20 seconds.' |
| 402 | class: condition |
| 403 | condition: count |
| 404 | paths: fan3 |
| 405 | properties: fan present |
| 406 | defer: 20000000us |
| 407 | callback: notpresent fan3 error |
| 408 | countop: '<' |
| 409 | countbound: 1 |
| 410 | op: '==' |
| 411 | bound: true |
| 412 | |
| 413 | - name: check fan3 functional |
| 414 | description: > |
| 415 | 'If this condition passes fan3 has been marked as nonfunctional.' |
| 416 | class: condition |
| 417 | condition: count |
| 418 | paths: fan3 |
| 419 | properties: fan functional |
| 420 | callback: nonfunctional fan3 error |
| 421 | countop: '>' |
| 422 | countbound: 0 |
| 423 | op: '==' |
| 424 | bound: false |
| 425 | |
| 426 | - name: check cooling type nonfunctional error |
| 427 | description: > |
| 428 | 'If this condition passes the chassis is air cooled and will create a |
| 429 | nonfunctional error for fan 1.' |
| 430 | class: condition |
| 431 | condition: count |
| 432 | paths: chassis |
| 433 | properties: chassis air cooled |
| 434 | callback: nonfunctional fan1 error |
| 435 | countop: '==' |
| 436 | countbound: 0 |
| 437 | op: '==' |
| 438 | bound: true |
| 439 | |
| 440 | - name: check cooling type notpresent error |
| 441 | description: > |
| 442 | 'If this condition passes the chassis is air cooled and will create a |
| 443 | notpresent error for fan 1.' |
| 444 | class: condition |
| 445 | condition: count |
| 446 | paths: chassis |
| 447 | properties: chassis air cooled |
| 448 | callback: notpresent fan1 error |
| 449 | countop: '==' |
| 450 | countbound: 0 |
| 451 | op: '==' |
| 452 | bound: true |
| 453 | |
| 454 | - name: notpresent fan0 error |
| 455 | class: callback |
| 456 | callback: elog |
| 457 | paths: fan0 |
| 458 | properties: fan present |
| 459 | error: xyz::openbmc_project::Inventory::Error::NotPresent |
| 460 | metadata: |
| 461 | - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH |
| 462 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0 |
| 463 | type: string |
| 464 | |
| 465 | - name: nonfunctional fan0 error |
| 466 | class: callback |
| 467 | callback: elog |
| 468 | paths: fan0 |
| 469 | properties: fan functional |
| 470 | error: xyz::openbmc_project::Inventory::Error::Nonfunctional |
| 471 | metadata: |
| 472 | - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH |
| 473 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0 |
| 474 | type: string |
| 475 | |
| 476 | - name: notpresent fan1 error |
| 477 | class: callback |
| 478 | callback: elog |
| 479 | paths: fan1 |
| 480 | properties: fan present |
| 481 | error: xyz::openbmc_project::Inventory::Error::NotPresent |
| 482 | metadata: |
| 483 | - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH |
| 484 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1 |
| 485 | type: string |
| 486 | |
| 487 | - name: nonfunctional fan1 error |
| 488 | class: callback |
| 489 | callback: elog |
| 490 | paths: fan1 |
| 491 | properties: fan functional |
| 492 | error: xyz::openbmc_project::Inventory::Error::Nonfunctional |
| 493 | metadata: |
| 494 | - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH |
| 495 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1 |
| 496 | type: string |
| 497 | |
| 498 | - name: notpresent fan2 error |
| 499 | class: callback |
| 500 | callback: elog |
| 501 | paths: fan2 |
| 502 | properties: fan present |
| 503 | error: xyz::openbmc_project::Inventory::Error::NotPresent |
| 504 | metadata: |
| 505 | - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH |
| 506 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2 |
| 507 | type: string |
| 508 | |
| 509 | - name: nonfunctional fan2 error |
| 510 | class: callback |
| 511 | callback: elog |
| 512 | paths: fan2 |
| 513 | properties: fan functional |
| 514 | error: xyz::openbmc_project::Inventory::Error::Nonfunctional |
| 515 | metadata: |
| 516 | - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH |
| 517 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2 |
| 518 | type: string |
| 519 | |
| 520 | - name: notpresent fan3 error |
| 521 | class: callback |
| 522 | callback: elog |
| 523 | paths: fan3 |
| 524 | properties: fan present |
| 525 | error: xyz::openbmc_project::Inventory::Error::NotPresent |
| 526 | metadata: |
| 527 | - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH |
| 528 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3 |
| 529 | type: string |
| 530 | |
| 531 | - name: nonfunctional fan3 error |
| 532 | class: callback |
| 533 | callback: elog |
| 534 | paths: fan3 |
| 535 | properties: fan functional |
| 536 | error: xyz::openbmc_project::Inventory::Error::Nonfunctional |
| 537 | metadata: |
| 538 | - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH |
| 539 | value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3 |
| 540 | type: string |
| 541 | |