No graph with a stream of constant negative numbers

Bug #286592 reported by Andreas Hasenack
8
Affects Status Importance Assigned to Milestone
Landscape Client
Invalid
Undecided
Unassigned
Landscape Server
Invalid
Low
Unassigned
rrdtool (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Apparently I can't get this script to be plotted. Here are the details:

root@hardy-vm2:/var/log/landscape# cat /var/lib/landscape/client/custom-graph-scripts/graph-2
#!/bin/bash
echo -50
exit 0

root@hardy-vm2:/var/log/landscape# md5sum /var/lib/landscape/client/custom-graph-scripts/graph-2
fec348013265080c244b7e4bac6a05ca /var/lib/landscape/client/custom-graph-scripts/graph-2

Log:
2008-10-20 17:46:42,490 DEBUG [Dummy-1 ] Sending payload:
{'accepted-types': 'IF\x8f\xf1\xccTV\xea\x8e&\x85\xb2\xfay\x85\xeb',
 'client-api': '3.1',
 'messages': [{'api': '3.1',
               'data': {2: {'error': u'',
                            'script-hash': 'fec348013265080c244b7e4bac6a05ca',
                            'values': []}},
               'timestamp': 1224531992,
               'type': 'custom-graph'},
              {'add-processes': [{'gid': 0,
                                  'name': u'ata/0',
                                  'percent-cpu': 0.0,
                                  'pid': 1280,
                                  'start-time': 1224507518,
                                  'state': 'S',
                                  'uid': 0},
                                 {'gid': 0,
                                  'name': u'init',
                                  'percent-cpu': 0.0,
                                  'pid': 1,
                                  'start-time': 1224507515,
                                  'state': 'S',
                                  'uid': 0,
                                  'vm-size': 2844},
                                 {'gid': 0,
                                  'name': u'kthreadd',
                                  'percent-cpu': 0.0,
root@hardy-vm2:/var/log/landscape# scp broker.log
root@hardy-vm2:/var/log/landscape# cat > cg.log
2008-10-20 17:46:42,490 DEBUG [Dummy-1 ] Sending payload:
{'accepted-types': 'IF\x8f\xf1\xccTV\xea\x8e&\x85\xb2\xfay\x85\xeb',
 'client-api': '3.1',
 'messages': [{'api': '3.1',
               'data': {2: {'error': u'',
                            'script-hash': 'fec348013265080c244b7e4bac6a05ca',
                            'values': []}},
               'timestamp': 1224531992,
               'type': 'custom-graph'},
              {'add-processes': [{'gid': 0,

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Oops, it's landscape-client

Changed in landscape:
importance: Undecided → Medium
milestone: none → thames
Revision history for this message
Thomas Herve (therve) wrote :

There is nothing in the graph that can confirm nor deny the problem actually: the client does send empty values if the 5 minutes loop has ended (and it generally takes 2 loops to send values). If there is a problem, there should be a traceback somewhere?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ah, if all problems had tracebacks, this would be so much easier :)

I did another attempt, starting from scratch and using trunk r67 this time instead of that custom-graph-client branch (I was using r83 of it).

The CG script was created at 21:07. Now it's 21h50 and there are still no data points in the graph. I also reduced the interval from the default 5min to 60s in customgraph.py and I created some activities in between to try to trigger a data exchange.

The client now is showing it's sending the points upwards:

# grep values /var/log/landscape/broker.log
                            'values': []}},
                            'values': [(1224544140, -50.0)]}},
                            'values': [(1224544200, -50.0)]}},
                            'values': [(1224544260, -50.0)]}},
                            'values': [(1224544320, -50.0)]}},
                            'values': [(1224544380, -50.0)]}},
(...)

There are 48 "values" lines there as of this moment (21h57).

Revision history for this message
Thomas Herve (therve) wrote :

What do you mean "no data points in the graph"? There is nothing in the site, or nothing in the database?

The log you pasted seems to show that the client is doing the right thing.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is what I mean. Notice that the scale didn't even change, it's still the default 0 -> 1.

Note also that the machines were off during the night, so the last data point would be from around 22h last night. After that I don't expect anything to show up.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

So, after some testing and debugging, these are the conclusions:

- r836 of custom-graph-display-errors fixes plotting of negative numbers, but see below

- a constant stream of negative numbers will only be plotted once there was some variation. So, a CG script of "echo -50" will never get the value "-50" plotted. There has to be at least one data point different than "-50", then the whole thing is plotted

- a constant stream of *positive* numbers, though, is always plotted without issues

Looks like a RRDtool bug so far.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It works with newer versions of rrdtool (hardy has 1.2.19). The changeset that fixed it for me is:

http://oss.oetiker.ch/rrdtool-trac/changeset/1233

I'm attaching a script which shows the problem and can be used to test the fix. When run with the buggy version of rrdtool installed, it will not graph the data (constant -50). With the fixed version, the line is drawn.

Changed in landscape:
importance: Medium → Low
Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It's not a bug in the client, and the client is not affected by it.

Changed in landscape-client:
status: New → Invalid
Changed in landscape:
milestone: thames → thames+1
Changed in landscape:
status: New → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Nothing we can do on the Landscape side

Changed in landscape:
status: Confirmed → Invalid
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Marking as fix released in ubuntu's rrdtool. This is too minor of an issue for an SRU to dapper, and it seems the patch above is already applied to hardy and later.

Changed in rrdtool (Ubuntu):
status: New → Fix Released
importance: Undecided → Low
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.