5114 Commits

Author SHA1 Message Date
Andrea Campanella
a42a6ab206 Enabling role timeout configuration on the Device Manager
Change-Id: Ie8664189d236431a5f2ee42476d0f99fdfe5f1d7
(cherry picked from commit 32762fa3a3fce3f0cc6d97e9fadca2959080ad08)
2022-06-29 16:42:31 +00:00
Daniele Moro
e719836516 [SDFAB-1177] Separate ingress and egress UpfCounter
Change-Id: I957754bc3f12d2e8f6d9d5748bb0b8c2b01a924c
(cherry picked from commit db0e125ac2515dbb711efdeebc3948b28e9e392b)
2022-05-18 14:20:30 +00:00
Andrea Campanella
3971df8106 [ONOS-8157] Adding port disable during periodic checkeker for device disconnections.
Change-Id: Ie44f2c485446e29ef4c39198e8bfe8461bd13c93
(cherry picked from commit 9f820659064984ca898ffd40083a1a4944097897)
2022-05-02 07:24:21 +00:00
pierventre
13792aa10f Update FlowRuleOperations API
stripeKey now exposes an Optional instead of an Integer

Change-Id: I9a13fcea85ba3e0b52c004ece5a47fc50e99c9d6
2022-04-04 13:14:13 +00:00
Jian Li
4b3436a259 Support STT tunneling protocol at kubevirt networking app
Change-Id: Icbef76dbfb842ce1cf6893bf18ee80c4b1b26006
2022-03-29 07:52:20 +00:00
pierventre
16ff3291a8 [SDFAB-1100] In-order flowrule processing
Extends the FlowRuleService and its api by adding in-order processing
capabilities. This is achieved by introducing stripe key as way to
indicate how to process the flowrules. Key is an object which is used
to select a specific executor. Operations having the same key is guaranteed
that will be processed by the same executor.

Change-Id: I5ab4d42e8a2b8cb869f3dc2305dbc5084d31f08b
(cherry picked from commit 07af21d9e116414b74152dc812cc980ca2c4c0a5)
2022-03-29 06:46:27 +00:00
pierventre
386f5ca225 [SDFAB-1100] Fix flow removal logic
If the store is already in sync re-issueing a batch
request is dangerous (race with conflictual writes)
and wrong. In this case, if the device is still reporting
the flow, it is enough to send a flow removal directly.

Instead, if the flow is expired it is important to update
the store accordingly and then issue a flow removal as
consequence of the batch request.

Change-Id: I11a595e0a91f0efdc1cac3bf1d589a5108f1ae06
2022-03-24 20:10:24 +00:00
Daniele Moro
31faf955a8 Add slice meter to upf programmable driver behaviour
Also, TC in terminations entities is now required when not dropping.

Change-Id: Ia7e371376ca4f61564ba52a1e8c85a0ff76bb202
(cherry picked from commit b471bd19a7d116e201798509f9bc819664f1ac8d)
2022-03-22 10:25:54 +00:00
pierventre
d047b14fa0 [SDFAB-726] Improve logging in the ECFlowRuleStore
Currently, we are not able to understand what's exactly went
wrong on the new master and is preventing to activate the
new term. This build improves logging and move to WARN some
useful error prints

Change-Id: Ia00d65dd4fb9ff70d60ccdac3f39882f3c916814
2022-03-05 01:44:54 +00:00
Carmelo Cascone
600ffd27e2 Allow building UpfApplication matching only on slice_id
According to the UP4 logical pipeline, the only required match field is
slice_id. All other fields are ternary, hence optional.

Change-Id: I265b43621d6469087e57fda5eb6a4ba350853e9d
(cherry picked from commit ee60f76ae19abeb2162315dd141ce44233880076)
2022-03-04 22:11:44 +00:00
pierventre
14a76e72a7 Improve Mastership logging
Logs only meaningful mastership changes

Change-Id: Ibbe4f85526df01b3c1b6eab317a2c15716098d80
2022-03-03 01:46:40 +00:00
pierventre
d8d4025897 [SDFAB-1006] Purge groups and flows failed
With the persistence mastership in place the stats are no longer
discarded because of the lack of a master. This change introduces
further checks based on the availability. Additionally, it purges
the pending groups map which was leaking memory.

