Open gtmills opened 2 years ago
https://w3.rchland.ibm.com/projects/SLIC/bestquest/index.php?defect=SW552970
@gtmills we cant access this URL and I tested it with the remote rainier system(10.250.3.20), it works fine
Also, could you give us an NTP service IP address? and lemme test again?
@mzipse FYI
@lxwinspur , all the information we have in the link that you can't access has already been placed in this github issue. Unfortunately, that's all the information we have to work with.
There was one thought that perhaps the date/time was set too quickly? ie. did the user try to set it before the BMC was really fully operational. That might be worth experimenting with.
@lxwinspur , another thing to try to recreate this is to have the GUI up and running. Then have the BMC GUI do a BMC reboot. It takes approximately a minute for the BMC to come up. So it's possible to then set the date/time as the bmc is coming up. That may be where this issue is happening at.
@gtmills @mzipse
When the BMC is not fully started and we manually set the time through the GUI, it is very likely that the setting will fail: There are two situations here:
The time set is incorrect, systemd's timedate1 will return a failure
ex = sd_bus_call noreply: org.freedesktop.DBus.Error.InvalidArgs: Failed to set local time: Invalid argument
https://github.com/systemd/systemd/blob/main/src/timedate/timedated.c#L899
Because P-T-M will initialize and update NTP at startup (https://github.com/openbmc/phosphor-time-manager/blob/master/manager.cpp#L75-L94
), then the SetNTP method of timedate1 will be called, because this method will not be executed immediately, so when we manually set the time, the SetTime method of timedate1 will be executed. At this time, there will be a judgment in the source code of systemd: when setNTP is not executed, it will return an error:
ex = sd_bus_call noreply: org.freedesktop.timedate1.AutomaticTimeSyncEnabled: Previous request is not finished, refusing.
https://github.com/systemd/systemd/blob/main/src/timedate/timedated.c#L839
So, I don't think this is a problem right?
When the BMC is not fully started
The BMC was fully started.
Could you set the datetime back and forth from manual to ntp and back ?
Did you do this and weren't able to hit?
@gkeishin Anything we should add here?
@lxwinspur Could you try toggling back and forth on the GUI on the yellow zone system ?
@gtmills @mzipse Regarding phosphor-time-manager, I pushed a new patch to print exception logs, Could you test it once after this patch is merged? Let's see what the specific error log is? https://gerrit.openbmc.org/c/openbmc/phosphor-time-manager/+/55053/5/epoch_base.cpp#51
Could you try toggling back and forth on the GUI on the yellow zone system ?
Sorry, Maybe I am not following what is you mean?
@gkeishin @gtmills
Regarding phosphor-time-manager
, I pushed some patches upstream, which are now merged, mostly adding exception printing
https://github.com/openbmc/phosphor-time-manager/blob/master/epoch_base.cpp#L51
so, Could you pull the latest code and test it again?
@lxwinspur , I took your patches and was not able to recreate the issue. Was there any fixes in your patches? Or was it just collecting additional error data in case we do see a failure?
In either case, I think we should go ahead and submit a Pull Request to merge these changes, unless you know of a reason why we shouldn't do that.
@lxwinspur , I took your patches and was not able to recreate the issue. Was there any fixes in your patches? Or was it just collecting additional error data in case we do see a failure?
@mzipse, I just collected additional error data, and didnt do any fixes
In either case, I think we should go ahead and submit a Pull Request to merge these changes, unless you know of a reason why we shouldn't do that.
I didnt see that IBM created the phosphor-time-manager
repo on any branch, so I just update SRCREV
in openbmc/meta-phosphor/recipes-phosphor/datetime/phosphor-time-manager_git.bb
?
Also, I see that IBM has two rainier related branches (1020
and 1020.10
), which branch should I submit a PR to?
@mzipse @gtmills Sent a PR to 1020.10 branch, https://github.com/ibm-openbmc/openbmc/pull/232
Downstream defect is https://w3.rchland.ibm.com/projects/SLIC/bestquest/index.php?defect=SW552970
Reported by @gkeishin Test:
Expectation: Sets to manual and DateTime is updated
Observation: Errors out while trying to set
Error saving date and time settings
1st recreate
2nd recreate
3rd recreate
The set on D-Bus failed https://github.com/ibm-openbmc/bmcweb/blob/1020/redfish-core/lib/managers.hpp#L1963
@lxwinspur Could this be something your team looks at ? Could you set the datetime back and forth from manual to ntp and back ?