Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
ipa migrate-ds is migrating users entries and also copying the attribute mepmanagedentry. But the DN corresponding to this attribute is not migrated.
This makes that a delete of a user (by ldaptools) could fail. The internal operation done by "Managed Entries" plugin will fail.
In any case, db is inconsistent without the managed entry.
Version-Release number of selected component (if applicable):
ipa-server-4.1.0-18.el7_1.3.x86_64
How reproducible: always.
Steps to Reproduce:
1. Add user in one ipa server:
[root@ipaserver ~]# ipa user-add nevermanaged
First name: Never
Last name: Managed
-------------------------
Added user "nevermanaged"
-------------------------
User login: nevermanaged
...
2. Check the entry and the managed one are there:
[root@ipaserver ~]# ipa user-show nevermanaged --all --raw
dn: uid=nevermanaged,cn=users,cn=accounts,dc=redhat,dc=com
mepmanagedentry: cn=nevermanaged,cn=groups,cn=accounts,dc=redhat,dc=com
[root@ipaserver ~]# ldapsearch -xLLL -D "cn=directory manager" -w secret12 -b "cn=nevermanaged,cn=groups,cn=accounts,dc=redhat,dc=com" dn
dn: cn=nevermanaged,cn=groups,cn=accounts,dc=redhat,dc=com
3. ipa migrate-ds in another ipa server:
ipa migrate-ds ldap://10.13.211.213:389 --bind-dn="uid=admin,cn=users,cn=accounts,dc=redhat,dc=com" --user-container="cn=users,cn=accounts,dc=redhat,dc=com" --with-compat --group-container="cn=groups,cn=accounts,dc=redhat,dc=com"
migrate-ds:
-----------
Migrated:
user: nevermanaged
Failed user:
admin: This entry already exists
4. Check user and managed entry:
[root@idm-replica ~]# ipa user-show nevermanaged --all --raw
dn: uid=nevermanaged,cn=users,cn=accounts,dc=example,dc=org
....
mepManagedEntry: cn=nevermanaged,cn=groups,cn=accounts,dc=example,dc=org
ldapsearch -xLLL -D "cn=directory manager" -w 'RedHat1!' -b "cn=nevermanaged,cn=groups,cn=accounts,dc=redhat,dc=com" dn
No such object (32)
[root@idm-replica ~]#
5. user cannot be deleted anymore:
ipa user-del nevermanaged
ipa: ERROR: nevermanaged: user not found
6.
[root@idm-replica ~]# ldapmodify -D "cn=directory manager" -w 'RedHat1!'
dn: uid=nevermanaged,cn=users,cn=accounts,dc=example,dc=org
changetype: modify
replace: mepManagedEntry
7. ipa user-del
User login: nevermanaged
---------------------------
Deleted user "nevermanaged"
---------------------------
[root@idm-replica ~]#
Actual results:
the managed entry is not migrated and the user cannot be deleted any more.
Expected results:
the managed entry should be there.
Additional info:
The workaround is to delete attribute:
mepManagedEntry
A real workaround, more acceptable for customers has just been given by Rob (thanks a lot):
if they want to re-migrate, would be to blacklist that attribute and objectclass with --user-ignore-attribute=mepManagedEntry --user-ignore-objectclass=mepOriginEntry
ipa migrate-ds was not designed to migrate UPGs automatically. Actually it was not designed for IPA-IPA migration, but can be used.
The reason why the groups were not migrated is that ipa migrate-ds migrates groups with object classes: "groupOfUniqueNames, groupOfNames but UPGs have "ipaobject, mepManagedEntry, posixgroup, top" and therefore they were not migrated.
Another possibility is to ignore(not migrate) the mepManagedEntry attribute during migration - add it to --user-ignore-attribute options.