Page MenuHomeVyOS Platform

`vyos_net_name` locking logic is broken
In progress, HighPublicBUG

Description

In the vyos_net_name file, the locking relies on the threading.Lock() object, which is incorrect, because this object exists inside a process. As a result, locking is efficiently disabled.

Because of this mistake and udev nature, multiple vyos_net_name scripts can run simultaneously, which often leads to returning the same name for multiple interfaces (probably, there can be extra reasons for this inside biosdevname or other parts, but it is out of scope for this specific bug).

The locking should be rewritten to avoid this kind of issue.

Details

Difficulty level
Normal (likely a few hours)
Version
1.5-rolling-202407021839, 1.4
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

zsdc changed the task status from Open to In progress.
zsdc claimed this task.
zsdc triaged this task as High priority.
zsdc added a project: VyOS 1.4 Sagitta.
zsdc changed Why the issue appeared? from Will be filled on close to Implementation mistake.

PR for 1.4: https://github.com/vyos/vyos-1x/pull/3806

PR for 1.5 will be created automatically by Mergify after 1.4 will be merged.