Skip to contentSkip to conversation

*Request For Feedback*: TimeOwner in phosphor-timemanager

DISCUSSION vishwa 3 participants 8 messages Dec 9, 2019 – Jan 13, 2020

lore
Share & tools
lore

vishwa

author
#0 lore raw

Hi All,

Sending this email requesting the feedback on the usage/need of "TimeOwner" that is part of phosphor-timemanager.

phosphor-timemanager is a time keeping daemon on the BMC that uses BMC's RTC to hold the time. It uses systemd-timesyncd and systemd-timedated.

There are 2 D-Bus objects that implement "phosphor-dbus-interfaces/xyz/openbmc_project/Time/EpochTime.interface.yaml" and is managed by a common manager.

/xyz/openbmc_projects/time/bmc  : Used when the request is coming in via Redfish /xyz/openbmc_projects/time/host : Used when the request is inband with IPMI_SET_SEL_TIME and IPMI_GET_SEL_TIME + PLDM ones.

timemanager consumes 2 settings, namely, TimeSyncMethod and TimeOwner defined in phosphor-dbus-interfaces/xyz/openbmc_project/Time/.

TimeSyncMethod: Indicates whether the NTP must be used or should it be settable by the user.
                For example: If the time set request comes and the Method was set to NTP, then the write request would be ignored.

TimeOwner: This is where we have seen the community telling why do we even have such a thing. Talking to the UX team, looks like, the customers have had difficulty understanding this.

There are 4 values for TimeOwners: ( Works irrespective of acting on time/bmc or time/host D-Bus objects )

/BMC : BMC is the owner of the time. So, Host *can not *set the time on BMC. Inband SET_SEL_TIME would result in error.// //
//HOST: Host is the owner of the time. So, only the host *can set* the time on BMC. Any external Redfish SET requests would result in error/

/SPLIT: This is where we could achieve independent times for BMC and Host. This is a combination of BMC + HOST. Both BMC and HOST can set the time. Host time is maintained as an offset into BMC's time. So, whenever the Host sends the time request, the offset is factored into//BMC's time and then the response would be returned.//
//
//BOTH : BMC and/or HOST can SET the time. Whoever did SET it last, will be maintained.
/

Personally, I have worked on github issue from Redhat when there were failures setting the time from OS using "hwclock" since the Owner was set to [BMC]. The solution was to [poweroff] the system, change the Owner to [HOST/SPLIT] and boot back.

Note: Since these policies are user settable, they can be changed at anytime. However, they will not be taken into account until the system is booted again.

*Why did we even have this ?*: During the initial development of timemanager, the thought was that, Host would not trust the BMC and hence we want a way where BMC and Host can maintain their own time

*Do we need this going forward ?*: I am being asked by UX team about the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Please help with your votes.

Thank you,

!! Vishwa !!

#1 lore raw
Quoted 1 line

Do we need this going forward ?: I am being asked by UX team about the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Hi,

I am coming from the UX side of how we set the date time settings page up for phosphor-webui downstream recently. We switched our page to use Redfish, here’s how ours is set up now:

There is no longer a “time owner” and the setting is either:
NTPEnabled: true or false
If false, we are not allowing the user to set the time, because the BMC is synching from the host time and therefore any settings we made to the time on the BMC would be overwritten. If true, we use the NTP server(s) the user provides.

We are testing this currently.

author
#2 lore raw
Quoted 10 lines · Kathryn ElaineX
Quoted 2 lines

*Do we need this going forward ?*: I am being asked by UX team about

the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Hi,

I am coming from the UX side of how we set the date time settings page up for phosphor-webui downstream recently. We switched our page to use Redfish, here’s how ours is set up now:

There is no longer a “time owner” and the setting is either:

Quoted 8 lines

NTPEnabled: true or false

If false, we are not allowing the user to set the time, because the BMC is synching from the host time and therefore any settings we made to the time on the BMC would be overwritten.

If true, we use the NTP server(s) the user provides.

We are testing this currently.

Hi, Thank you for the response. From what I interpreted:

