Minor update always triggered on first stack-deploy after major upgrade

Bug #1567385 reported by Jiří Stránský
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Jiří Stránský

Bug Description

After we finish a major upgrade (from kilo to liberty), and then we run `openstack overcloud deploy`, minor update logic automatically kicks in, similarly as if the user ran `openstack overcloud update` instead, but without the breakpoints being set.

Revision history for this message
Jiří Stránský (jistr) wrote :

This is probably due to UpdateIdentifier persisting from the -converge.yaml run, and TripleO::Tasks::PackageUpdate no longer being no-opped.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-heat-templates (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/304094

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/302720
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=4810728c3df4ebab3b8bd5a382ccdd4cd762ac55
Submitter: Jenkins
Branch: master

commit 4810728c3df4ebab3b8bd5a382ccdd4cd762ac55
Author: Jiri Stransky <email address hidden>
Date: Thu Apr 7 14:02:31 2016 +0200

    Unset UpdateIdentifier on deploy/scale, pass in StackAction

    Previously we tried to use UpdateIdentifier for two different things:
    tell whether to perform package update, and also to tell whether the
    top-level stack is being created or updated (which was incorrect and
    resulted in bug 1567384, and an attempt to work around that bug resulted
    in bug 1567385).

    We cannot use Heat's "action" conditionals in some cases, because they
    refer to the direct parent stack, which can yield undesirable results
    when introducing new nested stacks or temporarily no-opping something
    and then adding it back (in both these cases, "action" would be
    considered "CREATE", even though the top-level stack is in "UPDATE").

    So we clear UpdateIdentifier on deploy/scale to make sure that package
    update doesn't get triggered, and we pass new StackAction parameter to
    allow us to correctly distinguish between create vs. update of the
    top-level stack, and condition the pacemaker restarts on this variable
    instead.

    Change-Id: I9dc3b4cd8a6a71df34d8babf0e4c6505041f5311
    Related-Bug: #1567384
    Closes-Bug: #1567385

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/306391

tags: added: liberty-backport-potential mitaka-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/mitaka)

Reviewed: https://review.openstack.org/306391
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=81cef4711a125290bd7f2212026e56d6e83ea759
Submitter: Jenkins
Branch: stable/mitaka

commit 81cef4711a125290bd7f2212026e56d6e83ea759
Author: Jiri Stransky <email address hidden>
Date: Thu Apr 7 14:02:31 2016 +0200

    Unset UpdateIdentifier on deploy/scale, pass in StackAction

    Previously we tried to use UpdateIdentifier for two different things:
    tell whether to perform package update, and also to tell whether the
    top-level stack is being created or updated (which was incorrect and
    resulted in bug 1567384, and an attempt to work around that bug resulted
    in bug 1567385).

    We cannot use Heat's "action" conditionals in some cases, because they
    refer to the direct parent stack, which can yield undesirable results
    when introducing new nested stacks or temporarily no-opping something
    and then adding it back (in both these cases, "action" would be
    considered "CREATE", even though the top-level stack is in "UPDATE").

    So we clear UpdateIdentifier on deploy/scale to make sure that package
    update doesn't get triggered, and we pass new StackAction parameter to
    allow us to correctly distinguish between create vs. update of the
    top-level stack, and condition the pacemaker restarts on this variable
    instead.

    Change-Id: I9dc3b4cd8a6a71df34d8babf0e4c6505041f5311
    Related-Bug: #1567384
    Closes-Bug: #1567385
    (cherry picked from commit 4810728c3df4ebab3b8bd5a382ccdd4cd762ac55)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/304094
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=aa0bd9eb1b16581f258f0fe1a4e7331df67c1c85
Submitter: Jenkins
Branch: master

