Bug 853914

Summary: [rhevm-setup] failure to create the local nfs share if nfsd is already started
Product: Red Hat Enterprise Virtualization Manager Reporter: Simon Grinberg <sgrinber>
Component: ovirt-engine-setupAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: acathrow, bazulay, dyasny, iheim, Rhev-m-bugs, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-03 13:06:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Simon Grinberg 2012-09-03 10:13:46 UTC
Description of problem:
The script assumes that nfs is stopped and only tries to start it. This may not be the case like in my setup where I've reused existing machine. 

The mount point created correctly
The entry was added to the /etc/exports file
Then installation failed. 

Version-Release number of selected component (if applicable):
SI16
rhevm-setup-3.1.0-14.el6ev.noarch

How reproducible:


Steps to Reproduce:
1. start the nfs service 
2. rhevm-setup 
3. Answer yes for: Configure NFS share on this server to be used as an ISO Domain? ['yes'| 'no']  [yes] : 
  
Actual results:
Installation will fail due to ISO domain creation failure. 

Expected results:
Request to stop the service if it's already running 

Additional info:
2012-09-03 12:32:33::DEBUG::common_utils::320::root:: stderr = 
2012-09-03 12:32:33::DEBUG::common_utils::321::root:: retcode = 1
2012-09-03 12:32:33::ERROR::rhevm-setup::1658::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-setup", line 1656, in _startNfsServices
    srv.start(True)
  File "/usr/share/ovirt-engine/scripts/common_utils.py", line 1006, in start
    raise Exception(output_messages.ERR_FAILED_START_SERVICE % self.name)
Exception: Error: Can't start the nfs service

2012-09-03 12:32:33::ERROR::rhevm-setup::1615::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-setup", line 1601, in _configNfsShare
    _startNfsServices()
  File "/usr/bin/rhevm-setup", line 1659, in _startNfsServices
    raise Exception(output_messages.ERR_FAILED_TO_START_NFS_SERVICE)
Exception: Failed to start the NFS services

2012-09-03 12:32:33::DEBUG::setup_sequences::62::root:: Traceback (most recent call last):
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run
    function()
  File "/usr/bin/rhevm-setup", line 1616, in _configNfsShare
    raise Exception(output_messages.ERR_FAILED_CFG_NFS_SHARE)
Exception: Failed to configure NFS share on this host

Comment 1 Itamar Heim 2012-09-03 10:38:24 UTC
wouldn't reload work and should be done if service is already up?

Comment 2 Alon Bar-Lev 2012-09-03 10:46:36 UTC
(In reply to comment #1)
> wouldn't reload work and should be done if service is already up?

Yes.

Comment 3 Alon Bar-Lev 2012-09-03 11:07:17 UTC
Regardless of it is better to use reload when service is up.

Looking at the code it is always stop before start, while ignoring stop result.

I could not reproduce this on upstream and downstream.

Simon, if it is reproducible at your machine I will be happy to investigate.

Comment 4 Simon Grinberg 2012-09-03 12:37:48 UTC
Alon, 

Unfortunately in the last couple of days, I've been spending too much time on debug or showing issues on my system. I only have two more days to prepare my work thus I can't afford more delays. 

I'll try to recreate for you in two weeks, I don't see this as urgent. 

Alternatively this may be a race (do to not waiting for the stop to succeed) so here is some more info: 

1. I did this on a VM.
2. In the exports files there was already an exported directory. This means the nfs did had something to export. This may delay the stop since it may need to verify there are no users first.