Project

General

Profile

Bug #13541

Creating a puppet content view with the same name as the autogenerated ones causes Exceptions

Added by Andreas Faust over 6 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Content Views
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Good afternoon,
when I tried to setup a complete new content view "line" ( new content view, new host group, new puppet environment, new activation keys ), I got
"undefined method `locations=' for nil:NilClass (NoMethodError)"

This happens, because Katello reuses my manually created KT_#organization)_#stage_#ContentView_#ContentViewId puppet environment,
but that Environment has not set a puppet_environment_id.

this is not checked at app/lib/katello/foreman.rb , therefore
"foreman_environment = content_view_puppet_env.puppet_environment" sets foreman_environment to Nil, which is used without further checks in foreman_environment.locations = locations

2016-02-03 13:00:47 [foreman-tasks/action] [E] undefined method `locations=' for nil:NilClass (NoMethodError) | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/katello/foreman.rb:19:in `update_puppet_environment' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/katello/foreman/content_update.rb:20:in `finalize' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/action.rb:528:in `block (2 levels) in execute_finalize' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware/stack.rb:26:in `call' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware/stack.rb:26:in `pass' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware.rb:16:in `pass' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/remote_action.rb:20:in `block in finalize' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/remote_action.rb:46:in `block (2 levels) in as_remote_user' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/katello/util/thread_session.rb:72:in `pulp_config' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/remote_action.rb:32:in `as_pulp_user' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/remote_action.rb:45:in `block in as_remote_user' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/katello/util/thread_session.rb:79:in `cp_config' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/remote_action.rb:44:in `as_remote_user' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/remote_action.rb:20:in `finalize' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware/stack.rb:22:in `call' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware/stack.rb:26:in `pass' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware.rb:16:in `pass' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/action/progress.rb:30:in `with_progress_calculation' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/action/progress.rb:22:in `finalize' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware/stack.rb:22:in `call' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware/stack.rb:26:in `pass' | /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.8.7/lib/dynflow/middleware.rb:16:in `pass' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/keep_locale.rb:15:in `block in finalize' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/keep_locale.rb:22:in `with_locale' | /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.3.1/app/lib/actions/middleware/keep_locale.rb:15:in `finalize'

History

#1 Updated by Eric Helms over 6 years ago

  • Category set to Content Views
  • Legacy Backlogs Release (now unused) set to 86

#2 Updated by Eric Helms about 6 years ago

  • Legacy Backlogs Release (now unused) changed from 86 to 144

#3 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) changed from 144 to 168

#4 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) deleted (168)

#5 Updated by Andrew Kofink almost 6 years ago

  • Status changed from New to Rejected

Closing this as it only happens in this very rare case. The error message could be improved in the future, however.

#6 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF