Revert "Group cinder-volume services using cluster config"
This reverts commit 2603a774b1
, which
converted cinder to use cluster configuration for stateless services.
While well-intentioned, this causes problems due to the lack of a
proper migration for those backends which are not able to support
ACTIVE-ACTIVE configuration.
Configurations that do not support ACTIVE_ACTIVE driver will have the
volume service fail to start, which will cause a service outage.
Change-Id: I7bf4baaf80e5bb58b5c1cf55a2065f3bc50dbced
Related-Bug: #1945239
This commit is contained in:
parent
86a2708260
commit
c5896a884a
@ -194,18 +194,10 @@ class CinderSubordinateConfigContext(SubordinateConfigContext):
|
||||
any_stateless = any_stateless or stateless
|
||||
|
||||
if stateless:
|
||||
|
||||
cmp_os_release = CompareOpenStackReleases(
|
||||
os_release('cinder-common'))
|
||||
clustering_config = ('cluster' if cmp_os_release >= "ocata"
|
||||
else 'host')
|
||||
|
||||
if 'DEFAULT' in ctxt['sections']:
|
||||
ctxt['sections']['DEFAULT'].append(
|
||||
(clustering_config, service_name()))
|
||||
ctxt['sections']['DEFAULT'].append(('host', service_name()))
|
||||
else:
|
||||
ctxt['sections']['DEFAULT'] = [
|
||||
(clustering_config, service_name())]
|
||||
ctxt['sections']['DEFAULT'] = [('host', service_name())]
|
||||
|
||||
elif any_stateless:
|
||||
log("One or more stateless backends configured but unable to "
|
||||
|
@ -312,23 +312,6 @@ class TestCinderContext(CharmTestCase):
|
||||
|
||||
mock_rel_get.side_effect = fake_rel_get
|
||||
self.relation_get.side_effect = fake_rel_get
|
||||
self.os_release.return_value = 'ocata'
|
||||
|
||||
ctxt = contexts.CinderSubordinateConfigContext(
|
||||
interface='storage-backend',
|
||||
service='cinder',
|
||||
config_file='/etc/cinder/cinder.conf')()
|
||||
|
||||
exp = {'sections': {'DEFAULT': [('cluster', 'cinder')],
|
||||
u'cinder-ceph': [[u'volume_backend_name', u'cinder-ceph'],
|
||||
[u'volume_driver',
|
||||
u'cinder.volume.drivers.rbd.RBDDriver'],
|
||||
[u'rbd_pool', u'cinder-ceph'],
|
||||
[u'rbd_user', u'cinder-ceph']]}}
|
||||
|
||||
self.assertEqual(ctxt, exp)
|
||||
|
||||
self.os_release.return_value = 'newton'
|
||||
|
||||
ctxt = contexts.CinderSubordinateConfigContext(
|
||||
interface='storage-backend',
|
||||
|
Loading…
Reference in New Issue
Block a user