Bridge mappings parameter list conversion can fail

Bug #1866206 reported by Bernard Cafarelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-neutron
Fix Released
Undecided
Bernard Cafarelli

Bug Description

Original downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1807602

Depending on how NeutronBridgeMappings parameter is defined in heat templates, it can in some cases trigger the error:
puppet-user: Error: Evaluation Error: Error while evaluating a Function Call, 'join' parameter 'arg' expects an Array value, got String (file: /etc/puppet/modules/neutron/manifests/agents/ml2/ovs.pp, line: 271, column: 19) on node central-controller0-1.redhat.local", "+ rc=1", "+ '[' False = false ']'", "+ set -e", "+ '[' 1 -ne 2 -a 1 -ne 0 ']'", "+ exit 1", " attempt(s): 3", "2020-02-26 17:12:14,165 INFO: 39551 -- Removing container: container-puppet-neutron", "2020-02-26 17:12:14,323 WARNING: 39551 -- Retrying running container: neutron", "2020-02-26 17:12:14,323 ERROR: 39551 -- Failed running container for neutron", "2020-02-26 17:12:14,323 INFO: 39551 -- Finished processing puppet configs for neutron", "2020-02-26 17:12:14,324 ERROR: 39550 -- ERROR configuring neutron"]}

This has to do with the fact that NeutronBridgeMappings is being defined as a role specific parameter as opposed to the usual method. It seems there is a difference between how heat processes the values of a heat parameter versus the one provided through role specific data. For example:

parameter_defaults:
  NeutronBridgeMappings: "site1:br-link1"

versus

parameter_defaults:
  Controller0Parameters:
    NeutronBridgeMappings: "leaf0:br-ex"

lead to different results in the hieradata.

This would apply anywhere we use role specific data and rely on heat to do "something" type related when constructing the config data

We should handle this possible case in puppet module

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

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

Changed in puppet-neutron:
assignee: nobody → Bernard Cafarelli (bcafarel)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (master)

Reviewed: https://review.opendev.org/711497
Committed: https://git.openstack.org/cgit/openstack/puppet-neutron/commit/?id=73d64f2cc1742b855dc72dbc90f1d81cb6543413
Submitter: Zuul
Branch: master

commit 73d64f2cc1742b855dc72dbc90f1d81cb6543413
Author: Bernard Cafarelli <email address hidden>
Date: Thu Mar 5 17:09:39 2020 +0100

    Force cast bridge mappings as an array

    In some cases, the parameter will not passed as an array but as a
    string, causing conversion error when generating the matching list

    Force array parameter conversion to cover all cases

    Change-Id: I4290bb1dbb96ea0d57e6ad8c6a686c2bf103c907
    Closes-Bug: #1866206

Changed in puppet-neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (stable/train)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/711944

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/711945

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/711946

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

Reviewed: https://review.opendev.org/711943
Committed: https://git.openstack.org/cgit/openstack/puppet-neutron/commit/?id=afc5750e191868099c1e5319dbf09e44e4f69e0f
Submitter: Zuul
Branch: stable/train

commit afc5750e191868099c1e5319dbf09e44e4f69e0f
Author: Bernard Cafarelli <email address hidden>
Date: Thu Mar 5 17:09:39 2020 +0100

    Force cast bridge mappings as an array

    In some cases, the parameter will not passed as an array but as a
    string, causing conversion error when generating the matching list

    Force array parameter conversion to cover all cases

    Change-Id: I4290bb1dbb96ea0d57e6ad8c6a686c2bf103c907
    Closes-Bug: #1866206
    (cherry picked from commit 73d64f2cc1742b855dc72dbc90f1d81cb6543413)

tags: added: in-stable-train
tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (stable/stein)

Reviewed: https://review.opendev.org/711944
Committed: https://git.openstack.org/cgit/openstack/puppet-neutron/commit/?id=3991b18c8419e67ab13eed83da5a9d96672cf452
Submitter: Zuul
Branch: stable/stein

commit 3991b18c8419e67ab13eed83da5a9d96672cf452
Author: Bernard Cafarelli <email address hidden>
Date: Thu Mar 5 17:09:39 2020 +0100

    Force cast bridge mappings as an array

    In some cases, the parameter will not passed as an array but as a
    string, causing conversion error when generating the matching list

    Force array parameter conversion to cover all cases

    Change-Id: I4290bb1dbb96ea0d57e6ad8c6a686c2bf103c907
    Closes-Bug: #1866206
    (cherry picked from commit 73d64f2cc1742b855dc72dbc90f1d81cb6543413)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (stable/rocky)

Reviewed: https://review.opendev.org/711945
Committed: https://git.openstack.org/cgit/openstack/puppet-neutron/commit/?id=37edd6ebd3ba413b5c29f91085d5e9577416eab8
Submitter: Zuul
Branch: stable/rocky

commit 37edd6ebd3ba413b5c29f91085d5e9577416eab8
Author: Bernard Cafarelli <email address hidden>
Date: Thu Mar 5 17:09:39 2020 +0100

    Force cast bridge mappings as an array

    In some cases, the parameter will not passed as an array but as a
    string, causing conversion error when generating the matching list

    Force array parameter conversion to cover all cases

    Change-Id: I4290bb1dbb96ea0d57e6ad8c6a686c2bf103c907
    Closes-Bug: #1866206
    (cherry picked from commit 73d64f2cc1742b855dc72dbc90f1d81cb6543413)

tags: added: in-stable-rocky
tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (stable/queens)

Reviewed: https://review.opendev.org/711946
Committed: https://git.openstack.org/cgit/openstack/puppet-neutron/commit/?id=0f0e824d8da8dd77e9821ef38934fff017005bb3
Submitter: Zuul
Branch: stable/queens

commit 0f0e824d8da8dd77e9821ef38934fff017005bb3
Author: Bernard Cafarelli <email address hidden>
Date: Thu Mar 5 17:09:39 2020 +0100

    Force cast bridge mappings as an array

    In some cases, the parameter will not passed as an array but as a
    string, causing conversion error when generating the matching list

    Force array parameter conversion to cover all cases

    Conflicts:
     manifests/agents/ml2/linuxbridge.pp

    Change-Id: I4290bb1dbb96ea0d57e6ad8c6a686c2bf103c907
    Closes-Bug: #1866206
    (cherry picked from commit 73d64f2cc1742b855dc72dbc90f1d81cb6543413)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-neutron 16.2.0

This issue was fixed in the openstack/puppet-neutron 16.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-neutron 16.2.1

This issue was fixed in the openstack/puppet-neutron 16.2.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-neutron queens-eol

This issue was fixed in the openstack/puppet-neutron queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-neutron rocky-eol

This issue was fixed in the openstack/puppet-neutron rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-neutron stein-eol

This issue was fixed in the openstack/puppet-neutron stein-eol 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.