[RHEV] Migration tool fails on a user that is subscribed to event notifications and user's uuid has changed between 2.2 and 3.0 (local users or IPA)

Solution Verified - Updated -


  • The migration script (RHEL side) aborts when attempting to migrate users from the 2.2 version of RHEV-M with error "Can't update ids for user "rhevadmin".
  • RHEV-M 2.2 setup was based on local authentication (no AD).
  • There are users on RHEV-M 2.2 setup subscribed to some event notifications.

Here are the error messages on rhevm-migration log file:

2012-05-15 16:52:49,664 INFO Loading the list of users ...
2012-05-15 16:52:49,664 DEBUG Local domain is "WIN2K8R2".
2012-05-15 16:52:49,664 DEBUG Query to load users is "select username, user_id from users where domain = 'DOMAIN'".
2012-05-15 16:52:49,665 DEBUG Loaded user with name "rhevadmin" and database id "bf6fe63f-0917-74fe-3d33-ab42e8030000".
2012-05-15 16:52:49,666 INFO Migrating users ...
2012-05-15 16:52:49,666 DEBUG Migrating user "rhevadmin" ...
2012-05-15 16:52:49,666 DEBUG Finding directory id for user "rhevadmin" ...
2012-05-15 16:52:49,666 DEBUG Finding id for user "rhevadmin" in domain "example.com" ...
2012-05-15 16:52:49,666 DEBUG Evaluating command "dig -t SRV +short _ldap._tcp.example.com".
2012-05-15 16:52:49,676 DEBUG Standard output follows:
0 100 389 ipa.example.com.

2012-05-15 16:52:49,676 DEBUG Standard errors is empty.
2012-05-15 16:52:49,676 DEBUG Exit code is 0.
2012-05-15 16:52:49,677 DEBUG Found LDAP SRV record "0 100 389 ipa.example.com." for domain "example.com".
2012-05-15 16:52:49,677 DEBUG LDAP server URI is "ldap://ipa.example.com:389".
2012-05-15 16:52:49,677 DEBUG Selected LDAP URI is "ldap://ipa.example.com:389", others will be ignored.

2012-05-15 16:52:49,677 DEBUG Running IPA query "(objectclass=*)" on server "ldap://ipa.example.com:389" with base "".
2012-05-15 16:52:49,706 DEBUG Selected naming context is "dc=example,dc=com", others will be ignored.

2012-05-15 16:52:49,706 DEBUG Running IPA query "(|(&(objectclass=ipaobject)(uid=rhevadmin))(&(objectclass=user)(sAMAccountName=rhevadmin)))" on server "ldap://ipa.example.com:389" with base "dc=example,dc=com".
2012-05-15 16:52:49,724 DEBUG Found directory id "72fe9668-a372-11e1-9c44-001a4a602425" for user "rhevadmin" in domain "example.com", others will be ignored.

2012-05-15 16:52:49,724 DEBUG Checking users with database id equal to directory id "72fe9668-a372-11e1-9c44-001a4a602425" ...
2012-05-15 16:52:49,724 DEBUG Query to check users with id "72fe9668-a372-11e1-9c44-001a4a602425" is "select user_id from users where user_id = '72fe9668-a372-11e1-9c44-001a4a602425'".
2012-05-15 16:52:49,725 DEBUG Updating the user and the permissions ...
2012-05-15 16:52:49,725 DEBUG Update for users table is "update users set user_id = '72fe9668-a372-11e1-9c44-001a4a602425', domain = 'example.com', username = 'rhevadmin@example.com' where user_id = 'bf6fe63f-0917-74fe-3d33-ab42e8030000'".
2012-05-15 16:52:49,728 DEBUG Traceback (most recent call last):
  File "/usr/bin/rhevm-migration", line 1426, in migrateUser
IntegrityError: update or delete on table "users" violates foreign key constraint "fk_event_subscriber_users" on table "event_subscriber"
DETAIL:  Key (user_id)=(bf6fe63f-0917-74fe-3d33-ab42e8030000) is still referenced from table "event_subscriber".

2012-05-15 16:52:49,729 ERROR Can't update ids for user "rhevadmin".
2012-05-15 16:52:49,729 ERROR 
ESC[1;31mThe migration is aborted, see the log file for details.ESC[0;39m

You can rollback to your previous installation manually enabling
and starting the services in the Windows machine.


  • Red Hat Enterprise Virtualization (RHEV) 2 and 3
  • rhevm-migration tool

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content