Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1060084: puppet-agent: Resource type 'Cron' was not found, even after puppet-module-puppetlabs-cron-core installed

485 views
Skip to first unread message

Will Partain

unread,
Jan 5, 2024, 2:30:05 PM1/5/24
to
Package: puppet-agent
Version: 7.23.0-1
Severity: important

Dear Maintainer,

(This is a more detailed version of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054664 )

Did: apt install puppet-agent puppetserver puppetdb

Ended up with, inter alia:

ii puppet-agent 7.23.0-1 ii puppet-module-puppetlabs-augeas-core 1.1.2-1 ii puppet-module-puppetlabs-cron-core 1.1.0+dfsg1-1 ii puppet-module-puppetlabs-host-core 1.1.0-1 ii puppet-module-puppetlabs-mount-core 1.0.4+dfsg1-2 ii puppet-module-puppetlabs-selinux-core 1.2.0-1 ii puppet-module-puppetlabs-sshkeys-core 2.3.0-1 ii puppetdb 7.12.1-3 ii puppetserver 7.9.5-2

Invoked puppet-agent against a "legacy" server:

/usr/bin/puppet agent --server parple-pup1.parple.org --test --certname=parple-pup2.parple.org --environment=prodnew --diff_args=-U1 --noop --debug

It received "work" from the server, and started doing things, until it needed 'Cron'... (the debugging log just before that...):

Debug: /Package[apticron]: Provider apt does not support features install_only; not managing attribute install_only
Debug: /Package[logrotate]: Provider apt does not support features targetable; not managing attribute command
Debug: /Package[logrotate]: Provider apt does not support features install_only; not managing attribute install_only
Error: Failed to apply catalog: Resource type 'Cron' was not found

The full debugging info gives no hint of what it is failing to find, or what might not be working like expected. Puppet without 'cron' resources is of, uh, limited value.

Thanks for your help, or any insight.

Will

-- System Information:
Debian Release: 12.4
APT prefers stable
APT policy: (900, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.2.0-39-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages puppet-agent depends on:
ii adduser 3.134
ii debconf [debconf-2.0] 1.5.82
ii facter 4.3.0-2
ii hiera 3.10.0-1
ii init-system-helpers 1.65.2
ii ruby 1:3.1
ii ruby-augeas 1:0.5.0+gem-1
ii ruby-concurrent 1.1.6+dfsg-5
ii ruby-deep-merge 1.1.1-2
ii ruby-semantic-puppet 1.0.4-1
ii ruby-shadow 2.5.1-1
ii ruby-sorted-set 1.0.3-3

Versions of packages puppet-agent recommends:
ii augeas-tools 1.14.0-1
ii debconf-utils 1.5.82
ii lsb-release 12.0-1
ii ruby-selinux 3.4-1+b6

Versions of packages puppet-agent suggests:
pn hiera-eyaml <none>
ii puppet-module-puppetlabs-augeas-core 1.1.2-1
ii puppet-module-puppetlabs-cron-core 1.1.0+dfsg1-1
ii puppet-module-puppetlabs-host-core 1.1.0-1
ii puppet-module-puppetlabs-mount-core 1.0.4+dfsg1-2
ii puppet-module-puppetlabs-selinux-core 1.2.0-1
ii puppet-module-puppetlabs-sshkeys-core 2.3.0-1
pn puppet-module-puppetlabs-stdlib <none>
ii ruby-hocon 1.3.1-2
pn ruby-msgpack <none>

-- debconf information excluded

Georg Faerber

unread,
Jan 5, 2024, 4:20:04 PM1/5/24
to
Hi Will,

On 24-01-05 19:02:38, Will Partain wrote:
> Invoked puppet-agent against a "legacy" server:
>
> /usr/bin/puppet agent --server parple-pup1.parple.org --test --certname=parple-pup2.parple.org --environment=prodnew --diff_args=-U1 --noop --debug
>
> It received "work" from the server, and started doing things, until it
> needed 'Cron'... (the debugging log just before that...):
>
> Debug: /Package[apticron]: Provider apt does not support features install_only; not managing attribute install_only
> Debug: /Package[logrotate]: Provider apt does not support features targetable; not managing attribute command
> Debug: /Package[logrotate]: Provider apt does not support features install_only; not managing attribute install_only
> Error: Failed to apply catalog: Resource type 'Cron' was not found

On bullseye, I had to install the 'cron' package on the machine running
the agent. I'm not sure if it works with other cron implementations as
well.

Maybe this helps,
all the best,
Georg

Georg Faerber

unread,
Jan 5, 2024, 4:30:05 PM1/5/24
to
On 24-01-05 21:15:52, Georg Faerber wrote:
> On bullseye, I had to install the 'cron' package on the machine
> running the agent. I'm not sure if it works with other cron
> implementations as well.

The above comment was not about bullseye, but bookworm.

Antoine Beaupré

unread,
Jan 5, 2024, 11:00:05 PM1/5/24
to
On 2024-01-05 19:02:38, Will Partain wrote:
> Package: puppet-agent
> Version: 7.23.0-1
> Severity: important
>
> Dear Maintainer,
>
> (This is a more detailed version of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054664 )

Is there any specific reason why you feel this should be adressed in a
different bug report than the above?

Otherwise those two reports should just be merged, but in any case,
thanks for the extra information! :)

a.
--
Being cynical is the only way to deal with modern civilization — you
can't just swallow it whole.
- Frank Zappa

Will Partain

unread,
Jan 6, 2024, 4:00:05 AM1/6/24
to
Antoine Beaupré <ana...@debian.org> wrote:

> Is there any specific reason why you feel this should be adressed in a
> different bug report than the above?

Hi, Antoine -- stumbling into the "bug"? again, I realized it was probably more likely a puppet agent bug, not the cron_core module.

My understanding of the Debian bugs process is very slight. But I know it is a wondrously good thing! Regards to all,

Will

Antoine Beaupré

unread,
Jan 7, 2024, 4:10:04 PM1/7/24
to
Control: forcemerge 1054664 1060084
Right, no problem!

For future reference, I think in this case it would have been preferable
to just reuse the existing bug report, by replying to it.

So I'll be merging the two bugs, feel free to reply to any one of the
two. :)

a.
--
May your trails be crooked, winding, lonesome, dangerous, leading to
the most amazing view. May your mountains rise into and above the
clouds.
- Edward Abbey

Will Partain

unread,
Jan 8, 2024, 8:00:05 AM1/8/24
to
OK, folks, I may have some interesting things (including an [ugly] workaround).

1. The original puppet-7.23.0 code does not mention '/usr/share/puppet' *at all*.

2. The 0001-Adjust-default-paths.patch Debian patch includes:

- '$codedir/modules:/opt/puppetlabs/puppet/modules'
+ '$codedir/modules:/usr/share/puppet/modules'

- '/opt/puppetlabs/puppet/vendor_modules'
+ '/usr/share/puppet/vendor_modules'

(looks good)

3. The puppet cron module (and others...) ends up visible in /usr/share/puppet/modules

4. My run under 'strace' *NEVER* looks at '/usr/share/puppet/modules' (!)
but it *does* look at '/usr/share/puppet/vendor_modules'

5. Doing a comparable 'strace'd run, but using only puppetlabs client and server (the current 7.x bullseye code), it *NEVER* looks at '/opt/puppetlabs/puppet/modules' (!)
but it *does* look at '/opt/puppetlabs/puppet/vendor_modules'.

6. The puppetlabs code puts these core modules in 'vendor_modules', witness:

$ ls /opt/puppetlabs/puppet/vendor_modules
augeas_core host_core scheduled_task sshkeys_core zfs_core
cron_core mount_core selinux_core yumrepo_core zone_core

(In '/opt/puppetlabs/puppet/modules/'? - nothing)

7. (Workaround) If I copy the debian-12-bookworm 'modules' to 'vendor_modules', e.g.

cd /usr/share/puppet/modules
rsync -a --itemize-changes . ../vendor_modules/.

then... things work as expected(!).

If you want to most-closely mirror the puppetlabs version, the cron (mount, host, ...) modules should go in vendor_modules. If they're going to stay in modules, something needs to get puppet-agent to *look* there -- something the puppetlabs code does not seem to do.

Can anyone point to *any* debian-12-bookworm Puppet installation that can do 'cron' (mount, host, etc.) resources?

I might, of course, be missing something... Regards to all,

Will
0 new messages