time sync: read (and set) QTS's NTP servers and zone (switched off until verified) #21

Open
opened 2026-11-11 14:19:57 +00:00 by christianmanivong · 0 comments
Owner

QTS keeps its NTP client and time zone as QTS settings in /etc/config/uLinux.conf, not in chrony/systemd-timesyncd/timedatectl. Since NAPALM/napalm-qnap-qts#20 the get_time_sync and configure_time_sync that napalm-linux inherits from napalm-device-types' PosixTimeSyncMixin are switched off on QTS (NetOrk/netork#2370), so netOrk neither reads nor aligns a QNAP's time settings.

To build, against a real box

  • Harvest getcfg output for the time settings (System / Time Zone, which scheduled jobs already read, the NTP section and its server and enable keys) on QTS 4.x and 5.x (tools/harvest.sh).
  • get_time_sync(): the servers and the zone from those keys. synchronized comes from whatever QTS exposes, else None. daemon is None, because the client is QTS's own.
  • configure_time_sync() only once it is clear how QTS applies a change made with setcfg (which init script, and whether the web UI's own apply is needed). Otherwise leave time_sync_writes empty and configure_time_sync = None.
  • The read has to be side-effect free and cheap: netOrk reads it on every poll and aligns a differing device automatically.

Until then, the opt-out stays.

QTS keeps its NTP client and time zone as QTS settings in `/etc/config/uLinux.conf`, not in chrony/systemd-timesyncd/`timedatectl`. Since NAPALM/napalm-qnap-qts#20 the `get_time_sync` and `configure_time_sync` that napalm-linux inherits from napalm-device-types' `PosixTimeSyncMixin` are switched off on QTS (NetOrk/netork#2370), so netOrk neither reads nor aligns a QNAP's time settings. ## To build, against a real box - Harvest `getcfg` output for the time settings (`System` / `Time Zone`, which scheduled jobs already read, the NTP section and its server and enable keys) on QTS 4.x and 5.x (`tools/harvest.sh`). - `get_time_sync()`: the servers and the zone from those keys. `synchronized` comes from whatever QTS exposes, else None. `daemon` is None, because the client is QTS's own. - `configure_time_sync()` only once it is clear how QTS applies a change made with `setcfg` (which init script, and whether the web UI's own apply is needed). Otherwise leave `time_sync_writes` empty and `configure_time_sync = None`. - The read has to be side-effect free and cheap: netOrk reads it on every poll and aligns a differing device automatically. Until then, the opt-out stays.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-qnap-qts#21