Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1693257

Summary: Setup wizard: Deployment can be started even if values are missing or incorrect
Product: [oVirt] cockpit-ovirt Reporter: Ido Rosenzwig <irosenzw>
Component: Hosted EngineAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Wang <weiwang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 0.12.6CC: bugs, cshao, eslutsky, huzhao, jikwang, nlevy, qiyuan, sbonazzo, sborella, weiwang, yaniwang, ycui, yturgema
Target Milestone: ovirt-4.3.3Flags: sbonazzo: ovirt-4.3?
sbonazzo: planning_ack?
sbonazzo: devel_ack+
weiwang: testing_ack+
Target Release: 0.12.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cockpit-ovirt-0.12.7 Doc Type: Bug Fix
Doc Text:
This fix ensures that the self-hosted engine deployment begins only if all of the prerequisite values, such as passwords and MAC address, are valid.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-16 13:58:27 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:

Description Ido Rosenzwig 2019-03-27 12:13:07 UTC
Description of problem:
Hosted-engine's wizard allowing the user to start the deployment 
even if some of the values are missing or incorrect.

For example:
1. Passwords, root and admin, and the MAC address can be left empty
2. MAC address isn't validated right - missing last character is valid 
   00:11:22:33:44:5 produces no error

In addition,
all error messages are disappearing when editing one of the fields.
for example, if we have error messages in both 'engine fqdn' and 'MAC address',
when the user edits the MAC address field both of the errors disappear instead
of just the error near the MAC address field

Also, sometimes the user can go to the next step while there are still
errors in some of the fields


How reproducible:
100%

Steps to Reproduce:
1. go to the web UI http://<host's IP>:9090
2. open the HE setup wizard
3. try the following:

3.1 engine FQDN and host FQDN fields:
1. enter an invalid FQDN - one that will not be resolved -> error should appear
2. enter a valid FQDN -> no error should appear

3.2 MAC address:
1. change the MAC address to an invalid format -> error should appear
2. clear the field -> error should appear
3. enter a valid mac address -> no error should appear

3.3 moving to the Next Step:
1. try moving to the next step when the fields MAC address, password and FQDN are empty -> errors should appear in each of them and on the top
2. try moving to the next step when one or more FQDNs aren't valid -> error should appear and on the top
3. fix all the fields with errors - once the last one is being edited by the user the top error should be disappear



Actual results:
deployment can start with missing or incorrect values

Expected results:
deployment can start only when all values where validated successfully

Additional info:

Comment 1 Wei Wang 2019-03-28 07:06:20 UTC
Test Version
rhvh-4.3.0.5-0.20190327.0
cockpit-system-176-4.el7.noarch
cockpit-ws-176-4.el7.x86_64
cockpit-bridge-176-4.el7.x86_64
cockpit-storaged-176-4.el7.noarch
cockpit-ovirt-dashboard-0.12.6-1.el7ev.noarch
cockpit-machines-ovirt-176-4.el7.noarch
cockpit-dashboard-176-4.el7.x86_64
cockpit-176-4.el7.x86_64
ovirt-hosted-engine-setup-2.3.7-1.el7ev.noarch
ovirt-hosted-engine-ha-2.3.1-1.el7ev.noarch

Test Steps:
According to comment 0

Result:
deployment can start with missing or incorrect values. But I think some of them are designed as that:

1. Passwords, root and admin, and the MAC address can be left empty
   QE can reproduce the password issue. 
   The MAC address is designed to accept random generation, so I guess if filling nothing, it will use the default value.

2. MAC address isn't validated right - missing last character is valid 
   00:11:22:33:44:5 produces no error
   QE can reproduce this issue.

In addition,
all error messages are disappearing when editing one of the fields.
for example, if we have error messages in both 'engine fqdn' and 'MAC address',
when the user edits the MAC address field both of the errors disappear instead
of just the error near the MAC address field
   Yes, this only happened as the engine vm fqdn is empty, when editing MAC address, the "Required field" error message for "engine fqdn" disappears also. It looks like strange, but if clicking next button, the "engine fqdn" error message will come back again.

Also, sometimes the user can go to the next step while there are still
errors in some of the fields
   I cannot reproduce this. Only when filling engine vm fqdn with invalid resolved fqdn. But the message is not an error message, seems like a warning message.

According to 1 and 2, QE only can reproduce password issue and MAC address missing last character issue. ACK+

Comment 2 Wei Wang 2019-04-08 02:44:05 UTC
Test Version:
RHVH-4.3-20190404.1-RHVH-x86_64-dvd1.iso
cockpit-system-176-4.el7.noarch
cockpit-ws-176-4.el7.x86_64
cockpit-bridge-176-4.el7.x86_64
cockpit-storaged-176-4.el7.noarch
cockpit-ovirt-dashboard-0.12.7-1.el7ev.noarch
cockpit-machines-ovirt-176-4.el7.noarch
cockpit-dashboard-176-4.el7.x86_64
cockpit-176-4.el7.x86_64

Test Steps:
According to comment 0

Result:
deployment can start only when all values where validated successfully

bug is fixed, move to "VERIFIED"

Comment 3 Sandro Bonazzola 2019-04-16 13:58:27 UTC
This bugzilla is included in oVirt 4.3.3 release, published on April 16th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.3 release, it has been closed with a resolution of CURRENT RELEASE.

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

Comment 4 Sandro Bonazzola 2019-06-05 09:54:47 UTC
*** Bug 1701317 has been marked as a duplicate of this bug. ***