Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFAM: Put sibling values on D-Bus #13

Open
wants to merge 1 commit into
base: 1110
Choose a base branch
from

Conversation

spinler
Copy link
Contributor

@spinler spinler commented Oct 10, 2024

This commit creates a SiblingBMC class to poll the sibling CFAMs and put the values on D-Bus. The D-Bus details are:

service: xyz.openbmc_project.State.BMC.Redundancy.Sibling
interface: xyz.openbmc_project.State.BMC.Redundancy.Sibling
object path: /xyz/openbmc_projec/state/bmc1

A service file to run the application named after the D-Bus service is now included.

For now, the SiblingBMC class is created if any CFAM off of link 1 is present. In the future when more is known about the system, there may need to be changes to identify that CFAM as one on a BMC card, and possibly even look at other links for the BMC's CFAM.

To ensure that D-Bus clients are getting valid values, the interface won't be created until the CFAM is successfully read, and will be removed if the CFAM cannot be accessed.

Tested:

$ busctl introspect -l xyz.openbmc_project.State.BMC.Redundancy.Sibling  /xyz/openbmc_project/state/bmc1
NAME                                             TYPE      SIGNATURE RESULT/VALUE                                            FLAGS
xyz.openbmc_project.State.BMC.Redundancy.Sibling interface -         -                                                       -
.BMCPosition                                     property  u         1                                                       emits-change
.BMCState                                        property  s         "xyz.openbmc_project.State.BMC.BMCState.Quiesced"       emits-change
.CommsOK                                         property  b         true                                                    emits-change
.FWVersion                                       property  s         "DD59CE3D"                                              emits-change
.FailoversPaused                                 property  b         false                                                   emits-change
.Heartbeat                                       property  b         true                                                    emits-change
.Provisioned                                     property  b         false                                                   emits-change
.RedundancyEnabled                               property  b         false                                                   emits-change
.Role                                            property  s         "xyz.openbmc_project.State.BMC.Redundancy.Role.Passive" emits-change

and fields accurately reflect the values in the CFAM.

Change-Id: I4cd171b737e2f63353fd5317b7ff694cfa4dd37e

This commit creates a SiblingBMC class to poll the sibling CFAMs and put
the values on D-Bus.  The D-Bus details are:

service: xyz.openbmc_project.State.BMC.Redundancy.Sibling
interface: xyz.openbmc_project.State.BMC.Redundancy.Sibling
object path: /xyz/openbmc_projec/state/bmc1

A service file to run the application named after the D-Bus service is
now included.

For now, the SiblingBMC class is created if any CFAM off of link 1 is
present.  In the future when more is known about the system, there may
need to be changes to identify that CFAM as one on a BMC card, and
possibly even look at other links for the BMC's CFAM.

To ensure that D-Bus clients are getting valid values, the interface
won't be created until the CFAM is successfully read, and will be
removed if the CFAM cannot be accessed.

Tested:
```
$ busctl introspect -l xyz.openbmc_project.State.BMC.Redundancy.Sibling  /xyz/openbmc_project/state/bmc1
NAME                                             TYPE      SIGNATURE RESULT/VALUE                                            FLAGS
xyz.openbmc_project.State.BMC.Redundancy.Sibling interface -         -                                                       -
.BMCPosition                                     property  u         1                                                       emits-change
.BMCState                                        property  s         "xyz.openbmc_project.State.BMC.BMCState.Quiesced"       emits-change
.CommsOK                                         property  b         true                                                    emits-change
.FWVersion                                       property  s         "DD59CE3D"                                              emits-change
.FailoversPaused                                 property  b         false                                                   emits-change
.Heartbeat                                       property  b         true                                                    emits-change
.Provisioned                                     property  b         false                                                   emits-change
.RedundancyEnabled                               property  b         false                                                   emits-change
.Role                                            property  s         "xyz.openbmc_project.State.BMC.Redundancy.Role.Passive" emits-change
```

and fields accurately reflect the values in the CFAM.

Change-Id: I4cd171b737e2f63353fd5317b7ff694cfa4dd37e
Signed-off-by: Matt Spinler <[email protected]>
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.

2 participants