[OPNFLWPLUG-401] setting metadatamask is required but 0xffffffffffffffff is causing exception Created: 14/Apr/15  Updated: 27/Sep/21  Resolved: 30/Apr/15

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Henry Fung Assignee: Henry Fung
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: 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



 Comments   
Comment by Michal Rehak [ 22/Apr/15 ]

https://git.opendaylight.org/gerrit/18841 merged
please test and eventually close this bug

Generated at Wed Feb 07 20:32:22 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.