Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3123

One "broken" exported/virtual resource causes all of the same type to fail

    Details

    • Type: Bug
    • Status: Needs Information
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: None
    • Component/s: None
    • Template:
    • Sub-team:
    • Team:
      Server
    • Story Points:
      1
    • Sprint:
      Language Triage

      Description

      @sshkey { "${::fqdn}_dsa":
        host_aliases => [$::fqdn, $::hostname],
        type         => dsa,
        key          => $::fdslkfjsdlfkj,
      }
       
      @sshkey { "${::fqdn}_rsa":
        host_aliases => [$::fqdn, $::hostname],
        type         => rsa,
        key          => $::sshrsakey,
      }
       
      @notify { 'blah':}
       
      Sshkey <| |>
      Notify <| |>
      

      [root@pe-331-master ssh]# /opt/puppet/bin/puppet apply /vagrant/junk/foo.pp
      Notice: Compiled catalog for pe-331-master.puppetdebug.vlan in environment production in 0.10 seconds
      Notice: /Stage[main]/Main/Sshkey[pe-331-master.puppetdebug.vlan_dsa]/ensure: created
      Error: /Stage[main]/Main/Sshkey[pe-331-master.puppetdebug.vlan_dsa]: Could not evaluate: Field 'key' is required
      Notice: /Stage[main]/Main/Sshkey[pe-331-master.puppetdebug.vlan_rsa]/ensure: created
      Error: /Stage[main]/Main/Sshkey[pe-331-master.puppetdebug.vlan_rsa]: Could not evaluate: Field 'key' is required
      Notice: blah
      Notice: /Stage[main]/Main/Notify[blah]/message: defined 'message' as 'blah'
      Notice: Finished catalog run in 0.17 seconds
      

      Note that Could not evaluate: Field 'key' is required was still thrown even for the rsa key resource, even though the key parameter is clearly supplied.

      If I simply comment out the broken resource:

      #@sshkey { "${::fqdn}_dsa":
      #  host_aliases => [$::fqdn, $::hostname],
      #  type         => dsa,
      #  key          => $::fdslkfjsdlfkj,
      #}
       
      @sshkey { "${::fqdn}_rsa":
        host_aliases => [$::fqdn, $::hostname],
        type         => rsa,
        key          => $::sshrsakey,
      }
       
      @notify { 'blah':}
       
      Sshkey <| |>
      Notify <| |>
      

      then the working one applies just fine:

      [root@pe-331-master ssh]# /opt/puppet/bin/puppet apply /vagrant/junk/foo.pp
      Notice: Compiled catalog for pe-331-master.puppetdebug.vlan in environment production in 0.10 seconds
      Notice: /Stage[main]/Main/Sshkey[pe-331-master.puppetdebug.vlan_rsa]/ensure: created
      Notice: blah
      Notice: /Stage[main]/Main/Notify[blah]/message: defined 'message' as 'blah'
      Notice: Finished catalog run in 0.16 seconds
      

      So clearly, I'm successfully passing in the key parameter. The good virtual resource is being "tainted" by the bad one. This affects exported resources as well.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  zee Zee Alexander
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Zendesk Support