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

Delete storage policy ids when cluser is deleted #5075

Merged
merged 2 commits into from Jul 20, 2021

Conversation

gnufied
Copy link
Member

@gnufied gnufied commented Jul 13, 2021

@jcpowermac
Copy link
Contributor

/test e2e-vsphere

cc: @rvanderp3

matchingProfileIds = append(matchingProfileIds, profileID)
}
}
_, err = pbmClient.DeleteProfile(ctx, matchingProfileIds)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please log deleted profiles, like deleted VMs and folders are logged.

Copy link
Member Author

Choose a reason for hiding this comment

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

added logging

@@ -212,6 +249,11 @@ func (o *ClusterUninstaller) Run() error {
o.Logger.Debug("No managed Folder found")
}

err = deleteStoragePolicy(context.TODO(), o.Client, o.InfraID)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could vCenter return storage policies in getAttachedObjectsOnTag above? It feels odd to distinguish VMs and folders by tag and storage policies by name.

Copy link
Member Author

Choose a reason for hiding this comment

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

you can't tag storage policies AFAIK. I spent bit of time looking into that and I could not find an option.

if err != nil {
return errors.Errorf("error deleting storage policy: %v", err)
}

o.Logger.Debug("Delete tag")
tagLogger := o.Logger.WithField("Tag", o.InfraID)
if err = deleteTag(context.TODO(), o.RestClient, o.InfraID); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm: will this delete tag on the Datastore?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, deleting the tag removes the tag from associated objects (including datastore).

@gnufied
Copy link
Member Author

gnufied commented Jul 14, 2021

/test e2e-vsphere

1 similar comment
@gnufied
Copy link
Member Author

gnufied commented Jul 14, 2021

/test e2e-vsphere

@gnufied
Copy link
Member Author

gnufied commented Jul 19, 2021

/retest

@jcpowermac
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2021
@gnufied
Copy link
Member Author

gnufied commented Jul 20, 2021

/retest

1 similar comment
@gnufied
Copy link
Member Author

gnufied commented Jul 20, 2021

/retest

@patrickdillon
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2021
@gnufied
Copy link
Member Author

gnufied commented Jul 20, 2021

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 20, 2021

@gnufied: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-openstack-kuryr b2aef39 link /test e2e-openstack-kuryr
ci/prow/e2e-aws-workers-rhel7 b2aef39 link /test e2e-aws-workers-rhel7
ci/prow/e2e-crc b2aef39 link /test e2e-crc

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit da3399d into openshift:master Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants