diff --git a/devstack/lib/magnum b/devstack/lib/magnum index 4a19e1bbdb..33a2c7f6b8 100644 --- a/devstack/lib/magnum +++ b/devstack/lib/magnum @@ -16,6 +16,7 @@ # - create_magnum_conf # - init_magnum # - magnum_register_image +# - magnum_configure_flavor # - start_magnum # - configure_iptables_magnum # - configure_apache_magnum @@ -273,7 +274,7 @@ function magnum_register_image { local atomic="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -io 'atomic' || true;)" if [ ! -z "$atomic" ]; then - magnum_image_property=$magnum_image_property"fedora-atomic" + magnum_image_property=$magnum_image_property"fedora-atomic --property hw_rng_model=virtio" fi local ubuntu="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -io "ubuntu" || true;)" if [ ! -z "$ubuntu" ]; then @@ -307,6 +308,16 @@ function magnum_register_image { openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT --os-image-api-version 2 image set $image_name $magnum_image_property } +#magnum_configure_flavor - set hw_rng property for flavor to address the potential entropy issue +function magnum_configure_flavor { + local magnum_flavor_property="--property hw_rng:allowed=True --property hw_rng:rate_bytes=1024 --property hw_rng:rate_period=1" + + local FLAVOR_LIST=$(openstack --os-url $NOVA_SERVICE_PROTOCOL://$NOVA_HOSTPORT --os-compute-api-version 2.1 flavor list -c Name -f value) + for flavor in ${FLAVOR_LIST}; do + openstack --os-url $NOVA_SERVICE_PROTOCOL://$NOVA_HOSTPORT --os-compute-api-version 2.1 flavor set $flavor $magnum_flavor_property + done +} + # install_magnumclient() - Collect source and prepare function install_magnumclient { if use_library_from_git "python-magnumclient"; then diff --git a/devstack/plugin.sh b/devstack/plugin.sh index bfbd8d5176..2006f9d188 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -13,7 +13,7 @@ if is_service_enabled magnum-api magnum-cond; then echo_summary "Installing magnum" install_magnum - MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://download.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-27-20180419.0/CloudImages/x86_64/images/Fedora-Atomic-27-20180419.0.x86_64.qcow2"} + MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://dl.fedoraproject.org/pub/alt/atomic/stable/Fedora-29-updates-20190820.0/AtomicHost/x86_64/images/Fedora-AtomicHost-29-20190820.0.x86_64.qcow2"} IMAGE_URLS+=",${MAGNUM_GUEST_IMAGE_URL}" LIBS_FROM_GIT="${LIBS_FROM_GIT},python-magnumclient" @@ -35,6 +35,7 @@ if is_service_enabled magnum-api magnum-cond; then # Initialize magnum init_magnum magnum_register_image + magnum_configure_flavor # Start the magnum API and magnum taskmgr components echo_summary "Starting magnum" diff --git a/magnum/tests/contrib/gate_hook.sh b/magnum/tests/contrib/gate_hook.sh index 9837489bc5..d7347e10c6 100755 --- a/magnum/tests/contrib/gate_hook.sh +++ b/magnum/tests/contrib/gate_hook.sh @@ -88,8 +88,8 @@ elif [ "${coe}${special}" = "k8s-ironic" ]; then export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_DISK=10" export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=5" else - export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='${NODEPOOL_ATOMIC_MIRROR}/atomic/stable/Fedora-Atomic-27-20180419.0/CloudImages/x86_64/images/Fedora-Atomic-27-20180419.0.x86_64.qcow2'" - export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='Fedora-Atomic-27-20180419.0.x86_64'" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='${NODEPOOL_ATOMIC_MIRROR}/atomic/stable/Fedora-29-updates-20190820.0/AtomicHost/x86_64/images/Fedora-AtomicHost-29-20190820.0.x86_64.qcow2'" + export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='Fedora-AtomicHost-29-20190820.0.x86_64'" fi # Enable magnum plugin in the last step