BIND 10 #963: Utility to upgrade SQLite schema

BIND 10 Development do-not-reply at isc.org
Mon Mar 26 14:09:45 UTC 2012


#963: Utility to upgrade SQLite schema
-------------------------------------+-------------------------------------
                   Reporter:  shane  |                 Owner:  vorner
                       Type:         |                Status:  reviewing
  enhancement                        |             Milestone:
                   Priority:         |  Sprint-20120403
  medium                             |            Resolution:
                  Component:  data   |             Sensitive:  0
  source                             |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  0.0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
  sqlite schema upgrade              |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => vorner


Comment:

 Replying to [comment:19 vorner]:
 > Hello
 >
 > Replying to [comment:18 jelte]:
 > > - I've replaced the direct system.exit values, and change --check to
 return 1 on 'need-update', 2 on 'version too high for me', and higher for
 other errors
 >
 > Thats nice. However, I have two notes about this change:
 >  * „Any higher value indicates a read or command-line error.“ ‒ how is
 any other error signalled? ;-)

 ok, this any better? "Any higher value indicates an error during command-
 line parsing or execution."

 >  * Related to this, what if anything throws an exception which is not
 caught? Like messed up import.
 >

 good point :) the default exit status for that is 1, but i'd prefer to
 keep the 'not error not zero' result codes low, so i've added a bit of
 python magic to set the exit status to a different value upon exceptions

 > > - added 'to stdout' in the manpage verbose description
 >
 > Is it true that it's to stdout with the logging?
 >

 oops, no, that's stderr, changed

 > > And some other comments based on the discussion above:
 > > - I think we can get away with not using the configuration db file
 name for now; I think that if 324 (or any detection of out-of-date schema)
 prints 'please run b10-dbutil --upgrade <database file>, it's good enough
 for the near future
 >
 > I believe so, let's create a ticket for it.
 >

 done, #1837

 > > did i miss anything else?
 >
 > Support for multiple database files on input? Or should we put it to
 another ticket?
 >

 certainly a different ticket, but as long as we expect this to be done by
 hand I kind of think doing one at a time is preferable actually.

 > Also:
 >  * DBUTIL_DATABASE_MAY_BE_CORRUPTED ‒ Is the correct word corrupted or
 corrupt? And would it be possible to output the filename of the original
 and backup db?

 both are fine I think, changed to corrupt. Added file names.

 >  * What is the difference between DBUTIL_COMMAND_NONE and
 DBUTIL_NO_ACTION_SPECIFIED? Why do we have both?

 they are the same, removed the second one (as that shouldn't be reachable
 since it exits on the first)

 >  * `grep dbutil` (in the tests) ‒ should it be grep DBUTIL? Or, better,
 grep .?
 >

 ack, . it is

-- 
Ticket URL: <http://bind10.isc.org/ticket/963#comment:20>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list