-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Changing timezone or engineVersion on a DatabaseInstance results in an Internal Failure #6439
Comments
@jls-tschanzc Same thing happens if you try to update
Stack VectorRdsStack
Resources
[~] AWS::RDS::DBInstance VectorRds VectorRds92A77672
└─ [+] MultiAZ
└─ true
$ cdk deploy '*' --require-approval 'never'
VectorRdsStack: deploying...
VectorRdsStack: creating CloudFormation changeset...
0/4 | 5:06:28 AM | UPDATE_IN_PROGRESS | AWS::RDS::DBInstance | VectorRds (VectorRds92A77672)
0/4 | 5:06:28 AM | UPDATE_IN_PROGRESS | AWS::CDK::Metadata | CDKMetadata
1/4 | 5:06:29 AM | UPDATE_FAILED | AWS::RDS::DBInstance | VectorRds (VectorRds92A77672) Internal Failure
new DatabaseInstance (/builds/ngtoc-devops/rds/dm-vector-rds/node_modules/@aws-cdk/aws-rds/lib/instance.ts:795:22)
\_ new VectorRdsStack (/builds/ngtoc-devops/rds/dm-vector-rds/lib/vector-rds-stack.ts:37:24)
\_ Object.<anonymous> (/builds/ngtoc-devops/rds/dm-vector-rds/bin/vector-rds.ts:11:21)
\_ Module._compile (internal/modules/cjs/loader.js:1151:30)
\_ Module.m._compile (/builds/ngtoc-devops/rds/dm-vector-rds/node_modules/ts-node/src/index.ts:814:23)
\_ Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
\_ Object.require.extensions.<computed> [as .ts] (/builds/ngtoc-devops/rds/dm-vector-rds/node_modules/ts-node/src/index.ts:817:12) Instance size change: Stack DMVectorRdsStack
Resources
[~] AWS::RDS::DBInstance VectorRds VectorRds92A77672
└─ [~] DBInstanceClass
├─ [-] db.t3.small
└─ [+] db.t3.medium
$ cdk deploy '*' --require-approval 'never'
DMVectorRdsSgStack
DMVectorRdsSgStack: deploying...
✅ DMVectorRdsSgStack (no changes)
Outputs:
DMVectorRdsSgStack.dmvectorrdssg = sg-048238afe160cd7a7
Stack ARN:
arn:aws:cloudformation:us-west-2:746822052750:stack/DMVectorRdsSgStack/9dcf41b0-5b6d-11ea-b5ac-022a2754311a
DMVectorRdsStack
DMVectorRdsStack: deploying...
DMVectorRdsStack: creating CloudFormation changeset...
0/2 | 4:42:26 AM | UPDATE_IN_PROGRESS | AWS::RDS::DBInstance | VectorRds (VectorRds92A77672)
1/2 | 4:42:26 AM | UPDATE_FAILED | AWS::RDS::DBInstance | VectorRds (VectorRds92A77672) Internal Failure
new DatabaseInstance (/builds/ngtoc-devops/rds/dm-vector-rds/node_modules/@aws-cdk/aws-rds/lib/instance.ts:795:22)
\_ new VectorRdsStack (/builds/ngtoc-devops/rds/dm-vector-rds/lib/vector-rds-stack.ts:25:24)
\_ Object.<anonymous> (/builds/ngtoc-devops/rds/dm-vector-rds/bin/vector-rds.ts:13:24)
\_ Module._compile (internal/modules/cjs/loader.js:1151:30)
\_ Module.m._compile (/builds/ngtoc-devops/rds/dm-vector-rds/node_modules/ts-node/src/index.ts:814:23)
\_ Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
\_ Object.require.extensions.<computed> [as .ts] (/builds/ngtoc-devops/rds/dm-vector-rds/node_modules/ts-node/src/index.ts:817:12) |
Case ID 6844571841 with AWS support.... still waiting for response. edit: Got response and they're investigating on their end. |
As far as I can tell, the CloudFormation template generated by the CDK is consistent with what CloudFormation and RDS expect it to be. The problem is coming from the underlying call that CloudFormation makes to RDS. On investigating the timezone error, per the documentation, the timezone property is supported only by the Microsoft Sql Server. I believe this is what's causing the error there. The error shows correctly when deploying a new database instance but an The |
Looked into I was able to both, deploy a new database instance with My CDK app - #!/usr/bin/env node
import { App, Duration, Stack, CfnOutput } from '@aws-cdk/core';
import { DatabaseInstance, DatabaseInstanceEngine } from '@aws-cdk/aws-rds';
import { InstanceClass, InstanceSize, InstanceType, Vpc } from '@aws-cdk/aws-ec2';
const app = new App();
const stack = new Stack(app, 'mystack-2', {
env: { account: '664773442901' }
});
const vpc = new Vpc(stack, 'db-vpc');
const appDB = new DatabaseInstance(stack, 'TestPostgresInstance', {
engine: DatabaseInstanceEngine.POSTGRES,
instanceClass: InstanceType.of(InstanceClass.BURSTABLE3, InstanceSize.MICRO),
masterUsername: 'master',
databaseName: 'dbname',
vpc,
allocatedStorage: 10,
backupRetention: Duration.days(3),
engineVersion: '11.5',
multiAz: true
}); |
Per documentation[1], 'Timezone' property is only supported on Microsoft SQL Server. Setting this property on a DatabaseInstance with a different database engine causes deployment to fail (1) with a validation error for a new instance of `AWS::RDS::DBInstance` and (2) internal failure when modifying an existing instance of `AWS::RDS::DBInstance`. [1]:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-timezone fixes #6439
Per documentation[1], 'Timezone' property is only supported on Microsoft SQL Server. Setting this property on a DatabaseInstance with a different database engine causes deployment to fail (1) with a validation error for a new instance of `AWS::RDS::DBInstance` and (2) internal failure when modifying an existing instance of `AWS::RDS::DBInstance`. [1]:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-timezone fixes #6439
Initial deployment is fine, but introducing changes to the existing stack
like instance size, type, multiAZ, etc is where we are seeing Internal
Failure message.
…On Mon, Mar 2, 2020 at 4:32 AM Niranjan Jayakar ***@***.***> wrote:
Looked into multiAZ - I was not able to replicate this error.
I was able to both, deploy a new database instance with multiAZ set to
true, as well as, start off with one with this property undefined and
update the stack after setting the multiAZ property.
My CDK app -
#!/usr/bin/env nodeimport { App, Duration, Stack, CfnOutput } from ***@***.***/core';import { DatabaseInstance, DatabaseInstanceEngine } from ***@***.***/aws-rds';import { InstanceClass, InstanceSize, InstanceType, Vpc } from ***@***.***/aws-ec2';
const app = new App();const stack = new Stack(app, 'mystack-2', {
env: { account: '664773442901' }
});
const vpc = new Vpc(stack, 'db-vpc');
const appDB = new DatabaseInstance(stack, 'TestPostgresInstance', {
engine: DatabaseInstanceEngine.POSTGRES,
instanceClass: InstanceType.of(InstanceClass.BURSTABLE3, InstanceSize.MICRO),
masterUsername: 'master',
databaseName: 'dbname',
vpc,
allocatedStorage: 10,
backupRetention: Duration.days(3),
engineVersion: '11.5',
multiAz: true
});
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6439?email_source=notifications&email_token=AAAHWN5YVIDKX5Y7PXCHRHTRFOKMXA5CNFSM4K3J4QZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENO7AAY#issuecomment-593358851>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAHWN774A4QTBRI34KWMKTRFOKMXANCNFSM4K3J4QZQ>
.
|
This further confirms that this is not an issue with the CDK. As far as the CDK is concerned, we generate the CF template based on the app configured. It is CloudFormation that then compares the currently deployed stack with the new template being applied, and follows up by performing create, delete or modify operations to match the stack with the template being deployed. In the case of timezone, it should have been an error message that the timezone property is not supported on the Postgres database engine, but instead it was an Internal Failure. |
@nija-at That is correct. I don't know if you can see the correspondence between me and AWS support team, but they suggested that there is no ModifyDBInstance API call against RDS coming from the Cloudformation when they did a deep dive on my existing stack. This is definitely something on CF side as I've confirmed that with @MrArnoldPalmer on Gitter over the weekend. Also, AWS support tested this using v1.18.0. Not sure if there has been regression in the meantime. I'm piggy-backing on this issue, but I should probably create a new one since #6534 is targeted for Microsoft SQL Server. Response from AWS Support:
|
#6534) * fix(rds): setting timezone on DatabaseInstance causes internal failure Per documentation[1], 'Timezone' property is only supported on Microsoft SQL Server. Setting this property on a DatabaseInstance with a different database engine causes deployment to fail (1) with a validation error for a new instance of `AWS::RDS::DBInstance` and (2) internal failure when modifying an existing instance of `AWS::RDS::DBInstance`. [1]:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-timezone fixes #6439 * PR feedback
@robertd @nija-at From your posts I assume CF has a bug (or changes it does not support) when changing existing RDS instances. The issue with changing the I can open a related issue for CF in relation to this if requested, just tell me where the best place to create that issue would be. |
@jls-tschanzc Which region are you running this in? We're in edit: I assume based on your timezone parameter that you're in |
@robertd |
Ah, sorry this issue got closed @jls-tschanzc . Re-opening to look at the |
Let's continue tracking this here, since this seems to be affecting multiple properties - #6542 |
#6534) * fix(rds): setting timezone on DatabaseInstance causes internal failure Per documentation[1], 'Timezone' property is only supported on Microsoft SQL Server. Setting this property on a DatabaseInstance with a different database engine causes deployment to fail (1) with a validation error for a new instance of `AWS::RDS::DBInstance` and (2) internal failure when modifying an existing instance of `AWS::RDS::DBInstance`. [1]:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-timezone fixes #6439 * PR feedback
When creating a Postgres RDS database as follows:
and then would like to add the
timezone
andengineVersion
at a later time like so:It will always result in an
Internal Failure
and rollback the stack change.I tried to determine the possible values for the
engineVersion
using:The chosen
engineVersion
mirrors the currently deployed one, the TZ is different from what I could gather.Reproduction Steps
Create a Database Instance as follows:
Deploy the stack; Afterwards change the code to the following:
Try to deploy the change.
Error Log
Stack Event Log:
Environment
Other
The documentation regarding the possible values for
engineVersion
could be extended to at least document the necessary commands to determine allowed values. The same goes for the timezone documentation.This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: