ms-planner: Ignore freely-shareable resources
PATCH 1/3 ms-planner: Ignore freely-shareable resources
Resource shares with no resource_sharing entry are freely shareable and do not need the planning system. Indeed, they currently break the planner.
Signed-off-by Ian Jackson <[email protected]>
--- ms-planner | 6 ++++++ 1 file changed, 6 insertions(+)
ms-planner +6 -0
@@ -71,6 +71,12 @@ sub allocations ($$) { ON owntaskid = taskid WHERE NOT (tasks.type='magic' AND tasks.refkey='allocatable') + AND NOT (resources.restype like 'share-%' + AND NOT EXISTS ( + SELECT 1 FROM resource_sharing sh + WHERE sh.restype = substring(resources.restype from 7) + AND sh.resname = resources.resname + )) END $resources_q->execute(); while (my $row= $resources_q->fetchrow_hashref()) {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 2/3 ms-planner: Improve an error message
Signed-off-by Ian Jackson <[email protected]>
--- ms-planner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ms-planner +1 -1
@@ -331,7 +331,7 @@ END my ($reso, $shareix) = ($`, $1); my $share= $currentshare{$reso}; - die Dumper($reskey, $reso, $shareix, + die "BAD SHARE ".Dumper($reskey, $reso, $shareix, $plan->{Allocations}{$reskey}, $currentshare{$reso}) unless !!$share == !!$shareix;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 3/3 sg-report-flight: Avoid some warnings when reporting unexecuted jobs
In reply to Ian JacksonIf no steps in a job are executed, there can be a failure with a synthetic step row, containing a stepno of ''. This causes a perl warning when compared with <=>:
Argument "" isn't numeric in numeric comparison (<=>) at ./sg-report-flight line 774.
Fix this by replacing falseish values with 0.
Bug introduced in 0e09a8b00ec6 "sg-report-flight: Report earlier, earlier step failures".
Signed-off-by Ian Jackson <[email protected]>
--- sg-report-flight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sg-report-flight +1 -1
@@ -774,7 +774,7 @@ END @failures= sort { $a->{DurationEstimate} <=> $b->{DurationEstimate} - or $a->{Step}{stepno} <=> $b->{Step}{stepno} + or ($a->{Step}{stepno} || 0) <=> ($b->{Step}{stepno} || 0) # stepno is sequential only within each job, so strictly # speaking this is not really a valid comparison: we will # usually be comparing failed steps in different jobs. But
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel