Bug 1374865

Summary: Cloud Providers authentication not re-validated after save
Product: Red Hat CloudForms Management Engine Reporter: Jerome Marc <jmarc>
Component: ProvidersAssignee: Marcel Hild <mhild>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Stefanisin <jistefan>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: cpelland, dclarizi, gblomqui, jfrey, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1382831 1382836 (view as bug list) Environment:
Last Closed: 2017-06-12 17:03:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1382831, 1382836    

Description Jerome Marc 2016-09-09 21:56:17 UTC
Description of problem:
From time to time, my Amazon or Google cloud providers disconnect. This causes the providers to fail to authenticate and set their status to 'Validation Required'. From there on, it is impossible to reconnect the providers without modifying their value (e.g. name) first, by re-validating the credentials from the edit screen and modifying their properties to be able to save the valid state. This is an issue as I would expect the providers to be able to reconnect on their own.

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

How reproducible:
Always

Steps to Reproduce:
This is hard to reproduce, AWS or Google fail from time to time (e.g. network)
1. From Compute > Clouds > Providers, try to refresh a provider with a refresh status of 'Failure'

Actual results:
Refresh does not work as 'Credentials' are not validated.

Expected results:
Credentials haven't changed and are still valid.

Additional info:
The only way to reconnect is to validate the credentials again from its edit screen and change a value in order to save it. Then Refresh and re-check authentication will work.

Comment 5 Marcel Hild 2016-09-16 15:12:14 UTC
For the UI, you can use the "Authentication -> Re-check authentication status" dropdown. 

But saving a manager should also work. See the mentioned PR

Comment 6 Marcel Hild 2016-09-20 13:16:23 UTC
In case the credential become marked invalid there is no way but through the UI to mark them valid again. This is because a refresh worker with it's credential marked invalid refuses to start. And there is no other process that I am aware of that checks credentials on a regular basis.

Comment 7 CFME Bot 2016-09-22 14:40:48 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b5021fde478b8bc1e5e89c2b8f8689a46007a842

commit b5021fde478b8bc1e5e89c2b8f8689a46007a842
Author:     Aparna Karve <akarve>
AuthorDate: Thu Sep 15 10:59:33 2016 -0700
Commit:     Aparna Karve <akarve>
CommitDate: Thu Sep 15 11:05:51 2016 -0700

    Use $setViewValue to update the auth status returned from validate
    
    This sets the form to $dirty and hence saveable if validation stat
    changes from invalid to valid
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1374865

 .../ems_common/ems_common_form_controller.js       | 32 ++++------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

Comment 10 Marcel Hild 2016-10-10 13:37:10 UTC
So, I checked by setting :authentication_check_interval: 1.minute in advanced settings and setting the credentials to become invalid by adding ec2.eu-central-1.amazonaws.com to /etc/hosts to point to localhost. The managers auth would become invalid, the refresher would stop to work. After correcting the hosts settings the schedule worker did an auth check and the refresh worker would start automatically again.

So my Comment 6 https://bugzilla.redhat.com/show_bug.cgi?id=1374865#c6 is invalid.

Changing the the issue to reflect the UI part only

Comment 12 Red Hat Bugzilla 2023-09-14 03:30:44 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days