"uvt-kvm wait" fails when the VM is created with --ssh-public-key-file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
uvtool |
Fix Committed
|
High
|
Robie Basak | ||
uvtool (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
uvt-kvm failed while running auto-upgrade-tester from https:/
TEST CASE:
1. $ bzr branch lp:~serge-hallyn/auto-upgrade-testing/uvtool
2. $ cd uvtool
3. Copy the profile ubuntu-
3. Run:
$ python3 bin/auto-
ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: uvtool-libvirt 0~bzr87-0ubuntu1
ProcVersionSign
Uname: Linux 3.13.0-14-generic x86_64
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
CrashCounter: 1
CurrentDesktop: Unity
Date: Mon Mar 3 12:32:51 2014
ExecutablePath: /usr/bin/uvt-kvm
InstallationDate: Installed on 2013-09-03 (180 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130902)
InterpreterPath: /usr/bin/python2.7
PackageArchitec
ProcCmdline: /usr/bin/python /usr/bin/uvt-kvm wait --insecure auto-upgrade-tester
PythonArgs: ['/usr/
SourcePackage: uvtool
Title: uvt-kvm crashed with CalledProcessError in check_call(): Command '[u'ssh', u'-o', u'UserKnownHost
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm autopilot cdrom dip libvirtd lpadmin plugdev sambashare sudo
Related branches
affects: | uvtool (Ubuntu) → uvtool |
summary: |
- uvt-kvm crashed with CalledProcessError in check_call(): Command - '[u'ssh', u'-o', u'UserKnownHostsFile=/dev/null', u'-o', - u'StrictHostKeyChecking=no', u'-o', u'CheckHostIP=no', u'-l', u'ubuntu', - '192.168.122.250', u'env', u'UVTOOL_WAIT_INTERVAL=8.0', - u'UVTOOL_WAIT_TIMEOUT=120.0', u'sh', u'-']' returned non-zero exit - status 255 + uvt-kvm crashed with CalledProcessError in check_call() |
description: | updated |
tags: | removed: need-duplicate-check |
Changed in uvtool (Ubuntu): | |
importance: | Undecided → Medium |
Thanks for reporting this.
I had some difficulty reproducing. To fix, I had to add "--data-dir=share", run with "sudo", and apply the following patch (since base had no trailing slash, the concatenation fails to account for a directory separator). Is this patch a bug that needs fixing in auto-upgrade- tester?
--- bin/auto- upgrade- tester 2014-01-10 09:06:58 +0000 upgrade- tester 2014-03-06 10:02:13 +0000
print( "Using generated profile: %s" % profile)
+++ bin/auto-
@@ -370,7 +370,7 @@
if not "/" in profile:
backend = createBackend( options. backend, profile)
- profile = base + profile
+ profile = os.path.join(base, profile)
try:
if options.login:
When I did reproduce, I saw "Permission denied (publickey)." printed before the traceback. The wait subcommand now uses ssh to check that cloud-init has finished running inside the VM and that the VM is in runlevel 2. So this requires ssh to work, and thus fails when --ssh-public- key-file is used. This is clearly a bug, but I think the only way to fix this is to add options to the wait subcommand so users using --ssh-public- key-file can also supply a new --ssh-private- key-file for wait, or perhaps a --no-ssh option to disable this aspect of wait's functionality. This would also need standard ssh parameters like "-l" to work in the same way as the ssh subcommand, since authentication details may be different.
Finally, uvt-kvm should have printed a straightforward error message instead of a traceback.
I need to add new options to the wait subcommand, and then we'll need to update Serge's MP to use --ssh-private- key-file (or whatever I end up adding).