Skip to content
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

(aws_opensearchservice): i4i instances say they need EBS #32070

Open
1 task
kensentor opened this issue Nov 8, 2024 · 2 comments
Open
1 task

(aws_opensearchservice): i4i instances say they need EBS #32070

kensentor opened this issue Nov 8, 2024 · 2 comments
Assignees
Labels
@aws-cdk/aws-opensearch Related to the @aws-cdk/aws-opensearchservice package bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@kensentor
Copy link

kensentor commented Nov 8, 2024

Describe the bug

See #31764 and its fix, #31948

While the above PR added i4g to the list of AWS Opensearch instances that don't require EBS options, i4i should be in this list as well as they use attached SSD drives: https://aws.amazon.com/opensearch-service/pricing/

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

I should be able to create an Opensearch domain without using EBSOptions.

Current Behavior

An error is thrown when trying to use i4i instances.

  File "/home/runner/work/scaling-eureka/scaling-eureka/infra/management_stack/management_stack/opensearch.py", line 245, in initialize_opensearch
    domain = opensearch.Domain(
             ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/scaling-eureka/scaling-eureka/.venv/lib/python3.12/site-packages/jsii/_runtime.py", line 118, in __call__
    inst = super(JSIIMeta, cast(JSIIMeta, cls)).__call__(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/scaling-eureka/scaling-eureka/.venv/lib/python3.12/site-packages/aws_cdk/aws_opensearchservice/__init__.py", line 8505, in __init__
    jsii.create(self.__class__, self, [scope, id, props])
  File "/home/runner/work/scaling-eureka/scaling-eureka/.venv/lib/python3.12/site-packages/jsii/_kernel/__init__.py", line 334, in create
    response = self.provider.create(
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/scaling-eureka/scaling-eureka/.venv/lib/python3.12/site-packages/jsii/_kernel/providers/process.py", line 365, in create
    return self._process.send(request, CreateResponse)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/scaling-eureka/scaling-eureka/.venv/lib/python3.12/site-packages/jsii/_kernel/providers/process.py", line 342, in send
    raise RuntimeError(resp.error) from JavaScriptError(resp.stack)
RuntimeError: EBS volumes are required when using instance types other than R3, I3, R6GD, I4G, or IM4GN.

Reproduction Steps

from aws_cdk import (
    aws_opensearchservice as opensearch,
)

# VPC creation omitted

subnets = vpc.select_subnets(
        availability_zones=opensearch.ZoneAwarenessConfig(
          availability_zone_count=2, enabled=True
       ),
        one_per_az=True,
        subnet_type=ec2.SubnetType.PUBLIC,
    )

security_group = ec2.SecurityGroup(
        stack,
        sg_name,
        allow_all_outbound=True,
        allow_all_ipv6_outbound=True,
        description=f"foo.",
        security_group_name="Opensearch Security Group",
        vpc=vpc,
    )

capacity_config = opensearch.CapacityConfig(
        data_nodes=8,
        data_node_instance_type="i4i.2xlarge.search",
        master_node_instance_type="m5.large.search",
        master_nodes=3,
        multi_az_with_standby_enabled=False,
    )

os_version = opensearch.EngineVersion.open_search("2.15")

domain = opensearch.Domain(
        stack,
        "OS",
        capacity=capacity_config,
        ebs=opensearch.EbsOptions(enabled=False),
        enable_auto_software_update=True,
        encryption_at_rest=opensearch.EncryptionAtRestOptions(enabled=True),
        enforce_https=use_https,
        fine_grained_access_control=None,
        node_to_node_encryption=True,
        security_groups=[security_group],
        tls_security_policy=opensearch.TLSSecurityPolicy.TLS_1_2,
        version=os_version,
        vpc=vpc,
        vpc_subnets=[ec2.SubnetSelection(subnets=[subnet for subnet in subnets.subnets])],
        zone_awareness=True,
    )

Possible Solution

See #31948 . This PR essentially needs to be replicated but with i4i instances.

Additional Information/Context

No response

CDK CLI Version

2.166.0 (build 7bb9203)

Framework Version

No response

Node.js Version

20.11.1

OS

MacOS 14.6.1

Language

Python

Language Version

Python (3.12)

Other information

No response

@kensentor kensentor added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 8, 2024
@github-actions github-actions bot added the @aws-cdk/aws-opensearch Related to the @aws-cdk/aws-opensearchservice package label Nov 8, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-reproduction This issue needs reproduction. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 8, 2024
@khushail khushail self-assigned this Nov 8, 2024
@khushail khushail added the p2 label Nov 8, 2024
@khushail
Copy link
Contributor

khushail commented Nov 8, 2024

Hi @kensentor ,thanks for reporting this. I see i4i was missed from the PR. As per the AWS docs, it should also have been added there in the code.

Marking this as P2 and keeping open for community contribution as well.

Thanks

@khushail khushail added effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-reproduction This issue needs reproduction. labels Nov 8, 2024
@khushail khushail assigned khushail and unassigned khushail Nov 8, 2024
@khushail
Copy link
Contributor

Assigning myself as I will be working on the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-opensearch Related to the @aws-cdk/aws-opensearchservice package bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants