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 1534215 - Could not able to update Content View
Summary: Could not able to update Content View
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On: 1522769
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-14 09:57 UTC by Nikhil Kathole
Modified: 2019-09-26 15:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of UI (112.83 KB, image/png)
2018-01-14 09:57 UTC, Nikhil Kathole
no flags Details
screenshot of UI (88.10 KB, image/png)
2018-01-22 11:09 UTC, Nikhil Kathole
no flags Details

Description Nikhil Kathole 2018-01-14 09:57:53 UTC
Created attachment 1380925 [details]
screenshot of UI

Description of problem: Trying to update content view showed error An error occurred updating the Content View: Cannot add component versions to a non-composite content view.


Version-Release number of selected component (if applicable):Satellite 6.3 snap 32


How reproducible:always


Steps to Reproduce:
1. Create a product with two repos
2. Create a content view
3. Add one repo to content view and publish it
4. Now try to add another repo to same content view

Actual results:

UI showed Error as  An error occurred updating the Content View: is invalid
 An error occurred updating the Content View: Cannot add component versions to a non-composite content view

and production.log showed

 2018-01-14 04:54:07 c3d2be62 [foreman-tasks/action] [E] Validation failed: Content view components is invalid, Cannot add component versions to a n
on-composite content view (ActiveRecord::RecordInvalid)
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/validations.rb:79:in `raise_record_invalid'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/validations.rb:43:in `save!'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:291:in `block in save!'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_statu
s'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `trans
action'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:291:in `save!'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/persistence.rb:265:in `block in update!'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_statu
s'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `trans
action'
 | /opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'



Expected results: 


Additional info: It is Regression

Comment 3 Partha Aji 2018-01-16 20:41:27 UTC
This issue is resolved by the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1522769

Comment 4 Nikhil Kathole 2018-01-22 11:08:57 UTC
VERIFIED

Version tested:
Satellite 6.3 snap 33

Successfully updated the content view.

2018-01-22 06:04:42 a856b740 [app] [I] Started PUT "/katello/api/v2/content_views/5?organization_id=1" for IP at 2018-01-22 06:04:42 -0500
2018-01-22 06:04:42 a856b740 [app] [I] Processing by Katello::Api::V2::ContentViewsController#update as JSON
2018-01-22 06:04:42 a856b740 [app] [I]   Parameters: {"content_host_count"=>0, "composite"=>false, "component_ids"=>[], "default"=>false, "force_puppet_environment"=>false, "version_count"=>2, "latest_version"=>"2.0", "repository_ids"=>[7, 35, 5], "id"=>"5", "name"=>"test_CV", "label"=>"test_CV", "description"=>nil, "organization"=>{"name"=>"Default Organization", "label"=>"Default_Organization", "id"=>1}, "created_at"=>"2018-01-22 07:18:47 UTC", "updated_at"=>"2018-01-22 07:19:54 UTC", "environments"=>[{"id"=>2, "name"=>"DEV", "label"=>"DEV", "permissions"=>{"readable"=>true}}], "repositories"=>[{"id"=>7, "name"=>"capsule7", "label"=>"capsule7", "content_type"=>"yum"}, {"id"=>35, "name"=>"repo1", "label"=>"repo1", "content_type"=>"yum"}], "puppet_modules"=>[], "versions"=>[{"id"=>5, "version"=>"1.0", "published"=>"2018-01-22 07:19:04 UTC", "environment_ids"=>[]}, {"id"=>6, "version"=>"2.0", "published"=>"2018-01-22 07:19:54 UTC", "environment_ids"=>[2]}], "components"=>[], "content_view_components"=>[], "activation_keys"=>[], "next_version"=>"3.0", "last_published"=>"2018-01-22 07:19:54 UTC", "permissions"=>{"view_content_views"=>true, "edit_content_views"=>true, "destroy_content_views"=>true, "publish_content_views"=>true, "promote_or_remove_content_views"=>true}, "organization_id"=>"1", "api_version"=>"v2", "content_view"=>{"id"=>"5", "name"=>"test_CV", "label"=>"test_CV", "description"=>nil, "default"=>false, "created_at"=>"2018-01-22 07:18:47 UTC", "updated_at"=>"2018-01-22 07:19:54 UTC", "composite"=>false, "next_version"=>"3.0", "force_puppet_environment"=>false, "repository_ids"=>[7, 35, 5], "component_ids"=>[]}}
2018-01-22 06:04:42 a856b740 [app] [I] Current user: admin (administrator)
2018-01-22 06:04:42 a856b740 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.2ms)
2018-01-22 06:04:42 a856b740 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.54/app/views/katello/api/v2/common/update.json.rabl within katello/api/v2/layouts/resource (30.4ms)
2018-01-22 06:04:42 a856b740 [app] [I] Completed 200 OK in 225ms (Views: 27.9ms | ActiveRecord: 24.2ms)
2018-01-22 06:04:43 29f7d7ef [app] [I] Started GET "/katello/api/v2/repositories?available_for=content_view&content_type=yum&content_view_id=5&full_result=true&library=true&organization_id=1&page=1&paged=true&per_page=20&search=" for IP at 2018-01-22 06:04:43 -0500
2018-01-22 06:04:43 29f7d7ef [app] [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON
2018-01-22 06:04:43 29f7d7ef [app] [I]   Parameters: {"available_for"=>"content_view", "content_type"=>"yum", "content_view_id"=>"5", "full_result"=>"true", "library"=>"true", "organization_id"=>"1", "page"=>"1", "paged"=>"true", "per_page"=>"20", "search"=>"", "api_version"=>"v2"}
2018-01-22 06:04:43 29f7d7ef [app] [I] Current user: admin (administrator)
2018-01-22 06:04:43 29f7d7ef [app] [I] Expire fragment views/tabs_and_title_records-3 (0.2ms)
2018-01-22 06:04:43 29f7d7ef [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.54/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (318.6ms)
2018-01-22 06:04:43 29f7d7ef [app] [I] Completed 200 OK in 341ms (Views: 204.7ms | ActiveRecord: 118.8ms)

Comment 5 Nikhil Kathole 2018-01-22 11:09:25 UTC
Created attachment 1384348 [details]
screenshot of UI

Comment 6 Satellite Program 2018-02-21 16:54:37 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-2018:0336


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