Skip to content

Conversation

Callisto13
Copy link
Contributor

@Callisto13 Callisto13 commented Jul 1, 2021

Description

Still technically the "wrong thing" to do, since eksctl already provides a way for users to not use AZs, but I don't believe this will get fixed upstream for a very very long time, and it is guaranteed to be forgotten/not read by at least some users.
🤷‍♀️

@Callisto13 Callisto13 marked this pull request as ready for review July 1, 2021 15:39
@Callisto13 Callisto13 requested a review from nikimanoledaki July 2, 2021 09:00
@Callisto13 Callisto13 enabled auto-merge (squash) July 2, 2021 09:03
@Callisto13 Callisto13 merged commit 8f63d95 into main Jul 2, 2021
@Callisto13 Callisto13 deleted the avoid-cn-north-1d branch July 2, 2021 09:52
@@ -93,7 +93,9 @@ type AvailabilityZoneSelector struct {
// NewSelectorWithDefaults create a new AvailabilityZoneSelector with the
// default selection strategy and usage rules
func NewSelectorWithDefaults(ec2api ec2iface.EC2API) *AvailabilityZoneSelector {
avoidZones := map[string]bool{}
avoidZones := map[string]bool{
"cn-north-1d": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that availability zone names are not fixed and are in fact randomized during account creation (see details here: https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html).
While all existing accounts will have the new zone with "d" letter simply because other zones were already taken when new zone was added, new accounts may not necessarily have the new zone with "d" letter, and may instead experience problem on zone "cn-north-1a" for example.
The correct approach would be to perform ec2:DescribeAvailabilityZones call, find out which zone has ID "cnn1-az4" (zone IDs are not random), and get the name of the zone with that ID.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@artem-nefedov you're right, thanks for the heads-up. We do not have access to Beijing so I can't verify if the offending zone ID is cnn1-az4. Can you confirm that you have verified this information?

Copy link
Contributor

@artem-nefedov artem-nefedov Jul 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cPu1 Yes, can confirm:

        {
            "State": "available",
            "OptInStatus": "opt-in-not-required",
            "Messages": [],
            "RegionName": "cn-north-1",
            "ZoneName": "cn-north-1d",
            "ZoneId": "cnn1-az4",
            "GroupName": "cn-north-1",
            "NetworkBorderGroup": "cn-north-1",
            "ZoneType": "availability-zone"
        }

Copy link
Contributor

@cPu1 cPu1 Jul 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @artem-nefedov!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclude cn-north-1d AZ when creating EKS cluster in China Beijing region
4 participants