Skip to content

[BUG] Detector deletion fails if underlying monitor deletion fails or is not found #378

@eirsep

Description

@eirsep
[2023-03-17T16:40:05,368][ERROR][o.o.a.u.AlertingException] [612b1994a4037b8727a21580fde13874] Alerting error: OpenSearchStatusException[Monitor with fIxu7YYBiwgZNOohwZfl is not found]
[2023-03-17T16:40:05,370][ERROR][o.o.a.u.AlertingException] [612b1994a4037b8727a21580fde13874] Alerting error: java.lang.NullPointerException
[2023-03-17T16:40:05,370][ERROR][o.o.s.u.SecurityAnalyticsException] [612b1994a4037b8727a21580fde13874] Security Analytics error:
[2023-03-17T16:40:05,370][ERROR][o.o.s.u.SecurityAnalyticsException] [612b1994a4037b8727a21580fde13874] Security Analytics error:
AlertingException[Monitor with fIxu7YYBiwgZNOohwZfl is not found]; nested: Exception[org.opensearch.OpenSearchStatusException: Monitor with fIxu7YYBiwgZNOohwZfl is not found];
        at org.opensearch.alerting.util.AlertingException$Companion.wrap(AlertingException.kt:70)
        at org.opensearch.alerting.transport.TransportDeleteMonitorAction$DeleteMonitorHandler.getMonitor(TransportDeleteMonitorAction.kt:132)
        at org.opensearch.alerting.transport.TransportDeleteMonitorAction$DeleteMonitorHandler.access$getMonitor(TransportDeleteMonitorAction.kt:96)
        at org.opensearch.alerting.transport.TransportDeleteMonitorAction$DeleteMonitorHandler$getMonitor$1.invokeSuspend(TransportDeleteMonitorAction.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
[2023-03-17T16:40:05,370][WARN ][r.suppressed             ] [612b1994a4037b8727a21580fde13874] path: /_plugins/_security_analytics/detectors/rIxu7YYBiwgZNOoh0JdX, params: {detector_id=rIxu7YYBiwgZNOoh0JdX}
SecurityAnalyticsException[Monitor with fIxu7YYBiwgZNOohwZfl is not found]; nested: Exception[org.opensearch.alerting.util.AlertingException: Monitor with fIxu7YYBiwgZNOohwZfl is not found];
        at org.opensearch.securityanalytics.util.SecurityAnalyticsException.wrap(SecurityAnalyticsException.java:51)
        at org.opensearch.securityanalytics.transport.TransportDeleteDetectorAction$AsyncDeleteDetectorAction.lambda$finishHim$0(TransportDeleteDetectorAction.java:205)
        at org.opensearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:73)
        at org.opensearch.action.ActionRunnable$2.doRun(ActionRunnable.java:88)
        at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:815)
        at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.Exception: org.opensearch.alerting.util.AlertingException: Monitor with fIxu7YYBiwgZNOohwZfl is not found
        ... 9 more

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv2.7.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions