<font size=2 face="sans-serif">Looks like your databases might be out
of sync, have you tried running 'keystone-manage db_sync' ?<br>
</font>
<br><font size=2 face="sans-serif"><br>
</font>
<br><font size=1 face="Arial">Regards,</font>
<br>
<br><font size=3 color=#8f8f8f face="Arial"><b>Steve Martinelli</b></font><font size=1 face="Arial"><br>
Software Developer - Openstack<br>
Keystone Core Member</font>
<table width=680 style="border-collapse:collapse;">
<tr height=8>
<td width=680 colspan=2 style="border-style:solid;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<hr>
<tr valign=top height=8>
<td width=420 style="border-style:solid;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 color=#4181c0 face="Arial"><b>Phone:</b></font><font size=1 color=#5f5f5f face="Arial">
1-905-413-2851</font><font size=1 color=#4181c0 face="Arial"><b><br>
E-mail:</b></font><font size=1 color=#5f5f5f face="Arial"> </font><a href=mailto:stevemar@ca.ibm.com target=_blank><font size=1 color=#5f5f5f face="Arial"><u>stevemar@ca.ibm.com</u></font></a>
<td width=259 style="border-style:solid;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 color=#5f5f5f face="Arial">8200 Warden Ave<br>
Markham, ON L6G 1C7<br>
Canada</font></div></table>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Michael Hearn <mrhearn@gmail.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">"openstack@lists.openstack.org"
<openstack@lists.openstack.org>, </font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">06/24/2014 09:03 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">[Openstack]
keystone api: create user raises 'domain_id' cannot be
null"</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>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. <br>
</font>
<br><font size=3>Has anyone come up against this before and can offer any
advice?</font>
<br><font size=3><br>
File "/usr/lib/python2.7/dist-packages/keystoneclient/session.py",
line 251, in request<br>
raise exceptions.from_response(resp, method, url)<br>
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": "</font><a href=mailto:foo@email.com><font size=3 color=blue><u>foo@email.com</u></font></a><font size=3>"}',
'default') (HTTP 500)</font>
<br><font size=3><br>
<br>
#Snippet of V3 code<br>
from keystoneclient.v3 import client<br>
keystone = client.Client(user_domain_name = "Default",<br>
username="admin",<br>
password="xxxxxxxx",<br>
project_name="admin",<br>
auth_url="</font><a href=http://server:5000/v3/><font size=3 color=blue><u>http://server:5000/v3/</u></font></a><font size=3>")<br>
<br>
keystone.users.create(domain='Default',<br>
name="foo",<br>
password="bar",<br>
email="</font><a href=mailto:foo@email.com><font size=3 color=blue><u>foo@email.com</u></font></a><font size=3>",<br>
enabled=True)<br>
</font>
<br><font size=3># Snippet of v2 code</font>
<br><font size=3>from keystoneclient.v2_0 import client<br>
keystone = client.Client(username="admin",<br>
password="xxxxxxxx",<br>
project_name="admin",<br>
auth_url="</font><a href=http://server:5000/v2.0/><font size=3 color=blue><u>http://server:5000/v2.0/</u></font></a><font size=3>")<br>
<br>
keystone.users.create( name="foo",<br>
password="bar",<br>
email="</font><a href=mailto:foo@email.com><font size=3 color=blue><u>foo@email.com</u></font></a><font size=3>",<br>
enabled=True)<br>
</font><tt><font size=2>_______________________________________________<br>
Mailing list: </font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack"><tt><font size=2>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</font></tt></a><tt><font size=2><br>
Post to : openstack@lists.openstack.org<br>
Unsubscribe : </font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack"><tt><font size=2>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</font></tt></a><tt><font size=2><br>
</font></tt>
<br>