Fuel syntax check should check all puppet manifests for nested classes and defines in order to support Puppet4

Bug #1533332 reported by Maksim Malchuk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Maksim Malchuk

Bug Description

Currently, we skip [4] test 'nested_classes_or_defines' during the 'fuel_syntax_check' in our CI. Because of this, we already have several modules [3] in the fuel-library wich can lead to the problems after upgrade to Puppet4. We should use this test during the CI, and refactor modules. It's recommended to keep one class definition per file and to follow the Module patterns [1] and Style Guide [2] when doing so. Also 'fuel_syntax_check' used in our CI works in 'reduced' warnings mode with many tests skipped, in this case, it will be good idea to use '--fail-on-warnings' option.

[1] http://docs.puppetlabs.com/learning/modules1.html
[2] http://docs.puppetlabs.com/guides/style_guide.html
[3] ./deployment/puppet/cobbler/manifests/packages.pp - WARNING: defined type defined inside a class on line 47
./deployment/puppet/cobbler/manifests/server_old.pp - WARNING: defined type defined inside a class on line 81
./deployment/puppet/cobbler/manifests/server_old.pp - WARNING: defined type defined inside a class on line 116
./deployment/puppet/cobbler/manifests/server_old.pp - WARNING: defined type defined inside a class on line 306
./deployment/puppet/cobbler/manifests/snippets.pp - WARNING: defined type defined inside a class on line 18
./deployment/puppet/nailgun/manifests/packages.pp - WARNING: defined type defined inside a class on line 5
./deployment/puppet/openstack/manifests/swift/storage_node.pp - WARNING: defined type defined inside a class on line 73
[4] https://github.com/openstack/fuel-library/blob/master/utils/jenkins/fuel_syntax_check.sh#L72

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/266546

Changed in fuel:
status: New → In Progress
Dmitry Pyzhov (dpyzhov)
tags: added: area-library
tags: added: team-bugfix
tags: added: tech-debt
Changed in fuel:
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

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

commit 155d99443e1c4b1d37348f9fd3c2a635917bc441
Author: Maksim Malchuk <email address hidden>
Date: Tue Jan 12 22:41:53 2016 +0300

    Support 'nested_classes_or_defines' test for Puppet4

    This commit enable 'nested_classes_or_defines' test in
    'fuel_syntax_check'.

    Change-Id: Ia038a23ed4b3b7c7bb8a96f8afbd7e421a43993c
    Partial-Bug: #1533332

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.