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.

Pro updater requests its channel from the dual-channel broker

rcourtman092858462567
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 5035417e20..c85eadaeb5 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -727,6 +727,16 @@ TLS floor in the dynamic config.
fingerprint, per `internal/updates/pro_update.go`), verifying the private
archive against the same pinned `pulse-installer` SSHSIG key plus the
broker manifest sha256, and refusing GitHub-shaped download URLs outright.
+ The broker is dual-channel (pulse-pro side, 2026-07-22): the stable
+ manifest slot answers every request by default, and a separate rc slot
+ answers `channel=rc`. The Pro updater must send `channel=rc` on the broker
+ request for rc-channel installs and must leave the channel parameter unset
+ for stable-channel installs, keeping the stable request byte-identical for
+ brokers that predate the parameter. A stable-channel install therefore
+ tracks the broker's stable slot; the existing client-side guard (a
+ stable-channel install refuses a prerelease broker pin and reports "no
+ update" with a warning) stays as the backstop for a single-manifest or
+ drifted broker.
An unactivated Pro binary refuses to apply and directs the operator to
`https://pulserelay.pro/download.html` and the `install.sh --archive` path.
This is required because the community self-update flow (the in-app GitHub
diff --git a/internal/updates/manager_pro_update_test.go b/internal/updates/manager_pro_update_test.go
index 3431e0c108..4b30d11bdf 100644
--- a/internal/updates/manager_pro_update_test.go
+++ b/internal/updates/manager_pro_update_test.go
@@ -28,9 +28,10 @@ type proBrokerFixture struct {
omitSSHSig bool // drop the sshsig_url from the manifest
dockerBlock map[string]any // broker docker block; nil for the default digest-pinned one
- brokerCalls int
- tarballCalls int
- sshsigCalls int
+ brokerCalls int
+ tarballCalls int
+ sshsigCalls int
+ channelQueries []string
}
func newProBrokerFixture(t *testing.T, version string, prerelease bool) *proBrokerFixture {
@@ -57,6 +58,7 @@ func newProBrokerFixture(t *testing.T, version string, prerelease bool) *proBrok
if got := r.URL.Query().Get("target"); got != proUpdateTarget() {
t.Errorf("broker got target %q, want %q", got, proUpdateTarget())
}
+ f.channelQueries = append(f.channelQueries, r.URL.Query().Get("channel"))
artifact := map[string]any{
"target": proUpdateTarget(),
@@ -192,6 +194,40 @@ func TestCheckForUpdatesProUsesBroker(t *testing.T) {
}
})
+ t.Run("stable channel leaves the broker channel parameter unset", func(t *testing.T) {
+ fixture := newProBrokerFixture(t, "6.0.5", false)
+ manager := NewManager(&config.Config{DataPath: t.TempDir()})
+ manager.SetProUpdateCredentialSource(fixture.credentialSource())
+
+ if _, err := manager.CheckForUpdatesWithChannel(context.Background(), "stable"); err != nil {
+ t.Fatalf("CheckForUpdatesWithChannel: %v", err)
+ }
+ if len(fixture.channelQueries) == 0 {
+ t.Fatal("expected the update check to query the download broker")
+ }
+ // The stable default stays implicit so the request is byte-identical
+ // for brokers that predate the dual-channel parameter.
+ if got := fixture.channelQueries[len(fixture.channelQueries)-1]; got != "" {
+ t.Fatalf("stable check sent channel=%q, want no channel parameter", got)
+ }
+ })
+
+ t.Run("rc channel requests the broker rc slot", func(t *testing.T) {
+ fixture := newProBrokerFixture(t, "6.1.0-rc.1", true)
+ manager := NewManager(&config.Config{DataPath: t.TempDir()})
+ manager.SetProUpdateCredentialSource(fixture.credentialSource())
+
+ if _, err := manager.CheckForUpdatesWithChannel(context.Background(), "rc"); err != nil {
+ t.Fatalf("CheckForUpdatesWithChannel: %v", err)
+ }
+ if len(fixture.channelQueries) == 0 {
+ t.Fatal("expected the update check to query the download broker")
+ }
+ if got := fixture.channelQueries[len(fixture.channelQueries)-1]; got != "rc" {
+ t.Fatalf("rc check sent channel=%q, want rc", got)
+ }
+ })
+
t.Run("stable channel skips a prerelease broker pin", func(t *testing.T) {
fixture := newProBrokerFixture(t, "6.1.0-rc.1", true)
manager := NewManager(&config.Config{DataPath: t.TempDir()})
diff --git a/internal/updates/pro_update.go b/internal/updates/pro_update.go
index f6dc697d65..9eaf6b84f1 100644
--- a/internal/updates/pro_update.go
+++ b/internal/updates/pro_update.go
@@ -228,7 +228,7 @@ func validateProApplyRequestURL(rawURL, licenseServerURL string) error {
// fetchProDownloadManifest queries the license server download broker for the
// current private Pulse Pro release and signed artifact URLs for this
// architecture.
-func (m *Manager) fetchProDownloadManifest(ctx context.Context, creds ProUpdateCredentials) (*proBrokerResponse, error) {
+func (m *Manager) fetchProDownloadManifest(ctx context.Context, creds ProUpdateCredentials, channel string) (*proBrokerResponse, error) {
baseURL, err := proBrokerBaseURL(creds.LicenseServerURL)
if err != nil {
return nil, err
@@ -239,6 +239,12 @@ func (m *Manager) fetchProDownloadManifest(ctx context.Context, creds ProUpdateC
}
query := target.Query()
query.Set("target", proUpdateTarget())
+ // rc-channel installs ask the dual-channel broker for the RC slot; the
+ // stable default is left implicit so the URL is unchanged for brokers
+ // that predate the channel parameter.
+ if channel == "rc" {
+ query.Set("channel", "rc")
+ }
target.RawQuery = query.Encode()
headers := map[string]string{
@@ -307,7 +313,7 @@ func (m *Manager) checkProUpdates(ctx context.Context, channel string, currentIn
}, nil
}
- manifest, err := m.fetchProDownloadManifest(ctx, creds)
+ manifest, err := m.fetchProDownloadManifest(ctx, creds, channel)
if err != nil {
return nil, err
}
@@ -376,7 +382,7 @@ func (m *Manager) resolveProUpdateArtifact(ctx context.Context, channel string)
return resolvedUpdateArtifact{}, errProUpdateNotActivated()
}
- manifest, err := m.fetchProDownloadManifest(ctx, creds)
+ manifest, err := m.fetchProDownloadManifest(ctx, creds, channel)
if err != nil {
return resolvedUpdateArtifact{}, err
}