Skip to content

[BUG] Getting EC2 instance info fails #200

@cartalla

Description

@cartalla

Describe the bug

Multiple pricing lists returned when only 1 expected.

NFO:2024-02-05 17:18:00,237: Getting EC2 instance info for us-east-1 (US East (N. Virginia))
WARNING:2024-02-05 17:20:02,175: No pricelist for mac1.metal us-east-1 (US East (N. Virginia)). Instance type may not be available in this region.
WARNING:2024-02-05 17:20:02,197: No pricelist for mac2-m2.metal us-east-1 (US East (N. Virginia)). Instance type may not be available in this region.
WARNING:2024-02-05 17:20:02,224: No pricelist for mac2-m2pro.metal us-east-1 (US East (N. Virginia)). Instance type may not be available in this region.
WARNING:2024-02-05 17:20:02,253: No pricelist for mac2.metal us-east-1 (US East (N. Virginia)). Instance type may not be available in this region.
Traceback (most recent call last):
  File "app.py", line 32, in <module>
    termination_protection = True,
  File "/workplace/cartalla/github/aws-eda-slurm-cluster/source/.venv/lib64/python3.7/site-packages/jsii/_runtime.py", line 118, in __call__
    inst = super(JSIIMeta, cast(JSIIMeta, cls)).__call__(*args, **kwargs)
  File "/workplace/cartalla/github/aws-eda-slurm-cluster/source/cdk/cdk_slurm_stack.py", line 127, in __init__
    self.check_regions_config()
  File "/workplace/cartalla/github/aws-eda-slurm-cluster/source/cdk/cdk_slurm_stack.py", line 920, in check_regions_config
    self.eC2InstanceTypeInfo = EC2InstanceTypeInfo(self.compute_regions, get_savings_plans=False, json_filename='/tmp/instance_type_info.json', debug=False)
  File "/workplace/cartalla/github/aws-eda-slurm-cluster/source/EC2InstanceTypeInfoPkg/EC2InstanceTypeInfo.py", line 93, in __init__
    self.get_instance_type_and_family_info(region)
  File "/workplace/cartalla/github/aws-eda-slurm-cluster/source/EC2InstanceTypeInfoPkg/EC2InstanceTypeInfo.py", line 195, in get_instance_type_and_family_info
    raise RuntimeError("Number of PriceLists > 1 for {}".format(instanceType))
RuntimeError: Number of PriceLists > 1 for p4d.24xlarge

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions