Skip to content

[inventory] Modify reporting on services per sled agent#9977

Open
karencfv wants to merge 16 commits intooxidecomputer:mainfrom
karencfv:svcs-include-state
Open

[inventory] Modify reporting on services per sled agent#9977
karencfv wants to merge 16 commits intooxidecomputer:mainfrom
karencfv:svcs-include-state

Conversation

@karencfv
Copy link
Contributor

@karencfv karencfv commented Mar 5, 2026

As per #9876 , each sled agent should report on the state of any services that are enabled but not running. This basically means all services in any state other than "online" or "disabled".

$ curl -H "api-version: 25.0.0"  http://[::1]:41139/inventory | jq
<...>
  "smf_services_enabled_not_online": {
    "ok": {
      "services": [
        {
          "fmri": "svc:/site/fake-service4:default",
          "zone": "global",
          "state": "degraded"
        },
        {
          "fmri": "svc:/site/fake-service3:default",
          "zone": "global",
          "state": "offline"
        },
        {
          "fmri": "svc:/site/fake-service:default",
          "zone": "global",
          "state": "maintenance"
        }
      ],
      "errors": [],
      "time_of_status": "2026-03-05T06:54:29.028709437Z"
    }
  },
<...>

DB entries will be added in a follow up PR

},
"smf_services_in_maintenance": {
"smf_services_enabled_not_online": {
"nullable": true,
Copy link
Contributor Author

@karencfv karencfv Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want this field to be nullable in case the svcs -Za -H -o state,fmri,zone command doesn't actually run for whatever reason. If we were to return an empty vec of services we could just imply that all of the services were healthy when, in fact, we don't actually know.

@karencfv karencfv marked this pull request as ready for review March 5, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant