Skip to content

Commit be21625

Browse files
authored
fix(opensearch): opensearchservice: existing integ test is failing (#34680)
### Issue # (if applicable) Closes #34678 ### Reason for this change opensearchservice now has [enableOpensearchMultiAzWithStandby](https://github.com/aws/aws-cdk/blob/ef0272442d415ff7c6d5943b15b5833e0ae2e1bd/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md?plain=1#L59) FF enabled by default, which means zoneAwareness has to be enabled across 3 AZs. This integ test is now failing without this PR and is blocking #34660 We need first fix this integ test before #34660 can continue. ### Description of changes - enable `zoneAwareness` - set correct `AvailabilityZoneCount` and other required props ### Describe any new or updated permissions being added ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 96b494d commit be21625

File tree

8 files changed

+72
-165
lines changed

8 files changed

+72
-165
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.js.snapshot/cdk-integ-opensearch-gp3.assets.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.js.snapshot/cdk-integ-opensearch-gp3.template.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
"Type": "AWS::OpenSearchService::Domain",
55
"Properties": {
66
"ClusterConfig": {
7-
"DedicatedMasterEnabled": false,
8-
"InstanceCount": 1,
9-
"InstanceType": "r5.large.search",
7+
"DedicatedMasterCount": 3,
8+
"DedicatedMasterEnabled": true,
9+
"DedicatedMasterType": "m7g.large.search",
10+
"InstanceCount": 3,
11+
"InstanceType": "m7g.medium.search",
1012
"MultiAZWithStandbyEnabled": true,
11-
"ZoneAwarenessEnabled": false
13+
"ZoneAwarenessConfig": {
14+
"AvailabilityZoneCount": 3
15+
},
16+
"ZoneAwarenessEnabled": true
1217
},
1318
"DomainEndpointOptions": {
1419
"EnforceHTTPS": false,

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.js.snapshot/cdk.out

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.js.snapshot/integ.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.js.snapshot/manifest.json

Lines changed: 36 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.js.snapshot/tree.json

Lines changed: 1 addition & 150 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.gp3.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
22
import { Construct } from 'constructs';
33
import * as opensearch from 'aws-cdk-lib/aws-opensearchservice';
4-
import { EbsDeviceVolumeType } from 'aws-cdk-lib/aws-ec2';
4+
import { EbsDeviceVolumeType, SubnetType } from 'aws-cdk-lib/aws-ec2';
55
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
66

77
class TestStack extends Stack {
@@ -19,6 +19,21 @@ class TestStack extends Stack {
1919
throughput: 125,
2020
iops: 3000,
2121
},
22+
zoneAwareness: {
23+
enabled: true,
24+
availabilityZoneCount: 3,
25+
},
26+
vpcSubnets: [
27+
{ subnetType: SubnetType.PRIVATE_WITH_EGRESS },
28+
],
29+
capacity: {
30+
dataNodeInstanceType: 'm7g.medium.search',
31+
dataNodes: 3,
32+
// Add dedicated master node - required for multi-AZ with standby
33+
// m7g.large.search has 8GB RAM (minimum for 30 nodes/15K shards)
34+
masterNodeInstanceType: 'm7g.large.search',
35+
masterNodes: 3,
36+
},
2237
};
2338

2439
new opensearch.Domain(this, 'Domain', domainProps);

0 commit comments

Comments
 (0)