Adambean / gitlab-ce-ldap-sync

Synchronise users and groups (including group members) from an LDAP instance with Gitlab CE (and EE in free tier) self-hosted instance(s).
Apache License 2.0
61 stars 23 forks source link

Wrong warning #3

Closed jsiegers closed 5 years ago

jsiegers commented 5 years ago

This is probably not even called a bug but I noticed a wrong warning. And I thought let's file a bug report to make this software even better!

I have multiple GitLab servers but I don't want to create every group on every GitLab server. So what I did was create an unique GitLab user for every server (gitlab01, gitlab02, etc) and in the group filter search for groups where it's unique user is a member of.
That way I can easily say on the LDAP server what group should live on which server. This works like a charm.

But when I run ldap sync I get a warning that user gitlab01 isn't found. Just before it sees that that user is on the ignore list so I would expect it shouldn't give a warning but a notice.

[notice] Loading configuration.
[notice] Loaded configuration.
[notice] Validating configuration.
[notice] Validated configuration.
[notice] Retrieving directory users and groups.
[notice] Establishing LDAP connection.
[notice] LDAP connection established.
[notice] 8 directory user(s) found.
[info] User "gitlab" in ignore list.
[info] Found directory user "jsiegers" [uid=jsiegers,cn=users,cn=accounts,dc=postlab,dc=cloud].
[info] Found directory user "pmlombert" [uid=pmlombert,cn=users,cn=accounts,dc=postlab,dc=cloud].
[info] Found directory user "rdkoning" [uid=rdkoning,cn=users,cn=accounts,dc=postlab,dc=cloud].
[info] Found directory user "tvdmaat" [uid=tvdmaat,cn=users,cn=accounts,dc=postlab,dc=cloud].
[info] User "gitlab01" in ignore list.
[info] User "gitlab02" in ignore list.
[notice] 4 directory user(s) recognised.
[notice] 3 directory group(s) found.
[info] Found directory group "test-team-3".
[warning] Group #1 / member #1: User not found "gitlab01".
[info] Found directory group "test-team-3" member "jsiegers".
[info] Found directory group "test-team-3" member "rdkoning".
[notice] 2 directory group "test-team-3" member(s) recognised.
Adambean commented 5 years ago

Nothing to worry about. This happens because it's at a different part to the user loading. (It's at the group member loading.) I'll add a check with a friendlier message.