Issue #15029 has been updated by Steve Huff.
Removing the leading space produces the following error on my 10.04 LTS systems:
debug: Puppet::Type::Service::ProviderUpstart: Executing '/sbin/status
autofs'
debug: Puppet::Type::Service::ProviderUpstart: Executing '/sbin/initctl
--version'
err: /Stage[main]/Autofs/Service[autofs]: Could not evaluate: undefined
method `[]' for nil:NilClass
----------------------------------------
Bug #15029: Upstart service provider not executing /sbin/initctl properly on
Ubuntu
https://projects.puppetlabs.com/issues/15029#change-65024
Author: Craig Ayliffe
Status: Unreviewed
Priority: Normal
Assignee:
Category: service
Target version:
Affected Puppet version: 2.7.16
Keywords: upstart
Branch:
Using puppet version 2.7.16-1puppetlabs1 on Ubuntu 10.04.4 LTS when trying to
use the enable parameter on a Service, it gets an error running /sbin/initctl
to get the version.
If I go back to 2.7.14-1puppetlabs1 it works fine.
The error using Puppet 2.7.16-1puppetlabs1:
root@mymachine:~# puppet apply -e " service { ['autofs']:, enable => true,
}"
No LSB modules are available.
err: /Stage[main]//Service[autofs]: Could not evaluate: Execution of
'/sbin/initctl --version' returned 1: initctl: invalid command: --version
Try `initctl --help' for more information.
notice: Finished catalog run in 0.12 seconds
In the file /usr/lib/ruby/1.8/puppet/provider/service/upstart.rb it has a space
before the "--version" option - which I am assuming is passed to initctl as '
--version'
def upstart_version
@@upstart_version ||= SemVer.new(initctl(" --version").match(/initctl
\(upstart (\d\.\d[\.\d]?)\)/)[1])
end
If you run the following you get a similar error, i.e.:
root@mymachine:~# /sbin/initctl ' --version'
initctl: invalid command: --version
Try `initctl --help' for more information.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.