perfsonar / project

The perfSONAR project's primary wiki and issue tracker.
Apache License 2.0
53 stars 10 forks source link

Netlogger warnings #76

Closed arlake228 closed 9 years ago

arlake228 commented 9 years ago

Original issue 76 created by arlake228 on 2008-10-21T14:36:51.000Z:

If uuidgen is not installed on target system, Netlogger.pm doesn't complain/warn of this effectively:

Can't exec "uuidgen": No such file or directory at lib/perfSONAR_PS/NetLogger.pm line 41. Use of uninitialized value $guid in scalar chomp at lib/perfSONAR_PS/NetLogger.pm line 41.

This causes other issues later:

Use of uninitialized value $GUID in concatenation (.) or string at lib/perfSONAR_PS/NetLogger.pm line 27, <DATA> line 345 (# 1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl will try to tell you the
name of the variable (if any) that was undefined. In some cases it cannot
do this, so it also tells you what operation you used the undefined value
in.  Note, however, that perl optimizes your program and the operation
displayed in the warning may not necessarily appear literally in your
program.  For example, &quot;that $foo&quot; is usually optimized into &quot;that &quot;
. $foo, and the warning will refer to the concatenation (.) operator,
even though there is no . in your program.

Much like rrdtool/ping we need a good way to detect and use uuidgen and have some sort of fallback if not (see genuid() in Common.pm).

arlake228 commented 9 years ago

Comment #1 originally posted by arlake228 on 2008-10-21T14:53:17.000Z:

There's a Perl module available for generating UUIDs. I'm not sure how good it is.

http://search.cpan.org/~rjbs/Data-UUID-1.148/UUID.pm

arlake228 commented 9 years ago

Comment #2 originally posted by arlake228 on 2008-10-24T00:41:47.000Z:

That would be a good addition. The other issue is that netlogger needs a good tidy/critic to eliminate the possibility of the string cat issues.

arlake228 commented 9 years ago

Comment #3 originally posted by arlake228 on 2008-12-04T04:40:36.000Z:

made these changes, but still need to test

arlake228 commented 9 years ago

Comment #4 originally posted by arlake228 on 2009-03-04T02:14:54.000Z:

Closing.

arlake228 commented 9 years ago

Comment #5 originally posted by arlake228 on 2011-11-01T20:10:59.000Z:

<empty>