This is an automated email from the ASF dual-hosted git repository.
aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new fcd53d1 AMBARI-25005. Ambari hides information about cred_store
generation failures. Resulting in confusing errors at later stages (aonishuk)
fcd53d1 is described below
commit fcd53d1383c5d66cca173eeb8f83986b7a921901
Author: Andrew Onishuk <[email protected]>
AuthorDate: Thu Dec 6 13:13:28 2018 +0200
AMBARI-25005. Ambari hides information about cred_store generation
failures. Resulting in confusing errors at later stages (aonishuk)
---
.../src/main/python/ambari_agent/CustomServiceOrchestrator.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index 0ea3656..13829f9 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -30,11 +30,12 @@ import ambari_simplejson as json
from collections import defaultdict
from ConfigParser import NoOptionError
-from ambari_commons import shell, subprocess32
+from ambari_commons import shell
from ambari_commons.constants import AGENT_TMP_DIR
from resource_management.libraries.functions.log_process_information import
log_process_information
from resource_management.core.utils import PasswordString
from resource_management.core.encryption import ensure_decrypted
+from resource_management.core import shell as rmf_shell
from ambari_agent.models.commands import AgentCommand
from ambari_agent.Utils import Utils
@@ -305,8 +306,7 @@ class CustomServiceOrchestrator(object):
cmd = (java_bin, '-cp', cs_lib_path, self.credential_shell_cmd,
'create',
alias, '-value', protected_pwd, '-provider', provider_path)
logger.info(cmd)
- cmd_result = subprocess32.call(cmd)
- logger.info('cmd_result = {0}'.format(cmd_result))
+ rmf_shell.checked_call(cmd)
os.chmod(file_path, 0644) # group and others should have read access
so that the service user can read
# Add JCEKS provider path instead
config[self.CREDENTIAL_PROVIDER_PROPERTY_NAME] = provider_path