15175 Commits

Author SHA1 Message Date
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
pierventre
cf6ff90af8 [SDFAB-713] Ensure TrafficMonitor is properly shutdown
This fixes also a potential leak of memory and thread

Change-Id: I266a37365cef3776463a1aca2c1e2717507b4f30
(cherry picked from commit 2c39deac5ae8ee150c8ed8d479470e3c7f31f7fc)
2021-10-26 18:42:55 +00:00
Miguel Borges de Freitas
89e3d23d2b [P4Runtime] Make sure write requests contain the codec failure reason
The submit() method of p4 WriteRequestImpl is returning an empty
response if there are no update messages. However, one of the reasons
for updates to be empty is the fact the catch block in
appendToRequestMsg is reached due to some invalid usage of the p4runtime
contract. In such situations, not only the user doesn't know why the
request is failing (absence of logging in ONOS) but the responseBuilder
which contains the failure is also not propagated. As a result, a future
call to P4RuntimeWriteClient.WriteResponse.isSuccess() will return
true (as if the request actually succeeded) and .all() will also not
contain the failedResponse appended during the CodecException. Added a
test to illustrate the issue.

Change-Id: I0acfd3b34b3ed1db2d91f91fed08f9d00800dda4
2021-10-26 17:52:13 +00:00
Niraj Dubey
b7921b2b1c BGP Monitoring Api
Add Junit
Add Interface

Change-Id: I86ac6cb366c324472c1aebb2d05e1901813916a2
2021-10-25 18:52:50 +00:00
Andrea Campanella
8f6594c6fb [ONOS-8150][VOL-4414] Fix for NPE in rest API after app gets uninstalled
Change-Id: I1cf0b330af43be8ea2211c5831ef715c1eafdea9
(cherry picked from commit 365751943b0c5316e79fbc1201a8d7af659e5008)
2021-10-25 14:08:55 +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
Miguel Borges de Freitas
3daf7cef74 [OVSDB] Fix ovsdb passive mode connections
Currently ovsdb passive connections are broken. This happens because the
eventloop is never initialized. As a result, in connectRetry() (called
in connect()) the workerGroup is null and the connection to the switch
can't be established.

Change-Id: Ic20a3f699e49f119bd2ba6edb6eb8ad94ba09009
2021-10-25 13:14:00 +00:00
Niraj Dubey
0a9b500936 Fix portstats cli for json output.
Jira Id: ONOS-8134

Change-Id: If0f33d1eee230f6ceebf57acebfc81aef599e03c
2021-10-25 05:21:19 +00:00
Sean Condon
4ceeae7439 ensure that the tests for forcesvg can be run by inlining JSON
Change-Id: I432025c8c02105f4a47fbdbb52384a6514efb495
2021-10-21 15:37:11 +01: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
alessio
a9bcacc979 [ODTN] Update of driver for Lumentum:ROADM with Twin 1X20 WSS
Tested on software versions:
- dcian_R3.1.2_057
- dcian_R2.1.4_136

* patch 2: checkstyle
* patch 3: comments

Change-Id: I436f22b2b0221527765eee9777df9d9ce4f0b146
2021-10-11 07:30:43 +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
David Glantz
6210c4c3aa Fix to properly encode several MASKED criterion into JSON.
Change-Id: I6a3b16c3382d60275de0fc0c61087e79038e5ebb
(cherry picked from commit e3c605e3cf137532af81f51f435cc5f2d81cedf5)
2021-10-01 15:20:50 +00:00
David Glantz
77e18553fb Remove logic to create a link when network configuration is added.
Change-Id: I9e26308c0f5ce9c5b70ccdbc37d97e4f480ff227
(cherry picked from commit a4d40f37bfd342c64595fea6c7357d303dd55870)
2021-10-01 13:21:46 +00:00
David Glantz
ff63198d93 Fix to prevent a NullPointerException and instead return an invalid link. Occurs when an intent's path is calculated and there are links that are not annotated with the key identified in the intent's AnnotationConstraint.
Change-Id: Iffb15b1f33c474f16bb8b097e2a6c04993add895
(cherry picked from commit 0b3d1aba7ebcb261ab5d2027dd08c0f691e3d88c)
2021-09-30 20:48:01 +00:00
pierventre
c8e8e45d46 [SDFAB-622] Protect phased recovery from wrong port config
ifacename is used as key when changing the admin state of
a port through GNMI. This patch guarantees that we use the
state contained in the device store to fill the gnmi blob.
This results to be necessary because the requests coming
from the north may be incomplete (without port name).
When this happens, PortNumber class fills the name with
the number which is wrong for the GNMI devices

