Project

General

Profile

Actions

Feature #8967

closed

libipmi: add support for GET_CHASSIS_STATUS command

Added by Rob Johnston over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2018-01-16
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

In order to facilitate adding the chassis identify indicator to the topo snapshot, we need to be able to call both the CHASSIS_IDENTIFY IPMI command (to set the indicator state) and the GET_CHASSIS_STATUS (to get the current indicator state). Libipmi currently doesn't provide an interface for calling the GET_CHASSIS_STATUS command. This CR is to add such an interface.

Actions #1

Updated by Rob Johnston over 3 years ago

Manual Testing

I wrote a utility to get/set the state of the chassis identify indicator using the libipmi interface that's being added by this CR. The source for the utility is available here:

https://github.com/rejohnst/illumos-toolbox/tree/master/ipmi/chassis-ident

The results were captured below.

[root@lava /var/tmp/fma-altroot]# ../chassis-ident -m get
chassis identify is off
[root@lava /var/tmp/fma-altroot]# usr/lib/fm/fmd/fmtopo -R /var/tmp/fma-altroot -V "*chassis=0?indicator=locate" 
TIME UUID
Dec 07 19:05:13 c157871e-fac5-66f0-fb1a-cba01c5b7acc

hc://:product-id=SSG-2028R-ACR24L:server-id=lava:chassis-id=S194308X7333203/chassis=0?indicator=locate
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=SSG-2028R-ACR24L:server-id=lava:chassis-id=S194308X7333203/chassis=0?indicator=locate
group: authority version: 1 stability: Private/Private
product-id string SSG-2028R-ACR24L
chassis-id string S194308X7333203
server-id string lava
group: facility version: 1 stability: Private/Private
mode uint32 0x0 (OFF)
type uint32 0x1 (LOCATE)

[root@lava /var/tmp/fma-altroot]# ../chassis-ident -m on
chassis identify is on
[root@lava /var/tmp/fma-altroot]# ../chassis-ident -m getchassis identify is on
[root@lava /var/tmp/fma-altroot]# usr/lib/fm/fmd/fmtopo -R /var/tmp/fma-altroot -V "*chassis=0?indicator=locate" 
TIME UUID
Dec 07 19:05:30 6b5163a3-5b0e-4f64-d237-b60306087e03

hc://:product-id=SSG-2028R-ACR24L:server-id=lava:chassis-id=S194308X7333203/chassis=0?indicator=locate
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=SSG-2028R-ACR24L:server-id=lava:chassis-id=S194308X7333203/chassis=0?indicator=locate
group: authority version: 1 stability: Private/Private
product-id string SSG-2028R-ACR24L
chassis-id string S194308X7333203
server-id string lava
group: facility version: 1 stability: Private/Private
mode uint32 0x1 (ON)
type uint32 0x1 (LOCATE)

[root@lava /var/tmp/fma-altroot]# ../chassis-ident -m off
chassis identify is off
[root@lava /var/tmp/fma-altroot]# ../chassis-ident -m get
chassis identify is off
[root@lava /var/tmp/fma-altroot]# usr/lib/fm/fmd/fmtopo -R /var/tmp/fma-altroot -V "*chassis=0?indicator=locate" 
TIME UUID
Dec 07 19:05:44 fc03718b-a556-6f69-9140-d1a337240aeb

hc://:product-id=SSG-2028R-ACR24L:server-id=lava:chassis-id=S194308X7333203/chassis=0?indicator=locate
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=SSG-2028R-ACR24L:server-id=lava:chassis-id=S194308X7333203/chassis=0?indicator=locate
group: authority version: 1 stability: Private/Private
product-id string SSG-2028R-ACR24L
chassis-id string S194308X7333203
server-id string lava
group: facility version: 1 stability: Private/Private
mode uint32 0x0 (OFF)
type uint32 0x1 (LOCATE)

I also physically verified that the expected LEDs turn on/off on one of the SF lab systems (lava).

Finally, I cross-referenced what the tool reported with ident state induced via ipmitool:

[root@lava /var/tmp/fma-altroot]# ipmitool chassis identify
Chassis identify interval: default (15 seconds)

[root@lava /var/tmp/fma-altroot]# ../chassis-ident -m get
chassis identify is on

[wait 15 seconds ...]

[root@lava /var/tmp/fma-altroot]# ../chassis-ident -m get
chassis identify is off
Actions #2

Updated by Electric Monk over 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 8f022dd6c1ebe3edc269726bf537617e665df32f

commit  8f022dd6c1ebe3edc269726bf537617e665df32f
Author: Rob Johnston <rob.johnston@joyent.com>
Date:   2018-01-23T21:33:23.000Z

    8967 libipmi: add support for GET_CHASSIS_STATUS command
    8974 fac_prov_ipmi should support binding by entity id and instance
    8975 ipmi topo plugin should automatically enumerate sensors on nodes it enumerates
    8976 ipmi enumerator should include FRU identity information in FMRI authority
    8977 ipmi enumerator doesn't always enumerate nested entities
    8978 Add topo facility method for controlling chassis ident indicator
    Reviewed by: Yuri Pankov <yuripv@icloud.com>
    Reviewed by: Ben Sims <bensims@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF