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:
James Page 2016-07-08 17:46:58 +01:00
parent 21b20ccf14
commit 1fd4c20f5d
2 changed files with 3 additions and 3 deletions

View File

@ -226,7 +226,7 @@ def nm_changed():
# NOTE: nova-api-metadata needs to be restarted
# once the nova-conductor is up and running
# on the nova-cc units.
restart_nonce = relation_get('restart_nonce')
restart_nonce = relation_get('restart_trigger')
if restart_nonce is not None:
db = kv()
previous_nonce = db.get('restart_nonce',

View File

@ -295,7 +295,7 @@ class TestQuantumHooks(CharmTestCase):
def _relation_get(key):
data = {
'ca_cert': 'cert',
'restart_nonce': '1111111222222333333',
'restart_trigger': '1111111222222333333',
}
return data.get(key)
self.relation_get.side_effect = _relation_get
@ -317,7 +317,7 @@ class TestQuantumHooks(CharmTestCase):
def _relation_get(key):
data = {
'ca_cert': 'cert',
'restart_nonce': '1111111222222333333',
'restart_trigger': '1111111222222333333',
}
return data.get(key)
self.relation_get.side_effect = _relation_get