Bug 1334951

Summary: Validation fails for previously saved replication subscriptions
Product: Red Hat CloudForms Management Engine Reporter: Nick Carboni <ncarboni>
Component: ReplicationAssignee: Yuri Rudman <yrudman>
Status: CLOSED CURRENTRELEASE QA Contact: Alex Newman <anewman>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: cpelland, gtanzill, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui distributed
Fixed In Version: 5.7.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1378554 (view as bug list) Environment:
Last Closed: 2017-01-11 20:12:41 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: 1378554    

Description Nick Carboni 2016-05-10 22:20:26 UTC
Description of problem:
Subscription validation fails for replication subscriptions which have been successfully saved.

Version-Release number of selected component (if applicable):
Reproduced on appliance build master-201605092000-994aa056f5

How reproducible:
Always

Steps to Reproduce:
Configure a remote region as a replication source
Configure a global region with a subscription pointing to the previously configured appliance
Refresh the Replication settings page
Attempt to validate the subscription

Actual results:
Validation failed with error: 'FATAL: password authentication failed for user "root"

Expected results:
Validation succeeds as this subscription was successfully saved and is currently replicating

Additional info:

This has to do with password handling.
The validation is done directly by the UI which doesn't have access to passwords of currently saved subscriptions. The validation will pass when the user enters the password when initially saving the subscription, but will fail once the subscription needs to be retrieved from the database.

I suggest moving the validation call out of the UI and into the PglogicalSubscription model which can then fetch the password from the database for the purposes of validation while still not saving it in the object as it does for updates.

Comment 2 Yuri Rudman 2016-08-29 12:22:51 UTC
PR: https://github.com/ManageIQ/manageiq/pull/10711

Comment 4 Alex Newman 2016-10-18 18:42:44 UTC

    Version 5.7.0.5-alpha2.20161014143521_cd366b6
    Server Name EVM
    User Name Administrator
    User Role EvmRole-super_administrator
    Browser Firefox
    Browser Version 45
    Browser OS Linux