History log of /openbmc/bmcweb/redfish-core/ (Results 76 – 100 of 1981)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
48fb20b917-Nov-2024 Ed Tanous <etanous@nvidia.com>

Update error types to use dmtf

In a prior patch these were InvalidUpload, an openbmc oem defined
message. Map the messages to dmtf base registry messages, primarily
MissingOrMalformedPart

Tested:

Update error types to use dmtf

In a prior patch these were InvalidUpload, an openbmc oem defined
message. Map the messages to dmtf base registry messages, primarily
MissingOrMalformedPart

Tested: on last patch of series.

Change-Id: I0b04deabb01b8e299af259e0036f6007737068c6
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

644cdcb817-Nov-2024 Ed Tanous <etanous@nvidia.com>

Make all ints size_t

We should be consistent when we declare index types. Nlohmann uses an
underlying uint64_t as the integer type, so use that for all index
types.

Size_t is directly creatable fr

Make all ints size_t

We should be consistent when we declare index types. Nlohmann uses an
underlying uint64_t as the integer type, so use that for all index
types.

Size_t is directly creatable from it in both 32 and 64 bit modes.

Tested: On last patch in series.

Change-Id: Id1da0e7be2e2046bdbd732247d208b6e9e8c008c
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

f8cca87617-Nov-2024 Ed Tanous <etanous@nvidia.com>

Order by order in DMTF registry

The DMTF registry has a defined order. Previously these were randomly
ordered dependent on the hash function used when they were generated
years ago.

Functionally t

Order by order in DMTF registry

The DMTF registry has a defined order. Previously these were randomly
ordered dependent on the hash function used when they were generated
years ago.

Functionally the only change here is to parse_registries.py, to remove
the sorting, then to regenerate the files.

Tested: On last patch in series.

Change-Id: I7432c26ec4a1b18acf63ece85500df370f4758d3
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

7ccfe68416-Nov-2024 Ed Tanous <etanous@nvidia.com>

Generate error messages source

This file has gotten desynced from the standard, and maintaining it is
a pain. refactor the parse_registries.py script to generate this file
and update all wrong inst

Generate error messages source

This file has gotten desynced from the standard, and maintaining it is
a pain. refactor the parse_registries.py script to generate this file
and update all wrong instances to the correct types.

To the extent possible, the generated code tries to be replaced with
1:1 identical structures to make review simpler.

Tested: On last patch in series.

Change-Id: Ic203a93fd26e0487475ce82c62beb6a22612368a
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

c87294a617-Nov-2024 Ed Tanous <etanous@nvidia.com>

Remove InvalidUpload response code

Invalid response is something from the openbmc registry, so it's not
a valid thing to return as a response code. For this patch, remove
the generated error messag

Remove InvalidUpload response code

Invalid response is something from the openbmc registry, so it's not
a valid thing to return as a response code. For this patch, remove
the generated error message, and replace the one place it's used with
internalError.

Tested: On last patch in series.

Change-Id: I8215935f00923c72fd7763645c06d0b6af73c01d
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

034e125916-Nov-2024 Ed Tanous <etanous@nvidia.com>

Don't pretty print inline arguments

For consistency, keep all json value printing in error messages non
pretty printed. This allows us to generate this file easier.

Tested: On last patch in series

Don't pretty print inline arguments

For consistency, keep all json value printing in error messages non
pretty printed. This allows us to generate this file easier.

Tested: On last patch in series.

Change-Id: I1a205e9594e2c917d2b758d537a3f58018cd83d9
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

42079ecb16-Nov-2024 Ed Tanous <etanous@nvidia.com>

Generate error messages for Redfish

error_messages.hpp and error_messages.cpp were at one time generated.
That script has been lost to the sands of time, and since then there's
been lots of places w

Generate error messages for Redfish

error_messages.hpp and error_messages.cpp were at one time generated.
That script has been lost to the sands of time, and since then there's
been lots of places where we've been inconsistent, or updated our base
registry without updating the generated code. This causes wording,
syntax, and other errors.

This commit updates the script to simply generate this header with the
intent of generating it from here on out and avoid issues. As written,
goes to great lengths to generate exactly the same code, and make only
changes to the doxygen comments, and add the missing types. This is
done to allow for easy diffing that nothing important has changed.

