Skip to content

[pulsar-admin-tools] Support delete all data associated with a cluster #8133

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

Merged
merged 2 commits into from
Sep 29, 2020

Conversation

BewareMyPower
Copy link
Contributor

@BewareMyPower BewareMyPower commented Sep 25, 2020

Motivation

When multiple broker clusters shared the same bookie cluster, if user wanted to remove a broker cluster, the associated ledgers in bookies should also be deleted.

Modifications

  • Add an option to cluster delete command to delete all the data associated with the cluster.

Currently there's no way to delete the ledgers of schema from client's side, a new REST API to delete schema's ledgers should be exposed or the existed SchemaRegistryServiceImpl#deleteSchema's semantics should be change.

Verifying this change

  • Make sure that the change passes the CI checks.

The new option has been tested in local environment by:

  1. Deploy a ZK which acts as both local ZK and the configuration store;
  2. Init metadata of 2 clusters, the 2nd cluster use --bookkeeper-metadata-service option to share the same BK metadata position;
  3. Deploy a BK;
  4. Deploy 2 brokers associated with the 2 clusters' metadata;
  5. Create some topics and produce some messages to 2 clusters;
  6. Run bin/pulsar cluster -all <cluster> to delete the whole cluster, use bin/bookkeeper shell list ledgers to verify the change of ledgers count.

An integration test is needed to simulate the procedures above.

Sorry, something went wrong.

@jiazhai
Copy link
Member

jiazhai commented Sep 25, 2020

/pulsarbot run-failure-checks

@jiazhai jiazhai changed the title [pulsar-admin-tools] Support delete all data associated with a cluster [WIP][pulsar-admin-tools] Support delete all data associated with a cluster Sep 25, 2020
@jiazhai
Copy link
Member

jiazhai commented Sep 26, 2020

lgtm, @BewareMyPower would you please open a new issue for the todo item, and linked in your code comments

@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

@BewareMyPower
Copy link
Contributor Author

@jiazhai I've updated the #8134 to list the TODOs

@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

4 similar comments
@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

@jiazhai jiazhai changed the title [WIP][pulsar-admin-tools] Support delete all data associated with a cluster [pulsar-admin-tools] Support delete all data associated with a cluster Sep 27, 2020
@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

@BewareMyPower
Copy link
Contributor Author

pulsarbot run-failure-checks

@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@BewareMyPower
Copy link
Contributor Author

/pulsarbot run-failure-checks

@jiazhai jiazhai merged commit 0b041a2 into apache:master Sep 29, 2020
@jiazhai jiazhai added this to the 2.7.0 milestone Sep 29, 2020
@BewareMyPower BewareMyPower deleted the delete-cluster-dev branch September 29, 2020 08:05
BewareMyPower added a commit to streamnative/pulsar-archived that referenced this pull request Oct 1, 2020
apache#8133)

### Motivation

When multiple broker clusters shared the same bookie cluster, if user wanted to remove a broker cluster, the associated ledgers in bookies should also be deleted.

### Modifications

- Add an option to `cluster delete` command to delete all the data associated with the cluster.

Currently there's no way to delete the ledgers of schema from client's side, a new REST API to delete schema's ledgers should be exposed or the existed `SchemaRegistryServiceImpl#deleteSchema`'s semantics should be change. 

### Verifying this change
The new option has been tested in local environment by:
1. Deploy a ZK which acts as both local ZK and the configuration store;
2. Init metadata of 2 clusters, the 2nd cluster use `--bookkeeper-metadata-service` option to share the same BK metadata position;
3. Deploy a BK;
4. Deploy 2 brokers associated with the 2 clusters' metadata;
5. Create some topics and produce some messages to 2 clusters;
6. Run `bin/pulsar cluster -all <cluster>` to delete the whole cluster, use `bin/bookkeeper shell list ledgers` to verify the change of ledgers count.

**An integration test is needed to simulate the procedures above.**
BewareMyPower added a commit to streamnative/pulsar-archived that referenced this pull request Oct 1, 2020
apache#8133)

### Motivation

When multiple broker clusters shared the same bookie cluster, if user wanted to remove a broker cluster, the associated ledgers in bookies should also be deleted.

### Modifications

- Add an option to `cluster delete` command to delete all the data associated with the cluster.

