You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2017/06/24 00:11:47 UTC
[5/8] incubator-trafodion git commit: [TRAFODION-2644] Obsolete bash
installer
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/cloudera_uninstall
----------------------------------------------------------------------
diff --git a/install/installer/tools/cloudera_uninstall b/install/installer/tools/cloudera_uninstall
deleted file mode 100755
index ecb69d9..0000000
--- a/install/installer/tools/cloudera_uninstall
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-# This script will uninstall Cloudera and all its pieces
-
-#==============================================
-#Default Values
-typeset TRAF_WORKDIR="$( cd "$( dirname "$0" )" && pwd )"
-typeset TRAF_DIR="$( cd "$( dirname "$0" )" && pwd )/.."
-typeset MY_NODES=""
-export PDSH="pdsh -R exec"
-export PDSH_SSH_CMD="ssh -q -n %h"
-export PDCP="pdcp -R ssh"
-typeset timestamp=$(date +%F-%H-%M-%S)
-typeset LOG="/var/log/trafodion/uninstall_cloudera_$timestamp.log"
-sudo mkdir -p /var/log/trafodion
-sudo chmod 777 /var/log/trafodion
-#==============================================
-
-function print_usage {
-cat << EOF
-This script will uninstall Cloudera.
-
-Usage: $(basename $0) [options]
-
-Options:
- --help Print this message and exit.
- --nodes "<node_list>" Space separated list of nodes (within quotes)
-
-EOF
-}
-
-#==============================================
-# Parse input parameters
-while [[ $# -gt 0 ]]; do
- case "$1" in
- --nodes)
- if [[ -z "$2" ]]; then
- echo "***ERROR: No value passed to param $1."
- print_usage
- exit -1
- fi
- MY_NODES=$2
- shift
- ;;
- --help)
- print_usage
- exit -1
- ;;
- *)
- echo "***ERROR: unknown parameter '$1'"
- print_usage
- exit -1
- esac
- shift
-done
-
-if [[ $MY_NODES == "" ]]; then
- echo
- echo "***ERROR: Please use --nodes option to include node list"
- echo "***ERROR: Exiting..."
- echo
- exit -1
-fi
-
-
-#==============================================
-#Check with user if they want to preform the uninstall
-echo -n "Do you want to uninstall Cloudera? (Y/N) "
-read v
-
-if [[ $v != "Y" ]] && [[ $v != "y" ]]; then
- echo "***INFO: Exiting..."
- exit
-fi
-
-node_count=$(echo $MY_NODES | wc -w)
-linuxInstalled=$(grep -cr SUSE /proc/version)
-#============================================
-
-#Info for log file
-echo "***INFO: Log file located at: /var/log/trafodion"
-
-echo "***Log File: trafodion_cloudera_uninstall script***" >> $LOG
-echo >> $LOG
-
-#============================================
-echo "***INFO: Uninstalling on nodes: $MY_NODES" | tee -a $LOG
-
-#==============================================
-#Run Cloudera uninstall script and stop all services
-
-sudo /usr/share/cmf/uninstall-cloudera-manager.sh
-
-#==============================================
-#Run Cloudera uninstall script on all nodes.
-
-for node in $MY_NODES
-do
- echo "***INFO: Uninstalling on node: $node" | tee -a $LOG
- if [ $node == $HOSTNAME ]; then
- if [[ "$linuxInstalled" == "1" ]]; then
- ./traf_cloudera_uninstall_suse | tee -a $LOG
- else
- ./traf_cloudera_uninstall | tee -a $LOG
- fi
-
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: Cloudera may not be completely uninstalled on $node" | tee -a $LOG
- echo "***ERROR: Review log files." | tee -a $LOG
- fi
- else
- if [[ "$linuxInstalled" -eq "1" ]]; then
-
- $PDCP -w $node -x $HOSTNAME traf_cloudera_uninstall_suse $HOME | tee -a $LOG
- else
- $PDCP -w $node -x $HOSTNAME traf_cloudera_uninstall $HOME | tee -a $LOG
- fi
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: Error copying script to $node" | tee -a $LOG
- echo "***ERROR: Exiting..." | tee -a $LOG
- fi
- if [[ $linuxInstalled -eq "1" ]]; then
- $PDSH -w $node $PDSH_SSH_CMD $HOME/traf_cloudera_uninstall_suse | tee -a $LOG
- else
- $PDSH -w $node $PDSH_SSH_CMD $HOME/traf_cloudera_uninstall | tee -a $LOG
- fi
-
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: Cloudera may not be completely uninstalled on $node" | tee -a $LOG
- echo "***ERROR: Review log files." | tee -a $LOG
- fi
- fi
-done
-
-echo "***INFO: Cloudera Manager uninstalled." | tee -a $LOG
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/hortonworks_uninstall
----------------------------------------------------------------------
diff --git a/install/installer/tools/hortonworks_uninstall b/install/installer/tools/hortonworks_uninstall
deleted file mode 100755
index 0fb9acd..0000000
--- a/install/installer/tools/hortonworks_uninstall
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-# This script will uninstall Hortonworks and all its pieces
-
-#==============================================
-#Default Values
-typeset TRAF_WORKDIR="$( cd "$( dirname "$0" )" && pwd )"
-typeset TRAF_DIR="$( cd "$( dirname "$0" )" && pwd )/.."
-typeset MY_NODES=""
-typeset timestamp=$(date +%F-%H-%M-%S)
-typeset LOG="/var/log/trafodion/uninstall_hortonworks_$timestamp.log"
-sudo mkdir -p /var/log/trafodion
-sudo chmod 777 /var/log/trafodion
-#==============================================
-
-function print_usage {
-cat << EOF
-This script will uninstall Hortonworks.
-
-Usage: $(basename $0) [options]
-
-Options:
- --help Print this message and exit.
- --nodes "<node_list>" Space separated list of nodes (within quotes)
-
-EOF
-}
-
-#==============================================
-# Parse input parameters
-while [[ $# -gt 0 ]]; do
- case "$1" in
- --nodes)
- if [[ -z "$2" ]]; then
- echo "***ERROR: No value passed to param $1."
- print_usage
- exit -1
- fi
- MY_NODES=$2
- shift
- ;;
- --help)
- print_usage
- exit -1
- ;;
- *)
- echo "***ERROR: unknown parameter '$1'"
- print_usage
- exit -1
- esac
- shift
-done
-
-if [[ $MY_NODES == "" ]]; then
- echo
- echo "***ERROR: Please use --nodes option to include node list"
- echo "***ERROR: Exiting..."
- echo
- exit -1
-fi
-
-export PDSH="pdsh -R exec"
-export PDSH_SSH_CMD="ssh -q -n %h"
-export PDCP="pdcp -R ssh"
-#==============================================
-#Check with user if they want to preform the uninstall
-echo -n "Do you want to uninstall Hortonworks? (Y/N) "
-read v
-
-if [[ $v != "Y" ]] && [[ $v != "y" ]]; then
- echo "***INFO: Exiting..."
- exit
-fi
-
-node_count=$(echo $MY_NODES | wc -w)
-linuxInstalled=$(grep -cr SUSE /proc/version)
-
-#============================================
-
-#Info for log file
-echo "***INFO: Log file is located at /var/log/trafodion"
-
-echo "***Log File: trafodion_hortonworks_uninstall script***" >> $LOG
-echo >> $LOG
-
-#============================================
-echo "***INFO: Uninstalling on nodes: $MY_NODES" | tee -a $LOG
-
-#==============================================
-#Run Hortonworks/Amabari uninstall script on all nodes.
-
-for node in $MY_NODES
-do
- echo "***INFO: Uninstalling on node: $node" | tee -a $LOG
- if [ $node == $(hostname --short) ]; then
- echo "***INFO: Stopping all services" | tee -a $LOG
- sudo ambari-agent stop
- sudo ambari-server stop
- sudo ambari-server reset
- if [[ "$linuxInstalled" -eq 0 ]]; then
- sudo /usr/bin/yum --assumeyes install pdsh --skip-broken
- ./traf_hortonworks_uninstall | tee -a $LOG
- else
- sudo zypper install -y pdsh
- ./traf_hortonworks_uninstall_suse | tee -a $LOG
- fi
- else
- echo "***INFO: Stopping all services" | tee -a $LOG
- $PDSH -w $node $PDSH_SSH_CMD 'sudo ambari-agent stop'
- if [[ "$linuxInstalled" -eq 0 ]]; then
- $PDCP -w $node -x $HOSTNAME $TRAF_WORKDIR/traf_hortonworks_uninstall $HOME | tee -a $LOG
- else
- $PDCP -w $node -x $HOSTNAME $TRAF_WORKDIR/traf_hortonworks_uninstall_suse $HOME | tee -a $LOG
- fi
-
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: Error copying script to $node" | tee -a $LOG
- echo "***ERROR: Exiting..." | tee -a $LOG
- exit -1
- fi
- if [[ "$linuxInstalled" -eq "0" ]]; then
- $PDSH -w $node $PDSH_CMD_SSH $HOME/traf_hortonworks_uninstall | tee -a $LOG
- else
- $PDSH -w $node $PDSH_CMD_SSH $HOME/traf_hortonworks_uninstall_suse | tee -a $LOG
- fi
- fi
-
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: Hortonworks may not be completely uninstalled on $node" | tee -a $LOG
- echo "***ERROR: Review log files." | tee -a $LOG
- fi
-done
-
-echo "***INFO: Hortonworks uninstalled." | tee -a $LOG
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/mapr_uninstall
----------------------------------------------------------------------
diff --git a/install/installer/tools/mapr_uninstall b/install/installer/tools/mapr_uninstall
deleted file mode 100755
index e49d5c9..0000000
--- a/install/installer/tools/mapr_uninstall
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-# This script will uninstall MapR and all its pieces
-
-#==============================================
-#Default Values
-typeset TRAF_WORKDIR="$( cd "$( dirname "$0" )" && pwd )"
-typeset TRAF_DIR="$( cd "$( dirname "$0" )" && pwd )/.."
-typeset MY_NODES=""
-typeset timestamp=$(date +%F-%H-%M-%S)
-typeset LOG="/var/log/trafodion/uninstall_mapr_$timestamp.log"
-sudo mkdir /var/log/trafodion
-sudo chmod 777 /var/log/trafodion
-#==============================================
-
-function print_usage {
-cat << EOF
-This script will uninstall MapR.
-
-Usage: $(basename $0) [options]
-
-Options:
- --help Print this message and exit.
- --nodes "<node_list>" Space separated list of nodes (within quotes)
-
-EOF
-}
-
-#==============================================
-# Parse input parameters
-while [[ $# -gt 0 ]]; do
- case "$1" in
- --nodes)
- if [[ -z "$2" ]]; then
- echo "***ERROR: No value passed to param $1."
- print_usage
- exit -1
- fi
- MY_NODES=$2
- shift
- ;;
- --help)
- print_usage
- exit -1
- ;;
- *)
- echo "***ERROR: unknown parameter '$1'"
- print_usage
- exit -1
- esac
- shift
-done
-
-if [[ $MY_NODES == "" ]]; then
- echo
- echo "***ERROR: Please use --nodes option to include node list"
- echo "***ERROR: Exiting..."
- echo
- exit -1
-fi
-
-
-#==============================================
-#Check with user if they want to preform the uninstall
-echo -n "Do you want to uninstall MapR? (Y/N) "
-read v
-
-if [[ $v != "Y" ]] && [[ $v != "y" ]]; then
- echo "***INFO: Exiting..."
- exit
-fi
-
-node_count=$(echo $MY_NODES | wc -w)
-
-#============================================
-
-#Info for log file
-echo "***INFO: Log file located at /var/log/trafodion"
-echo "***Log File: trafodion_mapr_uninstall script***" >> $LOG
-echo >> $LOG
-
-#============================================
-echo "***INFO: Uninstalling on nodes: $MY_NODES" | tee -a $LOG
-
-#==============================================
-#Run MapR uninstall script on all nodes.
-
-for node in $MY_NODES
-do
- echo "***INFO: Uninstalling on node: $node" | tee -a $LOG
- if [ $node == $HOSTNAME ]; then
- $TRAF_WORKDIR/traf_mapr_uninstall | tee -a $LOG
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: MapR may not be completely uninstalled on $nodes" | tee -a $LOG
- echo "***ERROR: Review log files." | tee -a $LOG
- fi
- else
- pdcp -w $node -x $HOSTNAME traf_mapr_uninstall $HOME | tee -a $LOG
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: Error copying script to $node" | tee -a $LOG
- echo "***ERROR: Exiting..." | tee -a $LOG
- fi
- pdsh -S -w $node $HOME/traf_mapr_uninstall | tee -a $LOG
- if [ ${PIPESTATUS[0]} != "0" ]; then
- echo "***ERROR: MapR may not be completely uninstalled on $node" | tee -a $LOG
- echo "***ERROR: Review log files." | tee -a $LOG
- fi
- fi
-done
-
-echo "***INFO: MapR uninstalled." | tee -a $LOG
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/traf_cloudera_uninstall
----------------------------------------------------------------------
diff --git a/install/installer/tools/traf_cloudera_uninstall b/install/installer/tools/traf_cloudera_uninstall
deleted file mode 100755
index 06ad7b0..0000000
--- a/install/installer/tools/traf_cloudera_uninstall
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-# This script will uninstall Cloudera and all its pieces
-
-#==============================================
-
-echo "***INFO: Shutdown Cloudera Manager agents on all nodes"
-sudo /sbin/service cloudera-scm-agent hard_stop
-
-#==============================================
-echo "***INFO: Uninstall packages"
-sudo yum --assumeyes remove cloudera-manager-*
-sudo yum --assumeyes remove hadoop
-sudo yum --assumeyes remove hue-common
-sudo yum --assumeyes remove bigtop-*
-sudo yum --assumeyes remove sqoop2-client
-sudo yum --assumeyes clean all
-
-#==============================================
-echo "***INFO: Remove Cloudera Manager and CDH data"
-sudo rm -Rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/cloudera* /var/log/cloudera* /var/run/cloudera* /opt/cloudera* /tmp/scm_prepare_node* /etc/cloudera*
-
-sudo rm -Rf /var/lib/flume-ng /var/lib/hadoop* /var/lib/hue /var/lib/oozie /var/lib/solr /var/lib/sqoop* /var/lib/zookeeper*
-
-sudo rm -Rf /dfs /mapred /yarn
-
-sudo rm -Rf /var/run/hdfs-sockets /var/run/zookeeper* /var/run/sqoop* /var/run/flume* /var/run/sqoop*
-
-sudo rm -Rf /var/log/zookeeper* /var/log/hadoop* /var/log/hive* /var/log/sqoop* /var/log/flume* /var/log/hbase* /var/log/hue*
-
-sudo rm -Rf /etc/zookeeper* /etc/hadoop* /etc/hive* /etc/sqoop* /etc/flume* /etc/hbase* /etc/hcatalog* /etc/webhcat* /etc/pig* /etc/oozie*
-
-sudo rm -Rf /usr/lib/hadoop* /usr/lib/hive* /usr/lib/oozie* /usr/lib/hcatalog* /usr/lib/parquet* /usr/lib/hbase*
-
-sudo rm -Rf /usr/lib/alternatives/hadoop*
-
-sudo rm -Rf /tmp/hadoop*
-
-sudo rm -Rf /etc/alternatives/hadoop* /etc/alternatives/hive* /etc/alternatives/hbase*
-
-sudo rm -Rf /var/tmp/sqoop* /var/lib/alternatives/hbase* /etc/run/webhcat* /usr/share/hue* /tmp/hadoop* /tmp/hsperfdata_zookeeper
-
-sudo rm -rf /etc/hadoop/conf
-sudo rm -rf /etc/hive/conf
-#==============================================
-echo "***INFO: Kill any running Cloudera Manager and CDH processes that might still be running"
-
-for u in hdfs mapred cloudera-scm hbase hue zookeeper oozie hive impala flume; do
- sudo kill $(ps -u $u -o pid=) 2>/dev/null
-done
-
-#==============================================
-echo "***INFO: Remove the Cloudera Manager lock file"
-sudo rm /tmp/.scm_prepare_node.lock >/dev/null 2>&1
-
-#==============================================
-echo "***INFO: Remove any left over Cloudera processes"
-
-pid=$(sudo netstat -anp | grep 9000 | awk '{print $7}' | sed 's/ *\/.*//')
-
-if [[ $pid != "" ]]; then
- sudo kill -9 $pid
-fi
-
-pid=$(sudo netstat -anp | grep 9001 | awk '{print $7}' | sed 's/ *\/.*//')
-
-if [[ $pid != "" ]];then
- sudo kill -9 $pid
-fi
-
-sudo pkill -f cloudera-scm
-
-sudo umount /var/run/cloudera-scm-agent/process
-
-sudo yum-complete-transaction
-#==============================================
-echo "***INFO: Removing any remaining Cloudera RPM's"
-
-listRPM=`rpm -qa | grep hadoop`
-
-for i in ${listRPM[@]}; do
- sudo rpm -e $i 2>/dev/null
- sudo yum -y remove $i 2>/dev/null
-done
-
-listRPM=`rpm -qa | grep cloudera`
-
-for i in ${listRPM[@]}; do
- sudo rpm -e $i 2>/dev/null
- sudo yum remove $i 2>/dev/null
-done
-
-listRPM=`rpm -qa | grep hbase`
-
-for i in ${listRPM[@]}; do
- sudo rpm -e $i 2>/dev/null
- sudo yum -y remove $i 2>/dev/null
-done
-
-#==============================================
-echo "***INFO: Removing any Cloudera repos"
-
-sudo rm -rf /etc/yum.repos.d/cloudera*
-
-#=============================================
-echo "***INFO: Removing Cloudera symbolic directory links"
-
-if [[ -f /etc/alternatives/hadoop-conf ]]; then
- sudo rm -rf /etc/alternatives/hadoop-conf*
-fi
-
-if [[ -f /etc/alternatives/hbase-conf ]]; then
- sudo rm -rf /etc/alternatives/hbase-conf*
-fi
-
-if [[ -f /etc/alternatives/hive-conf ]]; then
- sudo rm -rf /etc/alternatives/hive-conf*
-fi
-
-if [[ -f /cloudera-scm-server-db ]]; then
- sudo rm -rf /cloudera-scm-server-db
-fi
-#============================================
-echo "***INFO: Performing additional clean up"
-sudo rm -rf /var/cache/yum/x86_64/6/cloudera*
-sudo yum clean all
-sudo rpm --rebuilddb
-
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/traf_cloudera_uninstall_suse
----------------------------------------------------------------------
diff --git a/install/installer/tools/traf_cloudera_uninstall_suse b/install/installer/tools/traf_cloudera_uninstall_suse
deleted file mode 100755
index c556106..0000000
--- a/install/installer/tools/traf_cloudera_uninstall_suse
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-# This script will uninstall Cloudera and all its pieces
-
-#==============================================
-
-echo "***INFO: Shutdown Cloudera Manager agents on all nodes"
-sudo /sbin/service cloudera-scm-agent hard_stop
-
-#==============================================
-echo "***INFO: Uninstall packages"
-sudo zypper remove -y cloudera-manager-*
-sudo zypper remove -y hadoop
-sudo zypper remove -y hue-common
-sudo zypper remove -y bigtop-*
-sudo zypper remove -y sqoop2-client
-
-#==============================================
-echo "***INFO: Remove Cloudera Manager and CDH data"
-sudo rm -Rf /usr/share/cmf /var/lib/cloudera* /var/log/cloudera* /var/run/cloudera* /opt/cloudera* /tmp/scm_prepare_node* /etc/cloudera*
-
-sudo rm -Rf /var/lib/flume-ng /var/lib/hadoop* /var/lib/hue /var/lib/oozie /var/lib/solr /var/lib/sqoop* /var/lib/zookeeper*
-
-sudo rm -Rf /dfs /mapred /yarn
-
-sudo rm -Rf /var/run/hdfs-sockets /var/run/zookeeper* /var/run/sqoop* /var/run/flume* /var/run/sqoop*
-
-sudo rm -Rf /var/log/zookeeper* /var/log/hadoop* /var/log/hive* /var/log/sqoop* /var/log/flume* /var/log/hbase* /var/log/hue*
-
-sudo rm -Rf /etc/zookeeper* /etc/hadoop* /etc/hive* /etc/sqoop* /etc/flume* /etc/hbase* /etc/hcatalog* /etc/webhcat* /etc/pig* /etc/oozie*
-
-sudo rm -Rf /usr/lib/hadoop* /usr/lib/hive* /usr/lib/oozie* /usr/lib/hcatalog* /usr/lib/parquet* /usr/lib/hbase*
-
-sudo rm -Rf /usr/lib/alternatives/hadoop*
-
-sudo rm -Rf /tmp/hadoop*
-
-sudo rm -Rf /etc/alternatives/hadoop* /etc/alternatives/hive* /etc/alternatives/hbase*
-
-sudo rm -Rf /var/tmp/sqoop* /var/lib/alternatives/hbase* /etc/run/webhcat* /usr/share/hue* /tmp/hadoop* /tmp/hsperfdata_zookeeper
-
-sudo rm -rf /etc/hadoop/conf
-sudo rm -rf /etc/hive/conf
-#==============================================
-echo "***INFO: Kill any running Cloudera Manager and CDH processes that might still be running"
-
-for u in hdfs mapred cloudera-scm hbase hue zookeeper oozie hive impala flume; do
- sudo kill $(ps -u $u -o pid=) 2>/dev/null
-done
-
-#==============================================
-echo "***INFO: Remove the Cloudera Manager lock file"
-sudo rm /tmp/.scm_prepare_node.lock >/dev/null 2>&1
-
-#==============================================
-echo "***INFO: Remove any left over Cloudera processes"
-
-pid=$(sudo netstat -anp | grep 9000 | awk '{print $7}' | sed 's/ *\/.*//')
-
-if [[ $pid != "" ]]; then
- sudo kill -9 $pid
-fi
-
-pid=$(sudo netstat -anp | grep 9001 | awk '{print $7}' | sed 's/ *\/.*//')
-
-if [[ $pid != "" ]];then
- sudo kill -9 $pid
-fi
-
-sudo pkill -f cloudera-scm
-
-sudo umount /var/run/cloudera-scm-agent/process
-
-#==============================================
-echo "***INFO: Removing any remaining Cloudera RPM's"
-
-listRPM=`rpm -qa | grep hadoop`
-
-for i in ${listRPM[@]}; do
- sudo rpm -e $i 2>/dev/null
- sudo zypper remove -y $i 2>/dev/null
-done
-
-listRPM=`rpm -qa | grep cloudera`
-
-for i in ${listRPM[@]}; do
- sudo rpm -e $i 2>/dev/null
- sudo zypper remove -y $i 2>/dev/null
-done
-
-listRPM=`rpm -qa | grep hbase`
-
-for i in ${listRPM[@]}; do
- sudo rpm -e $i 2>/dev/null
- sudo zypper remove -y $i 2>/dev/null
-done
-
-#==============================================
-echo "***INFO: Removing any Cloudera repos"
-
-sudo rm -rf /etc/yum.repos.d/cloudera*
-sudo rm -rf /etc/zypp/repos.d/cloudera-manager.repo*
-sudo rm -rf /var/cache/zypp/packages/cloudera*
-sudo rm -rf /var/cache/zypp/raw/cloudera*
-sudo rm -rf /var/cache/zypp/solv/cloudera*
-
-
-#=============================================
-echo "***INFO: Removing Cloudera symbolic directory links"
-
-if [[ -f /etc/alternatives/hadoop-conf ]]; then
- sudo rm -rf /etc/alternatives/hadoop-conf*
-fi
-
-if [[ -f /etc/alternatives/hbase-conf ]]; then
- sudo rm -rf /etc/alternatives/hbase-conf*
-fi
-
-if [[ -f /etc/alternatives/hive-conf ]]; then
- sudo rm -rf /etc/alternatives/hive-conf*
-fi
-
-if [[ -f /cloudera-scm-server-db ]]; then
- sudo rm -rf /cloudera-scm-server-db
-fi
-#============================================
-echo "***INFO: Performing additional clean up"
-sudo rpm --rebuilddb
-
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/traf_hortonworks_uninstall
----------------------------------------------------------------------
diff --git a/install/installer/tools/traf_hortonworks_uninstall b/install/installer/tools/traf_hortonworks_uninstall
deleted file mode 100755
index cf0aaa3..0000000
--- a/install/installer/tools/traf_hortonworks_uninstall
+++ /dev/null
@@ -1,233 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-# This script will uninstall Hortonworks
-
-#==============================================
-#Stop All Services
-sudo service nagios stop
-sudo /etc/init.d/hdp-gmetad stop
-sudo /etc/init.d/hdp-gmond stop
-sudo su -l hcat -c "/usr/lib/hcatalog/sbin/webhcat_server.sh stop"
-sudo ps aux | awk '{print $1,$2}' | grep hive | awk '{print $2}' | xargs kill >/dev/null 2>&1
-
-sudo su - zookeeper -c "export ZOOCFGDIR=/etc/zookeeper/conf ; export ZOOCFG=zoo.cfg ;source /etc/zookeeper/conf/zookeeper-env.sh ; /usr/lib/zookeeper/bin/zkServer.sh stop"
-
-sudo su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop regionserver"
-
-sudo su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop master"
-
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop tasktracker
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop historyserver
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop jobtracker
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop datanode
-
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop secondarynamenode.
-
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop namenode
-sudo python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent
-sudo yum --assumeyes install pdsh
-
-#==============================================
-#Erase all packages
-echo "***INFO: Erasing yum packages"
-sudo yum --assumeyes erase epel-release
-sudo yum --assumeyes erase ganglia-gmond
-sudo yum --assumeyes erase ganglia-web
-sudo yum --assumeyes erase hadoop*
-sudo yum --assumeyes erase libconfuse
-sudo yum --assumeyes erase libganglia
-sudo yum --assumeyes erase lzo
-sudo yum --assumeyes erase lzo-devel
-sudo yum --assumeyes erase ambari-agent
-sudo yum --assumeyes erase ambari-log4j
-sudo yum --assumeyes erase ambari-server
-sudo yum --assumeyes erase perl-rrdtool
-sudo yum --assumeyes erase perl-Crypt-DES
-sudo yum --assumeyes erase perl-Net-SNMP
-sudo yum --assumeyes erase perl-Digest-SHA1
-sudo yum --assumeyes erase perl-Digest-HMAC
-sudo yum --assumeyes erase nagios*
-sudo yum --assumeyes erase fping
-sudo yum --assumeyes erase python-rrdtool
-sudo yum --assumeyes erase rrdtool
-sudo yum --assumeyes erase snappy-devel
-sudo yum --assumeyes erase webhcat-tar-hive
-sudo yum --assumeyes erase extjs
-sudo yum --assumeyes erase webhcat-tar-pig
-sudo yum --assumeyes erase zookeeper
-sudo yum --assumeyes erase snappy
-sudo yum --assumeyes erase oozie
-sudo yum --assumeyes erase oozie-client
-sudo yum --assumeyes erase jdk.x86_84
-
-#==============================================
-#Remove all directories
-echo "***INFO: Removing directories"
-sudo yum --assumeyes remove hcatalog\*
-sudo yum --assumeyes remove hive\*
-sudo yum --assumeyes remove tez
-sudo yum --assumeyes remove hbase\*
-sudo yum --assumeyes remove zookeeper\*
-sudo yum --assumeyes remove pig\*
-sudo yum --assumeyes remove snappy\*
-sudo yum --assumeyes remove hadoop-lzo\*
-sudo yum --assumeyes remove hadoop\*
-sudo yum --assumeyes remove extjs-2.2-1 mysql-connector-java-5.0.8-1\*
-sudo rm -rf /var/cache/yum/x86_64/6/*ambari*
-sudo yum clean all
-
-sudo rm -rf /usr/sbin/ambari*
-sudo rm -rf /usr/lib/hcatalog
-sudo rm -rf /usr/lib64/nagios
-sudo rm -rf /usr/share/hdp/nagios
-sudo rm -rf /usr/include/hadoop
-sudo rm -rf /usr/hdp*
-sudo rm -rf /hadoop
-sudo rm -rf /mnt/hadoop*
-sudo rm -rf /etc/yum.repos.d/ambari* /etc/yum.repos.d/HDP*
-sudo rm -rf /etc/ambari*
-sudo rm -rf /etc/hadoop*
-sudo rm -rf /etc/hbase
-sudo rm -rf /etc/hive
-sudo rm -rf /etc/impala
-sudo rm -rf /etc/oozie
-sudo rm -rf /etc/pig
-sudo rm -rf /etc/sqoop*
-sudo rm -rf /etc/zookeeper
-sudo rm -rf /etc/flume*
-sudo rm -rf /etc/hcatalog
-sudo rm -rf /etc/ganglia
-sudo rm -rf /etc/nagios
-sudo rm -rf /etc/webhcat
-sudo rm -rf /etc/hadoop
-sudo rm -rf /etc/hive
-
-sudo rm -rf /var/log/ambari*
-sudo rm -rf /var/log/flume*
-sudo rm -rf /var/log/hadoop*
-sudo rm -rf /var/log/hbase
-sudo rm -rf /var/log/hive
-sudo rm -rf /var/log/hue
-sudo rm -rf /var/log/oozie
-sudo rm -rf /var/log/zookeeper
-sudo rm -rf /var/log/webhcat
-sudo rm -rf /var/log/nagios
-
-sudo rm -rf /var/run/hadoop
-sudo rm -rf /var/run/hadoop-yarn
-sudo rm -rf /var/run/hadoop-mapreduce
-sudo rm -rf /var/run/ganglia
-sudo rm -rf /var/run/oozie
-sudo rm -rf /var/run/zookeeper
-sudo rm -rf /var/run/webhcat
-sudo rm -rf /var/run/nagios
-sudo rm -rf /var/run/hbase
-sudo rm -rf /var/run/hive
-
-sudo rm -rf /usr/lib/hadoop
-sudo rm -rf /usr/lib/hbase
-sudo rm -rf /usr/lib/hive
-sudo rm -rf /usr/lib/oozie
-sudo rm -rf /usr/lib/zookeeper
-sudo rm -rf /usr/lib/nagios
-sudo rm -rf /usr/lib/ambari*
-sudo rm -rf /var/lib/ambari-agent
-sudo rm -rf /var/lib/ambari-server
-sudo rm -rf /var/lib/ganglia
-sudo rm -rf /var/lib/oozie
-sudo rm -rf /var/lib/zookeeper
-sudo rm -rf /var/lib/hadoop-hdfs
-sudo rm -rf /var/lib/mysql/hive*
-
-sudo rm -rf /var/hadoop
-sudo rm -rf /var/nagios
-sudo rm -rf /var/tmp/oozie
-sudo rm -rf /tmp/hive
-sudo rm -rf /tmp/hadoop
-sudo rm -rf /var/cache/yum/x86_64/6/Updates-ambari*
-sudo rm -rf /var/cache/yum/x86_64/6/ambari*
-sudo rm -rf /var/spool/mail/zookeeper
-sudo rm -rf /var/spool/mail/hive
-sudo rm -rf /var/spool/mail/hbase
-sudo rm -rf /var/spool/mail/hdfs
-sudo rm -rf /var/spool/mail/hcat
-sudo rm -rf /var/spool/mail/nagios
-sudo rm -rf /var/spool/mail/mapred
-
-sudo rm -rf /kdump/hadoop
-sudo rm -rf /hadoop
-sudo rm -rf /etc/init.d/ambari*
-
-#==============================================
-#Deleting all userids
-echo "***INFO: Deleting userids"
-sudo /usr/sbin/userdel -fr ambari-qa
-sudo /usr/sbin/userdel -fr mapred
-sudo /usr/sbin/userdel -fr hdfs
-sudo /usr/sbin/userdel -fr rrdcached
-sudo /usr/sbin/userdel -fr hbase
-sudo /usr/sbin/userdel -fr hive
-sudo /usr/sbin/userdel -fr hcat
-sudo /usr/sbin/userdel -fr oozie
-sudo /usr/sbin/userdel -fr sqoop
-sudo /usr/sbin/userdel -fr zookeeper
-sudo /usr/sbin/userdel -fr pulse
-sudo /usr/sbin/userdel -fr nagios
-sudo /usr/sbin/userdel -fr yarn
-sudo /usr/sbin/userdel -fr flume
-sudo /usr/sbin/userdel -fr hue
-sudo /usr/sbin/userdel -fr sqoop2
-
-sudo rm -rf /home/nagios*
-sudo rm -rf /home/mapred*
-sudo rm -rf /home/ambari-qa*
-sudo rm -rf /home/hcat*
-sudo rm -rf /home/hbase*
-sudo rm -rf /home/hive*
-sudo rm -rf /home/zookeeper*
-sudo rm -rf /home/hdfs*
-sudo rm -rf /home/hue*
-#==============================================
-#Deleting all ambari repos
-echo "***INFO: Deleting all ambari repos"
-
-listAmbariRepo=`sudo find / -name ambari.repo*`
-
-if [ ${#listAmbariRepo[@]} -ge 1 ]; then
- for i in ${listAmbariRepo[@]}; do
- sudo rm -rf $i
- done
-fi
-
-#==============================================
-#Deleting any leftover processes
-
-sudo pkill -f ambari
-sudo pkill -f hadoop
-sudo pkill -f zookeeper
-sudo pkill -f hbase
-sudo pkill -f hive
-sudo pkill -f yarn
-sudo pkill -f hdp
-#==============================================
-
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/traf_hortonworks_uninstall_suse
----------------------------------------------------------------------
diff --git a/install/installer/tools/traf_hortonworks_uninstall_suse b/install/installer/tools/traf_hortonworks_uninstall_suse
deleted file mode 100755
index 1f01fb4..0000000
--- a/install/installer/tools/traf_hortonworks_uninstall_suse
+++ /dev/null
@@ -1,232 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-# This script will uninstall Hortonworks
-
-#==============================================
-#Stop All Services
-sudo service nagios stop
-sudo /etc/init.d/hdp-gmetad stop
-sudo /etc/init.d/hdp-gmond stop
-sudo su -l hcat -c "/usr/lib/hcatalog/sbin/webhcat_server.sh stop"
-sudo ps aux | awk '{print $1,$2}' | grep hive | awk '{print $2}' | xargs kill >/dev/null 2>&1
-
-sudo su - zookeeper -c "export ZOOCFGDIR=/etc/zookeeper/conf ; export ZOOCFG=zoo.cfg ;source /etc/zookeeper/conf/zookeeper-env.sh ; /usr/lib/zookeeper/bin/zkServer.sh stop"
-
-sudo su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop regionserver"
-
-sudo su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop master"
-
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop tasktracker
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop historyserver
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop jobtracker
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop datanode
-
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop secondarynamenode.
-
-/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop namenode
-sudo python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent
-sudo zypper install -y pdsh
-
-#==============================================
-#Erase all packages
-echo "***INFO: Erasing rpm packages"
-sudo zypper remove -y epel-release
-sudo zypper remove -y ganglia-gmond
-sudo zypper remove -y ganglia-web
-sudo zypper remove -y hadoop*
-sudo zypper remove -y libconfuse
-sudo zypper remove -y libganglia
-sudo zypper remove -y lzo
-sudo zypper remove -y lzo-devel
-sudo zypper remove -y ambari-agent
-sudo zypper remove -y ambari-log4j
-sudo zypper remove -y ambari-server
-sudo zypper remove -y perl-rrdtool
-sudo zypper remove -y perl-Crypt-DES
-sudo zypper remove -y perl-Net-SNMP
-sudo zypper remove -y perl-Digest-SHA1
-sudo zypper remove -y perl-Digest-HMAC
-sudo zypper remove -y nagios*
-sudo zypper remove -y fping
-sudo zypper remove -y python-rrdtool
-sudo zypper remove -y rrdtool
-sudo zypper remove -y snappy-devel
-sudo zypper remove -y webhcat-tar-hive
-sudo zypper remove -y extjs
-sudo zypper remove -y webhcat-tar-pig
-sudo zypper remove -y zookeeper
-sudo zypper remove -y snappy
-sudo zypper remove -y oozie
-sudo zypper remove -y oozie-client
-sudo zypper remove -y jdk.x86_84
-
-#==============================================
-#Remove all directories
-echo "***INFO: Removing directories"
-sudo zypper remove -y hcatalog\*
-sudo zypper remove -y hive\*
-sudo zypper remove -y tez
-sudo zypper remove -y hbase\*
-sudo zypper remove -y zookeeper\*
-sudo zypper remove -y pig\*
-sudo zypper remove -y snappy\*
-sudo zypper remove -y hadoop-lzo\*
-sudo zypper remove -y hadoop\*
-sudo zypper remove -y extjs-2.2-1 mysql-connector-java-5.0.8-1\*
-sudo rm -rf /var/cache/yum/x86_64/6/*ambari*
-
-sudo rm -rf /usr/sbin/ambari*
-sudo rm -rf /usr/lib/hcatalog
-sudo rm -rf /usr/lib64/nagios
-sudo rm -rf /usr/share/hdp/nagios
-sudo rm -rf /usr/include/hadoop
-sudo rm -rf /usr/hdp*
-sudo rm -rf /hadoop
-sudo rm -rf /mnt/hadoop*
-sudo rm -rf /etc/yum.repos.d/ambari* /etc/yum.repos.d/HDP*
-sudo rm -rf /etc/ambari*
-sudo rm -rf /etc/hadoop*
-sudo rm -rf /etc/hbase
-sudo rm -rf /etc/hive
-sudo rm -rf /etc/impala
-sudo rm -rf /etc/oozie
-sudo rm -rf /etc/pig
-sudo rm -rf /etc/sqoop*
-sudo rm -rf /etc/zookeeper
-sudo rm -rf /etc/flume*
-sudo rm -rf /etc/hcatalog
-sudo rm -rf /etc/ganglia
-sudo rm -rf /etc/nagios
-sudo rm -rf /etc/webhcat
-sudo rm -rf /etc/hadoop
-sudo rm -rf /etc/hive
-
-sudo rm -rf /var/log/ambari*
-sudo rm -rf /var/log/flume*
-sudo rm -rf /var/log/hadoop*
-sudo rm -rf /var/log/hbase
-sudo rm -rf /var/log/hive
-sudo rm -rf /var/log/hue
-sudo rm -rf /var/log/oozie
-sudo rm -rf /var/log/zookeeper
-sudo rm -rf /var/log/webhcat
-sudo rm -rf /var/log/nagios
-
-sudo rm -rf /var/run/hadoop
-sudo rm -rf /var/run/hadoop-yarn
-sudo rm -rf /var/run/hadoop-mapreduce
-sudo rm -rf /var/run/ganglia
-sudo rm -rf /var/run/oozie
-sudo rm -rf /var/run/zookeeper
-sudo rm -rf /var/run/webhcat
-sudo rm -rf /var/run/nagios
-sudo rm -rf /var/run/hbase
-sudo rm -rf /var/run/hive
-
-sudo rm -rf /usr/lib/hadoop
-sudo rm -rf /usr/lib/hbase
-sudo rm -rf /usr/lib/hive
-sudo rm -rf /usr/lib/oozie
-sudo rm -rf /usr/lib/zookeeper
-sudo rm -rf /usr/lib/nagios
-sudo rm -rf /usr/lib/ambari*
-sudo rm -rf /var/lib/ambari-agent
-sudo rm -rf /var/lib/ambari-server
-sudo rm -rf /var/lib/ganglia
-sudo rm -rf /var/lib/oozie
-sudo rm -rf /var/lib/zookeeper
-sudo rm -rf /var/lib/hadoop-hdfs
-sudo rm -rf /var/lib/mysql/hive*
-
-sudo rm -rf /var/hadoop
-sudo rm -rf /var/nagios
-sudo rm -rf /var/tmp/oozie
-sudo rm -rf /tmp/hive
-sudo rm -rf /tmp/hadoop
-sudo rm -rf /var/cache/yum/x86_64/6/Updates-ambari*
-sudo rm -rf /var/cache/yum/x86_64/6/ambari*
-sudo rm -rf /var/spool/mail/zookeeper
-sudo rm -rf /var/spool/mail/hive
-sudo rm -rf /var/spool/mail/hbase
-sudo rm -rf /var/spool/mail/hdfs
-sudo rm -rf /var/spool/mail/hcat
-sudo rm -rf /var/spool/mail/nagios
-sudo rm -rf /var/spool/mail/mapred
-
-sudo rm -rf /kdump/hadoop
-sudo rm -rf /hadoop
-sudo rm -rf /etc/init.d/ambari*
-
-#==============================================
-#Deleting all userids
-echo "***INFO: Deleting userids"
-sudo /usr/sbin/userdel -fr ambari-qa
-sudo /usr/sbin/userdel -fr mapred
-sudo /usr/sbin/userdel -fr hdfs
-sudo /usr/sbin/userdel -fr rrdcached
-sudo /usr/sbin/userdel -fr hbase
-sudo /usr/sbin/userdel -fr hive
-sudo /usr/sbin/userdel -fr hcat
-sudo /usr/sbin/userdel -fr oozie
-sudo /usr/sbin/userdel -fr sqoop
-sudo /usr/sbin/userdel -fr zookeeper
-sudo /usr/sbin/userdel -fr pulse
-sudo /usr/sbin/userdel -fr nagios
-sudo /usr/sbin/userdel -fr yarn
-sudo /usr/sbin/userdel -fr flume
-sudo /usr/sbin/userdel -fr hue
-sudo /usr/sbin/userdel -fr sqoop2
-
-sudo rm -rf /home/nagios*
-sudo rm -rf /home/mapred*
-sudo rm -rf /home/ambari-qa*
-sudo rm -rf /home/hcat*
-sudo rm -rf /home/hbase*
-sudo rm -rf /home/hive*
-sudo rm -rf /home/zookeeper*
-sudo rm -rf /home/hdfs*
-sudo rm -rf /home/hue*
-#==============================================
-#Deleting all ambari repos
-echo "***INFO: Deleting all ambari repos"
-
-listAmbariRepo=`sudo find / -name ambari.repo*`
-
-if [ ${#listAmbariRepo[@]} -ge 1 ]; then
- for i in ${listAmbariRepo[@]}; do
- sudo rm -rf $i
- done
-fi
-
-#==============================================
-#Deleting any leftover processes
-
-sudo pkill -f ambari
-sudo pkill -f hadoop
-sudo pkill -f zookeeper
-sudo pkill -f hbase
-sudo pkill -f hive
-sudo pkill -f yarn
-sudo pkill -f hdp
-#==============================================
-
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/traf_mapr_uninstall
----------------------------------------------------------------------
diff --git a/install/installer/tools/traf_mapr_uninstall b/install/installer/tools/traf_mapr_uninstall
deleted file mode 100755
index 78c1368..0000000
--- a/install/installer/tools/traf_mapr_uninstall
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-# @@@ 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 @@@
-
-#This script will uninstall MapR
-
-#==============================================
-#Stop the Warden on all nodes
-service mapr-warden stop
-
-#Stop ZooKeeper on all nodes
-service mapr-zookeeper stop
-
-#Delete all mapr-core* files
-sudo yum --assumeyes erase mapr-core\*
-
-#Delete all mapr-zk-internal* files
-sudo yum --assumeyes erase mapr-zk-internal\*
-
-#Delete /opt/mapr directory and all files within
-sudo rm -rf /opt/mapr
-
-#Delete /opt/storagefile and /opt/mapr-setup
-sudo rm -rf /opt/storagefile
-sudo rm -rf /opt/mapr-setup
-
-#Delete any cached repos
-sudo rm -rf /var/cache/yum/x86_64/6/mapr*
-sudo yum clean all
-
-#==============================================
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/trafodion_scanner
----------------------------------------------------------------------
diff --git a/install/installer/tools/trafodion_scanner b/install/installer/tools/trafodion_scanner
deleted file mode 100755
index e9a8ed8..0000000
--- a/install/installer/tools/trafodion_scanner
+++ /dev/null
@@ -1,525 +0,0 @@
-#!/usr/bin/python -tt
-
-# @@@ 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 @@@
-
-import os
-import sys
-import tempfile
-import re
-import logging
-import subprocess
-import string
-from optparse import OptionParser
-
-# exit codes
-EXIT_SUCCESS = 0 # Success
-EXIT_GENERAL_ERROR = 1 # One or more errors encountered (invalid arguments, prerequisites not satisfied, can't execute check command, etc)
-EXIT_CHECK_ERROR = 2 # At least one check failed with error severity (required configuration)
-EXIT_CHECK_WARNING = 3 # At least one check failed with warning severity (recommended configuration) and no checks failed with error severity
-
-# default trafodion configuration file
-DEFAULT_TRAFODION_CONFIG_FILE = '/etc/trafodion/trafodion_config'
-
-# logger name
-LOGGER_NAME = 'trafodion_scanner'
-
-def configure_logger(log_file):
- logger = logging.getLogger(LOGGER_NAME)
- logger.setLevel(logging.DEBUG)
- formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
- fh = logging.FileHandler(log_file)
- fh.setLevel(logging.DEBUG)
- fh.setFormatter(formatter)
- logger.addHandler(fh)
- return logger
-
-def report_error_and_exit(error_string):
- print(error_string)
- logger = logging.getLogger(LOGGER_NAME)
- logger.error(error_string);
- sys.exit(EXIT_GENERAL_ERROR)
-
-def compare_check_result(result, expected_result, comparison_operator):
- # for the comparison operators (str_lt, str_le, str_eq, str_ne, str_ge, str_gt),
- # we first cast the result and expected_result to string type, to enable correct comparison
- if (comparison_operator.startswith('str_')):
- result = str(result); expected_result = str(expected_result)
-
- # for the comparison operators (int_lt, int_le, int_eq, int_ne, int_ge, int_gt),
- # we first cast the result and expected_result to integer type, to enable correct comparison
- if (comparison_operator.startswith('int_')):
- result = int(result); expected_result = int(expected_result)
-
- if (comparison_operator.endswith('lt')):
- return expected_result < result
- if (comparison_operator.endswith('le')):
- return expected_result <= result
- if (comparison_operator.endswith('eq')):
- return expected_result == result
- if (comparison_operator.endswith('ne')):
- return expected_result != result
- if (comparison_operator.endswith('ge')):
- return expected_result >= result
- if (comparison_operator.endswith('gt')):
- return expected_result > result
-
-def exec_command(cmd_string):
- temp_file=tempfile.TemporaryFile()
- exit_code = subprocess.call(cmd_string, stdout=temp_file, stderr=subprocess.STDOUT, shell=True)
- temp_file.seek(0) # go back to start of file before read
- cmd_output = temp_file.read()
- cmd_output = cmd_output.strip() # trim leading and trailing whitespace
- return (cmd_output, exit_code)
-
-def exec_command_remote(cmd_string, node_name):
- named_temp_file=tempfile.NamedTemporaryFile(delete=False)
- named_temp_file.write(cmd_string)
- named_temp_file.close()
- cmd = 'cat ' + named_temp_file.name + ' | ssh -oStrictHostKeyChecking=no -oBatchMode=yes -q -T ' + node_name
- (cmd_output, exit_code) = exec_command(cmd)
- os.remove(named_temp_file.name)
- return (cmd_output, exit_code)
-
-def exec_command_interactive(cmd_string):
- exit_code = subprocess.call(cmd_string, shell=True)
- return exit_code
-
-def read_scanner_config(filename):
- with open(filename, 'r') as config:
- logger = logging.getLogger(LOGGER_NAME)
- logger.info("Reading scanner configuration file %s", filename)
- lines = []
- for line in config:
- if re.search('^#', line) or re.search('^\s*$', line): # skip comments and blank lines
- continue
- elif re.search(':::', line): # configuration line
- lines.append(line.split(':::'))
- elif len(lines) > 0: # multi-line command, append to the command in the last configuration line
- lines[-1][-1] += line
- else: # unexpected line, raise an error and exit
- err_str = 'Fatal error: encountered unexpected line in scanner configuration file: %s' % (line)
- report_error_and_exit(err_str)
- return lines
-
-def read_trafodion_config(filename):
- with open(filename, 'r') as config:
- logger = logging.getLogger(LOGGER_NAME)
- logger.info("Reading trafodion configuration file %s", filename)
- trafodion_config = {}
- for line in config:
- # skip comments and blank lines
- if re.search('^#', line) or re.search('^\s*$', line):
- continue
- # lines like this: export TRAF_USER="trafodion"
- match = re.search('^(\s*export)\s+(.+)="(.*)"\s*$', line)
- if match:
- trafodion_config[match.group(2).strip()] = match.group(3).strip() # trim leading and trailing whitespace
- continue
- # lines like this: TRAF_USER=trafodion
- match = re.search('^\s*(.+)=(.*)\s*$', line)
- if match:
- trafodion_config[match.group(1).strip()] = match.group(2).strip() # trim leading and trailing whitespace
- continue
- # unexpected line, raise an error and exit
- err_str = 'Fatal error: encountered unexpected line in trafodion configuration file: %s' % (line)
- report_error_and_exit(err_str)
- return trafodion_config
-
-def replace_placeholders_in_command_string(cmd_string, placeholder_map):
- new_cmd_string = cmd_string
- for placeholder in placeholder_map:
- new_cmd_string = new_cmd_string.replace(placeholder, placeholder_map[placeholder])
- new_cmd_string = re.sub('<<<.*>>>', 'undefined', new_cmd_string) # handle unrecognized placeholders
- return new_cmd_string
-
-def validate_severity_level(severity_level, operation, name):
- if (severity_level not in ('error', 'warning')):
- err_str = 'Fatal error: invalid severity level "%s" ' % (severity_level)
- err_str += 'specified for %s operation "%s". Exiting.' % (operation, name)
- report_error_and_exit(err_str)
-
-def validate_comparison_operator(comparison_operator, operation, name):
- if (comparison_operator not in ('str_lt', 'str_le', 'str_eq', 'str_ne', 'str_ge', 'str_gt') and
- comparison_operator not in ('int_lt', 'int_le', 'int_eq', 'int_ne', 'int_ge', 'int_gt')):
- err_str = 'Fatal error: invalid comparison operator "%s" ' % (comparison_operator)
- err_str += 'specified for %s operation "%s". Exiting.' % (operation, name)
- report_error_and_exit(err_str)
-
-# This function will return a dictionary that's keyed by the distinct set of the input strings.
-# The value for each key will be the list of node names associated with each distinct input string.
-# Example:
-# INPUT:
-# list_of_node_names = ['n001', 'n002', 'n003', 'n004']
-# map_of_strings_by_node_name = {'n001': 'hello', 'n002': 'hi there', 'n003': 'hello', 'n004': 'goodbye'}
-# OUTPUT:
-# node_grouping = {'hello': ['n001', 'n003'], 'hi there': ['n002'], 'goodbye': ['n004']}
-def group_nodes_by_string(list_of_node_names, map_of_strings_by_node_name):
- node_grouping = {}
- for node_name in list_of_node_names:
- if node_name in map_of_strings_by_node_name:
- string_for_node = map_of_strings_by_node_name[node_name]
- else:
- string_for_node = ''
- if string_for_node in node_grouping:
- node_grouping[string_for_node].append(node_name)
- else:
- node_grouping[string_for_node] = [node_name]
- return node_grouping
-
-def check_passwordless_ssh_and_sudo_access(list_of_node_names):
- logger = logging.getLogger(LOGGER_NAME)
- count_of_nodes = len(list_of_node_names)
- count_of_inaccessible_nodes = 0
- count_of_nodes_without_sudo_access = 0
- count_of_nodes_with_error = 0
- for node_name in list_of_node_names:
- cmd = 'echo "sudo -n echo test >/dev/null" | ssh -oStrictHostKeyChecking=no -oBatchMode=yes -T ' + node_name
- (cmd_output, exit_code) = exec_command(cmd)
- # ssh exits with 255 if an ssh-related error occurred, otherwise with the exit status of the remote command
- if exit_code == 255:
- count_of_inaccessible_nodes += 1
- err_str = '***ERROR: Unable to access %s via passwordless ssh: %s' % (node_name, cmd_output)
- logger.error(err_str); print(err_str)
- # sudo exits with 1 if there is a configuration/permission problem
- elif exit_code == 1:
- count_of_nodes_without_sudo_access += 1
- if 'must have a tty to run sudo' in cmd_output:
- err_str = '***ERROR: sudo access is not correctly configured for the user running this script '
- err_str += 'on node %s: requiretty must be disabled for this user in /etc/sudoers.' % (node_name)
- logger.error(err_str); print(err_str)
- else:
- err_str = '***ERROR: sudo access is not enabled for the user running this script '
- err_str += 'on node %s: this script must be run by a user with full sudo access.' % (node_name)
- logger.error(err_str); print(err_str)
- # unexpected error encountered
- elif exit_code != 0:
- count_of_nodes_with_error += 1
- err_str = '***ERROR: could not check passwordless ssh and/or sudo access on node %s.' % (node_name)
- err_str += '\nError details: command executed: %s, exit code: %d, output: %s' % (cmd, exit_code, cmd_output)
- logger.error(err_str); print(err_str)
- if count_of_inaccessible_nodes > 0:
- err_str = 'Fatal error: unable to access %d of %d ' % (count_of_inaccessible_nodes, count_of_nodes)
- err_str += 'specified nodes via passwordless ssh.'
- logger.error(err_str); print(err_str)
- if count_of_nodes_without_sudo_access > 0:
- err_str = 'Fatal error: sudo access is not enabled and/or correctly configured for the user running '
- err_str += 'this script on %d of %d specified nodes.' % (count_of_nodes_without_sudo_access, count_of_nodes)
- logger.error(err_str); print(err_str)
- if count_of_nodes_with_error > 0:
- err_str = 'Fatal error: could not check passwordless ssh and/or sudo access on '
- err_str += '%d of %d specified nodes.' % (count_of_nodes_with_error, count_of_nodes)
- logger.error(err_str); print(err_str)
- if count_of_inaccessible_nodes > 0 or count_of_nodes_without_sudo_access > 0 or count_of_nodes_with_error > 0:
- err_str = 'Exiting due to fatal error(s).'
- logger.error(err_str); print(err_str)
- sys.exit(EXIT_GENERAL_ERROR)
-
-def main(argv):
- parser = OptionParser()
- parser.add_option("-c", "--scanner_config_file", dest="scanner_config_file",
- help="Scanner configuration file. Default is ./trafodion_scanner.cfg.",
- default="./trafodion_scanner.cfg")
- parser.add_option("-t", "--trafodion_config_file", dest="trafodion_config_file",
- help="Trafodion configuration file. Default is %s." % (DEFAULT_TRAFODION_CONFIG_FILE),
- default=DEFAULT_TRAFODION_CONFIG_FILE)
- parser.add_option("-l", "--log_file", dest="log_file",
- help="Scanner log file. Default is ./trafodion_scanner.log. "\
- "If the file doesn't exist, it will be created. Otherwise, the existing file will be appended.",
- default="./trafodion_scanner.log")
- parser.add_option("-o", "--single_operation", dest="single_operation",
- help="Execute a single operation from the Scanner configuration file. "\
- "The operation must be specified by name. This option can be used for operations "\
- "of type CHECK_CONFIG and COMPARE_CONFIG. Example: --single_operation \"MinNumCores\".")
- parser.add_option("-p", "--skip_prerequisite_checks", dest="skip_prerequisite_checks", action='store_true',
- help="This special option causes the Scanner to skip the prerequisite checks "\
- "that are normally executed at the beginning: passwordless ssh access checks and sudo access "\
- "checks. This option is especially useful in combination with the --single_operation (-o) option.",
- default=False)
- (options, args) = parser.parse_args()
-
- # for convenience, set flag variables based on some of the options
- single_operation_flag = False if ((options.single_operation is None) or (len(options.single_operation.strip()) == 0)) else True
- skip_prerequisite_checks_flag = True if options.skip_prerequisite_checks == True else False
-
- # special variable placeholders and their values, for replacement in the command strings
- placeholder_map = {}
-
- # severity level for each CHECK_CONFIG and COMPARE_CONFIG operation (by name), for summary info reporting
- severity_map = {}
-
- try:
- logger = configure_logger(options.log_file)
- except IOError as e:
- print 'Fatal error: cannot open log file "%s": %s\nExiting.' % (options.log_file, e.strerror)
- sys.exit(EXIT_GENERAL_ERROR)
-
- logger.info('Started')
- logger.info('Using the following options: --scanner_config_file="%s", --trafodion_config_file="%s", '\
- '--log_file="%s", --single_operation="%s", --skip_prerequisite_checks="%s"',
- options.scanner_config_file, options.trafodion_config_file, options.log_file,
- options.single_operation, options.skip_prerequisite_checks)
-
- # obtain the Trafodion configuration settings
- # if the options.trafodion_config_file exists we use it, otherwise we invoke the traf_config_setup script
- # to create a new trafodion configuration file (DEFAULT_TRAFODION_CONFIG_FILE)
- if os.path.isfile(options.trafodion_config_file):
- trafodion_config_file = options.trafodion_config_file
- else:
- logger.info('Trafodion configuration file "%s" not found, invoking traf_config_setup', options.trafodion_config_file)
- trafodion_config_file = DEFAULT_TRAFODION_CONFIG_FILE
- this_script_dir = os.path.dirname(os.path.abspath(__file__))
- traf_config_setup_script_dir = os.path.abspath(this_script_dir + '/../')
- command_string = 'cd ' + traf_config_setup_script_dir + '; ./traf_config_setup --scanner_mode'
- exit_code = exec_command_interactive(command_string)
- if exit_code != 0:
- err_str = 'Fatal error: traf_config_setup failed\nError details: '
- err_str += 'command executed: %s, exit code: %d\nExiting.' % (command_string, exit_code)
- report_error_and_exit(err_str)
- try:
- trafodion_config=read_trafodion_config(trafodion_config_file)
- except IOError as e:
- err_str = 'Fatal error: cannot open trafodion configuration file "%s": %s\nExiting.' % (trafodion_config_file, e.strerror)
- report_error_and_exit(err_str)
- trafodion_config_settings_string = ''
- for key in sorted(trafodion_config):
- trafodion_config_settings_string += ' %s = "%s"\n' % (key, trafodion_config[key])
- logger.info('Using the following trafodion configuration settings:\n%s', trafodion_config_settings_string)
-
- # set variables based on the trafodion configuration
- if 'NODE_LIST' in trafodion_config:
- list_of_node_names = sorted(trafodion_config['NODE_LIST'].split())
- count_of_nodes = len(list_of_node_names)
- if count_of_nodes == 0:
- err_str = 'Fatal error: the NODE_LIST trafodion configuration setting is empty.\nExiting.'
- report_error_and_exit(err_str)
- else:
- err_str = 'Fatal error: the NODE_LIST trafodion configuration setting is not defined.\nExiting.'
- report_error_and_exit(err_str)
- for variable in trafodion_config:
- placeholder_map['<<<' + variable + '>>>'] = trafodion_config[variable]
-
- # execute the prerequisite checks
- if (not skip_prerequisite_checks_flag):
- info_str = 'Executing prerequisite checks.'
- logger.info(info_str); print(info_str)
-
- # we first validate that we can access the specified nodes via passwordless ssh
- # and that the userid running this script has full sudo access (required for some
- # scanner checks and also for the Trafodion installation)
- check_passwordless_ssh_and_sudo_access(list_of_node_names)
-
- info_str = 'Prerequisite checks completed.'
- logger.info(info_str); print(info_str)
-
- num_RECORD_CONFIG_operations_done = 0
- num_CHECK_CONFIG_operations_done = 0
- num_COMPARE_CONFIG_operations_done = 0
- check_exit_code = EXIT_SUCCESS
-
- check_failures_per_node = {}
- for node_name in list_of_node_names:
- check_failures_per_node[node_name] = []
-
- try:
- scan_lines=read_scanner_config(options.scanner_config_file)
- except IOError as e:
- err_str = 'Fatal error: cannot open scanner configuration file "%s": %s\nExiting.' % (options.scanner_config_file, e.strerror)
- report_error_and_exit(err_str)
-
- for i in range(len(scan_lines)):
- operation = scan_lines[i][0].strip() # trim leading and trailing whitespace
-
- # RECORD_CONFIG ::: <description> ::: <command>
- if (operation == 'RECORD_CONFIG'):
- descripion = scan_lines[i][1].strip() # trim leading and trailing whitespace
- command_string = scan_lines[i][2].strip() # trim leading and trailing whitespace
-
- # special logic for the --single_operation (-o) option
- if (single_operation_flag):
- continue
-
- num_RECORD_CONFIG_operations_done += 1
-
- # before command execution, we need to replace the special variable placeholders
- # in the command string with the corresponding values
- command_string = replace_placeholders_in_command_string(command_string, placeholder_map)
-
- for node_name in list_of_node_names:
- (command_output, exit_code) = exec_command_remote(command_string, node_name)
-
- logger.info('Configuration Recorded on node %s: %s: command executed: "%s", command output:\n%s\n',
- node_name, descripion, command_string, command_output)
- print 'Configuration Recorded on node ' + node_name + ': ' + string.ljust(descripion, 59) + '(see log)'
-
- # CHECK_CONFIG ::: <name> ::: <description> ::: <severity level> ::: <expected value> ::: <comparison operator> ::: <command>
- elif (operation == 'CHECK_CONFIG'):
- name = scan_lines[i][1].strip() # trim leading and trailing whitespace
- descripion = scan_lines[i][2].strip() # trim leading and trailing whitespace
- severity_level = scan_lines[i][3].strip() # trim leading and trailing whitespace
- expected_value = scan_lines[i][4].strip() # trim leading and trailing whitespace
- comparison_operator = scan_lines[i][5].strip() # trim leading and trailing whitespace
- command_string = scan_lines[i][6].strip() # trim leading and trailing whitespace
-
- # special logic for the --single_operation (-o) option
- if (single_operation_flag and options.single_operation.strip() != name):
- continue
-
- num_CHECK_CONFIG_operations_done += 1
-
- # validate the severity_level
- validate_severity_level(severity_level, operation, name)
-
- # record severity level for summary info reporting
- severity_map[name] = severity_level
-
- # validate the comparison_operator
- validate_comparison_operator(comparison_operator, operation, name)
-
- # before command execution, we need to replace the special variable placeholders
- # in the command string with the corresponding values
- command_string = replace_placeholders_in_command_string(command_string, placeholder_map)
-
- for node_name in list_of_node_names:
- (command_output, exit_code) = exec_command_remote(command_string, node_name)
-
- try:
- compare_outcome = compare_check_result(command_output, expected_value, comparison_operator)
- except ValueError:
- compare_outcome = False
-
- if (compare_outcome):
- check_outcome = "PASSED"
- else:
- check_outcome = "FAILED [%s]" % (severity_level)
- check_failures_per_node[node_name].append(name)
- if severity_level == 'error' and (check_exit_code == EXIT_SUCCESS or check_exit_code == EXIT_CHECK_WARNING):
- check_exit_code = EXIT_CHECK_ERROR
- elif severity_level == 'warning' and (check_exit_code == EXIT_SUCCESS):
- check_exit_code = EXIT_CHECK_WARNING
-
- detail_str = ' EXECUTION DETAILS: command executed: "%s", command output: "%s"\n' % (command_string, command_output)
- detail_str += ' EXPECTED RESULT: <expected value> <comparison operator> <command output>: '
- detail_str += '"%s" %s "%s" --> ' % (expected_value, comparison_operator, command_output)
- detail_str += 'condition satisfied' if check_outcome == "PASSED" else 'condition not satisfied'
- logger.info('Configuration Checked on node %s: %s: %s: %s\n%s\n',
- node_name, name, descripion, check_outcome, detail_str)
- print 'Configuration Checked on node ' + node_name + ': ' + string.ljust(descripion, 60) + ':' + check_outcome
-
- # COMPARE_CONFIG ::: <name> ::: <description> ::: <severity level> ::: <command>
- elif (operation == 'COMPARE_CONFIG'):
- name = scan_lines[i][1].strip() # trim leading and trailing whitespace
- descripion = scan_lines[i][2].strip() # trim leading and trailing whitespace
- severity_level = scan_lines[i][3].strip() # trim leading and trailing whitespace
- command_string = scan_lines[i][4].strip() # trim leading and trailing whitespace
-
- # special logic for the --single_operation (-o) option
- if (single_operation_flag and options.single_operation.strip() != name):
- continue
-
- num_COMPARE_CONFIG_operations_done += 1
-
- # validate the severity_level
- validate_severity_level(severity_level, operation, name)
-
- # record severity level for summary info reporting
- severity_map[name] = severity_level
-
- # before command execution, we need to replace the special variable placeholders
- # in the command string with the corresponding values
- command_string = replace_placeholders_in_command_string(command_string, placeholder_map)
-
- node_output_map = {}
- for node_name in list_of_node_names:
- (command_output, exit_code) = exec_command_remote(command_string, node_name)
- node_output_map[node_name] = command_output
- output_node_grouping = group_nodes_by_string(list_of_node_names, node_output_map)
- if (len(output_node_grouping) == 1):
- # there is only one item in the output_node_grouping dictionary,
- # which means that all nodes had the same command ouput
- check_outcome = "PASSED"
- else:
- check_outcome = "FAILED [%s]" % (severity_level)
- # this check failed for all the nodes because they were found to be inconsistent
- for node_name in list_of_node_names:
- check_failures_per_node[node_name].append(name)
- if severity_level == 'error' and (check_exit_code == EXIT_SUCCESS or check_exit_code == EXIT_CHECK_WARNING):
- check_exit_code = EXIT_CHECK_ERROR
- elif severity_level == 'warning' and (check_exit_code == EXIT_SUCCESS):
- check_exit_code = EXIT_CHECK_WARNING
-
- detail_str = ' EXECUTION DETAILS: command executed on each node: "%s"\n' % (command_string)
- detail_str += ' EXPECTED RESULT: all nodes produce the same output\n'
- detail_str += ' ACTUAL RESULT: '
- if (check_outcome == "PASSED"):
- detail_str += 'all nodes produced the same output: %s\n' % (output_node_grouping.keys().pop())
- else:
- detail_str += 'nodes produced different output: \n'
- for node_output_string in output_node_grouping:
- detail_str += ' ' + ', '.join(output_node_grouping[node_output_string]) + ': ' + node_output_string + '\n'
- logger.info('Consistency Checked among all nodes: %s: %s: %s\n%s\n', name, descripion, check_outcome, detail_str)
- print 'Consistency Checked among all nodes' + ': ' + string.ljust(descripion, 59) + ':' + check_outcome
-
- # unexpected operation type
- else:
- err_str = 'Fatal error: invalid operation type "%s" specified. Exiting.' % (operation)
- report_error_and_exit(err_str)
-
- # special logic for the --single_operation (-o) option
- if (single_operation_flag and (num_CHECK_CONFIG_operations_done == 0 and num_COMPARE_CONFIG_operations_done == 0)):
- err_str = 'Fatal error: invalid operation name "%s" specified ' % (options.single_operation.strip())
- err_str += 'for the --single_operation (-o) option. Exiting.'
- report_error_and_exit(err_str)
-
- ### report summary stats ###
-
- check_failures_per_node_as_sorted_strings = {}
- for node_name in list_of_node_names:
- sorted_string = ''
- if len(check_failures_per_node[node_name]) == 0:
- sorted_string = 'All checks PASSED'
- else:
- sorted_check_failure_list = sorted(check_failures_per_node[node_name])
- for check_failure in sorted_check_failure_list:
- if sorted_string != '': sorted_string += ', '
- sorted_string += check_failure + ' check FAILED [%s]' % (severity_map[check_failure])
- check_failures_per_node_as_sorted_strings[node_name] = sorted_string
-
- check_failures_node_grouping = group_nodes_by_string(list_of_node_names, check_failures_per_node_as_sorted_strings)
-
- summary_string = 'Completed Execution on ' + str(count_of_nodes) + ' nodes: ' + ', '.join(list_of_node_names) + '\n'
- summary_string += 'Results: \n'
- for check_failures_sorted_string in sorted(check_failures_node_grouping, key=len):
- summary_string += ' ' + ', '.join(check_failures_node_grouping[check_failures_sorted_string])
- summary_string += ' - ' + check_failures_sorted_string + '\n'
-
- log_file_string = '\nAdditional details in log file: %s\n' % (os.path.abspath(options.log_file))
-
- logger.info('\n\n******* SUMMARY *******\n%s', summary_string)
- print '\n******* SUMMARY *******\n' + summary_string + log_file_string
-
- logger.info('Execution completed, exiting with status code %d', check_exit_code)
-
- sys.exit(check_exit_code)
-
-# Call the main() function to begin the program
-if __name__ == '__main__':
- main(sys.argv[1:])
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/54459952/install/installer/tools/trafodion_scanner.cfg
----------------------------------------------------------------------
diff --git a/install/installer/tools/trafodion_scanner.cfg b/install/installer/tools/trafodion_scanner.cfg
deleted file mode 100644
index 980ad56..0000000
--- a/install/installer/tools/trafodion_scanner.cfg
+++ /dev/null
@@ -1,194 +0,0 @@
-# @@@ 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 @@@
-
-# Configuration file for the Trafodion Scanner
-#
-# A line with comments must start with a '#' character.
-#
-# The Trafodion Scanner can be configured to perform one or more of the
-# following operations: RECORD_CONFIG, CHECK_CONFIG, COMPARE_CONFIG.
-#
-# The RECORD_CONFIG operation is used to collect various system information for future
-# reference, such as to aid with troubleshooting. This is done by executing a command
-# on each node specified in the Trafodion configuration and recording the output
-# in the trafodion_scanner log file.
-#
-# The CHECK_CONFIG operation is used to check the cluster for attributes
-# that will commonly cause Trafodion installation issues, runtime performance problems,
-# and so on. These attributes are divided into two categories: required and recommended.
-# The checks for required attributes are configured with a severity level of [error],
-# while the checks for recommended attributes are configured with a severity level of [warning].
-# A check is performed by executing a command on each node specified in the Trafodion
-# configuration and comparing the output against an expected value, using the specified
-# comparison operator.
-#
-# The COMPARE_CONFIG operation is used to check the consistency among all cluster nodes, for
-# example, check whether all nodes have the same HBase version. This is done by executing a
-# command on each node specified in the Trafodion configuration and comparing the output.
-# If the output is different, the nodes are deemed to be inconsistent. Similar to
-# the CHECK_CONFIG operation, a severity level of either [error] or [warning] is configured
-# for each consistency check.
-#
-# Here is the precise specification format for each type of operation:
-#
-# CHECK_CONFIG ::: <name> ::: <description> ::: <severity level> ::: <expected value> ::: <comparison operator> ::: <command>
-# COMPARE_CONFIG ::: <name> ::: <description> ::: <severity level> ::: <command>
-# RECORD_CONFIG ::: <description> ::: <command>
-#
-# Here is an explanation of each token:
-#
-# <name> is a short identifier for the configured operation. It must be unique. In other words,
-# the same name cannot be used for multiple operations within a configuration file.
-#
-# <description> is an English description for the configured operation.
-#
-# <severity level> is the severity level for the configured operation. The possible values are 'error' and 'warning'.
-#
-# <expected value> is the expected value for the configured operation.
-#
-# <comparison operator> is the operator to use for comparison of the <expected value> and "<command> output".
-# There are two types of operators: for string comparison and integer comparison.
-# The available operators for string comparison are: str_lt, str_le, str_eq, str_ne, str_ge, str_gt.
-# The available operators for integer comparison are: int_lt, int_le, int_eq, int_ne, int_ge, int_gt.
-# Here is the meaning for each operator: lt means "less than", le means "less than or equal",
-# eq means "equal", ne means "not equal", ge means "greater than or equal", gt means "greater than".
-# The operator will be applied as follows: <expected value> <comparison operator> "<command> output",
-# for example: <expected value> int_le "<command> output". The comparison will be done only once, on
-# the entire "<command> output", even if it contains multiple values/lines.
-#
-# <command> is the command to execute for the configured operation. This command will be executed on each node specified in
-# the Trafodion configuration. The command string can span multiple lines. However, pipelines within
-# the command string cannot be split across multiple lines. Special placeholder variables can be specified
-# in the command string within <<<>>>. The Trafodion Scanner will replace each placeholder variable by its
-# corresponding value, as determined at runtime. Currently the following placeholder variables are available:
-# a) All variables specified in the Trafodion configuration, for example <<<TRAF_USER>>>, <<<TRAF_PACKAGE>>>, etc.
-# The value is 'undefined' when the variable is not defined in the Trafodion configuration.
-
-### Configuration Recording ###
-
-RECORD_CONFIG ::: Number of cores ::: grep -c '^processor' /proc/cpuinfo
-
-RECORD_CONFIG ::: GB of total physical memory ::: grep MemTotal /proc/meminfo | awk '{printf ("%.0f",$2/(1024*1024))}'
-
-RECORD_CONFIG ::: Linux distribution ::: lsb_release -a
-
-RECORD_CONFIG ::: User limit settings ::: ulimit -a
-
-RECORD_CONFIG ::: System information ::: uname -a
-
-RECORD_CONFIG ::: Kernel parameters ::: /sbin/sysctl -a
-
-RECORD_CONFIG ::: Network configuration ::: /sbin/ip addr show
-
-RECORD_CONFIG ::: Available filesystems ::: df -h
-
-RECORD_CONFIG ::: Installed RPMs ::: rpm -qa | sort
-
-RECORD_CONFIG ::: Hadoop version ::: hadoop version
-
-RECORD_CONFIG ::: HBase version ::: hbase version
-
-RECORD_CONFIG ::: HBase Java version ::: hbase -version
-
-RECORD_CONFIG ::: Default Java version ::: java -version
-
-### Configuration Checking ###
-
-CHECK_CONFIG ::: HardwarePlatform ::: Supported hardware platform ::: error ::: x86_64 ::: str_eq ::: uname -i
-
-CHECK_CONFIG ::: MinNumCores ::: Minimum number of cores ::: warning ::: 2 ::: int_le ::: grep -c '^processor' /proc/cpuinfo
-
-CHECK_CONFIG ::: MinGBTotalPhysicalMemory ::: Minimum GB of total physical memory ::: warning ::: 16 ::: int_le :::
-grep MemTotal /proc/meminfo | awk '{printf ("%.0f",$2/(1024*1024))}'
-
-CHECK_CONFIG ::: LinuxDistro ::: Supported Linux distribution ::: error ::: 0 ::: int_ne :::
-lsb_release -a | grep -c -e 'Red' -e 'CentOS'
-
-CHECK_CONFIG ::: ValidHostnameFQDNConfig ::: Valid hostname FQDN configuration ::: warning ::: PASS ::: str_eq :::
-if [[ "$(hostname -f)" == "$(hostname -s)" ]]; then
- echo FAIL
-elif [[ "$(hostname -f | grep -c '\.')" != "1" ]]; then
- echo FAIL
-else
- echo PASS
-fi
-
-CHECK_CONFIG ::: KernelPidMaxLimit ::: Upper limit for kernel.pid_max setting ::: error ::: 65535 ::: int_ge :::
-/sbin/sysctl -n kernel.pid_max
-
-CHECK_CONFIG ::: ntpdServiceRunning ::: ntpd service is running ::: error ::: 0 ::: int_ne :::
-/sbin/service ntpd status | grep -c 'is running'
-
-CHECK_CONFIG ::: iptablesFirewallNotEnabled ::: iptables firewall is not enabled ::: warning ::: notEnabled ::: str_eq :::
-stat=$(sudo -n /sbin/service iptables status 2>&1)
-if echo "$stat" | grep -q -e 'is not running' -e 'unrecognized service'; then
- echo notEnabled
-elif echo "$stat" | grep -q '^[0-9]'; then
- echo enabled
-else
- echo notEnabled
-fi
-
-CHECK_CONFIG ::: HyperthreadingEnabled ::: Hyperthreading is enabled, if capability exists ::: warning ::: 1 ::: int_ne :::
-if grep '^flags' /proc/cpuinfo | grep -iq 'HT'; then
- grep -E '^(cpu cores|siblings)' /proc/cpuinfo | cut -d ':' -f 2 | uniq | wc -l
-else
- echo 0
-fi
-
-CHECK_CONFIG ::: HadoopDistro ::: Supported Hadoop distribution ::: error ::: 0 ::: int_ne :::
-hadoop version 2>&1 | grep -c -e 'hortonworks' -e 'cloudera'
-
-CHECK_CONFIG ::: HBaseVersion ::: Supported HBase version ::: error ::: 0 ::: int_ne :::
-if [[ "<<<CDH_5_3_HDP_2_2_SUPPORT>>>" == "Y" ]]; then
- hbase version 2>&1 | grep -c -e 'HBase 0.98.4' -e 'HBase 0.98.6'
-else
- hbase version 2>&1 | grep -c -e 'HBase 0.98.0.2' -e 'HBase 0.98.1'
-fi
-
-CHECK_CONFIG ::: HBaseJavaVersion ::: Supported HBase Java version ::: error ::: 0 ::: int_ne :::
-hbase -version 2>&1 | grep -c '1.7.'
-
-CHECK_CONFIG ::: YumAndInternetConnection ::: Yum and Internet connection ::: warning ::: PASS ::: str_eq :::
-which yumdownloader &>/dev/null
-if [[ "$?" == "0" ]]; then
- mkdir /tmp/yum-check-temp-dir-$$ &>/dev/null
- cmdout=$(yumdownloader --destdir /tmp/yum-check-temp-dir-$$ 'pdsh' 2>&1)
- if [[ "$?" == "0" ]]; then
- echo PASS
- else
- echo "$cmdout"
- fi
- rm -rf /tmp/yum-check-temp-dir-$$ &>/dev/null
-else
- cmdout=$(wget --spider 'http://downloads.trafodion.org' 2>&1)
- if [[ "$?" == "0" ]]; then
- echo PASS
- else
- echo "$cmdout"
- fi
-fi
-
-### Consistency Checking ###
-
-COMPARE_CONFIG ::: SameHadoopVersion ::: Same Hadoop version ::: error ::: hadoop version 2>&1 | grep 'Hadoop'
-
-COMPARE_CONFIG ::: SameHBaseVersion ::: Same HBase version ::: error ::: hbase version 2>&1 | grep -o 'HBase.*$'