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

resource/aws_emr_cluster: Fix aws_emr_security_configuration destroy issues #12578

Merged
merged 2 commits into from
Dec 16, 2021

Conversation

andrei-ilyin-mh
Copy link

@andrei-ilyin-mh andrei-ilyin-mh commented Mar 30, 2020

This will fix #6279

Rewrite resourceAwsEMRClusterDelete to use cluster state returned by DescribeCluster instead of counting running cluster instances to check is cluster terminated. Previous approach might cause too early deletion of cluster's security group which might block deletion of ENI created for this cluster. In this case orphaned ENI is blocking deletion of security configuration as well as linked security group.

These changes was tested on our environments and has fixed painful security configuration deletion issues.

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #6279.
Closes #3465.

Release note for CHANGELOG:

* resource/aws_emr_cluster: Fix aws_emr_security_configuration destroy issues

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEMRCluster_security_config'

--- PASS: TestAccAWSEMRCluster_security_config (475.02s)

@andrei-ilyin-mh andrei-ilyin-mh requested a review from a team March 30, 2020 09:14
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/emr Issues and PRs that pertain to the emr service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 30, 2020
@xmj
Copy link

xmj commented Oct 28, 2020

Is there anything else that needs to be done for this to be merged?

@annyip
Copy link

annyip commented Nov 16, 2020

any updates? Would love to see this get merged in

Base automatically changed from master to main January 23, 2021 00:57
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:57
@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 22, 2021
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@breathingdust
Copy link
Member

Hi all 👋 Just letting you know that this is issue is featured on this quarters roadmap. If a PR exists to close the issue a maintainer will review and either make changes directly, or work with the original author to get the contribution merged. If you have written a PR to resolve the issue please ensure the "Allow edits from maintainers" box is checked. Thanks for your patience and we are looking forward to getting this merged soon!

@breathingdust breathingdust added this to the Roadmap milestone Nov 10, 2021
@ewbankkit ewbankkit added the pre-service-packages Includes pre-Service Packages aspects. label Dec 14, 2021
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed pre-service-packages Includes pre-Service Packages aspects. size/M Managed by automation to categorize the size of a PR. labels Dec 16, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

--- PASS: TestAccEMRCluster_basic (498.93s)
--- PASS: TestAccEMRCluster_Kerberos_clusterDedicatedKdc (508.54s)
--- PASS: TestAccEMRCluster_ebs (544.68s)
--- PASS: TestAccEMRCluster_keepJob (550.65s)
--- PASS: TestAccEMRCluster_StepConcurrency_level (551.00s)
--- PASS: TestAccEMRCluster_InstanceFleetMaster_only (563.63s)
--- PASS: TestAccEMRCluster_security (585.81s)
--- PASS: TestAccEMRCluster_CustomAMI_id (769.74s)
--- PASS: TestAccEMRCluster_terminationProtected (675.60s)
--- PASS: TestAccEMRCluster_tags (893.02s)
--- PASS: TestAccEMRCluster_RootVolume_size (919.63s)
--- PASS: TestAccEMRCluster_MasterInstanceGroup_instanceType (970.80s)
--- PASS: TestAccEMRCluster_MasterInstanceGroup_name (980.30s)
--- PASS: TestAccEMRCluster_Step_basic (983.61s)
--- PASS: TestAccEMRCluster_EC2Attributes_defaultManagedSecurityGroups (997.66s)
--- PASS: TestAccEMRCluster_Step_multiple (536.07s)
--- PASS: TestAccEMRCluster_disappears (486.32s)
--- PASS: TestAccEMRCluster_CoreInstanceGroup_name (1060.80s)
--- PASS: TestAccEMRCluster_InstanceFleet_basic (1113.99s)
--- PASS: TestAccEMRCluster_s3Logging (613.65s)
--- PASS: TestAccEMRCluster_sJSON (400.21s)
--- PASS: TestAccEMRCluster_CoreInstanceGroup_autoScalingPolicy (648.83s)
--- PASS: TestAccEMRCluster_MasterInstanceGroup_instanceCount (1217.81s)
--- PASS: TestAccEMRCluster_additionalInfo (372.52s)
--- PASS: TestAccEMRCluster_Step_mode (958.18s)
--- PASS: TestAccEMRCluster_CoreInstanceGroup_instanceType (972.02s)
--- PASS: TestAccEMRCluster_MasterInstanceGroup_bidPrice (1570.08s)
--- PASS: TestAccEMRCluster_Bootstrap_ordering (1607.18s)
--- PASS: TestAccEMRCluster_CoreInstanceGroup_instanceCount (1040.68s)
--- PASS: TestAccEMRCluster_autoTerminationPolicy (703.99s)
--- PASS: TestAccEMRCluster_CoreInstanceGroup_bidPrice (1340.46s)

@ewbankkit
Copy link
Contributor

@andrei-ilyin-mh Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit fb61252 into hashicorp:main Dec 16, 2021
@github-actions github-actions bot modified the milestones: Roadmap, v3.70.0 Dec 16, 2021
@github-actions
Copy link

This functionality has been released in v3.70.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 1, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/emr Issues and PRs that pertain to the emr service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_emr_cluster and aws_emr_security_configuration destroy issues Issue destroying EMR on AWS
6 participants