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

    Slackbot

    01/05/2023, 5:06 AM
    This message was deleted.
    n
    d
    • 3
    • 34
  • s

    Slackbot

    01/05/2023, 6:48 AM
    This message was deleted.
    j
    b
    • 3
    • 9
  • j

    jjanco

    01/05/2023, 6:49 AM
    quick question about scaling puppet CA, we have a large amount of certs, hitting the `puppet-ca/v1/certificate_status/`on puppetserver 6.4.0 is extremely slow and hangs with any concurrency. I’ve tried tuning GC/jruby instances etc., but expectedly has minimal impact since it looks like the server is loading the massive cert dir for each request? Are there any performance optimizations in subsequent versions…looks like the /clean endpoint has batching now in 7.x but glancing at the code it still looks like there aren’t optimizations for handling concurrency i.e. it’s still doing what PUT/DELETE do at the certificate_status endpoint for each host/are there ways of tuning puppetserver in a way to handle this load? Or is the only option reducing the size of this directory to control memory use? A PUT/DELETE cycle on 10 hosts takes 30s with concurrency and around 1min15s sequentially. I’m new to clojure so I may be mistaken in my review of the code, any help is appreciated, thanks!
  • j

    jjanco

    01/05/2023, 8:22 AM
    message has been deleted
  • s

    Slackbot

    01/05/2023, 9:08 AM
    This message was deleted.
    m
    b
    • 3
    • 18
  • d

    David Sandilands

    01/05/2023, 9:52 AM
    Do you want this just to be static? I.e we know which directories it creates in which case I think adding a template in https://github.com/puppetlabs/pdk-templates/tree/main/moduleroot and adding to https://github.com/puppetlabs/pdk-templates/blob/main/config_defaults.yml Should do it
  • j

    jjanco

    01/05/2023, 10:10 AM
    message has been deleted
  • s

    Slackbot

    01/05/2023, 10:44 AM
    This message was deleted.
    a
    d
    h
    • 4
    • 8
  • a

    Animesh Sahu

    01/05/2023, 10:58 AM
    message has been deleted
  • s

    Slackbot

    01/05/2023, 1:54 PM
    This message was deleted.
    b
    d
    a
    • 4
    • 5
  • n

    natemccurdy

    01/06/2023, 1:08 AM
    In a normal Puppet run, that's definitely the case. But when running in noop, some things must be assumed when it comes to execs.
  • d

    Dagan McGregor

    01/06/2023, 1:12 AM
    Assuming everything is always successful is not good behaviour, but it could at least be less bad behaviour
  • n

    natemccurdy

    01/06/2023, 1:32 AM
    That's more to the point, I think. Might be helpful for the Puppet devs if you rephrase your ticket around that argument.
  • n

    natemccurdy

    01/06/2023, 1:33 AM
    Also, here's an interesting bit about those qualifiers: https://github.com/puppetlabs/puppet/blob/7.21.0/lib/puppet/type/exec.rb#L13-L17 Puppet treats those as resource attributes that are used to determine the current state of the resource. So Puppet must execute those to determine whether the resource is in sync. Which makes sense in relation to how other resources are evaluated as being in sync or not.
  • n

    natemccurdy

    01/06/2023, 1:33 AM
    Also, here's an interesting bit about those qualifiers: https://github.com/puppetlabs/puppet/blob/7.21.0/lib/puppet/type/exec.rb#L13-L17 Puppet treats those as resource properties that are used to determine the current state of the resource. So Puppet must execute those to determine whether the resource is in sync. Which makes sense in relation to how other resources are evaluated as being in sync or not.
  • n

    natemccurdy

    01/06/2023, 1:54 AM
    And when running in noop mode, I believe it's the
    sync
    method that is just assumed to succeed and is never actually called.
  • n

    natemccurdy

    01/06/2023, 1:55 AM
    Another thing to note here is that the behavior you're seeing is because the check to see whether a command's executable exists or not is called from inside the exec type's
    sync
    method: https://github.com/puppetlabs/puppet/blob/7.21.0/lib/puppet/type/exec.rb#L147 That
    sync
    method calls
    provider.run
    which ends up calling `checkexec(command)`: https://github.com/puppetlabs/puppet/blob/7.21.0/lib/puppet/provider/exec.rb#L44
    checkexec
    is where the check for existence happens: https://github.com/puppetlabs/puppet/blob/7.21.0/lib/puppet/provider/exec/posix.rb#L32-L33
  • s

    Slackbot

    01/06/2023, 9:12 AM
    This message was deleted.
    a
    b
    • 3
    • 6
  • a

    Animesh Sahu

    01/06/2023, 9:13 AM
    I could run tests using rake but confused on builds, rake seems to only run tests benchmarks and generate docs
  • a

    Animesh Sahu

    01/06/2023, 9:54 AM
    Seems like
    bundle install
    was the command.
  • a

    Animesh Sahu

    01/06/2023, 10:07 AM
    Seems like
    bundle install
    was the command. Thereafter ./bin/puppet works.
  • a

    Animesh Sahu

    01/06/2023, 10:14 AM
    Seems like
    bundle install
    was the command. Thereafter
    ./bin/puppet
    works (alternatively
    sudo ./install.rb
    copies them to /usr prefix).
  • g

    George

    01/06/2023, 12:47 PM
    message has been deleted
  • s

    Slackbot

    01/06/2023, 12:50 PM
    This message was deleted.
    b
    g
    • 3
    • 13
  • r

    rismoney

    01/06/2023, 2:38 PM
    in a custom fact, I have this:
    Copy code
    Facter.value(:networking)['fqdn']
    Which was previously:
    Copy code
    Facter.value(:fqdn)
    The new structured fact seems to give me a
    Caught recursion
    error. Not sure what the difference here is between using these
  • s

    Slackbot

    01/06/2023, 3:05 PM
    This message was deleted.
    y
    • 2
    • 2
  • s

    Slackbot

    01/06/2023, 3:06 PM
    This message was deleted.
    a
    v
    • 3
    • 12
  • v

    vchepkov

    01/06/2023, 3:06 PM
    that's what we do, eyaml key an yaml the cert
  • b

    Brian Schonecker

    01/06/2023, 3:07 PM
    @vchepkov thanks again!
    👍 1
  • a

    Adam Harvey

    01/06/2023, 3:07 PM
    Heya folks: doing some ENC work as well as control-repo level site manifest work: ENC assigns which environment - Done. site manifest in environment :
    Copy code
    node default {
      $pp_role = $trusted['extensions']['pp_role']
      include "role::${pp_role}"
    }
    even if I try on a compiler node to
    puppet apply /etc/puppetlabs/code/environments/dev/manifests/site.pp
    where ^ lives - I get
    Copy code
    Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::role:: for
    That trusted fact most definitely exists, I validated it via a facts api call and it was in the CSR. Ideas/thoughts? This approach has been mentioned over the years and appears to work (for those who have mentioned it) but I'm a bit lost. We use roles/profiles method extensively/exclusively.
    Copy code
    extension_requests:
    (redacted)
        pp_role: puppetcompiler
    I should be assigned
    role::puppetcompiler
    based on interpolation
1...260261262...428Latest