Bug 4976 - wrong values for host and port in configfile of globus-personal-gatekeeper
: wrong values for host and port in configfile of globus-personal-gatekeeper
Status: CLOSED FIXED
: GRAM
gt2 Gatekeeper/Jobmanager
: 4.0.3
: PC Linux
: P3 normal
: 4.0.4
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-01-24 08:03 by
Modified: 2007-01-26 11:21 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-01-24 08:03:46
The parameters "-host" and "-port" in the configuration file of
the personal gatekeeper (~/.globus/personal-gatekeeper*/jobmanager.conf)
are defined with invalid values when calling globus-personal-gatekeeper -start.

First i thought this was due to my change in bug 4969 but this
is also the case when i run globus-personal-gatekeeper with an older
version before my last change in cvs.

The reason is that the wrong fields are fetched from the contact string in
~/.globus/personal-gatekeeper/gatekeeper.log

The line from which host and port are extracted looks like

 PID: 11114 -- Notice: 6: GRAM contact:
lappi.uma.de:33509:/O=Grid/OU=GlobusTest/OU=simpleCA-lappi.uma.de/OU=uma.de/CN=Martin
Feller

and globus-personal-gatekeeper uses fields 4 and 5 to initialize 
the host and the port.

host=`echo "$contact" | ${GLOBUS_SH_CUT-cut} -d: -f4`
port=`echo "$contact" | ${GLOBUS_SH_CUT-cut} -d: -f5`

=> host == "Gram Contact"
   port == "lappi.uma.de

It must be fields 5 and 6 instead.

Do versions of "cut" behave different on different Unixes, i.e some
start with field 0, some with field 1?

Fetching the wrong fields seems to have no impact on the functionality of the
personal gatekeeper.
------- Comment #1 From 2007-01-25 01:27:53 -------
I searched and tried bit and it seems like the "field" option in cut
always starts with 1 and not with 0.

I'll change 

host=`echo "$contact" | ${GLOBUS_SH_CUT-cut} -d: -f4`
port=`echo "$contact" | ${GLOBUS_SH_CUT-cut} -d: -f5`

to

host=`echo "$contact" | ${GLOBUS_SH_CUT-cut} -d: -f5`
port=`echo "$contact" | ${GLOBUS_SH_CUT-cut} -d: -f6`