diff options
author | Ed Tanous <ed@tanous.net> | 2024-03-08 00:07:00 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-04-17 19:44:38 +0300 |
commit | 8e157735e0655f216bd901e299e6b98329cbee26 (patch) | |
tree | bfa4dc247bd8eaa4498d4b1de40bd21d0432f1cc /redfish-core/lib/update_service.hpp | |
parent | 6dbe9bea2e45791fc924645fb8b7813fdd7f4cd1 (diff) | |
download | bmcweb-8e157735e0655f216bd901e299e6b98329cbee26.tar.xz |
Fix NTP set race condition
There's currently a problem with phosphor-timesyncd, where enabling NTP
doesn't immediately reflect in the system status on return[1]. To say
it another way, NTP is not enabled/disabled atomically, which leads to
the following problem.
// Disable NTP
PATCH /redfish/v1/Managers/bmc/NetworkProtocol
{"NTP":{"ProtocolEnabled": false}}
// Set the time manually
PATCH /redfish/v1/Managers/bmc {"DateTime": "<timestring"}
Doing this in rapid succession leads to a 500 error, which is obviously
a bug. In the prior commit, this error was changed to a
PropertyValueConflict error, which is still incorrect, but at least
informative of what's going on. REST APIs are intended to have CRUD
compliance. The response should not be returned until the value has
been accepted, and not doing that can lead to problems.
This commit changes the backend to use systemd directly, rather than
routing through phosphor-settings, to avoid this race.
Quite possibly resolves #264 but haven't tested that.
Tested: The above procedure succeeds.
[1] https://github.com/systemd/systemd/pull/11424
Change-Id: I19241e7677d9b6415aff79ac65c474ae71984417
Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'redfish-core/lib/update_service.hpp')
0 files changed, 0 insertions, 0 deletions