[Puppet Users] Re: Issue with service => disabled and stopped

2012-11-26 Thread jcbollinger


On Tuesday, November 20, 2012 6:11:17 PM UTC-6, Forrie wrote:
>
> Thanks, I went ahead and added an "exit 1" at the bottom of each of 
> these scripts to shut it up.



That's probably not quite right, but maybe it will work well enough for you.

 

>   At least, in the case of the cups- 
> config-daemon, it's been deprecated so I can just remove that check. 
> HIDD is another issue.   Most of the init.d scripts use RETVAL=$? 
> after the status) query -- so that's hooked in somewhere to the 
> functions perhaps and that it doesn't work properly with HIDD is 
> "really" a bug, per se. 
>


Yes, it is a bug in the initscript.  They both are.  You should consider 
filing a ticket with your distro.


John
 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/y7KMIQHnGmcJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Issue with service => disabled and stopped

2012-11-20 Thread Forrie
Thanks, I went ahead and added an "exit 1" at the bottom of each of
these scripts to shut it up.   At least, in the case of the cups-
config-daemon, it's been deprecated so I can just remove that check.
HIDD is another issue.   Most of the init.d scripts use RETVAL=$?
after the status) query -- so that's hooked in somewhere to the
functions perhaps and that it doesn't work properly with HIDD is
"really" a bug, per se.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Issue with service => disabled and stopped

2012-11-20 Thread jcbollinger


On Monday, November 19, 2012 6:37:28 PM UTC-6, Forrie wrote:
>
> Thanks for the explanation, I appreciate it. 
>
> These services are provided by Redhat as are the init scripts, which 
> report: 
>
>
> # /etc/init.d/cups-config-daemon status 
> cups-config-daemon is obsolete 
>
> # /etc/init.d/hidd status 
> hidd is stopped 
>
>
> I can see where the first one is unexpected to Puppet. 
>
>
What Matthaus said.  But also, I emphasize what he breezed over: it is the 
*exit 
code* of the 'service' command that Puppet considers, as I wrote earlier.  
Nothing the command sends to its output or error stream is relevant to 
Puppet's evaluation.  In the shell, you can get the exit code of the last 
foreground process run by that shell from the variable $?.  Example:

/etc/init.d/cups-config-daemon status 
echo $?


John



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/uZp2BpP3ibkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Issue with service => disabled and stopped

2012-11-19 Thread Matthaus Owens
Both of these init scripts always return 0. Puppet assumes that the
init script will return 0 as a status for a running service and
nonzero for a stopped service. Because of this, when Puppet calls
`service hidd status` to see if hidd needs to be stopped, it thinks it
does, as status returns 0.

hidd ships with a deficient init script. It makes the right calls to
start, stop, and get the status of the hidd service, but it never does
anything with the returns from those calls so it always falls through
to the bottom of the script where 0 is returned.

On Mon, Nov 19, 2012 at 4:37 PM, Forrie  wrote:
> Thanks for the explanation, I appreciate it.
>
> These services are provided by Redhat as are the init scripts, which
> report:
>
>
> # /etc/init.d/cups-config-daemon status
> cups-config-daemon is obsolete
>
> # /etc/init.d/hidd status
> hidd is stopped
>
>
> I can see where the first one is unexpected to Puppet.
>
> I am running:
>
> # puppet --version
> 2.7.19
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Matthaus Owens
Release Manager, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Issue with service => disabled and stopped

2012-11-19 Thread Forrie
Thanks for the explanation, I appreciate it.

These services are provided by Redhat as are the init scripts, which
report:


# /etc/init.d/cups-config-daemon status
cups-config-daemon is obsolete

# /etc/init.d/hidd status
hidd is stopped


I can see where the first one is unexpected to Puppet.

I am running:

# puppet --version
2.7.19

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.