Merge "Remove unnecessary unset for project-scoped token in glance"

This commit is contained in:
Zuul 2021-12-01 11:27:33 +00:00 committed by Gerrit Code Review
commit 1414bcfa22

View File

@ -288,24 +288,17 @@ function configure_glance_store {
function configure_glance_quotas { function configure_glance_quotas {
# NOTE(danms): We need to have some of the OS_ things unset in # Registered limit resources in keystone are system-specific resources.
# order to use system scope, which is required for creating these # Make sure we use a system-scoped token to interact with this API.
# limits. This is a hack, but I dunno how else to get osc to use
# system scope.
bash -c "unset OS_USERNAME OS_TENANT_NAME OS_PROJECT_NAME; openstack --os-cloud devstack-system-admin registered limit create --service glance \
openstack --os-cloud devstack-system-admin registered limit create \ --default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL --region $REGION_NAME image_size_total
--service glance --default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL \ openstack --os-cloud devstack-system-admin registered limit create --service glance \
--region $REGION_NAME image_size_total; \ --default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL --region $REGION_NAME image_stage_total
openstack --os-cloud devstack-system-admin registered limit create \ openstack --os-cloud devstack-system-admin registered limit create --service glance \
--service glance --default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL \ --default-limit 100 --region $REGION_NAME image_count_total
--region $REGION_NAME image_stage_total; \ openstack --os-cloud devstack-system-admin registered limit create --service glance \
openstack --os-cloud devstack-system-admin registered limit create \ --default-limit 100 --region $REGION_NAME image_count_uploading
--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 # Tell glance to use these limits
iniset $GLANCE_API_CONF DEFAULT use_keystone_limits True iniset $GLANCE_API_CONF DEFAULT use_keystone_limits True