Update tests to not set `fsid` and `monitor-secret`

Get `fsid` from leader settings on ceph-mon unit where needed
for validation.

Change-Id: I751ecff76873a599c0d03ec1308e30e615e38aa8
Related-Bug: #1698154
This commit is contained in:
Frode Nordahl 2018-06-06 09:59:32 +02:00
parent 94b4a52c70
commit 1f68a5874e
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
1 changed files with 10 additions and 6 deletions

View File

@ -115,8 +115,6 @@ class CephOsdBasicDeployment(OpenStackAmuletDeployment):
ceph_config = {
'monitor-count': '3',
'auth-supported': 'none',
'fsid': '6547bd3e-1397-11e2-82e5-53567c8d32dc',
'monitor-secret': 'AQCXrnZQwI7KGBAAiPofmKEXKxu5bUzoYLVkbQ==',
}
# Include a non-existent device as osd-devices is a whitelist,
@ -322,13 +320,14 @@ class CephOsdBasicDeployment(OpenStackAmuletDeployment):
"""Verify the ceph0 to ceph-osd relation data."""
u.log.debug('Checking ceph0:ceph-osd mon relation data...')
unit = self.ceph0_sentry
(fsid, _) = unit.run('leader-get fsid')
relation = ['osd', 'ceph-osd:mon']
expected = {
'osd_bootstrap_key': u.not_null,
'private-address': u.valid_ip,
'auth': u'none',
'ceph-public-address': u.valid_ip,
'fsid': u'6547bd3e-1397-11e2-82e5-53567c8d32dc'
'fsid': fsid,
}
ret = u.validate_relation_data(unit, relation, expected)
@ -340,13 +339,14 @@ class CephOsdBasicDeployment(OpenStackAmuletDeployment):
"""Verify the ceph1 to ceph-osd relation data."""
u.log.debug('Checking ceph1:ceph-osd mon relation data...')
unit = self.ceph1_sentry
(fsid, _) = unit.run('leader-get fsid')
relation = ['osd', 'ceph-osd:mon']
expected = {
'osd_bootstrap_key': u.not_null,
'private-address': u.valid_ip,
'auth': u'none',
'ceph-public-address': u.valid_ip,
'fsid': u'6547bd3e-1397-11e2-82e5-53567c8d32dc'
'fsid': fsid,
}
ret = u.validate_relation_data(unit, relation, expected)
@ -358,13 +358,14 @@ class CephOsdBasicDeployment(OpenStackAmuletDeployment):
"""Verify the ceph2 to ceph-osd relation data."""
u.log.debug('Checking ceph2:ceph-osd mon relation data...')
unit = self.ceph2_sentry
(fsid, _) = unit.run('leader-get fsid')
relation = ['osd', 'ceph-osd:mon']
expected = {
'osd_bootstrap_key': u.not_null,
'private-address': u.valid_ip,
'auth': u'none',
'ceph-public-address': u.valid_ip,
'fsid': u'6547bd3e-1397-11e2-82e5-53567c8d32dc'
'fsid': fsid,
}
ret = u.validate_relation_data(unit, relation, expected)
@ -375,6 +376,9 @@ class CephOsdBasicDeployment(OpenStackAmuletDeployment):
def test_300_ceph_osd_config(self):
"""Verify the data in the ceph config file."""
u.log.debug('Checking ceph config file data...')
mon_unit = self.ceph0_sentry
(fsid, _) = mon_unit.run('leader-get fsid')
unit = self.ceph_osd_sentry
conf = '/etc/ceph/ceph.conf'
expected = {
@ -382,7 +386,7 @@ class CephOsdBasicDeployment(OpenStackAmuletDeployment):
'auth cluster required': 'none',
'auth service required': 'none',
'auth client required': 'none',
'fsid': '6547bd3e-1397-11e2-82e5-53567c8d32dc',
'fsid': fsid,
'log to syslog': 'false',
'err to syslog': 'false',
'clog to syslog': 'false'