diff options
author | Lénaïc Huard <lenaic@lhuard.fr> | 2015-04-15 23:17:30 +0200 |
---|---|---|
committer | Lénaïc Huard <lenaic@lhuard.fr> | 2015-04-15 23:17:30 +0200 |
commit | 83ed87d41536f7006b3858a65a587263e3fd2b14 (patch) | |
tree | d12361223e50f2b9c87e051016ed179b586c0c3d /playbooks/libvirt/openshift-cluster/tasks | |
parent | 34326ef782bcba8632738a40d3948bb23a3915dc (diff) | |
download | openshift-83ed87d41536f7006b3858a65a587263e3fd2b14.tar.gz openshift-83ed87d41536f7006b3858a65a587263e3fd2b14.tar.bz2 openshift-83ed87d41536f7006b3858a65a587263e3fd2b14.tar.xz openshift-83ed87d41536f7006b3858a65a587263e3fd2b14.zip |
Move `virsh pool-refresh`
The `pool-refresh` command is used to ask libvirt to rescan the content of a volume pool.
This is used to make `libvirt` take into account volumes that were created outside of livirt control
i.e.: not with a `virsh` command.
`pool-refresh` is useless after a `pool-create` as the content is scanned at creation.
`pool-refresh` is mandatory after having created files inside an existing pool.
Diffstat (limited to 'playbooks/libvirt/openshift-cluster/tasks')
-rw-r--r-- | playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml | 4 | ||||
-rw-r--r-- | playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml b/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml index 817acb250..b49879c6a 100644 --- a/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml +++ b/playbooks/libvirt/openshift-cluster/tasks/configure_libvirt_storage_pool.yml @@ -21,7 +21,3 @@ - name: Create the libvirt storage pool for openshift command: 'virsh -c {{ libvirt_uri }} pool-create-as {{ libvirt_storage_pool }} dir --target {{ libvirt_storage_pool_path }}' when: pool_info_result.rc == 1 - -- name: Refresh the libvirt storage pool for openshift - command: 'virsh -c {{ libvirt_uri }} pool-refresh {{ libvirt_storage_pool }}' - when: pool_info_result.rc == 1 diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml index 96d440096..359d0b2f3 100644 --- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml @@ -36,6 +36,9 @@ creates: '{{ os_libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso' with_items: instances +- name: Refresh the libvirt storage pool for openshift + command: 'virsh -c {{ libvirt_uri }} pool-refresh {{ libvirt_storage_pool }}' + - name: Create VMs drives command: 'virsh -c {{ libvirt_uri }} vol-create-as {{ os_libvirt_storage_pool }} {{ item }}.qcow2 10G --format qcow2 --backing-vol {{ image_name }} --backing-vol-format qcow2' with_items: instances |