openbmc / phosphor-time-manager

Local time policy and emulated host RTC manager
Apache License 2.0
6 stars 10 forks source link

Date and Time is not getting reflected immediately in redfish response when switching manual to NTP #9

Open kirankumarb07 opened 1 year ago

kirankumarb07 commented 1 year ago

Description:

When changing from manual time to NTP, the date and time page is not refreshing to the current time.

Testing steps:

  1. login to web UI and go to the date and time settings page
  2. change the date and time to a future date and save it
  3. after some time change back from manual to NTP mode and give valid NTP server IP and save it
  4. check date and time page gets refreshed with the current date and time

Web UI is still showing the same old date and time after refreshing from the API response.

kirankumarb07 commented 1 year ago

After 3 to 4 seconds, the date and time value is getting updated with the new value. So added the setTimeout in webui-vue package and posted the PR.

https://gerrit.openbmc.org/c/openbmc/webui-vue/+/60500

It looks like the delay is some problem from the backend, if we fixed it in the backend we can remove the timeout from the web.

lxwinspur commented 1 year ago

Perhaps one of these two patches might work for you, neither can be merged upstream.

https://gerrit.openbmc.org/c/openbmc/phosphor-time-manager/+/56584 https://gerrit.openbmc.org/c/openbmc/phosphor-time-manager/+/57298

williamspatrick commented 1 year ago

This issue is reported to time-manager but the suggested fix is in webui?

Are you expecting that:

A. the time manager call doesn’t return until the NTP is successful

B. Once NTP is successful, somehow the webui knows to refresh the time display.

I don’t think A is really possible. NTP sync can take longer than the dbus client timeouts. If B, we should reroute this issue to the webui repo.

gtmills commented 1 year ago

Redfish has tasks. Can we return a task, that webui-vue can monitor for completion?

Nikhil-Ashoka commented 6 months ago

Redfish has tasks. Can we return a task, that webui-vue can monitor for completion?

Is it already implemented. If not, I think that would make sense to monitor if the task is completed and then update in the webui-vue!