2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-12 19:16:18 +00:00
Commit Graph

3527 Commits

Author SHA1 Message Date
Jarrod Johnson 52505e6f2d Improve SSDP responder concurrency
Bulk boot could get serialized too harshly. Particularly could hiccup on name lookup delay.

Take the penalties concurrently instead.
2026-11-06 17:28:05 -05:00
Jarrod Johnson 84faa9a1c7 Properly indicate bynode or not in message state 2026-11-06 10:08:19 -05:00
Jarrod Johnson 58d4c6a5a9 Allow API caller to request raw binary images.
This can make it more straightforward as an interface, and also defer the penalty for base64 processing.
2026-11-06 09:37:58 -05:00
Jarrod Johnson b0fff4a8fe Default to json, and add binary types for screenshot to come down in a more straightforward way 2026-11-06 08:44:46 -05:00
Markus Hilger 098d0a66c3 Enable ansible pipelining for plays by default
Without pipelining every task copies the module to the node over sftp,
then makes it executable, runs it and removes it, each a separate ssh
operation. With pipelining the module is fed to the interpreter over
the ssh session, so a task takes one operation and nothing is written
to the node's temporary directory.

Pipelining breaks become through sudo with requiretty, which rarely
applies here: plays connect as root and drop become unless become_user
is set. Setting ANSIBLE_PIPELINING or ANSIBLE_SSH_PIPELINING still
overrides this default.
2026-11-04 21:59:58 +01:00
Markus Hilger e668cdabf7 Keep ansible's default ssh_args when running plays
Setting ANSIBLE_SSH_ARGS replaces ansible's ssh_args instead of adding
to them, so plays ran without the default ControlMaster and
ControlPersist options. Every task then opened a new ssh connection
and authenticated again.

Start from ansible's default ssh_args when ANSIBLE_SSH_ARGS is not
set. An ANSIBLE_SSH_ARGS from the environment is still extended as
before.
2026-11-04 21:59:58 +01:00
Jarrod Johnson 5e45bc598b Merge pull request #367 from Obihoernchen/feat/ansible-node-attributes
Pass node attributes to profile ansible plays
2026-11-04 10:06:59 -05:00
Markus Hilger 9cbe3b91d8 Decode bytes attribute values outside of dicts too 2026-11-04 15:07:32 +01:00
Jarrod Johnson 830b6892d6 Merge pull request #369 from Obihoernchen/fix/runansible-hangs
Stop hanging on ansible play processes that fail early
2026-11-04 08:38:33 -05:00
Markus Hilger ec71d0b876 Stop hanging on ansible play processes that fail early
Drain the play process output while it runs, and stop waiting for its
feedback connection once it exits.
2026-11-04 00:23:33 +01:00
Markus Hilger 48b7dc62b5 Pass node attributes to profile ansible plays
Plays run by the deployment server get the target node's attributes in
the host variable 'confluent', nested at each dot of the name, e.g.
confluent['net']['ib0']['ipv4_address']. Secrets and unset attributes
are left out, and values are never templated.
2026-11-04 00:08:38 +01:00
Markus Hilger 1cad52284d Run profile ansible plays on ansible-core 2.19 and later
Newer ansible-core only takes a stdout callback name and no longer
templates untrusted YAML. Attach the results collector directly, load
plays trusted through the DataLoader, and report a crashed play
process as a failed task.
2026-11-03 23:58:43 +01:00
Jarrod Johnson 734ea9811a Also check if shim can be downloaded using tftp 2026-11-02 11:39:25 -05:00
Jarrod Johnson 89787671cf Merge pull request #338 from Obihoernchen/fix/ssh-agent-dir-owner
Hand /run/confluent/ssh to the confluent user
2026-10-31 09:21:18 -04:00
Markus Hilger 8ff02dc772 Require confluent_ipxe 2.0.0
Fixes #317
2026-10-31 02:35:30 +01:00
Markus Hilger 905992f054 Hand /run/confluent/ssh to the confluent user
Fixes #316
2026-10-31 02:14:21 +01:00
Jarrod Johnson f3ebf3001d Merge pull request #331 from Obihoernchen/fix/runansible-multiple-plays
Run every playbook of a remote configuration
2026-10-30 17:24:53 -04:00
Markus Hilger 680ff433ed Run every playbook of a remote configuration
asyncio has no sock_close, so the first playbook ended with an
AttributeError and the remaining ones were silently skipped.
2026-10-30 19:31:00 +01:00
Markus Hilger 0e03b07939 Use ssh keepalives for ansible plays
A node reset during a play left ssh waiting forever, which blocked
every later remote configuration of that node, like an install's post.d.
2026-10-30 18:42:48 +01:00
Markus Hilger 4aa6bf8af5 Accept plain device names in deployment.storage and fail on no match
The attribute help promises "a specific device name", but getinstalldisk
only understood "m2" and "/dev/<name>". A plain "nvme0n1" aborted the
install with "Unknown deployment.storage specification", and a
"/dev/<name>" that matched no disk was silently ignored, so the OS went
to whatever disk the default ordering picked. For an attribute meant to
pin the OS disk that is the dangerous failure mode.

