[haizea-commit] r828 - in branches/1.1/src/haizea/core: . scheduler/preparation_schedulers
haizea-commit at mailman.cs.uchicago.edu
haizea-commit at mailman.cs.uchicago.edu
Fri Jul 9 18:31:53 CDT 2010
Author: borja
Date: 2010-07-09 18:31:53 -0500 (Fri, 09 Jul 2010)
New Revision: 828
Modified:
branches/1.1/src/haizea/core/leases.py
branches/1.1/src/haizea/core/scheduler/preparation_schedulers/imagetransfer.py
Log:
- Another fix to image transfer scheduling for ARs
- Added sanity check to make sure image transfers are not scheduled incorrectly.
Modified: branches/1.1/src/haizea/core/leases.py
===================================================================
--- branches/1.1/src/haizea/core/leases.py 2010-07-09 22:07:32 UTC (rev 827)
+++ branches/1.1/src/haizea/core/leases.py 2010-07-09 23:31:53 UTC (rev 828)
@@ -747,7 +747,10 @@
prev_vmrr = vmrr
+ if len(self.preparation_rrs) > 0 and len(self.vm_rrs) > 0:
+ assert self.preparation_rrs[-1].end <= self.vm_rrs[0].start
+
def __estimate_suspend_resume_time(self, rate):
""" Estimate the time to suspend/resume an entire lease
Modified: branches/1.1/src/haizea/core/scheduler/preparation_schedulers/imagetransfer.py
===================================================================
--- branches/1.1/src/haizea/core/scheduler/preparation_schedulers/imagetransfer.py 2010-07-09 22:07:32 UTC (rev 827)
+++ branches/1.1/src/haizea/core/scheduler/preparation_schedulers/imagetransfer.py 2010-07-09 23:31:53 UTC (rev 828)
@@ -296,7 +296,7 @@
# Determine start time
start = self.__get_last_transfer_slot(lease.start.requested, transfer_duration)
- if start < nexttime:
+ if start == None or start < nexttime:
raise NotSchedulableException("Could not schedule the file transfer to complete in time.")
res = {}
@@ -408,9 +408,14 @@
if deadline > hole_start and deadline <= hole_end:
return deadline - required_duration
else:
- return hole_end - required_duration
- return self.transfers[0].start - required_duration
+ return hole_end - required_duration
+ latest = self.transfers[0].start - required_duration
+ if deadline <= self.transfers[0].start:
+ return deadline - required_duration
+ else:
+ return None
+
def __remove_transfers(self, lease):
toremove = []
for t in self.transfers:
More information about the Haizea-commit
mailing list