Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traceback due to sql violation when updating mirror to prefix = #66

Open
poeml opened this issue Jun 5, 2015 · 0 comments
Open

traceback due to sql violation when updating mirror to prefix = #66

poeml opened this issue Jun 5, 2015 · 0 comments
Labels

Comments

@poeml
Copy link
Owner

poeml commented Jun 5, 2015

                                                                                  [          ]

Issue migrated (2015-06-05) from old issue tracker http://mirrorbrain.org/issues/issue66

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

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.

History
         Date          User   Action            Args
2010-09-18 04:15:53 fukawi2 set    messages: + msg252
                                     status: unread -> chatting
2010-09-18 04:13:51 poeml   set    assignedto: poeml
                                     messages: + msg251
                                     nosy: + poeml
2010-09-18 03:44:45 fukawi2 create

(end of migrated issue)
@poeml poeml added the bug label Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant