Project

General

Profile

Actions

Bug #9719

closed

unable to delete ec2 compute ressources

Added by Uwe Kastens about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Compute resources - EC2
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi there,

By trying to delete ec2 compute ressource (without deployed VMs) I am getting the following error. Looks like, that there is a table missing.

PG::UndefinedColumn: ERROR: column user_compute_resources.compute_resource_id does not exist LINE 1: ..."."id" = "user_compute_resources"."user_id" WHERE "user_comp... ^ : SELECT "users".* FROM "users" INNER JOIN "user_compute_resources" ON "users"."id" = "user_compute_resources"."user_id" WHERE "user_compute_resources"."compute_resource_id" = 19 ORDER BY firstname

OS: Ubuntu 14.04.2 LTS \n \l
ii foreman-compute 1.7.3-1 all metapackage providing fog dependencies for Foreman (for Amazon EC2 support)

Actions #1

Updated by Dominic Cleal about 9 years ago

  • Status changed from New to Need more information

That's very strange, this is old code which should have been removed between 1.5 and 1.7.0.

Could you please try restarting httpd/apache2 to ensure the latest code is loaded, then trying again?

Also please run "grep user_compute_resources /usr/share/foreman/app/models/compute_resource.rb" and paste the output, if any.

Actions #2

Updated by Uwe Kastens about 9 years ago

Hi again,

I restarted apache a couple of times - is not changing.

The requested information is:

root@foreman2021404:/usr/share/foreman/db/migrate# grep user_compute_resources /usr/share/foreman/app/models/compute_resource.rb
has_and_belongs_to_many :users, :join_table => "user_compute_resources"
root@foreman2021404:/usr/share/foreman/db/migrate#

Maybe I have broken something - I will try a fresh installation

Thanks for feedback

Kind regards

Uwe

Actions #3

Updated by Dominic Cleal about 9 years ago

  • Status changed from Need more information to Resolved

Hm yes, that's definitely not correct, it looks more like 1.6 code but with a 1.7 database (hence the issue). Backing up the database and config files (see http://theforeman.org/manuals/1.7/index.html#5.5Backup,RecoveryandMigration) and reinstalling the "foreman" package, or a clean installation as you say should get the right files.

Actions #4

Updated by Uwe Kastens about 9 years ago

I was able to reproduce the issue with a fresh install. Maybe I did something wrong - so I will try it again

Actions #5

Updated by Uwe Kastens about 9 years ago

Ok. Found the issue. I tested with an old module which is replacing the compute_resource.rb
Its foreman_cloudstack.

So this ticket could be closed

Actions

Also available in: Atom PDF