Bug 968093 - Join to the fact_values table when a user fact-filter is applied
Join to the fact_values table when a user fact-filter is applied
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Corey Welton
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 22:12 EDT by Sam Kottler
Modified: 2014-06-18 04:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-18 14:53:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Kottler 2013-05-28 22:12:26 EDT
Description of problem:
Seen on Sat.Lab.TLV

Tried to provision a discovered host as non-admin user with a fact filter ( virtual == 'rhev' ). Got this stacktrace:

ActiveRecord::StatementInvalid
Mysql2::Error: Unknown column 'fact_values.host_id' in 'where clause': SELECT `hosts`.* FROM `hosts` WHERE (((hosts.owner_id in (NULL) AND hosts.owner_type = 'Usergroup') OR (hosts.owner_id = 64 AND hosts.owner_type = 'User')) or (hosts.domain_id in (6)) or (hosts.compute_resource_id in (16)) or ((hosts.id = fact_values.host_id and fact_values.fact_name_id = 438 and fact_values.value = 'rhev')) or (hosts.organization_id in (1,8)) or (hosts.location_id in (3,10)) )
app/models/host/managed.rb:520:in `enforce_permissions'
app/models/authorization.rb:12:in `enforce_edit_permissions'
lib/foreman/sti.rb:26:in `save'
app/models/taxonomy.rb:48:in `no_taxonomy_scope'
app/models/taxonomy.rb:55:in `as_taxonomy'
lib/foreman/thread_session.rb:140:in `as_location'
app/models/taxonomy.rb:54:in `as_taxonomy'
lib/foreman/thread_session.rb:105:in `as_org'
app/models/taxonomy.rb:53:in `as_taxonomy'
app/models/taxonomy.rb:47:in `no_taxonomy_scope'
lib/foreman/thread_session.rb:31:in `clear_thread'


Additional info:
Fixed upstream in 62be7fe7a1da7513c31395787691d48c5a332706.
Comment 1 Og Maciel 2013-05-28 22:21:23 EDT
Not sure if this is a MDP1 deliverable...
Comment 2 Sam Kottler 2013-05-29 15:16:41 EDT
This is a bug that was found in the MDP1 codebase and is now fixed upstream. I believe that targets it for MDP1?
Comment 3 Mike McCune 2013-05-29 18:36:56 EDT
mass-triage since these are all POST/MODIFIED
Comment 5 Dominic Cleal 2013-09-18 14:53:46 EDT
Shipped in MDP1.

Note You need to log in before you can comment on or make changes to this bug.