Skip to content

Commit fc87553

Browse files
rebtoorcursoragent
authored andcommitted
[libvirt_manager] Register workload dir as libvirt storage pool
The `workload/` directory holds primary VM boot disks but was not registered as a libvirt storage pool. This caused sushy-emulator's libvirt driver to fail `storageVolLookupByPath()` calls when querying VM disk information. Define a `cifmw-workload` pool for `workload/` alongside the existing `cifmw-pool` for `volumes/`, and clean it up on teardown. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
1 parent 05ad516 commit fc87553

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

roles/libvirt_manager/tasks/clean_layout.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,15 @@
242242
pool_action: "delete"
243243
ansible.builtin.include_tasks: storage_pool.yml
244244

245+
- name: Remove workload storage pool
246+
vars:
247+
pool_action: "delete"
248+
cifmw_libvirt_manager_storage_pool: >-
249+
{{ cifmw_libvirt_manager_workload_pool }}
250+
cifmw_libvirt_manager_pool_dir: >-
251+
{{ cifmw_libvirt_manager_basedir }}/workload
252+
ansible.builtin.include_tasks: storage_pool.yml
253+
245254
- name: Remove overlay images from ocp_volume pools if exists
246255
when:
247256
- item is not match('^base-.*$')

roles/libvirt_manager/tasks/deploy_layout.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@
104104
- workload
105105
- volumes
106106

107+
- name: Ensure workload storage pool is present
108+
vars:
109+
pool_action: "create"
110+
cifmw_libvirt_manager_storage_pool: >-
111+
{{ cifmw_libvirt_manager_workload_pool }}
112+
cifmw_libvirt_manager_pool_dir: >-
113+
{{ cifmw_libvirt_manager_basedir }}/workload
114+
ansible.builtin.include_tasks: storage_pool.yml
115+
107116
- name: Generate networking data
108117
when:
109118
- cifmw_libvirt_manager_mac_map is undefined

roles/libvirt_manager/vars/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ cifmw_libvirt_manager_polkit_rules_dir: /etc/polkit-1/rules.d
3939
cifmw_libvirt_manager_polkit_rules_file: "{{ cifmw_libvirt_manager_polkit_rules_dir }}/80-libvirt-manage.rules"
4040

4141
cifmw_libvirt_manager_storage_pool: "cifmw-pool"
42+
cifmw_libvirt_manager_workload_pool: "cifmw-workload"
4243
cifmw_libvirt_manager_fixed_networks_defaults:
4344
- ocpbm
4445
- ocppr

0 commit comments

Comments
 (0)