hiera('network_metadata') in manifests does not allow to override with hash merge

Bug #1524336 reported by Aleksandr Didenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Aleksandr Didenko

Bug Description

If you try to override anything in network_metadata hash partially via Hiera deep merge (for instance override only gateway, or only VIPs), then deployment will fail with puppet parse errors like:

Error: get_nodes_hash_by_roles($network_metadata_hash, ...): 1st argument should be a valid network_metadata hash

Steps to reproduce:
1) Create any env with controller+compute
2) Inject task right after globlals.pp that will create /etc/hiera/override/configuration/cluster.yaml file with the following content:

network_metadata:
  vips:
    management:
      namespace: 'haproxy'

3) Deploy cluster

Expected result:
Cluster deploy is successful

Actual result:
Deployment fails with puppet errors

Affected version is 8.0

Tags: area-library
Changed in fuel:
status: New → In Progress
Revision history for this message
Alex Schultz (alex-schultz) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/254719
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=cb8437caf196f6b6ba27bdf8be963f6185eb8c99
Submitter: Jenkins
Branch: master

commit cb8437caf196f6b6ba27bdf8be963f6185eb8c99
Author: Aleksandr Didenko <email address hidden>
Date: Tue Dec 8 12:20:19 2015 +0100

    Use hiera_hash lookup for network_metadata

    Replace hiera() with hiera_hash() for 'network_metadata' key to
    provide override possibility.

    Closes-bug: #1524336

    Change-Id: Id28397e4960badb0d1af86811afef6fb2c91f7dd

Changed in fuel:
status: In Progress → Fix Released
Changed in fuel:
status: Fix Released → Fix Committed
tags: added: on-verification
Revision history for this message
Sergey Novikov (snovikov) wrote :

Verified on VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "491"
  build_id: "491"
  fuel-nailgun_sha: "b900f9d9de4d2b6ccf27f4addf3f0e38502a0bac"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "e869072139670bb8bbfde00ef04dec3d189f5927"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "f7a008e6801ba0072b08302a740174aec506078a"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "351d568fa3b3e4dd062054b91d766aa54d379867"
  fuelmenu_sha: "fac143f4dfa75785758e72afbdc029693e94ff2b"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "6b993b3004e8d97d840b672d6c1d44c320975cd9"

STV:
1. Create env with 3 controller+1 compute
2) Inject task right after globlals.pp that will create /etc/hiera/override/configuration/cluster.yaml file with the following content:

network_metadata:
  vips:
    management:
      namespace: 'haproxy'

content of tasks.yaml:

- id: bug
  type: puppet
  version: 2.0.0
  groups: [primary-controller, controller, compute]
  required_for: [deploy_end]
  requires: [globals]
  parameters:
    puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/bug/bug.pp
    puppet_modules: /etc/puppet/modules
    timeout: 1200

content of bug.pp:
notice("MODULAR: bug verification")

File {
  owner => 'root',
  group => 'root',
  mode => '0644',
}

file { "/etc/hiera/override/configuration/cluster.yaml":
  ensure => present,
  content => "
network_metadata:
  vips:
    management:
      namespace: 'haproxy'",
}

3) Deploy cluster

Changed in fuel:
status: Fix Committed → Fix Released
tags: removed: on-verification
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.