summaryrefslogtreecommitdiffstats
path: root/nova/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/service.py')
-rw-r--r--nova/service.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/nova/service.py b/nova/service.py
index 60583dcdb..870dd6ceb 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -62,10 +62,11 @@ class Service(object, service.Service):
def _create_service_ref(self):
- self.service_id = db.service_create(None, {'host': self.host,
- 'binary': self.binary,
- 'topic': self.topic,
- 'report_count': 0})
+ service_ref = db.service_create(None, {'host': self.host,
+ 'binary': self.binary,
+ 'topic': self.topic,
+ 'report_count': 0})
+ self.service_id = service_ref['id']
def __getattr__(self, key):
try: