Moving to 6653; flow decomp to handle failed flows
Change-Id: Ic5f6f0a549d6f2e5bdef13b4e9e182b1aa5bd652
diff --git a/ansible/roles/docker-compose/tasks/main.yml b/ansible/roles/docker-compose/tasks/main.yml
index 3845f4a..c5bb31a 100644
--- a/ansible/roles/docker-compose/tasks/main.yml
+++ b/ansible/roles/docker-compose/tasks/main.yml
@@ -1,5 +1,5 @@
- name: Executable is present
get_url:
- url: https://github.com/docker/compose/releases/download/1.6.2/docker-compose-Linux-x86_64
+ url: https://github.com/docker/compose/releases/download/1.9.0/docker-compose-Linux-x86_64
dest: /usr/local/bin/docker-compose
mode: 0755
diff --git a/compose/docker-compose-auth-test.yml b/compose/docker-compose-auth-test.yml
index bffff03..4b12ef5 100644
--- a/compose/docker-compose-auth-test.yml
+++ b/compose/docker-compose-auth-test.yml
@@ -21,6 +21,8 @@
- "8101:8101" # ssh
- "6653:6653" # OF
- "8181:8181" # UI
+ #environment:
+ # ONOS_APPS: openflow,drivers,org.opencord.aaa,org.opencord.cord-config,org.onosproject.olt
networks:
authnet:
ipv4_address: 172.25.0.200
diff --git a/compose/docker-compose-system-test.yml b/compose/docker-compose-system-test.yml
index 3689dc9..028cbcb 100644
--- a/compose/docker-compose-system-test.yml
+++ b/compose/docker-compose-system-test.yml
@@ -195,7 +195,7 @@
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
"--fluentd=fluentd:24224",
- "--controller=${DOCKER_HOST_IP}:6633",
+ "--controller=${DOCKER_HOST_IP}:6653",
"--grpc-endpoint=@voltha-grpc",
"--instance-id-is-container-name",
"-v"
diff --git a/docker/config/netcfg.json b/docker/config/netcfg.json
index f7d9d2a..69a5dbc 100644
--- a/docker/config/netcfg.json
+++ b/docker/config/netcfg.json
@@ -14,7 +14,7 @@
"driver" : "pmc-olt"
},
"accessDevice": {
- "uplink": "129",
+ "uplink": "0",
"vlan": "1000"
}
}
diff --git a/ofagent/agent.py b/ofagent/agent.py
index a222480..d1a56f7 100644
--- a/ofagent/agent.py
+++ b/ofagent/agent.py
@@ -163,7 +163,7 @@
return ports
stub = MockRpc()
- agents = [Agent('localhost:6633', 256 + i, stub).start() for i in range(n)]
+ agents = [Agent('localhost:6653', 256 + i, stub).start() for i in range(n)]
def shutdown():
[a.stop() for a in agents]
diff --git a/ofagent/main.py b/ofagent/main.py
index c1e531b..f2e8122 100755
--- a/ofagent/main.py
+++ b/ofagent/main.py
@@ -29,7 +29,7 @@
defs = dict(
config=os.environ.get('CONFIG', './ofagent.yml'),
consul=os.environ.get('CONSUL', 'localhost:8500'),
- controller=os.environ.get('CONTROLLER', 'localhost:6633'),
+ controller=os.environ.get('CONTROLLER', 'localhost:6653'),
external_host_address=os.environ.get('EXTERNAL_HOST_ADDRESS',
get_my_primary_local_ipv4()),
grpc_endpoint=os.environ.get('GRPC_ENDPOINT', 'localhost:50055'),
diff --git a/voltha/adapters/maple_olt/README.md b/voltha/adapters/maple_olt/README.md
index d9b4aaa..c4991c7 100644
--- a/voltha/adapters/maple_olt/README.md
+++ b/voltha/adapters/maple_olt/README.md
@@ -144,5 +144,5 @@
$ cd <LOCATION_OF_VOLTHA>
$ sudo -s
# . ./env.sh
-(venv-linux) # PYTHONPATH=$HOME/dev/voltha/voltha/adapters/tibit ./oftest/oft --test-dir=olt-oftest/ -i 1@enp1s0f0 -i 2@enp1s0f1 --port 6633 -V 1.3 -t "olt_port=1;onu_port=2;in_out_port=1;device_type='tibit'" olt-complex.TestScenario1SingleOnu
+(venv-linux) # PYTHONPATH=$HOME/dev/voltha/voltha/adapters/tibit ./oftest/oft --test-dir=olt-oftest/ -i 1@enp1s0f0 -i 2@enp1s0f1 --port 6653 -V 1.3 -t "olt_port=1;onu_port=2;in_out_port=1;device_type='tibit'" olt-complex.TestScenario1SingleOnu
```
diff --git a/voltha/adapters/tibit_olt/README.md b/voltha/adapters/tibit_olt/README.md
index d37856e..66d97a1 100644
--- a/voltha/adapters/tibit_olt/README.md
+++ b/voltha/adapters/tibit_olt/README.md
@@ -145,5 +145,5 @@
$ cd <LOCATION_OF_VOLTHA>
$ sudo -s
# . ./env.sh
-(venv-linux) # PYTHONPATH=$HOME/cord/incubator/voltha/voltha/extensions/eoam ./oftest/oft --test-dir=olt-oftest/ -i 1@enp1s0f0 -i 2@enp1s0f1 --port 6633 -V 1.3 -t "olt_port=1;onu_port=2;in_out_port=1;device_type='tibit'" olt-complex.TestScenario1SingleOnu
+(venv-linux) # PYTHONPATH=$HOME/cord/incubator/voltha/voltha/extensions/eoam ./oftest/oft --test-dir=olt-oftest/ -i 1@enp1s0f0 -i 2@enp1s0f1 --port 6653 -V 1.3 -t "olt_port=1;onu_port=2;in_out_port=1;device_type='tibit'" olt-complex.TestScenario1SingleOnu
```
diff --git a/voltha/core/flow_decomposer.py b/voltha/core/flow_decomposer.py
index 27cf1ce..b8221b5 100644
--- a/voltha/core/flow_decomposer.py
+++ b/voltha/core/flow_decomposer.py
@@ -21,8 +21,13 @@
from copy import copy, deepcopy
from hashlib import md5
+import structlog
+
from voltha.protos import openflow_13_pb2 as ofp
+log = structlog.get_logger()
+
+
# aliases
ofb_field = ofp.ofp_oxm_ofb_field
action = ofp.ofp_action
@@ -439,7 +444,13 @@
in_port_no = get_in_port(flow)
out_port_no = get_out_port(flow) # may be None
+ device_rules = {} # accumulator
+
route = self.get_route(in_port_no, out_port_no)
+ if route is None:
+ log.error('no-route', in_port_no=in_port_no,
+ out_port_no=out_port_no, comment='ignoring flow')
+ return device_rules
assert len(route) == 2
ingress_hop, egress_hop = route
@@ -450,8 +461,6 @@
def is_upstream():
return not is_downstream()
- device_rules = {} # accumulator
-
if out_port_no is not None and \
(out_port_no & 0x7fffffff) == ofp.OFPP_CONTROLLER:
diff --git a/voltha/core/logical_device_agent.py b/voltha/core/logical_device_agent.py
index 4e8eec4..e34f89b 100644
--- a/voltha/core/logical_device_agent.py
+++ b/voltha/core/logical_device_agent.py
@@ -692,7 +692,7 @@
return [route[0], None]
raise Exception('not a single downstream route')
- return self._routes[(ingress_port_no, egress_port_no)]
+ return self._routes.get((ingress_port_no, egress_port_no))
def get_all_default_rules(self):
self._assure_cached_tables_up_to_date()