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

boskos: AWS janitor not cleaning up all of the resources #11471

Closed
akutz opened this issue Feb 23, 2019 · 4 comments
Closed

boskos: AWS janitor not cleaning up all of the resources #11471

akutz opened this issue Feb 23, 2019 · 4 comments
Labels
area/boskos Issues or PRs related to code in /boskos kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@akutz
Copy link
Member

akutz commented Feb 23, 2019

/area boskos

What happened:
aws-janitor seems to omit several resources that should be cleaned up.

What you expected to happen:
All of the AWS resources related to the Cluster API Provider for AWS (CAPA) to be cleaned up.

I0222 19:18:19.705981    9867 main.go:64] Regions: [eu-north-1 ap-south-1 eu-west-3 eu-west-2 eu-west-1 ap-northeast-2 ap-northeast-1 sa-east-1 ca-central-1 ap-southeast-1 ap-southeast-2 eu-central-1 us-east-1 us-east-2 us-west-1 us-west-2]
I0222 19:19:42.795105    9867 iam_roles.go:51] Unknown role name="control-plane.cluster-api-provider-aws.sigs.k8s.io", path="/"; assuming not managed
I0222 19:19:42.796148    9867 iam_instance_profiles.go:54] ignoring unmanaged profile arn:aws:iam::391560157427:instance-profile/control-plane.cluster-api-provider-aws.sigs.k8s.io
I0222 19:19:42.796185    9867 iam_roles.go:51] Unknown role name="controllers.cluster-api-provider-aws.sigs.k8s.io", path="/"; assuming not managed
I0222 19:19:42.796197    9867 iam_instance_profiles.go:54] ignoring unmanaged profile arn:aws:iam::391560157427:instance-profile/controllers.cluster-api-provider-aws.sigs.k8s.io
I0222 19:19:42.861047    9867 iam_roles.go:51] Unknown role name="control-plane.cluster-api-provider-aws.sigs.k8s.io", path="/"; assuming not managed
I0222 19:19:42.861083    9867 iam_roles.go:51] Unknown role name="controllers.cluster-api-provider-aws.sigs.k8s.io", path="/"; assuming not managed
I0222 19:19:42.861094    9867 iam_roles.go:51] Unknown role name="control_account", path="/"; assuming not managed
I0222 19:19:42.861106    9867 iam_roles.go:51] Unknown role name="RedLockReadOnly", path="/"; assuming not managed
I0222 19:19:42.861115    9867 iam_roles.go:51] Unknown role name="vmw-cloudhealth-role", path="/"; assuming not managed
I0222 19:19:42.861124    9867 iam_roles.go:51] Unknown role name="VMWMasterReadOnlyRole", path="/"; assuming not managed
I0222 19:19:42.861133    9867 iam_roles.go:51] Unknown role name="VMWMasterRole", path="/"; assuming not managed
I0222 19:19:42.861142    9867 iam_roles.go:51] Unknown role name="vmws-config-role", path="/"; assuming not managed

The resources with cluster-api-provider-aws.sigs.k8s.io in the name in the above output from was-janitor are related to CAPA and should be removed.

Type Name
IAM role control-plane.cluster-api-provider-aws.sigs.k8s.io
IAM instance profile arn:aws:iam::391560157427:instance-profile/control-plane.cluster-api-provider-aws.sigs.k8s.io
IAM role controllers.cluster-api-provider-aws.sigs.k8s.io
IAM instance profile arn:aws:iam::391560157427:instance-profile/controllers.cluster-api-provider-aws.sigs.k8s.io

How to reproduce it (as minimally and precisely as possible):
Deploy a cluster with CAPA and then run the janitor. The janitor logs indicate several CAPA-related resources as unmanaged and subsequently these resources are not cleaned up.

The PR branch kubernetes-sigs/cluster-api-provider-aws#606 may be used to execute make e2e at the root of the CAPA project to deploy a cluster and run the janitor.

Please provide links to example occurrences, if any:

Anything else we need to know?:
I am not sure if this issue should be created in the CAPA repo or here, but since the code for the janitor lives here, I created the issue here.

Because #1142 is not merged, the aws-janitor binary was compiled manually from the PR branch.

/cc @detiber @vincepri

@akutz akutz added the kind/bug Categorizes issue or PR as related to a bug. label Feb 23, 2019
@k8s-ci-robot k8s-ci-robot added the area/boskos Issues or PRs related to code in /boskos label Feb 23, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 24, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 23, 2019
@detiber
Copy link
Member

detiber commented Jun 25, 2019

I believe this has already been resolved
/close

@k8s-ci-robot
Copy link
Contributor

@detiber: Closing this issue.

In response to this:

I believe this has already been resolved
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/boskos Issues or PRs related to code in /boskos kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants