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

    Dr Bunsen Honeydew

    07/28/2022, 1:17 PM
    See the
    puppetlabs-scheduled_task
    module at https://forge.puppet.com/puppetlabs/scheduled_task?src=slack&channel=puppet
  • s

    Slackbot

    07/28/2022, 2:22 PM
    This message was deleted.
    a
    b
    +2
    • 5
    • 8
  • s

    Slackbot

    07/28/2022, 2:41 PM
    This message was deleted.
    j
    n
    b
    • 4
    • 75
  • b

    bastelfreak

    07/28/2022, 2:48 PM
    I'm not sure if pg_repack creates them. I use the pe_databases modules that creates a few pg_repack systemd services
  • r

    romgo

    07/28/2022, 2:53 PM
    Ok, so I'm trying to install hiera-eyaml because it is missing, but the gem command refuse to install it. :
    $ /opt/puppetlabs/puppet/bin/gem install hiera-eyaml
    ERROR:  Error installing hiera-eyaml:
    hiera-eyaml requires Ruby version < 4, >= 2.5.0.
  • v

    vchepkov

    07/28/2022, 2:54 PM
    server is not using that gem, lookup would though
  • v

    vchepkov

    07/28/2022, 2:54 PM
    I thought hiera-eyaml is included in standard puppet for awhile
  • v

    vchepkov

    07/28/2022, 2:55 PM
    do you use latest puppet6 ?
  • v

    vchepkov

    07/28/2022, 2:56 PM
    Copy code
    rpm -ql puppet-agent|grep hiera-eyaml
    /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hiera-eyaml-3.2.2
  • r

    romgo

    07/28/2022, 3:14 PM
    @vchepkov thanks for your feedback, I am running debian 10, i think this is the latest package avaiable, : puppetserver 6.19.0-1buster
  • r

    romgo

    07/28/2022, 3:14 PM
    I was able to install the gem file with this command : /opt/puppetlabs/server/bin/puppetserver gem install hiera-eyaml
  • r

    romgo

    07/28/2022, 3:15 PM
    but now, the server doesn't fetch node definition on foreman for unkown reason
  • c

    csharpsteen

    07/28/2022, 3:23 PM
    Not by pg_repack, PuppetDB creates it as partitioning logic on
    resource_events
    . But, the triggers consuming 26+ minutes of time had names starting with
    RI_ConstraintTrigger*
    , so
    insert_resource_events_trigger
    is on the wrong table and has the wrong name to be directly involved in the slowdown.
  • r

    romgo

    07/28/2022, 3:41 PM
    Ok I fixed it this was a wrong url configured on our side.
  • s

    Slackbot

    07/28/2022, 4:53 PM
    This message was deleted.
    👍 2
    b
    b
    k
    • 4
    • 3
  • d

    Dr Bunsen Honeydew

    07/28/2022, 4:53 PM
    tuxmea is on the rise! (Karma: 3)
  • b

    binford2k

    07/28/2022, 4:53 PM
    https://github.com/betadots/hdm
  • d

    David

    07/28/2022, 5:07 PM
    Thanks for the tip - I’ve found out what it is !!!!! It’s a bug in the code that applies the puppet catalogue. When you run an apply with trace you get the following _*Notice: Scope(Class[All_all_resolver]): ldm-infrad52 has a derivedsite of: TSQ*_ Notice: Compiled catalog for ldm-infrad52.dev.uk.gcb.corp in environment production in 0.36 seconds _*Notice: /Stage[main]/All_all_resolver/Svccfg[svc/network/dns/client/properties/config/search]/ensure: created*_ _*Notice: /Stage[main]/All_all_resolver/Svccfg[svc/network/dns/client/properties/config/nameserver]/ensure: created*_ _*Notice: /Stage[main]/All_all_resolver/Svccfg[svc/network/dns/client/properties/config/options]/ensure: created*_ _*Notice: /Stage[main]/All_all_resolver/Service[svc/network/dns/clientdefault]: Triggered ‘refresh’ from 3 events*_ Notice: Applied catalog in 17.68 seconds _*Error: Could not run: undefined local variable or method `audit_handle’ for #<Puppet:ApplicationApply0x0000000103f0fc18>*_ _*/usr/ruby/2.6/lib/ruby/vendor_ruby/2.6.0/puppet/application/apply.rb194in `ensure in run_command’*_ _*/usr/ruby/2.6/lib/ruby/vendor_ruby/2.6.0/puppet/application/apply.rb199in `run_command’*_ _*/usr/ruby/2.6/lib/ruby/vendor_ruby/2.6.0/puppet/application.rb382in `block in run’*_ _*/usr/ruby/2.6/lib/ruby/vendor_ruby/2.6.0/puppet/util.rb735in `exit_on_fail’*_ _*/usr/ruby/2.6/lib/ruby/vendor_ruby/2.6.0/puppet/application.rb382in `run’*_ _*/usr/ruby/2.6/lib/ruby/vendor_ruby/2.6.0/puppet/util/command_line.rb143in `run’*_ _*/usr/ruby/2.6/lib/ruby/vendor_ruby/2.6.0/puppet/util/command_line.rb77in `execute’*_ /usr/sbin/puppet5in `<main>' The error itself talks about audit_handle and the only place that is used is in apply.rb. Looking at that I see that it either runs apply or main depending on the value in :catalog BUT It only instantiates the _*audit_handle*_ class in main and not in apply so if it does the apply and then hits the clean up bit below the class isn’t created and therefore you get the error.
    Copy code
    def run_command
        if options[:catalog]
          apply
        else
          main
        end
      ensure
        # clean up auditing records on Solaris
        if Facter.value(:osfamily) == "Solaris"
          audit_handle.audit_stop
          audit_handle.audit_teardown
        end
        if @profiler
          Puppet::Util::Profiler.remove_profiler(@profiler)
          @profiler.shutdown
        end
      end
     
      def apply
        if options[:catalog] == "-"
          text = $stdin.read
        else
          text = Puppet::FileSystem.read(options[:catalog], :encoding => 'utf-8')
        end
        env = Puppet.lookup(:environments).get(Puppet[:environment])
        Puppet.override(:current_environment => env, :loaders => create_loaders(env)) do
          catalog = read_catalog(text)
          apply_catalog(catalog)
        end
      end
     
      def main
        # configure auditing on Solaris                                        #
        if Facter.value(:osfamily) == "Solaris"                                # This code is in the wrong place
            audit_handle = PuppetAudit.new                                     # Idiots !!!!
            audit_handle.audit_start                                           #
        end                                                                    #
     
        manifest          = get_manifest() # Get either a manifest or nil if apply should use content of Puppet[:code]
        splay                              # splay if needed
        facts             = get_facts()    # facts or nil
        node              = get_node()     # node or error
        apply_environment = get_configured_environment(node, manifest)
    By changing it to this it all works…..
    Copy code
    def run_command
        # configure auditing on Solaris                                        #
        if Facter.value(:osfamily) == "Solaris"                                # This code was in the wrong place
            audit_handle = PuppetAudit.new                                     # Now it's in the right place
            audit_handle.audit_start                                           # Well, at least in a place where the 
        end                                                                    # code will actually work
                                                                               #
        if options[:catalog]
          apply
        else
          main
        end
      ensure
        # clean up auditing records on Solaris
        if Facter.value(:osfamily) == "Solaris"
          audit_handle.audit_stop
          audit_handle.audit_teardown
        end
        if @profiler
          Puppet::Util::Profiler.remove_profiler(@profiler)
          @profiler.shutdown
        end
      end
     
      def apply
        if options[:catalog] == "-"
          text = $stdin.read
        else
          text = Puppet::FileSystem.read(options[:catalog], :encoding => 'utf-8')
        end
        env = Puppet.lookup(:environments).get(Puppet[:environment])
        Puppet.override(:current_environment => env, :loaders => create_loaders(env)) do
          catalog = read_catalog(text)
          apply_catalog(catalog)
        end
      end
     
      def main
        manifest          = get_manifest() # Get either a manifest or nil if apply should use content of Puppet[:code]
        splay                              # splay if needed
        facts             = get_facts()    # facts or nil
        node              = get_node()     # node or error
        apply_environment = get_configured_environment(node, manifest)
    How does this kind of thing get past testing?
  • b

    binford2k

    07/28/2022, 5:26 PM
    It doesn’t exist. This is injected by some third party. https://github.com/puppetlabs/puppet/blob/6.26.0/lib/puppet/application/apply.rb#L204-L205
  • s

    Slackbot

    07/28/2022, 5:28 PM
    This message was deleted.
    h
    n
    • 3
    • 8
  • n

    nwops

    07/28/2022, 5:28 PM
    And it really is just the {{ }} that I want it to act upon.
  • b

    binford2k

    07/28/2022, 5:32 PM
    Looks like PuppetAudit comes from https://github.com/oracle/solaris-userland/blob/f8131c60cfea330031dddab63ff3d21709b164f2/components/ruby/puppet/ext/puppet_audit.c
  • d

    Dr Bunsen Honeydew

    07/28/2022, 5:45 PM
    businessparrot 🧑‍🏫Puppet Forge is about to start up in #CFD8Z9A4T
  • b

    binford2k

    07/28/2022, 5:48 PM
    sorry, wrong link. The patch is in https://github.com/oracle/solaris-userland/blob/f8131c60cfea330031dddab63ff3d21709[…]/puppet/patches/0001-no-upstream-Solaris-auditing-support.patch
  • b

    binford2k

    07/28/2022, 6:01 PM
    sorry, wrong link. The patch is in https://github.com/oracle/solaris-userland/blob/master/components/ruby/puppet/patches/0001-no-upstream-Solaris-auditing-support.patch
  • b

    binford2k

    07/28/2022, 6:01 PM
    sorry, wrong link. The patch is in https://github.com/oracle/solaris-userland/blob/master/components/ruby/puppet/patches/0001-no-upstream-Solaris-auditing-support.patch
  • s

    Slackbot

    07/28/2022, 7:23 PM
    This message was deleted.
    y
    j
    +2
    • 5
    • 13
  • j

    JoeH

    07/28/2022, 7:23 PM
    Of the agent
  • j

    JoeH

    07/28/2022, 7:29 PM
    I tried the 6.10 bionic deb as well and it still installed 7.17
  • d

    Dr Bunsen Honeydew

    07/28/2022, 8:45 PM
    beaker 🧑‍🏫PE Console is about to start up in #CFD8Z9A4T
1...113114115...428Latest