Issue #15029 has been updated by Steve Huff.
File 15029-upstart-initctl.patch added
The following change fixes the problem for me:
--- /usr/lib/ruby/1.8/puppet/provider/service/upstart.rb-2012-06-14
2012-06-14 11:15:35.597897082 -0400
+++ /usr/lib/ruby/1.8/puppet/provider/service/upstart.rb 2012-06-14
12:03:58.057892898 -0400
@@ -51,7 +51,7 @@
end
def upstart_version
- @@upstart_version ||= SemVer.new(initctl(" --version").match(/initctl
\(upstart (\d\.\d[\.\d]?)\)/)[1])
+ @@upstart_version ||= SemVer.new(initctl("--version").match(/initctl
\(upstart ((?:\d+\.)+\d+)\)/)[1])
end
# Where is our override script?
I believe this patch will also address the issues raised in
[#15028](http://projects.puppetlabs.com/issues/15028) and
[#15027](http://projects.puppetlabs.com/issues/15027).
----------------------------------------
Bug #15029: Upstart service provider not executing /sbin/initctl properly on
Ubuntu
https://projects.puppetlabs.com/issues/15029#change-65026
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.