This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.11 by this push:
new 779649f agent: Avoid sudo, renew certificates assuming root (#2697)
779649f is described below
commit 779649f5ee7ed296c4ad8f2986bd89569bb4af18
Author: Rohit Yadav <[email protected]>
AuthorDate: Fri Jun 8 13:07:34 2018 +0530
agent: Avoid sudo, renew certificates assuming root (#2697)
In some environments running the keystore cert renewal (as root user)
over an already connected agent connection may cause exception
such as: `sudo: sorry, you must have a tty to run sudo`. Since, all
agents - KVM, CPVM and SSVM run as root user, we don't need to run
the renewal scripts with sudo.
Signed-off-by: Rohit Yadav <[email protected]>
---
agent/src/com/cloud/agent/Agent.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/agent/src/com/cloud/agent/Agent.java
b/agent/src/com/cloud/agent/Agent.java
index 8a6c24b..67115e6 100644
--- a/agent/src/com/cloud/agent/Agent.java
+++ b/agent/src/com/cloud/agent/Agent.java
@@ -728,7 +728,7 @@ public class Agent implements HandlerFactory, IAgentControl
{
_shell.setPersistentProperty(null,
KeyStoreUtils.KS_PASSPHRASE_PROPERTY, storedPassword);
}
- Script script = new Script(true, _keystoreSetupPath, 60000, s_logger);
+ Script script = new Script(_keystoreSetupPath, 60000, s_logger);
script.add(agentFile.getAbsolutePath());
script.add(keyStoreFile);
script.add(storedPassword);
@@ -772,7 +772,7 @@ public class Agent implements HandlerFactory, IAgentControl
{
throw new CloudRuntimeException("Unable to save received agent
client and ca certificates", e);
}
- Script script = new Script(true, _keystoreCertImportPath, 60000,
s_logger);
+ Script script = new Script(_keystoreCertImportPath, 60000, s_logger);
script.add(agentFile.getAbsolutePath());
script.add(keyStoreFile);
script.add(KeyStoreUtils.AGENT_MODE);
--
To stop receiving notification emails like this one, please contact
[email protected].