Repository: openvstorage/framework

Issue:
Vpool unusable after extending with wrong params using API
### Problem description
Linked ticket: https://github.com/openvstorage/framework/issues/790
When using the API and sending the wrong data (or missed some requirements eg. DB role)
You are unable to manage this vpool and you lose the write cache because of the unusable vpool.

This only occurs when extending using the API itself and supplying the wrong information. The vpool immediately starts to setup/extend but the checks come to late and the vpool cannot recover.
![screenshot from 2016-12-21 11-56-10](https://cloud.githubusercontent.com/assets/17570109/21389416/e7e993e6-c781-11e6-855b-530ec250a9da.png)
![selection_104](https://cloud.githubusercontent.com/assets/17570109/21389428/f8c8dd16-c781-11e6-88c5-f6a7a4f682d2.png)

### Packages
```
ii  openvstorage                                        2.7.9-rev.4463.0761b63-1       amd64                          openvStorage
ii  openvstorage-backend                                1.7.9-rev.889.63f8d79-1        amd64                          openvStorage Backend plugin
ii  openvstorage-backend-core                           1.7.9-rev.889.63f8d79-1        amd64                          openvStorage Backend plugin core
ii  openvstorage-backend-webapps                        1.7.9-rev.889.63f8d79-1        amd64                          openvStorage Backend plugin Web Applications
ii  openvstorage-core                                   2.7.9-rev.4463.0761b63-1       amd64                          openvStorage core
ii  openvstorage-hc                                     1.7.9-rev.889.63f8d79-1        amd64                          openvStorage Backend plugin HyperConverged
ii  openvstorage-sdm                                    1.6.9-rev.508.9903a29-1        amd64                          Open vStorage Backend ASD Manager
ii  openvstorage-webapps                                2.7.9-rev.4463.0761b63-1       amd64                          openvStorage Web Applications

```


Discussion:

Resolving patch:
diff --git a/ovs/lib/storagerouter.py b/ovs/lib/storagerouter.py
--- a/ovs/lib/storagerouter.py
+++ b/ovs/lib/storagerouter.py
@@ -403,7 +403,7 @@ def add_vpool(parameters):
             if new_vpool is True:
                 vpool.delete()
             else:
-                vpool.status = VPool.STATUSES.FAILURE
+                vpool.status = VPool.STATUSES.RUNNING
                 vpool.save()
             raise ValueError('Errors validating the specified parameters:\n - {0}'.format('\n - '.join(set(error_messages))))
 
@@ -733,7 +733,7 @@ def add_vpool(parameters):
                                                       'alba_connection_timeout': 15,
                                                       'alba_connection_use_rora': True,
                                                       'alba_connection_transport': 'TCP',
-                                                      'alba_connection_rora_manifest_cache_capacity': rora_cache,
+                                                      'alba_connection_rora_manifest_cache_capacity': manifest_cache_size,
                                                       'backend_type': 'ALBA',
                                                       'backend_interface_retries_on_error': 5,
                                                       'backend_interface_retry_interval_secs': 1,


Test patch: