Bug 745541

Summary: rpcbind and nfslock services should be started after network setup
Product: Red Hat Enterprise Linux 6 Reporter: Andrew Cathrow <acathrow>
Component: ovirt-nodeAssignee: Alan Pevec <apevec>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: apevec, cpelland, gouyang, iheim, jboggs, leiwang, mburns, mjenner, moli, ovirt-maint, pcormier, rbalakri, sgordon, ycui
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-2.0.2-0.11.2.gitd5468d8.el6.src.rpm Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 19:29: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:
Attachments:
Description Flags
Proposed patch jboggs: review+

Description Andrew Cathrow 2011-10-12 16:15:53 UTC
NETWORKING is set to no in /etc/sysconfig/network until networking has been configured at which point it's set to yes.
This means that the rpcbind and nfslock services are not started on bootup.

After network configuration is competed and NETWORKING is set to yes we should start these services.

Comment 1 Alan Pevec 2011-10-12 16:29:28 UTC
Here are all services checking if network is configured before starting up, we should start them all:

# grep NETWORKING /etc/rc3.d/S*
/etc/rc3.d/S10network:[ "${NETWORKING}" = "no" ] && exit 6
/etc/rc3.d/S13rpcbind:	[ "$NETWORKING" = "yes" ] || exit 6
/etc/rc3.d/S14nfslock:	[ "${NETWORKING}" = "no" ] && exit 6
/etc/rc3.d/S18rpcidmapd:	[ "${NETWORKING}" != "yes" ] && exit 6
/etc/rc3.d/S19rpcgssd:	[ "${NETWORKING}" != "yes" ] && exit 6
/etc/rc3.d/S57ntpdate:	[ "$NETWORKING" = "no" ] && exit 1
/etc/rc3.d/S58ntpd:	[ "$NETWORKING" = "no" ] && exit 1

Comment 2 Alan Pevec 2011-10-12 16:32:12 UTC
We actually do that for ntp* services already (in network.py):
            log("\nStarting Network service")
            os.system("service network start &> /dev/null")
            os.system("service ntpdate start &> /dev/null")
            os.system("service ntpd start &> /dev/null")

Comment 3 Alan Pevec 2011-10-12 16:40:32 UTC
Created attachment 527738 [details]
Proposed patch

Comment 4 Dan Kenigsberg 2011-10-12 20:36:18 UTC
*** Bug 738120 has been marked as a duplicate of this bug. ***

Comment 8 Guohua Ouyang 2011-10-13 03:10:24 UTC
Verified on 6.2-20111010.2:
1. before network setup, rpcbind & nfslock services are stopped.
2. then setup the network, rpcbind & nfslock services' are running.
3. register to rhevm and add nfs storage successfully.

so set bug status to be verified.

Comment 9 Alan Pevec 2011-10-14 13:14:25 UTC
Missed /etc/init.d/iscsid

    # if the network isn't up yet exit cleanly, NetworkManager will call us
    # again when the network is up
    [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] &&
 exit 0

Comment 10 Mike Burns 2011-10-14 13:51:12 UTC
(In reply to comment #9)
> Missed /etc/init.d/iscsid
> 
>     # if the network isn't up yet exit cleanly, NetworkManager will call us
>     # again when the network is up
>     [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ]
> &&
>  exit 0

This is not really needed.  vdsm runs iscsiadm which should start iscsi daemon as needed.

Comment 11 errata-xmlrpc 2011-12-06 19:29:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

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