This group is locked. No changes can be made to the group while it is locked.
Date
1 - 15 of 15
user create gives 500/NPE
Jamo Luhrsen <jluhrsen@...>
(subject changed)
On 04/27/2017 06:34 AM, Ryan Goulding wrote: The stuff you are referring to works, JamO, and is completely orthogonal to the issue Luis reports. If you paste the exactyeah, if you can help me get it right I'll fix the CSIT. Still, I don't expect a 500/NPE from AAA, so should that be a bug on it's own? here's kind of my repro, if you can help me know what's wrong: # Create a Domain 14:28 $ curl -u "admin:admin" -X POST -d '{"description":"BeerClubAficionado","domainid":"96","name":"RyanRocks","enabled":"true"}' -H "Content-Type: application/json" http://$ODL:8181/auth/v1/domains {"domainid":"RyanRocks","name":"RyanRocks","description":"BeerClubAficionado","enabled":true} # Look at domains (question: why is domainid==name, when I gave a '96' in the create?) 14:30 $ curl -u "admin:admin" http://$ODL:8181/auth/v1/domains | python -m json.tool { "domains": [ { "description": "default odl sdn domain", "domainid": "sdn", "enabled": true, "name": "sdn" }, { "description": "planetary domain", "domainid": "Alderaan-2017-04-12-17-31", "enabled": true, "name": "Alderaan-2017-04-12-17-31" }, { "description": "BeerClubAficionado", "domainid": "RyanRocks", "enabled": true, "name": "RyanRocks" } ] } # add a user to this new domain # first try is using domainid = 96, but get 500/NPE # second try uses domainid = $name, but also get 500/NPE ✔ ~ 14:30 $ curl -u "admin:admin" -X POST -d '{"description":"The Man","name":"Goulding","enabled":"true","domainid":"96"}' -H "Content-Type: application/json" http://$ODL:8181/auth/v1/users <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</h2> <p>Problem accessing /auth/v1/users. Reason: <pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NullPointerException at org.opendaylight.aaa.idm.rest.UserHandler.createUser(UserHandler.java:199) ... <snip> ... 14:31 $ curl -u "admin:admin" -X POST -d '{"description":"The Man","name":"Goulding","enabled":"true","domainid":"RyanRocks"}' -H "Content-Type: application/json" http://$ODL:8181/auth/v1/users <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</h2> <p>Problem accessing /auth/v1/users. Reason: <pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NullPointerException at org.opendaylight.aaa.idm.rest.UserHandler.createUser(UserHandler.java:199) ... <snip> ... Thanks, JamO 1) it does not work in Boron, I get 500 Server error + NPE [1] when I try: POST
|
|
Ryan Goulding <ryandgoulding@...>
The domain id "96" does not exist. Probably should be a better error message, but you need to use a domain that exists or you will get internal server error. Regards, Ryan Goulding
On Thu, Apr 27, 2017 at 5:36 PM, Jamo Luhrsen <jluhrsen@...> wrote: (subject changed)
|
|
Jamo Luhrsen <jluhrsen@...>
so, when creating a domain you have to use a domain id that already exists? where do I find
toggle quoted messageShow quoted text
that domainid? JamO
On 05/04/2017 12:51 PM, Ryan Goulding wrote:
The domain id "96" does not exist. Probably should be a better error message, but you need to use a domain that exists or
|
|
Ryan Goulding <ryandgoulding@...>
Its either going to be the default one (sdn) or one you created. You can find out which ones exist by: Note: it will be python etc/idmtool in Carbon since we didn't get that bug fix in in time.ryan@ubuntu:/code/aaa-nitrogen/karaf/target/assembly$ python bin/idmtool admin list-domains Password: list_domains command succeeded! json: { "domains": [ { "description": "default odl sdn domain", "domainid": "sdn", "enabled": true, "name": "sdn" } ] } ryan@ubuntu:/code/aaa-nitrogen/karaf/target/assembly$ Regards, Ryan Goulding
On Thu, May 4, 2017 at 3:53 PM, Jamo Luhrsen <jluhrsen@...> wrote: so, when creating a domain you have to use a domain id that already exists? where do I find
|
|
Ryan Goulding <ryandgoulding@...>
I will also note that it is not entirely useful at the moment to derive multiple tenants. This was an aspect of the data model that original contributors added, but never quite put their heads around. We have kept it for compatibility purposes, but just recommend using "sdn". I.e., network segmentation over RESTCONF is something that you are better off using "roles" for instead of "tenants". In nitrogen, we hope to improve this OOB. Right now, the only difference will primarily be in logging for tenants. Not particularly great but wasn't a priority to fix fin the past. Regards, Ryan Goulding
On Thu, May 4, 2017 at 4:00 PM, Ryan Goulding <ryandgoulding@...> wrote:
|
|
Jamo Luhrsen <jluhrsen@...>
wait, I get the sense you missed my first step where I did create a domain. I created it
toggle quoted messageShow quoted text
with the domainid 96. JamO
On 05/04/2017 01:00 PM, Ryan Goulding wrote:
Its either going to be the default one (sdn) or one you created. You can find out which ones exist by:
|
|
Mohamed ElSerngawy <melserngawy@...>
Hi Jamo, You are not suppose to set the domain-id [0].
On Thu, May 4, 2017 at 4:11 PM, Jamo Luhrsen <jluhrsen@...> wrote: wait, I get the sense you missed my first step where I did create a domain. I created it
|
|
Ryan Goulding <ryandgoulding@...>
I'd call that a bug on our side. If we expose it we ought to honor it if it is there. Regards, Ryan Goulding
On Thu, May 4, 2017 at 4:21 PM, Mohamed ElSerngawy <melserngawy@...> wrote:
|
|
Mohamed ElSerngawy <melserngawy@...>
yes, I agree. I don't know why does it exist in this way
On Thu, May 4, 2017 at 4:24 PM, Ryan Goulding <ryandgoulding@...> wrote:
|
|
Jamo Luhrsen <jluhrsen@...>
so two things.
toggle quoted messageShow quoted text
1) I'll open a bug that we should not allow a domain create to specify the domainid. 2) more importantly, it does not fix my NPE to *not* use a domainid when creating it. can one of you try these three curl cmds with your setup to see if maybe I'm crazy: curl -u "admin:admin" -X POST -d '{"description":"BeerClubAficionado1","name":"RyanRocks1","enabled":"true"}' -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains curl -u "admin:admin" http://$ODL:8181/auth/v1/domains | python -m json.tool curl -u "admin:admin" -X POST -d '{"description":"The Man","name":"Goulding","enabled":"true","domainid":"RyanRocks1"}' -H "Content-Type: application/json" http://$ODL:8181/auth/v1/users JamO
On 05/04/2017 01:29 PM, Mohamed ElSerngawy wrote:
yes, I agree. I don't know why does it exist in this way
|
|
Ryan Goulding <ryandgoulding@...>
Created [0] and submitted patch [1]. Basically, idmtool.py fills in an email in the request with an empty string. However, the rest endpoint had a bug that we didn't notice since most people just use idmtool.py (if email not provided, NPE occurs).
On Thu, May 4, 2017 at 4:35 PM, Jamo Luhrsen <jluhrsen@...> wrote: so two things.
|
|
Ryan Goulding <ryandgoulding@...>
Regards, Ryan Goulding
On Thu, May 4, 2017 at 4:52 PM, Ryan Goulding <ryandgoulding@...> wrote:
|
|
Jamo Luhrsen <jluhrsen@...>
cool beans.
toggle quoted messageShow quoted text
I filed 8282 as well. I'll get CSIT working like we need it and add an extra test case to NOT use email which will fail until 8283 is fixed. Thanks guys, JamO
On 05/04/2017 01:54 PM, Ryan Goulding wrote:
[0] https://bugs.opendaylight.org/show_bug.cgi?id=8383
|
|
Ryan Goulding <ryandgoulding@...>
Hi Jamo et al., Just to continue this thread in case anyone is ever looking through archives, I have proposed a fix here [0]. Since ids should be considered an internal detail, I repeated the checks for all other aspects of the AAA data store (grantid, userid, roleid, domainid). In the case that someone does specify an id, a 400 HTTP error message is returned to the client, since the client request is flawed. Does this seem like a good approach? For reference, we are hoping to migrate to an OOB MDSAL based store in Nitrogen.
On Thu, May 4, 2017 at 4:58 PM, Jamo Luhrsen <jluhrsen@...> wrote: cool beans.
|
|
Jamo Luhrsen <jluhrsen@...>
Thanks Ryan,
toggle quoted messageShow quoted text
and from my side, here is a topic-branch to try and breathe some life back in to that CSIT job: https://git.opendaylight.org/gerrit/#/q/status:open+project:integration/test+branch:master+topic:aaa-needs-help JamO
On 05/05/2017 10:06 AM, Ryan Goulding wrote: Hi Jamo et al., |