Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1317771 - On copy any existing CV raises error: NoMethodError: undefined method `composite?' for nil:NilClass
On copy any existing CV raises error: NoMethodError: undefined method `compos...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: Unused
Assigned To: Ondřej Pražák
Sachin Ghai
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks: 1321771
  Show dependency treegraph
 
Reported: 2016-03-15 03:30 EDT by Sachin Ghai
Modified: 2016-07-27 05:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:06:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Firebug error (100.86 KB, image/png)
2016-03-15 03:30 EDT, Sachin Ghai
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 14309 None None None 2016-04-22 12:11 EDT
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 08:24:38 EDT

  None (edit)
Description Sachin Ghai 2016-03-15 03:30:08 EDT
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 11:46:51 EDT
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 04:36:04 EDT
Created redmine issue http://projects.theforeman.org/issues/14309 from this bug
Comment 4 Bryan Kearney 2016-03-22 06:07:27 EDT
Upstream bug component is WebUI
Comment 8 Sachin Ghai 2016-03-31 06:44:10 EDT
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 05:06:33 EDT
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

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