DNF_SECURITY_COMMAND refreshes repository metadata instead of reading the cache #76

Closed
opened 2026-11-02 04:21:48 +00:00 by christianmanivong · 0 comments
Owner

What happens

DNF_SECURITY_COMMAND (napalm_device_types/package_updates.py:32) runs dnf updateinfo list --security --quiet. dnf downloads and parses fresh repository metadata whenever the cached copy has expired, so the query can take minutes, and it runs inside a poll that has 120 s for everything. Seen on an Oracle Linux 9.8 host on OCI, where every poll timed out (NAPALM/napalm-linux#59).

Expected

The query reads only the cached metadata (dnf --cacheonly …), like APT_UPGRADABLE_COMMAND does for apt. Refreshing the index is a separate step (refresh_available_updates → dnf makecache), which netOrk runs once a day per host. Without a cache, dnf fails at once, and the __DNF_RC marker already turns that into "security unknown" rather than "not a security fix".

Priority: P2 — same impact as NAPALM/napalm-linux#59, which needs both halves fixed.

## What happens `DNF_SECURITY_COMMAND` (`napalm_device_types/package_updates.py:32`) runs `dnf updateinfo list --security --quiet`. dnf downloads and parses fresh repository metadata whenever the cached copy has expired, so the query can take minutes, and it runs inside a poll that has 120 s for everything. Seen on an Oracle Linux 9.8 host on OCI, where every poll timed out (NAPALM/napalm-linux#59). ## Expected The query reads only the cached metadata (`dnf --cacheonly …`), like `APT_UPGRADABLE_COMMAND` does for apt. Refreshing the index is a separate step (`refresh_available_updates` → `dnf makecache`), which netOrk runs once a day per host. Without a cache, dnf fails at once, and the `__DNF_RC` marker already turns that into "security unknown" rather than "not a security fix". Priority: P2 — same impact as NAPALM/napalm-linux#59, which needs both halves fixed.
christianmanivong added the
prio
P2
bug
labels 2026-11-02 04:21:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-device-types#76