Remove unnecessary unset for project-scoped token in glance
Before, we needed to unset a couple of parameters that would make the client return a project-scoped token instead of a system-scoped token, which we need when interacting with registered limits in keystone. This commit removes those unsets since we no longer source those variables by default. This commit also cleans up some of the redundant parameters in the registered limit calls, like region. Change-Id: I1af8a168a29e895d57504d41e30efea271ea232d
This commit is contained in:
parent
f56f7a557a
commit
afd0f84eae
27
lib/glance
27
lib/glance
@ -288,24 +288,17 @@ function configure_glance_store {
|
||||
|
||||
function configure_glance_quotas {
|
||||
|
||||
# NOTE(danms): We need to have some of the OS_ things unset in
|
||||
# order to use system scope, which is required for creating these
|
||||
# limits. This is a hack, but I dunno how else to get osc to use
|
||||
# system scope.
|
||||
# Registered limit resources in keystone are system-specific resources.
|
||||
# Make sure we use a system-scoped token to interact with this API.
|
||||
|
||||
bash -c "unset OS_USERNAME OS_TENANT_NAME OS_PROJECT_NAME;
|
||||
openstack --os-cloud devstack-system-admin registered limit create \
|
||||
--service glance --default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL \
|
||||
--region $REGION_NAME image_size_total; \
|
||||
openstack --os-cloud devstack-system-admin registered limit create \
|
||||
--service glance --default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL \
|
||||
--region $REGION_NAME image_stage_total; \
|
||||
openstack --os-cloud devstack-system-admin registered limit create \
|
||||
--service glance --default-limit 100 --region $REGION_NAME \
|
||||
image_count_total; \
|
||||
openstack --os-cloud devstack-system-admin registered limit create \
|
||||
--service glance --default-limit 100 --region $REGION_NAME \
|
||||
image_count_uploading"
|
||||
openstack --os-cloud devstack-system-admin registered limit create --service glance \
|
||||
--default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL --region $REGION_NAME image_size_total
|
||||
openstack --os-cloud devstack-system-admin registered limit create --service glance \
|
||||
--default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL --region $REGION_NAME image_stage_total
|
||||
openstack --os-cloud devstack-system-admin registered limit create --service glance \
|
||||
--default-limit 100 --region $REGION_NAME image_count_total
|
||||
openstack --os-cloud devstack-system-admin registered limit create --service glance \
|
||||
--default-limit 100 --region $REGION_NAME image_count_uploading
|
||||
|
||||
# Tell glance to use these limits
|
||||
iniset $GLANCE_API_CONF DEFAULT use_keystone_limits True
|
||||
|
Loading…
x
Reference in New Issue
Block a user