Ubuntu packaging should handle (some) DB upgrades cases

Bug #705758 reported by Thierry Carrez on 2011-01-21
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Wishlist
Unassigned
nova (Ubuntu)
Wishlist
Unassigned

Bug Description

Continuation of bug 705073. From soren:

I've added a snippet to nova-common's postinst that creates the database if it's a fresh install.
I haven't sorted out upgrades yet, but I expect it'll involve checking if there's an sql_connection set in nova.conf. If so, show a help screen explaining that a db sync is needed and that it has to be synced between the components that share the data store. If no custom sql_connection is set, just do the upgrade.

I need to add a way to check if an upgrade is due, though. I only want to be showing the help text if there's actually an upgrade that needs to be done.

nova-manage db version?
On Jan 21, 2011 12:20 AM, "Thierry Carrez" <email address hidden> wrote:
> Public bug reported:
>
> Continuation of bug 705073. From soren:
>
> I've added a snippet to nova-common's postinst that creates the database
if it's a fresh install.
> I haven't sorted out upgrades yet, but I expect it'll involve checking if
there's an sql_connection set in nova.conf. If so, show a help screen
explaining that a db sync is needed and that it has to be synced between the
components that share the data store. If no custom sql_connection is set,
just do the upgrade.
>
> I need to add a way to check if an upgrade is due, though. I only want
> to be showing the help text if there's actually an upgrade that needs to
> be done.
>
> ** Affects: nova
> Importance: Wishlist
> Status: Confirmed
>
>
> ** Tags: ubuntu
>
> --
> You received this bug notification because you are a member of Nova Bug
> Team, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/705758
>
> Title:
> Ubuntu packaging should handle (some) DB upgrades cases
>
> Status in OpenStack Compute (Nova):
> Confirmed
>
> Bug description:
> Continuation of bug 705073. From soren:
>
> I've added a snippet to nova-common's postinst that creates the database
if it's a fresh install.
> I haven't sorted out upgrades yet, but I expect it'll involve checking if
there's an sql_connection set in nova.conf. If so, show a help screen
explaining that a db sync is needed and that it has to be synced between the
components that share the data store. If no custom sql_connection is set,
just do the upgrade.
>
> I need to add a way to check if an upgrade is due, though. I only want
> to be showing the help text if there's actually an upgrade that needs
> to be done.
>
>

Soren Hansen (soren) wrote :

"nova-manage db version" as I understand it, shows the current version of the schema (as seen in the data store). How can I tell if that's up-to-date?

It seems like we can manually change it each release. The script could specifically check for version 2 in the current version, then check for 3 at cactus release etc...
On Jan 27, 2011, at 5:12 AM, Soren Hansen wrote:

> "nova-manage db version" as I understand it, shows the current version
> of the schema (as seen in the data store). How can I tell if that's up-
> to-date?
>
> --
> You received this bug notification because you are a member of Nova Bug
> Team, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/705758
>
> Title:
> Ubuntu packaging should handle (some) DB upgrades cases
>
> Status in OpenStack Compute (Nova):
> Confirmed
>
> Bug description:
> Continuation of bug 705073. From soren:
>
> I've added a snippet to nova-common's postinst that creates the database if it's a fresh install.
> I haven't sorted out upgrades yet, but I expect it'll involve checking if there's an sql_connection set in nova.conf. If so, show a help screen explaining that a db sync is needed and that it has to be synced between the components that share the data store. If no custom sql_connection is set, just do the upgrade.
>
> I need to add a way to check if an upgrade is due, though. I only want
> to be showing the help text if there's actually an upgrade that needs
> to be done.
>
>

Thierry Carrez (ttx) wrote :

Not really something we can fix in Nova itself

Changed in nova (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Changed in nova:
status: Confirmed → Invalid
Soren Hansen (soren) wrote :

I've added a snippet to nova-common's postinst that checks if sql_connection is set in nova.conf. If not, it just runs "nova-manage db sync".

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nova - 2011.2~bzr760-0ubuntu1

---------------
nova (2011.2~bzr760-0ubuntu1) natty; urgency=low

  [Chuck Short]
  * New upstream version.
  * Fix up typos in debian/control. (LP: #721414)

  [ Thierry Carrez (ttx) ]
  * Add python-distutils-extra as build-dep (for i18n)
  * Ship .mo files in /usr/share/locale
  * Add lvdisplay to nova_sudoers, clean up dupe entries

  [ Soren Hansen ]
  * Always run "nova-manage db sync" from postinst, unless an explicit
    sql_connection has been set in nova.conf. (LP: #705758)
 -- Chuck Short <email address hidden> Fri, 04 Mar 2011 10:19:52 -0500

Changed in nova (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers