[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Melissa Stone. Released in Puppet 3.4.0-rc1 Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-100915 * Author: William Van Hevelingen * Status: Closed * Priority: Normal * Assignee: Josh Partlow * Category: * Target version: 3.4.0 * Affected Puppet version: 3.3.0 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1980 Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Melissa Stone. Released in Puppet 3.4.0-rc1 Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-100774 * Author: William Van Hevelingen * Status: Closed * Priority: Normal * Assignee: Josh Partlow * Category: * Target version: 3.4.0 * Affected Puppet version: 3.3.0 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1980 Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Melissa Stone. Released in Puppet 3.4.0-rc1 Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-100711 * Author: William Van Hevelingen * Status: Closed * Priority: Normal * Assignee: Josh Partlow * Category: * Target version: 3.4.0 * Affected Puppet version: 3.3.0 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1980 Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Melissa Stone. Released in Puppet 3.4.0-rc1 Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-100577 * Author: William Van Hevelingen * Status: Closed * Priority: Normal * Assignee: Josh Partlow * Category: * Target version: 3.4.0 * Affected Puppet version: 3.3.0 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1980 Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Melissa Stone. Released in Puppet 3.4.0-rc1 Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-100490 * Author: William Van Hevelingen * Status: Closed * Priority: Normal * Assignee: Josh Partlow * Category: * Target version: 3.4.0 * Affected Puppet version: 3.3.0 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1980 Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Andrew Parker. Branch changed from https://github.com/puppetlabs/puppet/pull/1950 to https://github.com/puppetlabs/puppet/pull/1980 Upated PR to https://github.com/puppetlabs/puppet/pull/1980. This changes it to use the validate on the type instead of trying to instrument all of the providers. Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-98633 * Author: William Van Hevelingen * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: Josh Partlow * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1980 Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by William Van Hevelingen. +1 for raising an error. I will fix my code. :) Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-98122 * Author: William Van Hevelingen * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: Josh Partlow * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1950 Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by eric sorenson. FWIW Patrick Carlisle and I scanned the forge corpus and found no other instances of 'name' being an array or an array-like variable name. (a variable ending in a plural noun) The workaround is to use the array as the resource title. It's not really a workaround; that's the supported/documented way to achieve this. I'd favor not reverting the cause of this nor doing further work to support it, but to clearly error if it happens. Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-98026 * Author: William Van Hevelingen * Status: Needs More Information * Priority: Normal * Assignee: William Van Hevelingen * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Andrew Parker. On the other hand, there is the problem that this code doesn't seem to take into account that `name` can be an array. Is it true that name can really be an array? I think that this usage was depending on an accident of the implementation, but I could be wrong. Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-97953 * Author: William Van Hevelingen * Status: Investigating * Priority: Normal * Assignee: Andrew Parker * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Andrew Parker. I think I've tracked this down. The problem is happening in the `query` method in the dpkg provider. When it executes 154 # list out our specific package 155 begin 156 self.class.dpkgquery_piped( 157 "-W", 158 "--showformat", 159 self.class::DPKG_QUERY_FORMAT_STRING, 160 @resource[:name] 161 ) do |pipe| 162 hash = self.class.parse_multi_line(pipe) 163 end 164 rescue Puppet::ExecutionFailure 165 # dpkg-query exits 1 if the package is not found. 166 return {:ensure => :purged, :status => 'missing', :name => @resource[:name], :error => 'ok'} 167 end Then the `dpkg_query_piped` works correctly, sets `hash`, and it ok. Then the control is returned to `execpipe`. `execpipe` gets an exit status that is not 0, it actually shows up as 36096. Inspection of the `Process::Status` object (which is what `$CHILD_STATUS` is) shows that it is exiting with 141. After some experimentation this seems to be because it is not reading everything from the dpkg command irb(main):027:0> open("| /usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version} :DESC: ${Description}\n:DESC:\n' nagios-plugins nagios-nrpe-server") { |p| p.gets; p.gets } => " Nagios is a host/service/network monitoring and management system.\n" irb(main):028:0> $CHILD_STATUS => # irb(main):029:0> open("| /usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version} :DESC: ${Description}\n:DESC:\n' nagios-plugins nagios-nrpe-server") { |p| while !p.eof; p .gets; end } => nil irb(main):030:0> $CHILD_STATUS => # What this tells me is that the `parse_multi_line` method needs to make sure it drains the rest of the pipe when it is done. Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-97952 * Author: William Van Hevelingen * Status: Investigating * Priority: Normal * Assignee: Andrew Parker * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Andrew Parker. Just did a bisect on this and the behavior change happened in: e96ac6b6abb9f387e9b8cd097b024aaa4bc656ee is the first bad commit commit e96ac6b6abb9f387e9b8cd097b024aaa4bc656ee Author: Josh Partlow Date: Tue Apr 30 19:02:04 2013 -0700 (#19875) Package descriptions obtained by rpm/dpkg providers Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-97949 * Author: William Van Hevelingen * Status: Investigating * Priority: Normal * Assignee: Andrew Parker * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Josh Cooper. I can reproduce on ruby 1.8.7: root@puppetmaster:~# puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=> present }" Notice: Compiled catalog for puppetmaster.solar.lan in environment production in 0.14 seconds Warning: Failed to match dpkg-query line "No packages found matching nagios-plugins.\n" Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' Notice: Finished catalog run in 48.18 seconds root@puppetmaster:~# puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=> present }" Notice: Compiled catalog for puppetmaster.solar.lan in environment production in 0.11 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' Notice: Finished catalog run in 0.40 seconds root@puppetmaster:~# puppet apply -e "package { ['nagios-plugins', 'nagios-nrpe-server']: ensure=> present }" Notice: Compiled catalog for puppetmaster.solar.lan in environment production in 0.10 seconds Notice: Finished catalog run in 0.09 seconds root@puppetmaster:~# dpkg -l | grep nagios ii nagios-nrpe-server 2.12-4 Nagios Remote Plugin Executor Server ii nagios-plugins 1.4.15-3squeeze1 Plugins for the nagios network monitoring and management system ii nagios-plugins-basic 1.4.15-3squeeze1 Plugins for the nagios network monitoring and management system ii nagios-plugins-standard 1.4.15-3squeeze1 Plugins for the nagios network monitoring and management system root@puppetmaster:~# puppet --version 3.3.0 root@puppetmaster:~# ruby --version ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-97756 * Author: William Van Hevelingen * Status: Unreviewed * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by Josh Cooper. Description updated Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-97735 * Author: William Van Hevelingen * Status: Unreviewed * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet - Bug #22557] Regression on arrays and puppet resources using the name attribute
Issue #22557 has been updated by William Van Hevelingen. I should probably mention these packages are already installed and Puppet doesn't seem to be querying dpkg correctly. Bug #22557: Regression on arrays and puppet resources using the name attribute https://projects.puppetlabs.com/issues/22557#change-97521 * Author: William Van Hevelingen * Status: Unreviewed * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: 3.3.0 * Keywords: * Branch: Upgraded to Puppet 3.3.0 and started getting these errors. Reporting broken for arrays on puppet resources using the name attribute. # puppet apply -e "package { 'nrpe': name => ['nagios-plugins', 'nagios-nrpe-server'], ensure=>present } " Notice: Compiled catalog for foo.lan in environment production in 1.72 seconds Notice: /Stage[main]//Package[nrpe]/ensure: ensure changed 'purged' to 'present' -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.