Regards,
Steve Martinelli
Software Developer - Openstack
Keystone Core Member
|
| |
| Phone:
1-905-413-2851 E-mail: [email protected] |
8200 Warden Ave Markham, ON L6G 1C7 Canada |
From: Michael Hearn <[email protected]>
To: "[email protected]" <[email protected]>,
Date: 06/24/2014 09:03 PM
Subject: [Openstack] keystone api: create user raises 'domain_id' cannot be null"
Hitting an issue with icehouse when using python & the keystone api to create a new user. Have tried both v2.0 and v3 of the api, both failing with the same error. Specifically, the latter part of the exception indicates the value of the domain given in the users.create method isn't being passed on (or so it seems) causing the sql insert to fail. While I am not passing a domain name when using v2.0 I am when using v3.
Has anyone come up against this before and can offer any advice?
File "/usr/lib/python2.7/dist-packages/keystoneclient/session.py", line 251, in request
raise exceptions.from_response(resp, method, url)
keystoneclient.apiclient.exceptions.InternalServerError: An unexpected error prevented the server from fulfilling your request. (OperationalError) (1048, "Column 'domain_id' cannot be null") 'INSERT INTO user (id, name, domain_id, password, enabled, extra, default_project_id) VALUES (%s, %s, %s, %s, %s, %s, %s)' ('25119086c00543e9b2237176c8413b9d', 'foo', None, '$6$rounds=40000$CIv4ypG0UQkAU45i$39Y3MbfILnU1KbJtNcuCpIdhL/7cHxWomv6YKDapMx1zTM7Trdzu3rQC.2zWQyNIRrekNMFhaoNttdyHlF5Ca0', 1, '{"email": "[email protected]"}', 'default') (HTTP 500)
#Snippet of V3 code
from keystoneclient.v3 import client
keystone = client.Client(user_domain_name = "Default",
username="admin",
password="xxxxxxxx",
project_name="admin",
auth_url="http://server:5000/v3/")
keystone.users.create(domain='Default',
name="foo",
password="bar",
email="[email protected]",
enabled=True)
# Snippet of v2 code
from keystoneclient.v2_0 import client
keystone = client.Client(username="admin",
password="xxxxxxxx",
project_name="admin",
auth_url="http://server:5000/v2.0/")
keystone.users.create( name="foo",
password="bar",
email="[email protected]",
enabled=True)
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
_______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : [email protected] Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