- TimeOwner is not settable via GUI
- Irrespective of NTP setting, the user is not allowed to set the time on BMC
- BMC is syncing the time from Host.
   - This means, the current TimeOwner is "Host" and NTP is off. Is that being set as default ?

I am requesting for feedback from the community on the need of TimeOwner feature that we have in Settings and timemanager code.

!! Vishwa !!

Quoted 1 line
author
#3 lore raw

Hello community,

Would be really great if there is any feedback on this.

Have a happy holidays !!

!! Vishwa !!

Quoted 32 lines · vishwa
Quoted 10 lines · Kathryn ElaineX
Quoted 2 lines

*Do we need this going forward ?*: I am being asked by UX team about

the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Hi,

I am coming from the UX side of how we set the date time settings page up for phosphor-webui downstream recently. We switched our page to use Redfish, here’s how ours is set up now:

There is no longer a “time owner” and the setting is either:

Quoted 8 lines

NTPEnabled: true or false

If false, we are not allowing the user to set the time, because the BMC is synching from the host time and therefore any settings we made to the time on the BMC would be overwritten.

If true, we use the NTP server(s) the user provides.

We are testing this currently.

Hi, Thank you for the response. From what I interpreted:

- TimeOwner is not settable via GUI
- Irrespective of NTP setting, the user is not allowed to set the time
on BMC
- BMC is syncing the time from Host.
   - This means, the current TimeOwner is "Host" and NTP is off. Is that being set as default ?

I am requesting for feedback from the community on the need of TimeOwner feature that we have in Settings and timemanager code.

!! Vishwa !!

Quoted 1 line
#4 lore raw
Quoted 51 lines · vishwa

Hello community,

Would be really great if there is any feedback on this.

Have a happy holidays !!

!! Vishwa !!
On 12/11/19 3:24 PM, vishwa wrote:

Quoted 1 line · Kathryn ElaineX

* Do we need this going forward ?*: I am being asked by UX team about

the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Hi,

I am coming from the UX side of how we set the date time settings page up for phosphor-webui downstream recently. We switched our page to use Redfish, here’s how ours is set up now:

There is no longer a “time owner” and the setting is either:

NTPEnabled: true or false

If false, we are not allowing the user to set the time, because the BMC is synching from the host time and therefore any settings we made to the time on the BMC would be overwritten.

If true, we use the NTP server(s) the user provides.

We are testing this currently.

Hi, Thank you for the response. From what I interpreted:

- TimeOwner is not settable via GUI
- Irrespective of NTP setting, the user is not allowed to set the time on BMC
- BMC is syncing the time from Host.
- This means, the current TimeOwner is "Host" and NTP is off. Is that
being set as default ?

Quoted 6 lines

I am requesting for feedback from the community on the need of TimeOwner feature that we have in Settings and timemanager code.

!! Vishwa !!

My 2cents here along with a few questions:

- how does the current time manager interact with systemd-timesyncd?
- From my experience, BMC time can drift a lot easily and it is more useful to have the BMC time synced externally
- Whether NTP or host time is preferred should be left to the platform designer to decide
- sounds like it would be more straightforward to have the 'Owner' reflect one time source: NTP/IPMI/Redfish

Signature · 2 lines
Regards,
Kun
author
#5 lore raw
Quoted 51 lines · Kun Yi

On Wed, Dec 18, 2019 at 7:02 AM vishwa <[email protected] <mailto:[email protected]>> wrote:

Hello community,

Would be really great if there is any feedback on this.

Have a happy holidays !!

!! Vishwa !!

Quoted 37 lines · vishwa
    On 12/11/19 12:17 AM, Pine, Kathryn ElaineX wrote:
Quoted 18 lines
Quoted 2 lines

*Do we need this going forward ?*: I am being asked by UX team

about the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Hi,

I am coming from the UX side of how we set the date time settings page up for phosphor-webui downstream recently. We switched our page to use Redfish, here’s how ours is set up now:

There is no longer a “time owner” and the setting is either:

NTPEnabled: true or false

Quoted 8 lines

