Browse Source

Ceph update and upgrade in config-download era

Correct playbook selection is now done automatically using
external_update_tasks and external_upgrade_tasks. The
CephAnsiblePlaybook is still usable and highest priority if set to
something else than the default. It can also be set to [] to
completely skip ceph-ansible playbook execution.

Closes-Bug: #1783949
Change-Id: If7955b31eda432dd61331281ad3d8f25a335fdfe
Depends-On: Ifdf5f1175849f79b98c76b4bcdef2a70f8f1fedb
changes/21/583321/9
Jiri Stransky 4 years ago
parent
commit
20f614ba9a
  1. 29
      docker/services/ceph-ansible/ceph-base.yaml
  2. 2
      docker/services/ceph-ansible/ceph-client.yaml
  3. 2
      docker/services/ceph-ansible/ceph-external.yaml
  4. 2
      docker/services/ceph-ansible/ceph-mds.yaml
  5. 2
      docker/services/ceph-ansible/ceph-mgr.yaml
  6. 2
      docker/services/ceph-ansible/ceph-mon.yaml
  7. 2
      docker/services/ceph-ansible/ceph-nfs.yaml
  8. 2
      docker/services/ceph-ansible/ceph-osd.yaml
  9. 2
      docker/services/ceph-ansible/ceph-rbdmirror.yaml
  10. 2
      docker/services/ceph-ansible/ceph-rgw.yaml
  11. 4
      environments/ceph-ansible/ceph-ansible.yaml
  12. 1
      environments/lifecycle/ffwd-upgrade-converge.yaml
  13. 1
      environments/lifecycle/update-converge.yaml
  14. 1
      environments/lifecycle/upgrade-converge.yaml

29
docker/services/ceph-ansible/ceph-base.yaml

@ -49,8 +49,12 @@ parameters:
List of server hostnames to blacklist from any triggered deployments.
CephAnsiblePlaybook:
type: comma_delimited_list
description: List of paths to the ceph-ansible playbooks to execute
default: ['/usr/share/ceph-ansible/site-docker.yml.sample']
description: >
List of paths to the ceph-ansible playbooks to execute. If not
specified, the playbook will be determined automatically
depending on type of operation being performed
(deploy/update/upgrade).
default: ['default']
CephAnsibleExtraConfig:
type: json
description: Extra vars for the ceph-ansible playbook
@ -427,9 +431,18 @@ outputs:
- '-i'
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
- '{{playbook_dir}}/ceph-ansible/nodes_uuid_playbook.yml'
- name: set ceph-ansible verbosity
- name: set ceph-ansible params from Heat
set_fact:
ceph_ansible_playbook_verbosity: {get_param: CephAnsiblePlaybookVerbosity}
ceph_ansible_playbooks_param: {get_param: CephAnsiblePlaybook}
- name: set ceph-ansible playbooks
set_fact:
ceph_ansible_playbooks: >
{%- if ceph_ansible_playbooks_param != ['default'] -%}
{{ ceph_ansible_playbooks_param }}
{%- else -%}
{{ ceph_ansible_playbooks_default|default(['/usr/share/ceph-ansible/site-docker.yml.sample']) }}
{%- endif -%}
- name: set ceph-ansible command
set_fact:
ceph_ansible_command:
@ -461,5 +474,13 @@ outputs:
- '--extra-vars'
- '@{{playbook_dir}}/ceph-ansible/extra_vars.yml'
- name: run ceph-ansible
with_items: {get_param: CephAnsiblePlaybook}
with_items: "{{ceph_ansible_playbooks}}"
shell: "{{ceph_ansible_command}} {{item}}"
external_update_tasks:
- name: set ceph_ansible_playbooks_default
set_fact:
ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml"]
external_upgrade_tasks:
- name: set ceph_ansible_playbooks_default
set_fact:
ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml"]

2
docker/services/ceph-ansible/ceph-client.yaml

@ -73,4 +73,6 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/clients.yml"
content: "{{ceph_ansible_group_vars_clients|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings: {}

