Bug 28264 - MCC drakclock does not show NTP is operational (ticked) after selection it at installation, when it in fact is running
Summary: MCC drakclock does not show NTP is operational (ticked) after selection it at...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-31 12:18 CET by christian barranco
Modified: 2024-06-26 22:02 CEST (History)
2 users (show)

See Also:
Source RPM: drakxtools-18.43-1.mga8.src.rpm
CVE:
Status comment:


Attachments
NTP server selection during installation (129.22 KB, image/png)
2021-01-31 12:19 CET, christian barranco
Details
NTP and timezone check in KDE after reboot (572.78 KB, image/png)
2021-01-31 12:20 CET, christian barranco
Details

Description christian barranco 2021-01-31 12:18:58 CET
Description of problem:
I set the NTP server during the installation and, after restart, this setup has disappeared. 

Version-Release number of selected component (if applicable):
Mageia8 beta2 iso

How reproducible: always


Steps to Reproduce:
1.On the Summary page of the installation, click on Configure in front of Timezone
2.Set NTP and its automatic sync
3.Complete the installation and restart
4.Open MCC and go to Manage date and time, the ntp server is not set
5.However, in KDE settings, Set date and time automatically is selected
Comment 1 christian barranco 2021-01-31 12:19:47 CET
Created attachment 12289 [details]
NTP server selection during installation
Comment 2 christian barranco 2021-01-31 12:20:25 CET
Created attachment 12290 [details]
NTP and timezone check in KDE after reboot
Comment 3 Lewis Smith 2021-01-31 21:29:37 CET
Thank you for the report, and the helpful screenshots.
(To clarify the second one, the LH window is KDE time window showing "Set date & time automatically" set; the RH window is the MCC time one showing "Enable Network time Protocol" NOT set).

Can you please look in MCC-System-Control System Services-Control system services by enabling/disabling them to see whether NTP is shown, and if so, with what settings.
Can you also do:
 $ journalctl -b --no-hostname | grep ntp
to look for any NTP entries in the journal.

CC: (none) => lewyssmith
Source RPM: (none) => ntp-4.2.8p15-1.mga8.src.rpm

Comment 4 christian barranco 2021-01-31 22:19:20 CET
(In reply to Lewis Smith from comment #3)
> Thank you for the report, and the helpful screenshots.
> (To clarify the second one, the LH window is KDE time window showing "Set
> date & time automatically" set; the RH window is the MCC time one showing
> "Enable Network time Protocol" NOT set).
It is the correct understanding

> Can you please look in MCC-System-Control System Services-Control system
> services by enabling/disabling them to see whether NTP is shown, and if so,
> with what settings.
> Can you also do:
>  $ journalctl -b --no-hostname | grep ntp
> to look for any NTP entries in the journal.
I need to redo a fresh install in a VM to check that. I activated NTP after taking the snapshot. We'll try it tomorrow.
Comment 5 Lewis Smith 2021-02-01 09:20:00 CET
(In reply to christian barranco from comment #4)
> I need to redo a fresh install in a VM to check that. I activated NTP after
> taking the snapshot. We'll try it tomorrow.
Thank you.
You noted this bug for Mageia8 beta2 iso ; please use the most recent one (RC something) - and say which: the Classic ISO, or one of the Lives. To be unambiguous, for the ISO file you install,
 $ ls -l
shows both the ISO in question, and its date.
Comment 6 Aurelien Oudelet 2021-02-01 14:26:48 CET
The issue here is that systemd has it own NTP client: systemd-timesyncd.

Plasma's systemsettings5 => Regional Settings => Date and Time
There is a checkbox that can enable timesyncd (not an other ntp client like chronyd).
If this checkbox is activated and chronyd is not installed, it uses timesyncd to set time automatically.
If this checkbox is activated and chronyd is installed, it uses timesyncd also, not chrony.

Under MCC, we use chronyd to achieve this settings.
This functionality was built when timesyncd was not available.
We can't intervene on Plasma's code, or we can patch it to not expose this functionality.

To see if timesyncd is activated:
$ timedatectl
Local time: lun. 2021-02-01 14:25:52 CET
           Universal time: lun. 2021-02-01 13:25:52 UTC
                 RTC time: lun. 2021-02-01 13:25:52    
                Time zone: Europe/Paris (CET, +0100)   
System clock synchronized: yes                         <== here it is activated.
              NTP service: active                      <== same
          RTC in local TZ: no

To set ntp servers for timesyncd:
/etc/systemd/timesyncd.conf
Uncomment NTP line and add prefered NTP server DNS.

CC: (none) => ouaurelien

Comment 7 Aurelien Oudelet 2021-02-01 14:28:44 CET
But I agree that setting a NTP client in DrakX should activate it upon reboot on installed system.
Comment 8 Lewis Smith 2021-02-01 14:37:54 CET
Thanks for this expertise.
I think my questions in comment 3 remain valid, though. To see what the end result really is.
Comment 9 Aurelien Oudelet 2021-02-01 15:03:19 CET
(In reply to Lewis Smith from comment #8)
> Thanks for this expertise.
> I think my questions in comment 3 remain valid, though. To see what the end
> result really is.

Agree totally.
Comment 10 christian barranco 2021-02-02 17:49:06 CET
Hi

$ journalctl -b --no-hostname | grep ntp

Feb 02 16:35:03 kernel: Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
Feb 02 17:29:17 chronyd[733]: Selected source 205.206.70.42 (pool.ntp.org)

---------------------
and, in MCC, services :

* chrony is enabled and running
* systemd-timesyncd is stopped and not enabled

---------------------
$  timedatectl

               Local time: Tue 2021-02-02 17:43:08 CET
           Universal time: Tue 2021-02-02 16:43:08 UTC
                 RTC time: Tue 2021-02-02 16:39:54    
                Time zone: Europe/Paris (CET, +0100)  
System clock synchronized: yes                        
              NTP service: active                     
          RTC in local TZ: no    

----------------------
I still use standard installation with the beta2 iso as nothing more recent is available yet:
4574445568 janv.  8 09:58 Mageia-8-beta2-x86_64.iso
Comment 11 Lewis Smith 2021-02-02 21:41:53 CET
Thank you for all this extra information. ('timedatectl' is certainly a neat command).
Fortunately it shows that NTP synchronisation *is* happening; and that the correct 'service' (chronyd for MCC) is running. Which seems to put the installer in the clear.

From comment 6 (re Plasma):
> There is a checkbox that can enable timesyncd (not an other ntp client
> like chronyd).
> If this checkbox is activated and chronyd is not installed,
> it uses timesyncd to set time automatically.
> If this checkbox is activated and chronyd is installed,
> it uses timesyncd also, not chrony.
This could be summarised "it [Plasma] uses timesyncd both ways". Which does not look correct here, because (previous comment):
> * systemd-timesyncd is stopped and not enabled
yet the Plasma time window shows "Set date & time automatically".
Not to worry! That is not in question.

Which brings the issue back simply to 'drakclock' not displaying the fact that NTP is in operation. I hope the amended title is right...

Assigning to the Mageia tools group.

CC: lewyssmith => (none)
Assignee: bugsquad => mageiatools
Component: Installer => RPM Packages
Summary: NTP server setup doesn't survive the installation => MCC drakclock does not show NTP is operational (ticked) after selection it at installation, when it in fact is running
Source RPM: ntp-4.2.8p15-1.mga8.src.rpm => drakxtools-18.43-1.mga8.src.rpm

Comment 12 Angelo Naselli 2021-02-04 07:45:33 CET
fwiw manaclock managed timesyncd, that code should be easy to add in drakxclock.

CC: (none) => anaselli

Lewis Smith 2024-06-26 22:02:21 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=33325


Note You need to log in before you can comment on or make changes to this bug.