If false, we are not allowing the user to set the time, because the BMC is synching from the host time and therefore any settings we made to the time on the BMC would be overwritten.

If true, we use the NTP server(s) the user provides.

We are testing this currently.

Hi, Thank you for the response. From what I interpreted:

- TimeOwner is not settable via GUI
- Irrespective of NTP setting, the user is not allowed to set the time on BMC
- BMC is syncing the time from Host.
   - This means, the current TimeOwner is "Host" and NTP is off. Is that being set as default ?

Quoted 7 lines
Quoted 5 lines

I am requesting for feedback from the community on the need of TimeOwner feature that we have in Settings and timemanager code.

!! Vishwa !!

Quoted 1 line

My 2cents here along with a few questions:
- how does the current time manager interact with systemd-timesyncd?

TimeManager interacts with systemd-timedated, which in turn engages systemd-timesync on setting *NTP *policy.
https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.service.html**

Quoted 2 lines

- From my experience, BMC time can drift a lot easily and it is more useful to have the BMC time synced externally

This is a discussion point for using / not using NTP. It would not impact TimeOwner
https://github.com/openbmc/phosphor-time-manager/blob/master/README.md

Quoted 2 lines

- Whether NTP or host time is preferred should be left to the platform designer to decide

If the setting is NTP, then Host can not set the time on BMC unless the Owner is SPLIT. I believe, you are saying more from a NTP / Non NTP as opposed to TimeOwner ?

Quoted 2 lines

- sounds like it would be more straightforward to have the 'Owner' reflect one time source: NTP/IPMI/Redfish

This is part of TimeSynchronization. TimeOwner is another layer on who owns the time as opposed to how the time is set. Hopefully the README I pointed to before would help.

Thank you,
!! Vishwa !!

Quoted 4 lines
Signature · 3 lines
-- 
Regards,
Kun
author
#6 lore raw

Hi,

Happy New Year ...

btw, looks like TimeOwner may not be of interest for the community ?. Shall we go ahead remove that setting ?

!! Vishwa !!

Quoted 87 lines · vishwa
Quoted 51 lines · Kun Yi

On Wed, Dec 18, 2019 at 7:02 AM vishwa <[email protected] <mailto:[email protected]>> wrote:

Hello community,

Would be really great if there is any feedback on this.

Have a happy holidays !!

!! Vishwa !!

Quoted 37 lines · vishwa
    On 12/11/19 12:17 AM, Pine, Kathryn ElaineX wrote:
Quoted 18 lines
Quoted 2 lines

*Do we need this going forward ?*: I am being asked by UX team

about the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Hi,

I am coming from the UX side of how we set the date time settings page up for phosphor-webui downstream recently. We switched our page to use Redfish, here’s how ours is set up now:

There is no longer a “time owner” and the setting is either:

NTPEnabled: true or false

Quoted 8 lines

If false, we are not allowing the user to set the time, because the BMC is synching from the host time and therefore any settings we made to the time on the BMC would be overwritten.

If true, we use the NTP server(s) the user provides.

We are testing this currently.

Hi, Thank you for the response. From what I interpreted:

- TimeOwner is not settable via GUI
- Irrespective of NTP setting, the user is not allowed to set the time on BMC
- BMC is syncing the time from Host.
   - This means, the current TimeOwner is "Host" and NTP is off. Is that being set as default ?

Quoted 7 lines
Quoted 5 lines

I am requesting for feedback from the community on the need of TimeOwner feature that we have in Settings and timemanager code.

!! Vishwa !!

Quoted 1 line

My 2cents here along with a few questions:
- how does the current time manager interact with systemd-timesyncd?

TimeManager interacts with systemd-timedated, which in turn engages systemd-timesync on setting *NTP *policy.
https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.service.html**

Quoted 2 lines

- From my experience, BMC time can drift a lot easily and it is more useful to have the BMC time synced externally

This is a discussion point for using / not using NTP. It would not impact TimeOwner
https://github.com/openbmc/phosphor-time-manager/blob/master/README.md

Quoted 2 lines

