From 8fa8843dbcbd2677b321710fb8941c9f7341ef77 Mon Sep 17 00:00:00 2001 From: Kien Nguyen Date: Thu, 28 Sep 2017 15:36:33 +0700 Subject: [PATCH] Check glance is enabled or not - Check glance is enabled or not before upload sandbox image to glance. - Remove unused function is_zun_enabled. Change-Id: I426298816e1144c66fd13f21949afdb058bce9cb Closes-Bug: #1650245 --- devstack/lib/zun | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/devstack/lib/zun b/devstack/lib/zun index a07628a55..44b5a6e6b 100644 --- a/devstack/lib/zun +++ b/devstack/lib/zun @@ -86,13 +86,6 @@ fi # Functions # --------- -# Test if any zun services are enabled -# is_zun_enabled -function is_zun_enabled { - [[ ,${ENABLED_SERVICES} =~ ,"zun-" ]] && return 0 - return 1 -} - # cleanup_zun() - Remove residual data files, anything left over from previous # runs that a clean run would need to clean up function cleanup_zun { @@ -133,7 +126,7 @@ function configure_zun { # upload_sandbox_image() - Upload sandbox image to glance function upload_sandbox_image { - if [[ ${ZUN_DRIVER} == "docker" ]]; then + if "${ZUN_DRIVER}" == "docker" && is_service_enabled g-api; then sudo docker pull kubernetes/pause sudo docker save kubernetes/pause | openstack image create kubernetes/pause --public --container-format docker --disk-format raw fi