voxpupuli / puppet-augeas

Helper for using augeas with puppet
Apache License 2.0
44 stars 82 forks source link

Setting augeas::lens_dir purges exisgting lenses #69

Closed raoulbhatia closed 3 years ago

raoulbhatia commented 6 years ago

I am using Ubuntu 17.10 with the official Ubuntu packages (see !65) and manually set augeas::lens_dir: '/usr/share/augeas/lenses' as taken from params.pp.

However, lenses provided by other packages, i.e. libvirt-daemon, got purged.

Info: Computing checksum on file /usr/share/augeas/lenses/libvirt_lockd.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirt_lockd.aug]: Filebucketed /usr/share/augeas/lenses/libvirt_lockd.aug to puppet with sum 9d98fdab6452e5252b8879fd331adc0d
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirt_lockd.aug]/ensure: removed
Info: Computing checksum on file /usr/share/augeas/lenses/libvirt_sanlock.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirt_sanlock.aug]: Filebucketed /usr/share/augeas/lenses/libvirt_sanlock.aug to puppet with sum 5d6300b049f6160ca975efc601429caa
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirt_sanlock.aug]/ensure: removed
Info: Computing checksum on file /usr/share/augeas/lenses/libvirtd.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd.aug]: Filebucketed /usr/share/augeas/lenses/libvirtd.aug to puppet with sum d5390e660ce25dcf7c9c26b867fc57b9
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd.aug]/ensure: removed
Info: Computing checksum on file /usr/share/augeas/lenses/libvirtd_libxl.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd_libxl.aug]: Filebucketed /usr/share/augeas/lenses/libvirtd_libxl.aug to puppet with sum 401307a7e9341d2346b8dc056732204f
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd_libxl.aug]/ensure: removed
Info: Computing checksum on file /usr/share/augeas/lenses/libvirtd_lxc.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd_lxc.aug]: Filebucketed /usr/share/augeas/lenses/libvirtd_lxc.aug to puppet with sum 32385b12eee5c792abe662f539f5024f
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd_lxc.aug]/ensure: removed
Info: Computing checksum on file /usr/share/augeas/lenses/libvirtd_qemu.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd_qemu.aug]: Filebucketed /usr/share/augeas/lenses/libvirtd_qemu.aug to puppet with sum feeaa590633cafc4bcfb350bab459af7
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/libvirtd_qemu.aug]/ensure: removed
Info: Computing checksum on file /usr/share/augeas/lenses/virtlockd.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/virtlockd.aug]: Filebucketed /usr/share/augeas/lenses/virtlockd.aug to puppet with sum 652707005b46e667cc6f2fc84e91fa18
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/virtlockd.aug]/ensure: removed
Info: Computing checksum on file /usr/share/augeas/lenses/virtlogd.aug
Info: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/virtlogd.aug]: Filebucketed /usr/share/augeas/lenses/virtlogd.aug to puppet with sum c71c7b0d545ef37dedb13af7ee579fe2
Notice: /Stage[main]/Augeas::Files/File[/usr/share/augeas/lenses/virtlogd.aug]/ensure: removed
Notice: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/usr/share/augeas/lenses/postfix_canonical.aug]/ensure: defined content as '{md5}0af0ca696ccf3f733d5a3a24b8453da1'
Info: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/usr/share/augeas/lenses/postfix_canonical.aug]: Scheduling refresh of Exec[Typecheck lens postfix_canonical]
Info: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/usr/share/augeas/lenses/postfix_canonical.aug]: Scheduling refresh of Exec[Test lens postfix_canonical]
Error: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/Exec[Typecheck lens postfix_canonical]: Failed to call refresh: Could not find command 'augparse'
Error: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/Exec[Typecheck lens postfix_canonical]: Could not find command 'augparse'
Notice: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/usr/share/augeas/lenses/tests/test_postfix_canonical.aug]/ensure: defined content as '{md5}27a5a1d3b5fbc6c224da5628baed4bd7'
Info: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/usr/share/augeas/lenses/tests/test_postfix_canonical.aug]: Scheduling refresh of Exec[Test lens postfix_canonical]
Info: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/usr/share/augeas/lenses/tests/test_postfix_canonical.aug]: Scheduling refresh of Exec[Test lens postfix_canonical]
Error: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/Exec[Test lens postfix_canonical]: Failed to call refresh: Could not find command 'augparse'
Error: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/Exec[Test lens postfix_canonical]: Could not find command 'augparse'
Info: Stage[main]: Unscheduling all events on Stage[main]
raoulbhatia commented 6 years ago

ah - i just realized that augeas::purge defaults to true... who would have expected such a thing ...

ubellavance commented 6 years ago

I agree. The first mistake looks like allowing a purge in a system directory (for puppet open-source 3 only). The second is to make purge:true the default. But since this affects only Puppet 3, I'm not sure if they'll want to change it.

raphink commented 5 years ago

Good points. It's true that we didn't really encounter the problem in the past because we had no lenses in /usr/share/augeas/lenses, and then we moved to Puppet 4…

Honestly, I'd just rather deprecate Puppet 3 at that point, as done in most other modules.

raoulbhatia commented 5 years ago

FYI Ubuntu 17.10 uses Puppet 4.10. However, 18.04 LTS uses Puppet 5.4.0 so dropping support for Puppet < 5 should be good eventually. I still need to try if the behavior changed under Ubuntu 18.04 LTS though.

raphink commented 5 years ago

@raoulbhatia Puppet 3 is not supported anymore, but Puppet 4 will be supported for nearly a year I think.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.