Bug 1451245 - [DNS] - Validate empty DNS configuration and mark field in red
Summary: [DNS] - Validate empty DNS configuration and mark field in red
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.2.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ovirt-4.2.0
: ---
Assignee: Martin Mucha
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks: 1160667
TreeView+ depends on / blocked
 
Reported: 2017-05-16 08:26 UTC by Michael Burman
Modified: 2017-12-20 11:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:27:40 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
screenshot (174.96 KB, image/png)
2017-06-06 05:51 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 76986 0 master MERGED core: if not dns address is provided, mark checkbox as invalid 2017-05-25 10:41:32 UTC

Description Michael Burman 2017-05-16 08:26:00 UTC
Description of problem:
[DNS] - Validate empty DNS configuration and mark field in red. 

It is possible to check the 'DNS Configuration' check box with empty 'DNS Servers' filed and it's possible to press 'OK" to approve operation and we get:

Error while executing action: 

size must be between 1 and 2
Attribute: network.dnsResolverConfiguration.nameServers

2017-05-16 11:14:05,016+03 WARN  [org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand] (default task-11) [84552b7c-1239-4c86-bbad-ac77afd87327] Validation of action 'UpdateNetwork' failed for user admin@internal-authz. Reasons: VAR__TYPE__NETWORK,VAR__ACTION__UPDATE,size must be between 1 and 2,$groups [Ljava.lang.Class;@11c98c2f,$min 1,$message {javax.validation.constraints.Size.message},$payload [Ljava.lang.Class;@158fcaad,$max 2,ACTION_TYPE_FAILED_ATTRIBUTE_PATH,$path network.dnsResolverConfiguration.nameServers,$validatedValue []


Version-Release number of selected component (if applicable):
 4.2.0-0.0.master.20170514130938.gitacb8b09.el7.centos
DNS rpms on top of the master version. 

How reproducible:
100

Steps to Reproduce:
1. Check the 'DNS Configuration' checkbox, but don't fill in the name server, and press 'OK"

Actual results:
Failed with error:
Error while executing action: 

size must be between 1 and 2
Attribute: network.dnsResolverConfiguration.nameServers

Expected results:
Engine should require to fill a name server if the 'DNS Configuration' checkbox is checked and it should color the 'DNS Servers' field in red, same behaviour we have for other fields in all dialogs.

Comment 2 Michael Burman 2017-06-06 05:51:24 UTC
Hi Martin, 

I saw in the patch that you can't mark the unset field in red and you marked the checkbox as invalid(attaching screenshot of how it looks now on master). 
Can you please make the invalid checkbox mark in red color?

Comment 3 Michael Burman 2017-06-06 05:51:52 UTC
Created attachment 1285205 [details]
screenshot

Comment 4 Martin Mucha 2017-06-06 13:37:15 UTC
maybe, but I shouldn't.
We actually saw that happening with UI guy here in brno. This is how all 'invalid' checkboxes are styled. They have some css class, which is not defined.

So from point of view of this patch, it's OK and unrelated, IIUC. We should fill a bug for UI guys, to fix CSS definitions.

Comment 5 Michael Burman 2017-07-03 09:04:25 UTC
Verified on - 4.2.0-0.0.master.20170702100738.git46a9f67.el7.centos

Comment 6 Sandro Bonazzola 2017-12-20 11:27:40 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

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


Note You need to log in before you can comment on or make changes to this bug.