Bug 1656838

Summary: fix_auth says it is fixing database.yml.yaml
Product: Red Hat CloudForms Management Engine Reporter: Jaroslav Henner <jhenner>
Component: ApplianceAssignee: Keenan Brock <kbrock>
Status: CLOSED ERRATA QA Contact: Jaroslav Henner <jhenner>
Severity: low Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: low    
Version: 5.9.6CC: abellott, dmetzger, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:34:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:

Description Jaroslav Henner 2018-12-06 12:44:19 UTC
Description of problem:
When executing the fix_auth.rb script, it says 
# /var/www/miq/vmdb/tools/fix_auth.rb --databaseyml --password PASS
fixing /var/www/miq/vmdb/config/database.yml.yaml

which is probably some mishap as there is
 /var/www/miq/vmdb/config/database.yml (note no .yaml suffix)

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

How reproducible:

Steps to Reproduce:

Actual results:
Incorrect message

Expected results:
Fixing ...database.yml

Additional info:

Comment 3 CFME Bot 2018-12-14 16:06:26 UTC
New commit detected on ManageIQ/manageiq/master:

commit 87c20a188a7b3184614054d689fd5ae9f9309db2
Author:     Keenan Brock <keenan@thebrocks.net>
AuthorDate: Fri Dec  7 17:01:03 2018 -0500
Commit:     Keenan Brock <keenan@thebrocks.net>
CommitDate: Fri Dec  7 17:01:03 2018 -0500

    Change fix_auth database.yml status display

    fix_auth currently states it fixes [table].[column]
    In the case of database.yml, it fixes "database.yml" "yml" contents
    fixing /var/www/miq/vmdb/config/database.yml.yaml

    This is a little confusing.

    The fix is to change the "table" name to "database"
    and the field name to "yml" so it displays the way the customers want


 tools/fix_auth/models.rb | 13 +-
 1 file changed, 8 insertions(+), 5 deletions(-)

Comment 4 Jaroslav Henner 2019-05-10 08:40:08 UTC
I reproduced this on 5.7 and then again restored the DB on 5.7 appliance and then migrated the data and then tried the fix_auth and succeed:

[root@localhost vmdb]# fix_auth --databaseyml -i config/database.yml
fixing /var/www/miq/vmdb/config/database.yml.yaml
processed 1 records
[root@localhost vmdb]# fix_auth -i invalid
fixing authentications.password, auth_key
processed 23 records
fixing miq_databases.registration_http_proxy_server, session_secret_token, csrf_secret_token
processed 1 records
fixing miq_ae_values.value
processed 147 records
fixing miq_ae_fields.default_value
processed 55 records
fixing settings_changes.value
processed 8 records
fixing miq_requests.options
processed 4 records
fixing miq_request_tasks.options
processed 4 records

Comment 6 errata-xmlrpc 2019-12-12 13:34:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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