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

[Xen-devel] [OSSTEST PATCH 27/29] Manual allocation: Provide JobInfo in mg-allocate



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@xxxxxxxxxxxxx>
---
v2: New patch
---
 mg-allocate |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mg-allocate b/mg-allocate
index 14c9088..672d9ec 100755
--- a/mg-allocate
+++ b/mg-allocate
@@ -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,
             };
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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