globals task works wrong on redeployment if hiera override done by plugin

Bug #1598163 reported by Roman Sokolkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Kyrylo Galanov
Mitaka
Fix Released
High
Kyrylo Galanov

Bug Description

Fuel 9.0 RC2

NetApp fuel plugin has hiera override that overrides "storage" section.

Globals.pp uses hiera() function instead of hiera_hash() for "storage" and other sections. [1]

This causes different globals.yaml on second (LCM) deploy-changes run.

In short, plugin that does hiera override will probably break LCM.

See the difference:
root@node-2:~# hiera storage
{"volume_backend_names"=>{"netapp"=>"cinder_netapp"}}

root@node-2:~# hiera -h storage
{"admin_key"=>"...",
 "bootstrap_osd_key"=>"...",
 "ephemeral_ceph"=>true,
 "fsid"=>"6ce16d0f-3466-4797-b637-9758e063bb85",
 "images_ceph"=>true,
 "images_vcenter"=>false,
 "metadata"=>{"group"=>"storage", "label"=>"Storage Backends", "weight"=>60},
 "mon_key"=>"...",
 "objects_ceph"=>true,
 "osd_pool_size"=>"3",
 "per_pool_pg_nums"=>
  {".rgw"=>64,
   "backups"=>64,
   "compute"=>64,
   "default_pg_num"=>64,
   "images"=>64,
   "volumes"=>64},
 "pg_num"=>64,
 "radosgw_key"=>"...",
 "volumes_block_device"=>false,
 "volumes_ceph"=>true,
 "volumes_lvm"=>false,
 "volume_backend_names"=>
  {"volumes_ceph"=>false,
   "volumes_lvm"=>false,
   "volumes_block_device"=>false,
   "netapp"=>"cinder_netapp"}}

Steps to reproduce:
1) Deploy 9.0 env
2) Do "hiera storage" on controller (Thats what hiera func does)
3) Simulate hiera override on controller

root@node-2:~# cat /etc/hiera/plugins/cinder_netapp.yaml
storage:
  volume_backend_names:
    netapp: cinder_netapp

4) Do "hiera storage"

Expected result: See all default values plus changes

Actual result: See only override

1 - https://github.com/openstack/fuel-library/blob/master/deployment/puppet/osnailyfacter/manifests/globals/globals.pp#L67

Dmitry Klenov (dklenov)
Changed in fuel:
milestone: none → 10.0
tags: added: area-library
no longer affects: fuel/newton
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Kyrylo Galanov (kgalanov)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

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

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

commit 0aed35fb32796bb2db3364da114a50c291704dd2
Author: Kyrylo Galanov <email address hidden>
Date: Tue Jul 12 07:22:55 2016 +0200

    Disable all hiera override yamls for globals

    We need to ensure that globals uses only astute.yaml to generate its
    helper variables. Othewise, we will have an issue on the second
    deployment if we modify astute.yaml and re-run the deployment

    Relates to I91ab492b44c137c476722f65de3dd99b2dce988a

    Change-Id: Ieef42f063911ed05ce05f1411bbaa1d4867aa455
    Related-Bug: #1590375
    Closes-bug: #1598163

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
summary: - globals task works wrong if hiera override done by plugin
+ globals task works wrong on redeployment if hiera override done by
+ plugin
tags: added: 9.1-proposed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/354064

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/mitaka)

Reviewed: https://review.openstack.org/354064
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=376f82c3ad2b442e78026910e507d1ec87226945
Submitter: Jenkins
Branch: stable/mitaka

commit 376f82c3ad2b442e78026910e507d1ec87226945
Author: Kyrylo Galanov <email address hidden>
Date: Tue Jul 12 07:22:55 2016 +0200

    Disable all hiera override yamls for globals

    We need to ensure that globals uses only astute.yaml to generate its
    helper variables. Othewise, we will have an issue on the second
    deployment if we modify astute.yaml and re-run the deployment

    Relates to I91ab492b44c137c476722f65de3dd99b2dce988a

    Change-Id: Ieef42f063911ed05ce05f1411bbaa1d4867aa455
    Related-Bug: #1590375
    Closes-bug: #1598163
    (cherry picked from commit 0aed35fb32796bb2db3364da114a50c291704dd2)

tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.1 snapshot #292.

tags: removed: on-verification
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-library 10.0.0rc1

This issue was fixed in the openstack/fuel-library 10.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-library 10.0.0

This issue was fixed in the openstack/fuel-library 10.0.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.