Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-401

setting metadatamask is required but 0xffffffffffffffff is causing exception

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 2995

    Description

      Hi Henry,
      please file a bug and attach your fix proposal. I guess the same should be done for metadata value field in order to prevent the range check violation.

      If you want to speed up the fix process feel free to commit the fix.

      Thank you.
      Regards,
      Michal

      From: openflowplugin-dev-bounces@lists.opendaylight.org [openflowplugin-dev-bounces@lists.opendaylight.org] on behalf of Henry Fung [henry.fung@live.com]
      Sent: Tuesday, April 14, 2015 06:51
      To: openflowplugin-dev@lists.opendaylight.org
      Subject: [openflowplugin-dev] FW: Bug in metadatamask handling

      Sir,

      Please check in the following fix in openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / OFToMDSalFlowConvertor.java

      <<<

      121
      writeMetadataBuilder.setMetadataMask(new BigInteger(writeMetadataCase.getWriteMetadata().getMetadataMask()));
      >>>
      121
      writeMetadataBuilder.setMetadataMask(new BigInteger(1, writeMetadataCase.getWriteMetadata().getMetadataMask()));

      Your help is appreciated.

      Henry
      From: henry.fung@live.com
      To: openflowplugin-dev@lists.opendaylight.org
      Subject: Bug in metadatamask handling
      Date: Mon, 13 Apr 2015 22:18:22 -0600

      I encountered an exception when using metadatamask 0xffffffffffffffff. It is interpreted as -1, causing the exception.

      015-04-13 20:37:11,169 | ERROR | OFmsgProcessor-3 | TicketProcessorFactoryImpl | 195 - org.opendaylight.openflowplugin - 0.1.0.SNAPSHOT | translation problem: Invalid range: -1, expected: [[0‥18446744073709551615]].

      2015-04-13 20:37:11,169 | WARN | OFmsgFinisher-0 | TicketFinisherImpl | 195 - org.opendaylight.openflowplugin - 0.1.0.SNAPSHOT | processing (translate, publish) of ticket failed

      java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Invalid range: -1, expected: [[0‥18446744073709551615]].

      at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)[67:com.google.guava:18.0.0]

      at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)[67:com.google.guava:18.0.0]

      at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)[67:com.google.guava:18.0.0]

      at org.opendaylight.openflowplugin.openflow.md.queue.TicketFinisherImpl.run(TicketFinisherImpl.java:50)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_75]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_75]

      at java.lang.Thread.run(Thread.java:745)[:1.7.0_75]

      Caused by: java.lang.IllegalArgumentException: Invalid range: -1, expected: [[0‥18446744073709551615]].

      at org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.write.metadata._case.WriteMetadataBuilder.setMetadataMask(WriteMetadataBuilder.java:102)[188:org.opendaylight.openflowplugin.model.flow-base:0.1.0.SNAPSHOT]

      at org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.OFToMDSalFlowConvertor.toSALInstruction(OFToMDSalFlowConvertor.java:121)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      at org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.FlowStatsResponseConvertor.toSALFlowStats(FlowStatsResponseConvertor.java:103)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      at org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.FlowStatsResponseConvertor.toSALFlowStatsList(FlowStatsResponseConvertor.java:49)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      at org.opendaylight.openflowplugin.openflow.md.core.translator.MultipartReplyTranslator.translate(MultipartReplyTranslator.java:135)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      at org.opendaylight.openflowplugin.openflow.md.core.translator.MultipartReplyTranslator.translate(MultipartReplyTranslator.java:106)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      at org.opendaylight.openflowplugin.openflow.md.queue.TicketProcessorFactoryImpl.translate(TicketProcessorFactoryImpl.java:166)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      at org.opendaylight.openflowplugin.openflow.md.queue.TicketProcessorFactoryImpl$1.run(TicketProcessorFactoryImpl.java:78)[195:org.opendaylight.openflowplugin:0.1.0.SNAPSHOT]

      ... 3 more

      Attachments

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

        Activity

          People

            henry.fung@live.com Henry Fung
            henry.fung@live.com Henry Fung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: