Bug 1522769
Summary: | [V2] Regression in content view API | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Lukas Zapletal <lzap> |
Component: | API - Content | Assignee: | Partha Aji <paji> |
Status: | CLOSED ERRATA | QA Contact: | Renzo Nuccitelli <rnuccite> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3.0 | CC: | bbuckingham, brubisch, dlezzoum, ehelms, jturel, peter.vreman, rnuccite |
Target Milestone: | Unspecified | Keywords: | Regression, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | tfm-rubygem-katello-3.4.5.47-1,tfm-rubygem-katello-3.4.5.53-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-02-21 16:54:17 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: | 1122832, 1533259, 1534215 |
Description
Lukas Zapletal
2017-12-06 12:19:42 UTC
The component_ids field missing is definitely a bug and I am not sure why that's happening given that it's in the code (see https://git.io/vbcEu). It looks like repository_ids captures repos that are directly associated with a content view whereas the 'repositories' field will either display repositories associated with a content view OR repos associated with a composite view's components (see https://git.io/vbcEC). I am not sure how to resolve this discrepancy. Created redmine issue http://projects.theforeman.org/issues/22180 from this bug I've run some tests on Satellite 6.3 snap 32. First for a simple CV: { "content_host_count": 0, "composite": false, "component_ids": [ 2 ], "default": false, "force_puppet_environment": false, "version_count": 1, "latest_version": "1.0", "repository_ids": [ 1 ], "id": 2, "name": "simple-cv", "label": "simple-cv", "description": null, "organization": { "name": "Default Organization", "label": "Default_Organization", "id": 1 }, "created_at": "2018-01-16 12:27:15 UTC", "updated_at": "2018-01-16 12:27:31 UTC", "environments": [ { "id": 1, "name": "Library", "label": "Library", "permissions": { "readable": true } } ], "repositories": [ { "id": 1, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4", "content_type": "yum" } ],, "puppet_modules": [ ], "versions": [ { "id": 2, "version": "1.0", "published": "2018-01-16 12:27:31 UTC", "environment_ids": [ 1 ] } ], "components": [ ], It has the correct repository_ids (1). component_ids has id 2 but the components itself is empty which seems a mismatch. I have also tried a composite CV: { "content_host_count": 0, "composite": true, "component_ids": [ 3 ], "default": false, "force_puppet_environment": false, "version_count": 1, "latest_version": "1.0", "repository_ids": [ 2 ], "id": 3, "name": "cv-composite", "label": "cv-composite", "description": null, "organization": { "name": "Default Organization", "label": "Default_Organization", "id": 1 }, "created_at": "2018-01-16 12:28:15 UTC", "updated_at": "2018-01-16 12:28:36 UTC", "environments": [ { "id": 1, "name": "Library", "label": "Library", "permissions": { "readable": true } } ], "repositories": [ { "id": 2, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4", "content_type": "yum" } ], "puppet_modules": [ ], "versions": [ { "id": 3, "version": "1.0", "published": "2018-01-16 12:28:36 UTC", "environment_ids": [ 1 ] } ], "components": [ { "id": 2, "name": "simple-cv 1.0", "content_view_id": 2, "version": "1.0", "puppet_module_count": 0, "environments": [ { "id": 1, "name": "Library", "label": "Library" } ], "content_view": { "id": 2, "name": "simple-cv", "label": "simple-cv", "description": null, "next_version": 2, "latest_version": "1.0" }, "repositories": [ { "id": 2, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4" } ] } ], "content_view_components": [ { "latest": true, "id": 1, "created_at": "2018-01-16 12:28:22 UTC", "updated_at": "2018-01-16 12:28:22 UTC", "composite_content_view": { "id": 3, "name": "cv-composite", "label": "cv-composite", "description": null, "next_version": 2, "latest_version": "1.0", "version_count": 1 }, "content_view": { "id": 2, "name": "simple-cv", "label": "simple-cv", "description": null, "next_version": 2, "latest_version": "1.0", "version_count": 1 }, "content_view_version": { "id": 2, "name": "simple-cv 1.0", "content_view_id": 2, "version": "1.0", "puppet_module_count": 0, "content_view": { "id": 2, "name": "simple-cv", "label": "simple-cv", "description": null }, "environments": [ { "id": 1, "name": "Library", "label": "Library" } ], "repositories": [ { "id": 2, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4" } ] } } ], Again the repository_ids has the matching id on repositories (2). Yet again component_id has a mismatching value (3) compared to components fields (2). So I ask: what should be expected on component_ids for in both examples: *** Bug 1534468 has been marked as a duplicate of this bug. *** Connecting redmine issue http://projects.theforeman.org/issues/22288 from this bug Connecting redmine issue http://projects.theforeman.org/issues/22288 from this bug Connecting redmine issue http://projects.theforeman.org/issues/22288 from this bug Test performed on satellite 6.3 snap 34. both repository_ids and component_ids are fine on simple CV: { "content_host_count": 0, "composite": false, "component_ids": [ ], "default": false, "force_puppet_environment": false, "version_count": 1, "latest_version": "1.0", "repository_ids": [ 1 ], "id": 2, "name": "cv-simple", "label": "cv-simple", "description": null, "organization": { "name": "Default Organization", "label": "Default_Organization", "id": 1 }, "created_at": "2018-01-25 16:02:08 UTC", "updated_at": "2018-01-25 16:02:22 UTC", "environments": [ { "id": 1, "name": "Library", "label": "Library", "permissions": { "readable": true } } ], "repositories": [ { "id": 1, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4", "content_type": "yum" } ], "puppet_modules": [ ], "versions": [ { "id": 2, "version": "1.0", "published": "2018-01-25 16:02:22 UTC", "environment_ids": [ 1 ] } ], "components": [ ], "content_view_components": [ ], "activation_keys": [ ], "next_version": "2.0", "last_published": "2018-01-25 16:02:22 UTC", "permissions": { "view_content_views": true, "edit_content_views": true, "destroy_content_views": true, "publish_content_views": true, "promote_or_remove_content_views": true } } And they are also consistent for composite CV: { "content_host_count": 0, "composite": true, "component_ids": [ 2 ], "default": false, "force_puppet_environment": false, "version_count": 1, "latest_version": "1.0", "repository_ids": [ 2 ], "id": 3, "name": "cv-composite", "label": "cv-composite", "description": null, "organization": { "name": "Default Organization", "label": "Default_Organization", "id": 1 }, "created_at": "2018-01-25 16:03:09 UTC", "updated_at": "2018-01-25 16:03:27 UTC", "environments": [ { "id": 1, "name": "Library", "label": "Library", "permissions": { "readable": true } } ], "repositories": [ { "id": 2, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4", "content_type": "yum" } ], "puppet_modules": [ ], "versions": [ { "id": 3, "version": "1.0", "published": "2018-01-25 16:03:27 UTC", "environment_ids": [ 1 ] } ], "components": [ { "id": 2, "name": "cv-simple 1.0", "content_view_id": 2, "version": "1.0", "puppet_module_count": 0, "environments": [ { "id": 1, "name": "Library", "label": "Library" } ], "content_view": { "id": 2, "name": "cv-simple", "label": "cv-simple", "description": null, "next_version": 2, "latest_version": "1.0" }, "repositories": [ { "id": 2, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4" } ] } ], "content_view_components": [ { "latest": true, "id": 1, "created_at": "2018-01-25 16:03:19 UTC", "updated_at": "2018-01-25 16:03:19 UTC", "composite_content_view": { "id": 3, "name": "cv-composite", "label": "cv-composite", "description": null, "next_version": 2, "latest_version": "1.0", "version_count": 1 }, "content_view": { "id": 2, "name": "cv-simple", "label": "cv-simple", "description": null, "next_version": 2, "latest_version": "1.0", "version_count": 1 }, "content_view_version": { "id": 2, "name": "cv-simple 1.0", "content_view_id": 2, "version": "1.0", "puppet_module_count": 0, "content_view": { "id": 2, "name": "cv-simple", "label": "cv-simple", "description": null }, "environments": [ { "id": 1, "name": "Library", "label": "Library" } ], "repositories": [ { "id": 2, "name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4", "label": "Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_4" } ] } } ], "activation_keys": [ ], "next_version": "2.0", "last_published": "2018-01-25 16:03:27 UTC", "permissions": { "view_content_views": true, "edit_content_views": true, "destroy_content_views": true, "publish_content_views": true, "promote_or_remove_content_views": true } } Thus I'm moving this BZ to VERIFIED. 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-2018:0336
|