https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • u

    Ugo Bellavance

    09/13/2022, 9:07 PM
    I will sound silly but I haven't worked on our Puppet code for a while and now we get this error:
    Copy code
    Error: Evaluation Error: Error while evaluating a Resource Statement, Could not find declared class augeasproviders::instances (file: /etc/puppetlabs/code/environments/production/site-modules/profile/manifests/sysctl.pp, line: 21, column: 3) on node blabla
    Where should I start? We have this in our Puppetfile:
    Copy code
    mod 'herculesteam/augeasproviders', '2.4.1'
    mod 'herculesteam/augeasproviders_core', '2.6.0'
    mod 'herculesteam/augeasproviders_sysctl', '2.5.1'
  • n

    natemccurdy

    09/13/2022, 9:11 PM
    https://forge.puppet.com/modules/herculesteam/augeasproviders#augeasprovidersinstances That class comes from the
    augeasproviders
    module.
  • n

    natemccurdy

    09/13/2022, 9:12 PM
    I’d double check that your code deploys are working and that that module really does exist on your Puppetservers.
  • u

    Ugo Bellavance

    09/13/2022, 9:13 PM
    Hmmm, I don't see the
    augeasproviders
    dir in modules
  • u

    Ugo Bellavance

    09/13/2022, 9:14 PM
    I use r10k
  • u

    Ugo Bellavance

    09/13/2022, 9:15 PM
    Copy code
    INFO     -> Deploying module to /etc/puppetlabs/code/environments/production/modules/augeasproviders
    INFO     -> Deploying module to /etc/puppetlabs/code/environments/production/modules/augeasproviders_core
    INFO     -> Deploying module to /etc/puppetlabs/code/environments/production/modules/augeasproviders_sysctl
    But:
    Copy code
    # ll /etc/puppetlabs/code/environments/production/modules/augeasproviders
    ls: cannot access '/etc/puppetlabs/code/environments/production/modules/augeasproviders': No such file or directory
    Copy code
    # ll -d /etc/puppetlabs/code/environments/production/modules/augeas*
    drwxr-xr-x. 6 root root 222 May 14  2021 /etc/puppetlabs/code/environments/production/modules/augeas
    drwxr-xr-x. 6 root root 204 May 14  2021 /etc/puppetlabs/code/environments/production/modules/augeasproviders_core
    drwxr-xr-x. 4 root root 155 May 14  2021 /etc/puppetlabs/code/environments/production/modules/augeasproviders_sysctl
  • u

    Ugo Bellavance

    09/13/2022, 9:16 PM
    This is a server-less setup, is it safe to delete
    /etc/puppetlabs/code/environments/production/
    and start again?
  • n

    natemccurdy

    09/13/2022, 9:19 PM
    Yeah, I’d start from scratch by deleting that code dir and re-running r10k
  • u

    Ugo Bellavance

    09/13/2022, 9:19 PM
    Currently running r10k in debug mode
  • n

    natemccurdy

    09/13/2022, 9:19 PM
    Try adding
    -v debug2
    to your r10k command
  • u

    Ugo Bellavance

    09/13/2022, 9:20 PM
    Running as
    /opt/puppetlabs/bolt/bin/r10k deploy environment production --puppetfile --verbose debug
    for now.
  • u

    Ugo Bellavance

    09/13/2022, 9:20 PM
    Oh I got it:
    Copy code
    Error during concurrent deploy of a module: Unable to connect to <https://forgeapi.puppet.com> (for request /v3/modules/herculesteam-augeasproviders): execution expired
  • u

    Ugo Bellavance

    09/13/2022, 9:21 PM
    r10k must have forgotten that it must go through a proxy
  • u

    Ugo Bellavance

    09/13/2022, 9:23 PM
    Yes, that was it. Our
    /etc/puppetlabs/r10k/r10k.yaml
    file is managed manually. I don't know why it lost the
    proxy
    line.
  • u

    Ugo Bellavance

    09/13/2022, 9:26 PM
    Thanks a lot again, nate, for your invaluable help.
    🍻 1
  • u

    Ugo Bellavance

    09/13/2022, 9:27 PM
    Funny to see that the file was last edited may 14, 2021. But I'm pretty sure it was working earlier this week. Oh well.
  • s

    Slackbot

    09/13/2022, 9:33 PM
    This message was deleted.
    u
    d
    l
    • 4
    • 7
  • a

    Andy Fry

    09/13/2022, 10:18 PM
    I probably need to read a manual somewhere but... Is it possible to make a client apply a cached catalogue if it is unable to contact the master? Have I misunderstood the use_cache_on_failure setting?
  • n

    natemccurdy

    09/13/2022, 10:21 PM
    That’s exactly what
    usecacheonfailure
    is
  • c

    CVQuesty

    09/13/2022, 10:21 PM
    at some point in history, I seem to recall that being a default setting, no?
  • n

    natemccurdy

    09/13/2022, 10:22 PM
    Yeah, it defaults to
    true
    .
  • n

    natemccurdy

    09/13/2022, 10:22 PM
    That’s exactly what
    usecacheonfailure
    is
  • c

    CVQuesty

    09/13/2022, 10:22 PM
    that’s what I thought. Last catalog continues to apply until connection to server is restored.
  • n

    natemccurdy

    09/13/2022, 10:23 PM
    @Andy Fry But note that if you’re running puppet with
    puppet agent -t
    , the
    -t
    option includes
    --no-usecacheonfailure
    -t
    is short for
    --test
    . Refer to https://puppet.com/docs/puppet/7/man/agent.html#options to see what all
    --test
    includes.
  • n

    natemccurdy

    09/13/2022, 10:24 PM
    @Andy Fry But note that if you’re running puppet with
    puppet agent -t
    , the
    -t
    option includes
    --no-usecacheonfailure
    -t
    is short for
    --test
    . Refer to https://puppet.com/docs/puppet/7/man/agent.html#options to see what all
    --test
    includes.
  • a

    Andy Fry

    09/13/2022, 10:26 PM
    @natemccurdy that explains the behaviour I was seeing using 'puppet agent -t' Thanks for that. Again....
  • a

    Andy Fry

    09/13/2022, 10:30 PM
    @natemccurdy is there a way to cache reports too? Or do we need to have agents send reports direct to puppetdb to achieve that?
  • n

    natemccurdy

    09/13/2022, 10:31 PM
    The latest report is cached locally on the agent. For more history, you’ll have to setup your Puppetservers to forward agent reports to PuppetDB or some other custom report collection tool.
  • s

    silug

    09/13/2022, 11:59 PM
    if you have
    vagrant
    available, https://github.com/puppet-bootstrap/basic-aio is a quick way to get a test puppet environment running
  • a

    Andy Fry

    09/14/2022, 3:33 AM
    @natemccurdy yeah the puppet master is forwarding reports to puppetdb. This isn't crucial but would be nice I guess.
1...160161162...428Latest