Change-Id: I308538ae30cfe3fbf62d42c9a059114e8ff5b4b3
2021-09-29 20:25:38 +00:00
pierventre
581c8407e6 [SDFAB-616] Inconsistent format of port number in DhcpRelay
CircuitId deserialize use custom parsing instead of leveraging
the ConnectPoint class. Unfortunately, this custom parsing
does not parse correctly the portname.

Additionally, fix port number format for hostlocation and dhcprecords
and exclude Dhcp4HandlerImpl from file length checks

Change-Id: I360f26f8dd7de492cb65ad7af05fb85c8e940c33
(cherry picked from commit 61bd673eec2282aff175daff141059870db78c7d)
2021-09-27 19:27:55 +00:00
pierventre
7e41399499 [SDFAB-612] Cluster not ready when using recent tost master images
There is no guarantee that the HostProbingProvider is already
registered before setDelegate is called. This patch prevents
npe caused by events delivered before the provider is ready

Change-Id: I8612a3b156e342752d1ade9ee1d7d786ad53cc9e
(cherry picked from commit e84b2e8081ea40ff06eaa1b119c6e22cfcf9459d)
2021-09-27 19:26:35 +00:00
pierventre
1ee1fce27e [SDFAB-615] Inconsistent format of port number in links
This is affecting also the gui which is not able to
recognize links as bidirectional

Change-Id: Ic93cd93efb82485daed4f1cdc6d9e2e6262e6d99
(cherry picked from commit e46c4acbdfd832f1f1c099086a49ae9d06a5411a)
2021-09-27 19:26:06 +00:00
Andrea Campanella
50e38905cb [ONOS-8148][SDFAB-618] Avoid meter map distruction in cluster environment on instance restart
In general an instance restart should not lead to the deactivate method. Unfortunately,
the bundle refresh is changing the cards on the table. Please note that destroy()
behavior is implementation dependent.

In this patch we have fixed bundles that can be potentially affected by the
bundle refresh issue. However, other fixes may be needed in future and the fixes
are use cases dependent: it depends when the bundle refresh issue is triggered
along the chain of the deps.

Change-Id: I7a45439f74b255d8d4b1cbdb89b6dec8adf00687
(cherry picked from commit 185cf87f0c37a1c187c1a115746b47607f4cd7aa)
2021-09-27 11:07:38 +00:00
Michael Enrico
dfbce0d51b [ONOS-8147] Add option to NetconfDeviceProvider to force periodic port updates
Change-Id: If4139a10864784b656ccb1ec4f338de1cc2fa9a6
2021-09-26 10:23:53 +00:00
Jian Li
7d13b59ecf Fix: make protocol field optional in kubevirt load balancer
Change-Id: I6c5368a8bd40df29c52c480af957b48abb240d1a
(cherry picked from commit 70d491cba5689d69708568f693b92432ebe52ba5)
2021-09-24 06:51:38 +00:00
pierventre
b53d626fb0 [SDFAB-612] Cluster not ready when using recent tost master images
Initialize the local cache before adding the map listener
to prevent npe which are caused by events delivered during
the bootstrap process of the EC map

Change-Id: I823c12ccaa633a11a10d5b5d5fa7250a078ff4c5
(cherry picked from commit ec0e942320ef27932b4173172055151015261d7c)
2021-09-23 07:38:36 +00:00
pierventre
5e8cb53fe7 [SDFAB-295] Inconsistent format of port number in host location
This patch updates fabric.p4 interpreter. Additionally, fixes also
the HostProbingProvider by adding a translation step also there.

Change-Id: I8d1f0f8b6827453e5bdc240ea902960f92ed7e14
2021-09-22 16:45:36 +00:00
Michael Enrico
584eebdcf1 [ONOS-8143] Updates to Polatis optical switch NETCONF driver
- fixed long standing bug in DeviceDescription behaviour
 - added a form of LinkDiscovery behaviour
 - added PortAdmin and InternalConnectivity behaviours
 - added a CLI command 'get-output-ports' to exploit the InternalConnectivity behaviour
 - overloaded the loadXml method in drivers/utilities/XmlConfigParser class to allow suppression of comma delimitation within
   XML tags

Change-Id: I042e5559cf358d969686a63da99e91371a085d83
2021-09-21 21:37:43 +00:00
Andrea Campanella
18fdda8cb8 [VOL-4343] Processing status of ports in order with mastership and connection/disconnection to avoid inconsisten state
Change-Id: I731866b358fd4b6a7cfd296051e11f3d8690c5a7
(cherry picked from commit b0b93ac609e7860d5fd15703a50a0180fbf7a176)
(cherry picked from commit 727ed68ed3edc4512e353af814abe327ee25f143)
2021-09-20 07:18:54 +00:00
Matteo Scandolo
cabf6f8427 Bumping onos-maven-plugin version in onos-dependencies
Change-Id: I45a09565196482f057f5e9e0fdc0e926ed2914eb
2021-09-17 16:13:44 +00:00
pierventre
5d64c56dc1 Protect event handler from the exceptions
Change-Id: I8c7b68f4eff1460e02dd4cc01b7d655a5d7ad581
(cherry picked from commit 6bfdeb3215247561313a083d4131fc77d9c3792e)
2021-09-16 16:48:03 +00:00
pierventre
26ac1517c4 [SDFAB-542] Meters cleanup and leftovers v2
- Code clean up (unused code, unuseful comments)
- Remove deprecated internal APIs
- Prevent the ejection of the meter pollers
- Prevent the ejection of the mf pollers
- Fix unproper filter of device events
- Fix delete on store which updated existing meters with dummy value
- Fix NPE in TofinoMeterProgrammable caused by default config
- Update unit tests

Change-Id: Ib2767e3ab3cf146693e61b7e1890419c9743d521
(cherry picked from commit a770879a950d1cc985db1a659da701551700e886)
2021-09-16 16:13:33 +00:00
Matteo Scandolo
1bd07c8b6c Fix issue with multiline comment in OSGI properties
If a component property as a multiline comment the app activation
will throw an exception and no property for that component would be initialized.

This patch address that in two ways:
- Make sure that if we cannot parse a line from cfgdef the other properties are enabled and logs a warn.
- Changes the onos-maven-plugin so that it removes new lines when generating the .cfgdef file

Bumping version as plugin is already published from onos-2.5 branch

Change-Id: I550c23624118782fe6d79c9abbaf75ae59ea0eab
2021-09-15 15:45:11 -07:00
Wailok Shum
90b988a331 [SDFAB-557] Fix max meter in ONOS
Change-Id: I17f1b760fb4c16e3c0daa0ed0a4e54009b5e9aaf
2021-09-15 17:09:54 +08:00
pierventre
852081866f [SDFAB-502] Improve P4RuntimeMeterProgrammable reconciliation
This is achieved by implementing device specific methods to verify if
ONOS store meters and values read from the devices are similar

Change-Id: I95b6a2c728536f08b47ce9d0d30d1b8888a353d7
2021-09-10 12:57:53 +02:00
pierventre
c0914ec586 [SDFAB-500][SDFAB-527] Meters cleanup and leftovers
- Improve ONOS cli enabling CRUD of p4rt trtcm
- Improve ONOS rest enabling CRUD of p4rt trtcm
- Improve MeterService with scope defined reads and integrate in cli/rest
- Add support along the stack for BYTE_PER_SEC unit
- Add support along the stack for COMMITTED and PEAK bands
- Fix several bugs in ONOS cli/rest interfaces
- Improve REST codecs
- Fix NPE in MeterDriverProvider
- Improve PiMeterTransalation by enforcing trtcm config
- Implement explicit translation of the bands
- Fix ONOS reconciliation by removing from the mirror the wrong configs
- Remove unnecessary checks in MeterEntryCodec
- Update unit tests

It will follow a 2nd patch to complete SDFAB-527

Change-Id: I855235b17f60cb1d39f5b9a042c1015105a8a269
2021-09-10 10:22:18 +00:00
Jian Li
9417e13b3d Support to inject controller IP address to API config for tenant NW
Change-Id: I60529b9c4f44f3f55c5f95203ffb8c9973f5f4be
(cherry picked from commit 0a05d6fe81c13ddffa4aba674d33103df8e5121b)
2021-09-08 00:55:09 +00:00
Jian Li
e0eaf5c7bf Check node init status when probing node health through REST API
Support to inject controller IP address to API config.

