Creating a Blue/Green deployment to test upgrade from R4 to R5 instance MariaBD

0

Hi,

I have a Maria DB (Instance class: db.r4.large, Engine version 10.4.32) that I need to update to a R5 engine. I want to use a Blue/Green deployment to achieve this but I am getting errors when I try to create one.

I am using the default option group (default:mariadb-10-4) but a custom parameter group called alphaanywhere (used for AlphaCloud if you are familiar). I have created a new customer parameter group for the R5 instance called AlphaAnywhereR5 which is the the same except using the mariadb10.11 parameter group family.

When attempting to create the deployment i set the green environment to Engine: MariaDB 10.11.7 and the ParameterGroup: AlphaAnyhereR5. I have enabled Optimized Writes and selected db.r5.large for the green database. I get the following Error:

RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.r4.large, Engine=mariadb, EngineVersion=10.11.7, LicenseModel=general-public-license.

It strikes me that this may be because its trying to create and R4 but I see no way around this.

I read in the guidance:

"For RDS for MySQL, if the source database is associated with a custom option group, you can't specify a major version upgrade when you create the blue/green deployment. In this case, you can create a blue/green deployment without specifying a major version upgrade. Then, you can upgrade the database in the green environment."

I though this might be the same for a custom parameter group so I have also attempted to create the deployment without the engine upgrade as follows:

Engine: MariaDB 10.4.32 (current) and the ParameterGroup: AlphaAnyhere (also current). Optimized Writes, in this case, cannot be enabled. This time I get the following error:

"The value of the lower_case_table_names parameter within the parameter group [default.mariadb10.4] for the green environment is different than the value of this parameter in the blue environment. You can't modify this parameter for a database after you initially set it. To resolve this issue, specify a parameter group for the green environment that has the same value for the lower_case_table_names parameter as the blue environment."

This doesn't make sense to me as I am not trying to use the default parameter group to great the green database. I have specify a parameter group for the green environment that is the same as the blue environment.

Any advise would be greatly appreciated.

Chris

4 Answers
0

Hello,

"For RDS for MySQL, if the source database is associated with a custom option group, you can't specify a major version upgrade when you create the blue/green deployment. In this case, you can create a blue/green deployment without specifying a major version upgrade. Then, you can upgrade the database in the green environment."

I though this might be the same for a custom parameter group

No that is not the case with parameter group, When you perform a major version upgrade you have to specify a new parameter group compatible with target major version or a default parameter group compatible with target major version will be used.

Engine: MariaDB 10.4.32 (current) and the ParameterGroup: AlphaAnyhere (also current). Optimized Writes, in this case, cannot be enabled. This time I get the following error:

"The value of the lower_case_table_names parameter within the parameter group [default.mariadb10.4] for the green environment is different than the value of this parameter in the blue environment. You can't modify this parameter for a database after you initially set it. To resolve this issue, specify a parameter group for the green environment that has the same value for the lower_case_table_names parameter as the blue environment."

It looks like the target parameter group was specified to be the default parameter group while creation of the deployment or a custom parameter group was not specified, which caused this parameter conflict.

You could consider testing below steps to perform this activity.

Solution 1 :

Modifying the instance class without blue green deployment and then upgrade the engine version using Blue/green deployment but it will cause downtime during instance class modification, To minimize this downtime you could consider making your instance Multi-AZ.

[Will a Multi-AZ deployment help reduce downtime during an Amazon RDS MySQL modification? [+]https://repost.aws/knowledge-center/rds-mysql-downtime-impact]

Solution 2 :

Step 1 :

Create a blue/green deployment with target instance instance class = db.r5.large and having the same engine version

aws rds create-blue-green-deployment
--blue-green-deployment-name my-blue-green-deployment
--source arn:aws:rds:us-east-1:1111111111:db:database_name
--target-engine-version 10.4.32
--target-db-parameter-group-name parameter_group
--target-db-instance-class db.m5.large

step 2 :

Upgrade the green instance to target engine version

step 3 :

Perform the switchover

[Creating a blue/green deployment [+]https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-creating.html#blue-green-deployments-creating-create]

AWS
SUPPORT ENGINEER
Vinay
answered 14 days ago
0

Hi, I really appreciate your response, thank you for that.

No that is not the case with parameter group, When you perform a major version upgrade you have to specify a new parameter group compatible with target major version or a default parameter group compatible with target major version will be used.

Yes, this is what I initially thought. I made a new parameter group specifically for the target major version, and a selected it for the green deployment, but this just gave me the 'DS does not support creating a DB instance with the following combination' error mentioned above.

Enter image description here

I can't have any downtime at all on this so I want to follow your Solution 2. I am using the 'Create Blue/Green Deployment' page access by going to my database and selecting actions>Create Blue/Green Deployment. I am not sure if this is the best way to do this as I do not seem to have the option to specify the target instance class.

I have selected the engine version as 10.4.32 (which is current) and selected the currently in use DB parameter group, but this is where I get the 'The value of the lower_case_table_names parameter within the parameter group [default.mariadb10.4] for the green environment is different than the value of this parameter in the blue environment' error mentioned in my original post.

Again this doesn't make sense to me as I am applying the exact same parameter group to the green deployment as it currently in use on the blue, and not changing the engine version. There aren't any other options so not sure why this isn't working.

Enter image description here

Thank you again in advance.

Chris

Chris
answered 14 days ago
0

Additional

RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.r4.large, Engine=mariadb, EngineVersion=10.11.7, LicenseModel=general-public-license.

The error above is probably because 10.11.7 is not supported by db.r4.large (see below). But I have Optimized Writes enabled and db.r5.large selected and from reading the guide this should be creating a r5 not an r4, which is supported. I don't know any other way to specify the target instance class.

Enter image description here

Enter image description here

Chris
answered 14 days ago
0

Hello,

If you are following Solution 2, I would recommend you to use the CLI to create the Blue/green deployment instead of console,

Solution 2 :

Step 1 :

Create a blue/green deployment with target instance instance class = db.r5.large and having the same engine version

aws rds create-blue-green-deployment \
--blue-green-deployment-name my-blue-green-deployment \
--source arn:aws:rds:us-east-1:1111111111:db:database_name \
--target-engine-version 10.4.32 \
--target-db-parameter-group-name parameter_group \
--target-db-instance-class db.m5.large

step 2 :

Upgrade the green instance to target engine version

step 3 :

Perform the switchover

[Creating a blue/green deployment [+]https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-creating.html#blue-green-deployments-creating-create]

AWS
SUPPORT ENGINEER
Vinay
answered 14 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