custom ntp server in phosphor-networkd

Johnathan Mantey johnathanx.mantey at intel.com
Wed Aug 28 00:52:12 AEST 2019


Ratan, Alexander,

I've pushed code to improve DHCP recently which may be of value in this
instance.

https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/24665
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-networkd/+/24666
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/24725

This implements a greater set of control over the DHCP from Redfish.  I
believe I tested using DHCP, while UseNTPServers = false was active.  I
then explicitly defined a static NTP server from one of the Intel
chimers.  I was able to get my clock updated from the assigned NTP
server.  Prior to this change NTP requests to the google chimers went
unanswered, as our BMC network can't get to the internet.

On 8/27/19 3:32 AM, Ratan Gupta wrote:
> On 27/08/19 1:13 PM, Alexander A. Filippov wrote:
>> On Mon, Aug 26, 2019 at 10:23:15AM -0700, Vernon Mauery wrote:
>>> This is pretty common behavior for DHCP settings.
>> On Tue, Aug 27, 2019 at 11:28:36AM +0530, Ratan Gupta wrote:
>>> Why this is wrong,
>> Ok, ok.  I wasn't clear enough. My appologies.
>>
>> I've meant that the impossibility to add a custom ntp server while dhcp is
>> enabled is wrong. Of course, the list of ntp servers received from DHCP-server
>> must be used. And I propose to move only manual settings.
>>
>> I believe that it is a same stuff with DNS-servers, routes. But probably, the
>> BMC is not such kind of devices which is required such deep settings. One of the
>> possible reasons was specified by Vernon quoted below:
>>
>> On Mon, Aug 26, 2019 at 10:23:15AM -0700, Vernon Mauery wrote:
>>> It seems to me that if you are using static settings for your network, 
>>> then you would also have static (or user-supplied) settings for NTP and 
>>> DNS. But if you are using DHCP for the network, it would make sense to 
>>> use the NTP and DNS settings supplied by the DHCP server.
>>>
>>> Now it might also be nice to have some reasonable defaults for NTP 
>>> servers. It is not uncommon to have IP gateways also be NTP servers, so 
>>> it might be reasonable to attempt to use the gateway as an NTP server if 
>>> none was specified in the DHCP response. I don't like the idea of 
>>> setting the default NTP server to be something that is globally 
>>> addressable because that makes the assumption that the BMC can reach 
>>> global networks, which should not be the case.
> I have the following suggestion
>
>
> => By default all the DHCP optional parameters will be set to
> false(i.e Don't ask the optional info from the DHCP server) => If
> users wants the DHCP provided configuration then it has to set the
> specific optional parameters to true(Say NTPEnabled=true). => User
> configures the Static NTP => Check if DHCP is enabled then look for
> the DHCP configuration parameters, if "NTP Enabled is true"
> then user wants the NTP server from the DHCP and in that case don't
> allow the static configuration.
> => if DHCP is enabled but in DHCP configuration parameters "NTP
> Enabled is false"
> then user doesn't want the NTP server from the DHCP and allow the
> static configuration.
>
> Link:
> https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Network/DHCPConfiguration.interface.yaml
>
> Note: It may happen that user has set DHCP Configuration parameters on
> the BMC to take the NTP server details from the
> DHCP server but have not configured the DHCP server to provide the NTP
> server, in that case
> Static NTP server configuration will not be allowed.
>> On Tue, Aug 27, 2019 at 11:28:36AM +0530, Ratan Gupta wrote:
>>>  * The NTP servers defined in|/etc/systemd/timesyncd.conf|will be
>>>    appended to the per-interface list at runtime and the daemon will
>>>    contact the servers in turn until one is found that responds.
>> So, my propose is to implement this point.
>>
>> Regards,
>> Alexander
>>

-- 
Johnathan Mantey
Senior Software Engineer
*azad te**chnology partners*
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: johnathanx.mantey at intel.com <mailto:johnathanx.mantey at intel.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190827/a5093798/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190827/a5093798/attachment.sig>


More information about the openbmc mailing list