43
43
and the rest of the service are from lp branches that are
44
44
compatible with the local charm (e.g. stable or next).
46
this_service = {'name': 'ceph-osd'}
47
other_services = [{'name': 'ceph', 'units': 3},
46
this_service = {'name': 'ceph-osd', 'units': 3}
47
other_services = [{'name': 'ceph-mon', 'units': 3},
49
49
{'name': 'keystone'},
50
50
{'name': 'rabbitmq-server'},
60
60
'nova-compute:shared-db': 'mysql:shared-db',
61
61
'nova-compute:amqp': 'rabbitmq-server:amqp',
62
62
'nova-compute:image-service': 'glance:image-service',
63
'nova-compute:ceph': 'ceph:client',
63
'nova-compute:ceph': 'ceph-mon:client',
64
64
'keystone:shared-db': 'mysql:shared-db',
65
65
'glance:shared-db': 'mysql:shared-db',
66
66
'glance:identity-service': 'keystone:identity-service',
67
67
'glance:amqp': 'rabbitmq-server:amqp',
68
'glance:ceph': 'ceph:client',
68
'glance:ceph': 'ceph-mon:client',
69
69
'cinder:shared-db': 'mysql:shared-db',
70
70
'cinder:identity-service': 'keystone:identity-service',
71
71
'cinder:amqp': 'rabbitmq-server:amqp',
72
72
'cinder:image-service': 'glance:image-service',
73
'cinder:ceph': 'ceph:client',
74
'ceph-osd:mon': 'ceph:osd'
73
'cinder:ceph': 'ceph-mon:client',
74
'ceph-osd:mon': 'ceph-mon:osd'
76
76
super(CephOsdBasicDeployment, self)._add_relations(relations)
86
86
'auth-supported': 'none',
87
87
'fsid': '6547bd3e-1397-11e2-82e5-53567c8d32dc',
88
88
'monitor-secret': 'AQCXrnZQwI7KGBAAiPofmKEXKxu5bUzoYLVkbQ==',
89
'osd-reformat': 'yes',
90
'ephemeral-unmount': '/mnt',
91
'osd-devices': '/dev/vdb /srv/ceph'
94
91
# Include a non-existent device as osd-devices is a whitelist,
115
112
self.nova_sentry = self.d.sentry.unit['nova-compute/0']
116
113
self.glance_sentry = self.d.sentry.unit['glance/0']
117
114
self.cinder_sentry = self.d.sentry.unit['cinder/0']
118
self.ceph0_sentry = self.d.sentry.unit['ceph/0']
119
self.ceph1_sentry = self.d.sentry.unit['ceph/1']
120
self.ceph2_sentry = self.d.sentry.unit['ceph/2']
115
self.ceph0_sentry = self.d.sentry.unit['ceph-mon/0']
116
self.ceph1_sentry = self.d.sentry.unit['ceph-mon/1']
117
self.ceph2_sentry = self.d.sentry.unit['ceph-mon/2']
121
118
self.ceph_osd_sentry = self.d.sentry.unit['ceph-osd/0']
119
self.ceph_osd1_sentry = self.d.sentry.unit['ceph-osd/1']
120
self.ceph_osd2_sentry = self.d.sentry.unit['ceph-osd/2']
122
121
u.log.debug('openstack release val: {}'.format(
123
122
self._get_openstack_release()))
124
123
u.log.debug('openstack release str: {}'.format(
214
212
ceph_services = [
216
214
'ceph-mon id=`hostname`',
218
'ceph-osd id={}'.format(u.get_ceph_osd_id_cmd(0)),
219
'ceph-osd id={}'.format(u.get_ceph_osd_id_cmd(1))
221
216
services[self.ceph0_sentry] = ceph_services
222
217
services[self.ceph1_sentry] = ceph_services
234
229
def test_200_ceph_osd_ceph_relation(self):
235
230
"""Verify the ceph-osd to ceph relation data."""
236
u.log.debug('Checking ceph-osd:ceph mon relation data...')
231
u.log.debug('Checking ceph-osd:ceph-mon relation data...')
237
232
unit = self.ceph_osd_sentry
238
relation = ['mon', 'ceph:osd']
233
relation = ['mon', 'ceph-mon:osd']
240
235
'private-address': u.valid_ip
243
238
ret = u.validate_relation_data(unit, relation, expected)
245
message = u.relation_error('ceph-osd to ceph', ret)
240
message = u.relation_error('ceph-osd to ceph-mon', ret)
246
241
amulet.raise_status(amulet.FAIL, msg=message)
248
243
def test_201_ceph0_to_ceph_osd_relation(self):