Group Sync does not work anymore

We use gitlab premium with a ldap sync (Samba-AD). We add today two new members, and they can login but not added to their groups.

We re-forced the sync multiple times, but they still not appear as a group member. Query the ldap through gitlab-rails console shows correct group membershit.

For me it looks like it hangs at the “Email Pluck”:

/*application:console,db_config_name:main,console_hostname:gitlab,console_username:root*/ SELECT "emails"."email" FROM "emails" WHERE "emails"."user_id" = 138 AND "emails"."confirmed_at" IS NOT NULL
=> nil

but the entry exist in the database:

gitlab-psql -c 'SELECT "emails"."email" FROM "emails" WHERE "emails"."user_id" = 138 AND "emails"."confirmed_at" IS NOT NULL'
             email             
-------------------------------
 username@domain.com
(1 row)

Any ideas, what could be wrong?

Which GitLab version are you using? Maybe this hits a bug.

Found Group Sync doesn't work anymore (#424096) · Issues · GitLab.org / GitLab · GitLab while searching for potential bugs