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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix(updates): stop recommending unsafe LXC helper (#1408)
[email protected]4d4567e4a4f9
diff --git a/frontend-modern/src/components/Settings/__tests__/updatesSettingsModel.branchcov0712.test.ts b/frontend-modern/src/components/Settings/__tests__/updatesSettingsModel.branchcov0712.test.tsindex dd6bdf24e9..e3325b7daf 100644--- a/frontend-modern/src/components/Settings/__tests__/updatesSettingsModel.branchcov0712.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/updatesSettingsModel.branchcov0712.test.ts@@ -221,11 +221,11 @@ describe('buildUpdateInstallGuide', () => {// -- proxmoxve arm ---------------------------------------------------------- it('returns the proxmox LXC guide for the proxmoxve deployment arm', () => {+ it('routes an auto-updatable proxmox LXC away from the legacy community helper', () => {const guide = buildUpdateInstallGuide(makeVersionInfo({ deploymentType: 'proxmoxve' }),makeUpdateInfo({ latestVersion: 'v6.0.5' }),- makeUpdatePlan({ canAutoUpdate: false }),+ makeUpdatePlan({ canAutoUpdate: true }),'v6.0.5','curl',false,@@ -233,19 +233,39 @@ describe('buildUpdateInstallGuide', () => {expect(guide).toStrictEqual({headerTitle: 'Update Available',headerSummary: 'Version v6.0.5 is ready to install',- introText: 'Follow these steps to update manually:',+ introText:+ 'Use "Install Update" above. It stages and verifies the release before stopping Pulse and preserves rollback.',steps: [- { id: 'open-console', title: 'Open your Pulse LXC console' },- { id: 'run-update', title: 'Run the update command:', command: 'update' },{- id: 'run-update-note',- title: '',- note: 'The script will automatically download and install the latest version.',+ id: 'proxmox-safe-update',+ title: 'Install from this page',+ note: 'Do not run a legacy community-scripts `update` helper. Under memory or disk pressure it can stop Pulse before its download succeeds.',},],});});+ it('routes a manual-only proxmox LXC to the signed Pulse installer', () => {+ const guide = buildUpdateInstallGuide(+ makeVersionInfo({ deploymentType: 'proxmoxve' }),+ makeUpdateInfo({ latestVersion: 'v6.0.5' }),+ makeUpdatePlan({ canAutoUpdate: false }),+ 'v6.0.5',+ 'curl',+ false,+ );+ expect(guide?.introText).toBe(+ 'Use the supported signed Pulse installer for this manual update.',+ );+ expect(guide?.steps).toStrictEqual([+ {+ id: 'proxmox-signed-installer',+ title: 'Follow the signed installer instructions',+ note: 'Open https://github.com/rcourtman/Pulse/blob/main/docs/INSTALL.md and use the pinned SSH-signature verification flow. Do not run a legacy community-scripts `update` helper.',+ },+ ]);+ });+// -- docker arm: pro steps (dockerUpdate present) --------------------------it('returns digest-pinned pro docker steps when dockerUpdate is present (with login note)', () => {diff --git a/frontend-modern/src/components/Settings/updatesSettingsModel.ts b/frontend-modern/src/components/Settings/updatesSettingsModel.tsindex 3b974f8005..747eda2cc6 100644--- a/frontend-modern/src/components/Settings/updatesSettingsModel.ts+++ b/frontend-modern/src/components/Settings/updatesSettingsModel.ts@@ -107,19 +107,28 @@ export function buildUpdateInstallGuide(: 'Follow these steps to update manually:';if (versionInfo.deploymentType === 'proxmoxve') {+ const canAutoUpdate = updatePlan?.canAutoUpdate === true;return {headerTitle: 'Update Available',headerSummary: `Version ${updateInfo?.latestVersion} is ready to install`,- introText,- steps: [- { id: 'open-console', title: 'Open your Pulse LXC console' },- { id: 'run-update', title: 'Run the update command:', command: 'update' },- {- id: 'run-update-note',- title: '',- note: 'The script will automatically download and install the latest version.',- },- ],+ introText: canAutoUpdate+ ? 'Use "Install Update" above. It stages and verifies the release before stopping Pulse and preserves rollback.'+ : 'Use the supported signed Pulse installer for this manual update.',+ steps: canAutoUpdate+ ? [+ {+ id: 'proxmox-safe-update',+ title: 'Install from this page',+ note: 'Do not run a legacy community-scripts `update` helper. Under memory or disk pressure it can stop Pulse before its download succeeds.',+ },+ ]+ : [+ {+ id: 'proxmox-signed-installer',+ title: 'Follow the signed installer instructions',+ note: 'Open https://github.com/rcourtman/Pulse/blob/main/docs/INSTALL.md and use the pinned SSH-signature verification flow. Do not run a legacy community-scripts `update` helper.',+ },+ ],};}diff --git a/frontend-modern/src/components/UpdateBanner.test.tsx b/frontend-modern/src/components/UpdateBanner.test.tsxindex 1a75634fd9..40afa7fd06 100644--- a/frontend-modern/src/components/UpdateBanner.test.tsx+++ b/frontend-modern/src/components/UpdateBanner.test.tsx@@ -5,6 +5,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest';const { mock } = vi.hoisted(() => ({mock: {runtimeBuild: 'community' as string,+ deploymentType: 'systemd' as string,dockerUpdate: undefined as| {version: string;@@ -44,7 +45,7 @@ vi.mock('@/stores/updates', () => ({isMajorUpgrade: false,dockerUpdate: mock.dockerUpdate,}),- versionInfo: () => ({ version: '6.0.0', deploymentType: 'systemd' }),+ versionInfo: () => ({ version: '6.0.0', deploymentType: mock.deploymentType }),isUpdateVisible: () => true,dismissUpdate: vi.fn(),applyUpdate: vi.fn(() => Promise.resolve(true)),@@ -68,6 +69,7 @@ const PORTAL_URL = 'https://pulserelay.pro/download.html';afterEach(() => {cleanup();mock.runtimeBuild = 'community';+ mock.deploymentType = 'systemd';mock.dockerUpdate = undefined;mock.plan = {canAutoUpdate: true,@@ -181,3 +183,20 @@ describe('UpdateBanner Pro edition update paths', () => {expect(screen.queryByRole('link', { name: /Private Release Access/ })).not.toBeInTheDocument();});});++describe('UpdateBanner Proxmox LXC update safety', () => {+ it('routes an auto-updatable LXC to in-product apply instead of the legacy update helper', async () => {+ mock.deploymentType = 'proxmoxve';++ render(() => <UpdateBanner />);++ expect(await screen.findByRole('button', { name: 'Apply Update' })).toBeInTheDocument();+ expect(+ screen.getByText(/use Apply Update here; do not use a legacy community 'update' helper/),+ ).toBeInTheDocument();+ expect(screen.queryByText(/type 'update' in console/)).not.toBeInTheDocument();++ fireEvent.click(screen.getByTitle('Show more'));+ expect(screen.getByText(/Safe upgrade:/)).toBeInTheDocument();+ });+});diff --git a/frontend-modern/src/components/UpdateBanner.tsx b/frontend-modern/src/components/UpdateBanner.tsxindex 3fe1d1919d..43d5306a9e 100644--- a/frontend-modern/src/components/UpdateBanner.tsx+++ b/frontend-modern/src/components/UpdateBanner.tsx@@ -116,7 +116,9 @@ export function UpdateBanner() {switch (deploymentType) {case 'proxmoxve':- return "ProxmoxVE users: type 'update' in console";+ return updatePlan()?.canAutoUpdate+ ? "ProxmoxVE LXC: use Apply Update here; do not use a legacy community 'update' helper"+ : 'ProxmoxVE LXC: use the signed Pulse installer, not a legacy community update helper';case 'docker':return 'Docker: pull image and recreate container';case 'source':@@ -372,7 +374,7 @@ export function UpdateBanner() {{!isProEdition() && getUpdateInstructions() && (<p>- <span class="font-medium">Quick upgrade:</span> {getUpdateInstructions()}+ <span class="font-medium">Safe upgrade:</span> {getUpdateInstructions()}</p>)}<Show when={updateStore.updateInfo()?.warning}>