Commit Graph

399 Commits

Author SHA1 Message Date
64924e50ed fix(instances): persist server filter selection across navigation and page reload
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 02:53:45 +05:00
5b781f9e16 fix(ipam): show VM id/name/IP in IP map tooltip
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
The IP map tooltip read e.ip, but the backend ip-map endpoint returns
the address as ip_address, so the IP rendered as 'undefined'. Align the
IPAMIPMapEntry type with the backend response and build the tooltip from
proxmox_vmid, resource_name/hostname and ip_address.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:27:04 +05:00
14a6f5ace7 feat(ipam): expose network/pool/allocation management in UI
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 7s
Wire up backend IPAM endpoints that had no frontend:
- edit/delete network (with force) on network detail page
- full pool CRUD (create/edit/delete) on network detail page
- manual allocation create + edit on allocations page
- IP address map visualization per network

Add missing hooks (useCreatePool/useUpdatePool/useDeletePool,
useUpdateAllocation), force support in useDeleteNetwork, typed
ip-map entries, writable allocation fields, and RU/EN locale keys.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:12:40 +05:00
e1951bafe1 fix(deploy): correct postgres volume name and generate FERNET_KEY
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
- check_stale_db_volume looked for <project>_postgres_data but the
  compose volume is <project>_db_data, so stale-volume detection and
  --reset-data silently did nothing; use the real name.
- Generate a Fernet key (url-safe base64 of 32 bytes) for backend/.env
  in all env-creation paths so sensitive fields are encrypted at rest
  instead of stored as plaintext.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:09:10 +05:00
58e73d4af4 fix(tests): repair Proxmox client mock after from_server refactor
All checks were successful
Backend Tests / pytest (Python 3.12) (push) Successful in 46s
Deploy to Production / Trigger production update (push) Successful in 8s
The mock_proxmox fixture patched ProxmoxClient with return_value= (constructor
style), but since commit d66928e clients are built via the
ProxmoxClient.from_server classmethod. from_server() therefore returned an
unconfigured child mock, so endpoints serialized a MagicMock and responded 500
— failing 5 tests in test_api_vms.py on every CI run (Backend Tests workflow).

