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

fix metrics-helper test to detach role policy early #2121

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

sushrk
Copy link
Contributor

@sushrk sushrk commented Oct 27, 2022

What type of PR is this?
bug

Which issue does this PR fix:
N/A

What does this PR do / Why do we need it:
We have seen cases where the AfterSuite timed out while updating the aws-node daemonset before detaching the policy from the role. This prevents the node role cleanup and requires user to manually detach the policy before deleting the node role and the node group.

Changes in the PR is to avoid this issue and detach the policy from the node role first before updating the aws-node daemonset.

If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
N/A

Testing done on this change:
Yes, ran metrics-helper test

AfterSuite] PASSED [86.575 seconds]
[AfterSuite] 
/Users/ravsushm/go/src/github.com/aws/amazon-vpc-cni-k8s/test/integration/metrics-helper/metrics_helper_suite_test.go:144

  Begin Captured GinkgoWriter Output >>
    STEP: detaching role policy from the node IAM Role 10/26/22 21:40:38.421
    STEP: removing the environment variables from the ds map[SOME_NON_EXISTENT_VAR:{}] 10/26/22 21:40:38.983
    STEP: getting the aws-node daemon set in namespace kube-system 10/26/22 21:40:38.984
    STEP: updating the daemon set with new environment variable 10/26/22 21:40:39.248
    STEP: uninstalling cni-metrics-helper using helm 10/26/22 21:41:55.489
    STEP: deleting test namespace 10/26/22 21:41:58.77
  << End Captured GinkgoWriter Output
------------------------------

Automation added to e2e:
N/A

Will this PR introduce any new dependencies?:
N/A

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
No.

Does this change require updates to the CNI daemonset config files to work?:
No.

Does this PR introduce any user-facing change?:
No.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sushrk sushrk requested a review from a team as a code owner October 27, 2022 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants