Bug 1331072

Summary: RHEV Hypervisor setup TUI doesn't allow to use a local file
Product: Red Hat Enterprise Virtualization Manager Reporter: ahauser <alexis.hauser>
Component: ovirt-node-plugin-hosted-engineAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED ERRATA QA Contact: cshao <cshao>
Severity: high Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfediuck, dougsland, fdeutsch, gklein, lsurette, mgoldboi, pstehlik, sbonazzo, srevivo, ycui, ykaul
Target Milestone: ovirt-3.6.9Keywords: ZStream
Target Release: ---Flags: dougsland: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhev-hypervisor7-7.2-20160826.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 14:42:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1354597    

Description ahauser 2016-04-27 15:26:20 UTC
Description of problem:

When using the Red Hat Enterprise Configuration menu, there is no way to use a file://path-to.ova or local path to deploy the self-hosted engine. It forces the user to make an http server just for deploying the image even when you already have the image copied with scp...

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

RHEV-Hypervisor 7.2-20160413.0.el7


How reproductible:

Every time

Steps to Reproduce:
1. Go in RHEV-H configuration menu
2. navigate to Hosted engine section
3. Activate "Deploy Hosted Engine"
4. type a file:// location or /path/


Actual results:
A warning tells you it isn't a valid URL

Expected results:
It should be possible to use a local path

Additional info:

Comment 1 Fabian Deutsch 2016-04-27 18:12:25 UTC
That's actually a good catch.

Douglas, can you check if we are intentionally blocking file:// urls or if our retrieval method does not support this.

Regardless - In RHEV-H 4.0 this will be fixed, because RHEV-H will align with the functionality on RHEL-H.

Comment 2 Douglas Schilling Landgraf 2016-04-28 03:15:07 UTC
(In reply to Fabian Deutsch from comment #1)
> That's actually a good catch.
> 
> Douglas, can you check if we are intentionally blocking file:// urls or if
> our retrieval method does not support this.
> 
> Regardless - In RHEV-H 4.0 this will be fixed, because RHEV-H will align
> with the functionality on RHEL-H.

Fabian, adjusting the validators() to not allow only URL() should be enough to handle such cases as I have tested.

diff --git a/src/hosted_engine_page.py b/src/hosted_engine_page.py
index ac1da87..7aec7a5 100755
--- a/src/hosted_engine_page.py
+++ b/src/hosted_engine_page.py
@@ -84,7 +84,7 @@ class Plugin(plugins.NodePlugin):
         return self._model
 
     def validators(self):
-        return {"hosted_engine.diskpath": valid.Empty() | valid.URL()}
+        return {"hosted_engine.diskpath": valid.Empty() | valid.Text()}
 
     def ui_content(self):
         # Update the status on a page refresh

Comment 3 Yaniv Kaul 2016-07-11 10:56:05 UTC
What's the status of this bug? Certainly doesn't look like it's going to 3.6.8. Delay or close?

Comment 4 Douglas Schilling Landgraf 2016-07-11 19:42:34 UTC
(In reply to Yaniv Kaul from comment #3)
> What's the status of this bug? Certainly doesn't look like it's going to
> 3.6.8. Delay or close?

Hi Yaniv, we have the code ready. I will do a couple of tests and 3.6.9 should be fine.

Comment 5 Sandro Bonazzola 2016-07-15 05:31:25 UTC
Dropping 4.0 flags, this is a 3.6 only bug. On 4.0 the TUI doesn't exist anymore.

Comment 6 cshao 2016-09-01 10:06:36 UTC
Test version:
rhev-hypervisor7-7.2-20160829.0
ovirt-hosted-engine-setup-1.3.7.3-1.el7ev.noarch
ovirt-hosted-engine-ha-1.3.5.8-1.el7ev.noarch


Test step:
1. Go in RHEV-H configuration menu
2. navigate to Hosted engine section
3. Activate "Deploy Hosted Engine"
4. Press F2 key drop to shell, create a local folder.
5. type a file:///data/cshao/*.ova
6. Start deploy HE.

Test result:
RHEV-H setup TUI allow to use a local file now.
So the bug is fixed, change bug status to VERIFIED.

Comment 9 errata-xmlrpc 2016-09-26 14:42:48 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/RHBA-2016-1936.html