Undercloud heat installer cannot rely on stack_action other than CREATE

Bug #1778505 reported by Bogdan Dobrelya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Bogdan Dobrelya

Bug Description

Hiera always shows stack_action CREATE for undercloud heat installer. For consequent in-place redeploys as well, as we always create a new ephemeral stack and never update. Everything in puppet-triple relying on stack_action != CREATE is broken, therefore.

Discovered in the scope of https://bugs.launchpad.net/bugs/1777939 . In the result, I was not able to update the puppet's rabbitmq_user as the stack_action was never UPDATE.

How to reproduce:

sudo puppet apply -e "notice(hiera('stack_action'))"
or
sudo hiera -c /etc/puppet/hiera.yaml stack_action

Tags: idempotency
Changed in tripleo:
importance: Undecided → Critical
milestone: none → rocky-3
status: New → Triaged
description: updated
tags: added: alert promotion-blocker
Changed in tripleo:
assignee: nobody → Quique Llorente (quiquell)
description: updated
Revision history for this message
Steven Hardy (shardy) wrote :

I suggest we drop some state e.g a file on the undercloud on the initial deploy, then use that to set the StackAction heat parameter to UPDATE on any subsequent update.

Changed in tripleo:
assignee: Quique Llorente (quiquell) → nobody
tags: removed: alert promotion-blocker
Changed in tripleo:
assignee: nobody → Bogdan Dobrelya (bogdando)
summary: - Undercloud heat installer cannot rely on stack_action
+ Undercloud heat installer cannot rely on stack_action other than CREATE
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/578088

Changed in tripleo:
status: Triaged → In Progress
tags: added: idempotency
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/578370

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (master)

Change abandoned by Bogdan Dobrelya (<email address hidden>) on branch: master
Review: https://review.openstack.org/578370
Reason: not needed I guess

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

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

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

Reviewed: https://review.openstack.org/578088
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=64436159e8f0b76959b4091b24308d112ee3cfc6
Submitter: Zuul
Branch: master

commit 64436159e8f0b76959b4091b24308d112ee3cfc6
Author: Bogdan Dobrelya <email address hidden>
Date: Tue Jun 26 13:38:17 2018 +0300

    Track fake stack updates for standalone/UC deploy

    Puppet relies on stack_action UPDATE for some cases.
    Track the ephemeral heat stacks fake state for tripleo
    undercloud/standalone deployments to match the puppet
    expectations. For such deployments, the heat stack
    state is a fake (virtual), as we never
    update but always create a new ephemeral heat stack.

    When the deployment is finished w/o errors, create the mark
    file (unique to the stack name) that is used to indicate to
    puppet the stack_action has been changed from CREATE to
    UPDATE. The indication is done via a drop-in file with
    top level override containing either 'StackAction: CREATE'
    or 'UPDATE'. The drop-in is created in the working/templates
    directory and named <Stack_name>-stack-vstate-dropin.yaml.

    When the deployment fails, remove the mark file, so
    the serial re-deployments will be considered as creating
    a stack. The --force-stack-update flag keeps the mark file
    instead, so the serial re-deployment will be
    considered (virtually) updating the heat stack.

    For the --output-only mode, only warn users to control
    the stack virtual state manually. The state is considered
    CREATE, unless there is --force-stack-update specified.

    For --dry-run, also log the expected stack virtual
    state/action the deployment would go with.

    Closes-bug: #1778505

    Change-Id: I55dc83acb2ed5ee07b4cf57e25135e6201589ac4
    Signed-off-by: Bogdan Dobrelya <email address hidden>

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

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

commit f14369c08515de9e969ea3b72be1da29772f6124
Author: Bogdan Dobrelya <email address hidden>
Date: Mon Jun 25 13:52:40 2018 +0300

    Fix non-HA rabbitmq user password updates

    Fix the invocation of puppet's rabbitmq_user by allowing the
    produced changes written into /var/lib/rabbitmq state.

    Move the docker_puppet_tasks for non-HA rabbit into the step_2
    as puppet-tripleo expects it for the rabbitmq_user call.

    Related-bug: #1777939
    Related-bug: #1778505

    Depends-on: I55dc83acb2ed5ee07b4cf57e25135e6201589ac4
    Change-Id: I7c7b2bd6d202268fdf4bc08f951ec4c9c4065c08
    Signed-off-by: Bogdan Dobrelya <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 10.3.0

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

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

Reviewed: https://review.openstack.org/578799
Committed: https://git.openstack.org/cgit/openstack/tripleo-docs/commit/?id=e7c8bf345f9670f6e638d23e38c7048119f909a7
Submitter: Zuul
Branch: master

commit e7c8bf345f9670f6e638d23e38c7048119f909a7
Author: Bogdan Dobrelya <email address hidden>
Date: Thu Jun 28 15:09:17 2018 +0300

    Document standalone/UC update Heat stack specifics

    Explain the overcloud vs undercloud/standalone heat stack updates
    Document use cases for the --force-stack-update option and how
    it can be used with --dry-run and --output-only.
    Briefly mention --dry-run and --output-only as well.

    Depends-on: I7c7b2bd6d202268fdf4bc08f951ec4c9c4065c08
    Related-bug: #1778505

    Change-Id: Ie24eaec6871990e38df4e66abe2cc1ea866d9bd9
    Signed-off-by: Bogdan Dobrelya <email address hidden>

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.