Bug 616426

Summary: autofs initscript should implement force-reload and try-restart
Product: Red Hat Enterprise Linux 6 Reporter: Boris Ranto <branto>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: yanfu,wang <yanwang>
Severity: medium Docs Contact:
Priority: high    
Version: 6.1CC: dkovalsk, ikent
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: autofs-5.0.5-27.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:22:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 633349    

Description Boris Ranto 2010-07-20 12:42:21 UTC
Description of problem:
autofs initscript does not implement functions force-reload and try-restart.
This bug was created on behalf of bug 578128.

The specification says:
force-reload cause the configuration to be reloaded if the service supports
this, otherwise restart the service

So force-reload should be implemented as restart.

Try-restart could be implemented e.g. like condrestart.

Otherwise there are undocumented options in script (and the options don't do
what they are supposed to).

Those two options should also be added to usage function.

Version-Release number of selected component (if applicable):
5.0.5-22

How reproducible:
100 %

Steps to Reproduce:
1. service autofs try-restart
2. service autofs force-reload

Actual results:
try-restart service action not supported and returns 3.
force-reload service action not supported and returns 3.

Expected results:
Options are implemented and return appropriate values.
Options are added to usage.

Additional info:

Comment 1 Ian Kent 2011-01-28 03:55:21 UTC
(In reply to comment #0)
> Description of problem:
> autofs initscript does not implement functions force-reload and try-restart.
> This bug was created on behalf of bug 578128.
> 
> The specification says:
> force-reload cause the configuration to be reloaded if the service supports
> this, otherwise restart the service
> 
> So force-reload should be implemented as restart.
> 
> Try-restart could be implemented e.g. like condrestart.
> 
> Otherwise there are undocumented options in script (and the options don't do
> what they are supposed to).
> 
> Those two options should also be added to usage function.
> 

snip ...

> 
> Actual results:
> try-restart service action not supported and returns 3.
> force-reload service action not supported and returns 3.
> 
> Expected results:
> Options are implemented and return appropriate values.

What are those appropriate values?
Right now these options return the same values as restart and
condrestart.

Can you test the package at:
http://people.redhat.com/~ikent/autofs-5.0.5-27.el6
let me know what else I need to do to satisfy the requirements
of this bug.

Comment 2 Boris Ranto 2011-02-04 11:35:10 UTC
I've tested the package and based on my testing the package satisfies the requirements of this bug.

Comment 4 yanfu,wang 2011-02-22 07:45:13 UTC
reproduced on rhel6.0:
# uname -a
Linux x86-64-6s-m1.ss.eng.bos.redhat.com 2.6.32-71.14.1.el6.x86_64 #1 SMP Wed Jan 5 17:01:01 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
# service autofs try-restart
try-restart service action not supported
# echo $?
3
# service autofs force-reload
force-reload service action not supported
# echo $?
3
# /etc/init.d/autofs usage
Usage: /etc/init.d/autofs {start|forcestart|stop|status|restart|forcerestart|reload|condrestart}


verified on autofs-5.0.5-29.el6 on i386 and x86_64:
# uname -a
Linux intel-s3e36-01.rhts.eng.rdu.redhat.com 2.6.32-94.el6.x86_64 #1 SMP Tue Dec 28 21:55:53 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
# service autofs try-restart
Stopping automount: [  OK  ]
Starting automount: [  OK  ]
# echo $?
0
# service autofs force-reload
Loading autofs4: [  OK  ]
Starting automount: [  OK  ]
# echo $?
0
# /etc/init.d/autofs usage
Usage: /etc/init.d/autofs {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart}

Comment 5 errata-xmlrpc 2011-05-19 14:22:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0753.html