← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1698900] Re: DB check appears to not be working right

 

Reviewed:  https://review.openstack.org/475472
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=2a2f8535e2858400d68af74a8d813ca278f7a1b6
Submitter: Jenkins
Branch:    master

commit 2a2f8535e2858400d68af74a8d813ca278f7a1b6
Author: Lance Bragstad <lbragstad@xxxxxxxxx>
Date:   Mon Jun 19 17:41:13 2017 +0000

    Improve handling of database migration checks
    
    The `--check` subcommand is suppose to provide useful information
    and status codes depending on the state of the keystone database.
    Operators and automation use this information to determine what their
    next step is in a rolling upgrade. The current logic is broken
    becuase it doesn't account for new installations that might be
    relying on this information.
    
    This change breaks that case into multiple try/except statements and
    handles each appropriately so that the status code and logging
    information is accurate for operators and automation using this
    information for upgrading a new keystone database.
    
    Change-Id: I331fa663a99f79ea9a79a75e4ae07c45278556bf
    Closes-Bug: 1698900


** Changed in: keystone
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1698900

Title:
  DB check appears to not be working right

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  Using current master of keystone, executing a keystone-manage db_sync
  --check seems to always return the RC of 2 regardless of the steps
  previously confirmed. This happens until the contract is done, then it
  returns 0.

  Steps to reproduce:

  root@keystone1:/# mysqladmin drop keystone; mysql create keystone

  root@keystone1:/# keystone-manage db_sync --check; echo $?
  2

  root@keystone1:/# keystone-manage db_sync --expand; echo $?
  0

  root@keystone1:/# keystone-manage db_sync --check; echo $?
  2

  root@keystone1:/# keystone-manage db_sync --migrate; echo $?
  0

  root@keystone1:/# keystone-manage db_sync --check; echo $?
  2

  root@keystone1:/# keystone-manage db_sync --contract; echo $?
  0

  root@keystone1:/# keystone-manage db_sync --check; echo $?
  0

  Not getting the right return codes or advise from the check can spell
  disaster for automation that uses it, or humans following the
  documented migration process.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1698900/+subscriptions


References