Project

General

Profile

Feature #11576

Want support for ahci LED entries in topo

Added by Robert Mustacchi 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

9815 introduced support for basic AHCI enclosure services. This allows the control of LEDS for various AHCI backed devices; however, it is not usable from the context of a topo snapshot. Prior art for this exists in the form of 4018 and 4019 for mpt_sas. We should create something similar that can be used to manage bays plugged into an ahci controller based on the controller /devices path and the bay number.

~~

Summary:

This change adds a facility provider module for AHCI facility nodes as exposed in libtopo. This allows users to read the state of these LEDs using fmtopo, as well as turn them on and off. We support "locate" and "fault" LEDs for AHCI (activity LEDs are typically disabled in hardware).

Additionally, this change updates the topology map for the SSG-2029P-ACR24L system such that the new facility provider module for AHCI LEDs is called for these facility nodes.
Testing Notes:
Manual Testing using `fmtopo`

I tested reading the state of AHCI ident and fault LEDs on sky1 in the SF eng lab, as well as toggling these LEDs, using `fmtopo` (and verifying by looking at the physical LEDs and using `ahciem`). The bays with AHCI on sky1 are bays 24 and 25.

Setup for manual testing:
Prior to having a build to boot sky1 onto, I iterated on my changes by mounting the modified topo map and new plugin shared object over the system ones:

# mount -O -F lofs /var/tmp/jordan/SSG-2029P-ACR24L-disk-hc-topology.xml /usr/platform/i86pc/lib/fm/topo/maps/SSG-2029P-ACR24L-disk-hc-topology.xml
# cd /var/tmp/jordan
[root@sky1 /var/tmp/jordan]# cp /usr/lib/fm/topo/plugins/* plugins/
[root@sky1 /var/tmp/jordan]# cp fac_prov_ahci.so plugins/
[root@sky1 /var/tmp/jordan]# mount -O -F lofs $PWD/plugins /usr/lib/fm/topo/plugins

Reading LED state using `fmtopo -V`:

Below you can see the two facility nodes for Bay 24, and their state (both off).

