Bug 1451301 - Unable to change rhevm credentials after upgrade from 5.6 to 5.8
Summary: Unable to change rhevm credentials after upgrade from 5.6 to 5.8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: GA
: 5.9.0
Assignee: Juan Hernández
QA Contact: luke couzens
URL:
Whiteboard: upgrade:black
Depends On:
Blocks: 1460002
TreeView+ depends on / blocked
 
Reported: 2017-05-16 11:11 UTC by luke couzens
Modified: 2018-03-06 14:40 UTC (History)
8 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1460002 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:40:02 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screen showing problem (97.42 KB, image/png)
2017-05-16 11:11 UTC, luke couzens
no flags Details

Description luke couzens 2017-05-16 11:11:10 UTC
Created attachment 1279261 [details]
screen showing problem

Description of problem:Unable to change rhevm credentials after upgrade from 5.6 to 5.8


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


How reproducible:100%


Steps to Reproduce:
1.provision 5.6 appliance
2.add rhevm provider
3.add latest repos
4.stop evm
5.run yum update
6.run vmdb
7.run rake db:migrate
8.start evm
9.try change invalid rhevm creds

Actual results:Validation successful save button still grayed out


Expected results:Save button usable


Additional info:
Work around is to remove and re-add provider.

Comment 3 Juan Hernández 2017-05-16 12:43:13 UTC
After a few failed attempts to connect ManageIQ requires re-validation of the
authentication. That means just clicking the "Validate" button. Then the
"Save" button should be re-enabled. Please check that and close the bug if it works correctly.

Comment 4 luke couzens 2017-05-16 13:10:33 UTC
I tried validating a few times but the save button is still inactive.

Comment 5 Juan Hernández 2017-05-17 07:37:39 UTC
I am assigning to myself in order to investigate if this is specific to RHV.

Comment 6 Juan Hernández 2017-05-17 09:55:53 UTC
Luke, did you actually change any of the values of the edit dialog? If you don't change anything then the "save" button will remain disabled. I think that is by design.

Comment 7 luke couzens 2017-05-17 12:50:27 UTC
Hey Juan,

Yes I did, so this is in conjunction with the new TSL cert, after upgrade this is set to 'Yes' as default causing creds to fail. If I edit the provider switch this to 'No' I can validate but not save changes.

You can see in my original screenshot that I have disabled TSL and hit validate, but save is still disabled.

Thanks,
Luke

Comment 8 Juan Hernández 2017-05-18 12:26:43 UTC
I haven't been able to reproduce this using the latest version of the 'fine' branch. But I didn't use exactly the same steps. This is what I did:

1. Setup a fresh ManageIQ development environment using the latest 'fine' branch.

2. Add a RHV provider with TLS certificate checking disabled, and verified that it works correctly.

3. Shutdown the ManageIQ environment.

4. Update the database manually to enable TLS certificate checking:

  update endpoints set verify_ssl = 1

This is the same that happens during the upgrade from 5.6 to 5.8.

5. Started the ManageIQ environment again, and verified that the RHV provider doesn't work.

6. Edited the provider. Changed the TLS certificate checking switch from 'Yes' to 'No'. Clicked the 'Validate' button, which succeeds. The 'Save' button is enabled. Clicked it.

7. Verified that the provider works correctly now.

Luke, can you do this same check? I mean, shutdown the appliance, update the database manually, then start the appliance and try again to edit the provider. Does it work?

As this is not the exact same steps that you did, I'd like to test with the same exact versions that you used. What 5.6 and 5.8 versions did you use exactly?

Comment 9 luke couzens 2017-05-18 13:57:30 UTC
So I followed your steps on a 5.8.0.15 which does indeed work, the same can be said for a 5.7 to 5.8 upgrade too. Somehow its different when upgrading from 5.6.

The exact versions I originally used were 5.6.4.2 and 5.8.0.14 (I would think the same issue would be present in the new 5.8.0.15 too)

Thanks,
Luke

Comment 10 Juan Hernández 2017-05-18 16:15:33 UTC
The 'Save' button isn't enabled because the 'Database Name' field in the 'C & U Database' isn't populated, and it is considered mandatory. It is marked with red borders, but it isn't visible because it is in a different/hidden tab. You can type anything there, usually 'ovirt_engine_history', and then the button will be enabled.

I believe that this happens in the upgrade from 5.6 to 5.8 and not in the upgrade from 5.7 to 5.8 because in 5.7 we changed the provider so that this 'Database Name' field is populated by default, with the 'ovirt_engine_history' value, when the provider is initially added. But if you have a provider added with a previous version (5.6, for example) then this field will be empty in the database, and thus empty in the UI.

I am lowering the severity, as this will affect only users that didn't propertly configure the 'C & U Database' tab, and there is a workaround: type 'ovirt_engine_history' in the 'Database Name' field.

We have the following alternatives to address this:

1. Add a migration that writes 'ovirt_engine_history' to the database if is empty.

2. Change the UI so that this field isn't considered mandatory. 

3. Change the UI so that it shows somehow that there are missing mandatory fields in the hidden tab.

Data migrations aren't allowed in minor versions, so option 1 would have to wait till 5.8.

Option 2 is correct, and shouldn't be very difficult to implement.

Option 3 may require more work, as it is kind of infrastructure work.

At this point I think the best is option 2.

Comment 11 Oved Ourfali 2017-05-18 16:39:35 UTC
I'd vote for #2 as well. 

Thanks for the elaborate explanation.

Comment 12 Juan Hernández 2017-05-18 19:07:38 UTC
The proposed fix for this issue is the following:

  Fix oVirt metrics DB name validation
  https://github.com/ManageIQ/manageiq-ui-classic/pull/1379

It implements options 2 and 3 described in comment 10.

Comment 14 luke couzens 2017-10-11 15:05:11 UTC
Verified 5.9.0.2


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