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-portal-plan-panel

rcourtman15ffacab59b7
diff --cc docs/release-control/v6/internal/subsystems/cloud-paid.md
index 1b33162994,3a45d6124e..858f3b5879
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@@ -3431,47 -3431,19 +3431,60 @@@ Pulse-service-backed capabilities. `pro
meaning: a Pulse-signed licence is available to embed so release builds can
verify the lease.
+### 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, its
+expiry, how many client workspaces are in use, and, on an evaluation, the plans
+above the current cap with their monthly or annual price. Owners and admins
+get Buy, Manage billing and "Apply my purchase now"; 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. 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
+ upgrade, decides client-workspace health from the runtime image's recorded
+ Docker HEALTHCHECK when the container declares one, and falls back to the
+ direct `/api/health` HTTP probe only for images without it. The command runs
+ in a one-off container on the provider ingress network, which cannot reach a
+ client's isolated tenant network, so the HTTP probe alone reported every real
+ client unhealthy and blocked upgrades on any install with a client. The
+ long-lived control plane's health monitor uses the same rule. Regression
+ coverage: `TestDockerRecordedHealthDecidesWhenTheImageDeclaresOne` in
+ `internal/cloudcp/docker/manager_test.go`.
+
### Runtime display load remains outside commercial bootstrap ownership
`frontend-modern/src/useAppRuntimeState.ts` now loads presentation defaults
diff --cc docs/release-control/v6/internal/subsystems/deployment-installability.md
index e008c4d69f,a6f98f12ea..6f958d029c
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@@ -2416,19 -2416,18 +2416,31 @@@ artifact-selection behaviour
## Current State
+### 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
+ `provider-msp status` through `docker compose run --no-deps`, a container
+ attached only to the provider ingress network. Client health is now read from
+ the runtime image's recorded Docker HEALTHCHECK rather than an HTTP dial into
+ each client's isolated network, so `upgrade.sh --dry-run` plans cleanly on an
+ install with real clients instead of failing with `unhealthy active
+ workspaces`. Install proofs that only ever ran against an empty install could
+ not see this; verification on 2026-09-23 used a v6.4.1 bundle with one client
+ whose container Docker reported healthy.
+
### Reviewed frontend dependency security floors
The 2026-09-21 npm-minor-patch group raises the reviewed floors of the