Bug 1532286

Summary: Service Catalog Item custom images does not replicate to global region
Product: Red Hat CloudForms Management Engine Reporter: Brandt Woolf <bwoolf>
Component: ReplicationAssignee: Brandon Dunne <bdunne>
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, gtanzill, ldixon, obarenbo
Target Milestone: GAKeywords: TestOnly
Target Release: 5.10.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1536046 (view as bug list) Environment:
Last Closed: 2018-06-21 20:30:43 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: 1536046    
Attachments:
Description Flags
image of the broken link icon in the global region none

Description Brandt Woolf 2018-01-08 15:13:39 UTC
Created attachment 1378564 [details]
image of the broken link icon in the global region

Description of problem:
When a custom image is added to a Service Catalog Item in a local region, the image does not replicate to the global region. The catalog item in the global region recognizes that there is a custom image used but displays a broken link icon. (see attachment)

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


How reproducible: 
This occurs when a custom image is added to a catalog item in any local region. 

Steps to Reproduce:
1. Create a Service Catalog Item in a local region
2. Add a custom image to the catalog item in the local region
3. Wait for catalog item to replicate to global region

Actual results:
The custom image does not replicate to the global region, instead it is recognized that a custom image is used but does not have a copy of the image

Expected results:
The custom image upload in the local region is replicated to the global region and displayed.

Comment 2 Lynn Dixon 2018-01-09 20:17:09 UTC
Linking support case to this BZ.

Comment 3 Gregg Tanzillo 2018-01-10 15:31:05 UTC
Looking at the default exclude tables for replication - the "pictures" table is not excluded. However, the contents of pictures are stored in binary_blobs and binary_blob_parts and those tables are excluded.

The tables binary_blobs and binary_blob_parts can be removed from the exclude list. However, there is a lot of other binary data stored in those tables not related to images making those tables potentially large. For instance all report results are also stored there. So removing those tables from the exclude list will potentially add a lot more data to the global DB as well as add overhead to replication but should address the issue.

Comment 6 CFME Bot 2018-01-17 21:31:12 UTC
New commit detected on ManageIQ/manageiq-schema/master:
https://github.com/ManageIQ/manageiq-schema/commit/84cd462d5141a922a9b25e2bd7d0dfa40727527c

commit 84cd462d5141a922a9b25e2bd7d0dfa40727527c
Author:     Brandon Dunne <brandondunne>
AuthorDate: Tue Jan 16 15:32:20 2018 -0500
Commit:     Brandon Dunne <brandondunne>
CommitDate: Tue Jan 16 15:32:20 2018 -0500

    Migrate Picture content from BinaryBlobs to Pictures table
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1532286

 ...180111162442_move_pictures_blobs_to_pictures.rb |  52 ++++++++++
 ...1162442_move_pictures_blobs_to_pictures_spec.rb | 106 +++++++++++++++++++++
 2 files changed, 158 insertions(+)
 create mode 100644 db/migrate/20180111162442_move_pictures_blobs_to_pictures.rb
 create mode 100644 spec/migrations/20180111162442_move_pictures_blobs_to_pictures_spec.rb

Comment 7 CFME Bot 2018-01-17 21:56:41 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5bcd0d1316f50280a05b1880f3223cd97675c021

commit 5bcd0d1316f50280a05b1880f3223cd97675c021
Author:     Brandon Dunne <brandondunne>
AuthorDate: Thu Jan 11 16:54:17 2018 -0500
Commit:     Brandon Dunne <brandondunne>
CommitDate: Thu Jan 11 16:54:17 2018 -0500

    Picture content is moving to the pictures table.
    
    - No longer need the binary_blob logic here
    - No longer need to test logic for #extension setting
    
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1532286

 app/models/picture.rb       | 25 +++----------------------
 spec/factories/picture.rb   |  4 +---
 spec/models/picture_spec.rb | 31 -------------------------------
 3 files changed, 4 insertions(+), 56 deletions(-)

Comment 9 CFME Bot 2018-01-18 17:25:34 UTC
New commit detected on ManageIQ/manageiq-schema/master:
https://github.com/ManageIQ/manageiq-schema/commit/0200462b240ed4051490fb038bfb70b495ba0371

commit 0200462b240ed4051490fb038bfb70b495ba0371
Author:     Brandon Dunne <brandondunne>
AuthorDate: Thu Jan 18 11:57:15 2018 -0500
Commit:     Brandon Dunne <brandondunne>
CommitDate: Thu Jan 18 11:57:15 2018 -0500

    Delete the dangling blob when there is a blob without a picture
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1532286

 ...180111162442_move_pictures_blobs_to_pictures.rb |  2 +-
 ...1162442_move_pictures_blobs_to_pictures_spec.rb | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

Comment 10 CFME Bot 2018-01-18 21:45:40 UTC
New commit detected on ManageIQ/manageiq-schema/master:
https://github.com/ManageIQ/manageiq-schema/commit/447c8a4df99c36ef851dff4de861a259d1831616

commit 447c8a4df99c36ef851dff4de861a259d1831616
Author:     Brandon Dunne <brandondunne>
AuthorDate: Thu Jan 18 16:10:26 2018 -0500
Commit:     Brandon Dunne <brandondunne>
CommitDate: Thu Jan 18 16:10:26 2018 -0500

    Handle cases where a Picture with that id doesn't exist
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1532286

 ...180111162442_move_pictures_blobs_to_pictures.rb |  2 +-
 ...1162442_move_pictures_blobs_to_pictures_spec.rb | 26 +++++++++++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)