Comment 6 for bug 1349833

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/110900
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=001ffbd1562b96cb6bf82ddbd461449901489200
Submitter: Jenkins
Branch: master

commit 001ffbd1562b96cb6bf82ddbd461449901489200
Author: Evgeniy L <email address hidden>
Date: Thu Jul 31 14:55:06 2014 +0400

    Upgrades, remove saved version file on success

    * created on_success method which upgrade
      script runs if upgrade succeed, don't
      fail upgrade in case of errors
    * remove saved version files for all
      upgrades from working directories

    It solves several problems:

    1. user runs upgrade 5.0 -> 5.1 which fails
    upgrade system saves version which we upgrade
    from in file working_dir/5.1/version.yaml.
    Then user runs upgrade 5.0 -> 5.0.1 which
    successfully upgraded. Then user runs again
    upgrade 5.0.1 -> 5.1, but there is saved file
    working_dir/5.1/version.yaml which contains
    5.0 version, and upgrade system thinks that
    it's upgrading from 5.0 version, as result
    it tries to make database dump from wrong
    version of container.

    2. without this hack user can run upgrade
    second time and loose his data, this hack
    prevents this case because before upgrade
    checker will use current version instead
    of saved version to determine version which
    we run upgrade from.

    Change-Id: I5e6ae6ba2ae2e60b9812e131d2a7c533f4a38ab6
    Related-bug: #1349833