Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the AZ name to AZ ID mapping in tests. #2766

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

orsenthil
Copy link
Member

Fix the AZ name to AZ ID mapping in tests.

  • Don't rely on node index, which is an independent entity.

There is a mistake in the code, which node index to get the AZ name to AZ ID mapping. This works only by accident.

If we have 3+ nodes in a cluster in us-west-1 region, this will fail as the us-west-1 has only two default AZs.

$ aws ec2 describe-availability-zones --region us-west-1
{
    "AvailabilityZones": [
        {
            "State": "available",
            "OptInStatus": "opt-in-not-required",
            "Messages": [],
            "RegionName": "us-west-1",
            "ZoneName": "us-west-1a",
            "ZoneId": "usw1-az1",
            "GroupName": "us-west-1",
            "NetworkBorderGroup": "us-west-1",
            "ZoneType": "availability-zone"
        },
        {
            "State": "available",
            "OptInStatus": "opt-in-not-required",
            "Messages": [],
            "RegionName": "us-west-1",
            "ZoneName": "us-west-1c",
            "ZoneId": "usw1-az3",
            "GroupName": "us-west-1",
            "NetworkBorderGroup": "us-west-1",
            "ZoneType": "availability-zone"
        }
    ]
}

This failure was observed in internal tests, and PR fixes this.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Don't rely on node index, which is an independent entity.
@orsenthil orsenthil requested a review from a team as a code owner January 26, 2024 01:30
@orsenthil orsenthil merged commit aed881c into aws:master Jan 26, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants