mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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 <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
6025f25840
commit
779649f5ee
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user