create-nodes failure for customised pool
Bug #1393304 reported by
Leslie Wang
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Leslie Wang |
Bug Description
when setting LIBVIRT_VOL_POOL, such as "triple", create-nodes always report below failure
error: Failed to define pool tripleo
error: operation failed: Storage source conflict with pool: 'default'
To post a comment you must log in.
I have below fix, please assign to me if it is appropriate.
diff --git a/scripts/ create- nodes b/scripts/ create- nodes create- nodes create- nodes
index f6cf35c..fba0b65 100755
--- a/scripts/
+++ b/scripts/
@@ -24,11 +24,19 @@ BRIDGE=${9:-""}
LIBVIRT_ NIC_DRIVER= ${LIBVIRT_ NIC_DRIVER: -"virtio" } VOL_POOL= ${LIBVIRT_ VOL_POOL: -"default" } VOL_POOL_ DIR=${LIBVIRT_ VOL_POOL: -"/var/ lib/libvirt/ images/ "$LIBVIRT_ VOL
LIBVIRT_
+LIBVIRT_
# define the default storage pool if its not there yet VOL_POOL_ DIR ]; then VOL_POOL_ DIR
-(virsh pool-list --all --persistent | grep -q $LIBVIRT_VOL_POOL) || (
- virsh pool-define-as --name $LIBVIRT_VOL_POOL dir --target /var/lib/libvirt/im
+if [ virsh pool-list --all --persistent | grep -q $LIBVIRT_VOL_POOL ]; then
+ if [ ! -d $LIBVIRT_
+ sudo mkdir $LIBVIRT_
+ fi
+ virsh pool-define-as --name $LIBVIRT_VOL_POOL dir --target $LIBVIRT_VOL_POOL_
+ virsh pool-autostart $LIBVIRT_VOL_POOL >& 2
+ virsh pool-start $LIBVIRT_VOL_POOL >& 2
+fi