1 heat_template_version: ocata
9 description: Mapping of service_name -> network name. Typically set
10 via parameter_defaults in the resource registry. This
11 mapping overrides those in ServiceNetMapDefaults.
18 description: Mapping of service endpoint -> protocol. Typically set
19 via parameter_defaults in the resource registry.
21 MonitoringSubscriptionCephOsd:
22 default: 'overcloud-ceph-osd'
24 CephValidationRetries:
27 description: Number of retry attempts for Ceph validation
31 description: Interval (in seconds) in between validation checks
32 IgnoreCephUpgradeWarnings:
35 description: If enabled, Ceph upgrade will be forced even though cluster or PGs status is not clean
39 description: Do not use deprecated params, they will be removed.
41 - IgnoreCephUpgradeWarnings
45 type: ./ceph-base.yaml
47 ServiceNetMap: {get_param: ServiceNetMap}
48 DefaultPasswords: {get_param: DefaultPasswords}
49 EndpointMap: {get_param: EndpointMap}
53 description: Role data for the Cinder OSD service.
55 service_name: ceph_osd
56 monitoring_subscription: {get_param: MonitoringSubscriptionCephOsd}
59 - get_attr: [CephBase, role_data, config_settings]
60 - tripleo.ceph_osd.firewall_rules:
65 include ::tripleo::profile::base::ceph::osd
68 tags: step1,validation
69 shell: ceph health | grep -qv HEALTH_ERR
72 shell: ls /var/lib/ceph/osd | awk 'BEGIN { FS = "-" } ; { print $2 }'
74 # "so that mirrors aren't rebalanced as if the OSD died" - gfidente / leseb
75 - name: ceph osd set noout
77 command: ceph osd set noout
78 - name: ceph osd set norebalance
80 command: ceph osd set norebalance
81 - name: ceph osd set nodeep-scrub
83 command: ceph osd set nodeep-scrub
84 - name: ceph osd set noscrub
86 command: ceph osd set noscrub
90 name: ceph-osd@{{ item }}
92 with_items: "{{osd_ids.stdout.strip().split()}}"
93 - name: Update Ceph packages
101 name: ceph-osd@{{ item }}
103 with_items: "{{osd_ids.stdout.strip().split()}}"
104 # with awk we are meant to check if $2 and $4 are *the same* but it returns 1 when
105 # they are, so the check is inverted to produce an useful exit code
106 - name: Wait for clean pgs...
107 tags: step1,ceph_pgs_clean_validation
109 ignore_warnings: {get_param: IgnoreCephUpgradeWarnings}
111 ceph pg stat | awk '{exit($2!=$4)}' && ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
112 register: ceph_pgs_healthcheck
113 until: ceph_pgs_healthcheck.rc == 0
114 retries: {get_param: CephValidationRetries}
115 delay: {get_param: CephValidationDelay}
117 - not ignore_warnings
118 - name: ceph osd unset noout
120 command: ceph osd unset noout
121 - name: ceph osd unset norebalance
123 command: ceph osd unset norebalance
124 - name: ceph osd unset nodeep-scrub
126 command: ceph osd unset nodeep-scrub
127 - name: ceph osd unset noscrub
129 command: ceph osd unset noscrub