You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/04 06:27:45 UTC

[GitHub] [pulsar] yangl opened a new issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

yangl opened a new issue #9474:
URL: https://github.com/apache/pulsar/issues/9474


   **Describe the bug**
   
   
   the `delete-cluster-metadata` command should clean all metadata in zookeeper inited by `bin/pulsar initialize-cluster-metadata` 
   
   **To Reproduce**
   
   
   Steps to reproduce the behavior:
   1. init cluster metadata by https://pulsar.apache.org/docs/en/deploy-bare-metal/#initialize-cluster-metadata
   2. use the zkCli connect to the localzk, `ls /`, get the 
   `zookeeper
   stream
   bookies
   ledgers
   managed-ledgers
   namespace
   admin
   pulsar`
   the `ledgers` may not exist when use --existing-bk-metadata-service-uri
   3. teardown the cluster by `delete-cluster-metadata` command
   4. connnect to the loaclzk, execute the `ls /` ,get the 
   `zookeeper
   ledgers
   admin
   pulsar`
   
   **Expected behavior**
   
   the `ledgers admin pulsar` path should delete too
   
   
   **Additional context**
   
   in the PulsarClusterMetadataTeardown.java fileļ¼Œsome properties should correct, as follow:
   
   1. "-cluster" -->""--cluster"" 
   2. "--bookkeeper-metadata-service-uri" --> "--existing-bk-metadata-service-uri"
   
   last, i'll will fix this soon.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] yangl closed issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
yangl closed issue #9474:
URL: https://github.com/apache/pulsar/issues/9474


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773152486






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] yangl commented on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
yangl commented on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773133429






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] yangl closed issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
yangl closed issue #9474:
URL: https://github.com/apache/pulsar/issues/9474


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773157098


   By the way, in my own cluster, there's no `/pulsar` node, see
   
   ```bash
   $ ls /
   [admin, bookies, counters, ledgers, loadbalance, managed-ledgers, namespace, schemas, stream, zookeeper]
   ```
   
   And for the change
   
   > `"--bookkeeper-metadata-service-uri" --> "--existing-bk-metadata-service-uri"`.
   
   I think it's not necessary. The parameter is different from `PulsarClusterMetadataSetup`, when we setup a cluster, we need to differ if the URI is an existed BK or a not existed BK that will be created. If we just use `--bookkeeper-metadata-service-uri`, it may be confused. So the parameter name became `--existing-bk-metadata-service-uri`.
   
   However, when we teardown a cluster, there's no way that we need to specify a not existed BK.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower edited a comment on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
BewareMyPower edited a comment on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773157098


   By the way, in my own cluster, there's no `/pulsar` node, see
   
   ```bash
   $ ls /
   [admin, bookies, counters, ledgers, loadbalance, managed-ledgers, namespace, schemas, stream, zookeeper]
   ```
   
   And for the change
   
   > `"--bookkeeper-metadata-service-uri" --> "--existing-bk-metadata-service-uri"`.
   
   I think it's not necessary. The parameter is different from `PulsarClusterMetadataSetup`, when we setup a cluster, we need to differ if the URI is an existed BK or a not existed BK that will be created. If we just use `--bookkeeper-metadata-service-uri`, it may be confused. So the parameter name became `--existing-bk-metadata-service-uri`.
   
   However, when we teardown a cluster, there's no way that we need to specify a not existed BK.
   
   You can see #8130 for the discussion about the param name.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] yangl commented on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
yangl commented on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773133429


   after the init, the zk path as follow:
   
   the --zookeeper  zk  contains  **`namespace stream bookies managed-ledgers`**
   the --configuration-store zk contains **`admin pulsar`**  -- this may should not cleanup?
   the --existing-bk-metadata-service-uri zk contains  **`/chroot/ledgers`**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] yangl edited a comment on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
yangl edited a comment on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773133429


   after the init, the zk path as follow:
   
   the --zookeeper  zk  contains  **`namespace stream bookies managed-ledgers`**
   the --configuration-store zk contains **`admin pulsar`**
   the --existing-bk-metadata-service-uri zk contains  **`/chroot/ledgers`**
   
   
   --configuration-store's zookeeper path **`admin pulsar`**, should cleanup when use the same zookeeper as --zookeeper config


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower edited a comment on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
BewareMyPower edited a comment on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773157098


   By the way, in my own cluster, there's no `/pulsar` node, see
   
   ```bash
   $ ls /
   [admin, bookies, counters, ledgers, loadbalance, managed-ledgers, namespace, schemas, stream, zookeeper]
   ```
   
   And for the change
   
   > `"--bookkeeper-metadata-service-uri" --> "--existing-bk-metadata-service-uri"`.
   
   I think it's not necessary. The parameter is different from `PulsarClusterMetadataSetup`, when we setup a cluster, we need to differ if the URI is an existed BK or a not existed BK that will be created. If we just use `--bookkeeper-metadata-service-uri`, it may be confused. So the parameter name became `--existing-bk-metadata-service-uri`.
   
   However, when we teardown a cluster, there's no way that we need to specify a not existed BK.
   
   You can see #8130 for the discussion about the param name.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773152486


   This command is to delete a cluster's metadata. As you can see, the `/admin/clusters` node may contain two nodes:
   
   ```bash
   $ ls /admin/clusters 
   [global, my-cluster]
   ```
   
   Here `my-cluster` is the `clusterName` defined in `conf/broker.conf`. When we have multiple clusters that share the same configuration store, if we deleted the whole `/admin` node, other clusters would be affected.
   
   The same goes for `/ledgers` node when multiple clusters share the same bookie cluster.
   
   As for the other nodes under `/ledgers` and `/admin`, it should be deleted by the related admin operations. For example, when you delete a topic, the broker will delete all associated ledgers, which contains the nodes in ZK (`/ledgers/00/0000/L<ledger-id>`). We should not delete these nodes manually.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] yangl commented on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
yangl commented on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773187605


   Get, thanks! @BewareMyPower 
   so i just correct the "-cluster" --> **"--cluster"** 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] yangl edited a comment on issue #9474: `delete-cluster-metadata` command unable to cleanup all metadata inited by `bin/pulsar initialize-cluster-metadata`

Posted by GitBox <gi...@apache.org>.
yangl edited a comment on issue #9474:
URL: https://github.com/apache/pulsar/issues/9474#issuecomment-773133429


   after the init, the zk path as follow:
   
   the --zookeeper  zk  contains  **`namespace stream bookies managed-ledgers`**
   the --configuration-store zk contains **`admin pulsar`**
   the --existing-bk-metadata-service-uri zk contains  **`/chroot/ledgers`**
   
   
   --configuration-store's zookeeper path **`admin pulsar`**, should cleanup when use the same zookeeper as --zookeeper config


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org