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.
* 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.
----------------
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
--- \
adt-virt-xenlvm \
$adtvirt_extra_opts \
- -- \
--distro="$distro" \
+ -- \
2>&1 3>&- 4>&-
printf >&3 "%s " $rc
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)
: "$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 "$@"
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