Use correct relation key for restarts
The nova-cloud-controller charm set the relation key 'restart_trigger'; this charm was using 'restart_nonce' which obviously never gets set, so the nova-api-metadata service would never actually get restarted when required. Use the correct relation key, fixing remote restart triggers for nova-api-metadata, resolving races in deployment. Change-Id: Ic3dbdd41f87c0362f7f725d0f58458f5239ea093 Closes-Bug: 1547122
This commit is contained in:
parent
21b20ccf14
commit
1fd4c20f5d
@ -226,7 +226,7 @@ def nm_changed():
|
|||||||
# NOTE: nova-api-metadata needs to be restarted
|
# NOTE: nova-api-metadata needs to be restarted
|
||||||
# once the nova-conductor is up and running
|
# once the nova-conductor is up and running
|
||||||
# on the nova-cc units.
|
# on the nova-cc units.
|
||||||
restart_nonce = relation_get('restart_nonce')
|
restart_nonce = relation_get('restart_trigger')
|
||||||
if restart_nonce is not None:
|
if restart_nonce is not None:
|
||||||
db = kv()
|
db = kv()
|
||||||
previous_nonce = db.get('restart_nonce',
|
previous_nonce = db.get('restart_nonce',
|
||||||
|
@ -295,7 +295,7 @@ class TestQuantumHooks(CharmTestCase):
|
|||||||
def _relation_get(key):
|
def _relation_get(key):
|
||||||
data = {
|
data = {
|
||||||
'ca_cert': 'cert',
|
'ca_cert': 'cert',
|
||||||
'restart_nonce': '1111111222222333333',
|
'restart_trigger': '1111111222222333333',
|
||||||
}
|
}
|
||||||
return data.get(key)
|
return data.get(key)
|
||||||
self.relation_get.side_effect = _relation_get
|
self.relation_get.side_effect = _relation_get
|
||||||
@ -317,7 +317,7 @@ class TestQuantumHooks(CharmTestCase):
|
|||||||
def _relation_get(key):
|
def _relation_get(key):
|
||||||
data = {
|
data = {
|
||||||
'ca_cert': 'cert',
|
'ca_cert': 'cert',
|
||||||
'restart_nonce': '1111111222222333333',
|
'restart_trigger': '1111111222222333333',
|
||||||
}
|
}
|
||||||
return data.get(key)
|
return data.get(key)
|
||||||
self.relation_get.side_effect = _relation_get
|
self.relation_get.side_effect = _relation_get
|
||||||
|
Loading…
Reference in New Issue
Block a user