2
docker/services/ceph-ansible/ceph-external.yaml

@ -79,4 +79,6 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/clients.yml"
content: "{{ceph_ansible_group_vars_clients|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings: {}

2
docker/services/ceph-ansible/ceph-mds.yaml

@ -99,6 +99,8 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/mdss.yml"
content: "{{ceph_ansible_group_vars_mdss|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings:
map_merge:
- tripleo.ceph_mds.firewall_rules:

2
docker/services/ceph-ansible/ceph-mgr.yaml

@ -74,6 +74,8 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/mgrs.yml"
content: "{{ceph_ansible_group_vars_mgrs|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings:
map_merge:
- tripleo.ceph_mgr.firewall_rules:

2
docker/services/ceph-ansible/ceph-mon.yaml

@ -92,6 +92,8 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/mons.yml"
content: "{{ceph_ansible_group_vars_mons|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings:
map_merge:
- tripleo.ceph_mon.firewall_rules:

2
docker/services/ceph-ansible/ceph-nfs.yaml

@ -87,6 +87,8 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/nfss.yml"
content: "{{ceph_ansible_group_vars_nfss|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings:
map_merge:
- tripleo.ceph_nfs.firewall_rules:

2
docker/services/ceph-ansible/ceph-osd.yaml

@ -88,6 +88,8 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/osds.yml"
content: "{{ceph_ansible_group_vars_osds|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings:
map_merge:
- tripleo.ceph_osd.firewall_rules:

2
docker/services/ceph-ansible/ceph-rbdmirror.yaml

@ -101,6 +101,8 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/rbdmirrors.yml"
content: "{{ceph_ansible_group_vars_rbdmirrors|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings:
map_merge:
- tripleo.ceph_rbdmirror.firewall_rules:

2
docker/services/ceph-ansible/ceph-rgw.yaml

@ -85,6 +85,8 @@ outputs:
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/rgws.yml"
content: "{{ceph_ansible_group_vars_rgws|to_nice_yaml}}"
external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]}
external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}
config_settings:
map_merge:
- tripleo.ceph_rgw.firewall_rules:

4
environments/ceph-ansible/ceph-ansible.yaml

@ -5,6 +5,10 @@ resource_registry:
OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml
parameter_defaults:
# Ensure that if user overrides CephAnsiblePlaybook via some env
# file, we go back to default when they stop passing their env file.
CephAnsiblePlaybook: ['default']
CinderEnableIscsiBackend: false
CinderEnableRbdBackend: true
CinderBackupBackend: ceph

1
environments/lifecycle/ffwd-upgrade-converge.yaml

@ -2,7 +2,6 @@
# This file is required by the tripleoclient and not expected to be updated
# by the operator. Please use additional -e env.yaml.
parameter_defaults:
CephAnsiblePlaybook: ['/usr/share/ceph-ansible/site-docker.yml.sample']
UpgradeLevelNovaCompute: ''
UpgradeInitCommonCommand: ''
UpgradeInitCommand: ''

1
environments/lifecycle/update-converge.yaml

@ -2,7 +2,6 @@
# This file is required by the tripleoclient and not expected to be updated
# by the operator. Please use additional -e env.yaml for customizations.
parameter_defaults:
CephAnsiblePlaybook: ['/usr/share/ceph-ansible/site-docker.yml.sample']
UpgradeLevelNovaCompute: ''
UpgradeInitCommonCommand: ''
UpgradeInitCommand: ''

1
environments/lifecycle/upgrade-converge.yaml

@ -2,7 +2,6 @@
# This file is required by the tripleoclient and not expected to be updated
# by the operator. Please use additional -e env.yaml.
parameter_defaults:
CephAnsiblePlaybook: ['/usr/share/ceph-ansible/site-docker.yml.sample']
UpgradeLevelNovaCompute: ''
UpgradeInitCommonCommand: ''
UpgradeInitCommand: ''

Loading…
Cancel
Save