fix error handling in elanmanager-impl workers 16/71216/2
authorMichael Vorburger <vorburger@redhat.com>
Mon, 23 Apr 2018 14:23:49 +0000 (16:23 +0200)
committerSam Hague <shague@redhat.com>
Wed, 25 Apr 2018 23:32:42 +0000 (23:32 +0000)
commit6685db4851b9e47b3aab8a97a6f716f4f2956304
treec125e2af70a63a5f43fafe8eb2d25bb79d3524a4
parente578f873467db9b6bbf1613264fe0446ace30278
fix error handling in elanmanager-impl workers

It should not log confusing ERROR messages if it will retry (which it
currently does).  It should however fail the jobs, and the let the
JobCoordinator log the problem (and increments its failure metrics!) if
the caught RuntimeException is anything else than caused by a
TransactionCommitFailedException (currently that will lead to
addToListenableFutureIfTxException doing nothing and the worker to error
log it, but the JobCoordinator to think the job passed, when actually it
really failed).

This is "take 2" with a self counter proposal to the initial attempt in
change Idf603c6ec8679125a9659378af6627c5fb3eb49e, which would be
abandoned if this was deemed to be a more acceptable solution.

JIRA: NETVIRT-1215
Change-Id: I23be5fae88bf908273c47ade1e74348d1e20dada
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/InterfaceAddWorkerOnElan.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/InterfaceRemoveWorkerOnElan.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/InterfaceRemoveWorkerOnElanInterface.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/utils/ElanUtils.java