voxpupuli / puppet-augeasproviders_grub

Augeas-based grub type and providers
Apache License 2.0
9 stars 33 forks source link

Wrong provider selected in Centos7 #7

Closed tlimoncelli closed 8 years ago

tlimoncelli commented 9 years ago

Centos7 should always pick grub2 (AFAICT). However some of our centos7 machines output this message and select grub instead. As a result, the change doesn't get made.

Warning: Found multiple default providers for kernel_parameter: grub, grub2; using grub

As a temporary measure, I'd like to know if there is a way to force is to select grub2.

As a long-term solution, I have no idea how to start debugging this. What information can I provide to help narrow this down?

tlimoncelli commented 9 years ago

FYI: The workaround I'm using is this:

  if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '7' {
    $provider = 'grub2'
  } else {
    $provider = undef
  }

  # Disable transparent_hugepage at boot time.
  kernel_parameter { 'transparent_hugepage':
    ensure   => present,
    value    => 'never',
    provider => $provider,
  }
BenoitLefebvre commented 9 years ago

I was having the same error but when trying your fix with the provider, I am getting this message:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter provider on Kernel_parameter[audit] at /etc/puppet/environments/benoit/modules/cn/manifests/grub.pp:35 on node puppet-test1.domain Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

haghabozorgi commented 9 years ago

@tlimoncelli I tried that and it does not work for me. I still get the same warning Warning: Found multiple default providers for kernel_parameter: grub2, grub; using grub2

tlimoncelli commented 9 years ago

With the workaround I still get the warning too. However Puppet does the right thing. We still need a real fix.

BenoitLefebvre commented 8 years ago

This issue was fixed since @vinzent committed this change: https://github.com/hercules-team/augeasproviders_grub/commit/86ad46f50ac825a3741b6060f47420c4c65e1bd4

I suggest the augeasproviders_grub module version to be updated to 2.0.2 in the metadata.json file and this issue to be closed

raphink commented 8 years ago

Ah, so this is fixed in master but not released, correct?

beddari commented 8 years ago

Yup, correct :+1:

raphink commented 8 years ago

OK then I'll release now.

tzz commented 8 years ago

@vinzent @BenoitLefebvre @raphink please note that Fedora 23 also has this issue.

Simply using defaultfor :osfamily => 'Redhat', :operatingsystemrelease => 'Fedora', :operatingsystemmajrelease => [ '23' ] doesn't seem to work so I hope you know the right incantation... thanks!