temporalio/temporal · critical
Current cluster is not specified in cluster info
Error message
Current cluster is not specified in cluster info
What it means
NewMetadata requires that currentClusterName be a key in the clusterInfo map. If the current cluster is not listed among the configured clusters, the constructor panics because many operations (GetClusterID, replication decisions) look up clusterInfo[currentClusterName] and would otherwise fail later at runtime.
Source
Thrown at common/cluster/metadata.go:161
logger log.Logger,
) Metadata {
if len(clusterInfo) == 0 {
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,View on GitHub (pinned to bde624efd1)
Solutions
- Add an entry for the current cluster to clusterInfo with its InitialFailoverVersion and enabled flag
- Verify the currentClusterName string matches a clusterInfo key exactly (case-sensitive)
- Regenerate/align all cluster configs from a shared template so local and remote entries stay consistent
Example fix
// before
clusterInfo := map[string]cluster.ClusterInformation{"remote": {InitialFailoverVersion: 1, IsEnabled: true}}
md := cluster.NewMetadata(clusterInfo, "remote", "local", 1, nil, nil)
// after
clusterInfo["local"] = cluster.ClusterInformation{InitialFailoverVersion: 0, IsEnabled: true}
md := cluster.NewMetadata(clusterInfo, "remote", "local", 1, nil, nil) Defensive patterns
Strategy: validation
Validate before calling
if _, ok := clusterInfo[currentClusterName]; !ok {
return fmt.Errorf("current cluster %q missing from clusterInfo", currentClusterName)
} Prevention
- Always include the local cluster entry in every datacenter's clusterMetadata config
- Cross-check currentClusterName against clusterInfo keys at config load time
- Keep cluster name strings in shared constants, not inline literals
When it happens
Trigger: cluster.NewMetadata(clusterInfoWithoutSelf, masterClusterName, "myCluster", ...) where "myCluster" is absent from the clusterInfo map keys.
Common situations: Config listing only remote clusters in clusterMetadata but omitting the local cluster; renaming the current cluster in one config section but not the other.
Related errors
- Master 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/ca7357ec5e5cc7d8.
Report an issue: GitHub.