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
Keep uncapped continuity from writing raw caps
rcourtman632f0af7f377
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex fa287d0b1b..a4b11e47de 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -201,6 +201,11 @@ entitlement enforcement, frontend plan presentation, publicpricing/checkout/download behavior, Pro admin-extra runtime behavior, andRelay entitlement acceptance together rather than treating copy, checkout, andruntime gating as separate unlinked claims.+Uncapped self-hosted plans must also remain uncapped before and after legacy+activation continuity is applied. A captured monitored-system continuity floor+may preserve capacity for capped grants, but it must not be written back as a+raw monitored-system cap for Community, Relay, Pro, Pro+, annual Pro, lifetime,+or other self-hosted uncapped continuity plans.## Extension Pointsdiff --git a/pkg/licensing/activation_types.go b/pkg/licensing/activation_types.goindex 6337441afc..6fd42a6a1a 100644--- a/pkg/licensing/activation_types.go+++ b/pkg/licensing/activation_types.go@@ -74,6 +74,9 @@ func applyActivationContinuityToClaims(claims *Claims, continuity ActivationContif continuity.GrandfatheredMaxMonitoredSystems <= 0 {return}+ if claims.shouldScrubLegacyCommercialCaps() {+ return+ }currentLimit := int64(0)if existing, ok := claims.EffectiveLimits()[MaxMonitoredSystemsLicenseGateKey]; ok {diff --git a/pkg/licensing/activation_types_test.go b/pkg/licensing/activation_types_test.goindex ef565a5ffb..b14fe3199f 100644--- a/pkg/licensing/activation_types_test.go+++ b/pkg/licensing/activation_types_test.go@@ -179,35 +179,63 @@ func TestGrantClaimsToLicense(t *testing.T) {})}-func TestGrantClaimsToClaimsWithContinuityAppliesGrandfatherFloor(t *testing.T) {+func TestGrantClaimsToClaimsWithContinuityDoesNotWriteRawFloorForUncappedSelfHostedPro(t *testing.T) {gc := &GrantClaims{LicenseID: "lic_floor",State: "active",Tier: "pro",- MaxMonitoredSystems: 10,+ MaxMonitoredSystems: 0,IssuedAt: time.Now().Unix(),ExpiresAt: time.Now().Add(72 * time.Hour).Unix(),}claims := grantClaimsToClaimsWithContinuity(gc, ActivationContinuity{LegacyMigration: true,- GrandfatheredMaxMonitoredSystems: 23,+ GrandfatheredMaxMonitoredSystems: 1,GrandfatheredMonitoredSystemsCapturedAt: time.Now().Unix(),})- // The raw MaxMonitoredSystems field still records the continuity floor, but- // self-hosted Pro is uncapped, so EffectiveLimits must not surface a cap.if !claims.CoreMonitoringUncapped {t.Fatal("expected grant-backed self-hosted continuity claims to carry the uncapped core monitoring marker")}- if claims.MaxMonitoredSystems != 23 {- t.Fatalf("MaxMonitoredSystems = %d, want 23", claims.MaxMonitoredSystems)+ if claims.MaxMonitoredSystems != 0 {+ t.Fatalf("MaxMonitoredSystems = %d, want 0 for uncapped self-hosted Pro", claims.MaxMonitoredSystems)+ }+ if _, ok := claims.Limits[MaxMonitoredSystemsLicenseGateKey]; ok {+ t.Fatalf("Limits[%q] present, want absent for uncapped self-hosted Pro", MaxMonitoredSystemsLicenseGateKey)}if got, ok := claims.EffectiveLimits()[MaxMonitoredSystemsLicenseGateKey]; ok {t.Fatalf("EffectiveLimits()[max_monitored_systems] = %d present, want absent (uncapped self-hosted)", got)}}+func TestGrantClaimsToClaimsWithContinuityAppliesGrandfatherFloorToCappedGrant(t *testing.T) {+ gc := &GrantClaims{+ LicenseID: "lic_floor_capped",+ State: "active",+ Tier: "legacy_capped",+ MaxMonitoredSystems: 10,+ IssuedAt: time.Now().Unix(),+ ExpiresAt: time.Now().Add(72 * time.Hour).Unix(),+ }++ claims := grantClaimsToClaimsWithContinuity(gc, ActivationContinuity{+ LegacyMigration: true,+ GrandfatheredMaxMonitoredSystems: 23,+ GrandfatheredMonitoredSystemsCapturedAt: time.Now().Unix(),+ })++ if claims.CoreMonitoringUncapped {+ t.Fatal("did not expect capped continuity claims to carry the uncapped core monitoring marker")+ }+ if claims.MaxMonitoredSystems != 23 {+ t.Fatalf("MaxMonitoredSystems = %d, want 23", claims.MaxMonitoredSystems)+ }+ if got := claims.EffectiveLimits()[MaxMonitoredSystemsLicenseGateKey]; got != 23 {+ t.Fatalf("EffectiveLimits()[max_monitored_systems] = %d, want 23", got)+ }+}+func TestGrantClaimsToClaimsWithContinuityDoesNotLowerGrantLimit(t *testing.T) {gc := &GrantClaims{LicenseID: "lic_noop",