Accept a kernel name with or without /dev/ and resolve /dev/disk/by-*
links to their kernel name, so a disk can be pinned by a stable path.
When nothing matches, fail with "No disks match" like the m2 filter
already does. Document the accepted forms in the attribute help.
2026-10-30 09:43:54 +01:00
Jarrod Johnson d25c3f3ff0 Merge pull request #315 from Obihoernchen/fix/server-rsync-dependency
Recommend rsync for server file synchronization
2026-10-29 10:28:10 -04:00
Jarrod Johnson 8864030a76 Implement advisory rate limiting for ssh certificate signing requests 2026-10-28 13:18:55 -04:00
Jarrod Johnson 05cfea34d6 Correct check for architocture
It is incorrect and redundant within the aarch64 path
2026-10-27 13:45:39 -04:00
Jarrod Johnson 3925c6dcbc Fix arm64 and bios netboot
First, try to offer shim

Second, make sure boot.ipxe is as permissive as the shim variant.
2026-10-27 12:10:19 -04:00
Jarrod Johnson 8023f436c1 Fix URL shortening for ARM boot
The special ARM accommodation for dubious firmware behavior failed to include the URL shortening for unreasonably long profile names.
2026-10-26 15:44:49 -04:00
Jarrod Johnson 406fe2aff9 Implement an osdeploy export 2026-10-23 09:20:48 -04:00
Jarrod Johnson 81646e54c8 Implement osdeploy import for tarred profiles
Advance an ease of use for moving diskless/cloned profiles between confluents.
2026-10-22 11:41:57 -04:00
Markus Hilger d1bb59e7c8 Merge branch 'master' into fix/server-rsync-dependency 2026-10-21 20:42:29 +02:00
Jarrod Johnson 91174e4a5c Fix getaddrinfo call in redirect calls 2026-10-20 15:42:10 -04:00
Jarrod Johnson 37f6a0b061 Slide unrecognized create requests to 'update' in proxmox 2026-10-20 15:21:46 -04:00
Jarrod Johnson 3f979f2de5 Merge remote-tracking branch 'xcat/master' 2026-10-20 13:43:59 -04:00
Jarrod Johnson 337dc6c638 Adjust debian recommends 2026-10-20 13:39:56 -04:00
Markus Hilger 4e55d9f1e8 Add error message if rsync is missing 2026-10-20 19:32:47 +02:00
Markus Hilger fcdd31167b Recommend rsync for server file synchronization
Add rsync to the server RPM recommends and Debian recommends lists so syncfiles works on minimal management nodes.

Fixes #314
2026-10-20 19:26:56 +02:00
Jarrod Johnson a0657d768f Add a recommends rsync
Some functionality requires rsync.  However some want the flexibility in skipping it.

