Bug 1321971

Summary: 422 Unprocessable Entity in production.log
Product: Red Hat Satellite Reporter: Thom Carlin <tcarlin>
Component: ProvisioningAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.7CC: apagac, bthurber, inecas, mhulan
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-02 18:57:49 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1212602    
Attachments:
Description Flags
output from hypervisor
none
output from engine none

Description Thom Carlin 2016-03-29 13:37:29 UTC
Description of problem:

"422 Unprocessable Entity" seen in production.log

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

TP3 RC2

How reproducible:

Uncertain

Steps to Reproduce:
1. Install QCI ISO
2. Log in to run launch-fusor-installer
3. Deploy RHEV

Actual results:

Error in log

Expected results:

No error

Additional info:

Production log attached.  Excerpt below

Comment 2 Thom Carlin 2016-03-29 13:40:09 UTC
Excerpt:
2016-03-29 07:50:00 [I] Processing by Api::V2::HostsController#facts as JSON
2016-03-29 07:50:00 [I]   Parameters: {"facts"=>"[FILTERED]", "name"=>"<hostname>", "certname"=>"<hostname>", "apiv"=>"v2", :host=>{"name"=>"<hostname>", "certname"=>"<hostname>"}}
2016-03-29 07:50:00 [I] Completed 422 Unprocessable Entity in 31ms (Views: 15.5ms | ActiveRecord: 2.6ms)
2016-03-29 07:50:00 [I] Processing by HostsController#externalNodes as YML

Comment 3 Thom Carlin 2016-03-29 13:57:16 UTC
per QCI devs, switching Product/Component

Comment 4 Ivan Necas 2016-06-29 06:55:07 UTC
*** Bug 1349940 has been marked as a duplicate of this bug. ***

Comment 5 Ivan Necas 2016-06-29 06:56:46 UTC
Would it be possible to get output of `facter -j` from the host that causes the 422 log entry/

Comment 6 Antonin Pagac 2016-06-29 10:53:55 UTC
I already deleted original deployment I had in bug 1349940, so I did another deployment of rhev. The 422 appeared around engine and also hypervisor, so I ran facter on both of them, see attached files.

Comment 7 Antonin Pagac 2016-06-29 10:54:35 UTC
Created attachment 1173769 [details]
output from hypervisor

Comment 8 Antonin Pagac 2016-06-29 10:54:56 UTC
Created attachment 1173770 [details]
output from engine

Comment 9 Ivan Necas 2016-06-29 15:13:52 UTC
This seems like an expected thing to happen. The reason is https://github.com/theforeman/foreman/blob/1.11.3/app/models/host/base.rb#L135, which prevents the facts are imported when in build mode. I'm not sure what's the reasoning for this. It should however import the facts properly after the host reboot.

I'm opening the issue upstream, as it also prevents the subscription facts to be imported, which is a bit odd. But still, it should not affect the core functionality.

Comment 10 Ivan Necas 2016-06-29 15:14:22 UTC
Created redmine issue http://projects.theforeman.org/issues/15546 from this bug

Comment 11 Bryan Kearney 2016-06-30 12:13:21 UTC
Upstream bug component is Provisioning

Comment 12 Bryan Kearney 2016-07-26 19:00:52 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 15 Bryan Kearney 2016-08-10 19:15:45 UTC
Upstream bug component is Other

Comment 16 Bryan Kearney 2016-08-10 20:02:12 UTC
Upstream bug component is Provisioning

Comment 17 Marek Hulan 2017-08-02 18:57:49 UTC
Thanks for the report, this is expected behavior. The reason is that during build, the system which is being provisioned is running some installer environment. Incoming facts have impact on associations of interface, operating system etc. We should only receive facts from the provisioned system.

I'm closing this as a not a bug, please reopen if I misunderstood the request.