From 8ec88e17d866a7e8ed57e293dc069962d3a38536 Mon Sep 17 00:00:00 2001 From: Thibault VINCENT Date: Wed, 22 Dec 2010 11:11:42 +0100 Subject: [PATCH] storage: crappy fix of possible issue with find_space not handling pool overhead of volumes --- ccnode/libvirtwrapper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccnode/libvirtwrapper.py b/ccnode/libvirtwrapper.py index 49a330e..527c696 100644 --- a/ccnode/libvirtwrapper.py +++ b/ccnode/libvirtwrapper.py @@ -415,7 +415,8 @@ class LibvirtHVStorage(HVStorage): ''' for pool in self._pools.iteritems(): try: - if new_space * GIGABYTE_DIV < pool[1].info()[3]: + # FIXME, crappy overhead delta + if new_space * GIGABYTE_DIV <= pool[1].info()[3] - MEGABYTE_DIV: return (pool) except libvirt.libvirtError as e: raise StorageError("Can't get pool informations (%s)" % e) -- GitLab