Actions
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.
Actions