openvstorage / framework

The Framework is a set of components and tools which brings the user an interface (GUI / API) to setup, extend and manage an Open vStorage platform.
Other
27 stars 23 forks source link

'ovs remove nodes' should ask for confirmation while removal. #823

Closed deepshirsath closed 7 years ago

deepshirsath commented 8 years ago

Description:

Current workflow:

root@computenode1:~# ovs remove nodes 192.168.17.203

+++ Remove nodes started +++

WARNING: Some of these steps may take a very long time, please check the logs for more logging information

Following nodes with IPs will be removed from the cluster: ['192.168.17.203']
Creating SSH connections to remaining master nodes
  Node with IP 192.168.17.201  successfully connected to
  Node with IP 192.168.17.202  successfully connected to
  Node with IP 192.168.17.203  successfully connected to
Starting removal of nodes
  Cleaning up node with IP 192.168.17.203
    Removing vPool pool1 from node

+++ Demoting node +++

Current version:

Open vStorage: 2.7.2-rev.3867.ec9d46d-1
Open vStorage - Backend: 1.7.2-rev.675.37ca5b8-1
Open vStorage - SDM: 1.6.2-rev.330.f06c8de-1
Storage Driver - Base: 6.0.3-dev.201608091611.f23221e
Storage Driver - Server: 6.0.3-dev.201608091611.f23221e
Alba: 0.9.17
Arakoon 1.9.9
wimpers commented 8 years ago

Decision by BAM as should be a small one: Add yes/no question. -y for automation.

khenderick commented 8 years ago

Fixed by #1042, packaged in openvstorage-2.7.4-rev.4153.4979e95

JeffreyDevloo commented 7 years ago

Steps

Test cases:

Output

Remove node with vdisks attached

root@ovs-node-3:~# ovs remove node 10.100.199.151
+++++++++++++++++++++
+++  Remove node  +++
+++++++++++++++++++++
WARNING: Some of these steps may take a very long time, please check the logs for more information

Creating SSH connections to remaining master nodes
  Node with IP 10.100.199.153  successfully connected to
  Node with IP 10.100.199.151  successfully connected to
  Node with IP 10.100.199.152  successfully connected to
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++  Still vDisks attached to Storage Router ovs-node-1  +++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Remove node where removal is started (expect error)

root@ovs-node-3:~# ovs remove node 10.100.199.153
+++++++++++++++++++++
+++  Remove node  +++
+++++++++++++++++++++
WARNING: Some of these steps may take a very long time, please check the logs for more information

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++  The node to be removed cannot be identical to the node on which the removal is  +++
+++  initiated                                                                       +++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Remove other node without any error inducing settings

root@ovs-node-3:~# ovs remove node 10.100.199.152
+++++++++++++++++++++
+++  Remove node  +++
+++++++++++++++++++++
WARNING: Some of these steps may take a very long time, please check the logs for more information

Creating SSH connections to remaining master nodes
  Node with IP 10.100.199.153  successfully connected to
  Node with IP 10.100.199.151  successfully connected to
  Node with IP 10.100.199.152  successfully connected to
Are you sure you want to remove node ovs-node-2? (y/[n]):

Test result

Test case 'Remove node with vdisks attached (expect confirmation first, then error)' could use the enhancement by first asking confirmation and then throwing the error that it can't be removed (https://github.com/openvstorage/framework/issues/1237) Functionality wise, this test has passed.

Packages