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

    David Sandilands

    10/27/2022, 1:07 PM
    So the strings doc is for Strings used in Puppet code where as hiera is reading it from yaml. Yaml doesn't have this requirement for interpolation although the style guide doesn't directly mention hiera https://puppet.com/docs/puppet/7/style_guide.html#style_guide_module_design-quoting What it does say is "As long you are consistent, strings may be enclosed in single or double quotes, depending on your preference." Also to know PDK does not find an issue with single quotes and a variable either I would for consistency mirror quote behaviour used in Puppet double quotes for variables and single for not but thats just me
  • m

    Moe

    10/27/2022, 1:30 PM
    Wonder if I can bring the YAML linter in VS Code to adopt to either one heh
  • m

    Moe

    10/27/2022, 1:36 PM
    Kind of very basic question but I'm trying to settle an internal debate for good now. Hiera and whether to use double or single quotes for variable interpolation. I found a this ticket when searching for a definite answer. Is the answer which was given there still valid as in that both variants work - double and single quotes around
    %{foo}
    to stick to the example there. Or is the answer more nuanced than a basic yes or no?
  • m

    Moe

    10/27/2022, 1:37 PM
    Aha! The strings doc says
    Single-quoted strings can’t interpolate values.
    which isn't true. I just tested it.
    var: '%{fact.fqdn}asd'
    totally worked fine
  • b

    Brian Schonecker

    10/27/2022, 1:41 PM
    I'm terribly embarrassed by this next question but how do I change the mysql::params::pidfile via hiera to override the pid-file setting in my.cnf? I'm using MariaDB Enterprise edition and /var/run/mariadb directory doesn't get created anywhere in the process of installing MariaDB or the invocation of the Puppet module. "mysql:paramspidfile /my/pid/file/path.pid" doesn't work like I think it should. I'm doing "include mysql::server" and the only configuration item I need to modify is the location of the pid file. Wouldn't normally the pidfile be a parameter of the mysql::server class in case one wants to modify it?
  • b

    Brian Schonecker

    10/27/2022, 1:41 PM
    I'm terribly embarrassed by this next question but how do I change the mysql::params::pidfile via hiera to override the pid-file setting in my.cnf? I'm using MariaDB Enterprise edition and /var/run/mariadb directory doesn't get created anywhere in the process of installing MariaDB or the invocation of the Puppet module. "mysql:paramspidfile /my/pid/file/path.pid" doesn't work like I think it should.
  • b

    Brian Schonecker

    10/27/2022, 1:42 PM
    I'm terribly embarrassed by this next question but how do I change the mysql::params::pidfile via hiera to override the pid-file setting in my.cnf? I'm using MariaDB Enterprise edition and /var/run/mariadb directory doesn't get created anywhere in the process of installing MariaDB or the invocation of the Puppet module. "mysql:paramspidfile /my/pid/file/path.pid" doesn't work like I think it should. I'm doing "include mysql::server" and the only configuration item I need to modify is the location of the pid file. Wouldn't normally the pidfile be a parameter of the mysql::server class in case one wants to modify it?
  • h

    helindbe

    10/27/2022, 1:57 PM
    @Brian Schonecker I took a quick look, and it does not seem like the parameter
    $pidfile
    is used anywhere in that module - it is only set in
    params.pp
    - so strange. Look at the result of searching through the module at github: https://github.com/puppetlabs/puppetlabs-mysql/search?q=pidfile
  • b

    Brian Schonecker

    10/27/2022, 1:58 PM
    In the template file, my.cnf.erb, it does a loop through all of the options and pid-file is one of those options.
  • h

    helindbe

    10/27/2022, 1:58 PM
    In order to manage it with hiera the class must have it as a parameter - or you would need to clone the module and change it. Still, I am not sure it actually manages
    pidfile
  • h

    helindbe

    10/27/2022, 1:58 PM
    ah, ok, the variable is still there
  • h

    helindbe

    10/27/2022, 2:01 PM
    Can you modify the template and make the override there? (Ugly, better if module added the parameter, or better yet if it was refactored to stop using the old params.pp way of configuring a class and instead switching to hiera 5 data in modules for defaults).
  • j

    josh

    10/27/2022, 2:09 PM
    To confirm things are working as expected you can pass
    —-debug
    to the agent and it will print which protocol and cipher suite it’s using for each connection
  • f

    fe80

    10/27/2022, 2:10 PM
    https://github.com/hashicorp/vault-ruby/issues/179#issuecomment-1207990965
  • s

    Slackbot

    10/27/2022, 2:19 PM
    This message was deleted.
    b
    • 2
    • 1
  • c

    cruelsmith

    10/27/2022, 2:19 PM
    @Brian Schonecker you answered you question nearly your self 😄 The pidfile is part of the
    default_config
    from params. https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/params.pp#L448-L489 When you need to override it use the
    mysql::server::override_options
    https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/server.pp#L24-L25 `mysql:serveroverride options`'mysqld' => { 'basedir' => $mysql:params:basedir, 'bind-address' => '127.0.0.1', 'datadir' => $mysql:params:datadir, 'expire_logs_days' => '10', 'key_buffer_size' => '16M', 'log-error' => $mysql:params:log_error, 'max_allowed_packet' => '16M', 'max_binlog_size' => '100M', 'max_connections' => '151', 'pid-file' => $mysql:params:pidfile,
  • c

    cruelsmith

    10/27/2022, 2:20 PM
    @Brian Schonecker you answered you question nearly your self 😄 The pidfile is part of the
    default_config
    from params. https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/params.pp#L448-L489 When you need to override it use the
    mysql::server::override_options
    https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/server.pp#L24-L25
    Copy code
    mysql::server::override_options:
    `mysql:serveroverride options`'mysqld' => { 'basedir' => $mysql:params:basedir, 'bind-address' => '127.0.0.1', 'datadir' => $mysql:params:datadir, 'expire_logs_days' => '10', 'key_buffer_size' => '16M', 'log-error' => $mysql:params:log_error, 'max_allowed_packet' => '16M', 'max_binlog_size' => '100M', 'max_connections' => '151', 'pid-file' => $mysql:params:pidfile,
  • c

    cruelsmith

    10/27/2022, 2:21 PM
    @Brian Schonecker you answered you question nearly your self 😄 The pidfile is part of the
    default_config
    from params. https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/params.pp#L448-L489 When you need to override it use the
    mysql::server::override_options
    https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/server.pp#L24-L25
    Copy code
    mysql::server::override_options:
      'mysqld':
         'pid-file': '/my/pid/file/path.pid'
  • c

    cruelsmith

    10/27/2022, 2:25 PM
    @Brian Schonecker you answered your question nearly your self 😄 The pidfile is part of the
    default_config
    from params. https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/params.pp#L448-L489 When you need to override it use the
    mysql::server::override_options
    https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/server.pp#L24-L25
    Copy code
    mysql::server::override_options:
      'mysqld':
         'pid-file': '/my/pid/file/path.pid'
  • f

    fe80

    10/27/2022, 2:32 PM
    @josh about cipher support of jruby, the last release of puppetserver support only legacy fact. It's look like a bug of jruby. Do you have any information about that ?
  • j

    josh

    10/27/2022, 4:15 PM
    @fe80 when puppetserver is acting as an HTTPS client, then calls to
    Net::HTTP
    are handled by the https://github.com/jruby/jruby-openssl library. It emulates the ruby bindings for OpenSSL https://github.com/ruby/openssl, but the
    jruby-openssl
    library has historically been very buggy or lags behind.
  • d

    Dr Bunsen Honeydew

    10/27/2022, 5:45 PM
    fry dancing 🧑‍🏫Puppet Forge is about to start up in #CFD8Z9A4T
    🦜 1
  • s

    Slackbot

    10/27/2022, 6:42 PM
    This message was deleted.
    r
    r
    • 3
    • 3
  • j

    Jordan Mueller

    10/27/2022, 6:44 PM
    The end result should be to run a command to append a template. If the agent isn’t running and file doesn’t exist don’t run the command
  • j

    Jordan Mueller

    10/27/2022, 6:44 PM
    The end result should be to run a command to append a template. If the agent isn’t running and file doesn’t exist don’t run the command
  • s

    Slackbot

    10/27/2022, 7:39 PM
    This message was deleted.
    😁 1
    r
    w
    +2
    • 5
    • 9
  • r

    ramindk

    10/27/2022, 9:00 PM
    messing with /var/log permissions assuming whatever local daemon might need access. Or just flooding it with low value logs. https://github.com/dev-sec/puppet-os-hardening/blob/master/manifests/init.pp#L82
  • s

    Slackbot

    10/27/2022, 9:14 PM
    This message was deleted.
    h
    j
    • 3
    • 22
  • h

    helindbe

    10/27/2022, 9:23 PM
    Hiera can make use of top scope variables in
    hiera.yaml
    to determine paths to data file per level. This is usually not a good idea since you have to jump through hopes when using the command line lookup tool (have to turn on --compile, or supply variables with value to simulate that compilation took place.)
  • j

    Joel Wilson

    10/27/2022, 9:26 PM
    I can’t just put:
    Copy code
    class { 'puppet::params':
      version => 6,
    }
    without it getting a duplicate declaration because of the inheret statement
1...219220221...428Latest