Skip to content

RBMC: Handle Status/Health for manager#1503

Open
jeaaustx wants to merge 1 commit into
ibm-openbmc:1210from
jeaaustx:1210-RBMC-Health
Open

RBMC: Handle Status/Health for manager#1503
jeaaustx wants to merge 1 commit into
ibm-openbmc:1210from
jeaaustx:1210-RBMC-Health

Conversation

@jeaaustx

Copy link
Copy Markdown
Contributor

The Status/Health of the Redundancy property of the Manager response should reflect the current state. When redundancy is enabled and failovers are allowed the Health should reflect OK. When redundancy is not enabled or not allowed the Health should indicate Warning.

Tested:

  • Redfish service validator passes for Managers
Note: Tested on both active and passive BMC. Mode and Status for
Redundancy are the same on each in each scenario.

/* Redundancy is enabled and allowed */
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" https://${BMC_IP}/redfish/v1/Managers/bmc
{
  [...]
    "Redundancy": [
    {
[...]
      "Mode": "Failover",
[...]
      "Status": {
        "Health": "OK",
        "State": "Enabled"

      }
    }
  ],
  "Redundancy@odata.count": 1,
[...]

/* Redundancy is disabled */
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" https://${BMC_IP}/redfish/v1/Managers/bmc
{
  [...]
    "Redundancy": [
    {
[...]
      "Mode": "NotRedundant",
[...]
      "Status": {
        "Health": "Warning",
        "State": "Disabled"
      }
    }
  ],
  "Redundancy@odata.count": 1,
[...]

/* Redundancy is enabled but not allowed */
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" https://${BMC_IP}/redfish/v1/Managers/bmc
{
  [...]
    "Redundancy": [
    {
[...]
      "Mode": "Failover",
[...]
      "Status": {
        "Health": "Warning",
        "State": "Disabled"
      }
    }
  ],
  "Redundancy@odata.count": 1,
[...]

The Status/Health of the Redundancy property of the Manager response
should reflect the current state. When redundancy is enabled and
failovers are allowed the Health should reflect OK. When redundancy is
not enabled or not allowed the Health should indicate Warning.

Tested:
 - Redfish service validator passes for Managers

```
Note: Tested on both active and passive BMC. Mode and Status for
Redundancy are the same on each in each scenario.

/* Redundancy is enabled and allowed */
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" https://${BMC_IP}/redfish/v1/Managers/bmc
{
  [...]
    "Redundancy": [
    {
[...]
      "Mode": "Failover",
[...]
      "Status": {
        "Health": "OK",
        "State": "Enabled"

      }
    }
  ],
  "Redundancy@odata.count": 1,
[...]

/* Redundancy is disabled */
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" https://${BMC_IP}/redfish/v1/Managers/bmc
{
  [...]
    "Redundancy": [
    {
[...]
      "Mode": "NotRedundant",
[...]
      "Status": {
        "Health": "Warning",
        "State": "Disabled"
      }
    }
  ],
  "Redundancy@odata.count": 1,
[...]

/* Redundancy is enabled but not allowed */
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" https://${BMC_IP}/redfish/v1/Managers/bmc
{
  [...]
    "Redundancy": [
    {
[...]
      "Mode": "Failover",
[...]
      "Status": {
        "Health": "Warning",
        "State": "Disabled"
      }
    }
  ],
  "Redundancy@odata.count": 1,
[...]

```

Signed-off-by: Janet Adkins <janeta@us.ibm.com>
Comment thread redfish-core/include/manager_redundancy.hpp
Comment thread redfish-core/include/manager_redundancy.hpp

@jnin-dev jnin-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Beyond what Gunnar stated about the conditional, this looks good to me

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.

3 participants