diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-09-07 19:01:30 +0200 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-09-08 16:28:31 +0200 |
commit | b5d5e5774c53b36819faf403b2df82590c6cc8bb (patch) | |
tree | 030719d40a0bd716c90c7370c3c56ed03184f2b3 /devstack | |
parent | 30a9d3357770eee5642034325c0fdb6c83c87997 (diff) | |
download | ironic-b5d5e5774c53b36819faf403b2df82590c6cc8bb.tar.gz |
Change [agent]image_download_source=http
As part of the plan to deprecate the iSCSI deploy interface, changing
this option to a value that will work out-of-box for more deployments.
The standalone CI jobs are switched to http as well, the rest of jobs
are left with swift. The explicit indirect jobs are removed.
Change-Id: Idc56a70478dfe65e9b936006a5355d6b96e536e1
Story: #2008114
Task: #40831
Diffstat (limited to 'devstack')
-rw-r--r-- | devstack/lib/ironic | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 354ffe344..76d36fff2 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -701,7 +701,12 @@ IRONIC_ANSIBLE_SSH_USER=${IRONIC_ANSIBLE_SSH_USER:-} # DevStack deployment, as we do not distribute this generated key to subnodes yet. IRONIC_ANSIBLE_SSH_KEY=${IRONIC_ANSIBLE_SSH_KEY:-$IRONIC_DATA_DIR/ansible_ssh_key} -IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE=${IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE:-swift} +if is_service_enabled swift; then + IRONIC_DEFAULT_DOWNLOAD_SOURCE=swift +else + IRONIC_DEFAULT_DOWNLOAD_SOURCE= +fi +IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE=${IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE:-$IRONIC_DEFAULT_DOWNLOAD_SOURCE} # Functions # --------- @@ -811,7 +816,12 @@ function is_ansible_with_tinyipa { } function is_glance_configuration_required { - is_deployed_by_agent || is_ansible_deploy_enabled || [[ "$IRONIC_CONFIGURE_GLANCE_WITH_SWIFT" == "True" ]] && return 0 + # Always configure if we're asked to + [[ "$IRONIC_CONFIGURE_GLANCE_WITH_SWIFT" == "True" ]] && return 0 + # Do not require swift configuration if using image_download_source!=swift + [[ "$IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE" == "swift" ]] || return 1 + # Otherwise require for direct and ansible deploy + is_deployed_by_agent || is_ansible_deploy_enabled && return 0 return 1 } @@ -1403,7 +1413,9 @@ function configure_ironic { iniset $IRONIC_CONF_FILE agent deploy_logs_storage_backend $IRONIC_DEPLOY_LOGS_STORAGE_BACKEND iniset $IRONIC_CONF_FILE agent deploy_logs_local_path $IRONIC_DEPLOY_LOGS_LOCAL_PATH # Set image_download_source for direct interface - iniset $IRONIC_CONF_FILE agent image_download_source $IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE + if [[ -n "$IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE" ]]; then + iniset $IRONIC_CONF_FILE agent image_download_source $IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE + fi # Configure JSON RPC backend iniset $IRONIC_CONF_FILE DEFAULT rpc_transport $IRONIC_RPC_TRANSPORT iniset $IRONIC_CONF_FILE json_rpc port $IRONIC_JSON_RPC_PORT |