From 49ad4850c8d5be9c90b10f118853e0288997405d Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 15 Jul 2020 14:54:22 -0700 Subject: [PATCH] Only set hw_rng_model by default if we're on libvirt This makes no sense to set on _every_ devstack deployment, only if we are using libvirt qemu or kvm. Make it conditional. Change-Id: I860e899274646ff73b8f084a0583325239aee9cc --- functions | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/functions b/functions index e687a9848d..c34e4874b3 100644 --- a/functions +++ b/functions @@ -324,7 +324,16 @@ function upload_image { local disk_format="" local container_format="" local unpack="" - local img_property="hw_rng_model=virtio" + local img_property="" + + # NOTE(danms): If we're on libvirt/qemu or libvirt/kvm, set the hw_rng_model + # to libvirt in the image properties. + if [[ "$VIRT_DRIVER" == "libvirt" ]]; then + if [[ "$LIBVIRT_TYPE" == "qemu" || "$LIBVIRT_TYPE" == "kvm" ]]; then + img_property="hw_rng_model=virtio" + fi + fi + case "$image_fname" in *.tar.gz|*.tgz) # Extract ami and aki files