From 7b8ba24c647c218265384c7f84cafb1dddb9219c Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 10 Aug 2016 14:13:40 +0530 Subject: [PATCH] CLOUDSTACK-9452: add python-argparse dependency on el6,7 rpms The patchviasocket script was rewritten in Python from PR #1533 and made assumptions that Python 2.7 would be available. In case of CentOS, python 2.7 may not be available or installed. This change ensures that python-argparse is installed which is used by this script. Expose cmd error in the logs when patch command fails. Signed-off-by: Rohit Yadav --- packaging/centos63/cloud.spec | 1 + packaging/centos7/cloud.spec | 1 + .../cloud/hypervisor/kvm/resource/LibvirtComputingResource.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 583dced7c2ae..6a3a8ddb4925 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -96,6 +96,7 @@ management, and intelligence in CloudStack. %package common Summary: Apache CloudStack common files and scripts Requires: python +Requires: python-argparse Obsoletes: cloud-test < 4.1.0 Obsoletes: cloud-scripts < 4.1.0 Obsoletes: cloud-utils < 4.1.0 diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec index dc9eac769045..975feccd4eae 100644 --- a/packaging/centos7/cloud.spec +++ b/packaging/centos7/cloud.spec @@ -91,6 +91,7 @@ management, and intelligence in CloudStack. %package common Summary: Apache CloudStack common files and scripts Requires: python +Requires: python-argparse Group: System Environment/Libraries %description common The Apache CloudStack files shared between agent and management server diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index eea16ae9531a..2b9aa71cf2f5 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -1239,7 +1239,7 @@ public boolean passCmdLine(final String vmName, final String cmdLine) throws Int command.add("-p", cmdLine.replaceAll(" ", "%")); result = command.execute(); if (result != null) { - s_logger.debug("passcmd failed:" + result); + s_logger.error("passcmd failed:" + result); return false; } return true;