-
Bug
-
Resolution: Done
-
None
-
unspecified
-
None
-
Operating System: All
Platform: All
-
3538
This is related to OVSDB-150
I added debug code like below for debugging(line 285),
276 if (isPortDeleted) {
277 // Iterate through all actions in the modified list and adjust the order of
278 // the actions left behind. With that, all actions that have order higher than
279 // the action removed gets their value decremented by 1. Note that this iteration
280 // visits all entries to account for cases where the list order is not the same
281 // as the action's order.
282 //
283 for (int i = 0; i < actionList.size(); i++) {
284 Action action = actionList.get;
285 logger.debug("################# i = {}, action = {}, order = {}, key = {}, rmo = {}", i, action.getAction(), action.getOrder(), action.getKey(), removedActionOrder );
and debug log likes below
2015-05-22 19:01:48,318 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | removeOutputPortFromInstructions() Node Connector ID is - Type=openflow: DPID=77207755810117 port=6 existingInstructions=[Instruction{getInstruction=ApplyActionsCase{getApplyActions=ApplyActions{getAction=[Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:9], augmentations={}}, augmentations={}}, getOrder=6, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:8], augmentations={}}, augmentations={}}, getOrder=5, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:7], augmentations={}}, augmentations={}}, getOrder=4, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:6], augmentations={}}, augmentations={}}, getOrder=3, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:5], augmentations={}}, augmentations={}}, getOrder=2, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:4], augmentations={}}, augmentations={}}, getOrder=1, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:3], augmentations={}}, augmentations={}}, getOrder=0, augmentations={}}], augmentations={}}, augmentations={}}, getOrder=0, augmentations={}}]
2015-05-22 19:01:48,319 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 0, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:9], augmentations={}}, augmentations={}}, order = 6, key = ActionKey [_order=6], rmo = 3
2015-05-22 19:01:48,320 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 1, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:8], augmentations={}}, augmentations={}}, order = 5, key = ActionKey [_order=5], rmo = 3
2015-05-22 19:01:48,320 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 2, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:7], augmentations={}}, augmentations={}}, order = 4, key = ActionKey [_order=4], rmo = 3
2015-05-22 19:01:48,321 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 3, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:5], augmentations={}}, augmentations={}}, order = 2, key = ActionKey [_order=2], rmo = 3
2015-05-22 19:01:48,321 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 4, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:4], augmentations={}}, augmentations={}}, order = 1, key = ActionKey [_order=1], rmo = 3
2015-05-22 19:01:48,322 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 5, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:3], augmentations={}}, augmentations={}}, order = 0, key = ActionKey [_order=0], rmo = 3
2015-05-22 19:01:48,322 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | removeOutputPortFromInstructions() : applyAction ApplyActions [_action=[Action [_action=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:9], augmentations={}}, augmentations={}}, _key=ActionKey [_order=0], _order=0, augmentation=[]], Action [_action=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:8], augmentations={}}, augmentations={}}, _key=ActionKey [_order=1], _order=1, augmentation=[]], Action [_action=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:7], augmentations={}}, augmentations={}}, _key=ActionKey [_order=2], _order=2, augmentation=[]], Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:5], augmentations={}}, augmentations={}}, getOrder=2, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:4], augmentations={}}, augmentations={}}, getOrder=1, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:3], augmentations={}}, augmentations={}}, getOrder=0, augmentations={}}], augmentation=[]]
2015-05-22 19:01:48,826 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | removeOutputPortFromInstructions() Node Connector ID is - Type=openflow: DPID=77207755810117 port=6 existingInstructions=[Instruction{getInstruction=ApplyActionsCase{getApplyActions=ApplyActions{getAction=[Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:8], augmentations={}}, augmentations={}}, getOrder=7, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:9], augmentations={}}, augmentations={}}, getOrder=8, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:7], augmentations={}}, augmentations={}}, getOrder=6, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:6], augmentations={}}, augmentations={}}, getOrder=5, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:5], augmentations={}}, augmentations={}}, getOrder=4, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:4], augmentations={}}, augmentations={}}, getOrder=3, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:2], augmentations={}}, augmentations={}}, getOrder=2, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:1], augmentations={}}, augmentations={}}, getOrder=1, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:3], augmentations={}}, augmentations={}}, getOrder=0, augmentations={}}], augmentations={}}, augmentations={}}, getOrder=0, augmentations={}}]
2015-05-22 19:01:48,826 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 0, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:8], augmentations={}}, augmentations={}}, order = 7, key = ActionKey [_order=7], rmo = 5
2015-05-22 19:01:48,827 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 1, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:9], augmentations={}}, augmentations={}}, order = 8, key = ActionKey [_order=8], rmo = 5
2015-05-22 19:01:48,827 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 2, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:7], augmentations={}}, augmentations={}}, order = 6, key = ActionKey [_order=6], rmo = 5
2015-05-22 19:01:48,828 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 3, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:5], augmentations={}}, augmentations={}}, order = 4, key = ActionKey [_order=4], rmo = 5
2015-05-22 19:01:48,828 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 4, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:4], augmentations={}}, augmentations={}}, order = 3, key = ActionKey [_order=3], rmo = 5
2015-05-22 19:01:48,828 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | ################# i = 5, action = OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:2], augmentations={}}, augmentations={}}, order = 2, key = ActionKey [_order=2], rmo = 5
2015-05-22 19:01:48,829 | DEBUG | ool-176-thread-1 | InstructionUtils | 364 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.0.4.SNAPSHOT | removeOutputPortFromInstructions() : applyAction ApplyActions [_action=[Action [_action=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:8], augmentations={}}, augmentations={}}, _key=ActionKey [_order=0], _order=0, augmentation=[]], Action [_action=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:9], augmentations={}}, augmentations={}}, _key=ActionKey [_order=1], _order=1, augmentation=[]], Action [_action=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:7], augmentations={}}, augmentations={}}, _key=ActionKey [_order=2], _order=2, augmentation=[]], Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:5], augmentations={}}, augmentations={}}, getOrder=4, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:4], augmentations={}}, augmentations={}}, getOrder=3, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:2], augmentations={}}, augmentations={}}, getOrder=2, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:1], augmentations={}}, augmentations={}}, getOrder=1, augmentations={}}, Action{getAction=OutputActionCase{getOutputAction=OutputAction{getOutputNodeConnector=Uri [_value=openflow:77207755810117:3], augmentations={}}, augmentations={}}, getOrder=0, augmentations={}}], augmentation=[]]
ab.setKey(new ActionKey); // this should be changed like below
ab.setKey(new ActionKey(action.getOrder() -1));
if not orders will be all messed up.