chiark / gitweb /
userv setup tested and seems to work
authorIan Jackson <ian@davenant.greenend.org.uk>
Tue, 3 Jul 2007 13:56:52 +0000 (14:56 +0100)
committerIan Jackson <ian@davenant.greenend.org.uk>
Tue, 3 Jul 2007 13:56:52 +0000 (14:56 +0100)
debian/changelog
doc/README.userv
runner/adt-testreport-onepackage
virt-subproc/adt-virt-xenlvm
xen/on-testbed
xen/userv-target

index f34aabc0b63702bb828e69f6f8552268ddc2ed6c..31aaa275debc7646dd63bbec2ab391ac39fc7d2e 100644 (file)
@@ -1,9 +1,11 @@
 autopkgtest (0.9.0~iwj) unstable; urgency=low
 
-  * WIP userv service use by adt-virt-xenlvm.
   * userv service for testbed invocation now provided and
-    at least somewhat tested.
+    at least somewhat tested, and useable by adt-virt-xenlvm.
   * New print-execute-command command for virtualisation servers.
+  * Fix filename pattern bug which can prevent automatic keypair
+    generation (false claim that privkey and pubkey do not match).
+  * New adt_sshauthkeys_hook config variable.
   * Do not demand vg or distro information for initscript to work.
   * autopkgtest-xenlvm now Recommends: lvm2 and debootstrap.
   * pass count= to dd for erasure when lvm_erasebase=true.
index 5d98580e479f13a0287aaf0f0cc4120e88737fb0..8ab93aaf8543dea578a966ca4f6129f23ebe0127 100644 (file)
@@ -14,9 +14,12 @@ To make this feature available:
  * Install userv.
  * Create a group named AdtXenUs containing the users which should
    be able to manipulate and use the testbed.
- * Run adt-xenlvm-setup.  NB that the group can be empty at this
-   point but should exist before setting up the testbed, or the
-   testbed setup will not be correct.
+ * Collect the public ssh key(s) of the user(s) and put them in
+   /etc/autopkgtest/xenlvm_adt_sshauthkeys (this will allow them
+   to ssh to root@testbed).
+ * Run adt-xenlvm-setup.  NB that the contents of the _sshauthkeys
+   file (above) are copied into the testbed by adt-xenlvm-setup;
+   any changes mean that setup needs to be run again.
 
 Typically adt-xenlvm-setup ought to be run periodically anyway to
 make sure that the snapshot doesn't get too out of date.
@@ -26,7 +29,9 @@ Client interface
 ----------------
 
 The service is as invoked as
-  userv [-Ddistro=<distro> -Dnominum=<nominum>] root adt-xenlvm-testbed <act>
+  userv [-Ddistro=<distro> -Dnominum=<nominum>] \
+        [-Dssh_privkey=...|-Dssh_keyident_args=...] \
+       root adt-xenlvm-testbed <act>
 where <act> is either
   with
        Starts adt-xenlvm-with-testbed, prints `y', waits for
index 519e4020518556b92ec467d4dcd62eca3d04ba8f..9b4d83c063a40fc63a551dd3914d566c87cd82d6 100755 (executable)
@@ -227,8 +227,8 @@ xrc adt-run --tmp-dir "$tp"/tmp                             \
  ---                                                   \
  adt-virt-xenlvm                                       \
        $adtvirt_extra_opts                             \
- --                                                    \
        --distro="$distro"                              \
+ --                                                    \
  2>&1 3>&- 4>&-
 
 printf >&3 "%s " $rc
index 0d49876d0804520debfe930b4e5b3701f604c786..08608daba9ad6d6f321bb33b5b1f63dab365ecc3 100755 (executable)
@@ -95,6 +95,7 @@ def parse_args():
                        pe('--userv and --gain-root are not compatible')
                basis = (['userv'] + xargs_userv + xlargs +
                        ['root','adt-xenlvm-testbed'])
+               with_testbed = basis + ['with']
                get_down = subprocess.Popen(basis + ['pon0'],
                        stdin=file('/dev/null'), stdout=subprocess.PIPE,
                        stderr=None)
index 24611fd8f6c9dc751dbf8ed85ae6bc17343010a3..94af6bacb13abff17c2b22d9883998e60e3e4aa9 100755 (executable)
@@ -6,12 +6,12 @@ while test $# -gt $nonoptargs; do shift; done
 : "$1"
 
 case "$1" in
---print-command)       ppfx=echo; shift        ;;
---print0-command)      ppfx=ppfx0; shift       ;;
---)                    shift                   ;;
+--print-command)       ppfx=echo; r=root@; shift       ;;
+--print0-command)      ppfx=ppfx0; r=root@; shift      ;;
+--)                    shift                           ;;
 -*)                    fail "invalid instead-of-command options \`$1'" ;;
 esac
 
 ppfx0 () { for x in "$@"; do printf '%s\0' "$x"; done; }
 
-$ppfx ssh $adt_ssh_keyident_args $adt_guest_ipaddr "$@"
+$ppfx ssh $adt_ssh_keyident_args $r$adt_guest_ipaddr "$@"
index 8ba9d1a50261cbea2aea0f6e090ea84f1b938405..37c2c4e8d708c69df8c4147a36c367f497e6c88c 100755 (executable)
@@ -7,6 +7,22 @@ if test -f /etc/lsb-release; then . /etc/lsb-release; fi
 d="${USERV_U_distro:-$DISTRIB_CODENAME}"
 n="${USERV_U_nominum:-adt}"
 
+for v in ssh_privkey ssh_keyident_args; do
+       eval "
+               if [ \"x\$USERV_U_$v\" != x ]; then
+                       export adt_$v=\"\$USERV_U_$v\"
+               fi
+       "
+done
+
+if [ "x$adt_ssh_privkey$adt_ssh_keyident_args" = x ]; then
+       export adt_ssh_keyident_args=' '
+       # There's no point directing userv callers to use the one in
+       # /root/.ssh/id_dsa_adt* since that one is only readable by
+       # root.  So if they don't specify one we just let them have
+       # whatever the default is.
+fi
+
 nd="${n}_${d}"
 
 case "$nd" in