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

3512 Commits

Author SHA1 Message Date
Markus Hilger 8ff02dc772 Require confluent_ipxe 2.0.0
Fixes #317
2026-10-31 02:35:30 +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
Jarrod Johnson 1c1a56f764 Merge pull request #306 from Obihoernchen/proxmox-vnc-manager
Connect Proxmox VNC sessions through the manager
2026-10-08 14:35:35 -04:00
Jarrod Johnson 97ded65130 Avoid incurring some warnings
asyncssh relationship with cryptography can be messy, but it's not up to us, so discard those.

Change osdeploy to not use fork to avoid that deprecationwarning.
2026-10-08 14:10:45 -04:00
Jarrod Johnson 52fb5c42dd Offer boot.ipxe if boot.ipxe.shim does not exist. 2026-10-07 19:29:20 -04:00
Markus Hilger 6cc0567c2d Connect Proxmox VNC sessions through the manager
The vncwebsocket URL used the name of the Proxmox node running the
guest as host. That name often does not resolve on the management
node, and the fingerprint checked is the one of the manager anyway.
Connect to the manager instead, which forwards the websocket to the
right node.
2026-10-08 01:27:56 +02:00
Jarrod Johnson def5fa3753 Have a separate file for shim boot
Legacy boot with iPXE adapters will cause issues with the relatively new 'shim'
command.  It's useless for BIOS anyway, so omit it.
2026-10-07 19:10:46 -04:00
Jarrod Johnson dfe5627609 Fix askpass location 2026-10-07 18:53:19 -04:00
Jarrod Johnson 346bfa41b9 Remove cleanup for no longer existing directory 2026-10-07 17:36:10 -04:00
Jarrod Johnson fed7a2ba74 Change from a dynamically written askpass
/tmp can be hardened to noexec, /run is also sometimes noexeced.

However, we don't need a varying askpass, so just do one in a libexec directory.
o
2026-10-07 17:30:15 -04:00
Jarrod Johnson c0c5d39a8c After successful set of an attribute, clear any now-stale broken diagnostic infoa 2026-10-07 07:53:37 -04:00
Jarrod Johnson 33165fc750 Make sure parent directories to a shim are world accessible for web server 2026-10-01 11:50:24 -04:00
Jarrod Johnson 8c4bddef7b Try to identify currently communicating redfish bmc in discovery
Some devices have multiple BMCs, but we don't know
the 'right' one.

In such a scenario, search for BMC NICs for any that match the address we are using.
2026-09-29 16:48:25 -04:00
Jarrod Johnson 838a017563 Allow cachied sensor readings up to a second old.
In the process of reworking cache logic, a temporary disabling was left in.

Before the logic change, 'cache' of '1' meant 'True', but the intent was a max age to decline to reply.  This allows very close together requests to be cached.
2026-09-28 16:10:12 -04:00
Jarrod Johnson 649eb107d7 Prevent async protocol violation
The callback registration can result in a callback before we send ASYNCID.

Guard by waiting for readiness to be signaled by loop.
2026-09-28 15:06:38 -04:00
Jarrod Johnson a7f1511c78 Provide method for user to query whether API keys are active.
We don't have a record of all API keys, but we can at least indicate whether any have been provisioned and are valid.
2026-09-28 14:59:13 -04:00
Jarrod Johnson a1df0c6939 Users can request and revoke API keys
Proivde support for API keys.  Users can register by doing a POST like:
/confluent-api/sessions/current/apikey/create with body of '{"expiration":null}

API keys can be reset by doing a POST to /confluent-api/sessions/current/apikey/revokeall

A secret is provisioned per user to allow them to clear all keys, while remaining mostly stateless to avoid having to manage every key server side.
2026-09-28 11:34:17 -04:00