Bug 1394854

Summary: Unable to build new host without puppet environment
Product: Red Hat Satellite Reporter: Christian Marineau <cmarinea>
Component: Hosts - ContentAssignee: Justin Sherrill <jsherril>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: medium    
Version: 6.2.3CC: ahogbin, bbuckingham, chrobert, cmarinea, inecas, jcallaha, jsherril, kdixon, ohadlevy
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 22:51:01 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:

Description Christian Marineau 2016-11-14 15:16:34 UTC
Description of problem:
When trying to create a build for a new host with a Content View that does not have a Puppet Environment, the host cannot be saved with this message: "can't be blank"

Version-Release number of selected component (if applicable):
Satellite 6.2.3

Steps to Reproduce:
1. Create and Publish a Content View that has no Puppet Module
2. Create a new host and associate the Content View
3. Try to let the Puppet Environment blank, you will get an error

Actual results:
Can't create a host build

Expected results:
As the Puppet Environment are no more created automatically if the Content View does not contain a Puppet Module, we would expect that this field can be blank at the host creation.

Additional info:
[app] [I] Failed to save: Environment can't be blank

Comment 2 Justin Sherrill 2016-12-19 21:06:48 UTC
The validator for this was changed in Satellite 6.2 to:
  validates :environment_id, :presence => true, :unless => Proc.new { |host| host.puppet_proxy_id.blank? }

Which means a puppet environment should NOT be required unless you've selected a puppet master (proxy).  Did you select one?

Comment 3 Christian Marineau 2017-01-05 19:43:46 UTC
Actually waiting from customer feedback to confirm that the bug is no more required.

Comment 4 Christian Marineau 2017-02-16 22:51:01 UTC
Regarding the actual linked case, this was simply corrected by making sure that no Puppet Ca and not Puppet Master were selected, I am closing this bug.