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

[pulsar-broker] Added support to force deleting tenant #9677

Merged
merged 5 commits into from
Mar 4, 2021

Conversation

murong00
Copy link
Contributor

Motivation

Some users expect an option to force deleting tenant for simplicity, it can be useful in some situations.

Modifications

Add a optional field to force the deletion of all stuffs related to tenant and a related unit test.

@codelipenghui codelipenghui added doc-required Your PR changes impact docs and you will update later. area/admin labels Feb 23, 2021
@codelipenghui codelipenghui added this to the 2.8.0 milestone Feb 23, 2021
@jiazhai
Copy link
Member

jiazhai commented Feb 23, 2021

@BewareMyPower Would you please also take a look of this PR?

// Expected: cannot delete non-empty tenant
}

//
Copy link
Contributor

Choose a reason for hiding this comment

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

What is your intention for this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just want to comment "delete tenant forcefully", sorry for the omission.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@BewareMyPower BewareMyPower left a comment

Choose a reason for hiding this comment

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

LGTM

@murong00
Copy link
Contributor Author

/pulsarbot run-failure-checks

@Anonymitaet
Copy link
Member

Anonymitaet commented Feb 25, 2021

@murong00 thanks for your coding work.

  1. Does this apply to 2.7.1?

  2. Would you like to add docs for this change?

@murong00
Copy link
Contributor Author

@murong00 thanks for your coding work.

  1. Does this apply to 2.7.1?
  2. Would you like to add docs for this change?

@Anonymitaet

  1. Applying this to 2.8.0 seems more appropriate since it is a new feature.
  2. Done, please help to take a look.

Copy link
Member

@Anonymitaet Anonymitaet left a comment

Choose a reason for hiding this comment

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

Thanks. Please update the description for all occurrences.

Options
|Flag|Description|Default|
|----|---|---|
|`-f`, `--force`|Delete tenant forcefully by force deleting all namespaces under it|false|
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
|`-f`, `--force`|Delete tenant forcefully by force deleting all namespaces under it|false|
|`-f`, `--force`|Delete a tenant forcefully by deleting all namespaces under it. |false|

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@murong00
Copy link
Contributor Author

/pulsarbot run-failure-checks

@murong00
Copy link
Contributor Author

/pulsarbot run-failure-checks

@murong00
Copy link
Contributor Author

murong00 commented Mar 1, 2021

@codelipenghui Please help to take a look about this pr, thanks.

@codelipenghui
Copy link
Contributor

@murong00 Then change looks good to me, shall we need to control the force delete tenants or namespaces in the broker.conf? such as forceDeleteNamepaceAllowed, forceDeleteTenantAllowed? This will help the Pulsar maintainer to maintain the cluster as expected. If this makes sense, we can create an issue or send a PR directly.

I will merge this PR first.

@codelipenghui codelipenghui merged commit a5e795c into apache:master Mar 4, 2021
@Anonymitaet Anonymitaet added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-required Your PR changes impact docs and you will update later. labels Mar 4, 2021
@murong00
Copy link
Contributor Author

murong00 commented Mar 4, 2021

@murong00 Then change looks good to me, shall we need to control the force delete tenants or namespaces in the broker.conf? such as forceDeleteNamepaceAllowed, forceDeleteTenantAllowed? This will help the Pulsar maintainer to maintain the cluster as expected. If this makes sense, we can create an issue or send a PR directly.

That sounds like a good idea, I will accomplish this when available.

@codelipenghui
Copy link
Contributor

@murong00 Ok, I will create an issue first

mlyahmed pushed a commit to mlyahmed/pulsar that referenced this pull request Mar 5, 2021
### Motivation

Some users expect an option to force deleting tenant for simplicity, it can be useful in some situations.

### Modifications

Add a optional field to force the deletion of all stuffs related to tenant and a related unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admin doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants