Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep backup repository hints out of guest node attribution

pulse-triage[bot]e03d1703a294
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 01c311fbb3..32c702c5d3 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -10405,3 +10405,20 @@ summary and complete candidate detail. `backupTaskEvidence.test.tsx` exercises t
router, compact/full summaries, complete literal evidence, saved-view search and
ordinary polling. Browser verification must exercise these states through the
production consumer at desktop and narrow widths and inspect actual pixels.
+
+### Unmatched backup placement comes only from node evidence
+
+Unmatched PBS namespaces and datastores remain backup locations, not guest
+nodes. Unmatched PVE records retain their reported native node, never their
+connection name as a substitute. Both existing workload detail views say
+`Not reported` for missing VM/LXC placement; host labels remain separate.
+Node filters and unscoped task matching cannot use invented fallback nodes.
+
+`proxmoxBackupRecoveryModel.identity.test.ts` and the normal-suite
+`backupWorkloadIdentity.test.tsx` cover absent/blank placement, independent
+reader/location identity, native-node controls, node filtering and live owner
+arrival/removal through the parsed inventory consumer. Matching rules, source
+keys, restore points, protection policy and guest operations are unchanged;
+removing fabricated node metadata prevents one false unscoped-task match.
+Desktop and phone browser proof exercises both existing detail views. This
+corrects attribution, not #2681/#3248 causality or native recovery.
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 1061890767..67501d997b 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -7933,3 +7933,20 @@ summary and complete candidate detail. `backupTaskEvidence.test.tsx` exercises t
router, compact/full summaries, complete literal evidence, saved-view search and
ordinary polling. Browser verification must exercise these states through the
production consumer at desktop and narrow widths and inspect actual pixels.
+
+### Unmatched backup placement comes only from node evidence
+
+Unmatched PBS namespaces and datastores remain backup locations, not guest
+nodes. Unmatched PVE records retain their reported native node, never their
+connection name as a substitute. Both existing workload detail views say
+`Not reported` for missing VM/LXC placement; host labels remain separate.
+Node filters and unscoped task matching cannot use invented fallback nodes.
+
+`proxmoxBackupRecoveryModel.identity.test.ts` and the normal-suite
+`backupWorkloadIdentity.test.tsx` cover absent/blank placement, independent
+reader/location identity, native-node controls, node filtering and live owner
+arrival/removal through the parsed inventory consumer. Matching rules, source
+keys, restore points, protection policy and guest operations are unchanged;
+removing fabricated node metadata prevents one false unscoped-task match.
+Desktop and phone browser proof exercises both existing detail views. This
+corrects attribution, not #2681/#3248 causality or native recovery.
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 2b7b4f2f4c..416336921c 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -8887,3 +8887,20 @@ summary and complete candidate detail. `backupTaskEvidence.test.tsx` exercises t
router, compact/full summaries, complete literal evidence, saved-view search and
ordinary polling. Browser verification must exercise these states through the
production consumer at desktop and narrow widths and inspect actual pixels.
+
+### Unmatched backup placement comes only from node evidence
+
+Unmatched PBS namespaces and datastores remain backup locations, not guest
+nodes. Unmatched PVE records retain their reported native node, never their
+connection name as a substitute. Both existing workload detail views say
+`Not reported` for missing VM/LXC placement; host labels remain separate.
+Node filters and unscoped task matching cannot use invented fallback nodes.
+
+`proxmoxBackupRecoveryModel.identity.test.ts` and the normal-suite
+`backupWorkloadIdentity.test.tsx` cover absent/blank placement, independent
+reader/location identity, native-node controls, node filtering and live owner
+arrival/removal through the parsed inventory consumer. Matching rules, source
+keys, restore points, protection policy and guest operations are unchanged;
+removing fabricated node metadata prevents one false unscoped-task match.
+Desktop and phone browser proof exercises both existing detail views. This
+corrects attribution, not #2681/#3248 causality or native recovery.
diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
index 81777ff608..760f7f3fc4 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
@@ -47,6 +47,7 @@ import {
SortableHead,
artifactStateLabel,
getBackupWorkloadPVEConnection,
+ getBackupWorkloadNodeLabel,
getBackupWorkloadDisclosureLabel,
} from './proxmoxBackupsTableShared';
import {
@@ -234,7 +235,7 @@ const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[]
rows: compactDetailRows([
makeDetailRow('Type', row.workload.typeLabel),
makeDetailRow(PROXMOX_BACKUP_COLUMN_LABELS.targetId, row.workload.vmid),
- makeDetailRow('Node', row.workload.node),
+ makeDetailRow('Node', getBackupWorkloadNodeLabel(row.workload)),
makeDetailRow('PVE connection', getBackupWorkloadPVEConnection(row.workload), {
wrap: true,
}),
diff --git a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx
index 937e57aa7a..10bad4e7b1 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx
@@ -42,6 +42,7 @@ import {
SortableHead,
artifactStateLabel,
getBackupWorkloadPVEConnection,
+ getBackupWorkloadNodeLabel,
getBackupWorkloadDisclosureLabel,
} from './proxmoxBackupsTableShared';
import {
@@ -148,7 +149,7 @@ const buildRecoverableDetailSections = (artifact: RecoverableArtifact): DetailSe
rows: compactDetailRows([
makeDetailRow('Type', artifact.workload.typeLabel),
makeDetailRow(PROXMOX_BACKUP_COLUMN_LABELS.targetId, artifact.workload.vmid),
- makeDetailRow('Node', artifact.workload.node),
+ makeDetailRow('Node', getBackupWorkloadNodeLabel(artifact.workload)),
makeDetailRow('PVE connection', getBackupWorkloadPVEConnection(artifact.workload), {
wrap: true,
}),
diff --git a/frontend-modern/src/features/proxmox/__tests__/backupWorkloadIdentity.test.tsx b/frontend-modern/src/features/proxmox/__tests__/backupWorkloadIdentity.test.tsx
index df9c477e5f..03d42df719 100644
--- a/frontend-modern/src/features/proxmox/__tests__/backupWorkloadIdentity.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/backupWorkloadIdentity.test.tsx
@@ -263,4 +263,139 @@ describe('backup workload identity in real inventory consumers', () => {
);
expect(api.fetch).toHaveBeenCalledTimes(2);
});
+ it.each([330, 1200])(
+ 'keeps unmatched PBS repository hints out of guest nodes and Node filters at %ipx',
+ async (width) => {
+ api.width = width;
+ mount({
+ workloads: [],
+ pve: emptyPVE,
+ pbs: [
+ identityPBS({
+ instance: 'pbs-reader',
+ namespace: 'namespace-only',
+ datastore: 'datastore-only',
+ }),
+ ],
+ });
+ fireEvent.click(await screen.findByRole('button', { name: /1 unmatched backup/i }));
+ fireEvent.click(await screen.findByRole('button', { name: /expand details for VM 100/i }));
+ let detail = screen.getByTestId('proxmox-coverage-detail');
+ expect(within(detail).getByText('Node', { exact: true }).closest('tr')).toHaveTextContent(
+ 'Not reported',
+ );
+ expect(detail).toHaveTextContent('datastore-only / namespace-only');
+ expect(detail).toHaveTextContent('Connection: pbs-reader');
+ expect(within(detail).queryByRole('link')).not.toBeInTheDocument();
+ expect(
+ screen.queryByRole('option', { name: 'Node: namespace-only' }),
+ ).not.toBeInTheDocument();
+ expect(
+ screen.queryByRole('option', { name: 'Node: datastore-only' }),
+ ).not.toBeInTheDocument();
+ await fireEvent.click(screen.getByRole('link', { name: /by date/i }));
+ fireEvent.click(await screen.findByRole('button', { name: /expand details for VM 100/i }));
+ detail = screen.getByTestId('proxmox-recoverable-detail');
+ expect(within(detail).getByText('Node', { exact: true }).closest('tr')).toHaveTextContent(
+ 'Not reported',
+ );
+ expect(within(detail).getByText('Location', { exact: true }).closest('tr')).toHaveTextContent(
+ 'datastore-only / namespace-only',
+ );
+ expect(connectionRow(detail)).toHaveTextContent('Not reported');
+ expect(api.fetch).toHaveBeenCalledTimes(2);
+ },
+ );
+
+ it.each([330, 1200])(
+ 'does not call a PVE reader a node when placement is absent at %ipx',
+ async (width) => {
+ api.width = width;
+ mount({
+ workloads: [],
+ pve: {
+ ...emptyPVE,
+ storageBackups: [identityArchive({ instance: 'connection-only', node: '' })],
+ },
+ });
+ fireEvent.click(await screen.findByRole('button', { name: /1 unmatched backup/i }));
+ fireEvent.click(await screen.findByRole('button', { name: /expand details for VM 100/i }));
+ let detail = screen.getByTestId('proxmox-coverage-detail');
+ expect(within(detail).getByText('Node', { exact: true }).closest('tr')).toHaveTextContent(
+ 'Not reported',
+ );
+ expect(connectionRow(detail)).toHaveTextContent('connection-only');
+ expect(
+ screen.queryByRole('option', { name: 'Node: connection-only' }),
+ ).not.toBeInTheDocument();
+ await fireEvent.click(screen.getByRole('link', { name: /by date/i }));
+ fireEvent.click(await screen.findByRole('button', { name: /expand details for VM 100/i }));
+ detail = screen.getByTestId('proxmox-recoverable-detail');
+ expect(within(detail).getByText('Node', { exact: true }).closest('tr')).toHaveTextContent(
+ 'Not reported',
+ );
+ expect(
+ within(detail).getByText('Connection', { exact: true }).closest('tr'),
+ ).toHaveTextContent('connection-only');
+ expect(within(detail).queryByRole('link')).not.toBeInTheDocument();
+ expect(api.fetch).toHaveBeenCalledTimes(2);
+ },
+ );
+
+ it('keeps a reported unmatched PVE node selectable without inventing a live owner', async () => {
+ api.width = 1200;
+ mount({ workloads: [], pve: { ...emptyPVE, storageBackups: [identityArchive()] } });
+ fireEvent.click(await screen.findByRole('button', { name: /1 unmatched backup/i }));
+ fireEvent.click(await screen.findByRole('button', { name: /expand details for VM 100/i }));
+ const detail = screen.getByTestId('proxmox-coverage-detail');
+ expect(within(detail).getByText('Node', { exact: true }).closest('tr')).toHaveTextContent(
+ 'pve-1',
+ );
+ expect(within(detail).queryByRole('link')).not.toBeInTheDocument();
+ expect(screen.getByRole('option', { name: 'Node: pve-1' })).toBeInTheDocument();
+ fireEvent.change(screen.getByRole('combobox', { name: 'Filter' }), {
+ target: { value: 'node\u001fpve-1' },
+ });
+ await waitFor(() =>
+ expect(new URLSearchParams(window.location.search).get('node')).toBe('pve-1'),
+ );
+ expect(document.querySelectorAll('[data-proxmox-backup-row="coverage"]')).toHaveLength(1);
+ });
+
+ it('replaces unknown placement only with a live matched workload and withdraws it when that owner disappears', async () => {
+ const setWorkloads = mount({
+ workloads: [],
+ pve: emptyPVE,
+ pbs: [identityPBS({ instance: 'pbs-reader', namespace: 'namespace-only' })],
+ });
+ fireEvent.click(await screen.findByRole('button', { name: /1 unmatched backup/i }));
+ fireEvent.click(await screen.findByRole('button', { name: /expand details for VM 100/i }));
+ expect(
+ within(screen.getByTestId('proxmox-coverage-detail'))
+ .getByText('Node', { exact: true })
+ .closest('tr'),
+ ).toHaveTextContent('Not reported');
+ setWorkloads([identityGuest('guest-east', 'east', 'native-node')]);
+ const matched = await screen.findByRole('button', { name: /expand details for guest-east/i });
+ fireEvent.click(matched);
+ let detail = screen.getByTestId('proxmox-coverage-detail');
+ expect(within(detail).getByText('Node', { exact: true }).closest('tr')).toHaveTextContent(
+ 'native-node',
+ );
+ expect(within(detail).getByRole('link')).toHaveAttribute(
+ 'href',
+ '/proxmox/overview?resource=guest-east',
+ );
+ expect(detail).toHaveTextContent('main / namespace-only');
+ setWorkloads([]);
+ fireEvent.click(await screen.findByRole('button', { name: /expand details for VM 100/i }));
+ detail = screen.getByTestId('proxmox-coverage-detail');
+ expect(within(detail).getByText('Node', { exact: true }).closest('tr')).toHaveTextContent(
+ 'Not reported',
+ );
+ expect(detail).not.toHaveTextContent('native-node');
+ expect(within(detail).queryByRole('link')).not.toBeInTheDocument();
+ expect(screen.queryByRole('option', { name: 'Node: native-node' })).not.toBeInTheDocument();
+ expect(api.fetch).toHaveBeenCalledTimes(2);
+ });
});
diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.identity.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.identity.test.ts
index 20928fe043..162acc12a7 100644
--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.identity.test.ts
+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.identity.test.ts
@@ -253,6 +253,60 @@ describe('backup-identity: native ownership rather than first label match', () =
).toBe(true);
});
+ it.each(['namespace-only', ''])(
+ 'does not project unmatched PBS location %j as a guest node',
+ (namespace) => {
+ const result = model({
+ pbsBackups: [
+ identityPBS({ instance: 'pbs-reader', namespace, datastore: 'datastore-only' }),
+ ],
+ });
+ const row = result.coverageRows[0];
+ expect(row.workload.node).toBeUndefined();
+ expect(row.workload.nativeNode).toBeUndefined();
+ expect(row.workload.instance).toBeUndefined();
+ expect(row.isOrphaned).toBe(true);
+ expect(row.posture).toBe('not-evaluated');
+ expect(row.artifacts[0].location).toBe(`datastore-only / ${namespace || '(root)'}`);
+ expect(row.artifacts[0].locationConnection).toBe('pbs-reader');
+ },
+ );
+
+ it.each(['', ' '])(
+ 'does not substitute a PVE connection for missing native node %j',
+ (node) => {
+ const result = model({ archives: [identityArchive({ instance: 'connection-only', node })] });
+ const row = result.coverageRows[0];
+ expect(row.workload.node).toBeUndefined();
+ expect(row.workload.nativeNode).toBeUndefined();
+ expect(row.workload.instance).toBe('connection-only');
+ expect(row.artifacts[0].location).toBe('local');
+ expect(row.artifacts[0].locationConnection).toBe('connection-only');
+ },
+ );
+
+ it('retains an explicitly reported PVE node for unmatched archives, snapshots and typed tasks', () => {
+ const result = model({
+ archives: [identityArchive()],
+ snapshots: [identitySnapshot()],
+ tasks: [identityTask({ type: 'vm' })],
+ });
+ expect(result.coverageRows).toHaveLength(1);
+ expect(result.coverageRows[0].workload.node).toBe('pve-1');
+ expect(result.coverageRows[0].workload.nativeNode).toBe('pve-1');
+ expect(result.coverageRows[0].latestTask?.id).toBe('task-100');
+ expect(result.coverageRows[0].artifacts).toHaveLength(2);
+ });
+
+ it('does not attach an unscoped task by mistaking the connection name for a native node', () => {
+ const result = model({
+ archives: [identityArchive({ instance: 'connection-only', node: '' })],
+ tasks: [identityTask({ instance: '', node: 'connection-only' })],
+ });
+ expect(result.coverageRows).toHaveLength(1);
+ expect(result.coverageRows[0].latestTask).toBeUndefined();
+ });
+
it('does not attach a PVE task to a PBS-only orphan with a similar location label', () => {
const result = model({ pbsBackups: [identityPBS()], tasks: [identityTask({ instance: '' })] });
expect(result.coverageRows[0].latestTask).toBeUndefined();
diff --git a/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts b/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts
index 25424defe7..bc29a438cd 100644
--- a/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts
+++ b/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts
@@ -311,6 +311,7 @@ function fallbackWorkload(
hints: readonly (string | undefined)[],
sourceScope: readonly (string | undefined)[],
pveInstance?: string,
+ pveNode?: string,
): WorkloadReference {
const id = fallbackWorkloadId(type, vmid, hints);
// A VMID (or host label) and repository name are not cross-source identity.
@@ -324,8 +325,10 @@ function fallbackWorkload(
typeLabel: typeLabel(type),
vmid: id,
label: workloadFallbackLabel(type, id),
- node: type === 'host' ? undefined : hints.find((hint) => !!hint?.trim()),
- nativeNode: type === 'host' ? undefined : hints.find((hint) => !!hint?.trim()),
+ // Repository/namespace and connection hints can name a fallback target,
+ // but do not report a guest node. Only the PVE producer supplies one.
+ node: type === 'host' ? undefined : pveNode?.trim() || undefined,
+ nativeNode: type === 'host' ? undefined : pveNode?.trim() || undefined,
instance: pveInstance,
};
}
@@ -423,6 +426,7 @@ function resolvePVEWorkload(
type === 'host' ? [instance, node] : [node, instance],
['pve', instance, node],
instance,
+ node,
)
);
}
diff --git a/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx b/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx
index e9628e71c8..30b241a7d2 100644
--- a/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx
+++ b/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx
@@ -50,6 +50,12 @@ export const getBackupWorkloadPVEConnection = (workload: WorkloadReference): str
? workload.instance?.trim() || 'Not reported'
: undefined;
+// Missing guest placement is explicit in both detail views. Backup repository
+// and namespace hints are not PVE nodes; host backups have no guest placement.
+export const getBackupWorkloadNodeLabel = (workload: WorkloadReference): string | undefined =>
+ workload.node?.trim() ||
+ (workload.type === 'vm' || workload.type === 'ct' ? 'Not reported' : undefined);
+
export const getBackupWorkloadDisclosureLabel = (workload: WorkloadReference): string => {
const connection = getBackupWorkloadPVEConnection(workload);
return connection ? `${workload.label} · PVE connection: ${connection}` : workload.label;