wrong yaql expression for "deleted_nodes" generation

Bug #1590094 reported by Dmitry Burmistrov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Michael Polenchuk
Mitaka
Won't Fix
High
Stanislaw Bogatkin

Bug Description

Detailed bug description:
 In current master there is yaql expression: https://github.com/openstack/fuel-library/blob/d807c4de07378f4120599c354d43fefe5083ca20/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml#L376
 It produces "null" in case without node deletions. But puppets need list (in this case - empty list), example: https://github.com/openstack/fuel-library/blob/d807c4de07378f4120599c354d43fefe5083ca20/deployment/puppet/osnailyfacter/manifests/hosts/hosts.pp#L12
 Puppet fails on nil values, returned by hiera (default value '[]' is not used).
Steps to reproduce:
 Use latest ISO with current master/MOS 10, deploy env without node deletions.
Expected results:
 Env is deployed.
Actual result:
 Deployment fails with something like this: 2016-06-07 17:33:38 +0000 Puppet (err): Could not find data item deleted_nodes in any Hiera data file and no default supplied at /etc/puppet/modules/osnailyfacter/manifests/hosts/hosts.pp:12 on node node-3.test.
domain.local
Reproducibility:
 -
Workaround:
 -
Impact:
 Deploying Fuel with Ubuntu 16.04 nodes.
Description of the environment:
 Operation system: Ubuntu 16.04
 Versions of components: -
 Reference architecture: -
 Network model: -
 Related projects installed: -
Additional information:
 -

Revision history for this message
Sergii Golovatiuk (sgolovatiuk) wrote :

fuel-yaql> {"deleted_nodes" => $.get(deleted($.network_metadata.nodes.values().fqdn), [])}.toYaml()

Changed in fuel:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Stanislaw Bogatkin (sbogatkin)
milestone: none → 10.0
tags: added: area-library
tags: added: low-hanging-fruit
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/326935

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Dmitry Burmistrov (dmburmistrov) wrote :

How can I apply this changes?
What should be run on master node?

Revision history for this message
Alexey Shtokolov (ashtokolov) wrote :

Dmitry, you should change the file /etc/puppet/modules/osnailyfacter/modular/astute/tasks.yaml on your master node according the review and then run:

fuel rel --sync-deployment-tasks --dir /etc/puppet

To sync the changes to nailgun

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

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

commit 31370fcd04c53c45f5d1d4a5cde7852aaffeed6d
Author: Stanislaw Bogatkin <email address hidden>
Date: Wed Jun 8 12:05:48 2016 +0300

    Add empty list to deleted nodes hash when there is no nodes

    If there is no nodes, we should still have a list as a value
    for a deleted nodes cause puppet will fails either way.

    Change-Id: I02956c98aabc10b281af61321176eafc74b9862a
    Closes-Bug: #1590094

Changed in fuel:
status: In Progress → Fix Committed
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/327055

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

Reviewed: https://review.openstack.org/327055
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=36ce1d8f6c65bd894f2c0c466065ce64603d6175
Submitter: Jenkins
Branch: stable/mitaka

commit 36ce1d8f6c65bd894f2c0c466065ce64603d6175
Author: Stanislaw Bogatkin <email address hidden>
Date: Wed Jun 8 12:05:48 2016 +0300

    Add empty list to deleted nodes hash when there is no nodes

    If there is no nodes, we should still have a list as a value
    for a deleted nodes cause puppet will fails either way.

    Change-Id: I02956c98aabc10b281af61321176eafc74b9862a
    Closes-Bug: #1590094
    (cherry picked from commit 31370fcd04c53c45f5d1d4a5cde7852aaffeed6d)

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Vladimir Kuklin (vkuklin) wrote :

the fix was reverted. This issue does not affect trusty, so 9.0 is not affected and will not be fixed

Revision history for this message
Michael Polenchuk (mpolenchuk) wrote :
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/335042

Changed in fuel:
assignee: Stanislaw Bogatkin (sbogatkin) → Michael Polenchuk (mpolenchuk)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

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

commit 4916eb67d4ba632835244bebd723cbe86e7bb21d
Author: Michael Polenchuk <email address hidden>
Date: Tue Jun 28 16:30:57 2016 +0300

    Set default value for deleted_nodes key

    Hiera 2.0+ sets off null values and missing keys therefore null
    values should be treated prior to the hiera lookup.

    Change-Id: Ia1a8723faf75713bd7e7da11c2d6f40062bc9f06
    Closes-Bug: #1590094

Changed in fuel:
status: In Progress → Fix Committed
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.