Project

General

Profile

Actions

Bug #3075

closed

1.2.2 creates generic error host not found on adding new host

Added by Jon Shanks over 10 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

If i go to currently add a new host, but i don't complete all the necessary fields for the sub categories, i get a

Host Not Found
Please try and update your request

As oppose an error about the fields that are required for completion. It also creates 3 duplated table rows at the top of the screen
Any context | dashboard | hosts | reports | facts | audits | statistics | trends | | more |
Any context | dashboard | hosts | reports | facts | audits | statistics | trends | | more |
Any context | dashboard | hosts | reports | facts | audits | statistics | trends | | more |

like that i have also uploaded the image


Files

error_foreman_1.2.2.jpg View error_foreman_1.2.2.jpg 52.6 KB Jon Shanks, 09/12/2013 10:57 AM
Actions #1

Updated by Dominic Cleal over 10 years ago

Could you provide the log please from the request so we can see which parameters were present, and which were absent?

Actions #2

Updated by Jon Shanks over 10 years ago

This is in relation to an upgrade from 1.1 to 1.2.2 using postgresql.

--- From the production.log --------
Failed to save: Operatingsystem can't be blank, Mac can't be blank, Mac is invalid, Ip is invalid, Ptable cant be
blank unless a custom partition has been defined

The error is generated first but not displayed

Rendered puppetclasses/_class_parameters.html.erb (24.9ms)
Rendered puppetclasses/_classes_parameters.html.erb (32.4ms)
CommonParameter Load (0.9ms) SELECT "parameters".* FROM "parameters" WHERE "parameters"."type" IN ('CommonParameter')
DomainParameter Load (0.8ms) SELECT "parameters".* FROM "parameters" WHERE "parameters"."type" IN ('DomainParameter') AND "parameters"."reference_id" = 1
Hostgroup Load (1.9ms) SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" IN (4, 1, 5) AND (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )
GroupParameter Load (0.9ms) SELECT "parameters".* FROM "parameters" WHERE "parameters"."type" IN ('GroupParameter') AND "parameters"."reference_id" IN (1, 5)
Setting current location thread-local variable to none
Setting current organization thread-local variable to none
Rendered hosts/_form.html.erb (175.0ms)
Rendered hosts/new.html.erb within layouts/application (176.2ms)
not found: Couldn't find all Hostgroups with IDs (4, 1, 5) [WHERE (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )] (found 2 results, but was looking for 3)
Rendered common/404.html.erb within layouts/application (0.8ms)
Completed 404 Not Found in 371ms (Views: 5.8ms | ActiveRecord: 44.3ms)
Actions #3

Updated by Jon Shanks over 10 years ago

Started POST "/hosts" for 10.189.0.167 at 2013-09-12 12:27:44 +0100
Processing by HostsController#create as /*
Parameters: {"utf8"=>"✓", "authenticity_token"=>"CmafUHypFf3DTGc+siXV7tvEBijkE2jIV4Guka3+4p4=", "host"=>{"name"=>"THISISARANDOMTEST", "organization_id"=>"3", "location_id"=>"1", "compute_resource_id"=>"", "hostgroup_id"=>"5", "environment_id"=>"1", "puppet_ca_proxy_id"=>"9", "puppet_proxy_id"=>"2", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "mac"=>"", "domain_id"=>"", "ip"=>"", "interfaces_attributes"=>{"new_interfaces"=>{"_destroy"=>"false", "type"=>"Nic::Managed", "mac"=>"", "name"=>"", "domain_id"=>"", "ip"=>"", "provider"=>"IPMI"}}, "architecture_id"=>"", "provision_method"=>"build", "build"=>"1", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}}
User Load (1.2ms) SELECT "users".
FROM "users" WHERE "users"."id" = $1 LIMIT 1 "id", 2
Setting current user thread-local variable to jshanks
(0.8ms) SELECT COUNT() FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization')
Setting current organization thread-local variable to none
(0.7ms) SELECT COUNT(
) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location')
Setting current location thread-local variable to none
(0.7ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') LIMIT 1
(0.7ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') LIMIT 1
(1.4ms) BEGIN
Hostgroup Load (1.1ms) SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" = 5 AND (1=1) LIMIT 1
Environment Load (0.8ms) SELECT "environments".* FROM "environments" WHERE "environments"."id" = 1 ORDER BY environments.name LIMIT 1
SmartProxy Load (0.8ms) SELECT "smart_proxies".* FROM "smart_proxies" WHERE "smart_proxies"."id" = 2 ORDER BY smart_proxies.name LIMIT 1
SmartProxy Load (0.8ms) SELECT "smart_proxies".* FROM "smart_proxies" WHERE "smart_proxies"."id" = 9 ORDER BY smart_proxies.name LIMIT 1
Architecture Load (0.7ms) SELECT "architectures".* FROM "architectures" WHERE "architectures"."id" = 1 LIMIT 1
Host::Base Exists (0.8ms) SELECT 1 AS one FROM "hosts" WHERE "hosts"."name" = 'THISISARANDOMTEST.' LIMIT 1
Host::Managed Exists (0.7ms) SELECT 1 AS one FROM "hosts" WHERE "hosts"."ip" IS NULL LIMIT 1
Host::Managed Exists (0.7ms) SELECT 1 AS one FROM "hosts" WHERE "hosts"."mac" IS NULL LIMIT 1
Hostgroup Load (1.0ms) SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" IN (4, 1) AND (1=1) ORDER BY (case when hostgroups.ancestry is null then 0 else 1 end), hostgroups.ancestry
Puppetclass Load (1.0ms) SELECT DISTINCT puppetclasses.id,puppetclasses.name FROM "puppetclasses" INNER JOIN "host_classes" ON "puppetclasses"."id" = "host_classes"."puppetclass_id" WHERE "host_classes"."host_id" IS NULL ORDER BY puppetclasses.name
(0.8ms) ROLLBACK
Organization Load (0.9ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = 3 LIMIT 1
Location Load (0.8ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') AND "taxonomies"."id" = 1 LIMIT 1
Failed to save: Name must be lowercase, Operatingsystem can't be blank, Domain can't be blank, Mac can't be blank, Mac is invalid, Ip is invalid, Ptable cant be blank unless a custom partition has been defined
Rendered hosts/_progress.erb (0.1ms)
Setting current organization thread-local variable to NYX EURONEXT
Setting current location thread-local variable to EU_Basildon
(2.8ms) SELECT COUNT() FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) )
Organization Load (0.8ms) SELECT "taxonomies".
FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') ORDER BY type, name
Location Load (1.0ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') ORDER BY type, name
ComputeResource Load (1.5ms) SELECT "compute_resources".* FROM "compute_resources" WHERE (compute_resources.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'ComputeResource' AND taxonomy_id in (1) ) ) AND (compute_resources.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'ComputeResource' AND taxonomy_id in (3) ) ) ORDER BY type, name
(2.0ms) SELECT COUNT() FROM "hostgroups" INNER JOIN "user_hostgroups" ON "hostgroups"."id" = "user_hostgroups"."hostgroup_id" WHERE "user_hostgroups"."user_id" = 2 AND (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )
Hostgroup Load (1.7ms) SELECT "hostgroups".
FROM "hostgroups" WHERE (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )
Environment Load (1.6ms) SELECT "environments".* FROM "environments" WHERE (environments.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Environment' AND taxonomy_id in (1) ) ) AND (environments.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Environment' AND taxonomy_id in (3) ) ) ORDER BY environments.name
(2.5ms) SELECT COUNT() FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet CA' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) )
SmartProxy Load (2.5ms) SELECT "smart_proxies".
FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet CA' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) ) ORDER BY smart_proxies.name
CACHE (0.0ms) SELECT COUNT() FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) )
SmartProxy Load (2.6ms) SELECT "smart_proxies".
FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) ) ORDER BY smart_proxies.name
Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
Puppetclass Load (1.2ms) SELECT "puppetclasses".* FROM "puppetclasses" INNER JOIN "hostgroup_classes" ON "hostgroup_classes"."puppetclass_id" = "puppetclasses"."id" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hostgroup_classes"."hostgroup_id" WHERE "hostgroups"."id" IN (4, 1, 5) ORDER BY puppetclasses.name
CACHE (0.0ms) SELECT "puppetclasses".* FROM "puppetclasses" INNER JOIN "hostgroup_classes" ON "hostgroup_classes"."puppetclass_id" = "puppetclasses"."id" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hostgroup_classes"."hostgroup_id" WHERE "hostgroups"."id" IN (4, 1, 5) ORDER BY puppetclasses.name
Puppetclass Load (1.4ms) SELECT DISTINCT "puppetclasses".* FROM "puppetclasses" INNER JOIN "environment_classes" ON "puppetclasses"."id" = "environment_classes"."puppetclass_id" WHERE "environment_classes"."environment_id" = 1 ORDER BY puppetclasses.name
Rendered puppetclasses/_classes.html.erb (11.4ms)
Rendered puppetclasses/_class_selection.html.erb (20.1ms)
Domain Load (2.0ms) SELECT "domains".* FROM "domains" INNER JOIN "user_domains" ON "domains"."id" = "user_domains"."domain_id" WHERE "user_domains"."user_id" = 2 AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
Domain Load (1.5ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
Rendered common/_domain.html.erb (1.9ms)
CACHE (0.0ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
CACHE (0.0ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
CACHE (0.0ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
Rendered hosts/_interfaces.html.erb (115.8ms)
Architecture Load (0.9ms) SELECT "architectures".* FROM "architectures"
Operatingsystem Load (1.1ms) SELECT "operatingsystems".* FROM "operatingsystems" INNER JOIN "architectures_operatingsystems" ON "operatingsystems"."id" = "architectures_operatingsystems"."operatingsystem_id" WHERE "architectures_operatingsystems"."architecture_id" = 1 ORDER BY operatingsystems.name
Rendered common/os_selection/_architecture.html.erb (5.9ms)
Rendered common/os_selection/_operatingsystem.html.erb (3.5ms)
Rendered hosts/_operating_system.html.erb (19.4ms)
Rendered hosts/_unattended.html.erb (150.3ms)
CACHE (0.0ms) SELECT "puppetclasses".* FROM "puppetclasses" INNER JOIN "hostgroup_classes" ON "hostgroup_classes"."puppetclass_id" = "puppetclasses"."id" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hostgroup_classes"."hostgroup_id" WHERE "hostgroups"."id" IN (4, 1, 5) ORDER BY puppetclasses.name
(0.9ms) SELECT COUNT() AS count_all, puppetclass_id AS puppetclass_id FROM "lookup_keys" WHERE "lookup_keys"."puppetclass_id" IN (3, 10) GROUP BY puppetclass_id
(1.1ms) SELECT COUNT(
) AS count_all, environment_classes.puppetclass_id AS environment_classes_puppetclass_id FROM "lookup_keys" INNER JOIN "environment_classes" ON "environment_classes"."lookup_key_id" = "lookup_keys"."id" WHERE "environment_classes"."puppetclass_id" IN (3, 10) GROUP BY environment_classes.puppetclass_id
LookupKey Load (1.2ms) SELECT DISTINCT "lookup_keys".* FROM "lookup_keys" INNER JOIN "environment_classes" ON "lookup_keys"."id" = "environment_classes"."lookup_key_id" WHERE "environment_classes"."puppetclass_id" = 3 AND "lookup_keys"."override" = 't' AND "environment_classes"."environment_id" = 1 AND (environment_classes.lookup_key_id is NOT NULL) ORDER BY lookup_keys.key
LookupKey Load (0.8ms) SELECT "lookup_keys".* FROM "lookup_keys" WHERE "lookup_keys"."puppetclass_id" = 3 ORDER BY lookup_keys.key
(0.7ms) SELECT puppetclass_id FROM "host_classes" WHERE "host_classes"."host_id" IS NULL
(0.8ms) SELECT puppetclass_id FROM "hostgroup_classes" WHERE "hostgroup_classes"."hostgroup_id" IN (4, 1, 5)
SQL (1.2ms) SELECT "lookup_keys"."id" AS t0_r0, "lookup_keys"."key" AS t0_r1, "lookup_keys"."created_at" AS t0_r2, "lookup_keys"."updated_at" AS t0_r3, "lookup_keys"."puppetclass_id" AS t0_r4, "lookup_keys"."default_value" AS t0_r5, "lookup_keys"."path" AS t0_r6, "lookup_keys"."description" AS t0_r7, "lookup_keys"."validator_type" AS t0_r8, "lookup_keys"."validator_rule" AS t0_r9, "lookup_keys"."is_param" AS t0_r10, "lookup_keys"."key_type" AS t0_r11, "lookup_keys"."override" AS t0_r12, "lookup_keys"."required" AS t0_r13, "lookup_keys"."lookup_values_count" AS t0_r14, "environment_classes"."id" AS t1_r0, "environment_classes"."puppetclass_id" AS t1_r1, "environment_classes"."environment_id" AS t1_r2, "environment_classes"."lookup_key_id" AS t1_r3 FROM "lookup_keys" INNER JOIN "environment_classes" ON "environment_classes"."lookup_key_id" = "lookup_keys"."id" WHERE "lookup_keys"."override" = 't' AND "environment_classes"."puppetclass_id" IN (3, 10) AND "environment_classes"."environment_id" = 1 ORDER BY lookup_keys.key
LookupKey Load (1.2ms) SELECT DISTINCT "lookup_keys".* FROM "lookup_keys" INNER JOIN "environment_classes" ON "lookup_keys"."id" = "environment_classes"."lookup_key_id" WHERE "environment_classes"."puppetclass_id" = 10 AND "lookup_keys"."override" = 't' AND "environment_classes"."environment_id" = 1 AND (environment_classes.lookup_key_id is NOT NULL) ORDER BY lookup_keys.key
LookupKey Load (0.8ms) SELECT "lookup_keys".* FROM "lookup_keys" WHERE "lookup_keys"."puppetclass_id" = 10 ORDER BY lookup_keys.key
CACHE (0.0ms) SELECT puppetclass_id FROM "host_classes" WHERE "host_classes"."host_id" IS NULL
CACHE (0.0ms) SELECT puppetclass_id FROM "hostgroup_classes" WHERE "hostgroup_classes"."hostgroup_id" IN (4, 1, 5)
CACHE (0.0ms) SELECT "lookup_keys"."id" AS t0_r0, "lookup_keys"."key" AS t0_r1, "lookup_keys"."created_at" AS t0_r2, "lookup_keys"."updated_at" AS t0_r3, "lookup_keys"."puppetclass_id" AS t0_r4, "lookup_keys"."default_value" AS t0_r5, "lookup_keys"."path" AS t0_r6, "lookup_keys"."description" AS t0_r7, "lookup_keys"."validator_type" AS t0_r8, "lookup_keys"."validator_rule" AS t0_r9, "lookup_keys"."is_param" AS t0_r10, "lookup_keys"."key_type" AS t0_r11, "lookup_keys"."override" AS t0_r12, "lookup_keys"."required" AS t0_r13, "lookup_keys"."lookup_values_count" AS t0_r14, "environment_classes"."id" AS t1_r0, "environment_classes"."puppetclass_id" AS t1_r1, "environment_classes"."environment_id" AS t1_r2, "environment_classes"."lookup_key_id" AS t1_r3 FROM "lookup_keys" INNER JOIN "environment_classes" ON "environment_classes"."lookup_key_id" = "lookup_keys"."id" WHERE "lookup_keys"."override" = 't' AND "environment_classes"."puppetclass_id" IN (3, 10) AND "environment_classes"."environment_id" = 1 ORDER BY lookup_keys.key
Rendered puppetclasses/_class_parameters.html.erb (25.9ms)
Rendered puppetclasses/_classes_parameters.html.erb (34.1ms)
CommonParameter Load (0.9ms) SELECT "parameters".* FROM "parameters" WHERE "parameters"."type" IN ('CommonParameter')
Hostgroup Load (1.8ms) SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" IN (4, 1, 5) AND (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )
GroupParameter Load (0.9ms) SELECT "parameters".* FROM "parameters" WHERE "parameters"."type" IN ('GroupParameter') AND "parameters"."reference_id" IN (1, 5)
Setting current location thread-local variable to none
Setting current organization thread-local variable to none
Rendered hosts/_form.html.erb (272.0ms)
Rendered hosts/new.html.erb within layouts/application (273.2ms)
not found: Couldn't find all Hostgroups with IDs (4, 1, 5) [WHERE (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )] (found 2 results, but was looking for 3)
Rendered common/404.html.erb within layouts/application (0.9ms)
Completed 404 Not Found in 354ms (Views: 6.1ms | ActiveRecord: 39.3ms)

Started GET "/hosts/new" for 10.189.0.167 at 2013-09-12 12:27:46 +0100
Processing by HostsController#new as /*
User Load (1.4ms) SELECT "users".
FROM "users" WHERE "users"."id" = $1 LIMIT 1 "id", 2
Setting current user thread-local variable to jshanks
(0.8ms) SELECT COUNT() FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization')
Setting current organization thread-local variable to none
(0.7ms) SELECT COUNT(
) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location')
Setting current location thread-local variable to none
(0.7ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') LIMIT 1
(0.7ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') LIMIT 1
Organization Load (0.9ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') ORDER BY type, name LIMIT 1
Location Load (0.8ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') ORDER BY type, name LIMIT 1
Rendered hosts/_progress.erb (0.1ms)
Setting current organization thread-local variable to NYX EURONEXT
Setting current location thread-local variable to EU_Basildon
(2.8ms) SELECT COUNT() FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) )
Organization Load (0.8ms) SELECT "taxonomies".
FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') ORDER BY type, name
Location Load (0.9ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') ORDER BY type, name
ComputeResource Load (1.5ms) SELECT "compute_resources".* FROM "compute_resources" WHERE (compute_resources.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'ComputeResource' AND taxonomy_id in (1) ) ) AND (compute_resources.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'ComputeResource' AND taxonomy_id in (3) ) ) ORDER BY type, name
(1.9ms) SELECT COUNT() FROM "hostgroups" INNER JOIN "user_hostgroups" ON "hostgroups"."id" = "user_hostgroups"."hostgroup_id" WHERE "user_hostgroups"."user_id" = 2 AND (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )
Hostgroup Load (1.8ms) SELECT "hostgroups".
FROM "hostgroups" WHERE (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) )
Environment Load (1.6ms) SELECT "environments".* FROM "environments" WHERE (environments.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Environment' AND taxonomy_id in (1) ) ) AND (environments.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Environment' AND taxonomy_id in (3) ) ) ORDER BY environments.name
(2.6ms) SELECT COUNT() FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet CA' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) )
SmartProxy Load (2.6ms) SELECT "smart_proxies".
FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet CA' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) ) ORDER BY smart_proxies.name
CACHE (0.0ms) SELECT COUNT() FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) )
SmartProxy Load (2.6ms) SELECT "smart_proxies".
FROM "smart_proxies" INNER JOIN "features_smart_proxies" ON "features_smart_proxies"."smart_proxy_id" = "smart_proxies"."id" INNER JOIN "features" ON "features"."id" = "features_smart_proxies"."feature_id" WHERE "features"."name" = 'Puppet' AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (1) ) ) AND (smart_proxies.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'SmartProxy' AND taxonomy_id in (3) ) ) ORDER BY smart_proxies.name
Domain Load (1.9ms) SELECT "domains".* FROM "domains" INNER JOIN "user_domains" ON "domains"."id" = "user_domains"."domain_id" WHERE "user_domains"."user_id" = 2 AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
Domain Load (1.6ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
Rendered common/_domain.html.erb (1.8ms)
CACHE (0.0ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
CACHE (0.0ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
CACHE (0.0ms) SELECT "domains".* FROM "domains" WHERE (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (1) ) ) AND (domains.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Domain' AND taxonomy_id in (3) ) ) ORDER BY domains.name
Rendered hosts/_interfaces.html.erb (9.9ms)
Architecture Load (0.8ms) SELECT "architectures".* FROM "architectures"
Rendered common/os_selection/_architecture.html.erb (2.1ms)
Rendered common/os_selection/_operatingsystem.html.erb (2.9ms)
Rendered hosts/_operating_system.html.erb (13.5ms)
Rendered hosts/_unattended.html.erb (37.3ms)
(0.9ms) SELECT COUNT() AS count_all, puppetclass_id AS puppetclass_id FROM "lookup_keys" WHERE "lookup_keys"."puppetclass_id" IN (NULL) GROUP BY puppetclass_id
(0.9ms) SELECT COUNT(
) AS count_all, environment_classes.puppetclass_id AS environment_classes_puppetclass_id FROM "lookup_keys" INNER JOIN "environment_classes" ON "environment_classes"."lookup_key_id" = "lookup_keys"."id" WHERE "environment_classes"."puppetclass_id" IN (NULL) GROUP BY environment_classes.puppetclass_id
Rendered puppetclasses/_class_parameters.html.erb (0.0ms)
Rendered puppetclasses/_classes_parameters.html.erb (5.8ms)
CommonParameter Load (0.7ms) SELECT "parameters".* FROM "parameters" WHERE "parameters"."type" IN ('CommonParameter')
Rendered common_parameters/_inherited_parameters.erb (0.1ms)
Rendered common_parameters/_puppetclass_parameter.erb (2.7ms)
Rendered common_parameters/_puppetclasses_parameters.erb (5.0ms)
Rendered common_parameters/_parameter.erb (1.7ms)
Rendered common_parameters/_parameters.erb (3.9ms)
User Load (1.5ms) SELECT "users".* FROM "users" WHERE (users.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'User' AND taxonomy_id in (1) ) OR users.admin = 't') AND (users.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'User' AND taxonomy_id in (3) ) OR users.admin = 't') ORDER BY firstname
Usergroup Load (0.8ms) SELECT "usergroups".* FROM "usergroups" ORDER BY usergroups.name
Model Load (0.8ms) SELECT "models".* FROM "models" ORDER BY models.name
Setting current location thread-local variable to none
Setting current organization thread-local variable to none
Rendered hosts/_form.html.erb (122.7ms)
Rendered hosts/new.html.erb within layouts/application (123.9ms)
Rendered home/_user_dropdown.html.erb (1.5ms)
Read fragment views/tabs_and_title_records-2 (0.2ms)
Rendered home/_topbar.html.erb (2.1ms)
Completed 200 OK in 153ms (Views: 107.3ms | ActiveRecord: 35.3ms)

Actions #4

Updated by Jon Shanks over 10 years ago

Ok figured it out, it seems that the organization and location in taxonomies is 1 and 3, yet the host group defined doesn't seem to sit in that, (host group with ID 4). Not sure though where it is getting 4 from specifically, i'm guessing it is tied to something else. so there is some linkage that has gone amiss some how.

SELECT "hostgroups".* FROM "hostgroups" WHERE "hostgroups"."id" IN (4, 1, 5) AND (1=1) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (1) ) ) AND (hostgroups.id in (SELECT taxable_id from taxable_taxonomies WHERE taxable_type = 'Hostgroup' AND taxonomy_id in (3) ) );

