From d331fa7a2d027e98c08aba442c05ba54abc7d6d8 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Mon, 29 Jul 2019 10:42:24 +0000 Subject: [PATCH] Set cinder's my_ip based on SERVICE_IP_VERSION value Devstack's lib/cinder set the my_ip on cinder side but it hard-code it with HOST_IP[1]. It is no issue for IPv4 env but when you build or run the IPv6 job then this ip is left to set with IPv6. my_ip should be set to HOST_IP or HOST_IPV6 based on SERVICE_IP_VERSION value. As part of Train community goal 'Support IPv6-Only Deployments', we will expand the 'devstack-tempest-ipv6' job to do IPv6-only deployments verification so we need fix the the my_ip setting. Closes-Bug: #1838250 Depends-On: https://review.opendev.org/#/c/677524/ [1]https://github.com/openstack/devstack/blob/6aeaceb0c4ef078d028fb6605cac2a37444097d8/lib/cinder#L231 Change-Id: I71c74e46467a5d3c1bf9c7d683f364cba7cf9d80 --- lib/cinder | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/cinder b/lib/cinder index 32e38c44da..fd960535d9 100644 --- a/lib/cinder +++ b/lib/cinder @@ -228,8 +228,11 @@ function configure_cinder { iniset $CINDER_CONF DEFAULT osapi_volume_listen $CINDER_SERVICE_LISTEN_ADDRESS iniset $CINDER_CONF DEFAULT state_path $CINDER_STATE_PATH iniset $CINDER_CONF oslo_concurrency lock_path $CINDER_STATE_PATH - iniset $CINDER_CONF DEFAULT my_ip "$HOST_IP" - + if [[ $SERVICE_IP_VERSION == 6 ]]; then + iniset $CINDER_CONF DEFAULT my_ip "$HOST_IPV6" + else + iniset $CINDER_CONF DEFAULT my_ip "$HOST_IP" + fi iniset $CINDER_CONF key_manager backend cinder.keymgr.conf_key_mgr.ConfKeyManager iniset $CINDER_CONF key_manager fixed_key $(openssl rand -hex 16)