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

    Slackbot

    12/14/2022, 9:24 AM
    This message was deleted.
    k
    t
    c
    • 4
    • 5
  • k

    Konstantin

    12/14/2022, 9:30 AM
    Hi everyone! I have init.pp of module
    Copy code
    $total_construction = {}
    if ($specific_configs != nil) {
        $specific_configs.each |$specific_config| {
            notify {"Specific config is ${specific_config} and total_construction is ${total_construction}":}
            $parameter = split($specific_config, "=")[0]
            $value = split($specific_config, "=")[1]
            $temp_construction = {$parameter => $value}
            $total_construction = $total_construction + $temp_construction
            notify {"parameter ${parameter} and value ${value} and total_construction ${total_construction}" :}
        }
    }
    Server call module and set
    Copy code
    specific_configs => ['hls_specific_location_num=2','dash_specific_location_num=2']
    When code executes in logs i see this
    Copy code
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is hls_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is hls_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is dash_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is dash_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}' (noop)
    Why i see that both times total_construction is {}, but it must be added with $temp_construction The task i solving ist that i want to prepare hash to include it in epp: intead of this
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    {'hls_specific_location_num' => "${hls_specific_location_num}",
                     'dash_specific_location_num' => "${dash_specific_location_num}",
                     }),
    i want to prepare something like that
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    $total_construction),
  • k

    Konstantin

    12/14/2022, 9:30 AM
    Hi everyone! I have init.pp of module
    Copy code
    $total_construction = {}
    if ($specific_configs != nil) {
        $specific_configs.each |$specific_config| {
            notify {"Specific config is ${specific_config} and total_construction is ${total_construction}":}
            $parameter = split($specific_config, "=")[0]
            $value = split($specific_config, "=")[1]
            $temp_construction = {$parameter => $value}
            $total_construction = $total_construction + $temp_construction
            notify {"parameter ${parameter} and value ${value} and total_construction ${total_construction}" :}
        }
    }
    Another module on node call this module and set
    Copy code
    specific_configs => ['hls_specific_location_num=2','dash_specific_location_num=2']
    When code executes in logs i see this
    Copy code
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is hls_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is hls_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is dash_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is dash_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}' (noop)
    Why i see that both times total_construction is {}, but it must be added with $temp_construction The task i solving ist that i want to prepare hash to include it in epp: intead of this
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    {'hls_specific_location_num' => "${hls_specific_location_num}",
                     'dash_specific_location_num' => "${dash_specific_location_num}",
                     }),
    i want to prepare something like that
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    $total_construction),
  • k

    Konstantin

    12/14/2022, 9:31 AM
    Hi everyone! I have init.pp of module
    Copy code
    $total_construction = {}
    if ($specific_configs != nil) {
        $specific_configs.each |$specific_config| {
            notify {"Specific config is ${specific_config} and total_construction is ${total_construction}":}
            $parameter = split($specific_config, "=")[0]
            $value = split($specific_config, "=")[1]
            $temp_construction = {$parameter => $value}
            $total_construction = $total_construction + $temp_construction
            notify {"parameter ${parameter} and value ${value} and total_construction ${total_construction}" :}
        }
    }
    Another module on node call this module and set
    Copy code
    specific_configs => ['hls_specific_location_num=2','dash_specific_location_num=2']
    When code executes in logs i see this
    Copy code
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is hls_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is hls_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is dash_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is dash_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}' (noop)
    Why i see that both times total_construction is {}, but i initialized it once and it must be added with $temp_construction The task i solving ist that i want to prepare hash to include it in epp: intead of this
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    {'hls_specific_location_num' => "${hls_specific_location_num}",
                     'dash_specific_location_num' => "${dash_specific_location_num}",
                     }),
    i want to prepare something like that
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    $total_construction),
  • k

    Konstantin

    12/14/2022, 9:31 AM
    Hi everyone! I have init.pp of module
    Copy code
    $total_construction = {}
    if ($specific_configs != nil) {
        $specific_configs.each |$specific_config| {
            notify {"Specific config is ${specific_config} and total_construction is ${total_construction}":}
            $parameter = split($specific_config, "=")[0]
            $value = split($specific_config, "=")[1]
            $temp_construction = {$parameter => $value}
            $total_construction = $total_construction + $temp_construction
            notify {"parameter ${parameter} and value ${value} and total_construction ${total_construction}" :}
        }
    }
    Another module on node call this module and set
    Copy code
    specific_configs => ['hls_specific_location_num=2','dash_specific_location_num=2']
    When code executes in logs i see this
    Copy code
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is hls_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is hls_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter hls_specific_location_num and value 2 and total_construction {hls_specific_location_num => 2}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[Specific config is dash_specific_location_num=2 and total_construction is {}]/message: current_value 'absent', should be 'Specific config is dash_specific_location_num=2 and total_construction is {}' (noop)
    Notice: /Stage[main]/Nginx_front/Notify[parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}]/message: current_value 'absent', should be 'parameter dash_specific_location_num and value 2 and total_construction {dash_specific_location_num => 2}' (noop)
    Why i see that both times total_construction is {}, but i initialized it once and it must be added with $temp_construction on first iteration The task i solving ist that i want to prepare hash to include it in epp: intead of this
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    {'hls_specific_location_num' => "${hls_specific_location_num}",
                     'dash_specific_location_num' => "${dash_specific_location_num}",
                     }),
    i want to prepare something like that
    Copy code
    file { "${root_service}/${service_folder}/conf.d/${external_config}":
                content => epp("${external_module_name}/${service_folder}/conf.d/${external_config}",
                    $total_construction),
  • s

    Slackbot

    12/14/2022, 10:26 PM
    This message was deleted.
    r
    r
    l
    • 4
    • 8
  • q

    Quentin RATAUD

    12/15/2022, 2:09 PM
    Hello ! I have some trouble using "showoff", where can I ask for help ? (It is pretty urgent)
  • q

    Quentin RATAUD

    12/15/2022, 2:10 PM
    Hello ! I have some trouble using "showoff", where can I ask for help ? (It is pretty urgent)
  • b

    bastelfreak

    12/15/2022, 2:10 PM
    just ask 🙂
  • s

    Slackbot

    12/15/2022, 2:11 PM
    This message was deleted.
    q
    b
    b
    • 4
    • 11
  • q

    Quentin RATAUD

    12/15/2022, 2:13 PM
    Okay, the interaction is not working at all. The logs tell me the viewer is requesting the endpoint /control frequently and receives 404. I think that is why it is then reported as a "connection issue". I can't find anything mentioning this endpoint in the documentation. I believe this endpoint is the endpoint responsible for the interactions? The auto-follow is not working, and when the viewer is answer to a form, the presenter is getting the answers, but when the presenter is displaying the result or getting to the next slides, the viewer is just getting stuck in the same view and cannot even change the slide.
  • q

    Quentin RATAUD

    12/15/2022, 2:15 PM
    https://github.com/puppetlabs/showoff/
  • q

    Quentin RATAUD

    12/15/2022, 2:34 PM
    message has been deleted
  • s

    Slackbot

    12/15/2022, 4:04 PM
    This message was deleted.
    w
    • 2
    • 2
  • v

    vStone

    12/15/2022, 4:04 PM
    statedir gives me permission errors and default /tmp could potentially have noexec
  • b

    bastelfreak

    12/15/2022, 4:09 PM
    the vardir maybe? that defaults to /opt/puppetlabs/puppet/cache
  • s

    Slackbot

    12/15/2022, 5:26 PM
    This message was deleted.
    n
    n
    j
    • 4
    • 25
  • n

    natemccurdy

    12/15/2022, 5:31 PM
    I'd start with a GitHub issue on the responsible module's page: https://github.com/dsccommunity/ComputerManagementDsc
  • n

    natemccurdy

    12/15/2022, 5:31 PM
    I wouldn't suspect a bug in the resource_api itself, at least not without first debugging the resource specific to
    dsc_virtualmemory
    .
  • s

    Slackbot

    12/15/2022, 6:09 PM
    This message was deleted.
    n
    c
    +2
    • 5
    • 46
  • n

    natemccurdy

    12/15/2022, 6:46 PM
    I'm still reading your original ERB template, trying to figure out what exactly it's doing. I strongly recommend moving all of that iteration and logic into Puppet though, and moving it out of the ERB template itself. ...that's what I'm attempting to do now, but it's taking me a few fears to grok the code completelyt.
  • n

    natemccurdy

    12/15/2022, 6:46 PM
    I'm still reading your original ERB template, trying to figure out what exactly it's doing. I strongly recommend moving all of that iteration and logic into Puppet though, and moving it out of the ERB template itself. ...that's what I'm attempting to do now, but it's taking me a few reads to grok the code completely.
  • n

    natemccurdy

    12/15/2022, 6:49 PM
    ERB has two main problems: 1) Every call to the
    template()
    function has to copy the entire scope into the template, which is super wasteful and balloons memory usage. EPP solves that by having an explicit context that you must pass data into. 2) It's raw Ruby, which is sometimes useful but also means you're able to shoot yourself in the foot very easily.
  • n

    natemccurdy

    12/15/2022, 6:50 PM
    ERB has two main problems: 1) Every call to the
    template()
    function has to copy the entire scope into the template (all variables, facts, etc...), which is super wasteful and balloons memory usage. EPP solves that by having an explicit context that you must pass data into. 2) It's raw Ruby, which is sometimes useful but also means you're able to shoot yourself in the foot very easily.
  • n

    natemccurdy

    12/15/2022, 7:13 PM
    What version of Puppetserver are you using?
  • s

    Slackbot

    12/15/2022, 7:48 PM
    This message was deleted.
    w
    • 2
    • 1
  • c

    Corey Hickey

    12/15/2022, 7:56 PM
    I assume that the drops in heap size that happen at 11:32, 11:47, and 11:48 (respectively) are full GCs. In any case, those were failing to happen when I had the bad template in use.
  • n

    natemccurdy

    12/15/2022, 8:40 PM
    I can see why having an Enumerator simplifies this a lot. It was tricky to do it all in the DSL.
  • d

    Dr Bunsen Honeydew

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

    Slackbot

    12/15/2022, 10:40 PM
    This message was deleted.
    windowssoftware_json.json
    n
    s
    w
    • 4
    • 29
1...253254255...428Latest