commit aa0bd9eb1b16581f258f0fe1a4e7331df67c1c85
Author: Jiri Stransky <email address hidden>
Date: Mon Apr 11 12:38:00 2016 +0200

    Fix distinguishing between stack-create and stack-update

    Previously we tried to use UpdateIdentifier for two different things:
    tell whether to perform package update, and also to tell whether the
    top-level stack is being created or updated (which was incorrect and
    resulted in bug 1567384, and an attempt to work around that bug resulted
    in bug 1567385).

    We cannot use Heat's "action" conditionals in some cases, because they
    refer to the direct parent stack, which can yield undesirable results
    when introducing new nested stacks or temporarily no-opping something
    and then adding it back (in both these cases, "action" would be
    considered "CREATE", even though the top-level stack is in "UPDATE").

    So tripleoclient passes a new parameter StackAction to tell whether the
    top-level stack is being created or updated, and we make use of
    that. (It seems there's no better way of getting this info from within
    the nested Heat stacks.)

    Change-Id: Ie14ddbff15e7ed21aaa3fcdacf36e0040f912382
    Depends-On: I9dc3b4cd8a6a71df34d8babf0e4c6505041f5311
    Closes-Bug: #1567384
    Related-Bug: #1567385

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

Related fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/312420

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-tripleoclient 5.0.0.0b1

This issue was fixed in the openstack/python-tripleoclient 5.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-heat-templates (stable/mitaka)

Reviewed: https://review.openstack.org/312420
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=fda107a3f1ea4fd63a2b3581772432f079c09e3c
Submitter: Jenkins
Branch: stable/mitaka

commit fda107a3f1ea4fd63a2b3581772432f079c09e3c
Author: Jiri Stransky <email address hidden>
Date: Mon Apr 11 12:38:00 2016 +0200

    Fix distinguishing between stack-create and stack-update

    Previously we tried to use UpdateIdentifier for two different things:
    tell whether to perform package update, and also to tell whether the
    top-level stack is being created or updated (which was incorrect and
    resulted in bug 1567384, and an attempt to work around that bug resulted
    in bug 1567385).

    We cannot use Heat's "action" conditionals in some cases, because they
    refer to the direct parent stack, which can yield undesirable results
    when introducing new nested stacks or temporarily no-opping something
    and then adding it back (in both these cases, "action" would be
    considered "CREATE", even though the top-level stack is in "UPDATE").

    So tripleoclient passes a new parameter StackAction to tell whether the
    top-level stack is being created or updated, and we make use of
    that. (It seems there's no better way of getting this info from within
    the nested Heat stacks.)

    Change-Id: Ie14ddbff15e7ed21aaa3fcdacf36e0040f912382
    Depends-On: I9dc3b4cd8a6a71df34d8babf0e4c6505041f5311
    Closes-Bug: #1567384
    Related-Bug: #1567385
    (cherry picked from commit aa0bd9eb1b16581f258f0fe1a4e7331df67c1c85)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-tripleoclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/336526

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

Reviewed: https://review.openstack.org/336526
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=88548d8742cd00c8a5a0b3c371af7a5cff5d5df3
Submitter: Jenkins
Branch: master

commit 88548d8742cd00c8a5a0b3c371af7a5cff5d5df3
Author: Jiri Stransky <email address hidden>
Date: Fri Jul 1 13:48:45 2016 +0200

    Unset UpdateIdentifier on deploy

    We stopped clearing UpdateIdentifier because setting it to None caused
    issues with template validation. However, this introduced a regression
    with regards to minor updates.

    We do patch stack-updates, which means that the UpdateIdentifer can
    persist from previous runs. This can cause unwanted minor update on a
    normal stack-update or on a scale-up, if the UpdateIdentifier is not
    empty. We could prevent it on normal stack-update via some means,
    e.g. persisting the last known update identifier value on the nodes and
    comparing that with current value from the parameter. However, working
    around this issue on scale-up would probably be considerably harder. A
    good way forward seems to be to explicitly unset UpdateIdentifier as we
    did before, but do it in a way that doesn't cause validation problems.

    Change-Id: I7f6e3a65bb1f44a42cc532a537f1067bee168142
    Closes-Bug: #1598124
    Related-Bug: #1567385
    Related-Bug: #1596640

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-tripleoclient 2.1.0

This issue was fixed in the openstack/python-tripleoclient 2.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/python-tripleoclient 2.1.0 release.

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.