ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject ambari git commit: AMBARI-17634. Logfeeder is not starting with non-root agent install (oleewere)
Date Sat, 09 Jul 2016 22:51:00 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 f1d3e39b9 -> 08ee3b546


AMBARI-17634. Logfeeder is not starting with non-root agent install (oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08ee3b54
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08ee3b54
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08ee3b54

Branch: refs/heads/branch-2.4
Commit: 08ee3b5464ed52b02e2add87b5b4806107372ffd
Parents: f1d3e39
Author: oleewere <oleewere@gmail.com>
Authored: Sun Jul 10 00:49:09 2016 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Sun Jul 10 00:50:40 2016 +0200

----------------------------------------------------------------------
 .../LOGSEARCH/0.5.0/package/scripts/logfeeder.py            | 9 +++++----
 .../src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py  | 3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/08ee3b54/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
index 9567db2..cfc6c91 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
@@ -18,7 +18,7 @@ limitations under the License.
 """
 
 import getpass
-from resource_management.core.resources.system import Execute, File
+from resource_management.core.resources.system import Execute
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.check_process_status import check_process_status
 from resource_management.libraries.script.script import Script
@@ -43,9 +43,10 @@ class LogFeeder(Script):
     import params
     env.set_params(params)
     self.configure(env)
-    Execute(format("{sudo} {logfeeder_dir}/run.sh"),
-            environment={'LOGFEEDER_INCLUDE': format('{logsearch_logfeeder_conf}/logfeeder-env.sh')}
-            )
+
+    Execute((format('{logfeeder_dir}/run.sh'),),
+            environment={'LOGFEEDER_INCLUDE': format('{logsearch_logfeeder_conf}/logfeeder-env.sh')},
+            sudo=True)
 
   def stop(self, env, upgrade_type=None):
     import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/08ee3b54/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
index 78e2c5c..15b8ac3 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py
@@ -108,7 +108,8 @@ class TestLogFeeder(RMFTestCase):
                        )
 
     self.configureResourcesCalled()
-    self.assertResourceCalled('Execute', 'ambari-sudo.sh /usr/lib/ambari-logsearch-logfeeder/run.sh',
+    self.assertResourceCalled('Execute', ('/usr/lib/ambari-logsearch-logfeeder/run.sh',),
+                              sudo=True,
                               environment={
                                 'LOGFEEDER_INCLUDE': '/etc/ambari-logsearch-logfeeder/conf/logfeeder-env.sh'}
                               )


Mime
View raw message