{"record":{"id":"309a515ae30572c1","repo":"neondatabase/neon","slug":"az-not-found-on-any-node-known-azs-are","errorCode":null,"errorMessage":"AZ {} not found on any node: known AZs are: {:?}","messagePattern":"AZ (.+?) not found on any node: known AZs are: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"control_plane/storcon_cli/src/main.rs","lineNumber":905,"sourceCode":"                )\n                .await?;\n\n            // Learn about nodes to validate the AZ ID\n            let nodes = storcon_client\n                .dispatch::<(), Vec<NodeDescribeResponse>>(\n                    Method::GET,\n                    \"control/v1/node\".to_string(),\n                    None,\n                )\n                .await?;\n\n            if let Some(preferred_az) = &preferred_az {\n                let azs = nodes\n                    .into_iter()\n                    .map(|n| (n.availability_zone_id))\n                    .collect::<HashSet<_>>();\n                if !azs.contains(preferred_az) {\n                    anyhow::bail!(\n                        \"AZ {} not found on any node: known AZs are: {:?}\",\n                        preferred_az,\n                        azs\n                    );\n                }\n            } else {\n                // Make it obvious to the user that since they've omitted an AZ, we're clearing it\n                eprintln!(\"Clearing preferred AZ for tenant {tenant_id}\");\n            }\n\n            // Construct a request that modifies all the tenant's shards\n            let req = ShardsPreferredAzsRequest {\n                preferred_az_ids: describe_response\n                    .shards\n                    .into_iter()\n                    .map(|s| {\n                        (\n                            s.tenant_shard_id,","sourceCodeStart":887,"sourceCodeEnd":923,"githubUrl":"https://github.com/neondatabase/neon/blob/8f60b04da47ffefe0e52bda2440134b42874eb75/control_plane/storcon_cli/src/main.rs#L887-L923","documentation":"While setting tenant preferred AZs, storcon_cli fetched the node list (GET control/v1/node), collected the set of availability_zone_id values, and the user-supplied preferred AZ is not in that set. The command aborts before sending the ShardsPreferredAzsRequest, so no state changes. The error prints the known AZs to make correction easy.","triggerScenarios":"Running the tenant-preferred-AZ command with an AZ string that does not exactly match any node's availability_zone_id: wrong casing, a zone name from a different deployment/region, or a typo. The HashSet membership check fails and the command bails.","commonSituations":"Copying AZ names from another environment or cloud account; nodes not yet configured with their AZ ids; trailing whitespace or case mismatch between the requested AZ and node metadata; assuming the flag accepts arbitrary AZ names that will be created later.","solutions":["Re-run with one of the AZ ids listed in the error message itself (known AZs are printed)","List nodes (storcon_cli node list / GET control/v1/node) and copy the exact availability_zone_id string","If nodes lack the AZ you want, first configure the nodes' availability_zone_id, then retry the tenant command","Pass an empty AZ to deliberately clear the preference instead of guessing a placeholder name"],"exampleFix":"# before\nstorcon_cli tenant set-preferred-az --tenant-id <id> --az us-east-1a \n# after\nstorcon_cli tenant set-preferred-az --tenant-id <id> --az us-east-1a","handlingStrategy":"validation","validationCode":"// Fetch known AZs and validate the requested one before calling the CLI/API\nlet nodes: Vec<NodeDescribeResponse> = client\n    .dispatch(Method::GET, \"control/v1/node\".to_string(), None).await?;\nlet known_azs: HashSet<&str> = nodes.iter().map(|n| n.availability_zone_id.as_str()).collect();\nif let Some(az) = &preferred_az {\n    anyhow::ensure!(known_azs.contains(az.as_str()),\n        \"AZ '{az}' unknown; known AZs: {known_azs:?}\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive AZ choices from node metadata at runtime instead of hardcoded strings","Trim and case-normalize AZ inputs before comparing","When clearing a preference, pass an explicitly empty value rather than a sentinel AZ name"],"tags":["storcon","availability-zone","validation","cli"],"backgroundTag":"invalid-availability-zone","analyzedSha":"8f60b04da47ffefe0e52bda2440134b42874eb75","analyzedAt":"2026-08-16T23:39:28.135Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}