Bug#889010: should it rather be network online target in the service file?

2018-02-07 Thread Christian Ehrhardt
On Tue, Feb 6, 2018 at 4:47 PM, Vincent Blut  wrote:
> Control: tags -1 moreinfo
>
> Hi Christian,
>
> On Thu, Feb 01, 2018 at 09:43:07AM +0100, Christian Ehrhardt wrote:
>>
>> Package: chrony
>> Version: 3.2-2
>>
>> Description:
>> Conversions of old $network behavior should be on online target [2].
>> And I think for chrony it makes sense to start when it really is
>> online to not rely too much on the hooks to set it online.
>
>
> Prior to the 3.0-1 release, we used to heavily rely on the hooks as the time
> sources weren’t polled by chronyd due to the use of the “offline” option.
> This behaviour wasn’t satisfactory to me, so I decided it was time to change
> it for Debian Stretch so what's happening now is:
>   - If the network is up:
>- chronyd starts
>- chronyc online runs, but doesn't actually do anything
>- names are resolved
>- sources are added as online
>- burst is executed
>
>- If the network is down:
>- chronyd starts
>- chronyc online doesn't run
>- chronyd is periodically trying, in exponentially increasing
> interval, to resolve the pool.ntp.org name, but fails
>- network is up
>- chronyc online runs from the hooks
>- chronyd resolves the name
>- sources are added as online
>- burst is executed
>
> Also, I think chronyd should be started quite early so the clock frequency
> offset is set from the drift file. It should also be noted that when used
> with a reference clock, chronyd does not necessarily need network nor DNS.

Thanks for your explanations Vincent - I think you are right.
We will need to make sure the hooks work for us (=Ubuntu) which might
in some scenarios be an issue but is being worked on.
I agree to keeping it starting as it is right now.
Closing bug ...

> However, if starting chronyd after the network is fully up is something you
> really are looking for, I think you should start it after nss-lookup.target‽
>
>> Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1746458
>> Fix-in-Review:
>> https://git.launchpad.net/~paelzer/ubuntu/+source/chrony/commit/?id=2baea8e0bde5d6a1de60098019fb658a4a94d489
>>
>> [1]:
>> https://code.launchpad.net/~paelzer/ubuntu/+source/chrony/+git/chrony/+merge/336844
>> [2]: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
>>
>> --
>> Christian Ehrhardt
>> Software Engineer, Ubuntu Server
>> Canonical Ltd
>
>
> Cheers,
> Vincent



-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd



Bug#889010: should it rather be network online target in the service file?

2018-02-06 Thread Vincent Blut

Control: tags -1 moreinfo

Hi Christian,

On Thu, Feb 01, 2018 at 09:43:07AM +0100, Christian Ehrhardt wrote:

Package: chrony
Version: 3.2-2

Description:
Conversions of old $network behavior should be on online target [2].
And I think for chrony it makes sense to start when it really is
online to not rely too much on the hooks to set it online.


Prior to the 3.0-1 release, we used to heavily rely on the hooks as the 
time sources weren’t polled by chronyd due to the use of the “offline” 
option. This behaviour wasn’t satisfactory to me, so I decided it was 
time to change it for Debian Stretch so what's happening now is:
   
   - If the network is up:

   - chronyd starts
   - chronyc online runs, but doesn't actually do anything
   - names are resolved
   - sources are added as online
   - burst is executed

   - If the network is down:
   - chronyd starts
   - chronyc online doesn't run
   - chronyd is periodically trying, in exponentially increasing 
 interval, to resolve the pool.ntp.org name, but fails

   - network is up
   - chronyc online runs from the hooks
   - chronyd resolves the name
   - sources are added as online
   - burst is executed

Also, I think chronyd should be started quite early so the clock 
frequency offset is set from the drift file. It should also be noted 
that when used with a reference clock, chronyd does not necessarily need 
network nor DNS.


However, if starting chronyd after the network is fully up is something 
you really are looking for, I think you should start it after 
nss-lookup.target‽


Ubuntu-Bug: 
https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1746458
Fix-in-Review: 
https://git.launchpad.net/~paelzer/ubuntu/+source/chrony/commit/?id=2baea8e0bde5d6a1de60098019fb658a4a94d489


[1]: 
https://code.launchpad.net/~paelzer/ubuntu/+source/chrony/+git/chrony/+merge/336844
[2]: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd


Cheers,
Vincent


signature.asc
Description: PGP signature


Bug#889010: should it rather be network online target in the service file?

2018-02-01 Thread Christian Ehrhardt
Package: chrony
Version: 3.2-2

Hi,
I recently took a spike of activity on Chrony in Ubuntu with some
testing and checking older bugs on it. There are Ubuntu only changes
(like custom time servers), but some might qualify to be considered
for Debian as well.
So I wanted to open bugs for each of them to be discussed.
We currently have a merge proposal up for Ubuntu at [1], and I'll link
the fixes that are currently in review for you directly per-topic.

In case we modify the fixes due tot he review I'll keep you updated.


Description:
Conversions of old $network behavior should be on online target [2].
And I think for chrony it makes sense to start when it really is
online to not rely too much on the hooks to set it online.
In the sense of [2] it is "client software that cannot operate without
network" as it need to sync time from/to somewhere.

Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1746458
Fix-in-Review: 
https://git.launchpad.net/~paelzer/ubuntu/+source/chrony/commit/?id=2baea8e0bde5d6a1de60098019fb658a4a94d489

[1]: 
https://code.launchpad.net/~paelzer/ubuntu/+source/chrony/+git/chrony/+merge/336844
[2]: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd