Project

General

Profile

Actions

Bug #37278

open

Host creation fails if only Content Source is selected

Added by Bernhard Suttner about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Hosts
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Personally, I think the following is a UI issue and should be solved there.

Scenario:
- Hostgroup with Content Source, Content View, Lifecycle Environment exists
- Click at Create Host and select the Hostgroup
- Uncheck Content View. (Same issue happens if you Unselect Lifecycle Environment)
- Provision the host

=> The subscription-manager_setup tries to get the "@host.content_source" variable (see https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/snippet/subscription_manager_setup.erb#L94)

Unfortunately, the content_source is nil. The content_facet is nil, too. I tried to figure out why this happens and saw, that the content_facet.rb initialize method is not called in case of a missing CV or LC-ENV. The reason for this is this method: https://github.com/Katello/katello/blob/master/app/models/katello/concerns/content_facet_host_extensions.rb#L63

I tried to change this code and actually, it was able to initialize the content_facet.... but it crashed on another area of the code. So, this is maybe not the way to go.

As said, I think, this is a UI glitch. If you have a look at the "Change Content Source" page, its only possible to change the content source together with CV and together with lifecycle environment. All parameters need to be set. I think, this behavior should be used on the Create Host page, too. Why should it behave different? What is the reason to set "just" the half or the third of the necessary parameters.

Actions #1

Updated by Samir Jha about 2 months ago

  • Category set to Hosts
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF