Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1317771

Summary: On copy any existing CV raises error: NoMethodError: undefined method `composite?' for nil:NilClass
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, ehelms, lpramuk
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14309
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:06:33 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: 1321771    
Attachments:
Description Flags
Firebug error none

Description Sachin Ghai 2016-03-15 07:30:08 UTC
Created attachment 1136416 [details]
Firebug error

Description of problem: On copy any existing CV raises error: NoMethodError: undefined method `composite?' for nil:NilClass

2016-03-15 08:20:47 [app] [I] Started POST "/katello/api/v2/content_views/5/copy?organization_id=1" for 10.65.193.200 at 2016-03-15 08:20:47 +0100
2016-03-15 08:20:47 [app] [I] Processing by Katello::Api::V2::ContentViewsController#copy as JSON
2016-03-15 08:20:47 [app] [I]   Parameters: {"id"=>"5", "content_view"=>{"name"=>"exclusive_ostree_copy"}, "organization_id"=>"1", "api_version"=>"v2"}
2016-03-15 08:20:47 [app] [E] NoMethodError: undefined method `composite?' for nil:NilClass
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.6/app/models/katello/content_view_repository.rb:24:in `content_view_composite'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:184:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:184:in `block in simple'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `block in simple'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `block in simple'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations.rb:377:in `run_validations!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations/callbacks.rb:111:in `block in run_validations!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations/callbacks.rb:111:in `run_validations!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/validations.rb:318:in `valid?'
 


Version-Release number of selected component (if applicable):
sat 6.2 snap3

How reproducible:
always

Steps to Reproduce:
1. create a CV
2. add yum/puppet/ostree repos
3. publish promote
4. copy the CV created in step1

Actual results:
On copy any existing CV raises error: NoMethodError: undefined method `composite?' for nil:NilClass

Expected results:
copy CV should succeed.

Additional info:
Note this is the issue with Copy CV, containing any type of contents.. not just with ostree contents.

Comment 2 Lukas Pramuk 2016-03-16 15:46:51 UTC
I reported similar issue but for hammer import when dealing with CVs - https://bugzilla.redhat.com/show_bug.cgi?id=1316110

Comment 3 Ondřej Pražák 2016-03-22 08:36:04 UTC
Created redmine issue http://projects.theforeman.org/issues/14309 from this bug

Comment 4 Bryan Kearney 2016-03-22 10:07:27 UTC
Upstream bug component is WebUI

Comment 8 Sachin Ghai 2016-03-31 10:44:10 UTC
Verified with sat 6.2 snap6.

I can copy a existing CV containing puppet, rpm, ostree etc. Also I can copy existing composite_cv. Please see logs below.



2016-03-31 06:40:01 [app] [I] Started POST "/katello/api/v2/content_views/4/copy?organization_id=1" for 10.65.193.200 at 2016-03-31 06:40:01 -0400
2016-03-31 06:40:01 [app] [I] Processing by Katello::Api::V2::ContentViewsController#copy as JSON
2016-03-31 06:40:01 [app] [I]   Parameters: {"id"=>"4", "content_view"=>{"name"=>"copy_compo_cv"}, "organization_id"=>"1", "api_version"=>"v2"}
2016-03-31 06:40:01 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.12/app/views/katello/api/v2/content_views/copy.json.rabl within katello/api/v2/layouts/resource (18.1ms)
2016-03-31 06:40:01 [app] [I] Completed 200 OK in 88ms (Views: 28.6ms | ActiveRecord: 34.7ms)


2016-03-31 06:41:40 [app] [I] Started POST "/katello/api/v2/content_views/2/copy?organization_id=1" for 10.65.193.200 at 2016-03-31 06:41:40 -0400
2016-03-31 06:41:40 [app] [I] Processing by Katello::Api::V2::ContentViewsController#copy as JSON
2016-03-31 06:41:40 [app] [I]   Parameters: {"id"=>"2", "content_view"=>{"name"=>"copy_rhel_cv_ostree"}, "organization_id"=>"1", "api_version"=>"v2"}
2016-03-31 06:41:40 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.12/app/views/katello/api/v2/content_views/copy.json.rabl within katello/api/v2/layouts/resource (7.8ms)
2016-03-31 06:41:40 [app] [I] Completed 200 OK in 46ms (Views: 7.6ms | ActiveRecord: 19.8ms)

Comment 10 errata-xmlrpc 2016-07-27 09:06:33 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/RHBA-2016:1500