litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.39k stars 688 forks source link

Rename env to EC2_INSTANCE_TAG #4815

Closed jongwooo closed 1 month ago

jongwooo commented 1 month ago

Proposed changes

Related issue https://github.com/litmuschaos/litmus/issues/4807#issuecomment-2271358440

This PR fixes an issue where the ec2-stop-by-tag experiment fails to target the intended EC2 instance.

The ec2-stop-by-tag experiment encounters a TARGET_SELECTION_ERROR due to an incorrect retrieval of the EC2_INSTANCE_TAG environment variable.

Fault Summary:
TARGET_SELECTION_ERROR
{"errorCode":"TARGET_SELECTION_ERROR","phase":"PreChaos","reason":"failed to get the instance tag, invalid instance tag","target":"{EC2 Instance Tag: , Region: ap-northeast-2}"}

By correctly renaming the environment variable from INSTANCE_TAG to EC2_INSTANCE_TAG, we can accurately target the intended EC2 instance.

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Special notes for your reviewer:

cc. @namkyu1999