[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 11/11] mg-allocate: Don't try allocating the same resource for two specs



This is obviously wrong.  In fact it does not work (we bomb out in the
allocation).

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v2: New patch
---
 mg-allocate | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/mg-allocate b/mg-allocate
index 087b14b0..b5dc185e 100755
--- a/mg-allocate
+++ b/mg-allocate
@@ -437,6 +437,16 @@ sub plan () {
                map { [ @$possreqs, $_ ] } @reqlist;
            } @possmatrix;
         }
+        @possmatrix = grep {
+            my $possreqs = $_;
+            my %got;
+            my $ok=1;
+            foreach (@$possreqs) {
+                next if !$got{$_->{Reso}}++;
+                $ok=0; last;
+            }
+            $ok;
+        } @possmatrix;
 
        my $planned;
        my @reqlist;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.