From 3249298cbdd8372f5588045ee3894a56eef75552 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Thu, 3 Sep 2026 14:41:32 -0300 Subject: [PATCH] fix(xcat-core): site.ntpbackend is not documented anywhere makentp reads site.ntpbackend to select the NTP daemon, and setupntp takes the same value as --backend, but no help text names the attribute. An admin who needs ntpd on a host that has chrony has no way to find out the attribute exists. site.dhcpbackend, which selects the DHCP implementation the same way, is documented in the site table help. The site table description in xCAT::Schema now carries ntpbackend beside ntpservers, with its valid values and the auto default. The makentp man page lists it with the other site attributes the command honors, and names the setupntp --backend option that carries the value to the nodes. ntp_backend_selection.t reads the site help from the loaded schema and the makentp pod. Five assertions fail without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- .../source/guides/admin-guides/references/man1/makentp.1.rst | 2 ++ perl-xCAT/xCAT/Schema.pm | 5 +++++ xCAT-client/pods/man1/makentp.1.pod | 2 ++ 3 files changed, 9 insertions(+) diff --git a/docs/source/guides/admin-guides/references/man1/makentp.1.rst b/docs/source/guides/admin-guides/references/man1/makentp.1.rst index 16a259df4..c0a3572d6 100644 --- a/docs/source/guides/admin-guides/references/man1/makentp.1.rst +++ b/docs/source/guides/admin-guides/references/man1/makentp.1.rst @@ -32,6 +32,8 @@ By default, it sets up the NTP server for xCAT management node. If \ **-a**\ fl \ *site.ntpservers*\ -- the NTP servers for the service node and compute node to sync with. The keyword means that the node's NTP server is the node that is managing it (either its service node or the management node). +\ *site.ntpbackend*\ -- the NTP daemon to configure. Valid values are auto, chrony, and ntpd. The default is auto, which selects chrony on distributions that ship it and ntpd on older ones such as EL6 and SLES 12. If the selected daemon is not installed, \ **makentp**\ uses the other one and reports the change. The same value reaches the service nodes and the compute nodes, which the \ *setupntp*\ postscript also accepts as \ **-**\ **-backend chrony|ntpd**\ . + To setup NTP on the compute node, add \ *setupntp*\ postscript to the \ *postscripts*\ table and run \ **updatenode node -P setupntp**\ command. diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 4fcc49c6d..e1317827d 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -1283,6 +1283,11 @@ passed as argument rather than by table value', " give stable output. You can increase the timeout value by specifying \n" . " '--min-rtt-timeout 1s'. xCAT will append the options defined here to \n" . " the nmap command.\n\n" . +" ntpbackend: The NTP daemon used by makentp and the setupntp postscript. Valid\n" . +" values are auto, chrony, and ntpd. The default is auto. In auto\n" . +" mode, xCAT uses chrony on distributions that ship it and ntpd on\n" . +" older ones such as EL6 and SLES 12. If the selected daemon is not\n" . +" installed, xCAT uses the other one and reports the change.\n\n" . " ntpservers: A comma delimited list of NTP servers for the service node and\n" . " the compute node to sync with. The keyword means that\n" . " the node's NTP server is the node that is managing it\n" . diff --git a/xCAT-client/pods/man1/makentp.1.pod b/xCAT-client/pods/man1/makentp.1.pod index 092d58793..6394c515a 100644 --- a/xCAT-client/pods/man1/makentp.1.pod +++ b/xCAT-client/pods/man1/makentp.1.pod @@ -26,6 +26,8 @@ I -- the NTP servers for the management node to sync with. I I -- the NTP servers for the service node and compute node to sync with. The keyword means that the node's NTP server is the node that is managing it (either its service node or the management node). +I -- the NTP daemon to configure. Valid values are auto, chrony, and ntpd. The default is auto, which selects chrony on distributions that ship it and ntpd on older ones such as EL6 and SLES 12. If the selected daemon is not installed, B uses the other one and reports the change. The same value reaches the service nodes and the compute nodes, which the I postscript also accepts as B<--backend chrony|ntpd>. + =back To setup NTP on the compute node, add I postscript to the I table and run B command.