Repository navigation
fix(dcim): skip offline Proxmox nodes in node interface sync - #279
Merged
emersonfelipesp merged 3 commits intoNov 30, 2026
Conversation
An offline cluster member cannot serve /nodes/{node}/network (Proxmox
answers 595), which raised a ProxboxException and aborted the whole
network-interfaces stage for every other node. Skip nodes that the
cluster status reports as offline with a structured node_offline stage
warning, so the stage finishes degraded instead of failing.
The node interface sync guard shifts the source lines and digest of proxbox_api/routes/dcim/__init__.py, so the committed mounted-operation contracts and integrity record are regenerated with scripts/mounted_operation_inventory.py generate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thank you for the clear report, the regression test, and the verification on a real cluster. Merged as a squash commit that credits you as the author. Before merging I made two additions to the branch:
The full test suite and CI passed afterwards. The Docker individual-sync problem in #278 is tracked separately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When one member of a Proxmox cluster is offline, the full update fails in the
network-interfacesstage for all nodes:create_all_device_interfaces()loops overcluster_status.node_listand callsload_proxmox_node_network()for every node. For an offline node Proxmox answersGET /nodes/<node>/networkwith 595 (no route to host). The resultingProxboxExceptionis not handled per node, so the stage stops and none of the online nodes get their interfaces/IPs synced. There is also no node-level scope on the sync job to work around it.Fix
Skip nodes that the cluster status already reports as
online: false, log a warning, and record a structured stage warning:{"device": "<node>", "cluster": "<cluster>", "kind": "node_offline", "reason": "Proxmox reports the node as offline; node interface sync skipped."}The stage then returns a
WarningList, so it finishes degraded instead of failing. Other stages already behave like this for offline nodes (backup discovery and task history only log warnings).The change is limited to the offline case. A node that is reported online but fails to answer still raises as before.
Tests
test_batch_node_interface_sync_skips_offline_node_with_warning: two nodes, one offline. Asserts that only the online node's network endpoint is called, the offline node is never looked up in NetBox, its interface is synced, and the result is degraded with thenode_offlinewarning. It fails onmainand passes with the fix.tests/test_node_interface_sync.py: 10 passed.test_*node*,test_*interface*,test_full_update*,test_api_routes,test_vm_sync,test_network*,test_netbox_branch_header): 335 passed.ruff checkandruff format --checkare clean on the touched files.Verified on a real cluster
proxbox-api 0.0.33 + this patch (built with
--target raw), netbox-proxbox 0.0.33, NetBox 4.7.6, Proxmox VE 9.3.1, 6 nodes with 1 offline:network-interfaces, 0 VM interfaces, 0 node interfacesSkipping node interface sync for offline Proxmox node <node>, and 114 VM interfaces, 105 node interfaces and the guest IPs were syncedRelated: #278 (another failure mode in Docker deployments).