Bug 1643106 - Scheduling an DB backup to an NFS FileDepot call causes an Exception
Summary: Scheduling an DB backup to an NFS FileDepot call causes an Exception
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.10.0
Assignee: Jerry Keselman
QA Contact: Jaroslav Henner
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-25 13:52 UTC by Jerry Keselman
Modified: 2019-12-18 14:00 UTC (History)
6 users (show)

Fixed In Version: 5.10.0.22
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-26 21:01:15 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jerry Keselman 2018-10-25 13:52:49 UTC
Description of problem:
The #merged_uri method in FileDepot was added by a previous PR but it was
missing its parameters, causing an exception when a derived class other than FileDepotSwift is invoked.  Trying to DB dump to NFS, for instance, causes this issue.  

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


How reproducible:
100%

Steps to Reproduce:
1. Schedule a DB Backup to an NFS FileDepot
2.
3.

Actual results:
Exception

Expected results:
Successful backup

Additional info:

Comment 2 Jerry Keselman 2018-10-25 13:54:36 UTC
Fix the parent FileDepot class, adding two arguments for the URI and the port.  Tests should also be added to avoid this issue in the future.

Comment 4 Jerry Keselman 2018-10-25 14:53:29 UTC
https://github.com/ManageIQ/manageiq/pull/18131 fixes this issue.  Waiting for review.

Comment 5 CFME Bot 2018-10-25 22:05:44 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/5bca88151c1f9783f28bbb64cfaeedcecaaa12c4
commit 5bca88151c1f9783f28bbb64cfaeedcecaaa12c4
Author:     Jerry Keselman <jkeselma>
AuthorDate: Thu Oct 25 09:40:37 2018 -0400
Commit:     Jerry Keselman <jkeselma>
CommitDate: Thu Oct 25 09:40:37 2018 -0400

    Fix #merged_uri parameters in FileDepot parent class

    The #merged_uri method in FileDepot was added by a previous PR but it was
    missing its parameters, causing an exception when a derived class other than FileDepotSwift
    is invoked.

    Fix the parent FileDepot class, and add tests in two derived classes -
    FileDepotNfs (which previously had no tests) and FileDepotFtp.
    It is already tested in FileDepotSwift.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1643106

 app/models/file_depot.rb | 2 +-
 spec/models/file_depot_ftp_spec.rb | 9 +-
 spec/models/file_depot_nfs_spec.rb | 14 +
 3 files changed, 23 insertions(+), 2 deletions(-)

Comment 6 CFME Bot 2018-10-26 12:15:45 UTC
New commit detected on ManageIQ/manageiq/hammer:

https://github.com/ManageIQ/manageiq/commit/5d09d80b3a12c7a093d68389f79eed1a8940b314
commit 5d09d80b3a12c7a093d68389f79eed1a8940b314
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Oct 25 18:04:03 2018 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Oct 25 18:04:03 2018 -0400

    Merge pull request #18131 from jerryk55/fix_merged_uri

    Fix Exception due to missing #merged_uri parameters in FileDepot parent class

    (cherry picked from commit 23574133410fac78ef8c7aa95e06decbac3517ee)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1643106

 app/models/file_depot.rb | 2 +-
 spec/models/file_depot_ftp_spec.rb | 13 +-
 spec/models/file_depot_nfs_spec.rb | 23 +
 3 files changed, 36 insertions(+), 2 deletions(-)

Comment 7 Jaroslav Henner 2019-02-22 15:55:32 UTC
If this is about just making the db backup to NFS (I do not know where the FileDepot is used), then I have tested it today (5.10.1.2) and it worked fine and we can move this to VERIFIED

Comment 8 Jerry Keselman 2019-02-22 16:16:07 UTC
Yes that is all.

Comment 9 Jaroslav Henner 2019-12-17 12:15:39 UTC
I am now not sure whether the exception was causing the backup to not get created. As this has high severity, I guess it was the case. I don't think we would have a high severity BZ just for some exception in the log. Therefore I think I can mark one of our tests as it is covering this bug. The test is not checking an error message but checks whether some backup file is created.


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