puppet-network icon indicating copy to clipboard operation
puppet-network copied to clipboard

warnings in puppet 5.5

Open stefansimon76 opened this issue 4 years ago • 1 comments

Expected Behavior

no warnings

Actual Behavior

Warning: This method is deprecated, please use the stdlib validate_legacy function, with Pattern[]. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/network/manifests/interface.pp", 507]: (location: /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:34:in deprecation') Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/network/manifests/interface.pp", 508]: (location: /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:34:in deprecation') Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/network/manifests/interface.pp", 512]: (location: /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:34:in `deprecation')

Steps to Reproduce the Problem

  1. add a dependency to this module
  2. configure an interface

Please add this info:

  1. RHEL 7 Kernel 3.10.0
  2. puppet 5.5.17
  3. The relevant Puppet code and eventually Hiera data metadata.json "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 1.0.0"}, {"name":"puppet/firewalld","version_requirement":">= 1.0.0"}, {"name":"puppet/selinux","version_requirement":">= 1.0.0"}, {"name":"example42/network","version_requirement":">= 1.0.0"} ]

class pegelrelay::configure_shared_network_interface ( ) {

    network::interface { 'shared-network-interface':
        name   => 'ens224',
        ipaddr => '172.16.1.222',
        prefix => '27',
    }

}

stefansimon76 avatar Nov 27 '20 14:11 stefansimon76

Yeah, I've run into this too and I think Puppet 5.5 does not expect the module to be supporting anything below 4.4, but it allows down to 3.0 (not sure why). There's even a comment in manifests/mroute/validate_gw.pp saying We need it to have compatibility with puppet 3.x

Krenair avatar Nov 28 '20 20:11 Krenair