When upgrading from Kilo to Mitaka using actions, charm missed db sync for nova-controller

Bug #1611096 reported by Rafael David Tinoco
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-cloud-controller (Juju Charms Collection)
Fix Released
Critical
David Ames

Bug Description

When upgrading from Kilo to Mitaka using the following approach:

I got the following errors on nova-controller:

http://paste.ubuntu.com/22724447/

And you can see the table wasn't updated:

http://paste.ubuntu.com/22725394/

And it was fixed by running:

"nova manage db-sync" as root in nova-cloud-controller/0.

affects: nova-compute (Juju Charms Collection) → nova-cloud-controller (Juju Charms Collection)
Revision history for this message
David Ames (thedac) wrote :

The upgrade to mitaka requires the creation of the new database nova_api.

For the blanket upgrade approach db_joined is called after the upgrade to guarantee the creation of the DB:
https://github.com/openstack/charm-nova-cloud-controller/blob/master/hooks/nova_cc_hooks.py#L257

But when using action managed upgrades, config_changed is called but db_joined is not:
https://github.com/openstack/charm-nova-cloud-controller/blob/master/actions/openstack_upgrade.py#L48

This fails to create the required new db.

Changed in nova-cloud-controller (Juju Charms Collection):
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → David Ames (thedac)
milestone: none → 16.10
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (master)

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

Ryan Beisner (1chb1n)
tags: added: backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.openstack.org/352608
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=195853220d98b2b10e02621e9ac143bf9a45618f
Submitter: Jenkins
Branch: master

commit 195853220d98b2b10e02621e9ac143bf9a45618f
Author: David Ames <email address hidden>
Date: Mon Aug 8 14:26:33 2016 -0700

    Force db_joined on action upgrade for nova-api db

    On action managed upgrade db_joined was not called and the new required db,
    nova-api, was not created when upgrading to mitaka.

    Change-Id: Idde9655919dfb42b00f030d74c85ff09821e36ee
    Closes-bug: 1611096

Changed in nova-cloud-controller (Juju Charms Collection):
status: In Progress → Fix Committed
James Page (james-page)
summary: - When upgrading from Kilo to Mitaka, charm missed db sync for nova-
- controller (possibly)
+ When upgrading from Kilo to Mitaka using actions, charm missed db sync
+ for nova-controller
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (stable/16.07)

Fix proposed to branch: stable/16.07
Review: https://review.openstack.org/352952

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I just re-deployed my environment with the proposed fix fetched into a local charm (nova-controller) and everything worked correctly.

Thanks for the fix.

Revision history for this message
James Page (james-page) wrote :

Rafael - thanks for the feedback - landing the fix into the stable branch now

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (stable/16.07)

Reviewed: https://review.openstack.org/352952
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=49f954d3da68d7a205dc0eac4e1557189775c725
Submitter: Jenkins
Branch: stable/16.07

commit 49f954d3da68d7a205dc0eac4e1557189775c725
Author: David Ames <email address hidden>
Date: Mon Aug 8 14:26:33 2016 -0700

    Force db_joined on action upgrade for nova-api db

    On action managed upgrade db_joined was not called and the new required db,
    nova-api, was not created when upgrading to mitaka.

    Change-Id: Idde9655919dfb42b00f030d74c85ff09821e36ee
    Closes-bug: 1611096
    (cherry picked from commit 195853220d98b2b10e02621e9ac143bf9a45618f)

James Page (james-page)
Changed in nova-cloud-controller (Juju Charms Collection):
status: Fix Committed → Fix Released
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.