Running Trafodion on a single server prevents use of pdsh or pdcp

Bug #1451948 reported by Chris Sheedy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
New
Medium
Unassigned

Bug Description

The choice between a cluster and a single server is often made by testing the presence of
"pdsh" or "pdcp", utilities which are not part of Trafodion. Use of Trafodion should not
prevent use of these software tools.

This is an unnecessary extra complication for new users experimenting with Trafodion, since
they may first install it on a single server, and probably build and test on a single server.

Testing for pdsh is sometimes for a specific location, /usr/bin/pdsh, and sometimes for
pdsh within the user's PATH, $(which pdsh). The latter prevents moving pdsh to somewhere
other than /usr/bin/pdsh.

Some source files associated with this problem are:

trafodion/install installer/traf_start
---------------------------------------
141 if [[ $node_count == "1" ]]; then
142
143 # since sqgen uses the existence of /usr/bin/pdsh to determine multi-node cluster
144 # and sqgen uses the existence of /usr/bin/pdcp to determine if it needs to copy
145 # files we will check for these here and warn the user to remove/rename these to
146 # head-off the confusing errors when running sqgen
147 if [ -f /usr/bin/pdsh ] || [ -f /usr/bin/pdcp ]; then
148 echo "***ERROR: This is a single node cluster yet /usr/bin/pdsh or /usr/bin/pdcp is installed on it." | tee -a $INSTALL_LOG
149 echo "*** Please uninstall or rename /usr/bin/pdsh and /usr/bin/pdcp temporarily." | tee -a $INSTALL_LOG
150 echo "*** Please reinstall or rename after successful install." | tee -a $INSTALL_LOG
151 exit -1
152 fi
153 fi

trafodion/core sqf/sqenvcom.sh
-------------------------------
117 export SQ_PDSH=/usr/bin/pdsh
118 export SQ_PDCP=/usr/bin/pdcp

trafodion/core sqf/sql/scripts/sqgen
--------------------------------------
100 # Check to make sure this is a real cluster
101 if [ -f $SQ_PDSH ]; then
. . .
130 if [ -e $SQ_PDSH ]; then
131 echo
132 echo "Creating directories on cluster nodes"
. . .
207 if [ -e $SQ_PDCP ]; then
208 echo
209 echo "Copying the generated files to all the nodes in the cluster"

trafodion/core sql/ustat/StopAutoStats.sh
------------------------------------------
71 pdsh=$(which pdsh 2>/dev/null)
72
73 if [ "$pdsh" = "" ]; then
74 pdsh_a=""
75 else
76 pdsh_a="pdsh -a"
77 fi
78
79 $pdsh_a kill -9 $pids > ${autoloc}/autodir/STOP_AUTO_STATS 2>&1

trafodion/core sql/ustat/USAS.sh
----------------------------------
406 #setup pdsh
407 pdsh=`which pdsh 2>/dev/null`
408
409 if [ "$pdsh" = "" ]; then
410 # SQ workstation
411 pdsh_a=""
412 pdcp_cmd="cp"
413 else
414 # SQ cluster
415 pdsh_a="pdsh -a"
416 pdcp_cmd="pdcp -a"
417 fi

trafodion/core sqf/sql/scripts/qmmstart
-----------------------------------------
53 # by default we assume we are running on a cluster
54 thisIsACluster=1
55
56 # check if this is a real cluster
57 function checkCluster
58 {
59 if [ -f $SQ_PDSH ]; then
60 thisIsACluster=1
61 echo "running the $0 script in a cluster ....."
62 echo " "
63 else
64 thisIsACluster=0
65 echo "running the $0 script in a workstation ....."
66 echo " "
67 fi
68 }

trafodion/core sqf/sql/scripts/sqpstack
-----------------------------------------
37 if [ -e $SQ_PDSH ]; then
38 hosts=`$SQ_PDSH $MY_NODES_PRM hostname|awk '{ print $2 }'|sort`
39 else
40 hosts=`hostname`
41 fi

Changed in trafodion:
importance: Undecided → Medium
tags: added: dev-environment
tags: added: installer
Revision history for this message
Chris Sheedy (chris-sheedy) wrote :

This is related to bug 1451919, traf_authentication_setup on Single Node

Revision history for this message
Chris Sheedy (chris-sheedy) wrote :

Fixed in change 1634 merged into master branch on 2015-05-15

Revision history for this message
Chris Sheedy (chris-sheedy) wrote :

The above is a mistake, I added it to the wrong bug. There is no change for this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.