fix(time-sync): switch off the POSIX time sync on QTS #20
No files matched your search
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- `get_time_sync` and `configure_time_sync`, which napalm-linux brings through
|
||||
napalm-device-types' `PosixTimeSyncMixin` (4.35.0), are switched off: QTS has no systemd
|
||||
and no `timedatectl`, and its NTP client and time zone are QTS settings. The POSIX
|
||||
reading would find no client and every write would fail, a difference netOrk could
|
||||
never fix (NetOrk/netork#2370). Needs napalm-device-types 4.35.0.
|
||||
- `remove_local_account_keys`, which napalm-linux 0.17.0 brings, is switched off like the
|
||||
other personal-account actions: QTS manages its users in its own UI (NetOrk/netork#2013).
|
||||
Needs napalm-device-types 4.28.0 and napalm-linux 0.17.0.
|
||||
|
||||
@@ -39,6 +39,7 @@ output is how a driver ends up passing its own tests and failing on a real NAS.
|
||||
| `manage_scheduled_job` | the crontab, then `crontab` + `crond.sh restart`; the firmware's lines only run | ✅ synthetic fixtures |
|
||||
| `put_scheduled_job`, `delete_scheduled_job` | marked lines in `/etc/config/crontab`, as admin | ✅ synthetic fixtures |
|
||||
| `ping`, `ping_sweep` | inherited from `LinuxDriver` | ✅ |
|
||||
| `get_time_sync`, `configure_time_sync` | — (QTS settings; no systemd or `timedatectl`) | switched off until a QTS variant (NetOrk/netork#2370) |
|
||||
| Snapshots, quotas, replication, QPKG install/remove | — | out of scope for v1 |
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -103,6 +103,11 @@ class QnapQtsDriver(StorageDriver, HypervisorDriver, QtsScheduledJobsMixin, Linu
|
||||
lock_local_account = None # type: ignore[assignment]
|
||||
add_service_account = None # type: ignore[assignment]
|
||||
remove_local_account_keys = None # type: ignore[assignment]
|
||||
#: QTS has no systemd and no timedatectl; its NTP client and zone are QTS
|
||||
#: settings. LinuxDriver's POSIX time sync would read no client and fail every
|
||||
#: write: off until a QTS variant is built against a real box (NetOrk/netork#2370).
|
||||
get_time_sync = None # type: ignore[assignment]
|
||||
configure_time_sync = None # type: ignore[assignment]
|
||||
|
||||
SNMP_OBJECT_ID_PREFIX = QNAP_ENTERPRISE_OID
|
||||
SNMP_FINGERPRINT = [
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ classifiers = [
|
||||
# processes, Docker) from LinuxDriver rather than reimplementing it.
|
||||
dependencies = [
|
||||
"napalm>=4.0",
|
||||
"napalm-device-types>=4.28.0",
|
||||
"napalm-device-types>=4.35.0",
|
||||
"napalm-linux>=0.17.0",
|
||||
"netmiko>=4.0.0",
|
||||
"paramiko>=5.0.0", # CVE-2026-44405
|
||||
|
||||
@@ -248,6 +248,19 @@ def test_personal_accounts_are_not_managed_here():
|
||||
assert not callable(getattr(QnapQtsDriver, action, None))
|
||||
|
||||
|
||||
def test_time_sync_is_not_read_or_set_here():
|
||||
"""QTS has no systemd and no ``timedatectl``, and its NTP client and zone are QTS
|
||||
settings: the POSIX reading inherited from LinuxDriver finds no client there, and
|
||||
its write fails. Off until a QTS variant is built against a real box
|
||||
(NetOrk/netork#2370), so netOrk neither reports a difference it cannot fix nor
|
||||
tries to fix it."""
|
||||
from napalm_linux.linux import LinuxDriver
|
||||
|
||||
for method in ("get_time_sync", "configure_time_sync"):
|
||||
assert callable(getattr(LinuxDriver, method, None)), method
|
||||
assert not callable(getattr(QnapQtsDriver, method, None)), method
|
||||
|
||||
|
||||
class TestFixesQtsCannotTake:
|
||||
"""QTS has no apt, dnf or opkg, and its SNMP agent is configured in its own UI:
|
||||
the fix templates inherited from LinuxDriver are switched off (#7), so a
|
||||
|
||||
Reference in new issue
Block a user