2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-28 09:36:41 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
Markus Hilger 8a3fce85c0 Fix undefined names (F821)
Every one of these raises NameError if its code path is reached:

- nodeapply: run_automation accumulated into an exitcode that only existed
  in run(), so any automation error crashed instead of being reported.  It
  now keeps and returns its own, tracked separately from the exit code of
  the ssh commands: the early exit after the spawn loop tests that one,
  and folding automation failures into it would exit with children already
  running and their pipes abandoned.  Both are reported at the real exits.
- nodeconsole: redraw() reads firstnodename, which was local to
  do_screenshot(); promote it to a module global like the other drawing
  state.
- nodedeploy: the redeploy path appended to a lockednodes list that did not
  exist yet.  The block that follows re-reads the same lock state and acts
  on it, so drop the dead duplicate.
- samples/nodeattrib_from_switch.py, misc/filterpasswd: missing import sys.
- xcc3: fixuuid was never imported.  xcc imports xcc3, so take a local copy
  the way the smm handler does instead of creating an import cycle.
- httpapi: the async session call still passed the WSGI-era env and an
  extra argument to handle_async(), which has taken only querydict since
  the aiohttp port.  Calling it correctly exposed that handle_async()
  registers an AsyncSession before raising on the discontinued long poll
  path, so every request to it would leak a session that is never reaped.
  It now only creates one when there is a websocket handler to yield it to.
- messages: the InputFirmwareUpdate.filename property checked
  self.filebynode[node] with no node in scope.  __init__ already validates
  every expanded path and nodefile() rechecks per node, so drop the checks.
- pam: drop the python2 branches referencing unicode and raw_input.  The
  server has been python3 only since the asyncio port.
- cooltera: the sensor-name listing referenced a nonexistent sensors dict.
  The available sensors depend on the model, which is only known after
  reading the device, so list them from the same status data the readings
  use.
- deltapdu, eatonpdu, geist: the not-implemented response in update() used
  node outside the loop, unlike retrieve() in the same files and unlike
  raritan/enlogic.
- confluentdbgcli: stray self. on a module-level socket connect.
2026-08-10 05:32:00 +02:00
Jarrod Johnson 3f2ad75b6d Change output of the nodedeploy timestamp
The 'updated' could be confused for OS updates or similar.
2026-07-24 16:23:27 -04:00
Jarrod Johnson bf195bfdeb Fix stray typing in nodedeploy 2026-07-24 15:10:06 -04:00
Jarrod Johnson 9fa89d712a Format timestamp consistent with nodeveentlog 2026-07-24 12:05:58 -04:00
Jarrod Johnson 2fed3ddb57 Add timestamp to booted information on diskless boot
It can be ambiguous if the node booted recently or not.
2026-07-24 08:46:47 -04:00
Markus Hilger 7727cd86fc Fix typos in help text, errors, and log messages 2026-07-02 22:07:27 +02:00
Jarrod Johnson 1aca69fd14 Allow nodedeploy to request http boot specifically 2026-06-04 08:04:45 -04:00
Jarrod Johnson c472d96406 Add '-r' to nodedeploy
This allows a shorthand to request a redeploy of whatever the most appropriate profile is.
2025-10-06 08:24:17 -04:00
Jarrod Johnson 71f5ce2b29 Add deployment lock mechanism
This allows users to opt into disabling setting further profile changes.

Nodes may be 'unlocked' (normal), 'autolock' (will lock on next
completion), or 'locked' (unable to change the pending OS profile)
2025-05-01 09:25:05 -04:00
Jarrod Johnson 1f6987bafc Fix nodedeploy -c with profile
Remove vestigial statement near end, and put an up front
clarification to a user trying to use both '-c' and a
profile on the same command line.
2024-08-31 07:28:51 -04:00
Jarrod Johnson 9757cd1ae3 Check the profile *before* rebooting systems
This provides a much better experience when a typo or
other mistake has a profile that is not actionable.
2023-11-16 10:20:48 -05:00
Jarrod Johnson 40c3f2da53 Actually display deployment state, when available 2023-01-13 13:02:17 -05:00
Jarrod Johnson 51e53405d8 Add attributes for profiles to report state
Profiles may want to report things
like success and error
2023-01-13 12:54:21 -05:00
Jarrod Johnson 84783c0c19 Add error check to noderange for nodedeploy 2022-12-01 14:09:25 -05:00
Jarrod Johnson 40a187d2aa Reverse ordering of reboot and api arming.
Technically there's room for a race condition where boot is attempted
before the profile is ready, but it's highly unlikely.

Conversely, there is a potential confusing race condition today where
restarting a deploymennt without armed api causes
it to be disarmed before the boot is attempted.
2022-03-16 14:57:46 -04:00
Jarrod Johnson db9df97fa0 Check and error if user request non-existant profile
This provides nice and immediate feedback for a common mistake.
2021-08-09 09:49:10 -04:00
Jarrod Johnson 5160023cc4 Update nodedeploy error message
We can't tell which argument was omitted,
so warn that both are needed.
2021-01-13 16:43:41 -05:00
Jarrod Johnson aaff8d281c Add warning if someone tries to -n without a profile name. 2020-08-26 16:10:59 -04:00
Jarrod Johnson c3403f339e Per request, change -p
The request was for -p to modify -n behavior rather than replace it. New
syntax always needs -n to
do deploymennt, with -p opting out of BMC interaction.
2020-08-26 12:04:00 -04:00
Jarrod Johnson 463584f301 Warn that -n and -p are exclusive 2020-08-26 11:05:27 -04:00
Jarrod Johnson 53f317fc09 Enhance nodedeploy status text 2020-08-25 16:01:50 -04:00
Jarrod Johnson 4b75f958ff Add function of nodedeploy to query current profile. 2020-08-25 15:47:44 -04:00
Jarrod Johnson 264b0be853 Use correct argument parsing 2020-08-25 14:29:23 -04:00
Jarrod Johnson ff0955d6be Final fix for nodedeploy without profile 2020-08-25 14:28:14 -04:00
Jarrod Johnson 14767e2909 Fix nodedeploy -c 2020-08-25 14:05:43 -04:00
Jarrod Johnson f5f7643734 Change -c to a store_true 2020-08-25 09:58:58 -04:00
Jarrod Johnson 3256899acf Add a nodedeploy clear
This will allow a pendingprofile to be cleared.
2020-08-24 16:05:58 -04:00
Jarrod Johnson f70a3daf9a Clear both appropriate profile attributes
When setting a pending profile. clear any staged or established profile.
2020-07-01 15:39:12 -04:00
Jarrod Johnson 2481759d44 Correct syntax error in nodedeploy 2020-07-01 15:16:39 -04:00
Jarrod Johnson 78e5d343e7 Implement a 'staged' phase of profile
This allows a limbo where remote deployment is blocked
but final deployment is not yet flagged.
2020-07-01 14:01:28 -04:00
Jarrod Johnson 51bc7dc88f Add nodedeploy command
This is akin to rinstall, but with
better tab completion and such
2020-05-20 16:21:08 -04:00