You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/09/09 16:40:23 UTC
[1/2] ambari git commit: AMBARI-13047. Pig service check fails on
kerberized when smokeuser ticket expires (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 a922a53d3 -> 2daebc09f
refs/heads/trunk 40f2ac2f1 -> a6d294740
AMBARI-13047. Pig service check fails on kerberized when smokeuser ticket expires (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a6d29474
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6d29474
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6d29474
Branch: refs/heads/trunk
Commit: a6d2947403eb5ca644ba5f3dbb8c7705a9f108eb
Parents: 40f2ac2
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Sep 9 17:39:52 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Sep 9 17:39:52 2015 +0300
----------------------------------------------------------------------
.../PIG/0.12.0.2.0/package/scripts/service_check.py | 12 +++++-------
.../python/stacks/2.0.6/PIG/test_pig_service_check.py | 3 +++
.../python/stacks/2.2/PIG/test_pig_service_check.py | 7 +++----
3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a6d29474/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
index 66b9772..fc819b8 100644
--- a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
@@ -57,7 +57,11 @@ class PigServiceCheckLinux(PigServiceCheck):
)
params.HdfsResource(None, action="execute")
-
+ if params.security_enabled:
+ kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};")
+ Execute(kinit_cmd,
+ user=params.smokeuser
+ )
File( format("{tmp_dir}/pigSmoke.sh"),
content = StaticFile("pigSmoke.sh"),
@@ -102,12 +106,6 @@ class PigServiceCheckLinux(PigServiceCheck):
if resource_created:
params.HdfsResource(None, action="execute")
- if params.security_enabled:
- kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};")
- Execute(kinit_cmd,
- user=params.smokeuser
- )
-
Execute(format("pig -x tez {tmp_dir}/pigSmoke.sh"),
tries = 3,
try_sleep = 5,
http://git-wip-us.apache.org/repos/asf/ambari/blob/a6d29474/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
index 1b5adab..4a87f4b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
@@ -144,6 +144,9 @@ class TestPigServiceCheck(RMFTestCase):
action = ['execute'],
hadoop_conf_dir = '/etc/hadoop/conf',
)
+ self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa@EXAMPLE.COM;',
+ user = 'ambari-qa',
+ )
self.assertResourceCalled('File', '/tmp/pigSmoke.sh',
content = StaticFile('pigSmoke.sh'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/a6d29474/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py b/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
index 6f83106..410bf93 100644
--- a/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
@@ -21,7 +21,6 @@ from mock.mock import patch, MagicMock
from stacks.utils.RMFTestCase import *
-
class TestPigServiceCheck(RMFTestCase):
COMMON_SERVICES_PACKAGE_DIR = "PIG/0.12.0.2.0/package"
STACK_VERSION = "2.2"
@@ -79,6 +78,9 @@ class TestPigServiceCheck(RMFTestCase):
action = ['execute'],
hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf',
)
+ self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa@EXAMPLE.COM;',
+ user = 'ambari-qa',
+ )
self.assertResourceCalled("File", "/tmp/pigSmoke.sh",
content=StaticFile("pigSmoke.sh"),
mode=0755
@@ -139,9 +141,6 @@ class TestPigServiceCheck(RMFTestCase):
hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf',
)
- self.assertResourceCalled("Execute", "/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa@EXAMPLE.COM;",
- user="ambari-qa")
-
self.assertResourceCalled("Execute", "pig -x tez /tmp/pigSmoke.sh",
tries=3,
try_sleep=5,
[2/2] ambari git commit: AMBARI-13047. Pig service check fails on
kerberized when smokeuser ticket expires (aonishuk)
Posted by ao...@apache.org.
AMBARI-13047. Pig service check fails on kerberized when smokeuser ticket expires (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2daebc09
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2daebc09
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2daebc09
Branch: refs/heads/branch-2.1
Commit: 2daebc09f9f763dca973687ee4737afa729ecca2
Parents: a922a53
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Sep 9 17:39:56 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Sep 9 17:39:56 2015 +0300
----------------------------------------------------------------------
.../PIG/0.12.0.2.0/package/scripts/service_check.py | 12 +++++-------
.../python/stacks/2.0.6/PIG/test_pig_service_check.py | 3 +++
.../python/stacks/2.2/PIG/test_pig_service_check.py | 7 +++----
3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2daebc09/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
index 66b9772..fc819b8 100644
--- a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/package/scripts/service_check.py
@@ -57,7 +57,11 @@ class PigServiceCheckLinux(PigServiceCheck):
)
params.HdfsResource(None, action="execute")
-
+ if params.security_enabled:
+ kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};")
+ Execute(kinit_cmd,
+ user=params.smokeuser
+ )
File( format("{tmp_dir}/pigSmoke.sh"),
content = StaticFile("pigSmoke.sh"),
@@ -102,12 +106,6 @@ class PigServiceCheckLinux(PigServiceCheck):
if resource_created:
params.HdfsResource(None, action="execute")
- if params.security_enabled:
- kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};")
- Execute(kinit_cmd,
- user=params.smokeuser
- )
-
Execute(format("pig -x tez {tmp_dir}/pigSmoke.sh"),
tries = 3,
try_sleep = 5,
http://git-wip-us.apache.org/repos/asf/ambari/blob/2daebc09/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
index 1b5adab..4a87f4b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_service_check.py
@@ -144,6 +144,9 @@ class TestPigServiceCheck(RMFTestCase):
action = ['execute'],
hadoop_conf_dir = '/etc/hadoop/conf',
)
+ self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa@EXAMPLE.COM;',
+ user = 'ambari-qa',
+ )
self.assertResourceCalled('File', '/tmp/pigSmoke.sh',
content = StaticFile('pigSmoke.sh'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/2daebc09/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py b/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
index 6f83106..410bf93 100644
--- a/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.2/PIG/test_pig_service_check.py
@@ -21,7 +21,6 @@ from mock.mock import patch, MagicMock
from stacks.utils.RMFTestCase import *
-
class TestPigServiceCheck(RMFTestCase):
COMMON_SERVICES_PACKAGE_DIR = "PIG/0.12.0.2.0/package"
STACK_VERSION = "2.2"
@@ -79,6 +78,9 @@ class TestPigServiceCheck(RMFTestCase):
action = ['execute'],
hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf',
)
+ self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa@EXAMPLE.COM;',
+ user = 'ambari-qa',
+ )
self.assertResourceCalled("File", "/tmp/pigSmoke.sh",
content=StaticFile("pigSmoke.sh"),
mode=0755
@@ -139,9 +141,6 @@ class TestPigServiceCheck(RMFTestCase):
hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf',
)
- self.assertResourceCalled("Execute", "/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa@EXAMPLE.COM;",
- user="ambari-qa")
-
self.assertResourceCalled("Execute", "pig -x tez /tmp/pigSmoke.sh",
tries=3,
try_sleep=5,