1 heat_template_version: pike
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: Role name on which the service is applied
22 description: Parameters specific to the role
26 description: Mapping of service endpoint -> protocol. Typically set
27 via parameter_defaults in the resource registry.
29 MonitoringSubscriptionCephOsd:
30 default: 'overcloud-ceph-osd'
32 CephValidationRetries:
35 description: Number of retry attempts for Ceph validation
39 description: Interval (in seconds) in between validation checks
40 IgnoreCephUpgradeWarnings:
43 description: If enabled, Ceph upgrade will be forced even though cluster or PGs status is not clean
47 description: Do not use deprecated params, they will be removed.
49 - IgnoreCephUpgradeWarnings
53 type: ./ceph-base.yaml
55 ServiceNetMap: {get_param: ServiceNetMap}
56 DefaultPasswords: {get_param: DefaultPasswords}
57 EndpointMap: {get_param: EndpointMap}
58 RoleName: {get_param: RoleName}
59 RoleParameters: {get_param: RoleParameters}
63 description: Role data for the Cinder OSD service.
65 service_name: ceph_osd
66 monitoring_subscription: {get_param: MonitoringSubscriptionCephOsd}
69 - get_attr: [CephBase, role_data, config_settings]
70 - tripleo.ceph_osd.firewall_rules:
75 include ::tripleo::profile::base::ceph::osd
78 tags: step1,validation
79 shell: ceph health | grep -qv HEALTH_ERR
82 shell: ls /var/lib/ceph/osd | awk 'BEGIN { FS = "-" } ; { print $2 }'
84 # "so that mirrors aren't rebalanced as if the OSD died" - gfidente / leseb
85 - name: ceph osd set noout
87 command: ceph osd set noout
88 - name: ceph osd set norebalance
90 command: ceph osd set norebalance
91 - name: ceph osd set nodeep-scrub
93 command: ceph osd set nodeep-scrub
94 - name: ceph osd set noscrub
96 command: ceph osd set noscrub
100 name: ceph-osd@{{ item }}
102 with_items: "{{osd_ids.stdout.strip().split()}}"
103 - name: Update Ceph packages
108 - name: Start CephOSD
111 name: ceph-osd@{{ item }}
113 with_items: "{{osd_ids.stdout.strip().split()}}"
114 # with awk we are meant to check if $2 and $4 are *the same* but it returns 1 when
115 # they are, so the check is inverted to produce an useful exit code
116 - name: Wait for clean pgs...
117 tags: step1,ceph_pgs_clean_validation
119 ignore_warnings: {get_param: IgnoreCephUpgradeWarnings}
121 ceph pg stat | awk '{exit($2!=$4)}' && ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
122 register: ceph_pgs_healthcheck
123 until: ceph_pgs_healthcheck.rc == 0
124 retries: {get_param: CephValidationRetries}
125 delay: {get_param: CephValidationDelay}
127 - not ignore_warnings
128 - name: ceph osd unset noout
130 command: ceph osd unset noout
131 - name: ceph osd unset norebalance
133 command: ceph osd unset norebalance
134 - name: ceph osd unset nodeep-scrub
136 command: ceph osd unset nodeep-scrub
137 - name: ceph osd unset noscrub
139 command: ceph osd unset noscrub