<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugzilla.globus.org/bugzilla/bugzilla.dtd">

<bugzilla version="3.2.3"
          urlbase="http://bugzilla.globus.org/bugzilla/"
          maintainer="bacon@mcs.anl.gov"
>

    <bug>
          <bug_id>5192</bug_id>
          
          <creation_ts>2007-04-03 11:18</creation_ts>
          <short_desc>Setting gridftp usage_stats_target not working</short_desc>
          <delta_ts>2007-08-27 18:45:02</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>GridFTP</product>
          <component>GridFTP</component>
          <version>4.0.4</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          
          <priority>P3</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>4.0.5</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John-Paul Navarro">navarro@mcs.anl.gov</reporter>
          <assigned_to name="Mike Link">mlink@mcs.anl.gov</assigned_to>
          <cc>childers@mcs.anl.gov</cc>
    
    <cc>dcarver@tacc.utexas.edu</cc>
    
    <cc>liming@mcs.anl.gov</cc>
    
    <cc>navarro@mcs.anl.gov</cc>

      

      
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-04-03 11:18:42</bug_when>
            <thetext>With /soft/gridftp-4.0.3-jp1/etc/gridftp.conf:
inetd 1
log_module syslog
log_level all
disable_usage_stats 0
usage_stats_target globus-usage.teragrid.org:4810,usage-stats.globus.org:4810

and inetd.conf
gsiftp stream tcp nowait root /usr/bin/env env GLOBUS_LOCATION=/soft/gridftp-4.0.3-jp1 GLOBUS_TCP_PORT_RANGE=50000,51000 LD_LIBRARY_PATH=/soft/gridftp-4.0.3-jp1/lib /soft/gridftp-4.0.3-jp1/sbin/globus-gridftp-server -c /soft/gridftp-4.0.3-jp1/etc/gridftp.conf

I&apos;ve confirmed w/ tcpdump that usage packets are only beng sent to usage-stats.globus.org.

This is the VDT 1.6.1x gridftp server based on Globus 4.0.3:
220 tg-grid1.uc.teragrid.org GridFTP Server 2.3 (gcc64dbg, 1144436882-63) ready.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Lee Liming">liming@mcs.anl.gov</who>
            <bug_when>2007-04-03 11:42:13</bug_when>
            <thetext>This issue is holding up TeraGrid&apos;s plans to establish our own usage stats listener service for GridFTP usage. This is a critical requirement for TG at the moment, and we had been expecting that this version of GridFTP would have the fix to an earlier bug, so we really need help figuring out what the problem is. Thanks!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Mike Link">mlink@mcs.anl.gov</who>
            <bug_when>2007-04-03 12:47:51</bug_when>
            <thetext>Created an attachment (id=1224)
Patch to gridftp/server/src/globus_i_gfs_log.c

It was an obvious bug in the server, this value was never being passed down to the usage sending module.  Attached is a patch.

As a workaround, you can also use the env: GLOBUS_USAGE_TARGETS.  Set it to set the same string you&apos;re using now.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Mike Link">mlink@mcs.anl.gov</who>
            <bug_when>2007-04-03 12:52:37</bug_when>
            <thetext>Fix committed to trunk and globus_4_0_branch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-05-18 16:50:59</bug_when>
            <thetext>It appears that when the remote_nodes config file entry is specified, or the -r command line argument, the GLOBUS_USAGE_TARGETS environment variable is ignored and the server only reports to the default usage-stats.globus.org.

