voxpupuli / puppet-network

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

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

Closed thonixx closed 1 month ago

thonixx commented 1 month 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 1 month 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.

thonixx commented 1 month ago

Thanks for the tip, this is now fixed (and strangely on apt.puppet.com there is no puppetserver package (yet?) for Ubuntu Noble).

Just for the record: Switching to provider "gem" instead of "puppet_gem" would have solved it for the Ubuntu-provided puppet-agent package.