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

    Lumiere

    01/04/2023, 4:27 PM
    I wouldn't think so
  • l

    Lumiere

    01/04/2023, 4:27 PM
    I'm actually not sure what notifying a class actually does
  • s

    seanmil

    01/04/2023, 4:28 PM
    I'm mostly certain notifying a class containing a resource will notify the resources. but not resources from classes included in that class.
  • s

    seanmil

    01/04/2023, 4:28 PM
    but you should test to verify
  • k

    kenyon

    01/04/2023, 4:31 PM
    yeah that's why the convention is like this https://github.com/voxpupuli/puppet-nginx/blob/10162d14597d58e09c2f2241808ea06ed0754713/manifests/init.pp#L261 a change to the config notifies the service and restarts or reloads it
  • k

    kenyon

    01/04/2023, 4:31 PM
    yeah that's why the convention is like this https://github.com/voxpupuli/puppet-nginx/blob/10162d14597d58e09c2f2241808ea06ed0754713/manifests/init.pp#L261 a change to the config notifies the service and restarts or reloads it
  • l

    Lumiere

    01/04/2023, 4:32 PM
    that isn't notification though, it's ordering?
  • k

    kenyon

    01/04/2023, 4:33 PM
    ~>
    is notifying https://www.puppet.com/docs/puppet/7/lang_relationships.html#lang_rel_chaining_arrows
  • l

    Lumiere

    01/04/2023, 4:34 PM
    and today I learned
  • j

    Joel Wilson

    01/04/2023, 4:42 PM
    That must've been fixed at some point. I know we ran into issues in the past where class notifications didn't automatically mean resources within it.
  • r

    ripienaar

    01/04/2023, 4:56 PM
    It’s more or less always passed the notify into the class
  • r

    ripienaar

    01/04/2023, 4:56 PM
    but not into classes contained by that class
  • r

    ripienaar

    01/04/2023, 4:57 PM
    since at least 2009 🙂
  • v

    vchepkov

    01/04/2023, 8:08 PM
    I wonder if anyone can help to solve the problem in crayfishx-purge module The module correctly identifies unmanaged cron resources and reports them being deleted https://github.com/crayfishx/puppet-purge/blob/master/lib/puppet/type/purge.rb#L194
  • d

    Dr Bunsen Honeydew

    01/04/2023, 8:08 PM
    See the
    crayfishx-purge
    module at https://forge.puppet.com/crayfishx/purge?src=slack&channel=puppet
  • v

    vchepkov

    01/04/2023, 8:08 PM
    I wonder if anyone can help to solve the problem in crayfishx-purge module The module correctly identifies unmanaged cron resources and reports them being deleted https://github.com/crayfishx/puppet-purge/blob/master/lib/puppet/type/purge.rb#L194
  • v

    vchepkov

    01/04/2023, 8:08 PM
    But, it doesn't delete them. The reason, I believe, is that object doesn't have proper user/target fields set
  • v

    vchepkov

    01/04/2023, 8:10 PM
    and I am not sure, why.
    puppet resource cron
    shows them properly
  • b

    bastelfreak

    01/04/2023, 8:26 PM
    @crayfishx ^
  • s

    smortex

    01/04/2023, 9:11 PM
    @vchepkov rings a bell… I think this is a bug in the cron code. When I tried to purge all crontabs in a Bolt plan for decomissionning nodes, I had to workaround a similar issue, crontab where not removed, and I had to do a workaround: https://github.com/opus-codium/puppet-commission/blob/master/files/clean-cron-jobs.sh
  • s

    smortex

    01/04/2023, 9:11 PM
    @vchepkov rings a bell… I think this is a bug in the cron code. When I tried to purge all crontabs in a Bolt plan for decomissionning nodes, I had to workaround a similar issue, crontab where not removed: https://github.com/opus-codium/puppet-commission/blob/master/files/clean-cron-jobs.sh
  • s

    smortex

    01/04/2023, 9:12 PM
    On the other hand
    puppet resource cron
    also list unmanaged crontabs, so maybe it is not a bug, but a wise choice? I have not dig into this…
  • s

    smortex

    01/04/2023, 9:14 PM
    @vchepkov rings a bell… I think this is a bug in the cron code. When I tried to purge all crontabs in a Bolt plan for decomissionning nodes, I had to workaround a similar issue, crontab where not removed, and I had to do a workaround: https://github.com/opus-codium/puppet-commission/blob/master/files/clean-cron-jobs.sh
  • v

    vchepkov

    01/04/2023, 9:14 PM
    hmm, cron resource is now in a forge module, maybe I should open a case there too
  • l

    Lumiere

    01/04/2023, 9:20 PM
    *_core are included in the AIO by default
  • v

    vchepkov

    01/04/2023, 9:27 PM
    I believe installed module overrides provider in agent
    this 1
  • d

    Dagan McGregor

    01/05/2023, 4:23 AM
    Can someone tell me, does Puppet always try to evaluate an Exec command before it evaluates the Requires parameters?
  • d

    Dagan McGregor

    01/05/2023, 4:28 AM
    I don't know why these two execs behave differently, given they both Require the Package[postgresql14-server] to provide the exec commands
    Copy code
    Postgresql_server/Package[postgresql14-server]/ensure: current_value 'purged', should be 'present' (noop) (corrective)
    Postgresql_server/Exec[postgresql-initdb]/returns: current_value 'notrun', should be ['0'] (noop) (corrective)
    Postgresql_database/Exec[create-seiscomp-db]: Could not evaluate: Could not find command '/usr/bin/psql'
  • d

    Dagan McGregor

    01/05/2023, 4:30 AM
    Correction, the error is caused by using
    Unless
    on the Exec, getting evaluated before
    Requires
  • d

    Dagan McGregor

    01/05/2023, 4:31 AM
    This is in 6.28.0
1...259260261...428Latest