Repository navigation
Conversation
On mock boxes cuems-nodeconf is stubbed out (the real daemon would rewrite network_map.xml from avahi on a public VPS), so the engine refused every adopt/unadopt from the UI with "cuems-nodeconf is not running". mock_nodeconf serves /tmp/nodeconf.ipc like cuems-nodeconf and handles nodelist_modify by flipping <adopted> in network_map.xml: same rules (an offline node cannot be adopted, the master cannot be unadopted, unknown uuid is an error), validated against the network_map.xsd the engine reads with, written atomically. No discovery: the nodes the box lists stay as they are. Run it as `python3 -m cuemsengine.scripts.mock_nodeconf [--map PATH]`.
This branch has not been deployed
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.
ClickUp: 869fhghhe · Packaging:
debian/mock-nodeconf-dropin(PR againstdebian/bookworm)Problem
On mock boxes (dev.stagelab.coop)
cuems-nodeconfis stubbed out (ExecStart=/bin/true). The real daemon would rewritenetwork_map.xmlfrom whatever avahi hears on the LAN, and on a public VPS that would wipe the box's invented nodes. So the engine refused every adopt/unadopt from the UI with "cuems-nodeconf is not running", and the node adoption UI (#32) could not be exercised there.Change (mock script only)
New
scripts/mock_nodeconf.py, run aspython3 -m cuemsengine.scripts.mock_nodeconf [--map PATH]:/tmp/nodeconf.ipc(NNG Rep, mode 0666) likecuems-nodeconf, and answers every request.nodelist_modifyADD/REMOVE flips<adopted>innetwork_map.xml. Same rules as nodeconf: an offline node cannot be adopted, the master cannot be unadopted, an unknown uuid is an error, and "already (un)adopted" is OK.network_map.xsdthe engine reads with, then renamed atomically over the file. Other fields are kept verbatim.Test plan
network_map.xml; ADD+REMOVE leaves the nodes block identical/ws, as the settings page sends it: ADD → OK +<adopted>True, ADD again → OK, REMOVE → OK +<adopted>False, REMOVE master → "Cannot unadopt master node"; the engine logs "network_map reloaded after a node list change"; load/GO/STOP unaffected