Change-Id: I6b0d127bf9a247d7981871f02847f6e2f4074182
2022-02-25 01:01:28 +00:00
pierventre
bc91cea9de [SDFAB-1015] Introduce gracePeriod and defer mastership check
For some devices like p4rt devices which are first registered
and then updated does not make sense to check the reachability
asap: connection is established concurently to the mastership
checks and the channel might not be ready.

Change-Id: I5a31e09cf382df388a473af338eb72fb9a187fa8
2022-02-25 00:30:01 +00:00
pierventre
116992a795 [SDFAB-1014] Pending flows and missing groups in the GroupStore
A race condition in the audit logic causes groups being stuck forever
on pending audit. These groups are basically lost forever and due to this
the flows pointing to these groups cannot be installed.

Additionally, improve logging in the DistributedGroupStore

Change-Id: Id241079d1a33ff3f7482ac72d075eeded6d920df
2022-02-24 23:57:09 +00:00
pierventre
0263b62380 [SDFAB-954] Non-leader instance can mark UNKNOWN the pipeline.
The probe task is not performed in atomic way and between the
initial mastership check and the actual probe the execution
can be blocked many times and the mastership can change. Recheck
the mastership after pipeline probe returns.

We are seeing an issue when a network partition occurs: watchdog
is stuck for 60s before returning and will mark the device offline.
However, in the meanwhile the mastership has been passed to another
instance which is already connected and has already marked the device
online. An harmless side effect of this change is that when we return
from the pipeline config we might be no longer the master and this
will delay in the worst case the markonline of the device for 15s
(next reconcile interval)

Additionally, this patch simplifies the Manager by removing the
executor lock and by using only one worker per device. This change
prevents also the exhaustion of all workers than can easily happen
if there is a network partition that prevents the probe to return
immediately.

Change-Id: I3429cd0598c95589e50f35139f6087f83ceb60f2
2022-02-24 23:06:11 +00:00
pierventre
5a91f5fb74 Relax meters translation checks
Change-Id: I1dd3d2c9642ebff28d68425a7bcbc01c4d6a15f5
2022-02-24 22:29:18 +00:00
Daniele Moro
516c959846 Use N3 instead of S1U terminology
Change-Id: I54e63b46b9df7a1b62cdb2e4f9807d79e71f8a3b
(cherry picked from commit 3894e9e1492d42d2bb2d8ec3be43da7a0caba945)
2022-02-21 09:20:48 +00:00
pierventre
dac2589944 [SDFAB-935] Optimize and improve the p. mastership
This patch is the part 1 and contains the following:
- Make the GDP greedy by reasserting immediately the role

Change-Id: I7259d4ace4a3e58ae2d97b6e53a393c41d5c0df9
(cherry picked from commit d510b7db8aeafbb52b00982dacb1f1079b0cc4b2)
2022-02-17 19:52:49 +00:00
pierventre
2bb50165cd [SDFAB-977][SDFAB-978] Implement persistent mastership logic in ONOS
Design doc can be found here:
https://docs.google.com/document/d/1UStD1hGCy5YQlFmaWfclq6uYROtMY56jWxUBwfUEsRM

Additionally, introduce few more changes in the DeviceManager:
- Always reassert the role if the instance has a valid role
- Test reachability through isReachable and probeReachability

Change-Id: I35183c04b65a98bc0332ed256be8333b53d6b68f
(cherry picked from commit b2f636bffd2783266826503755ba5f42dfdb2b75)
2022-02-17 14:30:37 +00:00
pierventre
63ce741a36 Add probeReachability API to the DeviceProvider
The new API is meant for probing the reachability of a device
and adds the ability to directly asses the result of the probe.

Change-Id: I310eba11b943208b5d6776fd8ccbc679d55dfb41
(cherry picked from commit d7cae13c11bdc6c9d344d362ecb71ad99df67367)
2022-02-17 14:29:46 +00:00
pierventre
b59c51dd4e [SDFAB-933] Integrate atomix-3.1.12 and expose demote API
Additionally, this patch adds unit tests for demote and
updates a bunch of testing tools

