blob: 794d91f1735582a0dd7c71e46970801fc73114c7 [file] [log] [blame]
Matthew Barthfd06a2c2019-06-12 12:31:30 -05001# Swift 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.
5# * Create a Nonfunctional error if fan 0, 1, 2, or 3 is not
6# functional for any amount of time.
7#
8# The system must be powered on in both of these cases.
9# Note: An error is created each time the chassis powers on.
10#
11# * Watch for fans to become both present and functional, and then resolve
12# their errors
13
14- name: fan0
15 class: group
16 group: path
17 members:
18 - meta: FAN
19 path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0
20
21- name: fan1
22 class: group
23 group: path
24 members:
25 - meta: FAN
26 path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1
27
28- name: fan2
29 class: group
30 group: path
31 members:
32 - meta: FAN
33 path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2
34
35- name: fan3
36 class: group
37 group: path
38 members:
39 - meta: FAN
40 path: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3
41
42- name: chassis state
43 description: >
44 'Swift has a single chassis to monitor.'
45 class: group
46 group: path
47 members:
48 - meta: CHASSISSTATE
49 path: /xyz/openbmc_project/state/chassis0
50
51- name: chassis
52 description: >
53 'Swift has a single chassis to monitor.'
54 class: group
55 group: path
56 members:
57 - meta: CHASSIS
58 path: /xyz/openbmc_project/inventory/system/chassis
59
60
61- name: fan present
62 description: >
63 'Monitor the presence state of each fan.'
64 class: group
65 group: property
66 type: boolean
67 members:
68 - interface: xyz.openbmc_project.Inventory.Item
69 meta: PRESENT
70 property: Present
71
72- name: fan functional
73 description: >
74 'Monitor the functional state of each fan.'
75 class: group
76 group: property
77 type: boolean
78 members:
79 - interface: xyz.openbmc_project.State.Decorator.OperationalStatus
80 meta: FUNCTIONAL
81 property: Functional
82
83- name: fan present and functional
84 description: >
85 'Monitor the present and functional state of each fan.'
86 class: group
87 group: property
88 type: boolean
89 members:
90 - interface: xyz.openbmc_project.Inventory.Item
91 meta: PRESENT
92 property: Present
93 - interface: xyz.openbmc_project.State.Decorator.OperationalStatus
94 meta: FUNCTIONAL
95 property: Functional
96
97- name: chassis powered
98 description: >
99 'Monitor the chassis power state.'
100 class: group
101 group: property
102 type: string
103 members:
104 - interface: xyz.openbmc_project.State.Chassis
105 meta: CHASSIS_STATE
106 property: CurrentPowerState
107
108- name: chassis air cooled
109 description: >
110 'The chassis cooling type.'
111 class: group
112 group: property
113 type: boolean
114 members:
115 - interface: xyz.openbmc_project.Inventory.Decorator.CoolingType
116 meta: COOLING_TYPE
117 property: WaterCooled
118
119- name: watch chassis state
120 description: >
121 'Trigger logic on chassis power state changes.'
122 class: watch
123 watch: property
124 paths: chassis state
125 properties: chassis powered
126 callback: check power
127
128- name: watch fan0 presence
129 description: >
130 'Trigger logic on fan0 presence state changes.'
131 class: watch
132 watch: property
133 paths: fan0
134 properties: fan present
135 callback: check power fan0 presence
136
137- name: watch fan0 functional
138 description: >
139 'Trigger logic on fan0 functional state changes.'
140 class: watch
141 watch: property
142 paths: fan0
143 properties: fan functional
144 callback: check power fan0 functional
145
146- name: watch fan1 presence
147 description: >
148 'Trigger logic on fan1 presence state changes.'
149 class: watch
150 watch: property
151 paths: fan1
152 properties: fan present
153 callback: check power fan1 presence
154
155- name: watch fan1 functional
156 description: >
157 'Trigger logic on fan1 functional state changes.'
158 class: watch
159 watch: property
160 paths: fan1
161 properties: fan functional
162 callback: check power fan1 functional
163
164- name: watch fan2 presence
165 description: >
166 'Trigger logic on fan2 presence state changes.'
167 class: watch
168 watch: property
169 paths: fan2
170 properties: fan present
171 callback: check power fan2 presence
172
173- name: watch fan2 functional
174 description: >
175 'Trigger logic on fan2 functional state changes.'
176 class: watch
177 watch: property
178 paths: fan2
179 properties: fan functional
180 callback: check power fan2 functional
181
182- name: watch fan3 presence
183 description: >
184 'Trigger logic on fan3 presence state changes.'
185 class: watch
186 watch: property
187 paths: fan3
188 properties: fan present
189 callback: check power fan3 presence
190
191- name: watch fan3 functional
192 description: >
193 'Trigger logic on fan3 functional state changes.'
194 class: watch
195 watch: property
196 paths: fan3
197 properties: fan functional
198 callback: check power fan3 functional
199
200- name: watch fan0 present and functional for resolving error logs
201 description: >
202 'On fan present or functional state changes, check if errors need to be resolved.'
203 class: watch
204 watch: property
205 paths: fan0
206 properties: fan present and functional
207 callback: resolve fan0 errors if present and functional
208
209- name: watch fan1 present and functional for resolving error logs
210 description: >
211 'On fan present or functional state changes, check if errors need to be resolved.'
212 class: watch
213 watch: property
214 paths: fan1
215 properties: fan present and functional
216 callback: resolve fan1 errors if present and functional
217
218- name: watch fan2 present and functional for resolving error logs
219 description: >
220 'On fan present or functional state changes, check if errors need to be resolved.'
221 class: watch
222 watch: property
223 paths: fan2
224 properties: fan present and functional
225 callback: resolve fan2 errors if present and functional
226
227- name: watch fan3 present and functional for resolving error logs
228 description: >
229 'On fan present or functional state changes, check if errors need to be resolved.'
230 class: watch
231 watch: property
232 paths: fan3
233 properties: fan present and functional
234 callback: resolve fan3 errors if present and functional
235
236- name: check power
237 description: >
238 'If the chassis has power, check all fans.'
239 class: condition
240 condition: count
241 paths: chassis state
242 properties: chassis powered
243 callback: check fans
244 countop: '>'
245 countbound: 0
246 op: '=='
247 bound: xyz.openbmc_project.State.Chassis.PowerState.On
248
249- name: check power fan0 presence
250 description: >
251 'If the chassis has power, check presence of fan0.'
252 class: condition
253 condition: count
254 paths: chassis state
255 properties: chassis powered
256 callback: check fan0 presence
257 countop: '>'
258 countbound: 0
259 op: '=='
260 bound: xyz.openbmc_project.State.Chassis.PowerState.On
261
262- name: check power fan0 functional
263 description: >
264 'If the chassis has power, check functional of fan0.'
265 class: condition
266 condition: count
267 paths: chassis state
268 properties: chassis powered
269 callback: check fan0 functional
270 countop: '>'
271 countbound: 0
272 op: '=='
273 bound: xyz.openbmc_project.State.Chassis.PowerState.On
274
275- name: check power fan1 presence
276 description: >
277 'If the chassis has power, check presence of fan1.'
278 class: condition
279 condition: count
280 paths: chassis state
281 properties: chassis powered
282 callback: check fan1 presence
283 countop: '>'
284 countbound: 0
285 op: '=='
286 bound: xyz.openbmc_project.State.Chassis.PowerState.On
287
288- name: check power fan1 functional
289 description: >
290 'If the chassis has power, check functional of fan1.'
291 class: condition
292 condition: count
293 paths: chassis state
294 properties: chassis powered
295 callback: check fan1 functional
296 countop: '>'
297 countbound: 0
298 op: '=='
299 bound: xyz.openbmc_project.State.Chassis.PowerState.On
300
301- name: check power fan2 presence
302 description: >
303 'If the chassis has power, check presence of fan2.'
304 class: condition
305 condition: count
306 paths: chassis state
307 properties: chassis powered
308 callback: check fan2 presence
309 countop: '>'
310 countbound: 0
311 op: '=='
312 bound: xyz.openbmc_project.State.Chassis.PowerState.On
313
314- name: check power fan2 functional
315 description: >
316 'If the chassis has power, check functional of fan2.'
317 class: condition
318 condition: count
319 paths: chassis state
320 properties: chassis powered
321 callback: check fan2 functional
322 countop: '>'
323 countbound: 0
324 op: '=='
325 bound: xyz.openbmc_project.State.Chassis.PowerState.On
326
327- name: check power fan3 presence
328 description: >
329 'If the chassis has power, check presence of fan3.'
330 class: condition
331 condition: count
332 paths: chassis state
333 properties: chassis powered
334 callback: check fan3 presence
335 countop: '>'
336 countbound: 0
337 op: '=='
338 bound: xyz.openbmc_project.State.Chassis.PowerState.On
339
340- name: check power fan3 functional
341 description: >
342 'If the chassis has power, check functional of fan3.'
343 class: condition
344 condition: count
345 paths: chassis state
346 properties: chassis powered
347 callback: check fan3 functional
348 countop: '>'
349 countbound: 0
350 op: '=='
351 bound: xyz.openbmc_project.State.Chassis.PowerState.On
352
353- name: check fans
354 description: >
355 'Verify each of the 3 fans are present.'
356 class: callback
357 callback: group
358 members:
359 - check fan0 presence
360 - check fan1 presence
361 - check fan2 presence
362 - check fan3 presence
363 - check fan0 functional
364 - check fan1 functional
365 - check fan2 functional
366 - check fan3 functional
367
368- name: check fan0 presence
369 description: >
370 'If this condition passes fan0 has been unplugged for more than 20 seconds.'
371 class: condition
372 condition: count
373 paths: fan0
374 properties: fan present
375 defer: 20000000us
376 callback: notpresent fan0 error
377 countop: '<'
378 countbound: 1
379 op: '=='
380 bound: true
381
382- name: check fan0 functional
383 description: >
384 'If this condition passes fan0 has been marked as nonfunctional.'
385 class: condition
386 condition: count
387 paths: fan0
388 properties: fan functional
389 callback: nonfunctional fan0 error
390 countop: '>'
391 countbound: 0
392 op: '=='
393 bound: false
394
395- name: check fan1 presence
396 description: >
397 'If this condition passes fan1 has been unplugged for more than 20 seconds.'
398 class: condition
399 condition: count
400 paths: fan1
401 properties: fan present
402 defer: 20000000us
403 callback: notpresent fan1 error
404 countop: '<'
405 countbound: 1
406 op: '=='
407 bound: true
408
409- name: check fan1 functional
410 description: >
411 'If this condition passes fan1 has been marked as nonfunctional.'
412 class: condition
413 condition: count
414 paths: fan1
415 properties: fan functional
416 callback: nonfunctional fan1 error
417 countop: '>'
418 countbound: 0
419 op: '=='
420 bound: false
421
422- name: check fan2 presence
423 description: >
424 'If this condition passes fan2 has been unplugged for more than 20 seconds.'
425 class: condition
426 condition: count
427 paths: fan2
428 properties: fan present
429 defer: 20000000us
430 callback: notpresent fan2 error
431 countop: '<'
432 countbound: 1
433 op: '=='
434 bound: true
435
436- name: check fan2 functional
437 description: >
438 'If this condition passes fan2 has been marked as nonfunctional.'
439 class: condition
440 condition: count
441 paths: fan2
442 properties: fan functional
443 callback: nonfunctional fan2 error
444 countop: '>'
445 countbound: 0
446 op: '=='
447 bound: false
448
449- name: check fan3 presence
450 description: >
451 'If this condition passes fan3 has been unplugged for more than 20 seconds.'
452 class: condition
453 condition: count
454 paths: fan3
455 properties: fan present
456 defer: 20000000us
457 callback: notpresent fan3 error
458 countop: '<'
459 countbound: 1
460 op: '=='
461 bound: true
462
463- name: check fan3 functional
464 description: >
465 'If this condition passes fan3 has been marked as nonfunctional.'
466 class: condition
467 condition: count
468 paths: fan3
469 properties: fan functional
470 callback: nonfunctional fan3 error
471 countop: '>'
472 countbound: 0
473 op: '=='
474 bound: false
475
476- name: check cooling type nonfunctional error
477 description: >
478 'If this condition passes the chassis is air cooled and will create a
479 nonfunctional error for fan 1.'
480 class: condition
481 condition: count
482 paths: chassis
483 properties: chassis air cooled
484 callback: nonfunctional fan1 error
485 countop: '=='
486 countbound: 0
487 op: '=='
488 bound: true
489
490- name: check cooling type notpresent error
491 description: >
492 'If this condition passes the chassis is air cooled and will create a
493 notpresent error for fan 1.'
494 class: condition
495 condition: count
496 paths: chassis
497 properties: chassis air cooled
498 callback: notpresent fan1 error
499 countop: '=='
500 countbound: 0
501 op: '=='
502 bound: true
503
504- name: notpresent fan0 error
505 class: callback
506 callback: elog
507 paths: fan0
508 properties: fan present
509 error: xyz::openbmc_project::Inventory::Error::NotPresent
510 metadata:
511 - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
512 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0
513 type: string
514
515- name: nonfunctional fan0 error
516 class: callback
517 callback: elog
518 paths: fan0
519 properties: fan functional
520 error: xyz::openbmc_project::Inventory::Error::Nonfunctional
521 metadata:
522 - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH
523 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0
524 type: string
525
526- name: notpresent fan1 error
527 class: callback
528 callback: elog
529 paths: fan1
530 properties: fan present
531 error: xyz::openbmc_project::Inventory::Error::NotPresent
532 metadata:
533 - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
534 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1
535 type: string
536
537- name: nonfunctional fan1 error
538 class: callback
539 callback: elog
540 paths: fan1
541 properties: fan functional
542 error: xyz::openbmc_project::Inventory::Error::Nonfunctional
543 metadata:
544 - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH
545 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1
546 type: string
547
548- name: notpresent fan2 error
549 class: callback
550 callback: elog
551 paths: fan2
552 properties: fan present
553 error: xyz::openbmc_project::Inventory::Error::NotPresent
554 metadata:
555 - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
556 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2
557 type: string
558
559- name: nonfunctional fan2 error
560 class: callback
561 callback: elog
562 paths: fan2
563 properties: fan functional
564 error: xyz::openbmc_project::Inventory::Error::Nonfunctional
565 metadata:
566 - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH
567 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2
568 type: string
569
570- name: notpresent fan3 error
571 class: callback
572 callback: elog
573 paths: fan3
574 properties: fan present
575 error: xyz::openbmc_project::Inventory::Error::NotPresent
576 metadata:
577 - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
578 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3
579 type: string
580
581- name: nonfunctional fan3 error
582 class: callback
583 callback: elog
584 paths: fan3
585 properties: fan functional
586 error: xyz::openbmc_project::Inventory::Error::Nonfunctional
587 metadata:
588 - name: xyz::openbmc_project::Inventory::Nonfunctional::CALLOUT_INVENTORY_PATH
589 value: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3
590 type: string
591
592- name: resolve fan0 errors if present and functional
593 description: >
594 'If fan0 is present and functional, call the resolve fan0 errors callback.'
595 class: condition
596 condition: count
597 paths: fan0
598 properties: fan present and functional
599 callback: resolve fan0 errors
600 countop: '=='
601 countbound: 2
602 op: '=='
603 bound: true
604
605#Go ahead and do this on water cooled as well
606- name: resolve fan1 errors if present and functional
607 description: >
608 'If fan1 is present and functional, call the resolve fan1 errors callback.'
609 class: condition
610 condition: count
611 paths: fan1
612 properties: fan present and functional
613 callback: resolve fan1 errors
614 countop: '=='
615 countbound: 2
616 op: '=='
617 bound: true
618
619- name: resolve fan2 errors if present and functional
620 description: >
621 'If fan2 is present and functional, call the resolve fan2 errors callback.'
622 class: condition
623 condition: count
624 paths: fan2
625 properties: fan present and functional
626 callback: resolve fan2 errors
627 countop: '=='
628 countbound: 2
629 op: '=='
630 bound: true
631
632- name: resolve fan3 errors if present and functional
633 description: >
634 'If fan3 is present and functional, call the resolve fan3 errors callback.'
635 class: condition
636 condition: count
637 paths: fan3
638 properties: fan present and functional
639 callback: resolve fan3 errors
640 countop: '=='
641 countbound: 2
642 op: '=='
643 bound: true
644
645- name: resolve fan0 errors
646 class: callback
647 callback: resolve callout
648 paths: fan0
649 properties: fan present and functional
650 callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0
651
652- name: resolve fan1 errors
653 class: callback
654 callback: resolve callout
655 paths: fan1
656 properties: fan present and functional
657 callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1
658
659- name: resolve fan2 errors
660 class: callback
661 callback: resolve callout
662 paths: fan2
663 properties: fan present and functional
664 callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2
665
666- name: resolve fan3 errors
667 class: callback
668 callback: resolve callout
669 paths: fan3
670 properties: fan present and functional
671 callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3