#9618 Allow IPA SIDgen task to continue if it finds an entity that SID can't be assigned to
Closed: fixed by frenaud. Opened by twoerner.

Request for enhancement

Currently, IPA SIDgen task fails on first user/group that SID can't be assigned to, either ducplicate ID or user/group out of range with

ERR - find_sid_for_ldap_entry - [file ipa_sidgen_common.c, line 522]: Cannot convert Posix ID [ID] into an unused SID.

ERR - do_work - [file ipa_sidgen_task.c, line 154]: Cannot add SID to existing entry.

and then task ends with 

ERR - sidgen_task_thread - [file ipa_sidgen_task.c, line 199]: Sidgen task finished [32].

while it should just log the faulty ID and continue the generation for all the other IDs. This behavior is observed in latest major versions:

ipa-server-4.9.12-11, ipa-server-4.10.2-5

Steps to reproduce

Create a user out of range: 

ipa user-add testsid --first test --last sid --uid 2000

try to force SID generation with

ipa config-mod --add-sids --enable-sid

Observe in LDAP error log:

ERR - find_sid_for_ldap_entry - [file ipa_sidgen_common.c, line 522]: Cannot convert Posix ID [2000] into an unused SID.
ERR - do_work - [file ipa_sidgen_task.c, line 154]: Cannot add SID to existing entry.
ERR - sidgen_task_thread - [file ipa_sidgen_task.c, line 199]: Sidgen task finished [32].

Expected results

Faulty user id is logged, SID generation continued


Metadata Update from @ftrivino:
- Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-22188
- Issue assigned to twoerner

master:

  • faa0aa5de1b4618bc0f1fcee98f136983e21e735 ipa_sidgen: Allow sidgen_task to continue after finding issues

Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-22188, https://issues.redhat.com/browse/RHEL-46592 (was: https://issues.redhat.com/browse/RHEL-22188)

ipa-4-12:

  • a8e75bbb77e15e3a42adb2d30933cf9e1edd2f0b ipa_sidgen: Allow sidgen_task to continue after finding issues

ipa-4-11:

  • 8a52a967fc726edbc5ad0ef342b9fdc3f0da0434 ipa_sidgen: Allow sidgen_task to continue after finding issues

ipa-4-10:

  • 6c2de4f35370711a2ebcc480510ce51f66c76031 ipa_sidgen: Allow sidgen_task to continue after finding issues

ipa-4-9:

  • 41c2a839a622ab6acc92d4c7fd7c37c67d1377d2 ipa_sidgen: Allow sidgen_task to continue after finding issues

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • dd1bcd178b388e086dc02541b1b960b2788ce2de ipatests: Verify that SIDgen task continue even if it fails to assign sid

ipa-4-11:

  • d1c5287dc944b22c91367e3a1b55cbd9828674b6 ipatests: Verify that SIDgen task continue even if it fails to assign sid

ipa-4-12:

  • ee96c129a6034d02245a41c58fa3398c12c9ee75 ipatests: Verify that SIDgen task continue even if it fails to assign sid
Metadata