Bug 1229743 - New host info is cleared after disabling use of Host Foreman provider
Summary: New host info is cleared after disabling use of Host Foreman provider
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 3.6.0
Hardware: All
OS: All
medium
medium
Target Milestone: ovirt-4.0.0-alpha
: 4.0.0
Assignee: Alexander Wels
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-09 14:28 UTC by Lukas Svaty
Modified: 2016-07-05 08:04 UTC (History)
11 users (show)

Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-05 08:04:23 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
ecohen: devel_ack+
pnovotny: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 48085 0 master MERGED webadmin: new host-> Use Foreman/Satellite Never

Description Lukas Svaty 2015-06-09 14:28:31 UTC
Description of problem:
When user fills info about hostname/root password and UNCHECKs 'Use Foreman provider' checkbox in add new host tab. All the fields are cleared. 

Version-Release number of selected component (if applicable):
ovirt-engine-webadmin-portal-3.6.0-0.0.master.20150519172219.git9a2e2b3.el6.noarch


How reproducible:
100%

Steps to Reproduce:
1. In Host tab click 'New'.
2. In General Tab check 'Use Foreman provider' checkbox
3. Fill the 'Name', 'Comment', 'Root password' fields.
4. Uncheck 'Use Foreman provider' checkbox

Actual results:
'Name', 'Comment', 'Root password' fields are cleared as the whole tab is refreshed.

Expected results:
All the mentioned field should stay untouched and only the upper menu should be scrolled back up.


Additional info:
Only way it might make sense to refresh full tab is if with use of foreman provider these fields would contain values with different meaning than without. But I do not think this is the case.

Comment 1 Oved Ourfali 2015-06-10 12:07:55 UTC
This is by design.
When choosing the provider we get different fields from it.
I see no reason for someone to choose it, fill it all, and then clear it.
Doing that clears all properties.

Comment 2 Lukas Svaty 2015-06-10 12:29:05 UTC
Yes, I question the design behind this. I believe fields that does not change meaning (name/password) should not be cleared with other options.

Or if you think the values should be cleared, clear them on both
1. checking the 'Use Foreman provider' 
and 
2. unchecking the 'Use foreman provider'. 
This way it is more consistent, but I think a bit less user friendly for admins who likes to sneak around options.

Comment 3 Oved Ourfali 2015-06-10 13:33:37 UTC
Yaniv - please have a look, and share your thoughts.

Comment 4 Pavel Novotny 2015-06-10 13:42:43 UTC
I reproduced this bug and it's really not user friendly when a quick check&uncheck of Foreman Provider clears the whole dialog.
Foreman Provider has nothing to do with fields such as Name or Comment so it should not touch them at all.

Comment 5 Yaniv Bronhaim 2015-06-12 09:37:58 UTC
I don't have any strong feeling or preference about clearing this dialog - usually I don't fill the tab and then play with the provider info, and afaik no user raised it. Although I appreciate the feedback and if more agree that it shouldn't clear the name and comment fields I don't mind to change it..

Comment 6 Oved Ourfali 2015-10-14 05:40:05 UTC
Alexander - can you take a look?
Perhaps it isn't relevant after your changes?

Comment 7 Red Hat Bugzilla Rules Engine 2015-10-19 10:51:08 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 8 Alexander Wels 2015-10-19 20:22:50 UTC
So I did some research in the code and there is a piece of code that specifically clears out those fields when the selection of the foreman drop down changes [1].

I can alter the code to only clear certain fields, but IMO this is a non issue.

@Oved,
Let me know what you want me to do, if you want me to alter the code let me know which fields to keep clearing, right now its:
- name
- comment
- auth ssh port
- host
- user password
- fetched ssh finger print.

[1] https://gerrit.ovirt.org/#/c/27623/

Comment 9 Oved Ourfali 2015-10-20 04:30:07 UTC
I think that you can clear only the host, because, as far as I remember it is the only field we actually get from foreman. 
Yaniv -  am I right? Any difference between existing hosts, and discovery with regards to that?

Comment 10 Yaniv Bronhaim 2015-10-25 08:47:07 UTC
The cleaning of the host form fields are in purpose. However, seems like Lukas is right. the behavior should be as follow:
If user checks the "Use Foreman/Satellite" checkbox - first nothing happens to the fields and the user picks -discovered hosts or provisioned host. when choosing between them, host's fields will update according to the first available host and other fields will get cleaned. when removing the checkbox all fields should be cleared. 

I just checked that and we have some glitches in 3.6. for example, we don't clean the password field as Lukas says.

Maybe the behavior can be different - I don't mind to change it as I'm not familiar with the rest of the UI behavior. I just state that the Host name, address should change automatically with the picked host values (name, and domain) both for discovered and provisioned hosts.

Comment 11 Alexander Wels 2015-10-30 20:08:31 UTC
So I don't completely understand what is going now one. To me it appears that Oved is saying:

- Just clear host name

But then Yaniv is saying clear everything like it is. Can we work out exactly what we want done so I can do it?

Comment 12 Yaniv Bronhaim 2015-11-03 07:46:17 UTC
Hi Alexander, I'm also apologize for the confusion.. this form is full of information and adding the discovery concept there make it even worst.
After revisiting the issue and discuss it with Oved off-line we saw the following few issues that can be fixed in scope of this bugzilla:

1. When uncheck "Use Foreman/Satellite" only Name and Address fields will be cleared
2. When check "Use Foreman/Satellite" and switch between Discovered to Provisioned" hosts - the foreman new fields appear not aligned. If possible to make it nicer
3. "Discovered" host checkbox should be selected by default when checking "Use Foreman/Satellite"
4. The browser shows TypeError popup exception when selecting "Use Foreman/Satellite", then checking the checkbox "Discovered" then unchecking "Use Foreman/Satellite"

Comment 13 Alexander Wels 2015-11-04 16:27:38 UTC
Just posted a patch that makes all the changes requested in comment 12

Comment 14 Lukas Svaty 2016-04-08 08:15:46 UTC
Comment is password field is not cleared, however name of host is. Is there a reason behind this?

Comment 15 Oved Ourfali 2016-04-08 10:19:45 UTC
(In reply to Lukas Svaty from comment #14)
> Comment is password field is not cleared, however name of host is. Is there
> a reason behind this?

We get the name from foreman, however not the password. 
Iirc that's the reason.

Comment 16 Lukas Svaty 2016-04-08 10:22:41 UTC
Thanks, verified in 
ovirt-engine-webadmin-portal-4.0.0-0.0.master.20160310050252.git3151c66.fc23.noarch

Comment 17 Sandro Bonazzola 2016-07-05 08:04:23 UTC
oVirt 4.0.0 has been released, closing current release.


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