seems to be missing one of the host groups, with group ID 4. Group id 4 isn't in the taxable_id of 1 or 3 but is in 2, not sure how or why this would have happened though or where it is generating specifically those taxable_id's for the hostgroups.

foreman=# SELECT * from taxable_taxonomies WHERE taxable_type = 'Hostgroup';
id | taxonomy_id | taxable_id | taxable_type | created_at | updated_at
----+-------------+------------+--------------+----------------------------+----------------------------
19 | 1 | 1 | Hostgroup | 2013-08-06 09:40:45.473938 | 2013-08-06 09:40:45.473938
24 | 4 | 2 | Hostgroup | 2013-08-06 12:09:08.382637 | 2013-08-06 12:09:08.382637
34 | 3 | 3 | Hostgroup | 2013-08-28 15:28:15.668762 | 2013-08-28 15:28:15.668762
35 | 1 | 3 | Hostgroup | 2013-08-28 15:28:15.699443 | 2013-08-28 15:28:15.699443
66 | 3 | 1 | Hostgroup | 2013-09-04 09:31:10.421631 | 2013-09-04 09:31:10.421631
67 | 3 | 5 | Hostgroup | 2013-09-04 09:31:10.429024 | 2013-09-04 09:31:10.429024
68 | 3 | 4 | Hostgroup | 2013-09-04 09:31:10.43591 | 2013-09-04 09:31:10.43591
69 | 3 | 2 | Hostgroup | 2013-09-04 09:31:10.442666 | 2013-09-04 09:31:10.442666
70 | 1 | 5 | Hostgroup | 2013-09-04 09:32:11.206783 | 2013-09-04 09:32:11.206783
83 | 5 | 4 | Hostgroup | 2013-09-04 13:59:39.070364 | 2013-09-04 13:59:39.070364
84 | 5 | 5 | Hostgroup | 2013-09-04 13:59:39.077259 | 2013-09-04 13:59:39.077259
85 | 5 | 1 | Hostgroup | 2013-09-04 13:59:39.083809 | 2013-09-04 13:59:39.083809

Actions #5

Updated by Jon Shanks over 10 years ago

Added the hostgroup to the location. Something is off however as it is getting the ID through some other query but yet is expecting the taxonomy DB to reflect something that isn't accurate from a previous query. Also it is messing up the display and the errors are not handled properly.

Actions #6

Updated by Jon Shanks over 10 years ago

This is now fixed, but would be good to understand how it has happened to begin with. Some bug has caused a link to have gone missing or a query to return something it shouldn't i.e. the location didn't contain that hostgroup, however the organization contains all host groups.

Global was the one with the issue, another host group (Basildon) sits inside of global, yet, global wasn't part of the location, hence, doing a query didn't return it but guessing the link there is because one of the groups in the location was nested in a higher group. Really, it should have automatically added nested groups to the location others are tied to by default.

Actions #7

Updated by Tomer Brisker over 7 years ago

  • Status changed from New to Resolved

Closing per comment #6.

Actions

Also available in: Atom PDF