Adjust templating for upgrade scripts.

Cosmetic change to align options within upgrade scripts. E.g:
  openstack overcloud  upgrade converge \
    --overcloud-ssh-user tripleo-admin \
        --templates /usr/share/openstack-tripleo-heat-templates \
      --stack overcloud \
        --disable-validations \
    --deployed-server ...

To this:
  openstack overcloud  upgrade converge \
      --overcloud-ssh-user tripleo-admin \
      --templates /usr/share/openstack-tripleo-heat-templates \
      --stack overcloud \
      --disable-validations \
      --deployed-server ...

Change-Id: Id4944a53a3e29c6a4c40aeec49746bce98c4880f
This commit is contained in:
Yurii Prokulevych 2018-07-19 12:38:47 +02:00
parent 53b40e6fc5
commit 7c0fbc0d3a
3 changed files with 46 additions and 47 deletions

View File

@ -1,7 +1,6 @@
#!/bin/env bash
set -euo pipefail
set -euo pipefail
{% if l3_agent_connectivity_check|bool %}
if [[ -e {{ working_dir }}/l3_agent_start_ping.sh ]]; then
source {{ overcloud_rc }}

View File

@ -27,45 +27,45 @@ bash {{ working_dir }}/fip_http_check_start.sh &
source {{ undercloud_rc }}
echo "[$(date)] Running {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} major {% endif %}upgrade converge step"
openstack overcloud {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgrade {% endif %}converge \
{% if ffu_overcloud_upgrade %}
{% if ffu_overcloud_upgrade -%}
--yes \
{% endif %}
{% if overcloud_ssh_user != '' %}
{% endif -%}
{% if overcloud_ssh_user != '' -%}
--overcloud-ssh-user {{ overcloud_ssh_user }} \
{% endif %}
{% if tripleo_upgrade_debug|bool %}
{% endif -%}
{% if tripleo_upgrade_debug|bool -%}
--debug \
{% endif %}
{% if tripleo_upgrade_validations_non_fatal|bool %}
{% endif -%}
{% if tripleo_upgrade_validations_non_fatal|bool -%}
--validation-errors-nonfatal \
{% endif %}
{% if tripleo_upgrade_converge_plan_only|bool %}
{% endif -%}
{% if tripleo_upgrade_converge_plan_only|bool -%}
--update-plan-only \
{% endif %}
{% endif -%}
--templates {{ tht_directory }} \
--stack {{ overcloud_stack_name }} \
{% if splitstack_deployment|bool %}
{% if splitstack_deployment|bool -%}
--disable-validations \
--deployed-server \
{% endif %}
{% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 %}
{% for _env in initial_env_file.stdout_lines %}
{% endif -%}
{% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 -%}
{% for _env in initial_env_file.stdout_lines -%}
-e {{ _env }} \
{% endfor %}
{% endif %}
{% if ffu_overcloud_upgrade and deployment_with_ha_upstream %}
{% endfor -%}
{% endif -%}
{% if ffu_overcloud_upgrade and deployment_with_ha_upstream -%}
-e {{ tht_directory }}/environments/docker.yaml \
-e {{ tht_directory }}/environments/docker-ha.yaml \
{% endif %}
{% if cli_converted_options|default(false)|bool %}
{% endif -%}
{% if cli_converted_options|default(false)|bool -%}
-e {{working_dir}}/cli_opts_params.yaml \
{% endif %}
{% if ffu_overcloud_upgrade %}
{% endif -%}
{% if ffu_overcloud_upgrade -%}
-e {{ working_dir }}/{{ container_registry_file }} \
{% if ceph_osd_enabled %}
{% if ceph_osd_enabled -%}
-e {{working_dir}}/ceph-ansible-env.yaml \
{% endif %}
{% endif %}
{% endif -%}
{% endif -%}
{% if (not ffu_overcloud_upgrade or roles_data != default_roles_data) %}--roles-file {{ roles_data }}{% endif %} 2>&1

View File

@ -9,39 +9,39 @@ source {{undercloud_rc }}
echo "Running {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} major {% endif %}upgrade prepare step"
openstack overcloud{% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgrade {% endif %}prepare --stack {{ overcloud_stack_name }} \
--templates {{ tht_directory }} \
{% if ffu_overcloud_upgrade %}
{% if ffu_overcloud_upgrade -%}
--yes \
{% endif %}
{% if overcloud_ssh_user != '' %}
{% endif -%}
{% if overcloud_ssh_user != '' -%}
--overcloud-ssh-user {{ overcloud_ssh_user }} \
{% endif %}
{% if tripleo_upgrade_debug|bool %}
{% endif -%}
{% if tripleo_upgrade_debug|bool -%}
--debug \
{% endif %}
{% if tripleo_upgrade_validations_non_fatal|bool %}
{% endif -%}
{% if tripleo_upgrade_validations_non_fatal|bool -%}
--validation-errors-nonfatal \
{% endif %}
{% if splitstack_deployment|bool %}
{% endif -%}
{% if splitstack_deployment|bool -%}
--disable-validations \
--deployed-server \
{% endif %}
{% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 %}
{% for _env in initial_env_file.stdout_lines %}
{% endif -%}
{% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 -%}
{% for _env in initial_env_file.stdout_lines -%}
-e {{ _env }} \
{% endfor %}
{% endif %}
{% if ffu_overcloud_upgrade and deployment_with_ha_upstream %}
{% endfor -%}
{% endif -%}
{% if ffu_overcloud_upgrade and deployment_with_ha_upstream -%}
-e {{ tht_directory }}/environments/docker.yaml \
-e {{ tht_directory }}/environments/docker-ha.yaml \
{% endif %}
{% if cli_converted_options|default(false)|bool %}
{% endif -%}
{% if cli_converted_options|default(false)|bool -%}
-e {{working_dir}}/cli_opts_params.yaml \
{% endif %}
{% if upgrade_remove_rpm|default(false)|bool %}
{% endif -%}
{% if upgrade_remove_rpm|default(false)|bool -%}
-e {{ working_dir }}/remove-packages.yaml \
{% endif %}
{% if upgrade_prepare_extra_params %}
{% endif -%}
{% if upgrade_prepare_extra_params -%}
-e {{ upgrade_prepare_extra_params | join(' -e ') }} \
{% endif %}
{% endif -%}
-e {{ working_dir }}/{{ container_registry_file }} \
{% if (not ffu_overcloud_upgrade or roles_data != default_roles_data) %}--roles-file {{ roles_data }}{% endif %} 2>&1