Bug 35080 - Update available capacity for "logical" storage pools
Update available capacity for "logical" storage pools
Status: CLOSED WONTFIX
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 4.2
All Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-10 10:35 CEST by Philipp Hahn
Modified: 2023-06-28 10:46 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-06-10 10:35:36 CEST
UVMMd does not refresh the available capacity of LVM storage pools.

diff --git a/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/src/univention/uvmm/storage.py b/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/src/univention/uvmm/storage.py
index 188acc9..f36eafe 100644
--- a/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/src/univention/uvmm/storage.py
+++ b/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/src/univention/uvmm/storage.py
@@ -57,6 +57,7 @@ POOLS_TYPE = {
                'netfs': Disk.TYPE_FILE,
                'scsi': Disk.TYPE_BLOCK,
                }
+POOLS_FAST_REFRESH = set(('dir', 'fs', 'netfs', 'logical'))
 
 configRegistry = ucr.ConfigRegistry()
 configRegistry.load()
@@ -160,7 +161,7 @@ def create_storage_volume(conn, domain, disk):
                #raise StorageError(_('Volume "%(volume)s" for "%(domain)s" in not located in any storage pool.'), volume=disk.source, domain=domain.name)
                #create_storage_pool(conn, path.dirname(disk.source))
        try:
-               if pool_type in ('dir', 'fs', 'netfs'):
+               if pool_type in POOLS_FAST_REFRESH:
                        pool.refresh(0)
                vol = pool.storageVolLookupByName(disk.source[length:])
                logger.warning(
@@ -259,6 +260,8 @@ def create_storage_volume(conn, domain, disk):
                                domain.name,
                                domain.uuid,
                                )
+               if pool_type in POOLS_FAST_REFRESH:
+                       pool.refresh(0)
                return vol
        except libvirt.libvirtError, ex:
                if ex.get_error_code() in (libvirt.VIR_ERR_NO_STORAGE_VOL,):
@@ -295,7 +298,7 @@ def get_storage_volumes(node, pool_name, type=None):
                xml = pool.XMLDesc(0)
                doc = parseString(xml)
                pool_type = doc.firstChild.getAttribute('type')
-               if pool_type in ('dir', 'fs', 'netfs'):
+               if pool_type in POOLS_FAST_REFRESH:
                        pool.refresh(0)
        except TimeoutError, ex:
                logger.warning('libvirt connection "%s" timeout: %s', node.pd.uri, ex)
Comment 1 Ingo Steuwer univentionstaff 2020-07-03 20:56:48 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.