Project

General

Profile

Actions

Bug #10482

closed

External user group refresh queries for group members twice

Added by Dominic Cleal over 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Authentication
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When refreshing an external user group, it queries the auth source (i.e. LDAP) twice. You can see it here with the instrumentation added in #10406, which shows two "user_list" queries to ldap_fluff.

2015-05-12 11:51:06 [D] Refreshing external user group scientists
2015-05-12 11:51:06 [D]   CACHE (0.0ms)  SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 11 LIMIT 1
2015-05-12 11:51:06 [D]   Usergroup Load (0.2ms)  SELECT "usergroups".* FROM "usergroups" WHERE "usergroups"."id" = 6 ORDER BY usergroups.name LIMIT 1
2015-05-12 11:51:06 [D]   User Load (0.2ms)  SELECT "users".* FROM "users" INNER JOIN "usergroup_members" ON "users"."id" = "usergroup_members"."member_id" WHERE "usergroup_members"."usergroup_id" = 6 AND "usergroup_members"."member_type" = 'User' ORDER BY firstname
2015-05-12 11:51:06 [D]   CACHE (0.0ms)  SELECT "external_usergroups".* FROM "external_usergroups" WHERE "external_usergroups"."usergroup_id" = 6
2015-05-12 11:51:06 [D]   CACHE (0.0ms)  SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 11 LIMIT 1
2015-05-12 11:51:18 [I] Successfully decrypted field for AuthSourceLdap forumsys
2015-05-12 11:51:19 [D]   LDAP-op bind (177.7ms)  [ result=success ]
2015-05-12 11:51:19 [D]   LDAP-op search (271.5ms)  [ filter=, base= ]
2015-05-12 11:51:19 [D]   LDAP-op search (279.9ms)  [ filter=(cn=scientists), base=dc=example,dc=com ]
2015-05-12 11:51:19 [D]   LDAP-op search (271.7ms)  [ filter=(cn=scientists), base=dc=example,dc=com ]
2015-05-12 11:51:20 [D]   LDAP-op search (267.7ms)  [ filter=(|(|(objectClass=posixGroup)(objectClass=organizationalunit))(objectClass=groupOfUniqueNames)), base=ou=scientists,dc=example,dc=com ]
2015-05-12 11:51:20 [D]   LDAP user_list (1271.4ms)  [ group=scientists ]
2015-05-12 11:51:29 [I] Successfully decrypted field for AuthSourceLdap forumsys
2015-05-12 11:51:29 [D]   LDAP-op bind (185.4ms)  [ result=success ]
2015-05-12 11:51:29 [D]   LDAP-op search (268.7ms)  [ filter=, base= ]
2015-05-12 11:51:29 [D]   LDAP-op search (272.3ms)  [ filter=(cn=scientists), base=dc=example,dc=com ]
2015-05-12 11:51:30 [D]   LDAP-op search (271.9ms)  [ filter=(cn=scientists), base=dc=example,dc=com ]
2015-05-12 11:51:30 [D]   LDAP-op search (287.1ms)  [ filter=(|(|(objectClass=posixGroup)(objectClass=organizationalunit))(objectClass=groupOfUniqueNames)), base=ou=scientists,dc=example,dc=com ]
2015-05-12 11:51:30 [D]   LDAP user_list (1287.6ms)  [ group=scientists ]
Actions #1

Updated by The Foreman Bot over 9 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2375 added
  • Pull request deleted ()
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Dominic Cleal over 9 years ago

  • Translation missing: en.field_release set to 50
Actions

Also available in: Atom PDF