Migration tasks fail with new version of TripleO Heat Templates

Bug #1850050 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Undecided
Emilien Macchi
tripleo
Fix Released
High
Emilien Macchi

Bug Description

TripleO has changed the way it generates container configuration; See https://review.opendev.org/#/c/688779/

The migration script for OVN will have to be updated as the hashed configuration location has changed.

Changed in networking-ovn:
assignee: nobody → Emilien Macchi (emilienm)
Revision history for this message
Emilien Macchi (emilienm) wrote :

FYI I'll work on it (since I broke it).

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

Related fix proposed to branch: master
Review: https://review.opendev.org/691528

Changed in tripleo:
milestone: none → ussuri-1
assignee: nobody → Emilien Macchi (emilienm)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (master)

Fix proposed to branch: master
Review: https://review.opendev.org/691529

Changed in networking-ovn:
status: New → In Progress
Changed in tripleo:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-ovn (master)

Change abandoned by Emilien Macchi (<email address hidden>) on branch: master
Review: https://review.opendev.org/691529
Reason: nevermind, i'll make it backward compatible with https://review.opendev.org/691528

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

Reviewed: https://review.opendev.org/691528
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=68ecaf90611718e1fb1ac77e7eb199036ff1c769
Submitter: Zuul
Branch: master

commit 68ecaf90611718e1fb1ac77e7eb199036ff1c769
Author: Emilien Macchi <email address hidden>
Date: Sun Oct 27 21:26:15 2019 +0100

    Fix backward compatibility for old config startup files

    In I1cf8923a698d0f6e0b1e00a7985f363a83e914c4, we changed the format for
    container-startup-config and now have one JSON file per container, per
    step. It'll make it easier to operate containers one by one, instead of
    in one big JSON per step.

    However this change wasn't 100% backward compatible, and this patch aims
    to fix it.

    This patch does:

    1) Support a directory of configs without container name

    The --file argument can now be a directory where the container
    configuration file is located.

    Example:
    paunch debug (...) --file /var/lib/tripleo-config/container-startup-config/step_1

    All configs will be returned.

    2) Support a directory of config and a container name

    Example:
    paunch debug (...) --container haproxy --file /var/lib/tripleo-config/container-startup-config/step_1

    Only the container config will be returned.

    3) Support the old format file without container name

    If the user specifies:
    --file /var/lib/tripleo-config/hashed-container-startup-config-step_1.json

    It'll return all container configs for the JSON files in:
    /var/lib/tripleo-config/container-startup-config/step_1/ (directory)

    4) Support the old format file with container name

    If the user specifies:
    --container haproxy --file /var/lib/tripleo-config/hashed-container-startup-config-step_1.json

    It'll return the hashed container config file:
    /var/lib/tripleo-config/container-startup-config/step_1/hashed-haproxy.json

    5) Add support for running paunch with a file + new format

    The new format would be:

    --container haproxy --file /var/lib/tripleo-config/container-startup-config/step_1/hashed-haproxy.json

    The container config would be returned.

    Note: if no name is specified, it'll try to guess the name based on the
    file name. It'll remove "hashed-' from it in case it was an hashed file.

    This patch should resolve all backward compatibility issues so Paunch
    can be used with both the new and old format.

    Closes-Bug: #1850050
    Change-Id: I917679da22fa09614e73053654df6ce181cf98fe

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/paunch 6.0.0

This issue was fixed in the openstack/paunch 6.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to paunch (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/701740

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to paunch (stable/train)

Reviewed: https://review.opendev.org/701740
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=611b4c91ab6a5b06b5358b1f792e3b78268b9a53
Submitter: Zuul
Branch: stable/train

commit 611b4c91ab6a5b06b5358b1f792e3b78268b9a53
Author: Emilien Macchi <email address hidden>
Date: Sun Oct 27 21:26:15 2019 +0100

    Fix backward compatibility for old config startup files

    In I1cf8923a698d0f6e0b1e00a7985f363a83e914c4, we changed the format for
    container-startup-config and now have one JSON file per container, per
    step. It'll make it easier to operate containers one by one, instead of
    in one big JSON per step.

    However this change wasn't 100% backward compatible, and this patch aims
    to fix it.

    This patch does:

    1) Support a directory of configs without container name

    The --file argument can now be a directory where the container
    configuration file is located.

    Example:
    paunch debug (...) --file /var/lib/tripleo-config/container-startup-config/step_1

    All configs will be returned.

    2) Support a directory of config and a container name

    Example:
    paunch debug (...) --container haproxy --file /var/lib/tripleo-config/container-startup-config/step_1

    Only the container config will be returned.

    3) Support the old format file without container name

    If the user specifies:
    --file /var/lib/tripleo-config/hashed-container-startup-config-step_1.json

    It'll return all container configs for the JSON files in:
    /var/lib/tripleo-config/container-startup-config/step_1/ (directory)

    4) Support the old format file with container name

    If the user specifies:
    --container haproxy --file /var/lib/tripleo-config/hashed-container-startup-config-step_1.json

    It'll return the hashed container config file:
    /var/lib/tripleo-config/container-startup-config/step_1/hashed-haproxy.json

    5) Add support for running paunch with a file + new format

    The new format would be:

    --container haproxy --file /var/lib/tripleo-config/container-startup-config/step_1/hashed-haproxy.json

    The container config would be returned.

    Note: if no name is specified, it'll try to guess the name based on the
    file name. It'll remove "hashed-' from it in case it was an hashed file.

    This patch should resolve all backward compatibility issues so Paunch
    can be used with both the new and old format.

    Closes-Bug: #1850050
    Change-Id: I917679da22fa09614e73053654df6ce181cf98fe
    (cherry picked from commit 68ecaf90611718e1fb1ac77e7eb199036ff1c769)

tags: added: in-stable-train
Changed in networking-ovn:
status: In Progress → Fix Released
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.