- Whether NTP or host time is preferred should be left to the platform designer to decide

If the setting is NTP, then Host can not set the time on BMC unless the Owner is SPLIT. I believe, you are saying more from a NTP / Non NTP as opposed to TimeOwner ?

Quoted 2 lines

- sounds like it would be more straightforward to have the 'Owner' reflect one time source: NTP/IPMI/Redfish

This is part of TimeSynchronization. TimeOwner is another layer on who owns the time as opposed to how the time is set. Hopefully the README I pointed to before would help.

Thank you,
!! Vishwa !!

Quoted 4 lines
Signature · 3 lines
-- 
Regards,
Kun
author
#7 lore raw

Alright.. This is what I am going ahead with for TimeOwner.

Phase-1 and near term goal: Make "BOTH" as default than what we currently have ( "BMC" )
Phase-2: Modify the code to remove support for HOST / BMC / SPLIT. Code will behave as if it's BOTH

If this breaks any usecase, please let me know.

Thank you,

!! Vishwa !!

Quoted 97 lines · vishwa

Hi,

Happy New Year ...

btw, looks like TimeOwner may not be of interest for the community ?. Shall we go ahead remove that setting ?

!! Vishwa !!

Quoted 88 lines · vishwa
Quoted 52 lines · Kun Yi

On Wed, Dec 18, 2019 at 7:02 AM vishwa <[email protected] <mailto:[email protected]>> wrote:

Hello community,

Would be really great if there is any feedback on this.

Have a happy holidays !!

!! Vishwa !!

Quoted 38 lines · vishwa
    On 12/11/19 12:17 AM, Pine, Kathryn ElaineX wrote:
Quoted 19 lines
Quoted 2 lines

*Do we need this going forward ?*: I am being asked by UX team

about the need of this and I mentioned I would get the community feedback on this. Although, I feel this level of granularity gives control over how we can manage time, it would not justify the complexity if the customers don't appreciate it. Removing the TimeOwner would make the code a lot simpler.

Hi,

I am coming from the UX side of how we set the date time settings page up for phosphor-webui downstream recently. We switched our page to use Redfish, here’s how ours is set up now:

There is no longer a “time owner” and the setting is either:

NTPEnabled: true or false

Quoted 8 lines

If false, we are not allowing the user to set the time, because the BMC is synching from the host time and therefore any settings we made to the time on the BMC would be overwritten.

If true, we use the NTP server(s) the user provides.

We are testing this currently.

Hi, Thank you for the response. From what I interpreted:

- TimeOwner is not settable via GUI
- Irrespective of NTP setting, the user is not allowed to set the time on BMC
- BMC is syncing the time from Host.
   - This means, the current TimeOwner is "Host" and NTP is off. Is that being set as default ?

Quoted 7 lines
Quoted 5 lines

I am requesting for feedback from the community on the need of TimeOwner feature that we have in Settings and timemanager code.

!! Vishwa !!

Quoted 1 line

My 2cents here along with a few questions:
- how does the current time manager interact with systemd-timesyncd?

TimeManager interacts with systemd-timedated, which in turn engages systemd-timesync on setting *NTP *policy.
https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.service.html**

Quoted 2 lines

- From my experience, BMC time can drift a lot easily and it is more useful to have the BMC time synced externally

This is a discussion point for using / not using NTP. It would not impact TimeOwner
https://github.com/openbmc/phosphor-time-manager/blob/master/README.md

Quoted 2 lines

- Whether NTP or host time is preferred should be left to the platform designer to decide

If the setting is NTP, then Host can not set the time on BMC unless the Owner is SPLIT. I believe, you are saying more from a NTP / Non NTP as opposed to TimeOwner ?

Quoted 2 lines

- sounds like it would be more straightforward to have the 'Owner' reflect one time source: NTP/IPMI/Redfish

This is part of TimeSynchronization. TimeOwner is another layer on who owns the time as opposed to how the time is set. Hopefully the README I pointed to before would help.

Thank you,
!! Vishwa !!

Quoted 4 lines
Signature · 3 lines
-- 
Regards,
Kun