It seems that this change breaks a few things when Puppet is not being run as root, for example during spec tests (i.e. pdk test unit). At least under Ubuntu 16.04 and 18.04 the file /proc/1/exe is not accessible by regular users, so Puppet::FileSystem.exist?('/proc/1/exe') returns false and Puppet::FileSystem.readlink('/proc/1/exe').include?('systemd') fails with Errno::EACCES. ls also fails, obviously:
$ ls /proc/1/exe |
ls: cannot read symbolic link '/proc/1/exe': Permission denied |
lrwxrwxrwx 1 root root 0 Sep 7 00:13 /proc/1/exe
|
This has interesting implications in that now Puppet no longer recognizes that systemd is the correct service provider for recent Debian and Ubuntu releases. Thus spec tests for services fail with cryptic error messages like this:
$ pdk test unit |
... |
failed: rspec: ./spec/classes/service_spec.rb:9: Could not find the daemon directory (tested [/etc/sv,/var/lib/service])
|
|