Actions
Bug #4695
closedcannot add environment to organization
Added by Thomas McKay almost 11 years ago. Updated over 10 years ago.
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Description
$ hammer organization add_environment --id 10 --environment-id 2
No error messages but viewing in UI does not show Development environment (id 2) in Mega Corporation org (id 10). Similar for domains.
Updated by Dominic Cleal almost 11 years ago
- Category set to API
- Status changed from New to Need more information
Can you provide debug logs of the request? It's not clear if this is a hammer or API-side issue.
Updated by Thomas McKay almost 11 years ago
- Status changed from Need more information to New
Processing by Api::V2::OrganizationsController#show as JSON Parameters: {"apiv"=>"v2", "id"=>"10", "organization"=>{}} User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 AuthSource Load (0.3ms) SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1 CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 Authenticated user Admin User against INTERNAL authentication source User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' ORDER BY firstname LIMIT 1 Setting current user thread-local variable to Admin User (0.1ms) BEGIN (0.3ms) UPDATE "users" SET "last_login_on" = '2014-03-19 13:34:15.209885', "updated_at" = '2014-03-19 13:34:15.211581', "preferences" = '--- {} ' WHERE "users"."id" = 1 (0.3ms) COMMIT Role Load (1.1ms) SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1 SQL (1.1ms) SELECT "roles".id FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User' CACHE (0.0ms) SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1 Role Exists (1.0ms) SELECT 1 AS one FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User' AND "roles"."id" = 8 LIMIT 1 Setting current user thread-local variable to Admin User User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 Authorized user admin(Admin User) Setting current user thread-local variable to Admin User Organization Load (1.0ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = 10 ORDER BY title LIMIT 1 OrganizationParameter Load (0.9ms) SELECT "parameters".* FROM "parameters" WHERE "parameters"."type" IN ('OrganizationParameter') AND "parameters"."reference_id" = 10 ORDER BY parameters.name User Load (1.4ms) SELECT "users".* FROM "users" INNER JOIN "taxable_taxonomies" ON "users"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'User' ORDER BY firstname SmartProxy Load (1.1ms) SELECT "smart_proxies".* FROM "smart_proxies" INNER JOIN "taxable_taxonomies" ON "smart_proxies"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'SmartProxy' ORDER BY smart_proxies.name Subnet Load (1.0ms) SELECT "subnets".* FROM "subnets" INNER JOIN "taxable_taxonomies" ON "subnets"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Subnet' ORDER BY vlanid ComputeResource Load (1.2ms) SELECT "compute_resources".* FROM "compute_resources" INNER JOIN "taxable_taxonomies" ON "compute_resources"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'ComputeResource' ORDER BY compute_resources.name Medium Load (1.0ms) SELECT "media".* FROM "media" INNER JOIN "taxable_taxonomies" ON "media"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Medium' ORDER BY media.name ConfigTemplate Load (1.1ms) SELECT "config_templates".* FROM "config_templates" INNER JOIN "taxable_taxonomies" ON "config_templates"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'ConfigTemplate' ORDER BY config_templates.name Domain Load (1.2ms) SELECT "domains".* FROM "domains" INNER JOIN "taxable_taxonomies" ON "domains"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Domain' ORDER BY domains.name Katello::KTEnvironment Load (0.8ms) SELECT "katello_environments".* FROM "katello_environments" WHERE "katello_environments"."organization_id" = 10 Hostgroup Load (1.4ms) SELECT "hostgroups".* FROM "hostgroups" INNER JOIN "taxable_taxonomies" ON "hostgroups"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Hostgroup' ORDER BY hostgroups.title Location Load (1.1ms) SELECT "taxonomies".* FROM "taxonomies" INNER JOIN "locations_organizations" ON "taxonomies"."id" = "locations_organizations"."location_id" WHERE "taxonomies"."type" IN ('Location') AND "locations_organizations"."organization_id" = 10 ORDER BY title Rendered api/v2/taxonomies/show.json.rabl (85.0ms) Body: {"id":10,"name":"Mega Corporation","title":"Mega Corporation","created_at":"2014-03-18T19:32:25Z","updated_at":"2014-03-18T22:22:13Z","select_all_types":[],"parameters":[],"users":[],"smart_proxies":[],"subnets":[],"compute_resources":[],"media":[],"config_templates":[],"domains":[{"id":1,"name":"megacorp.com"}],"katello_environments":[{"name":"Library","id":2}],"hostgroups":[],"locations":[]} Completed 200 OK in 175.3ms (Views: 84.3ms | ActiveRecord: 19.1ms) Processing by Api::V2::EnvironmentsController#show as JSON Parameters: {"apiv"=>"v2", "id"=>"2", "environment"=>{}} User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 AuthSource Load (0.7ms) SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1 CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 Authenticated user Admin User against INTERNAL authentication source User Load (1.4ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' ORDER BY firstname LIMIT 1 Setting current user thread-local variable to Admin User (0.7ms) BEGIN (0.4ms) UPDATE "users" SET "last_login_on" = '2014-03-19 13:34:15.700693', "updated_at" = '2014-03-19 13:34:15.706187', "preferences" = '--- {} ' WHERE "users"."id" = 1 (0.4ms) COMMIT Role Load (0.9ms) SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1 SQL (0.6ms) SELECT "roles".id FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User' CACHE (0.0ms) SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1 Role Exists (1.1ms) SELECT 1 AS one FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User' AND "roles"."id" = 8 LIMIT 1 Setting current user thread-local variable to Admin User User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 Authorized user admin(Admin User) Setting current user thread-local variable to Admin User Location Load (1.0ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') AND "taxonomies"."id" IS NULL ORDER BY title LIMIT 1 Setting current location thread-local variable to none Organization Load (0.8ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" IS NULL ORDER BY title LIMIT 1 Setting current organization thread-local variable to none Environment Load (0.8ms) SELECT "environments".* FROM "environments" WHERE "environments"."id" = 2 ORDER BY environments.name LIMIT 1 Taxonomy Load (0.5ms) SELECT "taxonomies".* FROM "taxonomies" INNER JOIN "taxable_taxonomies" ON "taxonomies"."id" = "taxable_taxonomies"."taxonomy_id" WHERE "taxable_taxonomies"."taxable_id" = 2 AND "taxable_taxonomies"."taxable_type" = 'Environment' AND (taxonomies.type='Location') ORDER BY title Taxonomy Load (0.5ms) SELECT "taxonomies".* FROM "taxonomies" INNER JOIN "taxable_taxonomies" ON "taxonomies"."id" = "taxable_taxonomies"."taxonomy_id" WHERE "taxable_taxonomies"."taxable_id" = 2 AND "taxable_taxonomies"."taxable_type" = 'Environment' AND (taxonomies.type='Organization') ORDER BY title TemplateCombination Load (0.2ms) SELECT "template_combinations".* FROM "template_combinations" WHERE "template_combinations"."environment_id" = 2 Puppetclass Load (0.4ms) SELECT DISTINCT "puppetclasses".* FROM "puppetclasses" INNER JOIN "environment_classes" ON "puppetclasses"."id" = "environment_classes"."puppetclass_id" WHERE "environment_classes"."environment_id" = 2 ORDER BY puppetclasses.name Rendered api/v2/environments/show.json.rabl (26.1ms) Body: {"name":"Development","id":2,"created_at":"2014-03-18T19:30:54Z","updated_at":"2014-03-18T19:30:54Z","locations":[],"organizations":[],"template_combinations":[],"puppetclasses":[]} Completed 200 OK in 295.7ms (Views: 37.5ms | ActiveRecord: 12.3ms) Processing by Api::V2::OrganizationsController#update as JSON Parameters: {"organization"=>{"environment_ids"=>[2]}, "apiv"=>"v2", "id"=>"10"} User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 AuthSource Load (0.7ms) SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1 CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 Authenticated user Admin User against INTERNAL authentication source User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' ORDER BY firstname LIMIT 1 Setting current user thread-local variable to Admin User (0.2ms) BEGIN (0.8ms) UPDATE "users" SET "last_login_on" = '2014-03-19 13:34:16.004398', "updated_at" = '2014-03-19 13:34:16.006170', "preferences" = '--- {} ' WHERE "users"."id" = 1 (0.3ms) COMMIT Role Load (0.7ms) SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1 SQL (1.2ms) SELECT "roles".id FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User' CACHE (0.0ms) SELECT "roles".* FROM "roles" WHERE "roles"."name" = 'Anonymous' LIMIT 1 Role Exists (0.6ms) SELECT 1 AS one FROM "roles" INNER JOIN "user_roles" ON "roles"."id" = "user_roles"."role_id" WHERE "user_roles"."owner_id" = 1 AND "user_roles"."owner_type" = 'User' AND "roles"."id" = 8 LIMIT 1 Setting current user thread-local variable to Admin User User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1 Authorized user admin(Admin User) Setting current user thread-local variable to Admin User Organization Load (1.3ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = 10 ORDER BY title LIMIT 1 (0.1ms) BEGIN Katello::KTEnvironment Load (0.4ms) SELECT "katello_environments".* FROM "katello_environments" WHERE "katello_environments"."id" = $1 LIMIT 1 [["id", 2]] Katello::KTEnvironment Load (0.4ms) SELECT "katello_environments".* FROM "katello_environments" WHERE "katello_environments"."organization_id" = 10 User Load (0.9ms) SELECT "users".* FROM "users" INNER JOIN "taxable_taxonomies" ON "users"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'User' ORDER BY firstname SmartProxy Load (0.6ms) SELECT "smart_proxies".* FROM "smart_proxies" INNER JOIN "taxable_taxonomies" ON "smart_proxies"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'SmartProxy' ORDER BY smart_proxies.name Subnet Load (1.3ms) SELECT "subnets".* FROM "subnets" INNER JOIN "taxable_taxonomies" ON "subnets"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Subnet' ORDER BY vlanid ComputeResource Load (0.5ms) SELECT "compute_resources".* FROM "compute_resources" INNER JOIN "taxable_taxonomies" ON "compute_resources"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'ComputeResource' ORDER BY compute_resources.name Medium Load (0.5ms) SELECT "media".* FROM "media" INNER JOIN "taxable_taxonomies" ON "media"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Medium' ORDER BY media.name Domain Load (0.5ms) SELECT "domains".* FROM "domains" INNER JOIN "taxable_taxonomies" ON "domains"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Domain' ORDER BY domains.name Hostgroup Load (1.2ms) SELECT "hostgroups".* FROM "hostgroups" INNER JOIN "taxable_taxonomies" ON "hostgroups"."id" = "taxable_taxonomies"."taxable_id" WHERE "taxable_taxonomies"."taxonomy_id" = 10 AND "taxable_taxonomies"."taxable_type" = 'Hostgroup' ORDER BY hostgroups.title Location Load (1.2ms) SELECT "taxonomies".* FROM "taxonomies" INNER JOIN "locations_organizations" ON "taxonomies"."id" = "locations_organizations"."location_id" WHERE "taxonomies"."type" IN ('Location') AND "locations_organizations"."organization_id" = 10 ORDER BY title Taxonomy Exists (0.6ms) SELECT 1 AS one FROM "taxonomies" WHERE (LOWER("taxonomies"."name") = LOWER('Mega Corporation') AND "taxonomies"."id" != 10 AND "taxonomies"."ancestry" IS NULL) LIMIT 1 Taxonomy Exists (0.5ms) SELECT 1 AS one FROM "taxonomies" WHERE ("taxonomies"."title" = 'Mega Corporation' AND "taxonomies"."id" != 10) LIMIT 1 Host::Managed Load (1.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.7ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.7ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.7ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' Host::Managed Load (1.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) TaxableTaxonomy Load (0.6ms) SELECT "taxable_taxonomies".* FROM "taxable_taxonomies" WHERE "taxable_taxonomies"."taxonomy_id" = 10 Taxonomy Load (0.8ms) SELECT "taxonomies".* FROM "taxonomies" WHERE 1=0 ORDER BY (case when taxonomies.ancestry is null then 0 else 1 end), taxonomies.ancestry SQL (1.3ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.3ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.6ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.9ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.3ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (1.2ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.4ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.4ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.0ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.3ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.9ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (1.3ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.9ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.7ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.9ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (1.2ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.3ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.3ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (1.3ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.4ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.5ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (0.7ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.0ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.0ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.7ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.0ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (1.2ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.0ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.2ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (1.3ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.7ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.8ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.7ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.0ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) SQL (1.1ms) SELECT DISTINCT subnets.dhcp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT subnets.tftp_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.5ms) SELECT DISTINCT subnets.dns_id FROM "hosts" INNER JOIN "subnets" ON "subnets"."id" = "hosts"."subnet_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.5ms) SELECT DISTINCT domains.dns_id FROM "hosts" INNER JOIN "domains" ON "domains"."id" = "hosts"."domain_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.3ms) SELECT DISTINCT puppet_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.3ms) SELECT DISTINCT puppet_ca_proxy_id FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.9ms) SELECT DISTINCT hostgroups.puppet_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (1.1ms) SELECT DISTINCT hostgroups.puppet_ca_proxy_id FROM "hosts" INNER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 10 SQL (0.9ms) SELECT DISTINCT users.id FROM "users" INNER JOIN "hosts" ON "hosts"."owner_id" = "users"."id" AND "hosts"."type" IN ('Host::Managed') AND "hosts"."owner_type" = 'User' WHERE 1=0 AND "users"."admin" = 'f' CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."organization_id" = 10 AND "hosts"."type" IN ('Host::Managed') AND (hosts.operatingsystem_id IS NOT NULL) Organization Exists (0.8ms) SELECT 1 AS one FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND ("taxonomies"."name" = 'Mega Corporation' AND "taxonomies"."id" != 10) LIMIT 1 Organization Exists (0.6ms) SELECT 1 AS one FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND ("taxonomies"."label" = 'megacorp' AND "taxonomies"."id" != 10) LIMIT 1 (0.9ms) UPDATE "taxonomies" SET "updated_at" = '2014-03-19 13:34:16.635667', "ignore_types" = '--- [] ', "default_info" = '--- system: [] distributor: [] ' WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = 10 [DEBUG 2014-03-19 09:34:16 cp_rest] Resource GET request: /candlepin/owners/megacorp/servicelevels [DEBUG 2014-03-19 09:34:16 cp_rest] Headers: {"accept":"application/json","accept-language":"en","content-type":"application/json","cp-user":"admin"} [DEBUG 2014-03-19 09:34:16 cp_rest] Body: {} [DEBUG 2014-03-19 09:34:16 cp_rest] Processing response: 200 [DEBUG 2014-03-19 09:34:16 cp_rest] [ "Premium", "Standard" ] (0.6ms) COMMIT [DEBUG 2014-03-19 09:34:16 cp_rest] Resource GET request: /candlepin/owners/megacorp [DEBUG 2014-03-19 09:34:16 cp_rest] Headers: {"accept":"application/json","cp-user":"admin"} [DEBUG 2014-03-19 09:34:16 cp_rest] Body: {} [DEBUG 2014-03-19 09:34:16 cp_rest] Processing response: 200 [DEBUG 2014-03-19 09:34:16 cp_rest] { | "parentOwner" : null, | "id" : "268a8471-ae04-4e4c-b586-8fdd88b11d7a", | "key" : "megacorp", | "displayName" : "Mega Corporation", | "contentPrefix" : "/megacorp/$env", | "defaultServiceLevel" : null, | "upstreamConsumer" : { | "id" : "384f7e0f-c2a9-4d1f-a923-c4b1a5668c2e", | "uuid" : "1db84d3c-f3e1-4c8b-9ede-8d87540fdcf3", | "name" : "MegaCorp", | "idCert" : { | "key" : "-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----\n", | "cert" : "-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----\n", | "id" : "222b3c35-8761-4070-9d0b-f343fde62e47", | "serial" : { | "id" : 7551005035815246969, | "revoked" : false, | "collected" : false, | "expiration" : "2014-11-21T16:18:25.000+0000", | "serial" : 7551005035815246969, | "created" : "2014-03-18T19:32:38.680+0000", | "updated" : "2014-03-18T19:32:38.680+0000" | }, | "created" : "2014-03-18T19:32:38.709+0000", | "updated" : "2014-03-18T19:32:38.709+0000" | }, | "type" : { | "id" : "1006", | "label" : "sam", | "manifest" : true | }, | "ownerId" : "268a8471-ae04-4e4c-b586-8fdd88b11d7a", | "webUrl" : "access.stage.redhat.com/management/distributors/", | "apiUrl" : "https://subscription.rhn.stage.redhat.com/subscription/consumers/", | "created" : "2014-03-18T19:32:38.718+0000", | "updated" : "2014-03-18T19:32:38.718+0000" | }, | "logLevel" : null, | "href" : "/owners/megacorp", | "created" : "2014-03-18T19:32:32.004+0000", | "updated" : "2014-03-18T19:32:38.940+0000" | } Body: {"organization":{"ancestry":null,"apply_info_task_id":null,"created_at":"2014-03-18T19:32:25Z","default_info":{"system":[],"distributor":[]},"deletion_task_id":null,"description":"The number one mega company in the world!","id":10,"ignore_types":[],"label":"megacorp","name":"Mega Corporation","owner_auto_attach_all_systems_task_id":null,"title":"Mega Corporation","updated_at":"2014-03-19T13:34:16Z","service_levels":["Premium","Standard"],"service_level":null}} Completed 200 OK in 861.5ms (Views: 61.1ms | ActiveRecord: 0.0ms)
Updated by Dominic Cleal over 10 years ago
- Is duplicate of Bug #7028: association of subnet, domain, templates and resources to organization has no effect via CLI added
Updated by Dominic Cleal over 10 years ago
- Status changed from New to Duplicate
#7028 contains a slew of fixes for this.
Actions