Issue #13489 has been updated by Josh Cooper.
Status changed from Unreviewed to Accepted
Assignee set to Josh Cooper
Target version set to 2.7.x
Keywords changed from windows
service to windows service
Thanks, yes, this is broken, both for autostart and manual services:
<pre>
node 'win-qp47voha2p4.localdomain' {
service { 'BITS':
ensure => 'running',
}
exec { 'hello':
command => "cmd /c echo hello",
path => $::path,
logoutput => true,
}
Exec['hello'] ~> Service['BITS']
}
</pre>
Output:
<pre>
debug: /Stage[main]//Node[win-qp47voha2p4.localdomain]/Exec[hello]/notify:
subscribes to Service[BITS]
...
debug: Exec[hello](provider=windows): Executing 'cmd /c echo hello'
debug: Executing 'cmd /c echo hello'
notice: /Stage[main]//Node[win-qp47voha2p4.localdomain]/Exec[hello]/returns:
hello
notice: /Stage[main]//Node[win-qp47voha2p4.localdomain]/Exec[hello]/returns:
executed successfully
debug: /Stage[main]//Node[win-qp47voha2p4.localdomain]/Exec[hello]: The
container Node[win-qp47voha2p4.localdomain] will propagate my refresh event
info: /Stage[main]//Node[win-qp47voha2p4.localdomain]/Exec[hello]: Scheduling
refresh of Service[BITS]
debug: Service[BITS](provider=windows): Service BITS is running
debug: Service[BITS](provider=windows): Service BITS is running
debug: Service[BITS](provider=windows): Service BITS start type is demand start
err: /Stage[main]//Node[win-qp47voha2p4.localdomain]/Service[BITS]: Failed to
call refresh: Cannot start BITS, error was: An instance of the service is
already running.
</pre>
----------------------------------------
Bug #13489: Service refresh on windows [version 2.7.12] triggered from
(chaining|subscribe|notify) dosn't work and gives error.
https://projects.puppetlabs.com/issues/13489#change-58855
Author: mello mollo
Status: Accepted
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.x
Affected Puppet version: 2.7.12
Keywords: windows service
Branch:
Hi, i have the following simple site.pp on the linux server [2.7.12] (to test
puppet on windows client [2.7.12]):
<pre>
node 'prova' {
service { 'NetTimeSvc':
ensure => 'running',
}
exec { 'nettime_run_reg':
command => "c:/windows/regedit.exe /s c:/prova/NetTime.reg",
}
Exec['nettime_run_reg'] ~> Service['NetTimeSvc']
}
</pre>
On windows client the following message appear when i run "puppet agent --test
--verbose":
(Note: the service "NetTimeSvc" is already running)
<pre>
notice: /Stage[main]//Node[##########]/Exec[nettime_run_reg]/returns:
executed successfully
info: /Stage[main]//Node[##########]/Exec[nettime_run_reg]: Scheduling
refresh of Service[NetTimeSvc]
err: /Stage[main]//Node[##########]/Service[NetTimeSvc]: Failed to call
refresh: Cannot start NetTimeSvc, error was: An instance of the service is
already running.
notice: Finished catalog run in 1.68 seconds
</pre>
After this the service "NetTimeSvc" is in state stopped!
If the service was already stopped before running puppet the last error line is
replaced with the following:
<pre>
notice: /Stage[main]//Node[##########]/Service[NetTimeSvc]/ensure: ensure
changed 'stopped' to 'running'
err: /Stage[main]//Node[##########]/Service[NetTimeSvc]: Failed to call
refresh: Cannot stop NetTimeSvc, error was: The requested control is not valid
for this service.
</pre>
After this the service "NetTimeSvc" is in state running!
I tried adding "hasrestart" and "hasstatus" (both with true or false value) to
the service definition, but seems that, for windows client, puppet ignore them!
I even tried to work with a service integrated in windows (as the Spooler) but
it gives me the same error messages.
Can you please confirm me if the problem does "really" exists or i am the only
one to experience it?
Bye, Mello.
--
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.