SeedDB crashes on unknown IntegrityErrors during delete
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Morten Brekkevold |
Bug Description
NAV 3.7.0 crashes with the following error message when I try to delete an IP device (type SRV):
I should add that other SRV-entries deletes ok, but this one had it's IP-address changed...
-------
MOD_PYTHON ERROR
ProcessId: 16473
Interpreter: 'nav'
ServerName: 'nav'
DocumentRoot: '/usr/share/
URI: '/seeddb/
Location: None
Directory: '/usr/share/
Filename: '/usr/share/
PathInfo: '/edit'
Phase: 'PythonHandler'
Handler: 'seeddb'
Traceback (most recent call last):
File "/usr/lib/
default=
File "/usr/lib/
result = _execute_
File "/usr/lib/
result = object(arg)
File "/usr/share/
output = editPage(
File "/usr/share/
status = page.delete(
File "/usr/share/
error += '%s is referenced in another table' % (self.name,)
AttributeError: pageNetbox instance has no attribute 'name'
MODULE CACHE DETAILS
Accessed: Mon Nov 22 10:38:25 2010
Generation: 4
_mp_fee3cb79bb9
FileName: '/usr/share/
Instance: 1
Generation: 1
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:37:55 2010
}
_mp_79759e91aa0
FileName: '/usr/share/
Instance: 1
Generation: 2
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:37:55 2010
}
_mp_ee36530af65
FileName: '/usr/share/
Instance: 1
Generation: 4
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:37:55 2010
Children: '/usr/share/
}
_mp_6075681fed6
FileName: '/usr/share/
Instance: 1
Generation: 3
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:37:55 2010
}
Changed in nav: | |
status: | Fix Committed → Fix Released |
What I did was to add an IP device - IP-address 192.168.1.10, type SRV. I later changed this to 192.168.1.11.
When I now add a new entry with the original IP-address (192.168.1.10), I get this error:
MOD_PYTHON ERROR
ProcessId: 16467
Interpreter: 'nav'
ServerName: 'nav' nav/htdocs'
DocumentRoot: '/usr/share/
URI: '/seeddb/ netbox/ predefined' nav/htdocs/ seeddb/ ' nav/htdocs/ seeddb/ netbox'
Location: None
Directory: '/usr/share/
Filename: '/usr/share/
PathInfo: '/predefined'
Phase: 'PythonHandler'
Handler: 'seeddb'
Traceback (most recent call last):
File "/usr/lib/ python2. 5/site- packages/ mod_python/ importer. py", line 1537, in HandlerDispatch default_ handler, arg=req, silent= hlist.silent)
default=
File "/usr/lib/ python2. 5/site- packages/ mod_python/ importer. py", line 1229, in _process_target target( config, req, object, arg)
result = _execute_
File "/usr/lib/ python2. 5/site- packages/ mod_python/ importer. py", line 1128, in _execute_target
result = object(arg)
File "/usr/share/ nav/htdocs/ seeddb/ seeddb. py", line 165, in handler req,pageList[ table]( ),request, unicodeError)
output = editPage(
File "/usr/share/ nav/htdocs/ seeddb/ seeddb. py", line 451, in editPage action)
outputForm,
File "/usr/share/ nav/htdocs/ seeddb/ seeddb. py", line 2402, in add
function)
File "/usr/share/ nav/htdocs/ seeddb/ seeddb. py", line 566, in insertNetbox ,'netbox_ netboxid_ seq'))
('netboxid'
File "/usr/share/ nav/htdocs/ seeddb/ seeddbSQL. py", line 152, in addEntryFields [sql])
executeSQL(
File "/usr/share/ nav/htdocs/ seeddb/ seeddbSQL. py", line 34, in executeSQL execute( sql)
database.
IntegrityError: duplicate key value violates unique constraint "netbox_ip_key"
MODULE CACHE DETAILS
Accessed: Mon Nov 22 10:58:20 2010
Generation: 4
_mp_fee3cb79bb9 02d1ae2e8fe8693 adcb2a { nav/htdocs/ seeddb/ initBox. py'
FileName: '/usr/share/
Instance: 1
Generation: 1
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:26:32 2010
}
_mp_79759e91aa0 7f55e2ec9feb06d cdae38 { nav/htdocs/ seeddb/ options. py'
FileName: '/usr/share/
Instance: 1
Generation: 2
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:26:32 2010
}
_mp_ee36530af65 736d4598346489c 0aee92 { nav/htdocs/ seeddb/ seeddb. py' nav/htdocs/ seeddb/ initBox. py',
'/usr/ share/nav/ htdocs/ seeddb/ options. py',
'/usr/ share/nav/ htdocs/ seeddb/ seeddbSQL. py'
FileName: '/usr/share/
Instance: 1
Generation: 4
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:26:32 2010
Children: '/usr/share/
}
_mp_6075681fed6 c7055dc97214a47 5ff87e { nav/htdocs/ seeddb/ seeddbSQL. py'
FileName: '/usr/share/
Instance: 1
Generation: 3
Modified: Tue Nov 16 15:23:15 2010
Imported: Mon Nov 22 09:26:32 2010
}