[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24*
TIME                 UUID
Nov 30 22:31:26 353a559f-0942-ccdd-a673-a0c9b9140c1a

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24
    label             string    Rear Disk 0
    FRU               fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: system                         version: 1   stability: Private/Private
    isa               string    i386
    machine           string    i86pc
  group: io                             version: 1   stability: Private/Private
    ap-path           string    /devices/pci@0,0/pci15d9,981@11,5:4
  group: binding                        version: 1   stability: Private/Private
    occupant-path     string    /pci@0,0/pci15d9,981@11,5/disk@4,0
    devctl            string    /devices/pci@0,0/pci15d9,981@11,5:devctl
    port              uint32    0x4

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x0 (SERVICE)

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x1 (LOCATE)

We repeat this test again for bay 25:

[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25*
TIME                 UUID
Nov 30 22:36:55 049f4d54-fa43-c4b5-9e74-f78424e2a554

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25
    label             string    Rear Disk 1
    FRU               fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: system                         version: 1   stability: Private/Private
    isa               string    i386
    machine           string    i86pc
  group: io                             version: 1   stability: Private/Private
    ap-path           string    /devices/pci@0,0/pci15d9,981@11,5:5
  group: binding                        version: 1   stability: Private/Private
    occupant-path     string    /pci@0,0/pci15d9,981@11,5/disk@5,0
    devctl            string    /devices/pci@0,0/pci15d9,981@11,5:devctl
    port              uint32    0x5

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x0 (SERVICE)

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x1 (LOCATE)

We can sanity check these states are correct using ahciem:

[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              default      ident,fault,default
ahci1/5              default      ident,fault,default

We see that all ports report the "default" state, which matches what we see with `fmtopo` – they are off.
Setting LED state using `fmtopo`

Now we can try a variety of cases of setting the state of the LED using `fmtopo`, and verify that matches what ahciem sees. I also verified that the physical LED was on.
Turning individual LEDs on/off

Here we toggle the Bay 24 "ident" LED and verify its state:

# turn LED on
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
TIME                 UUID
Nov 30 22:45:35 af572b60-baab-ed0c-ddb6-f7d1f2955894

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
TIME                 UUID
Nov 30 22:45:57 2a8e3cfc-f451-48b5-f54c-d417ec8b3e7d

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)
    type              uint32    0x1 (LOCATE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              ident        ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              ident        ident,fault,default
ahci1/5              default      ident,fault,default

# turn LED off
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:0 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
TIME                 UUID
Nov 30 22:46:14 5483b8ba-17bb-4e3b-97a5-a7073cba88da

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
TIME                 UUID
Nov 30 22:46:21 a8af1f0e-6e09-4445-f524-e834e5120446

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x1 (LOCATE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              default      ident,fault,default
ahci1/5              default      ident,fault,default

Here we toggle the Bay 24 "fail" LED and verify its state:

# turn LED on
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
TIME                 UUID
Nov 30 22:48:13 837acfa5-3ec7-42aa-c023-ba4f47055ccf

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
TIME                 UUID
Nov 30 22:48:25 a970a547-c22d-ce6b-aec8-b82011ef3b48

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)
    type              uint32    0x0 (SERVICE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              fault        ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              fault        ident,fault,default
ahci1/5              default      ident,fault,default

# turn LED off
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:0 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
TIME                 UUID
Nov 30 22:48:44 35326dfe-638e-cefd-8c06-cc3e875eb012

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
TIME                 UUID
Nov 30 22:48:50 277955d8-4783-64d1-b426-f448d94ff407

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x0 (SERVICE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              default      ident,fault,default
ahci1/5              default      ident,fault,default

Here we toggle the Bay 25 "ident" LED and verify its state:

# turn LED on
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
TIME                 UUID
Nov 30 22:50:20 9c8675bd-1ad6-e0d1-fb87-9bcf4eded1ac

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
TIME                 UUID
Nov 30 22:50:35 38f7c3b5-95f7-cb3d-b85e-8460194b4d15

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)
    type              uint32    0x1 (LOCATE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              ident        ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              default      ident,fault,default
ahci1/5              ident        ident,fault,default

# turn LED off
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:0 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
TIME                 UUID
Nov 30 22:50:46 15a7743c-eb6f-64bc-f296-eaeb5eceacbe

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
TIME                 UUID
Nov 30 22:50:52 2eca212e-94b2-e05c-c5cf-e12d6e775069

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x1 (LOCATE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              default      ident,fault,default
ahci1/5              default      ident,fault,default

Here we toggle the Bay 25 "fail" LED and verify its state:

# turn LED on
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
TIME                 UUID
Nov 30 22:52:06 17f97b06-2d80-cbe5-b561-9bc2357e9688

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
TIME                 UUID
Nov 30 22:52:17 1baf261d-d63b-6e9f-c1bd-b42dd8946404

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)
    type              uint32    0x0 (SERVICE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              fault        ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              default      ident,fault,default
ahci1/5              fault        ident,fault,default

# turn LED off
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:0 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
TIME                 UUID
Nov 30 22:52:29 bb275ef4-6f55-4d94-dbd2-e0e9cc153674

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)

# read LED state
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
TIME                 UUID
Nov 30 22:52:36 081d3b47-1050-6844-89ae-8a176d7ba19c

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x0 (OFF)
    type              uint32    0x0 (SERVICE)

# double check using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              default      ident,fault,default
ahci1/5              default      ident,fault,default

Turning LEDs on for > 1 bay

Here we turn on one LED for each bay and verify the state:

# turn both ident LEDs on
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
TIME                 UUID
Nov 30 23:02:08 066abb88-9efa-6280-dd9c-b3db5bb6c0ee

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
TIME                 UUID
Nov 30 23:02:15 484c6350-8ea7-c940-d902-8eb972460769

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# double check with ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              ident        ident,fault,default
ahci0/5              ident        ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              ident        ident,fault,default
ahci1/5              ident        ident,fault,default

Turning multiple LEDs on for the same bay

AHCI supports multiple logical LEDs for the same controller, so I verified that turning on both "fail" and "ident" LEDs for the same bay works.

Bay 24:

# turn on ident LED
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
TIME                 UUID
Nov 30 23:04:33 90ab16fe-9465-e73e-adb5-b36092997c31

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# turn on fail LED
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
TIME                 UUID
Nov 30 23:04:39 21579a2f-d2ba-4278-e964-f6531a8ed6c9

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# read state of LEDs (both are on)
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=*
TIME                 UUID
Nov 30 23:04:52 d64c7aae-cd2c-4734-956b-d65d5343d0e8

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=fail
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)
    type              uint32    0x0 (SERVICE)

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=24?indicator=ident
  group: authority                      version: 1   stability: Private/Private
    product-id        string    Joyent-M12G5
    chassis-id        string    S287109X8231992
    server-id         string    sky1
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)
    type              uint32    0x1 (LOCATE)

# double check that both are on using ahciem
[root@sky1 ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              ident,fault  ident,fault,default
ahci0/5              default      ident,fault,default
ahci1/0              default      ident,fault,default
ahci1/1              default      ident,fault,default
ahci1/2              default      ident,fault,default
ahci1/3              default      ident,fault,default
ahci1/4              ident,fault  ident,fault,default
ahci1/5              default      ident,fault,default

Bay 25:

# turn ident LED on
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
    TIME                 UUID
Nov 30 23:08:38 1ea321a7-99a2-eec3-8a0d-b37c0b3a7bbb

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=ident
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# turn fail LED on
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -P facility.mode=uint32:1 hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
TIME                 UUID
Nov 30 23:08:45 dce622ca-4f39-e55f-cdec-d187f87e3a18

hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=fail
  group: facility                       version: 1   stability: Private/Private
    mode              uint32    0x1 (ON)

# read state of LEDs (both are on)
[root@sky1 ~]# /usr/lib/fm/fmd/fmtopo -V hc://:product-id=Joyent-M12G5:server-id=sky1:chassis-id=S287109X8231992/chassis=0/bay=25?indicator=*
TIME                 UUID
Nov 30 23:09:02 5e12a4b2-635f-443b-b4c2-9aae36db16f5

Related issues

Related to illumos gate - Feature #9815: Want basic AHCI enclosure servicesClosed2018-09-09

Actions
Related to illumos gate - Feature #4018: mpt_sas: allow physical topology enumeration in libtopoResolved2013-08-08

Actions
Related to illumos gate - Feature #4019: mpt_sas: expose LED controls to libtopoResolved2013-08-08

Actions

History

#1

Updated by Robert Mustacchi 4 months ago

  • Subject changed from Want support ahci LED entries in topo to Want support for ahci LED entries in topo
#2

Updated by Robert Mustacchi 4 months ago

  • Related to Feature #9815: Want basic AHCI enclosure services added
#3

Updated by Robert Mustacchi 4 months ago

  • Related to Feature #4018: mpt_sas: allow physical topology enumeration in libtopo added
#4

Updated by Robert Mustacchi 4 months ago

  • Related to Feature #4019: mpt_sas: expose LED controls to libtopo added
#5

Updated by Electric Monk 3 months ago

  • Status changed from New to Closed

git commit e2f631f93662311389118b220daa637b16a612ac

commit  e2f631f93662311389118b220daa637b16a612ac
Author: Jordan Paige Hendricks <jordan.hendricks@joyent.com>
Date:   2019-08-28T17:49:57.000Z

    11576 Want support for ahci LED entries in topo
    Reviewed by: Rob Johnston <rob.johnston@joyent.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF