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

[Xen-devel] [OSSTEST PATCH 3/4] Fix mg-hosts mkpxedir



 * Have selecthost no longer demand that $job is set; if it is not,
   simply do not set Suite (which of course ultimately comes from
   runvars and hence the job).

 * Add missing use Osstest::TestSupport.

 * Mention the need to run it in README.dev.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/TestSupport.pm |    5 ++++-
 README.dev             |    2 ++
 mg-hosts               |    9 +++++----
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index fea54d5..1d77933 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -751,8 +751,11 @@ sub selecthost ($) {
         Name => $name,
         TcpCheckPort => 22,
         Info => [],
-        Suite => get_runvar_default("${ident}_suite",$job,$c{DebianSuite}),
     };
+    if (defined $job) {
+       $ho->{Suite} = get_runvar_default("${ident}_suite",$job,
+                                         $c{DebianSuite});
+    }
 
     #----- calculation of the host's properties -----
 
diff --git a/README.dev b/README.dev
index d99c5c7..eb72659 100644
--- a/README.dev
+++ b/README.dev
@@ -42,6 +42,8 @@ $ mg-hosts setprops marilith-n4 -- dhcp-watch-method 'leases 
dhcp3 dns-cam1.uk.x
 Handles multiple hosts:
 $ mg-hosts setprops HOSTA HOSTB -- "PROP" "VALUE"
 
+$ mg-hosts mkpxedir HOSTA HOSTB
+
 Create a flight:
 $ FLIGHT=`OSSTEST_CONFIG=production-config ./cs-flight-create commission 
xen-unstable`
 $ echo $FLIGHT
diff --git a/mg-hosts b/mg-hosts
index c9d31df..2643548 100755
--- a/mg-hosts
+++ b/mg-hosts
@@ -85,6 +85,7 @@
 use strict qw(vars refs);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
 csreadconfig();
 
@@ -110,10 +111,10 @@ sub cmd_mkpxedir () {
         system_checked(<<END);
             set -e
            cd $ho->{Tftp}{Path}$ho->{Tftp}{PxeDir}
-            sudo chown root.$ho->{Tftp}{PxeGroup} $macdir
-            sudo chmod 2775 $macdir
-            sudo rm -f $hn
-            sudo ln -s $macdir $hn
+            $sudo chown root.$ho->{Tftp}{PxeGroup} $macdir
+            $sudo chmod 2775 $macdir
+            $sudo rm -f $hn
+            $sudo ln -s $macdir $hn
             ls -ald $hn $macdir
 END
     }
-- 
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®.