Project

General

Profile

Actions

Bug #17815

closed

Getting undefined method `name' for nil:NilClass when trying edit/view a host group

Added by Tomer Brisker over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1372917

Description of problem:
When trying to view or edit a host group the following error is seen in the webui:
undefined method `name' for nil:NilClass
The entire traceback can be found here: http://pastebin.test.redhat.com/40871

How reproducible:
So far, unable to reproduce.

Steps to Reproduce:
1. Attach properties to host group (puppet modules, kickstarts, etc)
2. Remove property being used in host group
3. Attempt to view/edit group

Actual results:
Removing a property being used by a host group renders the group inaccessible

Expected results:
Removing a property in use by the group should simply remove the property from the group and still be able to be edited.

Actions #1

Updated by Tomer Brisker over 7 years ago

Actual reproducer:
1. Create HG with os, arch and content view and save.
2. Edit same HG and remove the arch and os, save.
3. Reopen the HG - it crashes.

Stack trace: | NoMethodError: undefined method `name' for nil:NilClass | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/models/katello/concerns/redhat_extensions.rb:76:in `distribution_repositories' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/models/katello/concerns/redhat_extensions.rb:59:in `kickstart_repos' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/helpers/katello/hosts_and_hostgroups_helper.rb:190:in `kickstart_repository_options' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/helpers/katello/hosts_and_hostgroups_helper.rb:56:in `kickstart_repository_id' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/app/helpers/katello/hosts_and_hostgroups_helper.rb:43:in `use_install_media' | /usr/share/foreman/app/views/common/os_selection/_operatingsystem.html.erb:2:in `block in _5e049f3c8b8a59d4b5ba7658ce33472b'

Actions #2

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/Katello/katello/pull/6508 added
Actions #3

Updated by Justin Sherrill over 7 years ago

  • Category set to Hosts
  • translation missing: en.field_release set to 188
Actions #4

Updated by Anonymous over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF