diff options
author | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-01-18 16:39:26 +0000 |
---|---|---|
committer | Tarmac <> | 2011-01-18 16:39:26 +0000 |
commit | 3fa93adb2047ca2b7333ab52d1d8bf15dfac9852 (patch) | |
tree | 3180f9f99e9f64f7220d0c8d437ec6a5ada00c82 /nova/service.py | |
parent | 8e6684a58eea3ecacdde99e1940d2ae351b8465c (diff) | |
parent | 1dc38833c75d546b1c64d2bcd1f5d9a5bab8836d (diff) | |
download | nova-3fa93adb2047ca2b7333ab52d1d8bf15dfac9852.tar.gz nova-3fa93adb2047ca2b7333ab52d1d8bf15dfac9852.tar.xz nova-3fa93adb2047ca2b7333ab52d1d8bf15dfac9852.zip |
Risk of Regression: This patch don’t modify existing functionlities, but I have added some.
1. nova.db.service.sqlalchemy.model.Serivce (adding a column to database)
2. nova.service ( nova-compute needes to insert information defined by 1 above)
So, db migration is necessary for existing user, but just adding columns.
Diffstat (limited to 'nova/service.py')
-rw-r--r-- | nova/service.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/service.py b/nova/service.py index 8b2a22ce0..a8d52e93b 100644 --- a/nova/service.py +++ b/nova/service.py @@ -80,6 +80,7 @@ class Service(object): self.manager.init_host() self.model_disconnected = False ctxt = context.get_admin_context() + try: service_ref = db.service_get_by_args(ctxt, self.host, @@ -88,6 +89,9 @@ class Service(object): except exception.NotFound: self._create_service_ref(ctxt) + if 'nova-compute' == self.binary: + self.manager.update_service(ctxt, self.host, self.binary) + conn1 = rpc.Connection.instance(new=True) conn2 = rpc.Connection.instance(new=True) if self.report_interval: |