I currently try to install a software package (unfortunately the support is very unhelpful for various reasons). The software has an install script which works quite well, however the script checks for the existance of some tools before it starts the deployment on the cluster nodes.

The script uses gcp (it looks like a group copy) - I could not find it via google or rpmfind. Does anyone know this program?

edit (sorry for the bad title in the first try, seems I should have more coffee before posting): OS: Red Hat Enterprise Linux 5.3 The Software I'm trying to install is the "off instrument software for the FLX sequencer"

the relevant part of the install script reads:

             cluster)
                    echo "INSTALLING TO A CLUSTER"

                    #
                    #       Install to system RPM location
                    #
                    RPMSRC=`find ./ -name gsRunProcessor-openmpi-*.rpm`
                    if [ "$RPMSRC" != "" ]
                    then
                            # Copy to all nodes
                            gcp $RPMSRC /tmp
                            if [ $? -ne 0 ]
                            then
                                    echo "Call to 'gcp' failed"
                                    return 1
                            fi
                            # Install to all nodes
                            gsh rpm -Uvh --force --nocontexts /tmp/$RPMSRC 2>/dev/null
                            status=$?
                            if [ $status -ne 0 ]
                            then
                                    echo "Call to gsh failed"
                                    return 1
                            fi

                            # Remove file from every node
                            gsh rm -f /tmp/$RPMSRC

                            # Install to head node
                            rpm -Uvh --force --nocontexts $RPMSRC 2>/dev/null
                            status=$?
                            if [ $status -ne 0 ]
                            then
                                    echo "Call to 'rpm' command for $RPMSRC failed"
                                    return 1
                            fi

                    else
                            echo "Could not find gsRunProcessor-openmpi rpm file"
                            return 1
                    fi

                    rpm -Uvh --force --nocontexts gsRunProcessorManager-*.rpm 2>/dev/null
                    status=$?
                    if [ $status -ne 0 ]
                    then
                            echo "Call to 'rpm' command for gsRunProcessorManager failed"
                            return 1
                    fi

                    rpm -Uvh --force --nocontexts gsReporter-*.rpm 2>/dev/null
                    status=$?
                    if [ $status -ne 0 ]
                    then
                            echo "Call to 'rpm' command for gsReporter failed"
                            return 1
                    fi

                    rpm -Uvh --force --nocontexts gsSupportTool-*.rpm 2>/dev/null
                    status=$?
                    if [ $status -ne 0 ]
                    then
                            echo "Call to 'rpm' command for gsSupportTool failed"
                            return 1
                    fi
                    ;;
link|improve this question

If you specify the exact software you're trying to install, the OS you install it on, the version numbers and the general picture of what you're trying to achieve, it might help – dyasny Oct 8 '09 at 9:36
Are you sure gcp isn't a builtin from gsh? – GodEater Oct 8 '09 at 10:48
I installed gsh, no gcp to be found. – brandstaetter Oct 8 '09 at 11:09
feedback

2 Answers

up vote 3 down vote accepted

gcp is the GNU version of cp. You can find it using:

where gcp

You should be able to use cp instead, unless your script is using one of the few features of gcp that isn't in cp. I don't know of any such features...

Specifically for your case:

RPMSRC=`find ./ -name gsRunProcessor-openmpi-*.rpm`
if [ "$RPMSRC" != "" ]
    then
        # Copy to all nodes
        gcp $RPMSRC /tmp

You're setting the variable $RPMSRC using the find command. Then you're coyping all of the files that find found and you stored in $RPMSRC to /tmp using:

gcp $RPMSRC /tmp

The rpm command called by gsh uses these files:

gsh rpm -Uvh --force --nocontexts /tmp/$RPMSRC 2>/dev/null
                                  ^^^^^^^^^^^^

And when it's done with them it removes them:

# Remove file from every node
gsh rm -f /tmp/$RPMSRC

The actual installation to all nodes is done with the rpm command.

link|improve this answer
No, I don't think that's it. see the script: # Copy to all nodes \n gcp $RPMSRC /tmp. Additionally, I have never come across the command "where". I'm confused now. – brandstaetter Oct 8 '09 at 10:30
@brandstaetter Yes, cp is the linux copy command, so gcp is gnu version, which is what is being used here. Im confused why you "dont think thats it" – Sam Oct 8 '09 at 11:12
@Sam Cogan that may be, that gcp usually refers to the gnu copy - the script clearly uses gcp to "copy to all nodes" by copying to /tmp - how does gnu copy do that? – brandstaetter Oct 8 '09 at 11:16
Thanks for the clarifications @Nathan Fellman - So for this to work, the /tmp directory has to be readable from all nofes (via NFS, I guess) - otherwise the gsh command will fail (file not found). I don't know the exact configuration that is expected by the installation script - as I said, the company is not helpful towards us. – brandstaetter Oct 8 '09 at 12:17
I would upvote, if I could. :) – brandstaetter Oct 8 '09 at 12:18
show 4 more comments
feedback

You can find several different software packages called gsh on the net. Some are, for example, just wrappers for ssh to execute commands on multilple hosts. I could be that your script uses sth like that (the comments in the script look like it is); if so, gsh and also gcp should be packed with your software. So my guess would be that you are calling the script with sth missing in your PATH or from an wrong location or similar. - Hard to tell with just a part of the script and no knowlege about the software you are trying to install.

link|improve this answer
Yes, that is exactly my problem. They usually sell the software packaged with a compute cluster, which they themselves configure. They allow, however, to use existing clusters, but offer no support, so I have to piece the info together myself. They do not want to tell me the software they preinstall/configure when delivering their cluster. – brandstaetter Oct 9 '09 at 6:28
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.