Foreman 1.19: PG::DuplicateAlias error on unqualified search

PG::DuplicateAlias error reported by the run distribution chart on the dashboard if a search is carried out without qualifying the field you want to search.
name ~ hostname

additionally for the same searches on the hosts page the qualified search is instant and the unqualied one takes a significant amount of time.

Expected outcome:
No crash and unqualified search times similar to previous version of foreman.

Foreman and Proxy versions:
All 1.19.0

Foreman and Proxy plugin versions:

foreman_column_view Displays an additional column in the Foreman Hosts view and/or additional entries in the Host show page Greg Sutcliffe 0.4.0
foreman_default_hostgroup Adds the option to specify a default hostgroup for new hosts created from facts/reports Greg Sutcliffe 5.0.0
foreman_memcache adds memcache support to foreman Ohad Levy 0.1.0

Other relevant data:
I have tested on a separate test installation of 1.19 with a fresh database with only 1 host in it and the same error occurs. That database went through the same upgrade process 1.16 => 1.17 => 1.18 => 1.19

database is external to the foreman nodes and no errors were reported during any of the upgrades.

Thanks for reporting this! We are tracking it in Bug #24699: Dashboard widget 'Run distribution chart' gives error 'PG::DuplicateAlias' - Foreman

1 Like

thanks @tbrisker