Project

General

Profile

Bug #10893

Editing organizations/locations hangs in 1.8.2

Added by Andy Taylor almost 4 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Organizations and Locations
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

We recently upgraded to Foreman 1.8.2 and since then we've been unable to edit some of our larger organizations/locations, the page request just hangs and load on the server increases significantly. Our largest location consists of 135 hosts. On 1.7.x it would take a long time but it would always return a page.


Related issues

Related to Foreman - Bug #12980: cannot rename organizationNew2016-01-04
Related to Foreman - Bug #14924: taxonomies/edit.html.erb takes minutes to renderClosed2016-05-04
Has duplicate Foreman - Bug #10138: Manage Location and Organization unusable once thousands of nodes are assignedDuplicate2015-04-14

History

#1 Updated by Ohad Levy almost 4 years ago

  • Status changed from New to Need more information

can you please add the relevant log entries? or foreman-debug?

#2 Updated by Marek Hulán almost 4 years ago

  • Category set to Organizations and Locations

#3 Updated by Andy Taylor almost 4 years ago

Apologies for the lack of detail in my original post. I've turned on debug logging and tried the edit again. The logs are then flooded with queries like this:


2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (7, 6, 4, 5)
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT `config_templates`.* FROM `config_templates` INNER JOIN `config_templates_operatingsystems` ON `config_templates_operatingsystems`.`config_template_id` = `config_templates`.`id` INNER JOIN `operatingsystems` ON `operatingsystems`.`id` = `config_templates_operatingsystems`.`operatingsystem_id` INNER JOIN `template_kinds` ON `template_kinds`.`id` = `config_templates`.`template_kind_id` INNER JOIN `template_combinations` ON `template_combinations`.`config_template_id` = `config_templates`.`id` WHERE `config_templates`.`id` IN (1, 21, 23, 39, 42, 44, 45, 46, 49) AND `operatingsystems`.`id` = 1 AND `template_kinds`.`name` = 'provision' AND `template_combinations`.`hostgroup_id` IS NULL AND `template_combinations`.`environment_id` = 7 ORDER BY config_templates.name LIMIT 1
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 8 or taxonomies.ancestry like '8/%' or taxonomies.ancestry = '8') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 2 or taxonomies.ancestry like '2/%' or taxonomies.ancestry = '2') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 3 or taxonomies.ancestry like '3/%' or taxonomies.ancestry = '3') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 1 or taxonomies.ancestry like '1/%' or taxonomies.ancestry = '1') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND ( (taxonomies.id in (8,2,3,1))) ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 7 or taxonomies.ancestry like '7/%' or taxonomies.ancestry = '7') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 6 or taxonomies.ancestry like '6/%' or taxonomies.ancestry = '6') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 4 or taxonomies.ancestry like '4/%' or taxonomies.ancestry = '4') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 5 or taxonomies.ancestry like '5/%' or taxonomies.ancestry = '5') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization') AND ( (taxonomies.id in (7,6,4,5))) ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 8 or taxonomies.ancestry like '8/%' or taxonomies.ancestry = '8') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 2 or taxonomies.ancestry like '2/%' or taxonomies.ancestry = '2') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 3 or taxonomies.ancestry like '3/%' or taxonomies.ancestry = '3') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 1 or taxonomies.ancestry like '1/%' or taxonomies.ancestry = '1') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (8, 2, 3, 1)
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 7 or taxonomies.ancestry like '7/%' or taxonomies.ancestry = '7') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 6 or taxonomies.ancestry like '6/%' or taxonomies.ancestry = '6') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 4 or taxonomies.ancestry like '4/%' or taxonomies.ancestry = '4') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 5 or taxonomies.ancestry like '5/%' or taxonomies.ancestry = '5') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (7, 6, 4, 5)
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 8 or taxonomies.ancestry like '8/%' or taxonomies.ancestry = '8') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 2 or taxonomies.ancestry like '2/%' or taxonomies.ancestry = '2') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 3 or taxonomies.ancestry like '3/%' or taxonomies.ancestry = '3') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 1 or taxonomies.ancestry like '1/%' or taxonomies.ancestry = '1') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (8, 2, 3, 1)
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 7 or taxonomies.ancestry like '7/%' or taxonomies.ancestry = '7') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 6 or taxonomies.ancestry like '6/%' or taxonomies.ancestry = '6') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 4 or taxonomies.ancestry like '4/%' or taxonomies.ancestry = '4') ORDER BY title
2015-06-22 14:55:56 [D]   CACHE (0.0ms)  SELECT id FROM `taxonomies` WHERE (taxonomies.id = 5 or taxonomies.ancestry like '5/%' or taxonomies.ancestry = '5') ORDER BY title

This seems to then repeat endlessly. I let it run for 15 minutes, then restarted Foreman to stop the process. This was with a user with restricted access via the roles system.

We then tried it with an admin user and the process completed in 2 minutes, so this appears to be an issue with permissions/the roles system.

#4 Updated by Dominic Cleal almost 4 years ago

  • Status changed from Need more information to New

#5 Updated by Timo Goebel over 3 years ago

  • Has duplicate Bug #10138: Manage Location and Organization unusable once thousands of nodes are assigned added

#6 Updated by Timo Goebel over 3 years ago

  • Related to Bug #12980: cannot rename organization added

#7 Updated by Dominic Cleal about 3 years ago

  • Related to Bug #14924: taxonomies/edit.html.erb takes minutes to render added

#8 Updated by Tomer Brisker over 2 years ago

  • Status changed from New to Need more information

Is this still occurring in 1.12 or has it been resolved by #14924?

#9 Updated by Michael Moll about 2 years ago

  • Status changed from Need more information to Resolved

no reaction, closing.

Also available in: Atom PDF