1 heat_template_version: pike
9 description: Dictionary packing service data
13 description: Mapping of service_name -> network name. Typically set
14 via parameter_defaults in the resource registry. This
15 mapping overrides those in ServiceNetMapDefaults.
22 description: Role name on which the service is applied
26 description: Parameters specific to the role
30 description: Mapping of service endpoint -> protocol. Typically set
31 via parameter_defaults in the resource registry.
33 MonitoringSubscriptionCephOsd:
34 default: 'overcloud-ceph-osd'
36 CephValidationRetries:
39 description: Number of retry attempts for Ceph validation
43 description: Interval (in seconds) in between validation checks
44 IgnoreCephUpgradeWarnings:
47 description: If enabled, Ceph upgrade will be forced even though cluster or PGs status is not clean
51 description: Do not use deprecated params, they will be removed.
53 - IgnoreCephUpgradeWarnings
57 type: ./ceph-base.yaml
59 ServiceData: {get_param: ServiceData}
60 ServiceNetMap: {get_param: ServiceNetMap}
61 DefaultPasswords: {get_param: DefaultPasswords}
62 EndpointMap: {get_param: EndpointMap}
63 RoleName: {get_param: RoleName}
64 RoleParameters: {get_param: RoleParameters}
68 description: Role data for the Cinder OSD service.
70 service_name: ceph_osd
71 monitoring_subscription: {get_param: MonitoringSubscriptionCephOsd}
74 - get_attr: [CephBase, role_data, config_settings]
75 - tripleo.ceph_osd.firewall_rules:
80 include ::tripleo::profile::base::ceph::osd
83 tags: step1,validation
84 shell: ceph health | grep -qv HEALTH_ERR
87 shell: ls /var/lib/ceph/osd | awk 'BEGIN { FS = "-" } ; { print $2 }'
89 # "so that mirrors aren't rebalanced as if the OSD died" - gfidente / leseb
90 - name: ceph osd set noout
92 command: ceph osd set noout
93 - name: ceph osd set norebalance
95 command: ceph osd set norebalance
96 - name: ceph osd set nodeep-scrub
98 command: ceph osd set nodeep-scrub
99 - name: ceph osd set noscrub
101 command: ceph osd set noscrub
105 name: ceph-osd@{{ item }}
107 with_items: "{{osd_ids.stdout.strip().split()}}"
108 - name: Update Ceph packages
113 - name: Start CephOSD
116 name: ceph-osd@{{ item }}
118 with_items: "{{osd_ids.stdout.strip().split()}}"
119 # with awk we are meant to check if $2 and $4 are *the same* but it returns 1 when
120 # they are, so the check is inverted to produce an useful exit code
121 - name: Wait for clean pgs...
122 tags: step1,ceph_pgs_clean_validation
124 ignore_warnings: {get_param: IgnoreCephUpgradeWarnings}
126 ceph pg stat | awk '{exit($2!=$4)}' && ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
127 register: ceph_pgs_healthcheck
128 until: ceph_pgs_healthcheck.rc == 0
129 retries: {get_param: CephValidationRetries}
130 delay: {get_param: CephValidationDelay}
132 - not ignore_warnings
133 - name: ceph osd unset noout
135 command: ceph osd unset noout
136 - name: ceph osd unset norebalance
138 command: ceph osd unset norebalance
139 - name: ceph osd unset nodeep-scrub
141 command: ceph osd unset nodeep-scrub
142 - name: ceph osd unset noscrub
144 command: ceph osd unset noscrub