Testing on last patch in series.

Change-Id: Ic1da1c02519098bdb53656d94a458b78c67d25bb
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

aaebeaaf17-Nov-2024 Ed Tanous <etanous@nvidia.com>

Rename parameters to keep convention

These two properties were added with argument names that while more
descriptive than most, prevent us from generating this file
automatically.

Rename to arg1 an

Rename parameters to keep convention

These two properties were added with argument names that while more
descriptive than most, prevent us from generating this file
automatically.

Rename to arg1 and arg2.

Tested: at end of series.

Change-Id: I2ddb675bd5e0770583d0a4de105c8eb3b54993d7
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

e7bcf47517-Nov-2024 Jayanth Othayoth <ojayanth@gmail.com>

json utility: fixed core dump during sensor load

bmcweb replaces underscores with spaces in sensor names for better
readability. The existing objectKeyCmp function did not handle this
case, leading

json utility: fixed core dump during sensor load

bmcweb replaces underscores with spaces in sensor names for better
readability. The existing objectKeyCmp function did not handle this
case, leading to core dumps in the sensor load path.

Error details are provided below.

```
bmcwebd[1368]: [DEBUG sensors.hpp:507] Added sensor P0_NS_VR_FAN_2
bmcwebd[1368]: terminate called after throwing an instance of
'boost::detail::with_throw_location<boost::system::system_error>'
bmcwebd[1368]: what(): leftover [boost.url.grammar:4]
```

Implemented a new algorithm that alphabetically sorts non-URL keys
and retains the existing logic for URL-type keys.

Tested: Updated and verified the test cases.

Change-Id: I39c3f7cc54dec5e7cf9658977e1078acb827afb2
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

9008975e20-Nov-2024 Ed Tanous <etanous@nvidia.com>

Fix regression on metadata uri

e9f120141c8d2a1404660e46ce2126c83521405d caused a regression on this
that can be seen from the find and replace. Unfortunately service
validator doesn't catch this, b

Fix regression on metadata uri

e9f120141c8d2a1404660e46ce2126c83521405d caused a regression on this
that can be seen from the find and replace. Unfortunately service
validator doesn't catch this, but protocol validator does.

Tested: Run redfish protocol validator and see this test is now passing.

Change-Id: Ie90be9e7dd9332924a33f71ee6125b82cb21bcec
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

a877074017-Nov-2024 Ed Tanous <etanous@nvidia.com>

Enable gcc-14 builds

gcc-14 enables the std::chrono features we need for doing lots of time
conversions. For whatever reason, std::chrono accepts a an hour of 60,
whereas date.h didn't. This test

Enable gcc-14 builds

gcc-14 enables the std::chrono features we need for doing lots of time
conversions. For whatever reason, std::chrono accepts a an hour of 60,
whereas date.h didn't. This test case is really just a corner case, so
accept either answer.

Tested: Unit tests pass. Good coverage.

Change-Id: I2fb7fcbebb2a4126b36f99d27b216b835d1e2994
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

d109e2b618-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: move registries functions to their file

There were same functions from namespace 'registries' in
event_service_manager.hpp. Move them to registries.cpp/hpp.

Tested:
- Using Redfish Event

Refactor: move registries functions to their file

There were same functions from namespace 'registries' in
event_service_manager.hpp. Move them to registries.cpp/hpp.

Tested:
- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Id0912f6581637bb4117e67b138122c355256b561
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

b80ba2e418-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: extract src/event_log.cpp

event_service_manager.hpp contains namespace 'event_log' which is
confusing. Extract it to a separate header and cpp file to have the
filename match the namespace

Refactor: extract src/event_log.cpp

event_service_manager.hpp contains namespace 'event_log' which is
confusing. Extract it to a separate header and cpp file to have the
filename match the namespace.

No functional changes have been made to the code.

Tested:
- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Ia0bf658b8b46f92aede059d46e8de48f160e073e
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

6a42dc6116-Sep-2024 Potin Lai <potin.lai@quantatw.com>

Change primary postcode interface to byte array

At least one processor implementation currently uses 9 byte post codes,
which does not fit nicely into any standard types. The backends are
changing

Change primary postcode interface to byte array

