You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title traceback due to sql violation when updating mirror to prefix =
null
Priority bug Status chatting
Superseder Nosy List fukawi2, poeml
Assigned To poeml Keywords
Failure to find the prefix for a mirror causes an SQL violation, and therefore a
python traceback.
hydrogen ~ $ mb update -p --all-mirrors
selfnet.de: updating network prefix ( -> None)
Traceback (most recent call last):
File "/usr/bin/mb", line 1606, in
r = mirrordoctor.main()
File "/usr/lib/python2.6/site-packages/cmdln.py", line 257, in main
return self.cmd(args)
File "/usr/lib/python2.6/site-packages/cmdln.py", line 280, in cmd
retval = self.onecmd(argv)
File "/usr/lib/python2.6/site-packages/cmdln.py", line 412, in onecmd
return self._dispatch_cmd(handler, argv)
File "/usr/lib/python2.6/site-packages/cmdln.py", line 1100, in _dispatch_cmd
return handler(argv[0], opts, *args)
File "/usr/bin/mb", line 432, in do_update
mirror.prefix = res.prefix
File "", line 1, in
File "/usr/lib/python2.6/site-packages/sqlobject/main.py", line 1048, in
_SO_setValue
dbValue)])
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 523,
in _SO_update
self.sqlrepr(so.id)))
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 349,
in query
return self._runWithConnection(self._query, s)
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 262,
in _runWithConnection
val = meth(conn, *args)
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 346,
in _query
self._executeRetry(conn, conn.cursor(), s)
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 341,
in _executeRetry
return cursor.execute(query)
psycopg2.IntegrityError: null value in column "prefix" violates not-null
constraint
Good point. The failure probably happens because the lookup is not possible,
because the database that comes with mod_asn is not there.
I have to admit that I never was in that situation. "mb update" should handle
that, though.
(To explain: the mb update command originally was meant to fill in only the AS and
prefix data. Later, I extended it to also be able to fill in geographical
coordinates, but didn't think about the dependency.)
Issue migrated (2015-06-05) from old issue tracker http://mirrorbrain.org/issues/issue66
msg250 (view) Author: fukawi2 Date: 2010-09-18.03:44:45
Failure to find the prefix for a mirror causes an SQL violation, and therefore a
python traceback.
hydrogen ~ $ mb update -p --all-mirrors
selfnet.de: updating network prefix ( -> None)
Traceback (most recent call last):
File "/usr/bin/mb", line 1606, in
r = mirrordoctor.main()
File "/usr/lib/python2.6/site-packages/cmdln.py", line 257, in main
return self.cmd(args)
File "/usr/lib/python2.6/site-packages/cmdln.py", line 280, in cmd
retval = self.onecmd(argv)
File "/usr/lib/python2.6/site-packages/cmdln.py", line 412, in onecmd
return self._dispatch_cmd(handler, argv)
File "/usr/lib/python2.6/site-packages/cmdln.py", line 1100, in _dispatch_cmd
return handler(argv[0], opts, *args)
File "/usr/bin/mb", line 432, in do_update
mirror.prefix = res.prefix
File "", line 1, in
File "/usr/lib/python2.6/site-packages/sqlobject/main.py", line 1048, in
_SO_setValue
dbValue)])
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 523,
in _SO_update
self.sqlrepr(so.id)))
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 349,
in query
return self._runWithConnection(self._query, s)
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 262,
in _runWithConnection
val = meth(conn, *args)
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 346,
in _query
self._executeRetry(conn, conn.cursor(), s)
File "/usr/lib/python2.6/site-packages/sqlobject/dbconnection.py", line 341,
in _executeRetry
return cursor.execute(query)
psycopg2.IntegrityError: null value in column "prefix" violates not-null
constraint
msg251 (view) Author: poeml Date: 2010-09-18.04:13:51
Good point. The failure probably happens because the lookup is not possible,
because the database that comes with mod_asn is not there.
I have to admit that I never was in that situation. "mb update" should handle
that, though.
(To explain: the mb update command originally was meant to fill in only the AS and
prefix data. Later, I extended it to also be able to fill in geographical
coordinates, but didn't think about the dependency.)
msg252 (view) Author: fukawi2 Date: 2010-09-18.04:15:53
I'm pretty sure it's because I haven't gotten around to installing mod_asn yet,
but yes, mb should handle it a bit more gracefully.
(end of migrated issue)
The text was updated successfully, but these errors were encountered: