Merge lp:~danilo/maas/virsh-storage-units-trunk into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | no longer in the source branch. |
Merged at revision: | 6095 |
Proposed branch: | lp:~danilo/maas/virsh-storage-units-trunk |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
235 lines (+123/-12) 4 files modified
src/provisioningserver/drivers/pod/tests/test_virsh.py (+23/-0) src/provisioningserver/drivers/pod/virsh.py (+17/-12) src/provisioningserver/utils/__init__.py (+45/-0) src/provisioningserver/utils/tests/test_utils.py (+38/-0) |
To merge this branch: | bzr merge lp:~danilo/maas/virsh-storage-units-trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+325920@code.launchpad.net |
Commit message
Consider size units for storage when evaluating virsh pod storage.
Description of the change
This changes .get_key_value() on the Virsh driver to not strip the unit, and introduces a "_unitless" variant that still does that. This highlights a few potential future problems as well (memory size in KiB, CPU speed in Mhz, if those units change, we'll have similar problems).
I wonder why did we not end up using libvirt instead which would provide us stable units, but I imagine they might not be py3 bindings available or something along those lines.
Testing instructions:
I have not tested this yet (I only have one system where I have >1TiB LVM volume), so it seems easier to test this with a small storage partition instead (eg. MiB to ensure that still works), but generally you need to:
- set up a libvirt on a system and add a storage pool of >1TiB
- ensure "virsh pool-info" lists the storage pool details in TiB
- add a pod to MAAS and look at available storage: it should still be correct
My mistake; I commented on the 2.2 branch instead of this one.
See comments here.
https:/ /code.launchpad .net/~danilo/ maas/virsh- storage- units/+ merge/325913
(Usually we land a branch on trunk first and then self-approve backports.)