}
LOANABLE_RESOURCES = MINIMUM_ALLOCATION.keys()
-DB_FILE = '/var/lib/nodemanager/nodemanager.pickle'
+DB_FILE = '/var/lib/nodemanager/database.pickle'
# database object and associated lock
sliver.ensure_created(rec)
# Back door to ensure PLC overrides Ticket in delegation.
elif rec['instantiation'] == 'delegated' and sliver._get_class() != None:
- # if the ticket has been delivered and the nm-contoroller started the slice
+ # if the ticket has been delivered and the nm-controller started the slice
# update rspecs and keep them up to date.
if sliver.is_running():
logger.verbose ("database: sync : ensure_create'ing 'delegated' sliver %s"%name)
db_pickle = cPickle.dumps(db, cPickle.HIGHEST_PROTOCOL)
dump_requested = False
db_lock.release()
- try: tools.write_file(DB_FILE, lambda f: f.write(db_pickle))
- except: logger.log_exc("database: failed in database.start.run")
+ try:
+ tools.write_file(DB_FILE, lambda f: f.write(db_pickle))
+ logger.log_database(db)
+ except:
+ logger.log_exc("database.start: failed to pickle/dump")
global db
try:
f = open(DB_FILE)
except:
logger.log_exc("database: failed in start")
db = Database()
+ logger.log('database.start')
tools.as_daemon_thread(run)