]> xenbits.xensource.com Git - osstest.git/commitdiff
Manual allocation: Provide JobInfo in mg-allocate
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 7 Sep 2015 13:19:24 +0000 (14:19 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Sep 2015 10:31:46 +0000 (11:31 +0100)
Use manual_allocation_base_jobinfo to obtain some information which
will go into `job' in the planner, and show up everywhere.

Put just the request (from the command line) in the Xinfo.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: New patch

mg-allocate

index 14c90883468b71d72a507cbc9b7d1886510d74b6..672d9eca43275c54baf1d39251af3fec4b8e8f4e 100755 (executable)
@@ -269,7 +269,10 @@ sub showposs ($) {
 
 sub plan () {
     my @got;
-    alloc_resources(sub {
+
+    my $info = "manual ".manual_allocation_base_jobinfo();
+
+    alloc_resources(JobInfo => $info, sub {
         my ($plan, $mayalloc) = @_;
 
        @got = ();
@@ -337,7 +340,7 @@ sub plan () {
         foreach my $req (@reqlist) {
             my $book= {
                 Reso => $req->{Reso},
-                Xinfo => "manual",
+                Xinfo => $req->{Ident},
                 Start => $planned->{Start},
                 End => $planned->{Start} + $duration,
             };