Skip to content

check.config false-positives and drops files-plugin inline configlets #3650

Description

@roc-ops

When the files and check.config plugins are enabled together, a valid inline configlets: entry referenced by a node config: list is reported as missing by check.config and never lands on the node.

Repro (netlab 26.07)

provider: clab
plugin: [ files, check.config ]
defaults.device: frr
configlets:
  hello:
    frr: "! hello world configlet"
nodes:
  r1: { config: [ hello ] }
  r2: {}
links: [ r1-r2 ]

netlab create output:

Warning in check.config: Custom configuration hello is missing for device frr (nodes r1)
UserWarning in configs: Cannot find hello configuration template for r1/device frr

-> node_files/r1/ does not contain the configlet.

Control

With plugin: [ files ] only (no check.config), node_files/r1/ does contain the hello configlet. So check.config is the cause. Order-independent — [files, check.config] and [check.config, files] both reproduce.

Root cause

extra/check/config/__init__.py::cleanup() checks config-reference existence at a point where the files plugin (which restructures configlets in extra/files/__init__.py::init() and writes them via its output hook) has not landed the configlet for the node.

Impact

The files plugin is the documented escape hatch for vendor-proprietary config; enabling check.config silently breaks it.

Suggested fix

Make check.config aware of files-plugin-generated configlets (check against the transformed files / custom-config list rather than on-disk state), or reconcile the hook phase ordering; at minimum document the incompatibility.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions