You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2017/03/09 16:40:07 UTC
[38/50] [abbrv] ambari git commit: AMBARI-20361 - Stack Upgrade tests
fail during Hive Metastore restart due to missing hive-site.jceks file
(jonathanhurley)
AMBARI-20361 - Stack Upgrade tests fail during Hive Metastore restart due to missing hive-site.jceks file (jonathanhurley)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c5d2d5b0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c5d2d5b0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c5d2d5b0
Branch: refs/heads/branch-dev-logsearch
Commit: c5d2d5b03073215667a3a70989600c5a99bf1e9a
Parents: 6631ad5
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Wed Mar 8 11:00:44 2017 -0500
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Wed Mar 8 13:32:48 2017 -0500
----------------------------------------------------------------------
.../src/main/python/resource_management/core/source.py | 5 +++--
ambari-server/src/test/python/stacks/utils/RMFTestCase.py | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5d2d5b0/ambari-common/src/main/python/resource_management/core/source.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/source.py b/ambari-common/src/main/python/resource_management/core/source.py
index cee6f57..e31f7d6 100644
--- a/ambari-common/src/main/python/resource_management/core/source.py
+++ b/ambari-common/src/main/python/resource_management/core/source.py
@@ -72,16 +72,17 @@ class StaticFile(Source):
basedir = self.env.config.basedir
path = os.path.join(basedir, "files", self.name)
- if not os.path.isfile(path) and not os.path.islink(path):
+ if not sudo.path_isfile(path) and not sudo.path_lexists(path):
raise Fail("{0} Source file {1} is not found".format(repr(self), path))
return self.read_file(path)
+
@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
def read_file(self, path):
- from resource_management.core import sudo
return sudo.read_file(path)
+
@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
def read_file(self, path):
with open(path, "rb") as fp:
http://git-wip-us.apache.org/repos/asf/ambari/blob/c5d2d5b0/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
index 9240d38..7dd3990 100644
--- a/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
+++ b/ambari-server/src/test/python/stacks/utils/RMFTestCase.py
@@ -325,6 +325,7 @@ def StaticFile(name, **kwargs):
with RMFTestCase.env:
from resource_management.core.source import StaticFile
from resource_management.core import sudo
+ sudo.path_isfile = lambda path: True
sudo.read_file = lambda path: 'dummy_output'
return StaticFile(name, **kwargs)