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

    binford2k

    05/19/2022, 3:57 AM
    hey, just a heads up. I removed the outside collaborators from https://github.com/puppetlabs/puppet_litmus as part of our org cleanup. It doesn’t actually change anyone’s usage — pretty sure TP gave you all collaborator when he was skunkworking it.
  • b

    bastelfreak

    05/19/2022, 1:36 PM
    I do not have collaborators permission on that repository 🙂
  • j

    josh

    05/19/2022, 4:23 PM
    Hi folks nightly puppet-agent-7.16.0.98.g7e366c542 builds contain both improvements mentioned above for deferred functions. The compiler can now detect if the deferred function's return type matches the type for a class parameter. And there is a new puppet setting "Puppet[:preprocess_deferred]" to control whether deferred functions are preprocessed when the run starts or on-demand when the resource is evaluated. By default we preprocess, but it can be set to "false".
    🎉 1
  • j

    josh

    05/19/2022, 4:24 PM
    Caveat, these changes don't solve the "how do I pass a deferred function to an EPP template" problem
  • s

    Slackbot

    05/19/2022, 4:26 PM
    This message was deleted.
    b
    j
    +2
    • 5
    • 25
  • v

    VoxBot

    05/19/2022, 4:30 PM
    if we just encrypted it with the client cert, it would be fairly simple to decrypt from the client, for troubleshooting or otherwise? (although it would not be all that easy to decrypt on the server side, which is messier)
  • j

    jhoblitt

    05/19/2022, 5:38 PM
    Is a custom
    #in_sync?
    needed in types in order to sync
    false
    boolean property values? I've tried everything I can think of, including
    Puppet::Property::Boolean
    , and puppet is not calling the mutator method or
    #flush
    .
    Copy code
    Debug: ...: exists? @property_hash: {... :value=>true, :ensure=>:present}
    Debug: ...: exists? resource: {... :value=>false, ...}
  • a

    Alex Fisher

    05/19/2022, 5:43 PM
    it's borked. You have to use symbols.
  • j

    jhoblitt

    05/19/2022, 5:44 PM
    I'm guessing that
    safe_insync?
    is the problem...
  • a

    Alex Fisher

    05/19/2022, 5:44 PM
    it's falsey, so Puppet doesn't even think you set it (like as if you had tried to set
    undef
    )
  • a

    Alex Fisher

    05/19/2022, 5:44 PM
    there's a ticket somewhere. Let me see...
  • j

    jhoblitt

    05/19/2022, 5:45 PM
    I was aware of the undef drama... not handling booleans is shocking
  • a

    Alex Fisher

    05/19/2022, 5:46 PM
    undef
    makes sense. Not working with
    false
    is just a long standing bug.
  • j

    jhoblitt

    05/19/2022, 5:47 PM
    I'm guessing this is the source of the problem: https://github.com/puppetlabs/puppet/blob/main/lib/puppet/property.rb#L273
  • j

    jhoblitt

    05/19/2022, 5:47 PM
    I'm guessing this is the source of the problem: https://github.com/puppetlabs/puppet/blob/main/lib/puppet/property.rb#L273
  • a

    Alex Fisher

    05/19/2022, 5:48 PM
    or this. https://github.com/puppetlabs/puppet/blob/b3ccdff405c7dc1328649badf15ceb24a65bdc11/lib/puppet/transaction/resource_harness.rb#L125
  • a

    Alex Fisher

    05/19/2022, 5:48 PM
    or this. https://github.com/puppetlabs/puppet/blob/b3ccdff405c7dc1328649badf15ceb24a65bdc11/lib/puppet/transaction/resource_harness.rb#L125
  • j

    jhoblitt

    05/19/2022, 5:48 PM
    everything is awful
  • a

    Alex Fisher

    05/19/2022, 5:49 PM
    See https://tickets.puppetlabs.com/browse/PUP-2368
    🙏 1
  • j

    jhoblitt

    05/19/2022, 5:49 PM
    probably broken in multiple places
  • j

    jhoblitt

    05/19/2022, 5:50 PM
    so @tvaughan hack on that ticket is along the lines of what I was considering trying but I wanted a sanity check...
  • a

    Alex Fisher

    05/19/2022, 5:51 PM
    or as @josh once said... https://github.com/voxpupuli/puppet-network/issues/240#issuecomment-373257966 "Is it
    nil
    ,
    false
    , or
    :false
    ... all I got is tears."
  • a

    Alex Fisher

    05/19/2022, 5:51 PM
    or as @josh once said... https://github.com/voxpupuli/puppet-network/issues/240#issuecomment-373257966 "Is it
    nil
    ,
    false
    , or
    :false
    ... all I got is tears."
  • a

    Alex Fisher

    05/19/2022, 5:52 PM
    You may also find https://github.com/theforeman/puppet-pulp/pull/284/files#diff-352ff73985b38caa1f2ae4ea51e1455640797bf72dd2c1376fa8e4464c0103a6R37 useful
  • j

    jhoblitt

    05/19/2022, 5:54 PM
    If I can get away with that instead of overriding
    insync?
    then that seems less drastic
  • j

    jhoblitt

    05/19/2022, 5:54 PM
    If I can get away with that instead of overriding
    insync?
    then that seems less drastic
  • a

    Alex Fisher

    05/19/2022, 5:56 PM
    I can imagine that fixing it properly (which I suspect is a lot more than just replacing
    if param.should
    with
    if !param.nil?
    ) would have the potential to break a lot of things.
  • j

    jhoblitt

    05/19/2022, 5:57 PM
    at a minimum, I bet it would cause changes to manifests that thought they were actually setting attributes to false...
    👍 1
  • j

    josh

    05/19/2022, 5:57 PM
    I'd love to see that fixed, the trick is to fix it while not breaking compat. One idea I've thought about is allowing the type to be passed in, like
    newproperty(:something, parent: Puppet::Property::Bool)
    and then overriding
    sync?
    in the subclass. Also the harness could check
    if param.is_a?(Puppet::Property::Bool)
    then do the new thing else do the old thing
  • a

    Alex Fisher

    05/19/2022, 5:57 PM
    Imagine the cases where someone is currently using
    some_property => false
    in a case where the default is boolean
    true
    and their code is currently not doing anything.
1...404142...648Latest