[Kimchi-devel] [PATCH] Refreshing an inactive pool causes exception

Shu Ming shuming at linux.vnet.ibm.com
Thu Mar 6 08:48:08 UTC 2014


When an update request to extend a inactive storagepool is
finished sucessfully, an exception will be raised complaining
the pool is inactive. The exception response to the clinet is
quite misleading for a successful request.
---
 src/kimchi/model/storagepools.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index 8edf62e..b666209 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -272,7 +272,8 @@ class StoragePoolModel(object):
                                                    'err': error})
         # refreshing pool state
         pool = self.get_storagepool(pool_name, self.conn)
-        pool.refresh(0)
+        if pool.isActive():
+            pool.refresh(0)
 
     def update(self, name, params):
         pool = self.get_storagepool(name, self.conn)
-- 
1.8.1.4




More information about the Kimchi-devel mailing list