Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1418

rpc buy-car failed with http status 501

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • Beryllium
    • None
    • clustering
    • None
    • Operating System: Linux
      Platform: PC

    • 4220
    • Normal

    Description

      odl: http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.3.2-SNAPSHOT//distribution-karaf-0.3.2-20150826.090317-16.tar.gz

      steps to reproduce (taken from tcpdump:

      1) ADDING PERSON
      POST /restconf/config/people:people HTTP/1.1
      Host: g32:8181
      Accept-Encoding: identity
      Content-Length: 95
      Content-Type: application/json
      Authorization: Basic YWRtaW46YWRtaW4=
      {"person": [

      {"contactNo": "1", "gender": "male", "age": "99", "id": 1, "address": "address1"}

      ]}

      HTTP/1.1 204 No Content
      Location: http://g32:8181/restconf/config/people:people
      Server: Jetty(8.1.15.v20140411)

      2) ADDING CAR
      POST /restconf/config/car:cars HTTP/1.1
      Host: g32:8181
      Accept-Encoding: identity
      Content-Length: 123
      Content-Type: application/json
      Authorization: Basic YWRtaW46YWRtaW4=
      {"car-entry": [

      {"category": "my_category", "model": "model1", "manufacturer": "my_manufacturer", "id": 1, "year": "2015"}

      ]}

      HTTP/1.1 204 No Content
      Location: http://g32:8181/restconf/config/car:cars
      Server: Jetty(8.1.15.v20140411)

      3) PURCHASE
      POST /restconf/operations/car-purchase:buy-car HTTP/1.1
      Host: g32:8181
      Accept-Encoding: identity
      Content-Length: 140
      Content-Type: application/json
      Authorization: Basic YWRtaW46YWRtaW4=

      {"input": {"car-purchase:person": "/people:people/people:person[people:id='1']", "car-purchase:car-id": "1", "car-purchase:person-id": "1"}}

      HTTP/1.1 500 Server Error
      Content-Type: application/json
      Transfer-Encoding: chunked
      Server: Jetty(8.1.15.v20140411)

      58F

      {"errors":{"error":[{"error-type":"application","error-tag":"operation-failed","error-message":"The operation encountered an unexpected error while executing.","error-info":"org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementationNotAvailableException: No local or remote implementation available for rpc AbsoluteSchemaPath

      {path=[(urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:car-purchase?revision=2014-08-18)buy-car]}

      \n\tat org.opendaylight.controller.remote.rpc.RemoteRpcImplementation$1.onComplete(RemoteRpcImplementation.java:57)\n\tat org.opendaylight.controller.remote.rpc.RemoteRpcImplementation$1.onComplete(RemoteRpcImplementation.java:48)\n\tat akka.dispatch.OnComplete.internal(Future.scala:248)\n\tat akka.dispatch.OnComplete.internal(Future.scala:245)\n\tat akka.dispatch.japi$CallbackBridge.apply(Future.scala:175)\n\tat akka.dispatch.japi$CallbackBridge.apply(Future.scala:172)\n\tat scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)\n\tat scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107)\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\n"}]}}

      0

      Get cars and persons returns
      <cars xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:car"><car-entry><id>1</id><year>2015</year><category>my_category</category><manufacturer>my_manufacturer</manufacturer><model>model1</model></car-entry></cars>
      Out[19]: <Response [200]>

      <people xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:people"><person><id>1</id><contactNo>1</contactNo><address>address1</address><age>99</age><gender>male</gender></person></people>

      But buying a car with non existing user id "user1" pass, but buying with correct id "1" fails with 500 (see above)

      POST /restconf/operations/car-purchase:buy-car HTTP/1.1
      Host: g32:8181
      Content-Length: 230
      Accept-Encoding: gzip, deflate
      Accept: /
      User-Agent: python-requests/2.4.1 CPython/2.7.6 Linux/3.13.0-55-generic
      Connection: keep-alive
      Content-Type: application/json
      Authorization: Basic YWRtaW46YWRtaW4=
      {
      "input" :

      { "car-purchase:person" : "/people:people/people:person[people:id='user1']", "car-purchase:person-id" : "user1", "car-purchase:car-id" : "1" }

      }

      HTTP/1.1 200 OK
      Content-Type: application/yang.operation+json
      Content-Length: 0
      Server: Jetty(8.1.15.v20140411)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            pgubka@cisco.com Peter Gubka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: