creating project in invalid domain raises SQL exception

Bug #1223036 reported by Adam Young
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
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)
Changed in keystone:
assignee: nobody → Adam Young (ayoung)
importance: Undecided → Low
status: New → Confirmed
Dolph Mathews (dolph)
Changed in keystone:
milestone: none → havana-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

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)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.