Skip to content

Problem with automatic run #64

@daveopz

Description

@daveopz

The module works fine for me, but the changes only get applied if I trigger a puppet run manually.

Is there any requirement for it to be hooked to a tty?

Every time I let it run by itself it fails with:

puppet-agent[1462]: (/Stage[main]/Cpan::Install/Package[gcc]/ensure) created
puppet-agent[1462]: (/Stage[main]/Cpan::Install/Package[perl-CPAN]/ensure) created
puppet-agent[1462]: (/Stage[main]/Cpan::Config/File[/usr/share/perl5/CPAN/Config.pm]) Skipping because of failed dependencies
puppet-agent[1462]: (/Stage[main]/Cpan/Anchor[cpan::end]) Skipping because of failed dependencies

It then does a bunch of other tasks and comes back to this:

puppet-agent[1462]: Installing cpan module Digest::MD5
puppet-agent[1462]: Forcing install for Digest::MD5
puppet-agent[9556]: Starting Puppet client version 7.18.0
puppet-agent[9629]: Run of Puppet configuration client already in progress; skipping (/opt/puppetlabs/puppet/cache/state/agent_catalog_run.lock exists)
puppet-agent[1462]: cpan Digest::MD5 failed with error code 2

Apparently it runs into a lock mid-run.

My resource block is the following:

class { 'cpan':
manage_config => true,
manage_package => true,
package_ensure => 'present',
local_lib => true,
}
[
'Digest::MD5',
'DBI',
'Template',
'MIME::Entity',
'MIME::Types',
'MD5',
'PDF::API2',
'PostScript::Simple',
'File::NFSLock',
'Mail::IMAPClient',
'Email::Valid',
'File::Slurp',
'Time::ParseDate',
].each |$package| {
cpan { $package:
ensure => 'present',
force => true,
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions