Add ceph minor update step

This change adds the step required for running ceph minor update
with ceph-ansible during the minor update workflow.

Change-Id: I6503f146e31836ed38bf5220149edd73c7f3297a
This commit is contained in:
Marius Cornea 2018-05-29 12:35:29 -04:00
parent 3c02aa0be6
commit 99ecafd3ce
4 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,15 @@
---
- name: run Ceph minor update
shell: |
{{ working_dir }}/ceph-update-run.sh &> {{ working_dir }}/ceph-update-run.log
ignore_errors: true
register: ceph_update_status
- block:
- name: print Ceph update failures
command: tail {{ working_dir }}/ceph-update-run.log
- name: fail Ceph update
fail:
msg: Ceph minor update failed
when: ceph_update_status|failed

View File

@ -68,5 +68,12 @@
mode: 0755
force: true
- name: create ceph update script
template:
src: "ceph-update-run.sh.j2"
dest: "{{ working_dir }}/ceph-update-run.sh"
mode: 0755
force: true
- name: create nova actions check script
include: ../common/create_nova_actions_check_script.yml

View File

@ -72,6 +72,10 @@
bash {{ post_overcloud_update_run_workarounds_script }} &> {{ working_dir }}/post_overcloud_update_run_workarounds.log
when: updates_workarounds|bool
- name: update Ceph
include: ceph_update_run.yml
when: ceph_osd_enabled|bool
- name: apply pre overcloud update converge workarounds
command: "{{working_dir}}/pre_overcloud_update_converge_workarounds.sh"
when: updates_workarounds

View File

@ -0,0 +1,24 @@
#!/bin/env bash
set -euo pipefail
source {{ undercloud_rc }}
echo "[$(date)] Started Ceph minor update step"
openstack overcloud ceph-upgrade run \
--templates {{ tht_directory }} \
--stack {{ overcloud_stack_name }} \
{% 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 cli_converted_options|default(false)|bool %}
-e {{working_dir}}/cli_opts_params.yaml \
{% endif %}
{% if tripleo_upgrade_validations_non_fatal|bool %}
--validation-errors-nonfatal \
{% endif %}
--container-registry-file {{ working_dir }}/{{ container_registry_file }} \
echo "[$(date)] Finished CEPH minor update"