Bug 1228239

Summary: HE deployment with exist VM, failed if used NFS storage path with trailing slash
Product: Red Hat Enterprise Virtualization Manager Reporter: Artyom <alukiano>
Component: ovirt-hosted-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED WONTFIX QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.3CC: ecohen, gklein, lsurette, pstehlik, sbonazzo, stirabos, tnisan, ylavi
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 3.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: An NFS path with trailing slash was accepted as user input while is was than failing cause it didn't exactly match with VDSM output. Consequence: deploy was failing if the NFS path was ending with a '/' Fix: Better match user input and NFS output regardless of the trailing '/'. Result: Now it works with NFS patch with and without the trailing '/'
Story Points: ---
Clone Of:
: 1234289 (view as bug list) Environment:
Last Closed: 2015-09-01 11:40:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1199907, 1234289    
Attachments:
Description Flags
setup log none

Description Artyom 2015-06-04 13:04:47 UTC
Created attachment 1034713 [details]
setup log

Description of problem:
We have possibility to continue deployment with exist vm, how described in bug https://bugzilla.redhat.com/show_bug.cgi?id=1199907, but if first time that I run deployment I specify storage type NFS and storage path with trailing slash, second deployment will be failed with traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line **FILTERED**42, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/storage/storage.py", line 942, in _misc
    self._createStorageDomain()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/storage/storage.py", line 525, in _createStorageDomain
    raise RuntimeError(status['status']['message'])
RuntimeError: Storage domain already exists

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-1.2.4-2.el7ev.noarch

How reproducible:
always

Steps to Reproduce:
1. Run first time hosted-engine --deploy with NFS storage and nfs path with trailing slash
2. Interrupt deployment after you finis setup of engine on VM
3. Try to deploy again the same vm like described in bug https://bugzilla.redhat.com/show_bug.cgi?id=1199907

Actual results:
Second deployment failed with traceback, looks like setup not find that already exist some storage under NFS path, because it have trailing slash

Expected results:
Deployment must success

Additional info:

Comment 3 Artyom 2015-09-01 11:40:54 UTC
Stop support of redeploy feature from 3.6 according to https://bugzilla.redhat.com/show_bug.cgi?id=1238709#c2