Commit 69c6b8a3 by Shaohe Feng

bug fix: fix 2 bugs for image client

1. missing glance config section

2. missing import keystoneauth1.exceptions
When call glance fail during download image, it will report:
 NameError: global name 'ks_exc' is not defined

Change-Id: I17f25368f3361b4fc20a0eda9d6b2788beaa6362
parent 55ed3e26
......@@ -17,6 +17,7 @@
import six
from keystoneauth1 import exceptions as ks_exc
from keystoneauth1 import loading as ks_loading
from os_service_types import service_types
from oslo_concurrency import lockutils
......@@ -202,6 +202,20 @@ function configure_cyborg_placement {
# testing.
function configure_cyborg_glance {
local section=${1:-glance}
local auth_section=${2:-keystone_authtoken}
iniset $CYBORG_CONF_FILE $section auth_section $auth_section
iniset $CYBORG_CONF_FILE $section auth_type "password"
iniset $CYBORG_CONF_FILE $section auth_url "$KEYSTONE_SERVICE_URI"
iniset $CYBORG_CONF_FILE $section username $section
iniset $CYBORG_CONF_FILE $section password "$SERVICE_PASSWORD"
iniset $CYBORG_CONF_FILE $section user_domain_name "$SERVICE_DOMAIN_NAME"
iniset $CYBORG_CONF_FILE $section project_name "$SERVICE_TENANT_NAME"
iniset $CYBORG_CONF_FILE $section project_domain_name "$SERVICE_DOMAIN_NAME"
iniset $CYBORG_CONF_FILE $section api_servers "$GLANCE_URL"
# configure_cyborg_conductor() - Is used by configure_cyborg().
# Sets conductor specific settings.
function configure_cyborg_conductor {
......@@ -212,6 +226,7 @@ function configure_cyborg_conductor {
# this one is needed for lookup of Cyborg API endpoint via Keystone
configure_auth_for service_catalog
sudo cp $CYBORG_DIR/etc/cyborg/rootwrap.conf $CYBORG_ROOTWRAP_CONF
sudo cp -r $CYBORG_DIR/etc/cyborg/rootwrap.d $CYBORG_CONF_DIR
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment