-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: 1.0.0
-
Fix Version/s: 1.2.0
-
Component/s: None
-
Labels:
-
Environment:
Topology: three nodes tree topology. H1-SW2-SW1-SW3-H3
P2P intent: SW2/1 to SW3/1
H2H Intent: H1 to H3
ONOS are configured as a two nodes clustering. SW1 SW2 and SW3 are connected to two ONOS nodes and the mastership are randomly selected.compare with the master. following changes are made in order to test raft.
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.j
index 62bb77c..97381ac 100644
— a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java
@@ -49,7 +49,7 @@ import static com.google.common.base.Verify.verify;
import static org.onlab.onos.net.intent.IntentState.*;
import static org.slf4j.LoggerFactory.getLogger;-@Component(immediate = false, enabled = false)
+@Component(immediate = true, enabled = true)
@Service
public class DistributedIntentStore
extends AbstractStore<IntentEvent, IntentStoreDelegate>
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java
index 2f5d2e4..8c80a16 100644
— a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java
@@ -49,7 +49,7 @@ import static com.google.common.base.Verify.verify;
import static org.onlab.onos.net.intent.IntentState.*;
import static org.slf4j.LoggerFactory.getLogger;-@Component(immediate = true, enabled = true)
+@Component(immediate = true, enabled = false)
@Service
public class HazelcastIntentStore
extends AbstractHazelcastStore<IntentEvent, IntentStoreDelegate>
~Topology: three nodes tree topology. H1-SW2-SW1-SW3-H3 P2P intent: SW2/1 to SW3/1 H2H Intent: H1 to H3 ONOS are configured as a two nodes clustering. SW1 SW2 and SW3 are connected to two ONOS nodes and the mastership are randomly selected. compare with the master. following changes are made in order to test raft. diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.j index 62bb77c..97381ac 100644 — a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java @@ -49,7 +49,7 @@ import static com.google.common.base.Verify.verify; import static org.onlab.onos.net.intent.IntentState.*; import static org.slf4j.LoggerFactory.getLogger; -@Component(immediate = false, enabled = false) +@Component(immediate = true, enabled = true) @Service public class DistributedIntentStore extends AbstractStore<IntentEvent, IntentStoreDelegate> diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java index 2f5d2e4..8c80a16 100644 — a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentStore.java @@ -49,7 +49,7 @@ import static com.google.common.base.Verify.verify; import static org.onlab.onos.net.intent.IntentState.*; import static org.slf4j.LoggerFactory.getLogger; -@Component(immediate = true, enabled = true) +@Component(immediate = true, enabled = false) @Service public class HazelcastIntentStore extends AbstractHazelcastStore<IntentEvent, IntentStoreDelegate> ~
-
Epic Link:
-
Sprint:Cardinal Sprint 4 (5/4-5/15)
This console output is from OC1d
onos> flows
deviceId=of:0000000000000001, flowRuleCount=0
deviceId=of:0000000000000002, flowRuleCount=0
deviceId=of:0000000000000003, flowRuleCount=0
onos> add
add-flows add-host-intent add-multi-to-single-intent add-node add-optical-intent
add-point-intent addbundle addfilter addregion address-bindings
onos> add-host-intent 00:00:00:00:00:0
00:00:00:00:00:01/-1 00:00:00:00:00:02/-1 00:00:00:00:00:03/-1 00:00:00:00:00:04/-1
onos> add-host-intent 00:00:00:00:00:01/-1 00:00:00:00:00:0
00:00:00:00:00:01/-1 00:00:00:00:00:02/-1 00:00:00:00:00:03/-1 00:00:00:00:00:04/-1
onos> add-host-intent 00:00:00:00:00:01/-1 00:00:00:00:00:03/-1
onos> flows
deviceId=of:0000000000000001, flowRuleCount=2
id=ffff92d8eda9c15d, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=2}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=1}]
id=ffff9c58eda9c13f, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=1}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=2}
]
deviceId=of:0000000000000002, flowRuleCount=2
id=ffff92d8eda9c53d, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=3}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=1}]
id=ffff9c58eda9c501, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=1}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=3}
]
deviceId=of:0000000000000003, flowRuleCount=2
id=ffff92d8eda9c8c2, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=1}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=3}]
id=ffff9c58eda9c8fe, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=3}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=1}
]
onos> in
info install instance instance:clone
instance:connect instance:create instance:destroy instance:list
instance:opts-change instance:rename instance:rmi-registry-port-change instance:rmi-server-port-change
instance:ssh-host-change instance:ssh-port-change instance:start instance:status
instance:stop intents
onos> intents -i
id=0xffffffffbcc68ad9, state=INSTALLED, type=HostToHostIntent, appId=org.onlab.onos.cli
constraints=[LinkTypeConstraint
installable=[PathIntent{id=0xfffffffffdc99c58, appId=DefaultApplicationId{id=3, name=org.onlab.onos.cli}, selector=DefaultTrafficSelector{criteria=[ETH_DST{mac=00:00:00:00:00:03}, ETH_SRC{mac=00:00:00:00:00:01}]}, treatment=DefaultTrafficTreatment{instructions=[]}, constraints=[LinkTypeConstraint{inclusive=false, types=[OPTICAL]}
], path=DefaultPath{src=ConnectPoint
{elementId=00:00:00:00:00:01/-1, portNumber=0}, dst=ConnectPoint
{elementId=00:00:00:00:00:03/-1, portNumber=0}, type=INDIRECT, state=ACTIVE, durable=false}}, PathIntent{id=0xffffffff8fe692d8, appId=DefaultApplicationId
{id=3, name=org.onlab.onos.cli}, selector=DefaultTrafficSelector{criteria=[ETH_DST
{mac=00:00:00:00:00:01}, ETH_SRC
{mac=00:00:00:00:00:03}]}, treatment=DefaultTrafficTreatment
{instructions=[]}, constraints=[LinkTypeConstraint
{inclusive=false, types=[OPTICAL]}], path=DefaultPath{src=ConnectPoint{elementId=00:00:00:00:00:03/-1, portNumber=0}, dst=ConnectPoint{elementId=00:00:00:00:00:01/-1, portNumber=0}, type=INDIRECT, state=ACTIVE, durable=false}}]onos> remove-
remove-intent remove-node
onos> remove-intent 0xffffffffbcc68ad9
onos> flows
deviceId=of:0000000000000001, flowRuleCount=0
deviceId=of:0000000000000002, flowRuleCount=0
deviceId=of:0000000000000003, flowRuleCount=0
onos> devices
id=of:0000000000000001, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.0.1, serial=None
id=of:0000000000000002, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.0.1, serial=None
id=of:0000000000000003, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.0.1, serial=None
onos> devices
id=of:0000000000000001, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.0.1, serial=None
id=of:0000000000000002, available=true, role=STANDBY, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.0.1, serial=None
id=of:0000000000000003, available=true, role=MASTER, type=SWITCH, mfr=Nicira, Inc., hw=Open vSwitch, sw=2.0.1, serial=None
onos> add
add-flows add-host-intent add-multi-to-single-intent add-node add-optical-intent
add-point-intent addbundle addfilter addregion address-bindings
onos> add-
add-flows add-host-intent add-multi-to-single-intent add-node add-optical-intent
add-point-intent
onos> add-host-intent 00:00:00:00:00:01/-1 00:00:00:00:00:03/-1
onos> intents
id=0xffffffffbcc68ad9, state=INSTALLING, type=HostToHostIntent, appId=org.onlab.onos.cli
constraints=[LinkTypeConstraint{inclusive=false, types=[OPTICAL]}
]
onos> flows
deviceId=of:0000000000000001, flowRuleCount=2
id=ffff92d8eda9c15d, state=ADDED, bytes=0, packets=0, duration=8, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=2}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=1}]
id=ffff9c58eda9c13f, state=ADDED, bytes=0, packets=0, duration=8, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=1}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=2}
]
deviceId=of:0000000000000002, flowRuleCount=2
id=ffff92d8eda9c53d, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=3}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=1}]
id=ffff9c58eda9c501, state=ADDED, bytes=0, packets=0, duration=6, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=1}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=3}
]
deviceId=of:0000000000000003, flowRuleCount=2
id=ffff92d8eda9c8c2, state=ADDED, bytes=0, packets=0, duration=8, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=1}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=3}]
id=ffff9c58eda9c8fe, state=ADDED, bytes=0, packets=0, duration=8, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=3}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=1}
]
onos> intents
id=0xffffffffbcc68ad9, state=INSTALLING, type=HostToHostIntent, appId=org.onlab.onos.cli
constraints=[LinkTypeConstraint
onos> remove-
remove-intent remove-node
onos> remove-intent 0xffffffffbcc68ad9
onos> intents
id=0xffffffffbcc68ad9, state=INSTALLING, type=HostToHostIntent, appId=org.onlab.onos.cli
constraints=[LinkTypeConstraint{inclusive=false, types=[OPTICAL]}
]
onos> flows
deviceId=of:0000000000000001, flowRuleCount=2
id=ffff92d8eda9c15d, state=ADDED, bytes=0, packets=0, duration=27, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=2}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=1}]
id=ffff9c58eda9c13f, state=ADDED, bytes=0, packets=0, duration=27, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=1}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=2}
]
deviceId=of:0000000000000002, flowRuleCount=2
id=ffff92d8eda9c53d, state=ADDED, bytes=0, packets=0, duration=27, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=3}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=1}]
id=ffff9c58eda9c501, state=ADDED, bytes=0, packets=0, duration=27, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=1}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=3}
]
deviceId=of:0000000000000003, flowRuleCount=2
id=ffff92d8eda9c8c2, state=ADDED, bytes=0, packets=0, duration=27, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST
, IN_PORT
{port=1}, ETH_SRC{mac=00:00:00:00:00:03}]treatment=[OUTPUT{port=3}]
id=ffff9c58eda9c8fe, state=ADDED, bytes=0, packets=0, duration=27, priority=123, appId=org.onlab.onos.net.intent
selector=[ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=3}, ETH_SRC{mac=00:00:00:00:00:01}]
treatment=[OUTPUT{port=1}
]
onos> intents
id=0xffffffffbcc68ad9, state=INSTALLING, type=HostToHostIntent, appId=org.onlab.onos.cli
constraints=[LinkTypeConstraint
onos>
onos>
onos>
onos> intents
id=0xffffffffbcc68ad9, state=INSTALLING, type=HostToHostIntent, appId=org.onlab.onos.cli
constraints=[LinkTypeConstraint{inclusive=false, types=[OPTICAL]}
]
id=0xffffffffa2404962, state=INSTALLED, type=PointToPointIntent, appId=org.onlab.onos.cli
selector=[ETH_TYPE
]
constraints=[LinkTypeConstraint
]
ingress=ConnectPoint
, egress=ConnectPoint
{elementId=of:0000000000000003, portNumber=3}