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.

Merge remote-tracking branch 'origin/main' into claude/msp-support-network-reconcile

rcourtmanbd4cad1bb941
diff --cc docs/release-control/v6/internal/subsystems/cloud-paid.md
index 13158af2f1,7a64165142..598005cf89
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@@ -3431,24 -3431,53 +3431,71 @@@ Pulse-service-backed capabilities. `pro
meaning: a Pulse-signed licence is available to embed so release builds can
verify the lease.
+### Provider MSP health monitor keeps clients running across upgrades
+
+The control plane's health monitor restarts an unhealthy client workspace
+with a single Docker restart, never a stop: Docker's `unless-stopped` policy
+does not bring back a container stopped through the API, so a stopped client
+stayed down until someone started it by hand. Before each health check, and
+once as soon as the control plane starts, the monitor also reattaches the
+provider support containers (Traefik and the control plane) to every active
+client's isolated tenant network. Recreating either one, which every
+`upgrade.sh` run does to the control plane, drops those attachments, cutting
+the client's Traefik route and, with the old stop behaviour, taking every
+client offline three minutes later. A client without an isolated network is
+skipped quietly. Regression coverage:
+`TestHealthMonitorReattachesSupportContainersAndRestartsInsteadOfStopping` in
+`internal/cloudcp/health_monitor_test.go` and
+`TestEnsureSupportContainersOnTenantNetworkSkipsMissingNetwork` in
+`internal/cloudcp/docker/manager_test.go`.
+
+ ### Provider-hosted MSP platforms buy and renew their own licence
+
+ A provider-hosted control plane now buys and renews its licence through the
+ licence server's self-serve provider MSP path (pulse-pro
+ `license-server/provider_msp_purchase.go`), with no key copy and nobody at
+ Pulse in the loop. Portal routes under `/api/accounts/{account_id}/provider-msp/`
+ serve plan state to any member. Checkout, the Stripe billing portal and an
+ immediate licence refresh are restricted to owners and admins. The purchasable
+ plan list comes from the licence server's `GET /v1/provider-msp/plans`, so the
+ portal offers only what the catalogue sells, at Stripe's price, and drops any
+ plan without a known workspace limit. `ProviderMSPLicenseRefresher` signs
+ every request that must come from this platform with its lease signing key,
+ validates the returned licence the way startup does, requires it to bind this
+ platform's key, and installs it at `ProviderMSPRenewedLicensePath`.
+ `LoadConfig` prefers that renewed licence while it validates (plan source
+ `renewed_license`), so a paying provider keeps starting after the self-issued
+ evaluation on the host expires. A changed licence restarts the control plane
+ through the graceful shutdown path, because the plan version is read once at
+ load. `msp_solo` (3 client workspaces) is the first paid step above the
+ 2-workspace evaluation.
+
+ In the portal, provider-hosted mode shows the `billing` section as **Plan**
+ (`internal/cloudcp/portal/frontend/src/provider_plan.ts`), never Pulse-hosted
+ or self-hosted billing. The section shows the evaluation or paid plan, how
+ many client workspaces are in use, the evaluation's expiry, and, on an
+ evaluation, the plans above the current cap with their monthly or annual
+ price. A paid plan shows no licence date while it renews; once the licence is
+ inside its 14-day grace the panel says the subscription has not renewed and
+ when clients lose the plan. Owners and admins get Buy, Manage billing and an
+ immediate refresh ("Apply my purchase now", or "Apply it now" on a paid plan);
+ read-only members are told who can buy. After Stripe returns to
+ `?provider_msp_checkout=complete` the panel keeps refreshing the licence until
+ the purchase lands. It then polls the plan until the restarted control plane
+ serves the new plan, and it never reloads the page. Manage billing returns to
+ `?provider_msp_checkout=billing`, and the panel checks the licence twice so a
+ plan changed in the Stripe billing portal applies without a click. Regression
+ coverage:
+ `TestLoadConfig_ProviderHostedMSPPrefersRenewedLicense` in
+ `internal/cloudcp/config_test.go`,
+ `TestProviderMSPLicenseRefreshInstallsThePaidLicenceAndRestarts` and
+ `TestProviderMSPPortalRoutesRelayToTheLicenceServer` in
+ `internal/cloudcp/provider_msp_license_refresh_test.go`,
+ `TestRegisterRoutes_ProviderMSPPurchaseRoutesRequireOwnerOrAdmin` in
+ `internal/cloudcp/routes_auth_test.go`, and
+ `TestProviderMSPWorkspaceLadderRisesFromTheEvaluation` in
+ `pkg/licensing/features_test.go`.
+
### Provider MSP status reads client health that any caller can observe
`provider-msp status`, which `upgrade.sh` gates on before every provider
diff --cc docs/release-control/v6/internal/subsystems/deployment-installability.md
index 9b664bd7d1,6f958d029c..d8b16474bb
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@@ -2416,19 -2416,19 +2416,32 @@@ artifact-selection behaviour
## Current State
+### Provider MSP clients survive a support-container recreate
+
+Recreating the control plane or Traefik (every `upgrade.sh` run recreates the
+control plane) used to detach them from each client's isolated network. The
+health monitor then saw every client as failing and stopped it, and nothing
+restarted it, so an upgrade on a v6.4.1 install with clients took all of them
+offline. The monitor now reattaches the support containers on startup and on
+every pass, and restarts rather than stops an unhealthy client. Verified on
+2026-09-23 on a v6.4.1 provider bundle with two clients: a control-plane
+recreate rejoined both client networks within a second, a Traefik-only
+recreate had its client routes back on the next 60-second pass, and neither
+client was stopped.
+
+ ### Provider MSP operations accept a renewed licence
+
+ `provider-msp preflight`, `proof`, `recover` and `backup` treat a licence
+ the control plane renewed into its data directory (plan source
+ `renewed_license`) the same as the host `CP_PROVIDER_MSP_LICENSE_FILE`,
+ through `ProviderMSPPlanSourceIsSignedLicense`. Only the development
+ environment fallback is still refused. Without this, the first paid renewal
+ would have made every day-2 command refuse to run on the platform it was paid
+ for. Backups keep including the host licence file, and a restored platform
+ fetches its renewed licence again on the next refresh. Regression coverage:
+ `TestProviderMSPPreflightAcceptsRenewedLicenseSource` in
+ `cmd/pulse-control-plane/provider_msp_preflight_test.go`.
+
### Provider MSP upgrades work once a client exists
`deploy/provider-msp/upgrade.sh` and `run-install-proof.sh` run