Fixes log level in kubevirt networking app.
Change-Id: I3034fa73ced293974de964355698e0778670fa31
diff --git a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java
index 5953c8a..6061cd3 100644
--- a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java
+++ b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java
@@ -188,7 +188,7 @@
return;
}
- log.info("processKubernetesExternalLbCreatedOrUpdated and updated elb with elecedGateway: {}", lb);
+ log.trace("processKubernetesExternalLbCreatedOrUpdated and updated elb with elecedGateway: {}", lb);
setExternalLbRulesForService(lb, true);
}
@@ -204,7 +204,7 @@
return;
}
- log.info("processKubernetesExternalLbGatewayChanged with oldateway: {}", oldGatway);
+ log.trace("processKubernetesExternalLbGatewayChanged with oldateway: {}", oldGatway);
setExternalLbRulesForService(lb.updateElectedGateway(oldGatway), false);
@@ -220,7 +220,7 @@
return;
}
- log.info("processKubernetesExternalLbWorkerChanged with oldworker: {}", oldWorker);
+ log.trace("processKubernetesExternalLbWorkerChanged with oldworker: {}", oldWorker);
setExternalLbRulesForService(lb.updateElectedWorker(oldWorker), false);
diff --git a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java
index d80ee25..a7d4dc5 100644
--- a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java
+++ b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java
@@ -233,15 +233,10 @@
public void eventReceived(Action action, Service service) {
switch (action) {
case ADDED:
- log.info("Service event ADDED received ");
- eventExecutor.execute(() -> processAddOrMod(service));
- break;
case MODIFIED:
- log.info("Service event MODIFIED received");
eventExecutor.execute(() -> processAddOrMod(service));
break;
case DELETED:
- log.info("Service event DELETED received");
eventExecutor.execute(() -> processDeletion(service));
break;
case ERROR:
@@ -262,10 +257,12 @@
}
private void processAddOrMod(Service service) {
- if (service == null || !isMaster()) {
+ if (service == null || !isMaster() || !isLoadBalancerType(service)) {
return;
}
+ log.info("Service event ADDED or MODIFIED received");
+
KubernetesExternalLbConfig config = lbConfigService.lbConfigs().stream().findAny().orElse(null);
if (!configMapUpdated(config)) {
@@ -284,11 +281,13 @@
}
private void processDeletion(Service service) {
- if (service == null || !isMaster()) {
+ if (service == null || !isMaster() || !isLoadBalancerType(service)) {
return;
}
- if (isLoadBalancerType(service) &&
- isKubeVipCloudProviderLabelIsSet(service)) {
+
+ log.info("Service event DELETED received");
+
+ if (isKubeVipCloudProviderLabelIsSet(service)) {
KubernetesExternalLb lb = adminService.loadBalancer(service.getMetadata().getName());
if (lb == null) {