Currently there's no way to delete the ledgers of schema from client's side, a new REST API to delete schema's ledgers should be exposed or the existed `SchemaRegistryServiceImpl#deleteSchema`'s semantics should be change. 

### Verifying this change
The new option has been tested in local environment by:
1. Deploy a ZK which acts as both local ZK and the configuration store;
2. Init metadata of 2 clusters, the 2nd cluster use `--bookkeeper-metadata-service` option to share the same BK metadata position;
3. Deploy a BK;
4. Deploy 2 brokers associated with the 2 clusters' metadata;
5. Create some topics and produce some messages to 2 clusters;
6. Run `bin/pulsar cluster -all <cluster>` to delete the whole cluster, use `bin/bookkeeper shell list ledgers` to verify the change of ledgers count.

**An integration test is needed to simulate the procedures above.**
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Oct 3, 2020
apache#8133)

### Motivation

When multiple broker clusters shared the same bookie cluster, if user wanted to remove a broker cluster, the associated ledgers in bookies should also be deleted.

### Modifications

- Add an option to `cluster delete` command to delete all the data associated with the cluster.

Currently there's no way to delete the ledgers of schema from client's side, a new REST API to delete schema's ledgers should be exposed or the existed `SchemaRegistryServiceImpl#deleteSchema`'s semantics should be change. 

### Verifying this change
The new option has been tested in local environment by:
1. Deploy a ZK which acts as both local ZK and the configuration store;
2. Init metadata of 2 clusters, the 2nd cluster use `--bookkeeper-metadata-service` option to share the same BK metadata position;
3. Deploy a BK;
4. Deploy 2 brokers associated with the 2 clusters' metadata;
5. Create some topics and produce some messages to 2 clusters;
6. Run `bin/pulsar cluster -all <cluster>` to delete the whole cluster, use `bin/bookkeeper shell list ledgers` to verify the change of ledgers count.

**An integration test is needed to simulate the procedures above.**
@wolfstudy
Copy link
Member

need to cherry-pick 2.6.2.

wolfstudy pushed a commit that referenced this pull request Oct 30, 2020
#8133)

### Motivation

When multiple broker clusters shared the same bookie cluster, if user wanted to remove a broker cluster, the associated ledgers in bookies should also be deleted.

### Modifications

- Add an option to `cluster delete` command to delete all the data associated with the cluster.

Currently there's no way to delete the ledgers of schema from client's side, a new REST API to delete schema's ledgers should be exposed or the existed `SchemaRegistryServiceImpl#deleteSchema`'s semantics should be change. 

### Verifying this change
The new option has been tested in local environment by:
1. Deploy a ZK which acts as both local ZK and the configuration store;
2. Init metadata of 2 clusters, the 2nd cluster use `--bookkeeper-metadata-service` option to share the same BK metadata position;
3. Deploy a BK;
4. Deploy 2 brokers associated with the 2 clusters' metadata;
5. Create some topics and produce some messages to 2 clusters;
6. Run `bin/pulsar cluster -all <cluster>` to delete the whole cluster, use `bin/bookkeeper shell list ledgers` to verify the change of ledgers count.

**An integration test is needed to simulate the procedures above.**

(cherry picked from commit 0b041a2)
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Nov 13, 2020
apache#8133)

### Motivation

When multiple broker clusters shared the same bookie cluster, if user wanted to remove a broker cluster, the associated ledgers in bookies should also be deleted.

### Modifications

- Add an option to `cluster delete` command to delete all the data associated with the cluster.

Currently there's no way to delete the ledgers of schema from client's side, a new REST API to delete schema's ledgers should be exposed or the existed `SchemaRegistryServiceImpl#deleteSchema`'s semantics should be change. 

### Verifying this change
The new option has been tested in local environment by:
1. Deploy a ZK which acts as both local ZK and the configuration store;
2. Init metadata of 2 clusters, the 2nd cluster use `--bookkeeper-metadata-service` option to share the same BK metadata position;
3. Deploy a BK;
4. Deploy 2 brokers associated with the 2 clusters' metadata;
5. Create some topics and produce some messages to 2 clusters;
6. Run `bin/pulsar cluster -all <cluster>` to delete the whole cluster, use `bin/bookkeeper shell list ledgers` to verify the change of ledgers count.

**An integration test is needed to simulate the procedures above.**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants