You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sv...@apache.org on 2017/01/31 00:34:31 UTC
[1/4] incubator-trafodion git commit: [TRAFODION-2452] Fix upgrade or
removal of Ambari mpack
Repository: incubator-trafodion
Updated Branches:
refs/heads/master b67455830 -> 2e18c794b
[TRAFODION-2452] Fix upgrade or removal of Ambari mpack
Enhance traf_ambari RPM to call upgrade-mpack instead of install-mpack
when we are upgrading the mpack. Unfortunately, the upgrade-mpack command
does not (yet) seem to do the needed things. More tweaks may be needed
in the future to support upgrade from trafodion 2.1.0 to later release.
Also support removal of the RPM to clean up everything.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/fb2f1373
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/fb2f1373
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/fb2f1373
Branch: refs/heads/master
Commit: fb2f137330d0a49b24b92822e4024b6257574af4
Parents: bafb29a
Author: Steve Varnau <sv...@apache.org>
Authored: Sat Jan 21 01:16:22 2017 +0000
Committer: Steve Varnau <sv...@apache.org>
Committed: Sat Jan 21 01:16:22 2017 +0000
----------------------------------------------------------------------
install/.gitignore | 1 +
install/ambari-installer/Makefile | 6 ++-
.../mpack-install/am_install.sh | 17 ++++++--
install/ambari-installer/mpack.json | 46 ++++++++++++++++++++
install/ambari-installer/traf-mpack/mpack.json | 46 --------------------
install/ambari-installer/traf_ambari.spec | 14 +++++-
6 files changed, 78 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fb2f1373/install/.gitignore
----------------------------------------------------------------------
diff --git a/install/.gitignore b/install/.gitignore
index 5a3dadb..33594cf 100644
--- a/install/.gitignore
+++ b/install/.gitignore
@@ -6,3 +6,4 @@ ambari-installer/RPMROOT
ambari-installer/traf-mpack.tar.gz
ambari-installer/mpack-install/repo
ambari-installer/traf-mpack/custom-services/TRAFODION/*/repos
+ambari-installer/traf-mpack/mpack.json
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fb2f1373/install/ambari-installer/Makefile
----------------------------------------------------------------------
diff --git a/install/ambari-installer/Makefile b/install/ambari-installer/Makefile
index 2bb660d..555393c 100644
--- a/install/ambari-installer/Makefile
+++ b/install/ambari-installer/Makefile
@@ -36,7 +36,7 @@ all: rpmbuild
# correct trafodion version for a given HDP stack
REPO_VER= 2.1
-$(SOURCEDIR)/ambari_rpm.tar.gz: mpack-install/LICENSE repofiles
+$(SOURCEDIR)/ambari_rpm.tar.gz: mpack-install/LICENSE repofiles traf-mpack/mpack.json
rm -rf $(RPMROOT)
mkdir -p $(SOURCEDIR)
tar czf $@ traf-mpack mpack-install
@@ -50,6 +50,9 @@ repofiles:
echo $${rdir}/repoinfo.xml ; \
done
+traf-mpack/mpack.json: mpack.json
+ sed -e "s#MPACK_VERSION#$(TRAFODION_VER)#" $? > $@
+
mpack-install/LICENSE: ../../licenses/LICENSE-install
cp -f $? $@
@@ -77,3 +80,4 @@ clean:
rm -rf $(RPMROOT)
rm -rf mpack-install/LICENSE
rm -rf traf-mpack/custom-services/TRAFODION/*/repos
+ rm -rf traf-mpack/mpack.json
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fb2f1373/install/ambari-installer/mpack-install/am_install.sh
----------------------------------------------------------------------
diff --git a/install/ambari-installer/mpack-install/am_install.sh b/install/ambari-installer/mpack-install/am_install.sh
index 43dae96..2af52e8 100755
--- a/install/ambari-installer/mpack-install/am_install.sh
+++ b/install/ambari-installer/mpack-install/am_install.sh
@@ -26,8 +26,11 @@ rm -f ${tf}*
/usr/bin/ssh-keygen -q -t rsa -N '' -f $tf
instloc="$1"
+mpack="$2"
+vers="$3"
+pkgcnt="$4" #RPM package count
-config="${instloc}/traf-mpack/common-services/TRAFODION/2.1/configuration/trafodion-env.xml"
+config="${instloc}/${mpack}/common-services/TRAFODION/2.1/configuration/trafodion-env.xml"
chmod 0600 $config # protect key
sed -i -e "/TRAFODION-GENERATED-SSH-KEY/r $tf" $config # add key to config properties
@@ -35,13 +38,19 @@ sed -i -e "/TRAFODION-GENERATED-SSH-KEY/r $tf" $config # add key to config prope
rm -f ${tf}*
# tar up the mpack, included generated key
-tball="${instloc}/traf-mpack.tar.gz"
+tball="${instloc}/${mpack}-${vers}.tar.gz"
cd "${instloc}"
-tar czf "$tball" traf-mpack
+tar czf "$tball" ${mpack}
# install ambari mpack
-ambari-server install-mpack --verbose --mpack="$tball"
+if (( pkgcnt > 1 ))
+then
+ cmd="upgrade-mpack"
+else
+ cmd="install-mpack"
+fi
+ambari-server $cmd --verbose --mpack="$tball"
ret=$?
exit $ret
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fb2f1373/install/ambari-installer/mpack.json
----------------------------------------------------------------------
diff --git a/install/ambari-installer/mpack.json b/install/ambari-installer/mpack.json
new file mode 100644
index 0000000..284c94d
--- /dev/null
+++ b/install/ambari-installer/mpack.json
@@ -0,0 +1,46 @@
+{
+ "type" : "full-release",
+ "name" : "traf-mpack",
+ "version": "MPACK_VERSION",
+ "description" : "Trafodion Management Pack",
+ "prerequisites": {
+ "min_ambari_version" : "2.4.2.0",
+ "min_stack_version" : [
+ {
+ "stack_name":"HDP",
+ "stack_version":"2.3"
+ }
+ ]
+ },
+ "artifacts": [
+ {
+ "name" : "TRAFODION-service-definition",
+ "type" : "service-definitions",
+ "source_dir": "common-services",
+ "service_name" : "TRAFODION",
+ "service_version" : "2.1"
+ },
+ {
+ "name" : "TRAFODION-2.1",
+ "type" : "stack-addon-service-definitions",
+ "source_dir": "custom-services",
+ "service_versions_map": [
+ {
+ "service_name" : "TRAFODION",
+ "service_version" : "2.1",
+ "applicable_stacks" : [
+ {
+ "stack_name" : "HDP", "stack_version" : "2.3"
+ },
+ {
+ "stack_name" : "HDP", "stack_version" : "2.4"
+ },
+ {
+ "stack_name" : "HDP", "stack_version" : "2.5"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fb2f1373/install/ambari-installer/traf-mpack/mpack.json
----------------------------------------------------------------------
diff --git a/install/ambari-installer/traf-mpack/mpack.json b/install/ambari-installer/traf-mpack/mpack.json
deleted file mode 100644
index b2c0265..0000000
--- a/install/ambari-installer/traf-mpack/mpack.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "type" : "full-release",
- "name" : "traf-mpack",
- "version": "2.1",
- "description" : "Trafodion Management Pack",
- "prerequisites": {
- "min_ambari_version" : "2.4.2.0",
- "min_stack_version" : [
- {
- "stack_name":"HDP",
- "stack_version":"2.3"
- }
- ]
- },
- "artifacts": [
- {
- "name" : "TRAFODION-service-definition",
- "type" : "service-definitions",
- "source_dir": "common-services",
- "service_name" : "TRAFODION",
- "service_version" : "2.1"
- },
- {
- "name" : "TRAFODION-2.1",
- "type" : "stack-addon-service-definitions",
- "source_dir": "custom-services",
- "service_versions_map": [
- {
- "service_name" : "TRAFODION",
- "service_version" : "2.1",
- "applicable_stacks" : [
- {
- "stack_name" : "HDP", "stack_version" : "2.3"
- },
- {
- "stack_name" : "HDP", "stack_version" : "2.4"
- },
- {
- "stack_name" : "HDP", "stack_version" : "2.5"
- }
- ]
- }
- ]
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fb2f1373/install/ambari-installer/traf_ambari.spec
----------------------------------------------------------------------
diff --git a/install/ambari-installer/traf_ambari.spec b/install/ambari-installer/traf_ambari.spec
index 43e7120..1c1dcb9 100644
--- a/install/ambari-installer/traf_ambari.spec
+++ b/install/ambari-installer/traf_ambari.spec
@@ -50,7 +50,19 @@ mkdir -p %{buildroot}/opt/trafodion
cp -rf %{name}/* %{buildroot}/opt/trafodion
%post
-$RPM_INSTALL_PREFIX/mpack-install/am_install.sh "$RPM_INSTALL_PREFIX"
+$RPM_INSTALL_PREFIX/mpack-install/am_install.sh "$RPM_INSTALL_PREFIX" "traf-mpack" "%{version}-%{release}" "$1"
+
+%postun
+if [[ $1 == 0 ]] # removing final version
+then
+ # no ambari command for this yet -- coming in Ambari 2.5.0
+ rm -r /var/lib/ambari-server/resources/mpacks/traf-mpack*
+ rm -r /var/lib/ambari-server/resources/common-services/TRAFODION
+ rm -r /var/lib/ambari-server/resources/stacks/HDP/*/services/TRAFODION
+ # clean up items created by am_install.sh script
+ rm /opt/trafodion/traf-mpack*.tar.gz
+ rm -r /opt/trafodion/traf-mpack
+fi
%clean
/bin/rm -rf %{buildroot}
[4/4] incubator-trafodion git commit: Merge [TRAFODION-2452] Fix
upgrade/removal of Ambari MPack
Posted by sv...@apache.org.
Merge [TRAFODION-2452] Fix upgrade/removal of Ambari MPack
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/2e18c794
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/2e18c794
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/2e18c794
Branch: refs/heads/master
Commit: 2e18c794b1994b578cb6ef3b35a1ea82fe0bfa4d
Parents: b674558 bbe8066
Author: Steve Varnau <sv...@apache.org>
Authored: Tue Jan 31 00:31:57 2017 +0000
Committer: Steve Varnau <sv...@apache.org>
Committed: Tue Jan 31 00:31:57 2017 +0000
----------------------------------------------------------------------
install/.gitignore | 3 +-
install/ambari-installer/Makefile | 26 +++++++----
install/ambari-installer/meta.template | 34 +++++++++++++++
.../mpack-install/am_install.sh | 17 ++++++--
install/ambari-installer/mpack.json | 46 ++++++++++++++++++++
install/ambari-installer/repo.template | 2 +-
.../2.1/package/scripts/trafodiondcs.py | 2 +-
.../2.1/package/scripts/trafodionnode.py | 2 +-
.../custom-services/TRAFODION/2.1/metainfo.xml | 34 ---------------
install/ambari-installer/traf-mpack/mpack.json | 46 --------------------
install/ambari-installer/traf_ambari.spec | 14 +++++-
11 files changed, 128 insertions(+), 98 deletions(-)
----------------------------------------------------------------------
[2/4] incubator-trafodion git commit: [TRAFODION-2452] Clean-up of
install/upgrade via ambari
Posted by sv...@apache.org.
[TRAFODION-2452] Clean-up of install/upgrade via ambari
Make sure we specify full release version of trafodion, based on
current release, not hard-coding "2.1".
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/5c01e4ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5c01e4ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5c01e4ad
Branch: refs/heads/master
Commit: 5c01e4ad3fd15b9fb249ab72c1008b27aed54e00
Parents: fb2f137
Author: Steve Varnau <sv...@apache.org>
Authored: Wed Jan 25 00:50:08 2017 +0000
Committer: Steve Varnau <sv...@apache.org>
Committed: Wed Jan 25 00:50:08 2017 +0000
----------------------------------------------------------------------
install/.gitignore | 2 +-
install/ambari-installer/Makefile | 20 +++++++-----
install/ambari-installer/meta.template | 34 ++++++++++++++++++++
install/ambari-installer/repo.template | 2 +-
.../2.1/package/scripts/trafodionnode.py | 4 +--
.../custom-services/TRAFODION/2.1/metainfo.xml | 34 --------------------
6 files changed, 50 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5c01e4ad/install/.gitignore
----------------------------------------------------------------------
diff --git a/install/.gitignore b/install/.gitignore
index 33594cf..2aa6b05 100644
--- a/install/.gitignore
+++ b/install/.gitignore
@@ -5,5 +5,5 @@ DISCLAIMER
ambari-installer/RPMROOT
ambari-installer/traf-mpack.tar.gz
ambari-installer/mpack-install/repo
-ambari-installer/traf-mpack/custom-services/TRAFODION/*/repos
+ambari-installer/traf-mpack/custom-services
ambari-installer/traf-mpack/mpack.json
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5c01e4ad/install/ambari-installer/Makefile
----------------------------------------------------------------------
diff --git a/install/ambari-installer/Makefile b/install/ambari-installer/Makefile
index 555393c..4e3ebd9 100644
--- a/install/ambari-installer/Makefile
+++ b/install/ambari-installer/Makefile
@@ -32,9 +32,9 @@ BUILDROOTDIR=$(RPMROOT)/BUILDROOT
all: rpmbuild
# need repoinfo file per release
-# traf_ambari needs to support multiple releases so ambari can select
-# correct trafodion version for a given HDP stack
-REPO_VER= 2.1
+# traf_ambari needs to support multiple releases so ambari can
+# select trafodion version for given HDP stack
+REPO_LIST= $(TRAFODION_VER) # for now, list is current release only
$(SOURCEDIR)/ambari_rpm.tar.gz: mpack-install/LICENSE repofiles traf-mpack/mpack.json
rm -rf $(RPMROOT)
@@ -43,11 +43,14 @@ $(SOURCEDIR)/ambari_rpm.tar.gz: mpack-install/LICENSE repofiles traf-mpack/mpack
# To do: needs enhancement when supporting RH6 & RH7 os
repofiles:
- for v in $(REPO_VER); do \
- rdir=traf-mpack/custom-services/TRAFODION/$${v}/repos; \
- mkdir -p $${rdir} ; \
- sed -e "s#REPLACE_WITH_RH6_REPO_URL#$(REPO_URL)/RH6/$${v}#" repo.template > $${rdir}/repoinfo.xml ; \
- echo $${rdir}/repoinfo.xml ; \
+ for v in $(REPO_LIST); do \
+ rdir=traf-mpack/custom-services/TRAFODION/$${v}; \
+ mkdir -p $${rdir}/repos ; \
+ sed -e "s#REPLACE_WITH_RH6_REPO_URL#$(REPO_URL)/RH6/$${v}#" \
+ -e "s#REPO_VER#$${v}#" \
+ repo.template > $${rdir}/repos/repoinfo.xml ; \
+ sed -e "s#REPO_VER#$${v}#" \
+ meta.template > $${rdir}/metainfo.xml ; \
done
traf-mpack/mpack.json: mpack.json
@@ -80,4 +83,5 @@ clean:
rm -rf $(RPMROOT)
rm -rf mpack-install/LICENSE
rm -rf traf-mpack/custom-services/TRAFODION/*/repos
+ rm -f traf-mpack/custom-services/TRAFODION/*/metainfo.xml
rm -rf traf-mpack/mpack.json
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5c01e4ad/install/ambari-installer/meta.template
----------------------------------------------------------------------
diff --git a/install/ambari-installer/meta.template b/install/ambari-installer/meta.template
new file mode 100644
index 0000000..4d1369d
--- /dev/null
+++ b/install/ambari-installer/meta.template
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!-- reference common-services -->
+<!--
+* @@@ START COPYRIGHT @@@
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+* @@@ END COPYRIGHT @@@
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>TRAFODION</name>
+ <extends>common-services/TRAFODION/2.1</extends>
+ <version>REPO_VER</version>
+ </service>
+ </services>
+</metainfo>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5c01e4ad/install/ambari-installer/repo.template
----------------------------------------------------------------------
diff --git a/install/ambari-installer/repo.template b/install/ambari-installer/repo.template
index 8a3ebfd..1689690 100644
--- a/install/ambari-installer/repo.template
+++ b/install/ambari-installer/repo.template
@@ -17,7 +17,7 @@
<os family="redhat6">
<repo>
<baseurl>REPLACE_WITH_RH6_REPO_URL</baseurl>
- <repoid>Trafodion</repoid>
+ <repoid>Trafodion-REPO_VER</repoid>
<reponame>Trafodion</reponame>
</repo>
</os>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5c01e4ad/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
----------------------------------------------------------------------
diff --git a/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py b/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
index fa0cdf3..5bb8ca7 100755
--- a/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
+++ b/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
@@ -90,8 +90,8 @@ class Node(Script):
group = params.traf_group,
content=InlineTemplate(params.traf_env_template,trim_blocks=False),
mode=0644)
- # initialize & verify env (e.g., creates $TRAF_HOME/tmp as trafodion user)
- cmd = "source ~/.bashrc"
+ # initialize & verify env (e.g., bashrc creates $TRAF_HOME/tmp as trafodion user)
+ cmd = "source ~" + params.traf_user + "/.bashrc ; ls -l $TRAF_HOME/tmp"
Execute(cmd,user=params.traf_user)
##################
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5c01e4ad/install/ambari-installer/traf-mpack/custom-services/TRAFODION/2.1/metainfo.xml
----------------------------------------------------------------------
diff --git a/install/ambari-installer/traf-mpack/custom-services/TRAFODION/2.1/metainfo.xml b/install/ambari-installer/traf-mpack/custom-services/TRAFODION/2.1/metainfo.xml
deleted file mode 100644
index c0ddc94..0000000
--- a/install/ambari-installer/traf-mpack/custom-services/TRAFODION/2.1/metainfo.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>
-<!-- reference common-services -->
-<!--
-* @@@ START COPYRIGHT @@@
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-* @@@ END COPYRIGHT @@@
--->
-<metainfo>
- <schemaVersion>2.0</schemaVersion>
- <services>
- <service>
- <name>TRAFODION</name>
- <extends>common-services/TRAFODION/2.1</extends>
- <version>2.1</version>
- </service>
- </services>
-</metainfo>
[3/4] incubator-trafodion git commit: [TRAFODION-2452] Clean-up of
install/upgrade via ambari
Posted by sv...@apache.org.
[TRAFODION-2452] Clean-up of install/upgrade via ambari
Fix permission issue with installing new trafodion version.
The DCS status checks were running as root, which caused $TRAF_HOME/tmp
to get created as root instead of trafodion user, which caused sqgen to fail.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/bbe80666
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/bbe80666
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/bbe80666
Branch: refs/heads/master
Commit: bbe806665ed9a55d1ec8aa15ebd6cc6bb5d9fc10
Parents: 5c01e4a
Author: Steve Varnau <sv...@apache.org>
Authored: Wed Jan 25 23:19:18 2017 +0000
Committer: Steve Varnau <sv...@apache.org>
Committed: Wed Jan 25 23:19:18 2017 +0000
----------------------------------------------------------------------
.../common-services/TRAFODION/2.1/package/scripts/trafodiondcs.py | 2 +-
.../common-services/TRAFODION/2.1/package/scripts/trafodionnode.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bbe80666/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodiondcs.py
----------------------------------------------------------------------
diff --git a/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodiondcs.py b/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodiondcs.py
index 24b9623..92688b3 100755
--- a/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodiondcs.py
+++ b/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodiondcs.py
@@ -47,7 +47,7 @@ class DCS(Script):
cmd = "source ~%s/.bashrc >/dev/null 2>&1; ls $DCS_INSTALL_DIR/tmp/dcs*master.pid" % status_params.traf_user
ofile = TemporaryFile()
try:
- Execute(cmd,stdout=ofile) # cannot switch user in status mode for some reason
+ Execute(cmd,stdout=ofile,user=status_params.traf_user)
except:
ofile.close()
raise ComponentIsNotRunning()
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bbe80666/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
----------------------------------------------------------------------
diff --git a/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py b/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
index 5bb8ca7..26d8178 100755
--- a/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
+++ b/install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/trafodionnode.py
@@ -91,7 +91,7 @@ class Node(Script):
content=InlineTemplate(params.traf_env_template,trim_blocks=False),
mode=0644)
# initialize & verify env (e.g., bashrc creates $TRAF_HOME/tmp as trafodion user)
- cmd = "source ~" + params.traf_user + "/.bashrc ; ls -l $TRAF_HOME/tmp"
+ cmd = "source ~/.bashrc"
Execute(cmd,user=params.traf_user)
##################