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

    vchepkov

    01/12/2023, 8:45 PM
    runs twice a week
  • b

    bastelfreak

    01/12/2023, 8:46 PM
    yeah that hiera option basically includes the pe_databases class I linked above
  • c

    csharpsteen

    01/12/2023, 8:49 PM
    Puppet fact data can be "bursty". Autovaccum can't help with a set of facts that report large values on one run and then stop. Space has to be allocated to hold the large dataset, even if ends up being transient. All autovaccuum can do is ensure space is re-used once allocated.
  • c

    csharpsteen

    01/12/2023, 8:51 PM
    Long-running transactions are also another item that can cause growth. Autovacuum can only clean up rows that died before the oldest transaction started. If you've got a query that runs for hours or days, then several puppet runs worth of writes will need to allocate new disk space rather than moving into the space vacated by previous data.
  • c

    csharpsteen

    01/12/2023, 9:06 PM
    So, the three scenarios where table size starts to grow are: • The size of the live data set increases, perhaps due to facts, catalogs, or reports temporarily being larger than normal. • The age of the oldest in-progress query starts increasing. • The time required to autovacuum the table becomes larger, so more churn builds up between runs. Usually, one of the first two scenarios occurs. Time required for autovacuum to process the table increases with table size, so the third scenario item usually shows up as a "death spiral" resulting from one of the first two pushing the system past a tipping point.
  • d

    Dr Bunsen Honeydew

    01/12/2023, 9:45 PM
    businessparrot 🧑‍🏫PE Console is about to start up in #CFD8Z9A4T
  • s

    Slackbot

    01/13/2023, 7:51 AM
    This message was deleted.
    b
    t
    s
    • 4
    • 4
  • s

    Slackbot

    01/13/2023, 8:55 AM
    This message was deleted.
    t
    n
    • 3
    • 5
  • s

    Slackbot

    01/13/2023, 9:58 AM
    This message was deleted.
    d
    n
    • 3
    • 3
  • d

    David Sandilands

    01/13/2023, 10:15 AM
    The issue here I think from your code above is the title you have given is "install test" it will therefore be looking for "install test" to be installed. Either you can change the title or add a name attribute which is the name as it appears to RPM
  • d

    David Sandilands

    01/13/2023, 10:15 AM
    The issue here I think from your code above is the title you have given is "install test" it will therefore be looking for "install test" to be installed. Either you can change the title or add a name attribute which is the name as it appears to RPM ( presumably test? )
  • s

    Slackbot

    01/13/2023, 1:19 PM
    This message was deleted.
    d
    n
    • 3
    • 2
  • n

    Neeloj

    01/13/2023, 1:19 PM
    hi all, I have variables in
    init.pp
    and I want access those variables in
    mytestclass.pp
    , I tried like this :
    $package_name
    it doesnt work. or
    notify {"${package_name} is package name": }
    it doesnt work either. but the vairables in
    init.pp
    are in a
    case of osfamily
    . maybe thats why the
    mytestclass.pp
    cannot access it ? thank you all
  • n

    Neeloj

    01/13/2023, 1:19 PM
    hi all, I have variables in
    init.pp
    and I want access those variables in
    mytestclass.pp
    , I tried like this :
    $package_name
    it doesnt work. or
    notify {"${package_name} is package name": }
    it doesnt work either. or $::package_name but the vairables in
    init.pp
    are in a
    case of osfamily
    . maybe thats why the
    mytestclass.pp
    cannot access it ? thank you all
  • n

    Neeloj

    01/13/2023, 1:19 PM
    hi all, I have variables in
    init.pp
    and I want access those variables in
    mytestclass.pp
    , I tried like this :
    $package_name
    it doesnt work. or
    notify {"${package_name} is package name": }
    it doesnt work either. or
    $::package_name
    but the vairables in
    init.pp
    are in a
    case of osfamily
    . maybe thats why the
    mytestclass.pp
    cannot access it ? thank you all
  • n

    Neeloj

    01/13/2023, 1:27 PM
    thanks again @David Sandilands I was now on the page and I solved,
    $classname::package_name
    in
    mytestclass.pp
    Question: ask further are init.pp and mytestclass.pp both in a module? Answer: yes both are in a module
  • s

    Slackbot

    01/13/2023, 2:17 PM
    This message was deleted.
    c
    • 2
    • 2
  • c

    cruelsmith

    01/13/2023, 2:18 PM
    hi, i am a little bit stuck with the puppet build-in
    match
    function. I try to parse a loaded file (
    file()
    ) via the match function and capture every block that matches my regex. The regex itself works but my problem is that
    match
    stops after the first match. Is there a flag that i did not found yet or a alternative function that allows a global matching of my regex?
  • s

    Slackbot

    01/13/2023, 2:20 PM
    This message was deleted.
    c
    y
    • 3
    • 2
  • b

    Brian Schonecker

    01/13/2023, 2:21 PM
    I'm looking at the puppet apache module and they seem to do a mixture of both.
  • b

    Brian Schonecker

    01/13/2023, 2:22 PM
    Which confuses me further.
  • v

    vchepkov

    01/13/2023, 2:22 PM
    Optional default value is undef, in your case is just a string or Stdlib::Unixpath
  • v

    vchepkov

    01/13/2023, 2:22 PM
    Optional default value is undef, in your case is just a string or Stdlib::Unixpath
  • v

    vchepkov

    01/13/2023, 2:22 PM
    I prefer in class, but it's a matter of preference
  • s

    Slackbot

    01/13/2023, 2:23 PM
    This message was deleted.
    y
    b
    • 3
    • 2
  • b

    Brian Schonecker

    01/13/2023, 2:23 PM
    I'm pretty sure I'm abusing Heira.
  • v

    vchepkov

    01/13/2023, 2:24 PM
    if you only have common.yaml then it makes sense to remove it and hiera.yaml completely and save yourself some lookups
  • v

    vchepkov

    01/13/2023, 2:24 PM
    in a module
  • s

    Slackbot

    01/13/2023, 2:25 PM
    This message was deleted.
    c
    d
    +4
    • 7
    • 11
  • c

    cruelsmith

    01/13/2023, 4:03 PM
    Found the ruby
    scan()
    function and wrote now my own puppet function in ruby:
    Copy code
    # Matches a pattern against a string and returns an array containing
    # every match.
    # If the pattern contains no groups, each individual result consists of the
    # matched string. If the pattern contains groups, each individual result is
    # itself an array containing one entry per group.
    #
    # @see <https://apidock.com/ruby/String/scan>
    #
    Puppet::Functions.create_function(:scan) do
      dispatch :scan do
        param 'String', :string
        param 'Variant[String,Regexp]', :Pattern
        return_type 'Array'
      end
    
      def scan(string, pattern)
        string.scan(pattern)
      end
    end
1...271272273...428Latest