Attempting to delete a domain which contains users and projects may yield an UnexpectedError similiar to this
Sep 21 19:37:17 vagrant-openSUSE-Leap <email address hidden>[23894]: DEBUG keystone.common.sql.core [None req-707ec264-b10c-4079-94bb-2af01db58aab None None] Conflict project: (pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`keystone`.`user`, CONSTRAINT `user_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `project` (`id`))') [SQL: u'DELETE FROM project WHERE project.id = %(id)s'] [parameters: {'id': u'63d2d5446e364f00b3181bf49c62c5b8'}] {{(pid=23897) wrapper /opt/stack/keystone/keystone/common/sql/core.py:550}} Sep 21 19:37:17 vagrant-openSUSE-Leap <email address hidden>[23894]: WARNING keystone.common.wsgi [None req-707ec264-b10c-4079-94bb-2af01db58aab None None] An unexpected error prevented the server from fulfilling your request.: UnexpectedError: An unexpected error prevented the server from fulfilling your request.
Steps to reproduce:
1. Install devstack 2. create a domain 'foo'
openstack domain create foo
3. create a user in domain 'foo'
openstack user create --password equifax --domain foo foo_user
4. create a project in domain 'foo'
openstack project create --domain foo foo_project
5. enable domain user 'foo_user' access to project 'foo_project'
openstack role add --user foo_user --project foo_project admin
6. now disable domain 'foo'
openstack domain set --disable foo
7. attempt to delete domain 'foo' will yield an expected error mentioned above
openstack domain delete foo
Attempting to delete a domain which contains users and projects may yield an UnexpectedError similiar to this
Sep 21 19:37:17 vagrant- openSUSE- Leap <email address hidden>[23894]: DEBUG keystone. common. sql.core [None req-707ec264- b10c-4079- 94bb-2af01db58a ab None None] Conflict project: (pymysql. err.IntegrityEr ror) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`keystone`.`user`, CONSTRAINT `user_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `project` (`id`))') [SQL: u'DELETE FROM project WHERE project.id = %(id)s'] [parameters: {'id': u'63d2d5446e364 f00b3181bf49c62 c5b8'}] {{(pid=23897) wrapper /opt/stack/ keystone/ keystone/ common/ sql/core. py:550} } openSUSE- Leap <email address hidden>[23894]: WARNING keystone. common. wsgi [None req-707ec264- b10c-4079- 94bb-2af01db58a ab None None] An unexpected error prevented the server from fulfilling your request.: UnexpectedError: An unexpected error prevented the server from fulfilling your request.
Sep 21 19:37:17 vagrant-
Steps to reproduce:
1. Install devstack
2. create a domain 'foo'
openstack domain create foo
3. create a user in domain 'foo'
openstack user create --password equifax --domain foo foo_user
4. create a project in domain 'foo'
openstack project create --domain foo foo_project
5. enable domain user 'foo_user' access to project 'foo_project'
openstack role add --user foo_user --project foo_project admin
6. now disable domain 'foo'
openstack domain set --disable foo
7. attempt to delete domain 'foo' will yield an expected error mentioned above
openstack domain delete foo