voxpupuli / puppet-network

Types and providers to manage network interfaces
https://forge.puppet.com/puppet/network
Apache License 2.0
66 stars 108 forks source link

/Stage[main]/Network/Package[ipaddress]: Provider puppet_gem is not functional on this host #332

Open thonixx opened 4 hours ago

thonixx commented 4 hours ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

In manifests/$host.pp I have configured this:

  include network

  network_config {
    'ens3':
      ensure    => present,
      family    => 'inet',
      method    => 'static',
      ipaddress => '**REDACTED**',
      netmask   => '**REDACTED**',
      options   => {
        'search' => '**REDACTED**',
      };
  }

What are you seeing

During the Puppet run I see:

Info: Using environment 'production'
[...]
Error: /Stage[main]/Network/Package[ipaddress]: Provider puppet_gem is not functional on this host
Notice: /Stage[main]/Main/Node[**REDACTED**]/Network_config[ens3]: Dependency Package[ipaddress] has failures: true
Warning: /Stage[main]/Main/Node[**REDACTED**]/Network_config[ens3]: Skipping because of failed dependencies
Info: Stage[main]: Unscheduling all events on Stage[main]
Notice: Applied catalog in 0.30 seconds

What behaviour did you expect instead

No puppet_gem error.

Any additional information you'd like to impart

I am not 100% sure if that's a problem related to the module or Puppet itself. I have also found #215 and #216.

smortex commented 2 hours ago

The puppet_gem provider use the version of Ruby bundled in the AIO package. You seem to be using the package from Ubuntu (which is basically of Debian), not the AIO package from PuppetLabs.

Switching to AIO puppet should fix your issue.