Skip to content

Conversation

@rical
Copy link
Contributor

@rical rical commented Apr 29, 2025

Description

This PR adds operational data support for system services and the ability to show this data.

Data is in a generic format but is intended to be able to represent finit information (initctl) nicely.

Screenshot from 2025-10-28 15-10-02

In the future this could be extended to allow a user to see more detailed info about a specific service, with something like show services confd.

YANG

Augment new services container to ietf-system

The reason for augmenting this to ietf-system and not to
infix-services is that we consider this generic system information
which is totally disconnected from what ever services infix might
provide.

In this first state we only support pid, name, description and state.
Making the data look something like:

"ietf-system:system-state": {                                                                                                                                                                                                           
    "infix-system:services": {                                                                                                                                                                                                            
      "service": [                                                                                                                                                                                                                        
        {                                                                                                                                                                                                                                 
          "pid": 1187,                                                                                                                                                                                                                    
          "name": "udevd",                                                                                                                                                                                                                
          "description": "Device event daemon (udev)",                                                                                                                                                                                    
          "status": "running"                                                                                                                                                                                                             
        },

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Nicely done! 👍

@rical rical force-pushed the yang-add-services branch from 6b219f9 to ab8b174 Compare May 6, 2025 14:29
@troglobit troglobit linked an issue Sep 11, 2025 that may be closed by this pull request
@troglobit troglobit marked this pull request as draft September 24, 2025 09:12
@troglobit troglobit changed the title Draft: Add new operational support for services Add new operational support for services Sep 24, 2025
This patch adds operational data support for system services. The
data is in a generic format but is intended to be able to represent
finit information (initctl) nicely.

The reason for augmenting this to ietf-system and not to
infix-services is that we consider this generic system information
which is totally disconnected from what ever services infix might
provide.

In this first state we only support pid, name, description and state.
Making the data look something like:

  "infix-system:services": {
    "service": [
      {
        "pid": 1185,
        "name": "udevd",
        "status": "running",
        "description": "Device event daemon (udev)"
      }]

Signed-off-by: Richard Alpe <[email protected]>
@rical rical force-pushed the yang-add-services branch from ab8b174 to c119436 Compare October 28, 2025 09:45
rical added 5 commits October 28, 2025 15:02
Add the command show system services.

Signed-off-by: Richard Alpe <[email protected]>
Multiple services can have PID 0 when stopped/done, making PID
unsuitable as a unique key. There could also be multiple services with
the same name (I would assume?).

Signed-off-by: Richard Alpe <[email protected]>
@rical rical marked this pull request as ready for review October 28, 2025 16:00
Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

lgtm

@troglobit troglobit merged commit 9d271eb into main Oct 29, 2025
7 checks passed
@troglobit troglobit deleted the yang-add-services branch October 29, 2025 08:59
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.

Add system service status to operational data

3 participants