The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #14844

upstart provider can't list services via 'puppet resource' application

Added by Chris Price almost 2 years ago. Updated about 1 year ago.

Status:ClosedStart date:06/05/2012
Priority:UrgentDue date:
Assignee:Andrew Parker% Done:

0%

Category:-
Target version:3.0.0
Affected Puppet version: Branch:
Keywords: customer

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

This ticket is going to look a lot like #14843, but it is a different issue.

I just installed puppet 3.0-rc via the apt/yum repos on a clean centos6 VM and a clean ubuntu 10.04 VM. Running this command:

puppet resource service

on the CentOS machine yields output that looks like this:

...
service { 'sshd':
  ensure => 'running',
  enable => 'true',
}
service { 'udev-post':
  ensure => 'stopped',
  enable => 'true',
}
...

However, running the same command on the Ubuntu machine yields:

Error: Could not run: no block given

Running again with —trace gives:

Error: Could not run: no block given
/usr/lib/ruby/1.8/puppet/util/execution.rb:35                                           
/usr/lib/ruby/1.8/open-uri.rb:32                                                        
/usr/lib/ruby/1.8/open-uri.rb:32                                                        
/usr/lib/ruby/1.8/puppet/util/execution.rb:34                                           
/usr/lib/ruby/1.8/puppet/provider.rb:54                                                 
/usr/lib/ruby/1.8/puppet/provider/service/upstart.rb:30                                 
/usr/lib/ruby/1.8/puppet/type.rb:892                                                    
/usr/lib/ruby/1.8/puppet/type.rb:885                                                    
/usr/lib/ruby/1.8/puppet/type.rb:885                                                    
/usr/lib/ruby/1.8/puppet/indirector/resource/ral.rb:14                                  
/usr/lib/ruby/1.8/puppet/indirector/indirection.rb:255                                  
/usr/lib/ruby/1.8/puppet/application/resource.rb:230                                    
/usr/lib/ruby/1.8/puppet/application/resource.rb:142                                    
/usr/lib/ruby/1.8/puppet/application.rb:350                                             
/usr/lib/ruby/1.8/puppet/application.rb:342                                             
/usr/lib/ruby/1.8/puppet/application.rb:436                                             
/usr/lib/ruby/1.8/puppet/application.rb:342                                             
/usr/lib/ruby/1.8/puppet/util.rb:529                                                    
/usr/lib/ruby/1.8/puppet/application.rb:342                                             
/usr/lib/ruby/1.8/puppet/util/command_line.rb:74                                        
/usr/bin/puppet:10

I suspect the problem is in the upstart provider, since that’s the major difference between the code path for this command on Cent vs. Ubuntu. I haven’t tried this command with previous versions of puppet on debian-based machines; I assume it should work, but if for some reason it’s not supported, we at least need to do a better job with the error messaging.

(The VMs used to repro this are the same ones we use for PE acceptance testing.)


Related issues

Duplicates Puppet - Bug #14843: rpm provider can't list packages via 'puppet resource' ap... Closed 06/05/2012

History

#1 Updated by Kelsey Hightower almost 2 years ago

  • Status changed from Unreviewed to Accepted
  • Priority changed from Normal to Urgent

#2 Updated by Andrew Parker almost 2 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Assignee set to Andrew Parker

https://github.com/puppetlabs/puppet/pull/856

#3 Updated by Andrew Parker almost 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

#4 Updated by Moses Mendoza over 1 year ago

  • Target version set to 3.x

#5 Updated by eric sorenson over 1 year ago

  • Target version changed from 3.x to 3.0.0

#6 Updated by Matthaus Owens over 1 year ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 3.0.0-rc4

#7 Updated by Charlie Sharpsteen about 1 year ago

  • Keywords set to customer

Also available in: Atom PDF