At least one processor implementation currently uses 9 byte post codes,
which does not fit nicely into any standard types. The backends are
changing dbus interface to be two arrays rather than a {uint64, array},
which will allow arbitrary sized postcodes[1].

[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/74633

Tested:
- Test with 9 bytes postcode system
```
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries",
"@odata.type": "#LogEntryCollection.LogEntryCollection",
"Description": "Collection of POST Code Log Entries",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"Created": "2024-10-08T16:37:51.180760+00:00",
"EntryType": "Event",
"Id": "B1-1",
"Message": "Boot Count: 1; Time Stamp Offset: 0.0000 seconds; POST Code: 0x01000000000001C000",
"MessageArgs": [
"1",
"0.0000",
"0x01000000000001C000"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
},
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-2",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"Created": "2024-10-08T16:37:51.282429+00:00",
"EntryType": "Event",
"Id": "B1-2",
"Message": "Boot Count: 1; Time Stamp Offset: 0.1017 seconds; POST Code: 0x01000000020001C100",
"MessageArgs": [
"1",
"0.1017",
"0x01000000020001C100"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
},
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-3",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"Created": "2024-10-08T16:37:51.654501+00:00",
"EntryType": "Event",
"Id": "B1-3",
"Message": "Boot Count: 1; Time Stamp Offset: 0.4737 seconds; POST Code: 0x01000000010001C000",
"MessageArgs": [
"1",
"0.4737",
"0x01000000010001C000"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
},
......
}
```

- Test attachment (secondary postcode) with maunul feed postcode
- promary: 0x010203040506070809
- secondary: 0x090807060504030201
```
root@bmc:~# busctl set-property xyz.openbmc_project.State.Boot.Raw /xyz/openbmc_project/state/boot/raw0 xyz.openbmc_project.State.Boot.Raw Value '(ayay)' 9 1 2 3 4 5 6 7 8 9 9 9 8 7 6 5 4 3 2 1
root@bmc:~# curl -u root:0penBmc -k https://127.0.0.1/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1",
"@odata.type": "#LogEntry.v1_9_0.LogEntry",
"AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment",
"Created": "2024-10-15T00:52:38.408819+00:00",
"EntryType": "Event",
"Id": "B1-1",
"Message": "Boot Count: 1; Time Stamp Offset: 0.0000 seconds; POST Code: 0x010203040506070809",
"MessageArgs": [
"1",
"0.0000",
"0x010203040506070809"
],
"MessageId": "OpenBMC.0.2.BIOSPOSTCode",
"Name": "POST Code Log Entry",
"Severity": "OK"
}
root@bmc:~# curl -u root:0penBmc -k https://127.0.0.1/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment
CQgHBgUEAwIB
```

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Id5e8779b191e733e6be32294d21a0a1775c48db4

show more ...

9f892fa612-Nov-2024 Jagpal Singh Gill <paligill@gmail.com>

fix redfish validator error for Update interface

Fix the redfish validator error for BIOS version with
redfish-updateservice-use-dbus feature enabled. If there is no host bios
version, for example,

fix redfish validator error for Update interface

Fix the redfish validator error for BIOS version with
redfish-updateservice-use-dbus feature enabled. If there is no host bios
version, for example, in case the flash_bios feature is not enabled, the
populateSoftwareInformation shouldn't return an error.

Tested -
Before Fix: Redfish Validator failed with errors -

1 err.Bios.Bios errors in /redfish/v1/Systems/system
1 err.Collection(Manager.Manager) errors in /redfish/v1/Systems/system
2 failProp errors in /redfish/v1/Systems/system
2 fails errors in /redfish/v1/Systems/system
1 failGet errors in /redfish/v1/Systems/system/Bios
1 fails errors in /redfish/v1/Systems/system/Bios

err.Bios.Bios: 1
err.Collection(Manager.Manager): 3
err.Collection(Resource.Item): 1

Validation has failed: 16 problems found

After Fix: Redfish Validator Passed -

Metadata: Namespaces missing from $metadata: set()

Elapsed time: 0:00:33
missingRedfishAlias: 1
pass: 4343
passAction: 16
passGet: 217
passRedfishUri: 208
skipNoSchema: 3
skipOptional: 4001
unvalidated: 1
unverifiedAdditional.complex: 1
warnDeprecated: 5
warningPresent: 6
warnings: 4
Validation has succeeded.

Change-Id: I881c6a780b9f2662fb81a17c258ff09f352668d7
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

02c1e29f15-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: break up event_service_manager.hpp

'class Subscription' can be extracted into a separate file.

No changes have been made to the code.

Tested:

- Using Redfish Event Listener, test subscr

Refactor: break up event_service_manager.hpp

'class Subscription' can be extracted into a separate file.

No changes have been made to the code.

Tested:

- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Id0076ef617e36cbb85629a386a4511a4fdb5e4da
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

fa800c8a13-Nov-2024 Gunnar Mills <gmills@us.ibm.com>

Manager: Remove SerialConsole and TODO

In 2020, the OCP Profile moved to accept SerialConsole in either
Manager or System.[1]

That was the reason of still having this code. SerialConsole was
deprec

Manager: Remove SerialConsole and TODO

In 2020, the OCP Profile moved to accept SerialConsole in either
Manager or System.[1]

That was the reason of still having this code. SerialConsole was
deprecated in Manager v1_10_0. v1_19_2 is the latest Manager
version[2].

SerialConsole was added to System in 2021[3]. In 2023, SerialConsole was
enhanced to get the status not just hardcode to enabled.

[1]: https://github.com/opencomputeproject/HWMgmt-OCP-Profiles/issues/23
[2]: https://redfish.dmtf.org/schemas/v1/Manager.v1_19_2.json
[3]: https://github.com/openbmc/bmcweb/commit/0e8ac5e706c531d2a3e2fc8390d9a31b90a91eb1
[4]: https://github.com/openbmc/bmcweb/commit/5c3e927283e32e1633ccd409f34ee17fab626ca1

Tested: Covered by automated tests.

Change-Id: I0a95e9215d4aa4626a3da75c989cb7d5eaf94be1
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...

d27c31e915-Oct-2024 Jagpal Singh Gill <paligill@gmail.com>

update service name for UPDATESERVICE_USE_DBUS

Update the Dbus service name and path for
BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS. As part of updated implementation
the new BMC code updater daemon name

update service name for UPDATESERVICE_USE_DBUS

Update the Dbus service name and path for
BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS. As part of updated implementation
the new BMC code updater daemon name is
xyz.openbmc_project.Software.Manager, update setActiveImage and
FactoryReset flows to reflect so.

Tested:
```
> curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X POST https://${bmc}/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults -d '{"ResetType": "ResetAll"}'
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request completed successfully.",
"MessageArgs": [],
"MessageId": "Base.1.19.0.Success",
"MessageSeverity": "OK",
"Resolution": "None."
}
]
}

> curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH https://${bmc}/redfish/v1/Managers/bmc -d '{"Links": {"ActiveSoftwareImage": {"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/70f4c0cb"}}}'
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request completed successfully.",
"MessageArgs": [],
"MessageId": "Base.1.19.0.Success",
"MessageSeverity": "OK",
"Resolution": "None."
}
]
}
```

Change-Id: I42ef2485fa119474b7fd12ea94dd654c3432c067
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

5fe4ef3519-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Make UserSubscription as shared_ptr in Subscription

Currently UserSubscription are used as value in Subscription. This
causes the copy of the object between subscriptionsMap and
subscriptionConfigMa

Make UserSubscription as shared_ptr in Subscription

Currently UserSubscription are used as value in Subscription. This
causes the copy of the object between subscriptionsMap and
subscriptionConfigMap when doing PATCH.

Using a shared_ptr for UserSubscription avoids the memory copy of it.

Tested:

- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: I5821b72f28ba737a5c9b75288d377766c84c6a6a
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

b07942e331-Oct-2024 George Liu <liuxiwei@ieisystem.com>

Fix snmp port out of range

SNMP out of range port doesn't works, it should throw HTTPS 400 error
It went ahead and configures it, with default port which is not the
correct behavior.

Tested: If the

Fix snmp port out of range

SNMP out of range port doesn't works, it should throw HTTPS 400 error
It went ahead and configures it, with default port which is not the
correct behavior.

Tested: If the snmp port is out of range, a 400 error will be thrown.
```
$ curl --header "Content-Type: application/json" X POST -i -k -u root:0penBmc https://{bmc}/redfish/v1/EventService/Subscriptions --data-raw '{"Destination": "snmp://xx.xx.xx.76:65537","SubscriptionType": "SNMPTrap", "Protocol": "SNMPv2c"}' -vv
...

< HTTP/1.1 400 Bad Request
...

{
"Destination@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The value '\"snmp://xx.xx.xx.76:65537\"' for the property Destination is of a different format than the property can accept.",
"MessageArgs": [
"\"snmp://xx.xx.xx.76:65537\"",
"Destination"
],
"MessageId": "Base.1.16.0.PropertyValueFormatError",
"MessageSeverity": "Warning",
"Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed."
}
]
* Connection #0 to host 127.0.0.1 left intact
}
```

Change-Id: I6e002153ca37b4eb3d4538a64fa61ab35e9dab85
Signed-off-by: George Liu <liuxiwei@ieisystem.com>

show more ...

02ea923f25-Oct-2024 Gunnar Mills <gmills@us.ibm.com>

Remove 2nd incorrect TotalCores

bmcweb has 2 places where it is setting the processor's TotalCores, here
and in the getCpuDataByInterface call[1].

The way being removed of getting TotalCores, assum

Remove 2nd incorrect TotalCores

bmcweb has 2 places where it is setting the processor's TotalCores, here
and in the getCpuDataByInterface call[1].

The way being removed of getting TotalCores, assumes the path of cores
is <processorPath/core*>, it also has some interesting logic for
present.

The getCpuDataByInterface goes out to D-Bus and gets the CoreCount
value, part of the CPU interface[2] in PDI.

IBM isn't using this path way of getting TotalCores. Don't see any
company that is but hard to know. Since this way is wrong, don't think
we should put behind a meson option, instead just remove.

History:
Aug, 2019: IBM added getting "TotalCores" by assuming this core path[3]
Aug, 2020: Intel added CPU properties including corecount to PDI[4]
Sept, 2020: Intel adds using this D-Bus property[5]

Long term, it would be good to model the cores, the cores and processor
have an association,[6] the bmcweb review for the cores is using this
association[7].

[1]: https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/processor.hpp#L133
[2]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/73c931fb942daa714bfff17e950b9d5622a25842/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml#L46
[3]: https://github.com/openbmc/bmcweb/commit/ec8faf9243b6f6320daeb3ba6a94d1f257034506
[4]: https://github.com/openbmc/phosphor-dbus-interfaces/commit/259f49e0c40b287d9ea79f77db1654da47161340
[5]: https://github.com/openbmc/bmcweb/commit/029cc1f4106968f7e871d17a8bcb71a303a12ffa
[6]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/56395
[7]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/38570

Tested: It builds. TotalCores is still there.

Change-Id: I9f244a33eca0e4a9838eb55ada09733807439877
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...

f712565323-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Remove SubscriptionId get and set functions

There are places to get or set subscription id differently like
`userSub.id` directly, or via `get/setSubscriptionId()` functions.

However, those aux fun

Remove SubscriptionId get and set functions

There are places to get or set subscription id differently like
`userSub.id` directly, or via `get/setSubscriptionId()` functions.

However, those aux functions are used only once and can be replaced to
access `userSub.id` directly.

Tested:
- Complies good
- Subscription GET and PATCH work correctly

Change-Id: I5cf81ba3ec0cb754387b40614e6309dca9a5305e
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

a0969c7019-Sep-2024 Myung Bae <myungbae@us.ibm.com>

Remove subscription for TerminateAfterRetries policy

Redfish Data Model [1] section 6.42.5.2 and EventDestination schema [2]
specify that the subscription is terminated under the following policy
an

Remove subscription for TerminateAfterRetries policy

Redfish Data Model [1] section 6.42.5.2 and EventDestination schema [2]
specify that the subscription is terminated under the following policy
and the conditions.

DeliveryRetryPolicy:
- `TerminateAfterRetries`:
```
This value shall indicate the subscription is terminated after the
maximum number of retries is reached, specified by the
DeliveryRetryAttempts property in the event service.
```

This implements this policy to delete subscription of the stale client
connections after trying `DeliveryRetryAttempts` when
`DeliveryRetryPolicy == TerminateAfterRetries`.

Tested:
1) Subscription with blocked communication between bmcweb and listener

