Openbmc archive at lore.kernel.org
 help / color / Atom feed
* adding sync method in phosphor-time-manager
@ 2020-10-06 17:38 Velumani T-ERS,HCLTech
  2020-10-06 21:41 ` Richard Hanley
  2020-10-07  1:34 ` Patrick Williams
  0 siblings, 2 replies; 5+ messages in thread
From: Velumani T-ERS,HCLTech @ 2020-10-06 17:38 UTC (permalink / raw)
  To: openbmc; +Cc: Patrick Williams


[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]

Classification:
Hi Team,

We wanted to add another time sync method in phosphor-time-manager to get the time from the host and set it to BMC. To have this option configurable I propose a dbus property in the time interface(given below). Please provide your feedback/comments.

https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Time/Synchronization.interface.yaml
enumerations:
    - name: Method
      description: >
        Possible methods of time synchronization.
      values:
        - name: NTP
          description: >
            Sync by using the Network Time Protocol.
        - name: Manual
          description: >
            Sync time manually.
         - name: HostSync
          description: >
            Sync the time from host.

Regards,
Velu
::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
________________________________

[-- Attachment #2: Type: text/html, Size: 5127 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding sync method in phosphor-time-manager
  2020-10-06 17:38 adding sync method in phosphor-time-manager Velumani T-ERS,HCLTech
@ 2020-10-06 21:41 ` Richard Hanley
  2020-10-07  1:38   ` Patrick Williams
  2020-10-07  1:34 ` Patrick Williams
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Hanley @ 2020-10-06 21:41 UTC (permalink / raw)
  To: Velumani T-ERS,HCLTech; +Cc: openbmc, Patrick Williams


[-- Attachment #1: Type: text/plain, Size: 2647 bytes --]

I think it makes a lot of sense to make this configurable. However, I
wonder if we should consider making it a collection with a priority levels
instead of a single enum. I can envision a need for someone to say, "Use
NTP when it's available, but if the network is down then use the host."

While we're on the subject, has anyone ever taken a look at using roughtime
on a BMC? I imagine it could a really valuable extension to
phosphor-time-manager some time in the future.
https://blog.cloudflare.com/roughtime/

Regards,
Richard

On Tue, Oct 6, 2020 at 10:40 AM Velumani T-ERS,HCLTech <velumanit@hcl.com>
wrote:

> Classification:
>
> Hi Team,
>
>
>
> We wanted to add another time sync method in phosphor-time-manager to get
> the time from the host and set it to BMC. To have this option configurable
> I propose a dbus property in the time interface(given below). Please
> provide your feedback/comments.
>
>
>
>
> https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Time/Synchronization.interface.yaml
>
> enumerations:
>
>     - name: Method
>
>       description: >
>
>         Possible methods of time synchronization.
>
>       values:
>
>         - name: NTP
>
>           description: >
>
>             Sync by using the Network Time Protocol.
>
>         - name: Manual
>
>           description: >
>
>             Sync time manually.
>
>          - name: HostSync
>
>           description: >
>
>             Sync the time from host.
>
>
>
> Regards,
>
> Velu
> ::DISCLAIMER::
> ------------------------------
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only. E-mail transmission is not
> guaranteed to be secure or error-free as information could be intercepted,
> corrupted, lost, destroyed, arrive late or incomplete, or may contain
> viruses in transmission. The e mail and its contents (with or without
> referred errors) shall therefore not attach any liability on the originator
> or HCL or its affiliates. Views or opinions, if any, presented in this
> email are solely those of the author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction,
> dissemination, copying, disclosure, modification, distribution and / or
> publication of this message without the prior written consent of authorized
> representative of HCL is strictly prohibited. If you have received this
> email in error please delete it and notify the sender immediately. Before
> opening any email and/or attachments, please check them for viruses and
> other defects.
> ------------------------------
>

[-- Attachment #2: Type: text/html, Size: 4328 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding sync method in phosphor-time-manager
  2020-10-06 17:38 adding sync method in phosphor-time-manager Velumani T-ERS,HCLTech
  2020-10-06 21:41 ` Richard Hanley
@ 2020-10-07  1:34 ` Patrick Williams
  1 sibling, 0 replies; 5+ messages in thread
From: Patrick Williams @ 2020-10-07  1:34 UTC (permalink / raw)
  To: Velumani T-ERS,HCLTech; +Cc: openbmc, Patrick Williams


[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]

On Tue, Oct 06, 2020 at 05:38:13PM +0000, Velumani T-ERS,HCLTech wrote:
> Classification:
> Hi Team,
> 
> We wanted to add another time sync method in phosphor-time-manager to get the time from the host and set it to BMC. To have this option configurable I propose a dbus property in the time interface(given below). Please provide your feedback/comments.
> 
> https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Time/Synchronization.interface.yaml
> enumerations:
>     - name: Method
>       description: >
>         Possible methods of time synchronization.
>       values:
>         - name: NTP
>           description: >
>             Sync by using the Network Time Protocol.
>         - name: Manual
>           description: >
>             Sync time manually.
>          - name: HostSync
>           description: >
>             Sync the time from host.
> 

Hopefully Vishwa can weigh in here.

It is my understanding that the default implementation allows the host
to synchronize the time down already.  There use to be an interface that
determined the "TimeOwner" to specify if the BMC or the Host were in
charge of the time.  That was removed not too long ago.

https://github.com/openbmc/phosphor-dbus-interfaces/commit/70c76a29b898f05e28c803808bd57a2b6c3f7a6f

I think you should look through the history on this commit (it
references a discussion related to the mailing list) and check with the
people in that chain as to why it was removed before we add back in
something very similar.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding sync method in phosphor-time-manager
  2020-10-06 21:41 ` Richard Hanley
@ 2020-10-07  1:38   ` Patrick Williams
  2020-10-07 17:18     ` Velumani T-ERS,HCLTech
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Williams @ 2020-10-07  1:38 UTC (permalink / raw)
  To: Richard Hanley; +Cc: openbmc, Velumani T-ERS, HCLTech, Patrick Williams


[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

On Tue, Oct 06, 2020 at 02:41:29PM -0700, Richard Hanley wrote:
> While we're on the subject, has anyone ever taken a look at using roughtime
> on a BMC? I imagine it could a really valuable extension to
> phosphor-time-manager some time in the future.
> https://blog.cloudflare.com/roughtime/

One of the problems I see is that there are a few different proposals
for "next generation time" protocols beyond NTP.  Unless a project
member has an explicit requirement for one of them, it doesn't seem like
we should go out of our way to pick one of them.  If someone is
especially interested in implementing one of them in their spare time
though, they're more than welcome.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: adding sync method in phosphor-time-manager
  2020-10-07  1:38   ` Patrick Williams
@ 2020-10-07 17:18     ` Velumani T-ERS,HCLTech
  0 siblings, 0 replies; 5+ messages in thread
From: Velumani T-ERS,HCLTech @ 2020-10-07 17:18 UTC (permalink / raw)
  To: Patrick Williams, Richard Hanley; +Cc: openbmc, Patrick Williams

Classification: HCL Internal

Time owner module was a different module which decides who owns the time BMC/host and set the time using NTP mode or Manual Mode.
in Time owner module ,user set the host time using the below command manually by providing  the time.
busctl set-property xyz.openbmc_project.Time.Manager \
       /xyz/openbmc_project/time/host xyz.openbmc_project.Time.EpochTime \
                   Elapsed t <value-in-microseconds>

we are now actually not repeating the time owner implementation instead we are adding one more mode(HostSync) to time manager setting.
    a.NTP
    b.Manual
    c.HostSync

    How HostSync intent to work:
                1.host sync mode will get time from the host.
                   1.1 Add an empty system service file in this repo and spawn this service when HostSync enabled
                   1.2 This service file can be override by the platform machine layer.
                   1.3 The platform machine layer install the service file and the shell script to get the time from host.
                 2.it will set the time to BMC using the shell script.
Regards,
Velu
-----Original Message-----
From: Patrick Williams <patrick@stwcx.xyz>
Sent: Wednesday, October 7, 2020 7:08 AM
To: Richard Hanley <rhanley@google.com>
Cc: Velumani T-ERS,HCLTech <velumanit@hcl.com>; openbmc@lists.ozlabs.org; Patrick Williams <patrickw3@fb.com>
Subject: Re: adding sync method in phosphor-time-manager

On Tue, Oct 06, 2020 at 02:41:29PM -0700, Richard Hanley wrote:
> While we're on the subject, has anyone ever taken a look at using
> roughtime on a BMC? I imagine it could a really valuable extension to
> phosphor-time-manager some time in the future.
> https://blog.cloudflare.com/roughtime/

One of the problems I see is that there are a few different proposals for "next generation time" protocols beyond NTP.  Unless a project member has an explicit requirement for one of them, it doesn't seem like we should go out of our way to pick one of them.  If someone is especially interested in implementing one of them in their spare time though, they're more than welcome.

--
Patrick Williams
::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 17:38 adding sync method in phosphor-time-manager Velumani T-ERS,HCLTech
2020-10-06 21:41 ` Richard Hanley
2020-10-07  1:38   ` Patrick Williams
2020-10-07 17:18     ` Velumani T-ERS,HCLTech
2020-10-07  1:34 ` Patrick Williams

Openbmc archive at lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/openbmc/0 openbmc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 openbmc openbmc/ https://lore.kernel.org/openbmc \
		openbmc@lists.ozlabs.org openbmc@ozlabs.org
	public-inbox-index openbmc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.openbmc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git