Libvirt Storage Pools Remain Defined After CLVM_NG Primary Storage Removal
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 52/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- java, linux
研究方向
Start by tracing the primary storage removal flow for CLVM_NG and how it communicates with KVM hosts to remove libvirt pools. The issue names no source files or tests, so first locate the removal handlers and related tests, then reproduce the cleanup behavior with the listed CloudStack and KVM setup. Done means a removed pool that is no longer in use is undefined on affected hosts.
由索引模型根據 Issue 內容生成。
描述
problem
Title
Libvirt Storage Pools Remain Defined After CLVM_NG Primary Storage Removal
Description
When a CLVM_NG primary storage pool is removed from CloudStack, the corresponding libvirt storage pool remains defined on the KVM hosts.
Although the storage pool is marked as removed in the CloudStack database, the associated libvirt logical storage pool remains active and configured with autostart enabled. This leaves stale storage pool definitions on the KVM hosts after the primary storage has been removed from CloudStack.
Steps to Reproduce
- Configure a CLVM_NG primary storage pool in CloudStack.
- Verify that the corresponding logical storage pool is defined on the KVM hosts using
virsh pool-list. - Remove the primary storage pool from CloudStack.
- Check the storage pool record in the CloudStack database.
- Run
virsh pool-listandvirsh pool-dumpxml <pool_name>on the KVM host.
Actual Behavior
The storage pool is marked as removed in the CloudStack database, but its corresponding libvirt storage pool remains defined and active on the KVM host.
For example, the CloudStack database shows the following record:
mysql> select * from storage_pool where name='xxxxxxxxds_test_02_clvm';
+----+-------------------------+------+-----------+------+----------------+--------+------------+------------+----------------+--------------+-----------+-----------------------+---------------------+---------------------+---------------------+-------------+-----------------------+---------+------------+---------+---------------+--------+-----------+
| id | name | uuid | pool_type | port | data_center_id | pod_id | cluster_id | used_bytes | capacity_bytes | host_address | user_info | path | created | removed | update_time | status | storage_provider_name | scope | hypervisor | managed | capacity_iops | parent | used_iops |
+----+-------------------------+------+-----------+------+----------------+--------+------------+------------+----------------+--------------+-----------+-----------------------+---------------------+---------------------+---------------------+-------------+-----------------------+---------+------------+---------+---------------+--------+-----------+
| 68 | xxxxxxxxds_test_02_clvm | NULL | CLVM_NG | 0 | 1 | 1 | 4 | 268435456 | 4398042316800 | localhost | NULL | xxxxxxxxds_test_02_vg | 2026-09-07 17:18:26 | 2026-09-22 16:38:48 | 2026-09-11 17:49:44 | Maintenance | DefaultPrimary | CLUSTER | KVM | 0 | NULL | 0 | NULL |
+----+-------------------------+------+-----------+------+----------------+--------+------------+------------+----------------+--------------+-----------+-----------------------+---------------------+---------------------+---------------------+-------------+-----------------------+---------+------------+---------+---------------+--------+-----------+
1 row in set (0.00 sec)
mysql>
The record has a removed timestamp of 2026-09-22 16:38:48, indicating that the storage pool was removed from CloudStack.
However, on the KVM host, the corresponding libvirt storage pool remains defined and active:
# /usr/bin/virsh pool-list
Name State Autostart
------------------------------------------------------------
72bf0bc4-b39d-4813-8d1c-26a07b9ea27d active no
77be2d95-d3a2-4647-a08d-7f4ba352bda5 active no
b6b18a84-616b-455e-a71a-1c1a4cda938e active no
cff3230f-29ad-4210-9db6-14db918b5e24 active no
d558ab81-822d-49a6-886b-ccbaae584505 active no
xxxxxxxxds_test_02_vg active yes
xxxxxxxxds_test_03_vg active yes
xxxxxxxxds_test_04_vg active yes
# /usr/bin/virsh pool-dumpxml xxxxxxxxds_test_02_vg
<pool type='logical'>
<name>xxxxxxxxds_test_02_vg</name>
<uuid>a7b66174-d2a7-32bf-be0c-2e1329547986</uuid>
<capacity unit='bytes'>4398042316800</capacity>
<allocation unit='bytes'>4398042316800</allocation>
<available unit='bytes'>0</available>
<source>
<name>xxxxxxxxds_test_02_vg</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/xxxxxxxxds_test_02_vg</path>
</target>
</pool>
#
Expected Behavior
When a CLVM_NG primary storage pool is removed from CloudStack, the corresponding libvirt storage pool should also be undefined on the affected KVM hosts, provided it is no longer in use and can be safely removed.
CloudStack should ensure that storage pool definitions are properly cleaned up on the KVM hosts during primary storage removal.
Environment
- CloudStack version: 4.23.0
- Hypervisor: KVM
- Primary storage type: CLVM_NG
- KVM host OS: Red Hat Enterprise Linux 9.8
Additional Information
The CloudStack storage pool name is xxxxxxxxds_test_02_clvm, while the corresponding libvirt logical storage pool name is xxxxxxxxds_test_02_vg, matching the LVM volume group name configured as the storage pool path in CloudStack.
versions
The versions of ACS, hypervisors, storage, network etc..
The steps to reproduce the bug
...
What to do about it?
No response
- 主要語言
- Java
- 星號
- 3.1k
- 分支
- 1.4k
- 平均合併
- 7 天 16 小時
- 30 天內合併 PR
- 15
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/cloudstack 的其他 Issue
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new size可能已有人在做 @bhouse-nexthop 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
apache/cloudstack#14645 · 1 則留言 ·
維護者通常 1 天內回覆
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replaced可能已有人在做 @bhouse-nexthop 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
apache/cloudstack#14633 · 1 則留言 ·
維護者通常 1 天內回覆
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)可能已有人在做 @bhouse-nexthop 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
apache/cloudstack#14631 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
apache/cloudstack#14625 · 1 則留言 ·
維護者通常 1 天內回覆
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)可能已有人在做 @willbennett-devops 於 12 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
apache/cloudstack#14545 · 1 則留言 ·
維護者通常 1 天內回覆
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
[Bug]: Nullable implicit operator on string extensible enums still throws for a null string可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉bug emitter:client:csharp
難度 2/5 1-3 小時 新手友好度 84/100
microsoft/typespec#12572 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
[BUG]: Java SDK MountRequest always sends update-optional fields, resetting stored mount settings未關閉bug
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)未關閉
難度 2/5 1-3 小時 新手友好度 73/100
維護者通常 1 天內回覆
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configuration可能已有人在做 @amalsaidov 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
needs-area-label
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 2 天內回覆