Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1553105 - composite_content_view_ids field of a content_view_version is always empty
Summary: composite_content_view_ids field of a content_view_version is always empty
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.3.0
Hardware: All
OS: Unspecified
high
high
Target Milestone: 6.5.0
Assignee: Andrew Kofink
QA Contact: Lai
URL:
Whiteboard:
: 1573193 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-08 10:29 UTC by Evgeni Golov
Modified: 2021-09-09 13:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:37:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25143 0 High Closed composite_content_view_ids field of a content_view_version is always empty 2020-03-16 15:24:48 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:37:15 UTC

Description Evgeni Golov 2018-03-08 10:29:16 UTC
Description of problem:

Assume the following setup:
Composite Content View "Capsule 6.3 with RHEL7 Server" with
* Content View "RHEL7"
* Content View "Tools 6.3 RHEL7"
* Content View "Capsule 6.3 RHEL7"

For some housekeeping, I'd like to remove old versions of "RHEL7" and "Capsule 6.3 RHEL7", which are not used by the CCV anymore.

To do so, I'd request all versions of said CVs (/katello/api/content_views/:content_view_id/content_view_versions) and delete all that have an empty composite_content_view_ids, assuming the version is not used by any CCV.

The field is also empty when looking at a specific version via /katello/api/content_view_versions/:content_view_version_id.

This worked fine in 6.2.z, but fails in 6.3.0, as composite_content_view_ids is always [].

hammer shows the info correctly:
# hammer content-view info --name "Capsule 6.3 with RHEL7 Server" --organization Sat6-CI
ID:                     54
Name:                   Capsule 6.3 with RHEL7 Server
Label:                  Capsule_6_3_with_RHEL7_Server
Composite:              true
Description:            
Content Host Count:     0
Organization:           Sat6-CI
Yum Repositories:       
…
Docker Repositories:    

OSTree Repositories:    

Puppet Modules:         

Lifecycle Environments: 
 1) ID:   2
    Name: Library
Versions:               
…
Components:             
 1) ID:   4365
    Name: Capsule 6.3 RHEL7 248.0
 2) ID:   4362
    Name: Tools 6.3 RHEL7 247.0
 3) ID:   4297
    Name: RHEL7 18.0

And so does the API at /katello/api/content_views/:content_view_id in the "components" field.


Version-Release number of selected component (if applicable):
satellite-6.3.0-23.0.el7sat.noarch

How reproducible:
100%


Steps to Reproduce:
1. create (and publish) a CV
2. create (and publish) a CCV that includes the CV from step 1
3. fetch /katello/api/content_views/:content_view_id/content_view_versions for the CV

Actual results:
composite_content_view_ids is empty

Expected results:
composite_content_view_ids shows that it's used in CCV


Additional info:

Comment 1 Evgeni Golov 2018-03-08 12:10:09 UTC
Scratch the "reproducible: 100%", I can't repro this when creating *new* CV/CCVs.

But I see this on the dogfood server, and I've seen other people on IRC complaining about the same behaviour.

Comment 4 Brad Buckingham 2018-05-17 21:00:44 UTC
Hi Evgeni, could this be a duplicate of bug 1522769?

It looks like that was verified on 6.3 snap 34; however, I am not sure if that was before/after the environment above.

Comment 5 Evgeni Golov 2018-05-18 08:14:02 UTC
(In reply to Brad Buckingham from comment #4)
> Hi Evgeni, could this be a duplicate of bug 1522769?
> 
> It looks like that was verified on 6.3 snap 34; however, I am not sure if
> that was before/after the environment above.

Given I face it on a 6.3.0 GA build, unlikely. Or at least, not verified ;)

However, I cannot reliably reproduce this. Some CVs have this issue, some do not.

There is also https://bugzilla.redhat.com/show_bug.cgi?id=1573193, which seems the same bug, and even has an upstream issue attached https://projects.theforeman.org/issues/23458

Comment 8 Andrew Kofink 2018-10-08 14:33:05 UTC
Created redmine issue https://projects.theforeman.org/issues/25143 from this bug

Comment 9 Andrew Kofink 2018-10-08 14:42:03 UTC
*** Bug 1573193 has been marked as a duplicate of this bug. ***

Comment 10 Satellite Program 2018-10-15 14:03:04 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25143 has been resolved.

Comment 13 Lai 2019-01-15 15:22:15 UTC
Steps to test:

1. Create a content-view and publish
2. Create a composite view and add content-view to composite view but don't publish
3. GET /katello/api/v2/content_view_versions/2
4. Look for the id
5. Publish the composite view
6. GET /katello/api/v2/content_view_versions/2

Actual Results
---------------
Step 3 GET:
{
    "version": "1.0",
    "major": 1,
    "minor": 0,
    "composite_content_view_ids": [],
    "published_in_composite_content_view_ids": [],
    "content_view_id": 3,
    "default": false,{
    "version": "1.0",
    "major": 1,
    "minor": 0,
    "composite_content_view_ids": [],
    "published_in_composite_content_view_ids": [],
    "content_view_id": 3,
    "default": false,
    "description": null,
    "package_count": 1022,
    "module_stream_count": 0,
    "srpm_count": 0,
    "file_count": 0,
    "package_group_count": 0,
    "puppet_module_count": 0,
    "docker_manifest_count": 0,
    "docker_manifest_list_count": 0,
    "docker_tag_count": 0,
    "ostree_branch_count": 0,
    "deb_count": 0,
    "id": 2,
    "name": "content-view-testing 1.0",
    "created_at": "2019-01-15 14:50:34 UTC",
    "updated_at": "2019-01-15 14:50:34 UTC",
    "content_view": {
        "id": 3,
        "name": "content-view-testing",
        "label": "content-view-testing"
    },
    "composite_content_views": [],
    "composite_content_view_versions": [],
    "published_in_composite_content_views": [],
    "environments": [
    "description": null,
    "package_count": 1022,
    "module_stream_count": 0,
    "srpm_count": 0,
    "file_count": 0,
    "package_group_count": 0,
    "puppet_module_count": 0,
    "docker_manifest_count": 0,
    "docker_manifest_list_count": 0,
    "docker_tag_count": 0,
    "ostree_branch_count": 0,
    "deb_count": 0,
    "id": 2,
    "name": "content-view-testing 1.0",
    "created_at": "2019-01-15 14:50:34 UTC",
    "updated_at": "2019-01-15 14:50:34 UTC",
    "content_view": {
        "id": 3,
        "name": "content-view-testing",
        "label": "content-view-testing"
    },
    "composite_content_views": [],
    "composite_content_view_versions": [],
    "published_in_composite_content_views": [],
    "environments": [

Step 6 GET:
{
    "version": "1.0",
    "major": 1,
    "minor": 0,
    "composite_content_view_ids": [],
    "published_in_composite_content_view_ids": [
        2
    ],
    "content_view_id": 3,
    "default": false,
    "description": null,
    "package_count": 1022,
    "module_stream_count": 0,
    "srpm_count": 0,
    "file_count": 0,
    "package_group_count": 0,
    "puppet_module_count": 0,
    "docker_manifest_count": 0,
    "docker_manifest_list_count": 0,
    "docker_tag_count": 0,
    "ostree_branch_count": 0,
    "deb_count": 0,
    "id": 2,
    "name": "content-view-testing 1.0",
    "created_at": "2019-01-15 14:50:34 UTC",
    "updated_at": "2019-01-15 14:50:34 UTC",
    "content_view": {
        "id": 3,
        "name": "content-view-testing",
        "label": "content-view-testing"
    },

In steps 6 you can see that the published_in_composite_content_view_ids has id 2 which came from step 3.  Thus verifying that the id is present once published.

Tested in 6.5.0 snap 11.

Comment 15 errata-xmlrpc 2019-05-14 12:37:00 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.

https://access.redhat.com/errata/RHSA-2019:1222


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