Network metadata lookup can be incorrect if using other plugins that override values in network_metadata

Bug #1585350 reported by Vlad Naboichenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StackLight
Fix Released
Medium
Simon Pasquier

Bug Description

I'm using other plugin in pair with LMA plugins. In my custom plugin i make some hiera overrides and put my plugin yaml on top of the hierarchy.

Deployment fails on task check_environment_configuration.pp

because of lookup

https://github.com/openstack/fuel-plugin-lma-collector/blob/master/deployment_scripts/puppet/manifests/check_environment_configuration.pp

$network_metadata = hiera('network_metadata')

In my yaml i also have this key, with my changes, so lookup will show only value from my yaml, but it will not show content of /etc/hiera/astute.yaml.

It would be nice to make call hiera_hash instead of hiera, so in this case hiera will merge this 2 hashes.

Attached brief log from puppet.log

2016-05-24 03:08:58 +0000 Scope(Class[main]) (notice): fuel-plugin-lma-collector: check_environment_configuration.pp
2016-05-24 03:08:58 +0000 Puppet (err): get_nodes_hash_by_roles($network_metadata_hash, ['node_role1','node_role2']): 1st argument should be a valid network_metadata hash at /etc/fuel/plugins/lma_collector-0.10/puppet/manifests/check_environment_configuration.pp:36 on node node-6.test.domain.local
/etc/puppet/modules/osnailyfacter/lib/puppet/parser/functions/get_nodes_hash_by_roles.rb:11:in `block in <module:Functions>'
/usr/lib/ruby/vendor_ruby/puppet/parser/functions.rb:164:in `block (2 levels) in newfunction'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
...

Changed in lma-toolchain:
assignee: nobody → LMA-Toolchain Fuel Plugins (mos-lma-toolchain)
Changed in lma-toolchain:
status: New → Triaged
milestone: none → 0.10.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-influxdb-grafana (master)

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

Changed in lma-toolchain:
assignee: LMA-Toolchain Fuel Plugins (mos-lma-toolchain) → Simon Pasquier (simon-pasquier)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-elasticsearch-kibana (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-lma-infrastructure-alerting (master)

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

Changed in lma-toolchain:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-lma-collector (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-lma-infrastructure-alerting (master)

Reviewed: https://review.openstack.org/320831
Committed: https://git.openstack.org/cgit/openstack/fuel-plugin-lma-infrastructure-alerting/commit/?id=9dc75657da97d0cba564672ed32c5275d7ecef79
Submitter: Jenkins
Branch: master

commit 9dc75657da97d0cba564672ed32c5275d7ecef79
Author: Simon Pasquier <email address hidden>
Date: Wed May 25 10:28:32 2016 +0200

    Use hiera_hash for network data

    Change-Id: Ie578479ed3dac2b3560e1a0cd9703b2e5a6e3e35
    Partial-Bug: #1585350

Changed in lma-toolchain:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-lma-collector (master)

Reviewed: https://review.openstack.org/320839
Committed: https://git.openstack.org/cgit/openstack/fuel-plugin-lma-collector/commit/?id=1f759e7f3dbf477a570d783ae6fcc09456266e5b
Submitter: Jenkins
Branch: master

commit 1f759e7f3dbf477a570d783ae6fcc09456266e5b
Author: Simon Pasquier <email address hidden>
Date: Wed May 25 10:44:31 2016 +0200

    Use hiera_hash for network data

    Change-Id: I171d08e974d635d85b391c3bc29366f0f4dd7b59
    Closes-Bug: #1585350

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-elasticsearch-kibana (master)

Reviewed: https://review.openstack.org/320830
Committed: https://git.openstack.org/cgit/openstack/fuel-plugin-elasticsearch-kibana/commit/?id=c79b7c2b99cd612021ab51a2c0fa2fe90ebc6351
Submitter: Jenkins
Branch: master

commit c79b7c2b99cd612021ab51a2c0fa2fe90ebc6351
Author: Simon Pasquier <email address hidden>
Date: Wed May 25 10:27:28 2016 +0200

    Use hiera_hash for network data

    Change-Id: I858f89fa3d642bbfeb6c355efa26330d463882e7
    Partial-Bug: #1585350

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugin-influxdb-grafana (master)

Reviewed: https://review.openstack.org/320827
Committed: https://git.openstack.org/cgit/openstack/fuel-plugin-influxdb-grafana/commit/?id=b4ac048b5c47b6452caa2c44b942aa551a2a6628
Submitter: Jenkins
Branch: master

commit b4ac048b5c47b6452caa2c44b942aa551a2a6628
Author: Simon Pasquier <email address hidden>
Date: Wed May 25 10:24:30 2016 +0200

    Use hiera_hash for network data

    Change-Id: I3959b8a8a279e20a4b4c26e6c9490d4eaa55b44f
    Partial-Bug: #1585350

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-lma-infrastructure-alerting (stable/0.9)

Fix proposed to branch: stable/0.9
Review: https://review.openstack.org/341540

Changed in lma-toolchain:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-plugin-lma-infrastructure-alerting (stable/0.9)

Change abandoned by Swann Croiset (<email address hidden>) on branch: stable/0.9
Review: https://review.openstack.org/341540
Reason: for history !

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.