Add storage-backend subordinate relation

Implement initial support for container-scoped storage-backend
relation to integrate nova-compute with storage providers.

Transition to blocked state if multiple storage backend
relations are connected

Change-Id: I03e67731df0263887d2d0f671750f420d6e62c1c
This commit is contained in:
Nikolay Vinogradov 2022-10-12 07:22:51 +03:00 committed by James Page
parent f3bf6be831
commit 31df8c6bf2
2 changed files with 6 additions and 0 deletions

View File

@ -1000,6 +1000,9 @@ def check_optional_config_and_relations(configs):
except ValueError as e:
return ('blocked', 'Invalid configuration: {}'.format(str(e)))
if len(relation_ids('storage-backend')) > 1:
return 'blocked', "Multiple storage backends are not supported"
# return 'unknown' as the lowest priority to not clobber an existing
# status.
return "unknown", ""

View File

@ -54,6 +54,9 @@ requires:
interface: vault-kv
ironic-api:
interface: baremetal
storage-backend:
interface: storage-backend
scope: container
peers:
compute-peer:
interface: nova