Wire .from_server.return_value (and .return_value) on all patched ProxmoxClient
references to the configured instance so every construction path resolves to
the same mock. Full suite now green (60 passed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:08:28 +05:00
d0badd0a2e refactor(rbac): drop runtime legacy-format resolution from engine
Roles are stored in the new resource:action format and any legacy keys are
converted once at startup by the RBAC v2 DB migration (migrate_rbac_v2), so
the permission engine no longer needs to resolve legacy codes on every check.

- get_user_permissions: store role permission codes as-is (no dual add).
- has_permission: match new-format codes only; drop resolve_permission and the
  dotted-code fallbacks.
- Remove now-unused resolve_permission import in middleware.
- LEGACY_PERMISSION_MAP / convert_* are retained as one-shot DB-migration
  utilities (upgrade path), not a runtime bridge.
- Tests: adapt fixtures to new-format role permissions; assert legacy keys are
  no longer honored at request time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:08:19 +05:00
de967c35e0 refactor(rbac): migrate API permission checks to resource:action format
Replace all legacy dotted permission codes (vms.view, proxmox.manage, ...)
in PermissionChecker/has_permission across app/api with the new
resource:action format (vm:view, server:manage, ...), per LEGACY_PERMISSION_MAP.
All 33 codes used by the API are now registered in the permission registry.

Also switch the /api/auth/me admin branch to get_all_permissions_v2 so the
endpoint emits permissions in the new format only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:07:48 +05:00
57513c4dc9 fix(rbac): register user:manage and vm:manage, close legacy map gaps
These permissions were referenced by the API (users.manage, proxmox.vm.manage)
but never registered in the permission registry, so they only worked through
the is_admin bypass — non-admin users granted them silently received 403.

- Register user:manage and vm:manage in the registry.
- Add missing legacy mappings: users.manage->user:manage,
  settings.manage->setting:manage.
- Grant both new permissions to the admin role (defaults + init.sql seed);
  ensure_default_roles_new_format propagates them to existing deployments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 02:07:36 +05:00
d66928ee78 refactor(proxmox): unify ProxmoxClient construction via from_server
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Failing after 48s
Deploy to Production / Trigger production update (push) Successful in 8s
Collapse four duplicated host+auth client-building blocks into a single
ProxmoxClient.from_server() classmethod (the canonical source of truth):

- _helpers._get_proxmox_client now delegates to from_server (107 callers
  untouched)
- ipam._build_proxmox_client removed; its one call site uses from_server
- task_queue_service keeps its per-server cache pool, builds via from_server
- monitoring_worker keeps its ValueError-on-missing-auth contract, builds
  via from_server

Behaviour preserved (token-first, then password; non-default port appended).
Verified: containers rebuild healthy, smoke test of both auth paths passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 22:30:57 +05:00
34fe9b4924 chore: ignore graphify-out/ and local preview config
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 15s
Also drop the stray markdown code fences that wrapped the file and were
being treated as literal ignore patterns.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 22:21:07 +05:00
f18ba4d597 revert(nodes): remove server auto-setup feature
All checks were successful
Backend Tests / pytest (Python 3.12) (push) Successful in 1m35s
Deploy to Production / Trigger production update (push) Successful in 8s
Drop the /api/servers/auto-setup endpoint, the AutoSetupDialog UI and the
useAutoSetupServer hook. Rename the auto_setup locale strings to
auto_create_token. Also normalize the storages response to an array.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 22:18:38 +05:00
493814f44f fix(dashboard): populate recent-activity feed from audit logs
Align the frontend with the /logs API contract: the endpoint returns
{ logs: [...] } with a created_at field, not { items: [...] } / timestamp.
Add a Vite dev-proxy rule for /logs so the request reaches the backend.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 22:18:30 +05:00
ed4ff6576a feat(instances): show saved VM configuration on the Settings tab
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 10s
Read-only card on the instance Settings tab surfacing the panel-stored config
(cores/memory/disk/network/cloud-init) via the saved-config endpoint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:30:44 +05:00
bb5d30ab68 feat(nodes): add server auto-setup and cluster-info badge
Add an 'Auto-setup' dialog that onboards a Proxmox server by password and
lets the backend auto-create the API token (adds all nodes for a cluster).
Show a cluster/standalone badge with node count on the node detail page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:30:44 +05:00
5d6acd619e feat(templates): add quick-deploy and CT template download
Per-template Deploy button opens a quick-deploy dialog (prefilled from the
quick-deploy endpoint defaults) that creates a VM via /templates/api/deploy.
New 'Download CT template' dialog browses the node's appliance repository
(available-lxc-templates) and pulls a template to a vztmpl storage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:29:34 +05:00
508be2423a refactor(proxmox): extract _wait_exec_status helper from execute_command
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
Move the guest-agent exec-status polling loop into a shared _wait_exec_status
method reused by execute_command and execute_script. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:14:35 +05:00
e581f19e60 refactor(api): remove duplicate/superseded endpoints
Drop dead route handlers that have an active replacement and zero callers
(frontend, backend, tests):
- create-lxc, create-lxc-smart  -> superseded by POST /lxc/deploy
- clone-lxc                      -> superseded by container/{vmid}/clone
- {server_id}/lxc-templates      -> duplicate of /lxc-templates/{server_id}
- dashboard/stats               -> dashboard uses resources/all + alerts
- permissions (v1)              -> superseded by permissions/v2

The identically-named ProxmoxClient/SecurityService methods are kept (they
back the surviving endpoints).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 00:14:35 +05:00
2886326353 feat(instances,tasks): add PVE task log viewer and VM script execution
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 52s
Tasks page now shows the live Proxmox task log/status for UPID-backed tasks.
Instance Settings tab gains an admin-only 'Execute script' card that runs a
script in the guest via the QEMU agent and shows stdout/stderr/exit code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 19:30:55 +05:00
bc462c9f8e feat(instances): add VM owner assignment and snapshot archive view
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
Surface two previously-unused admin endpoints: assign/clear a VM's owner from
the instance Settings tab, and a /instances/snapshot-archives page listing
snapshots preserved from deleted guests (with config detail), linked from the
Instances header for admins.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 18:55:47 +05:00
dc95d39465 feat(backups): add storage management tab
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
New Storages tab in Backups: list cluster storages, add (dir/nfs/cifs/pbs
with type-specific fields), edit content/nodes, delete, and view native PVE
vzdump backup schedules — all over the previously-unused storage CRUD and
proxmox-jobs endpoints.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 18:48:35 +05:00
e79f9ea24c feat(settings): add notification preferences and channel tests
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 7s
Expand the Notifications settings tab: per-user preferences (channels,
critical-only email, Telegram chat id + verify, webhook, quiet hours),
SMTP/Telegram test buttons, a test-notification sender with channel
selection, channel status, and the configured Telegram bot username.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:35:27 +05:00
fdd3e03c7d feat(ipam): add IPAM tools page
New /ipam/tools page surfacing the existing maintenance endpoints: summary
with recent activity, conflict detection, orphan allocations (with cleanup),
unlinked VMs (scan & link), auto-allocation + next-available lookup, and
per-IP history. Linked from the IPAM dashboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:35:27 +05:00
fb1267c533 feat(settings): add panel update management UI
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 10s
Expand the About tab into a full update manager over the existing backend
endpoints: edit the update repository URL, check for updates (showing
changelog/errors), trigger an update with a strong confirmation, and show a
live progress banner with a reset action while an update runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:18:08 +05:00
179cb615f3 feat(nodes): add SDN management UI
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
Surface the existing SDN backend endpoints in a new SDNManager panel on the
node detail page: zones (CRUD with type-specific fields), VNets (CRUD), and
per-VNet subnets (create/delete, optional IPAM network link), plus an apply
action with a pending-changes indicator and an availability notice.

Fix subnet deletion to pass PVE's full subnet id ({zone}-{network}-{mask})
instead of just the CIDR, which the API rejected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:14:01 +05:00
14aeba41d0 feat(nodes): add High Availability management UI
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 13s
Surface the existing HA backend endpoints (cluster HA status, add/remove
resource) in a new HAResources panel on the node detail page. Lists
HA-managed guests with state/group/restart limits, supports adding a guest
to HA (state, group, max_restart/relocate, comment) and removing it.
Shows a cluster-only notice on standalone nodes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:38:21 +05:00
681aa2f303 feat(backups): restore target node/storage selection + task progress tracking
All checks were successful
Backend Tests / pytest (Python 3.12) (push) Successful in 1m6s
Deploy to Production / Trigger production update (push) Successful in 8s
Add target node and storage overrides to single and bulk restore flows, and
track Proxmox task progress (parse_task_progress in the monitoring worker,
new ProxmoxTask progress column + migration, enriched task API responses).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:26:01 +05:00
fbf6d174b6 feat(nodes): add node network interface management UI
Wire up the existing node-network backend endpoints (list/create/update/
delete + apply/revert staged config) to a new NodeNetworks component on the
node detail page. Supports bridge/bond/vlan/eth interface types with
type-specific fields and surfaces IPAM linkage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:25:51 +05:00
23c29dacc9 ci: add production deploy workflow
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
Triggers update watchdog on production server via SSH on every push to main.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 19:13:46 +05:00
49f888d4e2 fix(monitoring): break infinite loop on invalid UPID parsing
All checks were successful
Backend Tests / pytest (Python 3.12) (push) Successful in 47s
When Proxmox API returns 400 "unable to parse worker upid", the monitoring
worker was getting empty status {}, treating it as running, and retrying
forever every 5 seconds, causing 100% CPU and log spam.

Now when get_task_status() returns empty dict, we immediately mark the task
as failed with exit_status="Invalid UPID" and move on instead of looping.

Fixes production deployment hang.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-13 19:04:26 +05:00
9dd992c6b9 fix(security): enforce VM access control on status endpoints; fix CI artifact upload
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Has been cancelled
- get_vm_status and get_container_status were missing require_vm_access(),
  allowing any user with vms.view to see any VM status regardless of ownership.
  Now users with vms.view.own can only access their own VMs (403 otherwise).
- Downgrade upload-artifact@v4 → @v3: v4 is not supported on Gitea (GHES)
  and caused CI failures on every run.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-13 18:58:15 +05:00
fd592f8b59 fix(api): add missing ssh_keys router import
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Failing after 46s
The ssh_keys module was imported in main.py but missing from api/__init__.py,
potentially causing import issues. Added to ensure all API routers are
explicitly declared and available.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-13 18:53:13 +05:00
5d3f3c2b3b fix(docker): include migrations directory in backend image
The migrations/ directory was missing from the Dockerfile COPY instructions,
causing ModuleNotFoundError when app.main tries to import and run migrations
during startup. This caused production deployments to fail with:
  ModuleNotFoundError: No module named 'migrations'

The automatic migration runner in main.py (line 157) needs this directory to:
1. Detect database schema changes
2. Run pending migrations
3. Initialize default admin user

Fixes production deployment failure when containers start.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-13 18:52:06 +05:00
2e8558fa51 fix(backend): restore operations — add force param, fix QEMU restore API
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Failing after 47s
- restore_vm/restore_lxc: add force=True param (needed for in-place overwrite)
- QEMU restore: remove `restore: 1` from params (breaks Proxmox API — restore
  is triggered by archive presence alone, unlike LXC where restore: 1 required).
  This fixes both single and bulk QEMU restores.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 16:32:23 +05:00
82a6e0e24a fix(frontend): IPAM translations, dialog width cap, workspace counts 2026-06-13 08:45:31 +05:00
8659ba5a92 feat(frontend): cluster management page (create / join wizard / eject)
Surface the existing backend cluster API in the UI:
- New /cluster page with topology view (clusters + standalone servers),
  per-node online status, and a 2-node quorum warning.
- Create cluster dialog (node, name with Proxmox naming rules, optional
  corosync link0, optional root password).
- 3-step Join wizard: pick joining + target node → pre-join-check with
  backup-and-clear (prepare-join) for nodes that still hold guests →
  confirm + join with the node root password.
- Eject node dialog (with SSH-fallback root password).
- hooks/use-cluster.ts: typed useClusterTopology, useCreateCluster,
  usePreJoinCheck, usePrepareJoin, useJoinCluster, useEjectNode.
- Nav item + route + RU/EN i18n strings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 07:16:48 +05:00
0e85d56c99 fix(frontend): constrain auto-import dialog width and rename duplicate filter label
- TemplatesPage: cap auto-import dialog at sm:max-w-md so it no longer
  spans the full screen (bare DialogContent defaults to near-full width).
- InstancesPage: the server (multi-server/cluster) filter wrongly reused
  the `instances.all_nodes` i18n key, so it rendered "Все узлы" identically
  to the node filter. Add a dedicated `instances.all_servers` key (RU/EN)
  and use it, so the two filters read "Все серверы" / "Все узлы".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 06:44:23 +05:00
50f2ee1966 fix(security): authenticate VNC/terminal WebSockets and harden SSH/config
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Failing after 46s
Critical security and robustness fixes from a code audit:

- WS terminal/VNC now require a JWT (?token=), validate the session,
  vms.console permission and VM ownership before bridging to Proxmox
  (previously the LXC terminal gave unauthenticated root shell access).
  Frontend ConsolePage passes the token in both WS URLs.
- Fix SSH fallback for `pvecm delnode`: SSHClient now supports password
  auth (it previously crashed with TypeError); ProxmoxClient stores the
  password for SSH fallbacks and the host port suffix is stripped.
- Add production startup warnings for default ADMIN_PASSWORD and wildcard
  CORS_ORIGINS.
- dashboard: use tz-aware utcnow() instead of naive datetime.utcnow().
- crypto: narrow decrypt_value except to InvalidToken and log failures.
- ssh_client: guard the shared connection cache with a lock; make
  unknown-host-key rejection opt-in via SSH_REJECT_UNKNOWN_HOSTS.
- logging: send loguru console output to stderr instead of stdout.
- Sync version fallback to 1.5.1; remove one-off refactor scripts.
- Add CODE_REVIEW.md audit report.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 06:31:26 +05:00
bfd92102cf Refactor backend: Split models and proxmox_client into modules, add alembic
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Failing after 2m27s
2026-06-13 03:53:27 +05:00
8a879f36fa release: v1.5.1
- Bump VERSION and README badge to 1.5.1
- WIKI: add new 'Logs & Audit' section (page layout, levels, API,
  query params, response shape, RBAC, retention) and bump version
  in the top note; also extend ToC
- CHANGELOG / CHANGELOG.ru: add v1.5.1 entry covering the missing
  LogsPage component fix and the .gitignore collision fix
2026-06-04 03:14:38 +05:00
08a687c1f6 feat(frontend): add LogsPage with stats, filters and pagination
- New LogsPage.tsx under features/logs/ (was referenced by router but missing)
- Uses existing useLogs / useLogStats / useLogLevels hooks
- Stats cards (24h total, errors, failed logins, page count)
- Search + level filter + pagination wired to /logs/api/logs
- i18n strings, lucide icons, shadcn UI primitives

Fix frontend/.gitignore: '/logs' was matching 'features/logs/' (rolldown-vite
import resolution would have kept failing on CI otherwise). Scope the rule
to the project root.
2026-06-04 03:01:22 +05:00
markmorado
453c18f192 feat: real-time server CRUD sync and pve CLI auto-install
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Has been cancelled
Backend:
- servers.py: instant connectivity check + VM cache sync after create/update;
  broadcast server_added/updated/deleted events via WebSocket
- websocket_manager: add broadcast_event() helper for global fire-and-forget events

Frontend:
- use-nodes: invalidate topology, VM list and resources after server create/update/delete
- use-realtime-sync: new hook with useGlobalRealtimeSync subscribing to server_*
  WS events and invalidating relevant React Query caches
- AppLayout: mount useGlobalRealtimeSync globally

Deploy:
- deploy.sh: auto-install pve CLI during main/quick deploy (idempotent, --auto mode)
2026-05-11 05:31:52 +02:00
markmorado
742ff27fb4 fix(frontend): explicit .tsx extensions for lazy imports (rolldown-vite 8.0.5 bug)
- Replace dynamic import('@/...') with relative './features/.../File.tsx' in router.tsx
  to work around UNLOADABLE_DEPENDENCY error from rolldown resolver in vite 8.0.5
  which fails to auto-append .tsx for dynamic imports using path aliases.

fix(deploy): make deploy.sh resilient to common build/runtime failures

- Enable pipefail
- build_images_resilient(): retry docker compose build with --no-cache after first failure
- check_stale_db_volume(): warn when reusing an old Postgres volume whose password
  no longer matches a freshly generated .env (typical 'backend in restart loop' cause)
- Add --reset-data flag (combinable with any mode) to wipe the old Postgres volume
- Document new flag in --help
2026-05-11 05:17:03 +02:00
markmorado
4a98a26d3c fix: fix CentOS logo shape and AlmaLinux 9 detection
- Replace CentOS triangle polygons with proper 4-quadrant rectangles
- Add 'alama' key to catch 'Alamalinux' typo variant in VM names

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-10 22:23:03 +02:00
markmorado
4ba39858c5 feat: add OS logo component for templates and instances
- Add OsLogo component with SVG icons for major distros (Ubuntu, Debian, etc.)
- Integrate OsLogo in TemplatesPage, CreateInstanceWizard, InstanceDetailPage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-10 22:13:39 +02:00
markmorado
c317c4d81a fix: deduplicate SSH keys on LXC/VM create; filter qemu templates in wizard
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Has been cancelled
2026-05-08 13:06:23 +02:00
markmorado
5cb186e8d1 docs: update tech stack — React 19 / TypeScript / Vite / Tailwind / Recharts 2026-05-07 00:42:06 +02:00
markmorado
0743dee005 docs: bump version to 1.5.0, update CHANGELOG, README, WIKI 2026-05-07 00:40:27 +02:00
markmorado
323d1e57fa feat: SSH keys management, backups fixes, instances/nodes/templates improvements, dev mode support
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Has been cancelled
2026-05-07 00:30:21 +02:00
markmorado
a92cb0df33 fix(vms): auto-stop running VM/CT before destroy
The destroy endpoints returned 400 'Cannot delete a running container.
Stop it first.' when the user clicked Destroy on a running instance.
Since the destroy dialog already requires typing the instance name to
confirm, the action is unambiguously intentional — now both endpoints
issue stop_container/stop_vm with force=True, wait up to 15s for the
status to leave 'running', and only then proceed with deletion.
2026-05-06 21:11:15 +02:00
markmorado
9da65a46aa fix(lxc): preserve credentials and IP across reinstall
Three related fixes so login/password/SSH key/IP survive a reinstall:

1. backend/app/api/proxmox/lxc.py — on initial LXC deploy save
   cloud_init_user='root' and cloud_init_password=req.password to VMInstance
   (previously both were None, so reinstall could not restore root password).

2. backend/app/api/proxmox/async_ops.py — _do_reinstall_sync passes
   cached.cloud_init_password to create_lxc_container so the new container
   gets the same root password as the original.

3. backend/app/workers/monitoring_worker.py — VM sync worker no longer
   overwrites VMInstance.ip_address with NULL when no IPAM allocation
   exists for that (server_id, vmid). It only updates the field when
   IPAM has a value, otherwise the IP saved at deploy/wizard time is
   preserved.
2026-05-06 20:22:50 +02:00