creating project in invalid domain raises SQL exception

Bug #1223036 reported by Adam Young on 2013-09-09
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Low
Adam Young

Bug Description

V3 API

export KEYSTONE_TOKEN=`keystone token-get | awk '/ id / { print $4}'`

curl -H "X-Auth-Token:$KEYSTONE_TOKEN" -d '{"project":{"domain_id":"invalid-domain", "name":"projectY"}}' -H "Content-Type: application/json" http://localhost:35357/v3/projects

{"error": {"message": "Conflict occurred attempting to store project. (1452, 'Cannot add or update a child row: a foreign key constraint fails (`keystone`.`project`, CONSTRAINT `project_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`))')", "code": 409, "title": "Conflict"}}(.venv)[ayoung@ayoung530 keystone

Adam Young (ayoung) on 2013-09-09
Changed in keystone:
assignee: nobody → Adam Young (ayoung)
importance: Undecided → Low
status: New → Confirmed
Dolph Mathews (dolph) on 2013-09-09
Changed in keystone:
milestone: none → havana-rc1

Fix proposed to branch: master
Review: https://review.openstack.org/47037

Changed in keystone:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/47037
Committed: http://github.com/openstack/keystone/commit/e692eeadb9d8ae5f4797bcd28d597ee314ea8dff
Submitter: Jenkins
Branch: master

commit e692eeadb9d8ae5f4797bcd28d597ee314ea8dff
Author: Adam Young <email address hidden>
Date: Tue Sep 17 18:16:25 2013 -0400

    check for domain existence before doing any ID work

    Bug 1223036

    Change-Id: Ie263160b2c75732b13fdbf440b4f2f31ea70d245

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-10-02
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers