You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2019/11/19 01:30:59 UTC

[bookkeeper] branch master updated: [DOCUMENTATION] Add doc for decommissioning bookie process

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 2ca4025  [DOCUMENTATION] Add doc for decommissioning bookie process
2ca4025 is described below

commit 2ca4025e4c699e49c39272a067d8ec6056ca4358
Author: Anup Ghatage <gh...@gmail.com>
AuthorDate: Mon Nov 18 17:30:53 2019 -0800

    [DOCUMENTATION] Add doc for decommissioning bookie process
    
    ### Motivation
    Documentation on how to decommission a bookie safely.
    
    ### Changes
    Added `decommission.md`
    
    Reviewers: Enrico Olivelli <eo...@gmail.com>, Sijie Guo <None>
    
    This closes #2199 from Ghatage/decomission-documentation
---
 site/_data/sidebar.yaml               |  2 ++
 site/docs/latest/admin/decomission.md | 41 +++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/site/_data/sidebar.yaml b/site/_data/sidebar.yaml
index f4bed79..5fc066b 100644
--- a/site/_data/sidebar.yaml
+++ b/site/_data/sidebar.yaml
@@ -30,6 +30,8 @@ groups:
     endpoint: upgrade
   - name: BookKeeper Admin REST API
     endpoint: http
+  - name: Decommissioning Bookies
+    endpoint: decomission
   #- name: Geo-replication
   #  endpoint: geo-replication
   #- name: Customized placement policies
diff --git a/site/docs/latest/admin/decomission.md b/site/docs/latest/admin/decomission.md
new file mode 100644
index 0000000..842b250
--- /dev/null
+++ b/site/docs/latest/admin/decomission.md
@@ -0,0 +1,41 @@
+---
+title: Decommission Bookies
+---
+
+In case the user wants to decommission a bookie, the following process is useful to follow in order to verify if the
+decommissioning was safely done.
+
+### Before we decommission
+1. Ensure state of your cluster can support the decommissioning of the target bookie.
+Check if `EnsembleSize >= Write Quorum >= Ack Quorum` stays true with one less bookie
+
+2. Ensure target bookie shows up in the listbookies command.
+
+3. Ensure that there is no other process ongoing (upgrade etc).
+
+### Process of Decommissioning
+1. Log on to the bookie node, check if there are underreplicated ledgers.
+
+If there are, the decommission command will force them to be replicated.
+`$ bin/bookkeeper shell listunderreplicated`
+
+2. Stop the bookie
+`$ bin/bookkeeper-daemon.sh stop bookie`
+
+3. Run the decommission command.
+If you have logged onto the node you wish to decommission, you don't need to provide `-bookieid`
+If you are running the decommission command for target bookie node from another bookie node you should mention 
+the target bookie id in the arguments for `-bookieid`
+`$ bin/bookkeeper shell decommissionbookie`
+or
+`$ bin/bookkeeper shell decommissionbookie -bookieid <target bookieid>`
+
+4. Validate that there are no ledgers on decommissioned bookie
+`$ bin/bookkeeper shell listledgers -bookieid <target bookieid>`
+
+Last step to verify is you could run this command to check if the bookie you decommissioned doesn’t show up in list bookies:
+
+```bash
+./bookkeeper shell listbookies -rw -h
+./bookkeeper shell listbookies -ro -h
+```