Change-Id: Iece8a84b698ef0da9803f11d473257c84e5adc4d
(cherry picked from commit 6a08072a2c1c3094818268ebf22ffa82f9713125)
2021-09-06 08:28:48 +00:00
pierventre
4d29d3c8b6 [SDFAB-522] Fix port type for pair ports
Additionally standardize the usage of the 64 bits carried in the metadata instruction.
Implements unit tests for different metadata configurations

Change-Id: I3382657c81876ec2eb0749f06f0fb9e96b2c0e6e
2021-09-02 15:04:32 +00:00
pierventre
3b39bd8562 [SDFAB-500][SDFAB-499] Implement user defined index mode for the meter service
- Introduce a boolean to control the meter service modes
- User defined mode does not provide any coordination to the apps
- Only one mode can be active at time
- In addition some sanity checks are peformed by the meter service
- Update existing unit tests and add new ones to test the new behaviors
- Initial clean up of the meters subsystems

Change-Id: I61500b794f27e94abd11637c84bce0dbb2e073f3
2021-09-02 10:50:26 +00:00
Niraj Dubey
a828719294 BGP Monitoring in ONOS.
Jira Id: ONOS-8136

Implement bgpmonitoring Api.

Change-Id: I3542cf63b3b3ec604d293c166dbf413b7c158ac7
2021-08-27 16:06:48 +00:00
Jian Li
acf88aeeb8 Fix: use k8s API config IP address as the controller's IP
Change-Id: I6d04748a5472e9ab557df683fc9f092c551e6b42
(cherry picked from commit 90613fc8b563f96866f390f3c47f857c79344972)
2021-08-26 14:43:34 +00:00
Wailok Shum
221d70dc4e [SDFAB-453] Add a field check to MeterEntryCodec
Change-Id: I4c59c9d45f3128a7d75661fa432bfb33336965aa
2021-08-24 01:40:09 +08:00
Wailok Shum
6d42cff6bc [SDFAB-354] Improve P4RTMeterProgrammable
Change-Id: I65a325f90a49853c6c4a1cfb8212a016a8ec2b2d
2021-08-24 01:33:04 +08:00
Wailok Shum
79919528c8 [SDFAB-355] Revisit MeterService and north abstractions
Change-Id: I685cb90d53f8aa61017ecda9fa7ff842e58e2940
2021-08-24 01:31:51 +08:00
Carmelo Cascone
1d49a407f1 Fix wrong arguments in load_pdr action
According to fabric.p4, needs_qfi_push can only be present
when using load_pdr_qos, but not load_pdr.

Change-Id: I63b74762f56acc7e8a703a32ea368eb423ece41a
(cherry picked from commit 94015dee30b6d98e2658e6ff1ba557f5ad5010b5)
2021-08-16 16:22:00 +02:00
Daniele Moro
08c9e7f71c [SDFAB-357] Backport slicing in fabric and add support for QFI in PDR and fabric
Change-Id: Ieb10140dc0029a0cbf59ddfbb77f64f9a8c7379e
(cherry picked from commit 411f6f7f461db6491d627c2cb31642bdd6e7c8d8)
2021-08-16 16:21:36 +02:00
Jian Li
e2abe810d6 Add default route option to kubevirt network
Change-Id: Ia2a2d9b34ec3c493e04d56c544c22812e32d524a
(cherry picked from commit d95d3524caff5449aded4ff9397c3ed717fc91e6)
2021-08-12 12:35:58 +00:00
Daniele Moro
06aac70fd2 [SDFAB-359] Purge all objective for a given application ID
Change-Id: I51847b0be890deacec5caddc18d52bcd2993959a
(cherry picked from commit 607fd0b70e4553226d0937d36de9cde655f2eb62)
2021-08-06 15:01:17 +00:00
Daniele Moro
43ac289464 [SDFAB-359] Allow purging flows, groups and meters by device and application ID
Change-Id: I5e507d230789979ac997dbc99697fa0483363f70
(cherry picked from commit cfd774018c0ed926873b1e171c106217cb2ac568)
2021-08-06 14:13:38 +00:00