fix(appstore): DNS, per-server golden template, bind-mount perms, delete race
All checks were successful
Backend Tests / pytest (Python 3.12) (push) Successful in 1m1s
Deploy to Production / Trigger production update (push) Successful in 8s

App Store install/update pipeline reliability fixes:
- explicit nameserver (APPSTORE_NAMESERVER) on App Store LXCs and the golden
  template build CT, instead of inheriting a node resolver that may be
  unreachable from the container network (e.g. Tailscale-only DNS)
- golden template storage/resolution moved from one global setting to
  per-server_id (migration 37: app_operations.server_id) — building it on one
  Proxmox server no longer overwrites the template configured for another
- golden template automated build fixed: vzdump export step no longer fails
  on "unable to parse directory volume name 'vztmpl/probe'"
- bind-mount host directories are pre-created with permissive ownership
  before `docker compose up`, fixing Permission denied for non-root
  containers (e.g. MariaDB) writing to Docker-auto-created root-owned dirs
- delete/teardown now waits for Proxmox to actually confirm the destroy task
  finished (was silently proceeding after a short timeout, letting a new
  install reuse the VMID while the node was still wiping the old disk)
- pct create retries a few times on transient "got lock" config errors
- failed pipeline steps now report the tail of command output (4000 chars)
  instead of the head, so the real error isn't buried under pull/progress noise
- install error box in the UI wraps long text and scrolls instead of
  stretching the dialog

Also carries forward in-progress script catalog / instances / RBAC changes
that were already uncommitted in the working tree before this session.

Bump to v1.9.1, update WIKI.md/docs/CHANGELOG accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
markmorado
2026-07-17 04:49:40 +05:00
parent b8536ac2e8
commit 6a79dd2048
40 changed files with 1100 additions and 109 deletions

View File

@@ -76,10 +76,15 @@ export interface GoldenBuildArgs {
force?: boolean;
}
export function useGoldenTemplateStatus(pollMs?: number) {
// vztmpl — файл на storage конкретного Proxmox-сервера: шаблон сервера A не
// существует на сервере B, поэтому статус всегда запрашивается по serverId.
export function useGoldenTemplateStatus(serverId?: number, pollMs?: number) {
return useQuery({
queryKey: ['appstore-golden-status'],
queryFn: () => apiClient.get<GoldenTemplateStatus>('/api/appstore/golden-template/status'),
queryKey: ['appstore-golden-status', serverId],
queryFn: () => apiClient.get<GoldenTemplateStatus>(
`/api/appstore/golden-template/status?server_id=${serverId}`,
),
enabled: !!serverId,
refetchInterval: pollMs && pollMs > 0 ? pollMs : false,
});
}
@@ -89,7 +94,8 @@ export function useBuildGoldenTemplate() {
return useMutation({
mutationFn: (data: GoldenBuildArgs) =>
apiClient.post<{ success: boolean; operation_id: number }>('/api/appstore/golden-template', data),
onSuccess: () => qc.invalidateQueries({ queryKey: ['appstore-golden-status'] }),
onSuccess: (_data, variables) =>
qc.invalidateQueries({ queryKey: ['appstore-golden-status', variables.server_id] }),
});
}

View File

@@ -687,6 +687,25 @@ export function useMigrateInstance(serverId: number, vmid: number, type: string,
});
}
// ==================== Remote migrate (to a different cluster) ====================
export interface RemoteMigrateRequest {
target_server_id: number;
target_node: string;
target_vmid?: number;
target_storage?: string;
target_bridge?: string;
online?: boolean;
delete_source?: boolean;
}
export function useRemoteMigrateInstance(serverId: number, vmid: number, type: string, node: string) {
const prefix = type === 'lxc' ? 'container' : 'vm';
return useMutation<AsyncTaskResponse, Error, RemoteMigrateRequest>({
mutationFn: (body) =>
apiClient.post(`/proxmox/api/${serverId}/${prefix}/${vmid}/remote-migrate?node=${node}`, body),
});
}
// ==================== Change Password ====================
export function useChangePassword(serverId: number, vmid: number, type: string, node: string) {
const prefix = type === 'lxc' ? 'container' : 'vm';

View File

@@ -1,6 +1,6 @@
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { apiClient } from '@/lib/api-client';
import type { ScriptCatalogItem, ScriptExecution, ScriptGitRepoItem, ScriptParamField } from '@/types/scripts';
import type { ScriptCatalogItem, ScriptExecution, ScriptGitRepoItem, ScriptParamField, ScriptRepoMetadataFormat } from '@/types/scripts';
export const scriptKeys = {
catalog: ['scripts-catalog'] as const,
@@ -78,6 +78,7 @@ export interface RepoCreateArgs {
url: string;
branch?: string;
path_glob?: string;
metadata_format?: ScriptRepoMetadataFormat;
enabled?: boolean;
}