Change-Id: I9636078b08486c9167ae253f0251f72239ad2802
2022-02-15 17:05:26 +01:00
Daniele Moro
909b958bff [SDFAB-831] Add UPF meters to UpfProgrammable APIs
UPF meters can be of type session or application.
Also, add meter index to sessions and terminations UPF entities.

Change-Id: I8babfca35341a21b234d8eb6edaa2e1c02684210
(cherry picked from commit b25299afaf824a8d352297224e5b9a1285901d00)
2022-02-10 09:19:52 +00:00
Daniele Moro
6d557c0751 Fix get all meters filtering by device id
Change-Id: I8fdd21100093579c6ac1caa689a38dc7be1a0141
(cherry picked from commit 4a1b4fbcb5a2c358bbd0851116100f4dbec3eae6)
2022-02-08 16:00:31 +00:00
Daniele Moro
f3a5ab0401 Refactor UPF entities to have consistent naming and string representations
Also, add slice ID into applications and interfaces entities

Change-Id: I159bcf04af1504b4e5c7210aa1402218fae3eb8f
(cherry picked from commit de1f1f7806716ac6e368e55eaf0b887ab89530d4)
2022-02-02 17:53:49 +00:00
pierventre
81a2cb9c49 Fix ONOS CI by removing the usage of getRegisteredApps
getRegisteredApps is deprecated and it has been discontinued

This patch partially reverts:
- https://gerrit.onosproject.org/c/onos/+/22325
- https://gerrit.onosproject.org/c/onos/+/22362
- https://gerrit.onosproject.org/c/onos/+/22382

Change-Id: I652d814a006709bd40a673699697ba229955b0e4
2022-02-01 19:12:11 +00:00
Yi Tseng
8c79f3f7e3 New PiInterpreter API to map logical port to long type
Introduce a new API for PiInterpreter to map logical port number to a long
port number and deprecate the old one.
The reason we need to translate logical port number to a long type is that
the mapped number will become negative when translating port number to
an unsigned integer with MSB (e.g., 0xFFFFFFFD) and the low level driver
or translator is expecting to get a positive number.

Change-Id: I751e69461b0cf97280f12fd98ca2b15b83cbe84f
2022-01-26 14:55:13 +00:00
Daniele Moro
a1c7ba4266 [SDFAB-834] Add application filtering to ONOS UPF programmable APIs
Change-Id: I3e3d44d5d160470c3f4bfca32e7a83e194d155d8
(cherry picked from commit 97fd80c104570275937d4c24227916c83bf0dd4c)
2022-01-24 09:43:28 +00:00
pierventre
7768d7f49d [SDFAB-887][SDFAB-893] Missig flowrules in the ECFlowRuleStore
Mastership changes can happen during the processing of the flow rules stats,
If there is no master while we are executing handleExistingFlow we will get
null when we try to retrieve the stored flow rule. This is wrongly handled
with the removal of the flow rule from the store which will cause lost
of connectivity. This patch basically removes the flow rule only when we are
sure of what we are doing, when we are not the code verifies if there are
proper conditions to continue the processing (check if there was a mastership
change).

Additionally, this patch improves the logging of the ECFlowRuleStore

Change-Id: I7b79e7ab3d8ccfa6edca6ba4ad5de93ada082265
2022-01-12 19:55:49 +00:00
Charles Chan
f5c6f28e9e Avoid probing hosts on non-existent or disabled ports
- All ports that has a subnet configured in netcfg will be used for probing
- A port may not exist on the device even if it's configured in interfces
- A port will never be added to the edge port list if it is never enabled
If a port meets both conditions above, it will fail the isEdgePort check and produce repeating warning messages.
This patch explicitly avoid probing on non-existent or disabled ports

Change-Id: I5cc5f32d4b2ff9fc00729e0adddbede29fb49ca0
(cherry picked from commit a618d74a7596633d666679f709a853d374fe2cb9)
2022-01-06 23:27:05 +00:00
Thomas Vachuska
b7f12e63c2 Changing version to 3.0.0-SNAPSHOT
Change-Id: Iff0e25fd1e3928b182a21352c17685aea4034f4e
2022-01-05 20:13:10 +00:00
Daniele Moro
dfc2385b60 Fix toString in UPF UE Sessions and Terminations
Change-Id: I90c9d3180ba9cbbd688ccadd5734792c13504c56
2022-01-05 12:20:22 +01:00
tosinski
36ba33aeb0 Refactor of UpfProgrammable APIs
Change-Id: I792659ad4a163d7115d7320bb33c11534edd484a
Signed-off-by: Daniele Moro <daniele@opennetworking.org>
(cherry picked from commit a57652d92bdd01b1e77bffbac78a44f96fb385f3)
2022-01-05 11:16:39 +01:00
Ray Milkey
95f124892c Starting snapshot 2.8.0-SNAPSHOT
Change-Id: I7a38cdc0ef1f51458c2605f59aca6221fc0320f9
2021-12-17 10:20:32 -08:00
Andrea Campanella
6a3ee34b6b [ONOS-8151] Re-send request for flow removal in case the flow is in PENDING_REMOVE and the stats report it.
Change-Id: I4e46f102a0a1a341ccfaff968207378ce30b9144
(cherry picked from commit 321f75a794dd8d8524209172c980f172a35d547f)
2021-12-15 08:20:28 +00:00
Niloofar Toorchi
8bbe9ca7ab adding support of WCMP weights to Next Objective
Change-Id: Id8f9a4222d0d9d98995f727dbfbf467ab2104468
2021-12-14 17:49:24 +00:00
pierventre
4af4879dec [SDFAB-821] Implement auto-recovery mechanism for failed mastership changes
With this fix the ONOS cluster will start a new term if the mastership is not
acknowledged by the device after 10 seconds.

Change-Id: Id0927181e4ba37ed1af52dd9843d4c2563469025
2021-12-08 17:29:43 +00:00
ONOS Jenkins User
844bc4e061 Starting snapshot 2.7.0-SNAPSHOT 2021-12-01 17:50:52 +00:00
ONOS Jenkins User
1d51166bfe Tagging 2.7.0-rc1 2021-12-01 17:50:46 +00:00
pierventre
cc22546d62 [SDFAB-576] Fix serialization of bytesequence
Replicas do not get all the information from the leader
and show weird strings when rendering PiCriterion. This
affects only byte sequence containing ascii string

Change-Id: Id656c2d150294866878175d7d703148739525f95
2021-11-22 15:09:28 +01:00
Emanuele Gallone
b692a8240e Add architecture method to PiPipelineModel Interface.
The field `pkg_info:arch` is now parsed, when parsing a P4Info file.

Change-Id: Ia1b24b929fe4ed8ac2a2becfa0ce7678642e9037
(cherry picked from commit ce9942049825c51c0a0818ad4b89395321aa82b3)
2021-11-18 15:31:45 -08:00
David Glantz
c3e4c0df37 Fix ClassCastException caused by sorting intents in gui when using both string and long keys.
Change-Id: Ide180556761cfe3ca92d14e197d2e3dfc175563e
2021-11-18 20:36:12 +00:00
pierventre
55a5f39ae6 [SDFAB-753] Improve ONOS cluster event
Main idea of this change is to add an additional parameter
in the event that carries information about the failed instance.

Additionally, prevents several NPE by using hostname as id
when controller hostname cannot be resolved into an ip.

Change-Id: Id9886afe3f1e5ecee0f1414b2722c340680a813e
(cherry picked from commit fa5dc3c137a4deaa020a669388470b511c2b6a8e)
2021-11-15 17:05:23 +00:00
David Glantz
dfb3ceb78d Return intent collection with details
Added backwards compatible flag to GET /intents/ to return full intent JSON.
Added GET /intents/application/{appId} to return application specifc intents.
Extended IntentService to include getIntentsByAppId(appId).
Removed hard-coded intent codec lookup in IntentWebResource.

