Merge "Allow clean service shutdown"
This commit is contained in:
+6
-2
@@ -254,8 +254,12 @@ class Service(service.Service):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
db.service_update(context.get_admin_context(),
|
||||
self.service_id, {'state': 'stopped'})
|
||||
try:
|
||||
db.service_update(context.get_admin_context(),
|
||||
self.service_id, {'state': 'stopped'})
|
||||
except exception.NotFound:
|
||||
LOG.warning('Service stopped that has no database entry.')
|
||||
|
||||
if self.coordinator:
|
||||
try:
|
||||
coordination.LOCK_COORDINATOR.stop()
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an issue where stopping a service would produce unhelpful database traceback if a
|
||||
service entry didn't exist in the database for the service.
|
||||
Reference in New Issue
Block a user