Page MenuHomeVyOS Platform

`vyos_net_name` locking logic is broken
Closed, ResolvedPublicBUG

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

Version
1.5-rolling-202407021839, 1.4
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 edited a custom field.

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.

syncer moved this task from Open to Finished on the VyOS 1.5 Circinus board.
syncer moved this task from Backlog to Finished on the VyOS 1.4 Sagitta (1.4.1) board.
syncer moved this task from Need Triage to Completed on the VyOS Rolling board.