Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-3792

onos 1.5.0-SNAPSHOT meter rest api problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Epic Link:
    • Sprint:
      Falcon Sprint #2 (1/25 - 2/12)

      Description

      I test using meter rest api of the 1.5.0-SNAPSHOT,
      I tried the following step 1,2,3 many times ,
      always get the same problem.

      1.
      add meter by rest api , then input 'meters' commands in CLI display correctly.
      post http://127.0.0.1:8181/onos/v1/meters/of:0000d688c4e9d344
      {
      "id": 1,
      "deviceId": "of:0000d688c4e9d344",
      "unit": "KB_PER_SEC",
      "bands": [

      { "type": "REMARK", "rate": 10, "prec": 20, "burstSize": 30 }

      ]
      }
      first few secounds show "PENDING_ADD"
      onos> meters
      DefaultMeter{device=of:0000d688c4e9d344, id=1, appId=org.onosproject.rest, unit=KB_PER_SEC, isBurst=false, state=PENDING_ADD, bands=[DefaultBand

      {rate=10, burst-size=30, type=REMARK, drop-precedence=20}]}
      later
      onos> meters
      DefaultMeter{device=of:0000d688c4e9d344, id=1, appId=org.onosproject.rest, unit=KB_PER_SEC, isBurst=false, state=ADDED, bands=[DefaultBand{rate=10, burst-size=30, type=REMARK, drop-precedence=20}

      ]}

      2.
      DELTE by rest api
      http://127.0.0.1:8181/onos/v1/meters/of:0000d688c4e9d344/1
      meters delete correctly.
      then input 'meters' commands in CLI display correctly.
      first few secounds show "PENDING_REMOVE"
      later meter is deleted.

      3.
      repeat POST as step 1.
      then always get PENDING_ADD
      onos> meters
      DefaultMeter{device=of:0000d688c4e9d344, id=2, appId=org.onosproject.rest, unit=KB_PER_SEC, isBurst=false, state=PENDING_ADD, bands=[DefaultBand

      {rate=10, burst-size=30, type=REMARK, drop-precedence=20}

      ]}

      meters can not be added correctly after the first add and delete loop.

      log always print METER_EXISTS, in ovs side meter has add meter success. but onos is always PENDING_ADD

      root@ubuntu:~# tail -F $KARAF_LOG
      2016-01-15 00:05:22,416 | ERROR | w I/O worker #10 | OFChannelHandler                 | 164 - org.onosproject.onos-of-ctl - 1.5.0.SNAPSHOT | OFMeterModFailedErrorMsgVer13(xid=2, code=METER_EXISTS, data=OFMeterModVer13(xid=2, command=0, flags=1, meterId=2, meters=[OFMeterBandDscpRemarkVer13(rate=10, burstSize=0, precLevel=20)])) from switch org.onosproject.driver.handshaker.NiciraSwitchHandshaker [/127.0.0.1:40502 DPID[00:00:d6:88:c4:e9:d3:44]] in state ACTIVE
      2016-01-15 00:05:22,422 | WARN  | f-event-stats-26 | OpenFlowRuleProvider             | 167 - org.onosproject.onos-of-provider-flow - 1.5.0.SNAPSHOT | Received error message OFMeterModFailedErrorMsgVer13(xid=2, code=METER_EXISTS, data=OFMeterModVer13(xid=2, command=0, flags=1, meterId=2, meters=[OFMeterBandDscpRemarkVer13(rate=10, burstSize=0, precLevel=20)])) from 00:00:d6:88:c4:e9:d3:44
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              pyguni Jian Li
              Reporter:
              wuyinliang yinliang wu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: