openstack overcloud deploy will use the old plan and wont update on a second deploy

Bug #1620932 reported by Dougal Matthews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Dougal Matthews

Bug Description

When deploying with `openstack overcloud deploy --templates` a new plan will be created in Mistral with the templates, if you then deploy again with modified templates it will use the old templates.

It should cleanup/delete the old plan or update it before deploying.

Dougal Matthews (d0ugal)
description: updated
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/366541

Changed in tripleo:
assignee: nobody → Dougal Matthews (d0ugal)
status: Confirmed → In Progress
Revision history for this message
Dougal Matthews (d0ugal) wrote :

In the the attached patch plans will now be updated when deploying if they already exist. However, i'd like to propose the following strategy.

1. If the plan exists, and isn't deployed, delete it and then create a new one.

This is going to be a very common case as we create a default plan called overcloud with the default templates. So anyone doing anything slightly custom or using the `openstack overcloud deploy --templates` CLI command will be updating an existing plan, and the first time it will never be deployed. Deleting it first wont lose anything and will be cleaner.

2. If the plan exists, and is deployed, updated.

If it has already been deployed, then update the plan. This is because we don't currently allow deleting a plan that is deployed.

3. If the plan doesn't exist, create it.

This will happen for new plan names or when a user manually removes the initial plan.

Dougal Matthews (d0ugal)
tags: added: tripleo-common workflows
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/366541
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=943f5504158980853e636bec2c39879f8644f46e
Submitter: Jenkins
Branch: master

commit 943f5504158980853e636bec2c39879f8644f46e
Author: Dougal Matthews <email address hidden>
Date: Wed Sep 7 08:09:29 2016 +0100

    Update plan files when re-deploying

    When doing a second deploy we need to update the plan templates to match those
    passed into the deploy command. The cleanest way to do this is to remove the
    existing files in swift and then upload the new files.

    Closes-Bug: #1620932
    Depends-On: I35be5ed5062bb26ca31b55d049780a1423c2ce46
    Change-Id: I7620c09005ee35bdb2fff1c77471548bb56baff7

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/368807

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/368821

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (stable/newton)

Change abandoned by Emilien Macchi (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/368807
Reason: Need to be squashed, see https://review.openstack.org/#/c/368821/ for more context.

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

Reviewed: https://review.openstack.org/368821
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=98656b5717902c6ddff7090104952019d259cc15
Submitter: Jenkins
Branch: stable/newton

commit 98656b5717902c6ddff7090104952019d259cc15
Author: Saravanan KR <email address hidden>
Date: Wed Jun 22 14:06:34 2016 +0530

    [squash] Required backports for stable/newton

    Because we branched tripleoclient before other TripleO projects,
    some changes in THT broke tripleoclient from stable/newton, and we need
    to backport a serie of patches together otherwise they will never pass
    CI.

    Backport #1:
    NTP arg should be optional when specified in an environment
    For HA deploy, NTP parameter presence is made mandatory, but it should
    be optional if NtpServer parameter has been provided via environment yaml.
    Closes-Bug: 1577928
    (cherry picked from commit 3ef0a4b889aed3251d7544205973e5ea273079e8)

    Backport #2:
    Add 'openstack overcloud plan create' command
    This uses the new Mistral actions and workflows to create a
    plan with the tripleo heat templates. Templates can either
    be provided by the user or the default templates on the
    undercloud can be used.
    Closes-Bug: #1616014
    (cherry picked from commit 2c0fecf69ce4889b208b60400eccd935ee32a8d6)

    Backport #3:
    Update the 'overcloud deploy --templates' command to use Mistral
    This is a backwards compatible version of the deploy command
    which uses the new Mistral workflows to power the deploy.
    Depends-On: I7a61bf6fb71cc4a26aaf4322f2215683aafe20f3
    (cherry picked from commit c03ed23272442bf133a47178fba73896fb47c2d0)

    Backport #4:
    Get template contents from plan, not local path
    This allows the new overcloud.j2.yaml format, which is
    rendered to create the overcloud.yaml file in the swift
    plan via the tripleo.process_templates action
    Note it may be valid to modify the roles_data prior to an update,
    so we need a plan update workflow that can re-run the process_templates
    step.
    Partially-Implements: blueprint custom-roles
    (cherry picked from commit 2898e7595f5df5ad9e46a137a8fd5ca6bf166369)

    Backport #5:
    Update plan files when re-deploying
    When doing a second deploy we need to update the plan templates to match those
    passed into the deploy command. The cleanest way to do this is to remove the
    existing files in swift and then upload the new files.
    Closes-Bug: #1620932
    (cherry picked from commit 943f5504158980853e636bec2c39879f8644f46e)

    Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699b

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 5.5.0

This issue was fixed in the openstack/python-tripleoclient 5.5.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.