← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1729806] Re: nova-manage update_cell does not check if the same combination of transport_url and database_connection already exists

 

Reviewed:  https://review.openstack.org/518556
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c34e37eef31add8224211b799a56d866c5013fbd
Submitter: Zuul
Branch:    master

commit c34e37eef31add8224211b799a56d866c5013fbd
Author: Surya Seetharaman <suryaseetharaman.9@xxxxxxxxx>
Date:   Wed Nov 8 15:57:16 2017 +0100

    update_cell allows more than once cell to have the same db/transport url
    
    Unlike in nova-manage create_cell, in nova-manage update_cell the check
    for the same combination of transport-url and/or database_connection
    does not exist. Hence it allows a user to update a cell's transport-url
    and/or database_connection to another existing cell's transport/db urls.
    
    Change-Id: Ia5d5566c535d6da3d215392590a2d362e1226424
    Closes-Bug: #1729806


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

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

Title:
  nova-manage update_cell does not check if the same combination of
  transport_url and database_connection already exists

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) ocata series:
  New
Status in OpenStack Compute (nova) pike series:
  New

Bug description:
  Unlike in nova-manage create_cell, in nova-manage update_cell the
  check for the same combination of transport-url and
  database_connection does not exist. Hence it allows a user to update a
  cell's transport-url and database_connection to another existing
  cell's configuration which can create inconsistency (if a user
  accidentally does do it) and should not be allowed IMO.

  Steps to Reproduce :

  -> nova-manage cell_v2 list_cells

  +-------+--------------------------------------+-----------------------------------------------------------+--------------------------------------------------------------------+
  |  Name |                 UUID                 |                       Transport URL                       |                        Database Connection                         |
  +-------+--------------------------------------+-----------------------------------------------------------+--------------------------------------------------------------------+
  | cell0 | 00000000-0000-0000-0000-000000000000 |                           none:/                          |    mysql+pymysql://root:****@127.0.0.1/nova_cell0?charset=utf8     |
  | cell1 | 20f9fd43-7295-4f67-8f0c-7828b12f5e4f |  rabbit://stackrabbit:****@188.185.83.1:5672/nova_cell1  |  mysql+pymysql://root:****@188.185.83.1/nova_cell1?charset=utf8  |
  | cell2 | 7acaf644-d181-420b-ac80-486b83793bd2 | rabbit://stackrabbit:****@188.185.83.2:5672/nova_cell1 | mysql+pymysql://root:****@188.185.83.2/nova_cell1?charset=utf8 |
  +-------+--------------------------------------+-----------------------------------------------------------+--------------------------------------------------------------------+

  -> nova-manage cell_v2 update_cell --cell-uuid 7acaf644-d181-420b-
  ac80-486b83793bd2 --transport-url
  rabbit://stackrabbit:****@188.185.83.1:5672/nova_cell1
  --database_connection
  mysql+pymysql://root:****@188.185.83.1/nova_cell1?charset=utf8

  Expected result
  ===============
  "Cell with the specified transport_url and database_connection combination already exists"

  Actual result
  =============

  -> nova-manage cell_v2 list_cells

  +-------+--------------------------------------+-----------------------------------------------------------+--------------------------------------------------------------------+
  |  Name |                 UUID                 |                       Transport URL                       |                        Database Connection                         |
  +-------+--------------------------------------+-----------------------------------------------------------+--------------------------------------------------------------------+
  | cell0 | 00000000-0000-0000-0000-000000000000 |                           none:/                          |    mysql+pymysql://root:****@127.0.0.1/nova_cell0?charset=utf8     |
  | cell1 | 20f9fd43-7295-4f67-8f0c-7828b12f5e4f |  rabbit://stackrabbit:****@188.185.83.1:5672/nova_cell1  |  mysql+pymysql://root:****@188.185.83.1/nova_cell1?charset=utf8  |
  | cell2 | 7acaf644-d181-420b-ac80-486b83793bd2 | rabbit://stackrabbit:****@188.185.83.1:5672/nova_cell1 | mysql+pymysql://root:****@188.185.83.1/nova_cell1?charset=utf8 |
  +-------+--------------------------------------+-----------------------------------------------------------+--------------------------------------------------------------------+

  Solution : The same kind of check in nova-manage create_cell needs to
  be done in nova-manage update_cell  as well.

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


References