pdk icon indicating copy to clipboard operation
pdk copied to clipboard

PDK's puppet 5 doesn't come with any augeas lenses

Open igalic opened this issue 6 years ago • 8 comments

PDK 1.12.0 comes with 3 different puppet versions: 4.x, 5.x and 6.x Two of these Puppet versions have an augeas provider built-in, however, there are no lenses distributed with PDK.

To Reproduce

augeas { 'activate gpgcheck':
    incl    => '/etc/yum.conf',
    lens    => 'Yum.lns',
    context => '/files/etc/yum.conf/main/',
    changes => 'set gpgcheck 1',
}

Trying to apply this will result in puppet complaining that,

Warning: Augeas[activate gpgcheck](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output
Debug: Augeas[activate gpgcheck](provider=augeas): /augeas/load/Xfm/error = Can not find Yum.lns

a quick check into the RPM reveals that this is sadly true:

% rpm -ql pdk | grep "\.aug"

Expected behavior

I'd much rather this worked…

Additional context

  • Your PDK installation method: rpm
  • Your PDK version: 1.12.0
  • Your operating system / platform: Red Hat Enterprise Linux 7.6.

igalic avatar Sep 05 '19 11:09 igalic

now, to use strace, to find out where the lenses are expected:

/opt/puppetlabs/pdk/share/augeas/lenses/yum.aug
/opt/puppetlabs/pdk/share/augeas/lenses/dist/yum.aug

igalic avatar Sep 05 '19 11:09 igalic

Yeah, we have been trying to reduce the package file count as much as possible but it's probably worth keeping the lenses around, they aren't that big:

https://github.com/puppetlabs/pdk-vanagon/blob/master/configs/components/pdk-runtime.rb#L30

scotje avatar Sep 10 '19 00:09 scotje

This issue has been marked stale because it is open with no recent activity. The PDK Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete.

github-actions[bot] avatar Aug 26 '21 01:08 github-actions[bot]

augeas lenses are still being deleted: https://github.com/puppetlabs/pdk-vanagon/blob/main/configs/components/pdk-runtime.rb#L45

igalic avatar Sep 02 '21 14:09 igalic

This issue has been marked stale because it is open with no recent activity. The PDK Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete.

github-actions[bot] avatar Mar 02 '22 01:03 github-actions[bot]

i just checked again, and augeas lenses are still being deleted: https://github.com/puppetlabs/pdk-vanagon/blob/main/configs/components/pdk-runtime.rb#L45

maybe we should move this issue to pdk-vanagon? or maybe i should just open a PR to remove that line…

igalic avatar Mar 03 '22 13:03 igalic

This issue has been marked stale because it is open with no recent activity. The PDK Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete.

github-actions[bot] avatar Aug 31 '22 02:08 github-actions[bot]

@igalic I'm going to look in to this

chelnak avatar Feb 15 '23 12:02 chelnak