mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 04:06:47 +00:00
libvirt measures a pool's size and free space only when the pool is refreshed and keeps those figures until the next refresh. The pool lists read them without a refresh, so they showed a pool's space as of whenever libvirt last refreshed it: two hosts sharing one pool's storage told different free space for it, each its own refresh's. On a test host, a 1 GiB file left libvirt's free space unchanged while df showed 1 GiB less, until the pool was refreshed. get_storages_info refreshes each active pool before reading it; a refresh libvirt refuses (while a volume is cloned in the pool) leaves the last figures, as the pool pages already do. A refresh scans the pool's volumes, so pools are read only where one host's are shown: a host's overview (views.host_pools, its Storage card) and its Storages page and API. The Computes list and the new-VM dialog's host lines, which read every host at once, no longer show pools; Compute.capacity is the vCPUs and memory given.
17 lines
813 B
HTML
17 lines
813 B
HTML
{% load i18n %}
|
|
{# a host's storage pools: storage, from views.host_pools #}
|
|
{% if storage is None %}
|
|
<div class="small text-body-secondary">{% trans "The storage pools could not be read." %}</div>
|
|
{% elif not storage.pool %}
|
|
<div class="small text-body-secondary">{% trans "No active storage pool." %}</div>
|
|
{% else %}
|
|
{% include "computes/pool_bar.html" with pool=storage.pool %}
|
|
{% endif %}
|
|
{% if storage.more_pools %}
|
|
<details class="mt-2">
|
|
<summary class="small text-body-secondary">{% blocktrans count counter=storage.more_pools|length %}{{ counter }} more pool{% plural %}{{ counter }} more pools{% endblocktrans %}</summary>
|
|
{% for pool in storage.more_pools %}
|
|
<div class="mt-2">{% include "computes/pool_bar.html" %}</div>
|
|
{% endfor %}
|
|
</details>
|
|
{% endif %}
|