Restart nova-conductor on endpoint changes
The charm looks for endpoint changes and restarts the nova-scheduler when the endpoint changes. However, the nova-conductor also needs to be restarted in order to pick up new endpoints. Closes-Bug: 1968708 Change-Id: I18dee4eb46bd836805e60427c0afc508e2489111
This commit is contained in:
parent
77992a5a48
commit
b13eaf757f
@ -485,7 +485,8 @@ def identity_changed():
|
||||
hookenv.status_set(
|
||||
'active',
|
||||
'Restart complete')
|
||||
ch_host.service_restart('nova-scheduler')
|
||||
for service in ['nova-scheduler', 'nova-conductor']:
|
||||
ch_host.service_restart(service)
|
||||
hookenv.log(("Placement endpoint has changed, requesting nova-compute "
|
||||
"restart"),
|
||||
"INFO")
|
||||
|
@ -1319,7 +1319,8 @@ class NovaCCHooksTests(CharmTestCase):
|
||||
call('ridnapi1'), call('ridnapi3')])
|
||||
configure_https.assert_called_once_with()
|
||||
sleep.assert_called_once_with(73)
|
||||
service_restart.assert_called_once_with('nova-scheduler')
|
||||
service_restart.assert_has_calls([
|
||||
call('nova-scheduler'), call('nova-conductor')])
|
||||
save_endpoint_changed_triggers.assert_called_once_with(['placement'])
|
||||
compute_joined.assert_has_calls([
|
||||
call(rid='ridcomp7', remote_restart=True),
|
||||
|
Loading…
Reference in New Issue
Block a user