Only enable the default backend for ocata+
When deploying on icehouse with Ceph, the RBD backend is configured globally, but cinder sets enabled_backends to "LVM", which exists (and is wrong to boot). This commit moves the check for empty "backends" under the ocata check. Per comment #5 on LP:1719742: "The cinder-volume service fails to start in ocata+ if enable-backends is not set." Closes-Bug: #1753611 Change-Id: I07a9f9c739064bc93870a1f8f68a7624b7ce3033 Signed-off-by: Craige McWhirter <craige@mcwhirter.io>
This commit is contained in:
parent
e373d9ea13
commit
8369ea875c
|
@ -144,9 +144,9 @@ class StorageBackendContext(OSContextGenerator):
|
|||
backends.append('CEPH')
|
||||
if enable_lvm():
|
||||
backends.append('LVM')
|
||||
# Use the package default backend to stop the service flapping.
|
||||
if not backends:
|
||||
backends = ['LVM']
|
||||
# Use the package default backend to stop the service flapping.
|
||||
if not backends:
|
||||
backends = ['LVM']
|
||||
return {
|
||||
'active_backends': backends,
|
||||
'backends': ",".join(backends)}
|
||||
|
|
|
@ -118,7 +118,7 @@ class TestCinderContext(CharmTestCase):
|
|||
self.os_release.return_value = 'havana'
|
||||
self.assertEqual(
|
||||
contexts.StorageBackendContext()(),
|
||||
{'active_backends': ['LVM'], 'backends': 'LVM'})
|
||||
{'active_backends': [], 'backends': ''})
|
||||
|
||||
def test_storage_backend_single_backend(self):
|
||||
rel_dict = {
|
||||
|
|
Loading…
Reference in New Issue