Bug 1513520 - [RFE][M-5] Support AWS S3 for CFME Backups
Summary: [RFE][M-5] Support AWS S3 for CFME Backups
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: MVP
: 5.10.0
Assignee: Nick LaMuro
QA Contact: Matouš Mojžíš
Depends On:
Blocks: 1555371 1591594
TreeView+ depends on / blocked
Reported: 2017-11-15 14:59 UTC by Ron
Modified: 2019-02-07 23:00 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-02-07 23:00:39 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
ldixon: needinfo-

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 None None None 2019-02-07 23:00:46 UTC

Description Ron 2017-11-15 14:59:05 UTC
Description of problem:
Provide admin the ability to set an S3/Swift endpoint as a valid backup destination for the CFME database.

Version-Release number of selected component (if applicable):
Running on CloudForms 4.5 at this time.
CFME Version:

How reproducible:
Currently only CIFS/NFS are supported as backup destinations.

Steps to Reproduce:
1. Setup CFME Backup to NFS Storage

Actual results:
No S3/Swift endpoint feasible.

Expected results:
Ideally add in the ability to set a URI, user, and key to push backups directly into a bucket.

Additional info:
RHN Case: 01974285

Comment 2 Dave Johnson 2017-11-15 15:02:51 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 3 Lynn Dixon 2017-11-15 15:07:12 UTC
This is a feature request that was opened by a customer, who has also opened a Support case (linked above) for this RFE as well.  I have linked the RHN Case to this BZ.

I have set the priority and severity to mimic the priority as specified in the support case.

Comment 7 Jerry Keselman 2018-07-26 15:34:19 UTC
PRs being worked for this include
https://github.com/ManageIQ/manageiq-gems-pending/pull/357 (S3 Backup)
https://github.com/ManageIQ/manageiq-ui-classic/pull/4300 (S3 UI Changes)
https://github.com/ManageIQ/manageiq/pull/17689 (WIP but changing that today)
https://github.com/ManageIQ/manageiq-schema/pull/227 (added region to file_depot)
https://github.com/ManageIQ/manageiq-gems-pending/pull/355 (S3 Restore)

Still working on / testing manageiq-appliance_console changes for a separate PR,
and will need to do Swift changes as well still although those should be *incredibly* similar to work done already and should be very fast.

Comment 8 CFME Bot 2018-07-31 16:12:38 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:

commit 65ee18925b687af0289f9d3f588b4b05184577ce
Author:     Jerry Keselman <jkeselma@redhat.com>
AuthorDate: Tue Jun 26 10:18:02 2018 -0400
Commit:     Jerry Keselman <jkeselma@redhat.com>
CommitDate: Tue Jun 26 10:18:02 2018 -0400

    Support S3 for DB Backups

    Initial commit to support DB backups to S3.
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1513520

 lib/gems/pending/util/mount/miq_generic_mount_session.rb | 9 +-
 lib/gems/pending/util/mount/miq_s3_session.rb | 66 +
 2 files changed, 74 insertions(+), 1 deletion(-)

Comment 10 Jerry Keselman 2018-08-02 16:50:26 UTC
https://github.com/ManageIQ/manageiq/pull/17791 has been merged as well.  

https://github.com/ManageIQ/manageiq-ui-classic/pull/4300 is still being reviewed.

Another PR against manageiq-appliance_console still to be added.

Comment 11 Jerry Keselman 2018-08-02 16:50:27 UTC
https://github.com/ManageIQ/manageiq/pull/17791 has been merged as well.  

https://github.com/ManageIQ/manageiq-ui-classic/pull/4300 is still being reviewed.

Another PR against manageiq-appliance_console still to be added.

Comment 12 Jerry Keselman 2018-08-06 14:57:28 UTC
An addition PR - https://github.com/ManageIQ/manageiq/pull/17803 is required to save the AWS region in the DB.

Comment 13 Jerry Keselman 2018-08-09 20:56:23 UTC

Are the last two PRs to be added for the S3 portion of this RFE.

https://github.com/ManageIQ/manageiq/pull/17803 has been merged.
https://github.com/ManageIQ/manageiq-ui-classic/pull/4300 has been reviewed and we are waiting for signoff from second UI developer for merge approval.

Other than any changes to the above PRs pending review development is complete for the S3 portion of this RFE and the Openstack Swift portion can now commence.

Comment 14 Jerry Keselman 2018-08-13 15:56:42 UTC
All PRs above required for DB Backups and Restores via AWS S3 are merged.

Comment 15 Jerry Keselman 2018-08-13 17:20:23 UTC
I am going to split this RFE in two - this BZ will track the AWS S3 changes already completed, and the new one will track the Openstack Swift changes.  The new RFE BZ for Swift is https://bugzilla.redhat.com/show_bug.cgi?id=1615488.  Moving this current BZ to POST.

Comment 17 Jerry Keselman 2018-09-26 19:14:09 UTC
Moving back to POST as appliance_console changes are released.

Comment 21 Jerry Keselman 2018-10-29 15:22:57 UTC
Nick is currently working to fix the restore issue across all filesystem / object store types.  Reassigning this to him until it is fixed.

Comment 23 Satoe Imaishi 2018-11-05 22:55:37 UTC
partial fix: https://github.com/ManageIQ/manageiq/pull/18144

Comment 24 CFME Bot 2018-11-05 23:01:13 UTC
New commit detected on ManageIQ/manageiq/hammer:

commit 92dd1890250e22e705503601ae2f5397faf3b842
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Mon Nov  5 17:25:17 2018 -0500
Commit:     Nick Carboni <ncarboni@redhat.com>
CommitDate: Mon Nov  5 17:25:17 2018 -0500

    Merge pull request #18144 from NickLaMuro/fix_miq_file_storage_send_args_for_download

    Fix send_args for EvmDatabaseOps.restore

    (cherry picked from commit 1775555cfe823ffd5c3c3c50137761c43cf49827)


 lib/evm_database_ops.rb | 7 +
 spec/lib/evm_database_ops_spec.rb | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

Comment 27 Matouš Mojžíš 2018-12-12 14:05:07 UTC

I tested it and when evmserverd is stopped it works properly, but it doesn't work when it's running.
Should it be able to restore database while evmserverd is running?

Comment 28 Jan Krocil 2019-01-02 11:29:07 UTC
I don't believe we have a document specifically for DB restore procedure but it is expected for the evmeserverd service to be stopped. We don't support DB restore while the service is running.

(removing needinfo)

Comment 29 Matouš Mojžíš 2019-01-02 12:14:39 UTC

so there should be text indicating that evmserverd must be turned off before applying restore.
Or it should check whether evmserverd is running?

I know this is minor issue so I can create another RFE BZ for that.

Comment 30 Jan Krocil 2019-01-02 15:15:06 UTC
Yes, an RFE for a message makes sense here, Matous. Definitely open it and let's see; worst-case scenario - it gets closed during triage.

Comment 31 Matouš Mojžíš 2019-01-02 16:38:59 UTC
Verified in Both backup and restore are working and also created separate BZ restoring backup while evmserverd is running: https://bugzilla.redhat.com/show_bug.cgi?id=1662991

Comment 32 errata-xmlrpc 2019-02-07 23:00:39 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.


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