From cb9b36c94ba1652cf60e45ae1d96ba7bd41e5710 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Tue, 28 Aug 2012 19:57:54 +0400 Subject: SanISCSIDriver SSH execution fixes. In ssh_execute methon in nova/utils there was a problem with cmd passed to it. From SanISCSIDriver and all other places it is called from cmd is a string. But in ssh_execute method cmd was processed as a list. This can make problems with SanISCSIdriver using. Also it may be useful to pass execute parameter to this SanISCSIDriver class to have the opportunity of overriding _execute method (as it is in VolumeDriver class, that is the root of this class hierarchy). That's why special checking was added. Fixes bug 1070489 Change-Id: I73f74f9d095a2c4316cab88148afe6a0bde44c5b --- nova/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index 015ff915a..5d4863cf7 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -249,7 +249,7 @@ def trycmd(*args, **kwargs): def ssh_execute(ssh, cmd, process_input=None, addl_env=None, check_exit_code=True): - LOG.debug(_('Running cmd (SSH): %s'), ' '.join(cmd)) + LOG.debug(_('Running cmd (SSH): %s'), cmd) if addl_env: raise exception.NovaException(_('Environment not supported over SSH')) @@ -279,7 +279,7 @@ def ssh_execute(ssh, cmd, process_input=None, raise exception.ProcessExecutionError(exit_code=exit_status, stdout=stdout, stderr=stderr, - cmd=' '.join(cmd)) + cmd=cmd) return (stdout, stderr) -- cgit