temporalio/temporal · critical
Master cluster is not specified in cluster info
Error message
Master cluster is not specified in cluster info
What it means
NewMetadata requires that masterClusterName also be a key in the clusterInfo map. The master (home) cluster must be present because cross-cluster failover and version computations reference its initial failover version. A missing master entry panics at construction time.
Source
Thrown at common/cluster/metadata.go:164
panic("Empty cluster information")
} else if len(masterClusterName) == 0 {
panic("Master cluster name is empty")
} else if len(currentClusterName) == 0 {
panic("Current cluster name is empty")
} else if failoverVersionIncrement == 0 || failoverVersionIncrement > math.MaxInt32 {
panic("Version increment <= 0 or > 2147483647")
}
versionToClusterName, err := updateVersionToClusterName(clusterInfo, failoverVersionIncrement)
if err != nil {
// nolint:forbidigo // matches the other startup-config panics in this constructor
panic(err.Error())
}
if _, ok := clusterInfo[currentClusterName]; !ok {
panic("Current cluster is not specified in cluster info")
}
if _, ok := clusterInfo[masterClusterName]; !ok {
panic("Master cluster is not specified in cluster info")
}
copyClusterInfo := make(map[string]ClusterInformation)
maps.Copy(copyClusterInfo, clusterInfo)
if refreshDuration == nil {
refreshDuration = dynamicconfig.GetDurationPropertyFn(refreshInterval)
}
return &metadataImpl{
status: common.DaemonStatusInitialized,
enableGlobalNamespace: enableGlobalNamespace,
failoverVersionIncrement: failoverVersionIncrement,
masterClusterName: masterClusterName,
currentClusterName: currentClusterName,
clusterInfo: copyClusterInfo,
versionToClusterName: versionToClusterName,
clusterChangeCallback: make(map[any]CallbackFn),
clusterMetadataStore: clusterMetadataStore,
logger: logger,View on GitHub (pinned to bde624efd1)
Solutions
- Add the master cluster to clusterInfo with the correct InitialFailoverVersion
- Ensure masterClusterName exactly matches one of the clusterInfo keys
- Keep the primary cluster's entry identical across all datacenters' configs
Example fix
// before
md := cluster.NewMetadata(map[string]cluster.ClusterInformation{}, "master", "current", 1, nil, nil)
// after
clusterInfo := map[string]cluster.ClusterInformation{"master": {InitialFailoverVersion: 0, IsEnabled: true}}
md := cluster.NewMetadata(clusterInfo, "master", "current", 1, nil, nil) Defensive patterns
Strategy: validation
Validate before calling
if _, ok := clusterInfo[masterClusterName]; !ok {
return fmt.Errorf("master cluster %q missing from clusterInfo", masterClusterName)
} Prevention
- Ensure remote datacenter configs include the primary (master) cluster entry
- Validate masterClusterName against clusterInfo keys before startup
- Version-control cluster configs together so master entries stay in sync
When it happens
Trigger: cluster.NewMetadata(clusterInfo, "masterCluster", currentClusterName, ...) where "masterCluster" is not a key in clusterInfo.
Common situations: Configuring a non-primary (remote) Temporal datacenter whose clusterMetadata omits the primary cluster entry; stale config after renaming the master cluster.
Related errors
- Current cluster is not specified in cluster info
- current cluster %q is missing from cluster metadata
- Current cluster name is empty
- Version increment <= 0 or > 2147483647
- <dynamic updateVersionToClusterName err>
AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01).
Data as JSON: /api/errors/9020403965bd3d81.
Report an issue: GitHub.