This is a critical issue for the TeraGrid. We upgraded GridFTP to be able to collect usage statistics and it now appears we can collect usage statistics for all our striped gridftp servers (which is most of the servers).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-05-18 19:34:55</bug_when>
            <thetext>(In reply to comment #4)
&gt;&lt;snip&gt;
&gt; collect usage statistics and it now appears we can collect usage statistics for
&gt; all our striped gridftp servers (which is most of the servers).

Typo: we can NOT collect usage statistics for all our striped gridftp servers ..</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Mike Link">mlink@mcs.anl.gov</who>
            <bug_when>2007-05-22 13:49:55</bug_when>
            <thetext>In striped mode only the frontend is supposed to send the usage packets.  The -r config option shouldn&apos;t affect the usage stats configuration at all, and I don&apos;t see an obvious bug.  You are setting GLOBUS_USAGE_TARGETS on the frontend, right?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-05-22 14:12:37</bug_when>
            <thetext>Yes, only on the front-end: I set GLOBUS_USAGE_TARGETS to two targets and then monitored with tcpdump for all outbound usage packets.  With non-striped transfers, I saw outbound packets to all targets, with striped transfers, only one packet gets sent to the default globus listener.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-05-22 14:21:45</bug_when>
            <thetext>To be more precise, the difference isn&apos;t between doing a striped vs non-striped transfer, but between configuring the gridftp server with remote_nodes versus not configuring it.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Mike Link">mlink@mcs.anl.gov</who>
            <bug_when>2007-05-22 14:31:11</bug_when>
            <thetext>Actually, I think I see what is going on.  It looks like (in my test at least) the backends are the ones sending the packets, and the frontend is sending none.
So what you&apos;re seeing is the backend(s) sending to the default listener, and the frontend not even checking the listener config since it is not sending any packets.

This is surely a bug, though I&apos;ll have to verify that it wasn&apos;t intentional.  I&apos;ll have a patch soon. 

For now, you can get the data you want by configuring the listeners on the backend.  For multi-stripe transfers you&apos;ll get an almost identical packet from each backend.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-05-22 15:42:35</bug_when>
            <thetext>Setting GLOBUS_USAGE_TARGETS on the data movers will cause the first data mover to send usage records to all the targets.  Interestingly, the other data movers DON&apos;T generate usage records. Is the data from the first data mover complete wrt to the data moved by all the data movers?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Mike Link">mlink@mcs.anl.gov</who>
            <bug_when>2007-05-22 16:01:52</bug_when>
            <thetext>Ah, right -- I saw two packets in my test and assumed one from each backend, in fact they were both from the first backend and one each for the send/retr of a third party transfer.

The data is correct other than the the bytes transferred (NBYTES), which unfortunately is only the count of bytes that pass through that node.  If you really need to use this before a bugfix, you can know that total transferred is somewhere between NBYTES and NBYTES*STRIPES, but that could get wildly inaccurate for files that don&apos;t divide evenly among stripes.




</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-05-22 17:21:35</bug_when>
            <thetext>Thanks Mike.
If it&apos;s possible it would be great to get the complete set of usage stats bugfixes into the upcoming 4.0.5.
I would also be interested in testinng a 4.0.5 release candidate in case there are lingering issues.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Mike Link">mlink@mcs.anl.gov</who>
            <bug_when>2007-06-08 12:35:29</bug_when>
            <thetext>This is fixed and will be in 4.0.5.  

All usage stats will come from the frontend.

I believe the nightly installer from midnight tonight will be the first RC, if you wanted to test it out: http://www.globus.org/globus_4_0_branch/nightly.tar.gz</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="John-Paul Navarro">navarro@mcs.anl.gov</who>
            <bug_when>2007-08-27 09:40:13</bug_when>
            <thetext>The TeraGrid is still having problems getting multiple usage targets working with GridFTP 4.0.5 on Solaris. We don&apos;t know if this problem persists on Linux. We&apos;ll let you know as soon as we find out.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Mike Link">mlink@mcs.anl.gov</who>
            <bug_when>2007-08-27 18:45:02</bug_when>
            <thetext>I&apos;ve opened bug 5503 for the Solaris issue which is unrelated to this bug.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1224</attachid>
            <date>2007-04-03 12:47</date>
            <desc>Patch to gridftp/server/src/globus_i_gfs_log.c</desc>
            <filename>5192.patch</filename>
            <type>text/plain</type>
            <size>783</size>
            <attacher>mlink@mcs.anl.gov</attacher>
            <data encoding="base64">SW5kZXg6IGdyaWRmdHAvc2VydmVyL3NyYy9nbG9idXNfaV9nZnNfbG9nLmMKPT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpS
Q1MgZmlsZTogL2hvbWUvZ2xvYmRldi9DVlMvZ2xvYnVzLXBhY2thZ2VzL2dyaWRmdHAvc2VydmVy
L3NyYy9nbG9idXNfaV9nZnNfbG9nLmMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMTguNC4xCmRp
ZmYgLXUgLXIxLjE4LjQuMSBnbG9idXNfaV9nZnNfbG9nLmMKLS0tIGdyaWRmdHAvc2VydmVyL3Ny
Yy9nbG9idXNfaV9nZnNfbG9nLmMJNyBBcHIgMjAwNiAxOTowODowMSAtMDAwMAkxLjE4LjQuMQor
KysgZ3JpZGZ0cC9zZXJ2ZXIvc3JjL2dsb2J1c19pX2dmc19sb2cuYwkzIEFwciAyMDA3IDE3OjQz
OjA1IC0wMDAwCkBAIC0yOTMsNyArMjkzLDEwIEBACiAgICAgaWYoIWdsb2J1c19pX2dmc19jb25m
aWdfYm9vbCgiZGlzYWJsZV91c2FnZV9zdGF0cyIpKQogICAgIHsKICAgICAgICByZXN1bHQgPSBn
bG9idXNfdXNhZ2Vfc3RhdHNfaGFuZGxlX2luaXQoCi0gICAgICAgICAgICAmZ2xvYnVzX2xfZ2Zz
X3VzYWdlX2hhbmRsZSwgMCwgMCwgTlVMTCk7ICAgICAgCisgICAgICAgICAgICAmZ2xvYnVzX2xf
Z2ZzX3VzYWdlX2hhbmRsZSwgCisgICAgICAgICAgICAwLCAKKyAgICAgICAgICAgIDAsIAorICAg
ICAgICAgICAgZ2xvYnVzX2lfZ2ZzX2NvbmZpZ19zdHJpbmcoInVzYWdlX3N0YXRzX3RhcmdldCIp
KTsgICAgICAKICAgICB9CiAgICAgCiAgICAgaWYobW9kdWxlX3N0cikK
</data>        

          </attachment>
      

    </bug>

</bugzilla>