Project

General

Profile

Bug #2287

Updated by Benjamin Papillon about 11 years ago

After I've upgraded from 1.0.1 to 1.1 I can't import environments and classes. 

 

 --- Environments --- 
 
 ActiveRecord::StatementInvalid 
 
 Mysql::Error: Unknown column 'environment_classes.lookup_key_id' in 'where clause': SELECT `lookup_keys`.* FROM `lookup_keys` WHERE (`lookup_keys`.`id` IN (88,65,90,17,42,75,27,52,85,37,62,14,72,24,95,47,82,57,34,11,67,21,92,19,44,77,9,29,54,31,87,39,64,16,41,74,26,51,49,84,59,36,61,13,71,69,23,94,46,81,79,56,33,10,89,20,66,91,18,43,76,8,28,53,30,86,38,63,15,40,73,25,50,96,48,83,58,35,60,12,70,68,22,93,45,80,78,55,32) AND (environment_classes.lookup_key_id is NOT NULL)) 
 
 app/models/puppet_class_importer.rb:139:in `db_classes_name' 
 
 app/models/puppet_class_importer.rb:64:in `new_classes_for' 
 
 app/models/puppet_class_importer.rb:22:in `changes' 
 
 app/models/puppet_class_importer.rb:21:in `each' 
 
 app/models/puppet_class_importer.rb:21:in `changes' 
 
 lib/foreman/controller/environments.rb:9:in `import_environments' 
 
 lib/foreman/thread_session.rb:31:in `clear_thread' 

 

 --- Classes --- 
 
 ActiveRecord::StatementInvalid 
 
 Mysql::Error: Unknown column 'environment_classes.lookup_key_id' in 'where clause': SELECT `lookup_keys`.* FROM `lookup_keys` WHERE (`lookup_keys`.`id` IN (65,90,17,42,75,27,52,85,37,62,14,72,24,95,47,82,57,34,11,67,21,92,19,44,77,9,29,54,31,87,39,64,16,41,74,26,51,49,84,59,36,61,13,71,69,23,94,46,81,79,56,33,10,89,20,66,91,18,43,76,8,28,53,30,86,38,63,15,40,73,25,50,96,48,83,58,35,60,12,70,68,22,93,45,80,78,55,32) AND (environment_classes.lookup_key_id is NOT NULL)) 
 
 app/models/puppet_class_importer.rb:139:in `db_classes_name' 
 
 app/models/puppet_class_importer.rb:64:in `new_classes_for' 
 
 app/models/puppet_class_importer.rb:22:in `changes' 
 
 app/models/puppet_class_importer.rb:21:in `each' 
 
 app/models/puppet_class_importer.rb:21:in `changes' 
 
 lib/foreman/controller/environments.rb:9:in `import_environments' 
 
 lib/foreman/thread_session.rb:31:in `clear_thread' 

 

 It is the same if I try from console: 
 
 [root@its-puppet-t01 foreman]# RAILS_ENV=production rake puppet:import:puppet_classes 
 
 Evaluating possible changes to your installation 
 
 Problems were detected during the evaluation phase 

 

 Mysql::Error: Unknown column 'environment_classes.lookup_key_id' in 'where clause': SELECT `lookup_keys`.* FROM `lookup_keys` WHERE (`lookup_keys`.`id` IN (89,77,29,54,31,91,39,64,16,41,86,74,26,51,49,59,36,61,13,96,83,71,69,23,46,79,56,33,10,93,80,20,66,18,8,43,88,76,28,53,30,90,38,63,15,40,85,73,25,50,48,58,35,60,12,95,82,70,68,22,45,78,55,32,92,65,17,42,87,75,27,52,37,62,14,84,72,24,47,57,34,11,94,81,67,21,19,9,44) AND (environment_classes.lookup_key_id is NOT NULL)) 

 

 Please fix these issues and try again 
 
 [root@its-puppet-t01 foreman]# RAILS_ENV=production rake puppet:import:puppet_classes --trace 
 
 ** Invoke puppet:import:puppet_classes (first_time) 
 
 ** Invoke environment (first_time) 
 
 ** Execute environment 
 
 ** Execute puppet:import:puppet_classes 
 
 Evaluating possible changes to your installation 
 
 Problems were detected during the evaluation phase 

 

 Mysql::Error: Unknown column 'environment_classes.lookup_key_id' in 'where clause': SELECT `lookup_keys`.* FROM `lookup_keys` WHERE (`lookup_keys`.`id` IN (67,92,19,44,21,77,29,54,31,87,64,16,41,39,74,49,26,51,84,61,13,59,36,71,69,94,46,23,81,79,10,56,9,33,89,66,91,18,43,20,76,28,53,30,86,63,15,40,38,73,96,48,25,50,83,60,12,58,35,70,68,93,45,22,80,78,55,8,32,88,65,90,17,42,75,27,52,85,62,14,37,72,95,47,24,82,11,57,34) AND (environment_classes.lookup_key_id is NOT NULL)) 

 

 Please fix these issues and try again 
 

Back