diff --git a/CHANGELOG.md b/CHANGELOG.md index 50e62d072..5f6d338a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ aws-parallelcluster-cookbook CHANGELOG This file is used to list changes made in each version of the AWS ParallelCluster cookbook. +3.12.0 +------ + +**CHANGES** + +**BUG FIXES** +- Fix an issue in the way we get region when manage volumes so that it can correctly handle local zone. + 3.11.1 ------ diff --git a/cookbooks/aws-parallelcluster-environment/files/default/ec2_udev_rules/manageVolume.py b/cookbooks/aws-parallelcluster-environment/files/default/ec2_udev_rules/manageVolume.py index 5db0b6096..5f7816b1c 100644 --- a/cookbooks/aws-parallelcluster-environment/files/default/ec2_udev_rules/manageVolume.py +++ b/cookbooks/aws-parallelcluster-environment/files/default/ec2_udev_rules/manageVolume.py @@ -214,8 +214,9 @@ def handle_volume(volume_id, attach, detach): instance_id = get_metadata_value(token, "http://169.254.169.254/latest/meta-data/instance-id") - region = get_metadata_value(token, "http://169.254.169.254/latest/meta-data/placement/availability-zone") - region = region[:-1] + identity_document = get_metadata_value(token, "http://169.254.169.254/latest/dynamic/instance-identity/document") + identity = json.loads(identity_document) + region = identity["region"] proxy_config = parse_proxy_config()