Issue #3113 has been updated by Martin Englund.

Try this fix:
http://github.com/pmenglund/puppet/commit/5f25a5cd4bb742cc626f995b158fb1e2cf193750:
<pre>diff --git a/lib/puppet/provider/service/smf.rb 
b/lib/puppet/provider/service/smf.rb
index 0071a8c..e7510d3 100755
--- a/lib/puppet/provider/service/smf.rb
+++ b/lib/puppet/provider/service/smf.rb
@@ -70,7 +70,10 @@ Puppet::Type.type(:service).provide :smf, :parent => :base do
         end
 
         begin
-            state = svcs("-H", "-o", "state", @resource[:name]).chomp
+            # get the current state and the next state, and if the next
+            # state is set (i.e. not "-") use it for state comparison
+            states = svcs("-H", "-o", "state,nstate", @resource[:name]).chomp
+            state = states[1] == "-" ? states[0] : states[1]
         rescue Puppet::ExecutionFailure
             info "Could not get status on service %s" % self.name
             return :stopped</pre>
----------------------------------------
Bug #3113: When importing a manifest puppet needs to chill
http://projects.reductivelabs.com/issues/3113

Author: Martin Englund
Status: Investigating
Priority: Normal
Assigned to: 
Category: Solaris
Target version: 
Affected version: 0.25.3
Keywords: service
Branch: 


When puppet imports a manifest to create a service it needs to wait a while 
before proceeding, as it will often see the state as "offline*" due to the 
service is being started when it checks.

This generates an unnecessary error message:
<pre>err: //ssh::ops/Service[sshd-pubkey]: Failed to call refresh on 
Service[sshd-pubkey]: Unmanageable state 'offline*' on service 
svc:/ops/ssh:default</pre>


-- 
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://reductivelabs.com/redmine/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.

Reply via email to