Skip to content

Commit

Permalink
bug 1381704 - update cassandra db with sequence when upgrading from e…
Browse files Browse the repository at this point in the history
…arlier version

Change-Id: Ic39a4e1fc46c5259f3a5de69e778ac1352dc034d
  • Loading branch information
Deepinder Setia committed Oct 16, 2014
1 parent 390c81f commit 9cd6aba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/discovery/disc_server.py
Expand Up @@ -425,6 +425,10 @@ def api_publish(self, end_point = None):
}
self._db_conn.insert_service(service_type, sig, entry)

# handle upgrade
if 'sequence' not in entry:
entry['sequence'] = str(int(time.time())) + socket.gethostname()

entry['info'] = info
entry['admin_state'] = 'up'
entry['heartbeat'] = int(time.time())
Expand Down

0 comments on commit 9cd6aba

Please sign in to comment.