Project

General

Profile

Actions

Bug #16219

closed

Association named 'hostgroup' was not found on Nic::Base

Added by Nacho Barrientos over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Users, Roles and Permissions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi,

We're running Foreman 1.11.4 on CentOS7 as installed directly from the RPM available via yum.theforeman.org and we're running into a very odd issue when querying the list of interfaces of a host via the API:

A GET request on api/hosts/nacho1.cern.ch/interfaces leads to a server crash:

< HTTP/1.1 500 Internal Server Error
  "error": {"message":"Association named 'hostgroup' was not found on Nic::Base; perhaps you misspelled it?"}

This is even happening with a pristine database (one non-admin user, one hostgroup, one host and one role assigned to the user allowing viewing hosts in the mentioned hostgroup). Other models queried via hosts/ like parameters/ are not affected.

Find attached the full stacktrace (production.log) and the full list of Gems installed (gemlist.txt). Please let us know if a dump of the test database would be useful.

We initially hit the bug when we backported 7a86dcfe6b36dd43cd6163ce70599e53f09cc217 (fix for CVE-2016-5390) to 1.11.2.

Thanks for looking into it and any question please don't hesitate to ask :)


Files

production.log production.log 24 KB Nacho Barrientos, 08/22/2016 03:09 AM
gemlist.txt gemlist.txt 1.82 KB Nacho Barrientos, 08/22/2016 03:11 AM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #15653: CVE-2016-5390 - access to API host interfaces, parameters etc. are not restricted by view_hosts filtersClosedDaniel Lobato Garcia07/12/2016Actions
Actions

Also available in: Atom PDF