apache / apache/cloudstack

Configdrive/storage repository issue on XCP-ng

Đang mở
#11,984 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
component:secondary-storage component:XenServer
Ngôn ngữ chính
Java
Star
3.1k
Fork
1.4k
Merge trung bình
6 ngày 19 giờ
Pull request đã merge (30 ngày)
32

Mô tả

### problem

Issue No1:
In case of failed deployments there are unused storage repositories left behind.

Image

`example:
**xe vdi-list uuid=f16e0133-2074-49af-a393-1bb9fa007fb5**
uuid ( RO) : f16e0133-2074-49af-a393-1bb9fa007fb5
name-label ( RW): i-2-24-VM.iso
name-description ( RW):
sr-uuid ( RO): **608c63b9-9c12-bf6a-8d28-f2bc7d01d343**
virtual-size ( RO): 409600
sharable ( RO): false
read-only ( RO): true

**xe sr-list name-label=i-2-24-VM-CONFIGDRIVE-ISO**
uuid ( RO) : 12b1e17a-fb1c-d99f-451c-baf035b822f2
name-label ( RW): i-2-24-VM-CONFIGDRIVE-ISO
name-description ( RW): 10.1.32.4:/acs/secondary/ref-trl-6095-x-Mu24/ref-trl-6095-x-Mu24-sec2/configdrive
host ( RO):
type ( RO): iso
content-type ( RO): iso

uuid ( RO) : **608c63b9-9c12-bf6a-8d28-f2bc7d01d343**
name-label ( RW): i-2-24-VM-CONFIGDRIVE-ISO
name-description ( RW): 10.1.32.4:/acs/secondary/ref-trl-6095-x-Mu24/ref-trl-6095-x-Mu24-sec2/configdrive
host ( RO):
type ( RO): iso
content-type ( RO): iso

uuid ( RO) : 222f3918-75e1-99f9-f7f2-e63d714c130f
name-label ( RW): i-2-24-VM-CONFIGDRIVE-ISO
name-description ( RW): 10.1.32.4:/acs/secondary/ref-trl-6095-x-Mu24/ref-trl-6095-x-Mu24-sec2/configdrive
host ( RO):
type ( RO): iso
content-type ( RO): iso`

As you see above just one storage repository is being used for the ISO file.
This has no functional impact but leaves something unused behind.

Issue No 2:
Within a storage repository which name is specified to one particular VM you can see all the iso files from all the other VMs since they are located in the same secondary storage. Why not have one general storage repository like "VM-CONFIGDRIVE-ISO" to avoid both issues?

### versions

ACS: 4.20.1
XCP-ng: 8.2

### The steps to reproduce the bug

1. Build a couple of VMs where you have limited resources available on the hypervisors.
2.

Image

3. The hypervisor still has been selected for deployments but failed from hypervisor side
4. Several attempts have happened
```
cat /var/log/cloudstack/management/management-server.log | grep job-117 | grep 'VM start attempt'
2025-10-28 14:22:19,361 DEBUG [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-42:[ctx-a1bf013f, job-117/job-118, ctx-520420a9]) (logid:67fb25c7) VM start attempt #1
2025-10-28 14:22:24,301 DEBUG [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-42:[ctx-a1bf013f, job-117/job-118, ctx-520420a9]) (logid:67fb25c7) VM start attempt #2
2025-10-28 14:22:25,371 DEBUG [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-43:[ctx-34843ad3, job-117/job-119, ctx-605dae51]) (logid:67fb25c7) VM start attempt #1
2025-10-28 14:22:28,159 DEBUG [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-43:[ctx-34843ad3, job-117/job-119, ctx-605dae51]) (logid:67fb25c7) VM start attempt #2
```
5. For each attempt a storage repository has been created. Every time an ISO file as well. On failed attempt the ISO file has been removed but the storage repository not.
6. Once the VM finally got deployed you'll end up with multiple storage repositories, used and unused once with the same name.

### What to do about it?

Option 1: Besides removing the ISO file do also remove the storage repository on failed deployments.
Option 2: Use one general storage repository for all ISO files.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện các lần thử deployment thất bại được mô tả cho ACS 4.20.1 với XCP-ng 8.2, sử dụng các lần thử khởi động VM trong management-server.log và đầu ra của xe sr-list/xe vdi-list. So sánh việc dọn dẹp sau mỗi lần thử thất bại và xác định liệu implementation nên xóa storage repository không được sử dụng hay chia sẻ một repository cho các ISO của config-drive. Được xem là hoàn tất khi các lần thử thất bại không để lại repository không được sử dụng nào và các deployment thành công vẫn giữ quyền truy cập vào ISO của chúng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
cloud, infrastructure
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.