pping crashes when re-creating RRD files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Morten Brekkevold |
Bug Description
NAV : 3.8.2
OS : RHEL 6.0
I'm trying to upgrade from nav-3.5.6 running on RHEL 5.x (32bit) to nav-3.8.2 running on RHEL 6 (64bit).
The nav installalation is fresh, and the database is cloned and upgraded from 3.5.6 to 3.8.2.
When starting pping, this error is printed to pping.log :
[2011-03-11 09:00:10] db.py:execute:146 [Critical] Throwing away update...
[2011-03-11 09:00:10] rrd.py:create:61 [Notice] Created rrd file kat-sw3.foo.tld.rrd
[2011-03-11 09:00:10] db.py:cursor:97 [Critical] Could not get cursor. Trying to reconnect...
[2011-03-11 09:00:10] db.py:connect:75 [Notice] Successfully (re)connected to NAVdb
[2011-03-11 09:00:10] db.py:execute:137 [Notice] Executing: INSERT INTO rrd_file
[2011-03-11 09:00:10] db.py:execute:145 [Critical] duplicate key value violates unique constraint "rrd_file_
[2011-03-11 09:00:10] db.py:execute:146 [Critical] Throwing away update...
[2011-03-11 09:00:10] db.py:cursor:97 [Critical] Could not get cursor. Trying to reconnect...
[2011-03-11 09:00:10] db.py:connect:79 [Critical] Couldn't connect to db.
[2011-03-11 09:00:10] db.py:connect:80 [Critical] FATAL: connection limit exceeded for non-superusers
[2011-03-11 09:00:10] db.py:execute:148 [Critical] Could not execute statement: INSERT INTO rrd_datasource
(97812, 'RESPONSETIME', 'Roundtrip time', 'GAUGE', 's')
[2011-03-11 09:00:10] db.py:execute:149 [Notice] 'NoneType' object has no attribute 'cursor'
Traceback (most recent call last):
File "/usr/local/
start(nofork)
File "/usr/local/
myPinger.main()
File "/usr/local/
self.
File "/usr/local/
rrd.
File "/usr/local/
create(
File "/usr/local/
register_
File "/usr/local/
responsedescr, "GAUGE", "s")
File "/usr/local/
self.
File "/usr/local/
self.
AttributeError: 'NoneType' object has no attribute 'rollback'
The rrd files are not migreted over from the production server, so pping fails when it tries to create a rrd file which allready are present in the database.
Changed in nav: | |
status: | Fix Committed → Fix Released |
pping registers an RRD file in NAV's PostgreSQL database as soon as it is created by pping. If the RRD file once existed in the same location but has since been removed, it may still be referenced in the db. pping doesn't check to see if it's already in the db, and fails on an integrity error.
I guess pping should either check the db before inserting a new row, or handle the integrityerror more gracefully.