Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching resources other than classes in 0.2.x #6

Closed
edestecd opened this issue Jun 22, 2016 · 6 comments
Closed

Matching resources other than classes in 0.2.x #6

edestecd opened this issue Jun 22, 2016 · 6 comments

Comments

@edestecd
Copy link

After updating to 0.2.x we now get false positives on References.
For example this now fails complaining about the require statement:

file { '/path'
  ensure => present,
  require => Shellvar['http_proxy'],
}

I cannot reconcile what commit did this, but the only major change seems to be this:
47c47f0

@edestecd
Copy link
Author

OK after reviewing the commit it makes sense to me now.

The intention was to check this:
require class_name

But we are also unintentionally checking the Metaparameter require like above.

@claytono
Copy link

I'm also running into the same issue. I'm getting problems with resources like:

    exec { 'set-power-policy':
      command => "ipmitool chassis policy ${power_policy}",
      unless  => "timeout -k 60 30 ipmitool chassis policy list | grep -q ${power_policy}",
      require => [Package['ipmitool'], Kmod::Load[$ipmi_modules]],
      timeout => 30,
      returns => [ '0', '1' ],
    }

In this case it thinks Package['ipmitool'] should be Package['::ipmitool']

openstack-gerrit pushed a commit to openstack/puppet-openstack_spec_helper that referenced this issue Jun 23, 2016
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue Jun 23, 2016
Project: openstack/tripleo-heat-templates  61f31831bdafbbddc7b68606832723fe2516872a

Pin puppet-lint-absolute_classname-check to 0.1.3

voxpupuli/puppet-lint-absolute_classname-check#6

Change-Id: Ib0f1ce09b589630c6d09c8588246dafae2f2d387
openstack-gerrit pushed a commit to openstack-archive/tripleo-heat-templates that referenced this issue Jun 23, 2016
openstack-gerrit pushed a commit to openstack-archive/puppet-tripleo that referenced this issue Jun 23, 2016
@EmilienM
Copy link

Running in same issue everywhere in OpenStack, this is a total disaster.
http://logs.openstack.org/27/332227/1/check/gate-puppet-openstacklib-puppet-lint/9112794/console.html#_2016-06-22_21_33_59_027038

with this resource: https://github.com/openstack/puppet-openstacklib/blob/master/manifests/db/mysql.pp#L57

We pinned the gem for now, until a solution is found (btw, we have ~30 Puppet modules to fix if there is a solution).

openstack-gerrit pushed a commit to openstack/puppet-openstack_spec_helper that referenced this issue Jun 23, 2016
voxpupuli/puppet-lint-absolute_classname-check#6

Change-Id: I58f6ee3ce22a3826fadfb019d3c67be710ab95d7
(cherry picked from commit 51e77c6)
openstack-gerrit pushed a commit to openstack/puppet-openstack_spec_helper that referenced this issue Jun 23, 2016
voxpupuli/puppet-lint-absolute_classname-check#6

Change-Id: I58f6ee3ce22a3826fadfb019d3c67be710ab95d7
(cherry picked from commit 51e77c6)
openstack-gerrit pushed a commit to openstack-archive/instack-undercloud that referenced this issue Jun 23, 2016
@rnelson0
Copy link
Member

@liamjbennett Any ideas on how to more accurately restrict your original change to the directives rather than metaparameters?

@nibalizer
Copy link
Member

Hey this is me too

domcleal added a commit to domcleal/puppet-lint-absolute_classname-check that referenced this issue Jun 23, 2016
The lint check previously checked all tokens and so erroneously detected
the 'require' metaparameter on a resource as a function call. All
matching tokens that are within a resource declaration are now excluded
from the lint check to ensure it only finds tokens in the main manifest
or class bodies.

Fixes voxpupuli#6
@domcleal
Copy link
Contributor

I've opened #7 with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants