Bug 1125834

Summary: [engine-setup] "badly formed hexadecimal UUID string" error when ISO domain path contains a directory
Product: Red Hat Enterprise Virtualization Manager Reporter: Evgheni Dereveanchin <ederevea>
Component: ovirt-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.0CC: bazulay, ecohen, iheim, lbopf, pstehlik, rbalakri, Rhev-m-bugs, sbonazzo, sherold, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: vt3 Doc Type: Bug Fix
Doc Text:
Previously, when the specified storage path for an ISO domain had UUID validation exceptions (i.e. was not empty), an unclear error message was shown: [ ERROR ] Cannot access mount point /exports/iso/: badly formed hexadecimal UUID string Now, a more explanatory error is given: [ ERROR ] Cannot access mount point /exports/iso: Error: directory /exports/iso is not empty
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 18:07:03 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:
Bug Depends On:    
Bug Blocks: 1142923, 1156165    

Description Evgheni Dereveanchin 2014-08-01 08:03:35 UTC
Description of problem:
when specifying a storage path for an ISO domain, if the target has a single directory, the path is not accepted with "badly formed hexadecimal UUID string" error. At the same time, when there are files in the directory, the process will return a more meaningful "directory not empty" error. More strangely, when there are several directories in the path, the process goes on without any errors

Version-Release number of selected component (if applicable):
engine-setup-3.4.1

How reproducible:
always

Steps to Reproduce:
1. create a directory with another dir inside:
# mkdir -p /exports/iso/testdir
# chown -R vdsm:kvm /exports/iso/
2. engine-setup
3. enter the parent path when promptet:
Local ISO domain path [/var/lib/exports/iso]: /exports/iso/

Actual results:
[ ERROR ] Cannot access mount point /exports/iso/: badly formed hexadecimal UUID string

Expected results:
[ ERROR ] Cannot access mount point /exports/iso/: Error: directory /exports/iso is not empty

Additional info:

test with several directories finishes without any errors:
1. 
# mkdir -p /exports/iso/testdir1
# mkdir -p /exports/iso/testdir2
# mkdir -p /exports/iso/testdir3
# chown -R vdsm:kvm /exports/iso/
2. engine-setup
3. Local ISO domain path [/var/lib/exports/iso]: /exports/iso/
Local ISO domain ACL [0.0.0.0/0.0.0.0(rw)]: 

I believe the checks need to be made consistent: either we permit no directories in the path, or we ignore all of them which are not UUID formatted and let setup continue.

Comment 1 Evgheni Dereveanchin 2014-08-01 08:09:42 UTC
ovirt-engine-setup.log:

2014-08-01 08:08:02 DEBUG otopi.plugins.otopi.dialog.human human.queryString:153 query NFS_MOUNT_POINT
2014-08-01 08:08:02 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND                 Local ISO domain path [/var/lib/exports/iso]: 
2014-08-01 08:08:51 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:RECEIVE    /exports/iso
2014-08-01 08:08:51 DEBUG otopi.ovirt_engine_setup.domains domains.check_valid_path:90 validate '/exports/iso' as a valid mount point
2014-08-01 08:08:51 DEBUG otopi.ovirt_engine_setup.domains domains.check_base_writable:104 Attempting to write temp file to /exports/iso
2014-08-01 08:08:51 DEBUG otopi.ovirt_engine_setup.domains domains.check_available_space:122 Checking available space on /exports/iso
2014-08-01 08:08:51 DEBUG otopi.ovirt_engine_setup.domains domains.check_available_space:129 Available space on /exports/iso is 4382Mb
2014-08-01 08:08:51 ERROR otopi.plugins.ovirt_engine_setup.ovirt_engine.config.iso_domain iso_domain._customization:344 Cannot access mount point /exports/iso: badly formed hexadecimal UUID string
2014-08-01 08:08:51 DEBUG otopi.plugins.otopi.dialog.human human.queryString:153 query NFS_MOUNT_POINT
2014-08-01 08:08:51 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND                 Local ISO domain path [/var/lib/exports/iso]:

Comment 2 Evgheni Dereveanchin 2014-08-05 13:44:05 UTC
I also want to note that this issue happens when a separate partition is allocated for the ISO domain: then the lost+found service directory in the root will interfere with SD creation.

Comment 3 Simone Tiraboschi 2014-08-19 10:21:23 UTC
(In reply to Evgheni Dereveanchin from comment #2)
> I also want to note that this issue happens when a separate partition is
> allocated for the ISO domain: then the lost+found service directory in the
> root will interfere with SD creation.

For that case is enough to create an empty sub-directory inside the partition and just use that.

Comment 4 Eyal Edri 2014-09-10 20:21:28 UTC
fixed in vt3, moving to on_qa.
if you believe this bug isn't released in vt3, please report to rhev-integ

Comment 5 Petr Beňas 2014-09-11 15:46:13 UTC
in vt3 
          Local ISO domain path [/var/lib/exports/iso]: /exports/iso
[ ERROR ] Cannot access mount point /exports/iso: Error: directory /exports/iso is not empty

Comment 8 errata-xmlrpc 2015-02-11 18:07:03 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.

https://rhn.redhat.com/errata/RHSA-2015-0158.html