Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

warnings in puppet 5.5 #330

Open
stefansimon76 opened this issue Nov 27, 2020 · 1 comment
Open

warnings in puppet 5.5 #330

stefansimon76 opened this issue Nov 27, 2020 · 1 comment

Comments

@stefansimon76
Copy link

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',
    }

}

@Krenair
Copy link

Krenair commented Nov 28, 2020

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

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants