Commit 5b8afc88 authored by David Johnson's avatar David Johnson

Save off the updated ticket after slice config so that we can contact NMs

without waiting for nodes to sync with PLC.
parent c8d4dbc5
......@@ -2017,8 +2017,29 @@ class EmulabSlice(Slice):
# now do the configure
if not self.is_configured:
self._configure()
try:
insertFieldsStr = "(exptidx,pid,eid,slicename,slicemeta," \
"leaseend,plc_idx)"
insertValuesStr = "(%s, %s, %s, %s, %s, %s, %s)"
insertValuesTuple = (self.exptidx,self.pid,self.eid,
self.slicename,self.slicemeta,
time.strftime("%Y-%m-%d %H:%M:%S",
time.gmtime(self.leaseend)),
self.plc.idx)
qstr = "replace into plab_slices " + insertFieldsStr + \
" values " + insertValuesStr
DBQueryFatal(qstr,insertValuesTuple)
pass
except:
print "warning: failure while updating ticket for %s at %s" \
% (self.slicename,self.plc.name)
pass
# save bits regardless of possible db failure
self.is_configured = 1
self._saveSliceStatusBits()
pass
else:
print " Not doing configure for slice %s at %s " \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment