MySql Blue/Green deployment 5.7.44 to 8.0.36 fails on DB subnet group doesn't meet Availability Zone coverage.

0

I am running an RDS Mysql Multi-AZ Master (MySql 5.7.44) with 4 read replicas. I am attempting to upgrade to 8.0.36 using the Blue-Green Deployment. I haven't had any problems upgrading my dev DBs. I have two private subnets and a SubNet Group setup with availability zones in: us-east-1b and us-east-1c.

The results of running the deployment.

ServerBlue AZGreen AZ
Masterus-east-1bus-east-1c
Slave1us-east-1cus-east-1c
Slave2us-east-1cus-east-1c
Slave3us-east-1bnot created
Slave4us-east-1bnot created

Deployment Connectivity & security tabs shows:
Blue group: AZ is us-east-1b, Subnet Group is correct, Subnets: it lists both subnet ids.
Green group: AZ is us-east-1c, Subnet Group is same as Blue, Subnets: are same as Blue.

When I run the deployment it gets as far as creating the green Master and 2 replicas in us-east-1c, It provisions and upgrades them and they all show as Available. Then it stops with status Invalid Configuration with the error:
Unable to provision blue/green deployment because the DB subnet group doesn't meet Availability Zone (AZ) coverage requirement. Current AZ coverage: us-east-1b. Add subnets to cover at least 2 AZs.

It seems to me that I have met the requirements for the Subnets.
Could it be because not all of the replicas are in us-east-b with the Master?

profile picture
asked 2 months ago142 views
1 Answer
0

Could it be because not all of the replicas are in us-east-b with the Master?

This table shows the Availability Zones for each instance in both the blue and green deployments. The Master instance and two slaves (Slave 1 and Slave 2) are set up in both deployments, while Slave 3 and Slave 4 are only present in the blue deployment and not yet created in the green deployment.

InstanceBlue DeploymentGreen Deployment
Masterus-east-1bus-east-1c
Slave 1us-east-1cus-east-1c
Slave 2us-east-1cus-east-1c
Slave 3us-east-1bNot Created
Slave 4us-east-1bNot Created

Yes, that could be a contributing factor to the error you're encountering. The error suggests that your DB subnet group is not adequately covering multiple Availability Zones (AZs). Based on the table, it seems that the green deployment might be lacking instances in multiple AZs, as both the green Master and green Slave 1 and Slave 2 are in the same AZ (us-east-1c), and there are no green instances in us-east-1b.

To resolve this issue, you should ensure that your DB subnet group for the green deployment includes subnets in at least two different AZs. You may need to create additional green replicas in us-east-1b or adjust your subnet group configuration to include subnets from both us-east-1b and us-east-1c. This will help you meet the AZ coverage requirement for a successful blue/green deployment.

To meet the AZ coverage requirement for both the blue and green deployments, you could adjust your setup like this:

InstanceBlue DeploymentGreen Deployment
Masterus-east-1bus-east-1c
Slave 1us-east-1cus-east-1b
Slave 2us-east-1cus-east-1b
Slave 3us-east-1bus-east-1c
Slave 4us-east-1bus-east-1c

In this adjusted setup:

  • Both the blue and green Masters are in different AZs, which is good.
  • For the slaves, we've ensured that both blue and green deployments have slaves in both AZs. For example, Slave 1 and Slave 2 in the green deployment are moved to us-east-1b, while Slave 3 and Slave 4 in the green deployment are created in us-east-1c.
profile picture
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 19 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions