tickets | 1 Apr 03:11 2012

[Puppet - Bug #13323] Issues with variable scoping.

Issue #13323 has been updated by Trevor Vaughan.

    I definitely understand the logic behind this. My issue is that the language doesn’t appear to consistently recognize $foo::bar and $::foo::bar as the same variable depending on the scope, which leads to very confusing code.

    I personally believe that this should either be consistent across the board, or a parse error at some level so that you don’t have code that behaves in an unexpected manner.

    Thanks for looking into this!

    Bug #13323: Issues with variable scoping.

    • Author: Trevor Vaughan
    • Status: Needs Decision
    • Priority: Normal
    • Assignee: Pieter van de Bruggen
    • Category: language
    • Target version:
    • Affected Puppet version: 2.7.12
    • Keywords: ambiguity, variable, scope
    • Branch:

    According to http://docs.puppetlabs.com/guides/scope_and_puppet.html, we should be attempting to use fully qualified variable scoping across the board. However, I’ve run into a situation where there appear to be some serious issues.

    Example:

    class foo ($var1 = ‘something’) {}

    class foo::baz { if $foo::var1 == ‘something’ { do something } }

    class bar { $foo::var1 <– does not exist because it looks in bar::foo

    class { ‘::foo’: var1 => ‘baz’ }

    }

    class bar::foo { stuff… }

    The issue is that $::foo::var1 is NOT the same as $foo::var1 though both can be successfully declared anywhere across the manifest space. This causes very non-deterministic actions when using both variants though they should both really be the same thing.

    So, what is correct? Should we always use $::variable::thing or is the code incorrect and they should both be valid at the top scope when there is no lower scope overriding that variable?

    You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

    --
    You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
    To post to this group, send email to puppet-bugs <at> googlegroups.com.
    To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

    tickets | 1 Apr 10:08 2012

    [Puppet - Bug #13212] Pass array to custom define fails

    Issue #13212 has been updated by Yongchao Gao.

      Same problem with me. What a little different is only one of our instances will fail, and this error not occur every time.

      Bug #13212: Pass array to custom define fails

      • Author: Juan José Presa Rodal
      • Status: Needs More Information
      • Priority: Normal
      • Assignee:
      • Category: parser
      • Target version:
      • Affected Puppet version:
      • Keywords:
      • Branch:

      I’m trying to pass a simple array to a custom define and fails with error:

      err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship source "Foo::Map[idbazip2.2.2.2]"

      I think that code is very correct:

      $foo = [{"id" => "bar", "ip" => "1.1.1.1"}, {"id" => "baz", "ip" => "2.2.2.2"}]

      foo::map {$foo:}

      define foo::map () { notify {$name['id']: } }

      You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

      --
      You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
      To post to this group, send email to puppet-bugs <at> googlegroups.com.
      To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
      For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

      tickets | 1 Apr 11:06 2012

      [Puppet - Bug #13212] Pass array to custom define fails

      Issue #13212 has been updated by Yongchao Gao.

        During my test, i think this problem has something to do with Ruby version.

        The difference between failed node and normal nodes is they have different ruby version. Failed version is 1.8.7_p357, Normal version is 1.8.7_p249.

        After i upgrade one of the normal nodes' ruby version to 1.8.7_p357, it got errors like the first failed node too.

        Bug #13212: Pass array to custom define fails

        • Author: Juan José Presa Rodal
        • Status: Needs More Information
        • Priority: Normal
        • Assignee:
        • Category: parser
        • Target version:
        • Affected Puppet version:
        • Keywords:
        • Branch:

        I’m trying to pass a simple array to a custom define and fails with error:

        err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship source "Foo::Map[idbazip2.2.2.2]"

        I think that code is very correct:

        $foo = [{"id" => "bar", "ip" => "1.1.1.1"}, {"id" => "baz", "ip" => "2.2.2.2"}]

        foo::map {$foo:}

        define foo::map () { notify {$name['id']: } }

        You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

        --
        You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
        To post to this group, send email to puppet-bugs <at> googlegroups.com.
        To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
        For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

        tickets | 1 Apr 11:08 2012

        [Puppet - Bug #13212] Pass array to custom define fails

        Issue #13212 has been updated by Yongchao Gao.

          Btw, my puppet version is 2.7.11

          Bug #13212: Pass array to custom define fails

          • Author: Juan José Presa Rodal
          • Status: Needs More Information
          • Priority: Normal
          • Assignee:
          • Category: parser
          • Target version:
          • Affected Puppet version:
          • Keywords:
          • Branch:

          I’m trying to pass a simple array to a custom define and fails with error:

          err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship source "Foo::Map[idbazip2.2.2.2]"

          I think that code is very correct:

          $foo = [{"id" => "bar", "ip" => "1.1.1.1"}, {"id" => "baz", "ip" => "2.2.2.2"}]

          foo::map {$foo:}

          define foo::map () { notify {$name['id']: } }

          You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

          --
          You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
          To post to this group, send email to puppet-bugs <at> googlegroups.com.
          To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
          For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

          tickets | 1 Apr 11:25 2012

          [Puppet - Bug #13212] Pass array to custom define fails

          Issue #13212 has been updated by Yongchao Gao.

            After downgrade ruby to 1.8.7_p352, everything seems to be ok.

            Bug #13212: Pass array to custom define fails

            • Author: Juan José Presa Rodal
            • Status: Needs More Information
            • Priority: Normal
            • Assignee:
            • Category: parser
            • Target version:
            • Affected Puppet version:
            • Keywords:
            • Branch:

            I’m trying to pass a simple array to a custom define and fails with error:

            err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship source "Foo::Map[idbazip2.2.2.2]"

            I think that code is very correct:

            $foo = [{"id" => "bar", "ip" => "1.1.1.1"}, {"id" => "baz", "ip" => "2.2.2.2"}]

            foo::map {$foo:}

            define foo::map () { notify {$name['id']: } }

            You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

            --
            You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
            To post to this group, send email to puppet-bugs <at> googlegroups.com.
            To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
            For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

            tickets | 1 Apr 14:03 2012

            [Puppet - Bug #13568] (Unreviewed) Puppet defaults to A record on an IPv6 only client in a dual stack environment.

            Issue #13568 has been reported by Greg Cockburn.

            Bug #13568: Puppet defaults to A record on an IPv6 only client in a dual stack environment.

            • Author: Greg Cockburn
            • Status: Unreviewed
            • Priority: Normal
            • Assignee:
            • Category: agent
            • Target version:
            • Affected Puppet version:
            • Keywords:
            • Branch:

            I am running a dual stack master to support my IPv4 hosts and my IPv6 hosts.

            My IPv6 only hosts fail to work as puppet (or ruby) does a lookup for an “A” record which of course succeeds, and so never does a look up for a “AAAA” record. Other services are coping fine with the dual stack, (figuring out they are on a IPv6 host and trying to lookup ‘AAAA’ records first.)

            This of course results in a ‘network unreachable’ error when trying to retrieve file metadata and catalogue.

            I am running puppet on Debian Squeeze.

            Tried: 2.7.11-1~bpo60+1 and:2.6.2-5+squeeze4

            You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

            --
            You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
            To post to this group, send email to puppet-bugs <at> googlegroups.com.
            To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
            For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

            tickets | 2 Apr 05:02 2012

            [Puppet - Bug #13312] Dynamic scoping deprecation warnings should be given at the correct times

            Issue #13312 has been updated by Nigel Kersten.

              Hunter, do we have someone to review this? I’d rather this didn’t rot…

              Bug #13312: Dynamic scoping deprecation warnings should be given at the correct times

              • Author: Hunter Haugen
              • Status: In Topic Branch Pending Review
              • Priority: Normal
              • Assignee: Hunter Haugen
              • Category:
              • Target version:
              • Affected Puppet version: 2.7.0
              • Keywords: scope
              • Branch: https://github.com/puppetlabs/puppet/pull/604

              Due to some misevaluated flow control, deprecation warnings for dynamic scoping are not being thrown correctly. The scoping module is due for an update and it would be helpful if these warnings were shown correctly.

              You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

              --
              You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
              To post to this group, send email to puppet-bugs <at> googlegroups.com.
              To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
              For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

              tickets | 2 Apr 05:38 2012

              [Puppet - Bug #13199] md5lite, mtime not honoured for file type/provider

              Issue #13199 has been updated by Nigel Kersten.
              • Affected Puppet version deleted (2.7.12rc2)

              Ken, did you find anything else out here? Does it really not work at all?

              Bug #13199: md5lite, mtime not honoured for file type/provider

              • Author: Ken Barber
              • Status: Investigating
              • Priority: Normal
              • Assignee: Ken Barber
              • Category: file
              • Target version:
              • Affected Puppet version:
              • Keywords:
              • Branch:

              It seems I can’t get the puppetmaster to honour the checksum => mtime setting, or the md5lite setting. So the following example has no performance improvement over just using md5:

              file { "/testtransfer": ensure => directory, recurse => remote, purge => true, checksum => mtime, source => "puppet:///modules/${module_name}/bigfileshere", }

              The problem seems to be in multiple places. The first place, I can’t get the file_server/metadata to respond with mtime, md5lite checksums:

              # curl -k --cert /etc/puppetlabs/pupem --key /etc/puppetlabs/puppet/ssl/private_keys/puppetclient2.vm.pem --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem -H 'Accept: yaml' 'https://puppet:8140/production/file_metadatas/modules/filetransfer/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso checksum_type=md5lite' --- - !ruby/object:Puppet::FileServing::Metadata checksum: "{md5}d2e10420f3689faa49a004b60fb396b7" checksum_type: md5 destination: expiration: 2012-03-16 17:49:23.600743 -07:00 ftype: file group: 0 links: !ruby/sym manage mode: 420 owner: 0 path: /etc/puppetlabs/puppet/modules/filetransfer/files/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso relative_path: . stat_method: !ruby/sym lstat

              This is fixed with this patch:

              diff --git a/lib/puppet/indirector/file_server.rb b/lib/puppet/indirector/file_server.rb index 9516a40..9fbd57e 100644 --- a/lib/puppet/indirector/file_server.rb +++ b/lib/puppet/indirector/file_server.rb <at> <at> -51,6 +51,7 <at> <at> class Puppet::Indirector::FileServer < Puppet::Indirector::Terminus Puppet::FileServing::Fileset.merge(*filesets).collect do |file, base_path| inst = model.new(base_path, :relative_path => file) inst.links = request.options[:links] if request.options[:links] + inst.checksum_type = request.options[:checksum_type] if request.options[:checksum_type] inst.collect inst end

              Which does the correct thing:

              # curl -k --cert /etc/puppetlabs/puppet/ssl/certs/puppetclient2.vm.pem --key /etc/puppetlabs/puppet/ssl/private_keys/puppetclient2.vm.pem --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem -H 'Accept: yaml' 'https://puppet:8140/production/file_metadatas/modules/filetransfer/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso?checksum_type=md5lite' --- - !ruby/object:Puppet::FileServing::Metadata checksum: "{md5lite}bf619eac0cdf3f68d496ea9344137e8b" checksum_type: md5lite destination: expiration: 2012-03-16 17:51:43.033651 -07:00 ftype: file group: 0 links: !ruby/sym manage mode: 420 owner: 0 path: /etc/puppetlabs/puppet/modules/filetransfer/files/sles/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso relative_path: . stat_method: !ruby/sym lstat

              The second problem seems to be in the provider itself, it seems to me as if its still trying to do an md5 scan on the local filesystem – but I’ll have to dig deeper to find the root cause for this.

              You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

              --
              You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
              To post to this group, send email to puppet-bugs <at> googlegroups.com.
              To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
              For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

              tickets | 2 Apr 07:55 2012

              [Puppet - Bug #13533] Puppet UTF-8 and windows-1250 encoding (puppet facts)

              Issue #13533 has been updated by Jan Ziegler.

                Hi,

                Yes.. Same issue.. With this ticket I just want to show what this bug means in connection with foreman.

                Bug #13533: Puppet UTF-8 and windows-1250 encoding (puppet facts)

                • Author: Jan Ziegler
                • Status: Needs More Information
                • Priority: Normal
                • Assignee: Jan Ziegler
                • Category:
                • Target version:
                • Affected Puppet version:
                • Keywords:
                • Branch:

                Hi,

                When using German Windows on a puppet client there is a facter line:

                Mitteleuropäische Zeit

                Puppet doesn’t like this line because of the “ä”. Changing the “ä” to an “a” manually for example works.

                I’m using Foreman in connection with puppet (foreman and puppetmaster on same machine) and as a result of this problem foreman won’t display any facts about the windows client.

                Working with Linux Clients works perfectly.

                You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

                --
                You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
                To post to this group, send email to puppet-bugs <at> googlegroups.com.
                To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
                For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

                tickets | 2 Apr 12:56 2012

                [Puppet - Bug #13212] Pass array to custom define fails

                Issue #13212 has been updated by Juan José Presa Rodal.

                  My puppet version is 2.7.12 and my client ruby version 1.8.7_p249 (Ubuntu 10.04 based). Server-side is puppet 2.7.12 also and ruby 1.8.5 (Centos 5 based)

                  Bug #13212: Pass array to custom define fails

                  • Author: Juan José Presa Rodal
                  • Status: Needs More Information
                  • Priority: Normal
                  • Assignee:
                  • Category: parser
                  • Target version:
                  • Affected Puppet version:
                  • Keywords:
                  • Branch:

                  I’m trying to pass a simple array to a custom define and fails with error:

                  err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship source "Foo::Map[idbazip2.2.2.2]"

                  I think that code is very correct:

                  $foo = [{"id" => "bar", "ip" => "1.1.1.1"}, {"id" => "baz", "ip" => "2.2.2.2"}]

                  foo::map {$foo:}

                  define foo::map () { notify {$name['id']: } }

                  You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

                  --
                  You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
                  To post to this group, send email to puppet-bugs <at> googlegroups.com.
                  To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
                  For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.


                  Gmane