[AAA-134] unable to update/modify domain Created: 16/May/17  Updated: 21/Mar/19  Resolved: 09/Feb/18

Status: Verified
Project: aaa
Component/s: General
Affects Version/s: None
Fix Version/s: Oxygen

Type: Bug
Reporter: Jamo Luhrsen Assignee: Ryan Goulding
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8477

 Description   

INITIAL STATE:
--------------

13:46 $ curl -u "admin:admin" -X GET -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains | python -m json.tool

{
"domains": [

{ "description": "default odl sdn domain", "domainid": "sdn", "enabled": true, "name": "sdn" }

]
}

CREATE DOMAIN "OpenFlowSucks":
------------------------------

13:46 $ curl -u "admin:admin" -X POST -d '

{"description":"OpenFlow Is King","name":"OpenFlowSucks","enabled":"true"}

' -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains/

{"domainid":"OpenFlowSucks","name":"OpenFlowSucks","description":"OpenFlow Is King","enabled":true}

13:46 $ curl -u "admin:admin" -X GET -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains | python -m json.tool

{
"domains": [

{ "description": "default odl sdn domain", "domainid": "sdn", "enabled": true, "name": "sdn" }

,

{ "description": "OpenFlow Is King", "domainid": "OpenFlowSucks", "enabled": true, "name": "OpenFlowSucks" }

]
}

UPDATE DOMAIN NAME TO HAVE NAME "OpenFlowRocks":
------------------------------------------------

13:46 $ curl -u "admin:admin" -X PUT -d '

{"description":"OpenFlow Is King","name":"OpenFlowRocks","enabled":"true"}

' -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains/OpenFlowSucks

{"domainid":"OpenFlowSucks","name":"OpenFlowRocks","description":"OpenFlow Is King","enabled":true}

13:47 $ curl -u "admin:admin" -v -X GET -H "Content-Type:application/json" http://$ODL:8181/auth/v1/domains | python -m json.tool

  • Server auth using Basic with user 'admin'
    > GET /auth/v1/domains HTTP/1.1
    > Host: 209.132.178.40:8181
    > Authorization: Basic YWRtaW46YWRtaW4=
    > User-Agent: curl/7.51.0
    > Accept: /
    > Content-Type:application/json
    >
    < HTTP/1.1 200 OK
    < Set-Cookie: JSESSIONID=riqfpnfaqc3k8v43k9ham06k;Path=/auth
    < Expires: Thu, 01 Jan 1970 00:00:00 GMT
    < Set-Cookie: rememberMe=deleteMe; Path=/auth; Max-Age=0; Expires=Mon, 15-May-2017 20:47:13 GMT
    < Content-Type: application/json
    < Transfer-Encoding: chunked
    < Server: Jetty(8.1.19.v20160209)
    <
    { [210 bytes data]
  • Curl_http_done: called premature == 0
    100 199 0 199 0 0 1695 0 -::- -::- -::- 1700
  • Connection #0 to host 209.132.178.40 left intact

{
"domains": [

{ "description": "default odl sdn domain", "domainid": "sdn", "enabled": true, "name": "sdn" }

,

{ "description": "OpenFlow Is King", "domainid": "OpenFlowSucks", "enabled": true, "name": "OpenFlowSucks" }

]
}

As you can see above, the new name was not updated, although the PUT was accepted
and gave 200 response back.

the karaf log is tracking these same steps:

2017-05-16 20:46:50,013 | INFO | p1124141104-2109 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Post /domains
2017-05-16 20:46:51,741 | INFO | p1124141104-2109 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Get /domains
2017-05-16 20:47:09,808 | INFO | p1124141104-2189 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Put /domains/OpenFlowSucks
2017-05-16 20:47:09,842 | INFO | p1124141104-2189 | IdmLightProxy | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Clearing the claim cache
2017-05-16 20:47:13,041 | INFO | p1124141104-2189 | DomainHandler | 287 - org.opendaylight.aaa.idmlight - 0.5.0.SNAPSHOT | Get /domains



 Comments   
Comment by Jamo Luhrsen [ 16/May/17 ]

this came from trying to get CSIT working for the idmlite job. It appears
that probably other nouns are affected the same, like users and roles.

here is a recent job for reference:
https://logs.opendaylight.org/releng/jenkins092/aaa-csit-1node-idmlite-only-carbon/462/archives/log.html.gz

Comment by Ryan Goulding [ 08/Feb/18 ]

Candidate Patch: https://git.opendaylight.org/gerrit/#/c/68063/

Comment by Jamo Luhrsen [ 09/Feb/18 ]

using the distribution created in the candidate patch, I've verified the fix.  thanks Ryan

Generated at Wed Feb 07 19:08:43 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.