- Run Redfish Event Listener [3] to subscribe events with
`DeliveryRetryPolicy == TerminateAfterRetries`

- Check the subscription creation
```
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/
```

- Generate an event and check the delivery to the listener.
For example,
```
curl -k -X POST https://${bmc}/redfish/v1/EventService/Actions/EventService.SubmitTestEvent
```

- Block the communication between bmcweb and listener
(or modify the listener not to delete the subscription at its exit, and
kill the listener so that its subscription is still alive)

- If the above task is already finished, generate more events and wait
for the sufficient time till `DeliveryRetryAttempts`.

- bmcweb journal log may contain the entries like
```
Sep 20 10:47:55 p10bmc bmcwebd[286]: [ERROR http_client.hpp:444] Maximum number of retries reached. https://9.3.62.209:8080/Redfish-Event-Listener
Sep 20 10:47:55 p10bmc bmcwebd[286]: [ERROR event_service_manager.hpp:1459] Subscription 590587653 is deleted after MaxRetryAttempts
```

- Check the subscription again if the subscription is deleted.

2) Redfish Validator passes

[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2024.3.html
[2] https://github.com/openbmc/bmcweb/blob/878edd599b1706ec8ffe6c3d81ba7cb3534f6393/redfish-core/schema/dmtf/csdl/EventDestination_v1.xml#L857
[3] https://github.com/DMTF/Redfish-Event-Listener

Change-Id: I6e41288995cbb6e37e17a7ef1be093abb7ce54b9
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

56ba386d10-Oct-2024 Myung Bae <myungbae@us.ibm.com>

Fix Persistent Subscription PATCH

The `RedfishEvent` subscription is expected to be persistent over bmc
reboot or bmcweb restart. However, the properties on PATCH are
currently not persistent after

Fix Persistent Subscription PATCH

The `RedfishEvent` subscription is expected to be persistent over bmc
reboot or bmcweb restart. However, the properties on PATCH are
currently not persistent after reboot or bmcweb restart.

This commit is to sync those properties to the persistent store after
PATCH.

In addition, this commit fixes a missing `id` copy when a new
UserSubscription is created in [1] (introduced by [2]). As a result, it
may cause the following messages during bmcweb start after subscription
POST or PATCH like
```
Oct 16 14:37:34 p10bmc systemd[1]: Started Start bmcwebd server.
Oct 16 14:37:34 p10bmc bmcwebd[15320]: [ERROR event_service_store.hpp:253] Subscription missing required field information, refusing to restore
Oct 16 14:37:34 p10bmc bmcwebd[15320]: [ERROR persistent_data.hpp:166] Problem reading subscription from persistent store
```
After this, those subscriptions become lost.

Tested:

1. Subscription PATCH

- Create a subscription (e.g. use Redfish-Service-Validator).

- GET subscription and check the properties
```
SUBID=<id>
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID}
```

- PATCH subscription with a different value.
```
curl -k -X PATCH https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID} \
-H "Content-Type: application/json" -d '{"DeliveryRetryPolicy":"RetryForever"}'
```

- Reboot BMC or restart bmcweb

- GET subscription and check the properties
```
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions/${SUBID}
````

Before the fix, the property values are the same as before PATCH.
After the fix, the last patched property values will be kept.

2. Redfish Service Validator passes

[1] https://github.com/openbmc/bmcweb/blob/21a94d5cd4be74a85c978c0cd63e4c633093c531/redfish-core/include/event_service_manager.hpp#L812
[2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/65720

Change-Id: If5d2f622cc945faa6999d1e3e70211e881e19a79
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

7585b76017-Oct-2024 Jishnu CM <jishnunambiarcm@duck.com>

Adds redfish error for GenerateSecretKeyRequired

This commit contains the redfish error to be returned when it finds
that MFA is enabled and the user has to generate secret key to proceed
further.

Adds redfish error for GenerateSecretKeyRequired

This commit contains the redfish error to be returned when it finds
that MFA is enabled and the user has to generate secret key to proceed
further.

Used and tested in https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74938.

Change-Id: If13b96729510fc7b165aa792f1e1d23a811ca733
Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>

show more ...

12345678910>>...80