Ocata to Pike upgrade: duplicate default cell_v2 cells are created

Bug #1718912 reported by Oliver Walsh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Oliver Walsh

Bug Description

After an upgrade we have 2 default cell_v2 cells:

# nova-manage cell_v2 list_cells
+---------+--------------------------------------+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
| Name | UUID | Transport URL | Database Connection |
+---------+--------------------------------------+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
| cell0 | 00000000-0000-0000-0000-000000000000 | none:/ | mysql+pymysql://nova:****@172.17.1.11/nova_cell0?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo |
| default | 1f4fa8fd-966c-4e46-b90b-164aa8b7e49b | rabbit://guest:****@controller-2.internalapi.localdomain:5672/?ssl=0 | mysql+pymysql://nova:****@172.17.1.11/nova?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo |
| default | 87002684-89e6-4227-8a8d-8c501dcf3a92 | rabbit://guest:****@controller-2.internalapi.localdomain:5672/?ssl=0 | mysql+pymysql://nova:****@172.17.1.11/nova?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf |
+---------+--------------------------------------+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+

This is caused by the slight difference in the database connection string. Arguably nova-manage cell_v2 create_cell should handle this when comparing the cells but it's just a dumb string comparison. Regardless, we should detect that the default cell already exists and update it to use the current transport_url/database_connection instead of attempting to create a new cell.

Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1477770

Oliver Walsh (owalsh)
Changed in tripleo:
assignee: nobody → Oliver Walsh (owalsh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/506595

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/513383

Changed in tripleo:
milestone: queens-1 → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (stable/pike)

Change abandoned by Oliver Walsh (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/513383
Reason: postponing backport until it merges on master

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/506595
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=ebcaabcc5c5d2840128b3609c82c4a70a81ea0a0
Submitter: Zuul
Branch: master

commit ebcaabcc5c5d2840128b3609c82c4a70a81ea0a0
Author: Oliver Walsh <email address hidden>
Date: Fri Sep 22 12:06:43 2017 +0100

    Update default cell_v2 cell when it already exists

    nova-manage cell_v2 create_cell just uses a dumb string comparison to detect
    when a cell already exists. If there is a slight difference (e.g ordering of
    params in the db uri query string) it can result in duplicate cells.

    With this patch we should detect that the default cell already exists and
    update it to use the current transport_url/database_connection instead of
    attempting to create a new cell.

    Change-Id: If6a32e87b19cb0edf683144367701a115657ad0a
    Closes-bug: 1718912

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/pike)

Reviewed: https://review.openstack.org/513383
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=3205096b741f5ebcfba4dc90476526cc1df14823
Submitter: Zuul
Branch: stable/pike

commit 3205096b741f5ebcfba4dc90476526cc1df14823
Author: Oliver Walsh <email address hidden>
Date: Fri Sep 22 12:06:43 2017 +0100

    Update default cell_v2 cell when it already exists

    nova-manage cell_v2 create_cell just uses a dumb string comparison to detect
    when a cell already exists. If there is a slight difference (e.g ordering of
    params in the db uri query string) it can result in duplicate cells.

    With this patch we should detect that the default cell already exists and
    update it to use the current transport_url/database_connection instead of
    attempting to create a new cell.

    Change-Id: If6a32e87b19cb0edf683144367701a115657ad0a
    Closes-bug: 1718912
    (cherry picked from commit ebcaabcc5c5d2840128b3609c82c4a70a81ea0a0)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 7.0.4

This issue was fixed in the openstack/tripleo-heat-templates 7.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.0.0.0b2

This issue was fixed in the openstack/tripleo-heat-templates 8.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.