Split the difference with a recommends
2026-10-20 08:03:36 -04:00
Markus Hilger f25d121fc5 Version the Python package rpms with ~dev as well
confluent_client and confluent_server rpms took the PEP 440 version
setup.py needs, 4.0.1.dev5+g..., which rpm sorts after 4.0.1: a
released package did not upgrade a development build of it. Stamp the
rpm with the ~dev form the other packages already use and keep .dev only
for setup.py and the sdist name. The debs already sort right, since
stdeb rewrites .dev to ~dev.
2026-10-15 19:20:16 +02:00
Markus Hilger b1ed925e40 Fall back to libcrypt when no crypt module imports
Python 3.13 dropped crypt from the stdlib, and openSUSE Leap 16 packages
neither legacycrypt nor crypt_r, so the server did not start there
without a pip install. Both of those only call crypt(3) from libcrypt,
which every distribution ships, so do that through ctypes as the last
resort, serialized because crypt(3) returns a static buffer. Its hashes
match the stdlib module byte for byte.

Move the import chain both callers carried into confluent.pwcrypt. The
legacycrypt Recommends is no longer needed.
2026-10-15 19:20:16 +02:00
Markus Hilger b86e0aa27f Make webauthn and eficompressor optional server dependencies
Neither is packaged by EPEL or Ubuntu, so the hard dependency made the
server uninstallable there without --nodeps or a stub package. Both are
already optional in the code: httpapi drops passkey support when
webauthn does not import, and the Lenovo IMM2 BIOS settings path reports
the missing module as unsupported functionality. Recommend them instead,
as the SUSE branch already does for webauthn.

See xcat2/confluent#192.
2026-10-15 19:20:16 +02:00
Jarrod Johnson 3bb3b48cd0 Remove directive ruff doesn't need or want 2026-10-14 09:07:30 -04:00
Jarrod Johnson 7460f66e23 Workaround some bad pysnmp assumptions about importing importlib 2026-10-14 09:04:43 -04:00
Markus Hilger 1b446f4773 Add empty nodegroup hint to ssh.trustnodes 2026-10-13 18:52:22 +02:00
Jarrod Johnson 28316ae9bd Make close async 2026-10-12 15:24:22 -04:00
Jarrod Johnson 3d805fa342 Fixup for closing vnc session 2026-10-12 13:27:56 -04:00
Jarrod Johnson eb6c026ac8 Enable aggressive rescan to specifically note Lenovo XCC 2026-10-09 16:58:02 -04:00
Jarrod Johnson a6e89c1543 Fix register
Ensure info_identifier is set if it was not set by way of safe_detected first.
2026-10-09 16:44:51 -04:00
Jarrod Johnson ea926aab12 Improve snoop behavior
For one, at the time an XCC emits a NOTIFY, it's DeviceDescription.json is also very sluggish.  Extend timeout
knowing this may be delayed.

Further, if snoop comes back with only one address family, do not
perturb existing address families.
2026-10-09 16:32:49 -04:00
Jarrod Johnson 5a201e1bde Handle pysnmp5 from ubuntu 24.04 repos 2026-10-09 15:26:41 -04:00
Laurence bf94c84da4 proxmox: pin the API certificate where it can be stored; accept API tokens
- A manager that is not a confluent node is pinned on the guest's node
  (pubkeys.tls_hardwaremanager), as the console already does.
- user@realm!tokenid with the token secret is accepted as the login;
  VNC needs a password login and says so.
2026-10-08 22:04:29 +01:00
Laurence 8c743b934c InputBootDevice: keep a per-node persistent flag as the persistent flag
A per-node request stored 'persistent' in bootmodebynode, so
persistent() stayed False and bootmode() returned a boolean.
2026-10-08 22:04:26 +01:00
Laurence 4fada65934 proxmox: fix the plugin's error handling, power and boot order
- Route every API call through one checked path: non-2xx answers raise
  with PVE's message, a 401 logs in again, a migrated guest is re-mapped.
- Report login failures other than 401 instead of a TypeError.
- Power changes are bounded and reported per node; 'on' when on is a
  no-op; every live QEMU state counts as on.
- Read and set the boot order in every form PVE accepts, keeping disks.
- Stop toggling Content-Type on the shared client headers.
- Inventory from the current config, all SMBIOS forms.
- Refuse ambiguous guest names; skip templates.
- Keep the serial console alive and report how it ends.
- Let the self-test run without a config manager.
2026-10-08 22:04:24 +01:00