Merge "Provide a default value for Ironic cleaning_network configuration"
[apex-tripleo-heat-templates.git] / puppet / services / ceph-osd.yaml
1 heat_template_version: ocata
2
3 description: >
4   Ceph OSD service.
5
6 parameters:
7   ServiceNetMap:
8     default: {}
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.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   MonitoringSubscriptionCephOsd:
22     default: 'overcloud-ceph-osd'
23     type: string
24
25 resources:
26   CephBase:
27     type: ./ceph-base.yaml
28     properties:
29       ServiceNetMap: {get_param: ServiceNetMap}
30       DefaultPasswords: {get_param: DefaultPasswords}
31       EndpointMap: {get_param: EndpointMap}
32
33 outputs:
34   role_data:
35     description: Role data for the Cinder OSD service.
36     value:
37       service_name: ceph_osd
38       monitoring_subscription: {get_param: MonitoringSubscriptionCephOsd}
39       config_settings:
40         map_merge:
41           - get_attr: [CephBase, role_data, config_settings]
42           - tripleo.ceph_osd.firewall_rules:
43               '111 ceph_osd':
44                 dport:
45                   - '6800-7300'
46       step_config: |
47         include ::tripleo::profile::base::ceph::osd
48       upgrade_batch_tasks:
49         - name: Check status
50           tags: step1,validation
51           shell: ceph health | grep -qv HEALTH_ERR
52         - name: Get OSD IDs
53           tags: step1
54           shell: ls /var/lib/ceph/osd | awk 'BEGIN { FS = "-" } ; { print $2 }'
55           register: osd_ids
56           # "so that mirrors aren't rebalanced as if the OSD died" - gfidente / leseb
57         - name: ceph osd set noout
58           tags: step1
59           command: ceph osd set noout
60         - name: ceph osd set norebalance
61           tags: step1
62           command: ceph osd set norebalance
63         - name: ceph osd set nodeep-scrub
64           tags: step1
65           command: ceph osd set nodeep-scrub
66         - name: ceph osd set noscrub
67           tags: step1
68           command: ceph osd set noscrub
69         - name: Stop Ceph OSD
70           tags: step1
71           service: name=ceph-osd@{{ item }} state=stopped
72           with_items: "{{osd_ids.stdout.strip().split()}}"
73         - name: Update ceph OSD packages
74           tags: step1
75           yum: name=ceph-osd state=latest
76         - name: Start ceph-osd service
77           tags: step1
78           service: name=ceph-osd@{{ item }} state=started
79           with_items: "{{osd_ids.stdout.strip().split()}}"
80         - name: ceph osd unset noout
81           tags: step1
82           command: ceph osd unset noout
83         - name: ceph osd unset norebalance
84           tags: step1
85           command: ceph osd unset norebalance
86         - name: ceph osd unset nodeep-scrub
87           tags: step1
88           command: ceph osd unset nodeep-scrub
89         - name: ceph osd unset noscrub
90           tags: step1
91           command: ceph osd unset noscrub