summaryrefslogtreecommitdiff
path: root/morphlib/exts/kvm.check
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-04-14 12:35:26 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-04-15 12:03:51 +0300
commite0eb010bbe8fdb2ee4b5607d9a5288a078fcb1b0 (patch)
treee4bac1026c14a08dc64ee7af3c6a3cc3a2d34b0f /morphlib/exts/kvm.check
parentc0ecac7662235a66adca1c483f1a170c8a479bd0 (diff)
downloadmorph-e0eb010bbe8fdb2ee4b5607d9a5288a078fcb1b0.tar.gz
deploy: Share SSH connectivity check in the common writeexts.py code
Also, change it to log the real error message in morph.log before raising a more general exception to the user.
Diffstat (limited to 'morphlib/exts/kvm.check')
-rwxr-xr-xmorphlib/exts/kvm.check5
1 files changed, 1 insertions, 4 deletions
diff --git a/morphlib/exts/kvm.check b/morphlib/exts/kvm.check
index 04c25069..6ce52e7e 100755
--- a/morphlib/exts/kvm.check
+++ b/morphlib/exts/kvm.check
@@ -40,10 +40,7 @@ class KvmPlusSshCheckExtension(morphlib.writeexts.WriteExtension):
location = args[0]
ssh_host, vm_name, vm_path = self.check_and_parse_location(location)
- try:
- cliapp.ssh_runcmd(ssh_host, ['true'])
- except cliapp.AppException:
- raise cliapp.AppException('Unable to SSH to %s' % ssh_host)
+ self.check_ssh_connectivity(ssh_host)
def check_and_parse_location(self, location):
'''Check and parse the location argument to get relevant data.'''