Change-Id: I38e7b1dbd7669e654afe723f6ec3a4eb7a9af6fb
2021-11-07 09:18:19 +00:00
pierventre
f9a00a5ce0 Fix npe during hostVanished handling
java.lang.NullPointerException: null
	at org.onosproject.net.host.impl.HostManager$InternalHostProviderService.hostVanished(HostManager.java:573) ~[?:?]
	at org.onosproject.provider.netcfghost.NetworkConfigHostProvider.removeHost(NetworkConfigHostProvider.java:189) ~[?:?]
	at org.onosproject.provider.netcfghost.NetworkConfigHostProvider$InternalNetworkConfigListener.event(NetworkConfigHostProvider.java:274) ~[?:?]
	at org.onosproject.provider.netcfghost.NetworkConfigHostProvider$InternalNetworkConfigListener.event(NetworkConfigHostProvider.java:222) ~[?:?]
	at org.onosproject.event.ListenerRegistry.process(ListenerRegistry.java:66) [!/:?]
	at org.onosproject.event.impl.CoreEventDispatcher$DispatchLoop.process(CoreEventDispatcher.java:198) [!/:?]
	at org.onosproject.event.impl.CoreEventDispatcher$DispatchLoop.run(CoreEventDispatcher.java:180) [!/:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Change-Id: If6e3978798d5fb11b3f5b1344b551b9f3cd3e51d
(cherry picked from commit 3a615560678cb83fa41f393fa59c346cdae659e2)
2021-10-27 07:19:34 +00:00
pierventre
57f7bbb6ac [SDFAB-705] Fix GUI for the control and data plane resiliency
Additionally, fix similar issues in GUI2 and add initial
support for ports with name in GUI/GUI2.

This is also the first step towards supporting port with name widely in ONOS

Change-Id: Ib04f780bf0b7171e82a6beb69b39c0aaeb4be957
(cherry picked from commit 178046ba11ab21d94a1e818fb893931bb015734b)
2021-10-27 06:41:50 +00:00
Anurag Chadha
e9533b5b64 [ONOS-8149] Fix for updating version stored in application store when doint upgrade using issu
Change-Id: I72cd8d0793464252045f98d856592ca4cc238fd6
2021-10-25 13:14:12 +00:00
David Glantz
8ad1da90c4 Log exception message when intent compiling fails
Change-Id: Ied046c31e512504b45ba92023996d400574d5128
(cherry picked from commit c4d6a7ce658d595d9c8d1c270cf5f469c1d3e1b7)
2021-10-18 13:49:57 +00:00
Miguel Borges de Freitas
5b32b59b34 [OpenFlow] Save dp_desc as a device annotation
dp_desc represents the human readable description of a given datapath
and is provided by an OpenFlow switch when it connects to the controller
in the response to the OFPMP_DESC request. ONOS already has access to
this information when the OpenFlowSwitch object is constructed (accessed
via sw.datapathDescription()) but it does not save it or propagate it in
any way. dp_desc, unlike the dp_id which is "random", works like a switch
label. Accessing this information from the controller app layer is
important so that different business logic can be applied according to
the provided "marking". Thus, save the value into the Device Annotations
if available.

Change-Id: Ifaa715a0440e99ce31fdd8d4753c2e892385e33b
2021-10-14 15:11:09 +00:00
David Glantz
0a5779c775 Fix to reinstall flow rules when they are missing in FlowRuleService.
Change-Id: I1e7e0d62e27012cd090f3a72eb92eadc85afafdf
(cherry picked from commit 5c7fe3acf43bf1304038a7be55a5fd45e5805396)
2021-10-14 13:24:36 +00:00
pierventre
b885685722 [SDFAB-642][SDFAB-643] Fix device disconnection when an instance rejoins
Changes in the GDP are done to make sure the default availability is always
updated through the two step process defined in the provider and to prevent
the disconnection of the devices when an instance rejoins the cluster

Finally, the patch improves logging inside the GossipDeviceStore and improve
the stability of PiPipeconfWatchdogManager by getting rid of the timer and
timer task and by executing the event listeners inside an executor.

Change-Id: Ibc6ce711e15e86bde05dbf3b1c37d2a93516fae3
2021-10-07 22:21:51 +00:00