Bug #3603
closedActiveRecord::StatementInvalid and postgres undefinedtable when searching puppetclasses in Foreman 1.3.0
Description
Hi guys, I searched through the issues, but did not see this one already...
In Foreman 1.3.0, when searching puppetclasses in the web gui, e.g. http://foreman/puppetclasses?utf8=%E2%9C%93&search=webcerts, I get the following error:
ActiveRecord::StatementInvalid PG::UndefinedTable: ERROR: missing FROM-clause entry for table "environments" LINE 1: ...RE (("puppetclasses"."name" ILIKE '%webcerts%' OR "environme... ^ : SELECT "puppetclasses"."id" FROM "puppetclasses" WHERE (("puppetclasses"."name" ILIKE '%webcerts%' OR "environments"."name" ILIKE '%webcerts%' OR "hostgroups"."name" ILIKE '%webcerts%' OR "lookup_keys"."key" ILIKE '%webcerts%')) ORDER BY puppetclasses.name LIMIT 20 OFFSET 0 app/controllers/puppetclasses_controller.rb:17:in `index' app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' lib/middleware/catch_json_parse_errors.rb:9:in `call'
I just upgraded to Foreman 1.3.0 from 1.2.2. Here is my puppetmaster/foreman host setup:
CentOS 6.4
Puppet 3.3.1
PuppetDB 1.5.2
Postgres 9.1 databases for Foreman and puppetDB
Puppet master and Foreman are served via Apache 2.4.6 and passenger 4.0.5
Ruby 1.8.7
I upgraded the node.rb and foreman.rb scripts per http://theforeman.org/manuals/1.3/index.html#Upgradenotes. There's definitely an "environments" table that exists in the foreman postgres DB.
Let me know if you need more info.
Updated by Dominic Cleal about 11 years ago
- Translation missing: en.field_release set to 3
I'm surprised this got through RCs! Thanks for the report.
Updated by Anonymous about 11 years ago
Similarly, when ordering puppet classes by environment (/puppetclasses?order=environment+ASC&search=), I see:
SQLite3::SQLException: no such column: environments.name: SELECT "puppetclasses"."id" FROM "puppetclasses" ORDER BY "environments"."name" ASC LIMIT 20 OFFSET 0
Completed 500 Internal Server Error in 11.9ms
ActiveRecord::StatementInvalid (SQLite3::SQLException: no such column: environments.name: SELECT "puppetclasses"."id" FROM "puppetclasses" ORDER BY "environments"."name" ASC LIMIT 20 OFFSET 0):
Updated by Anonymous about 11 years ago
- Target version set to 1.10.0
- Assignee set to Anonymous
Updated by Anonymous about 11 years ago
- Status changed from Assigned to Ready For Testing
Updated by Anonymous about 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 9e08f306472c16c8c019fe7c038b5cb44bd5a28e.