From 95237efb4dcf12ea2b7c19a0c0d6b8494152bce5 Mon Sep 17 00:00:00 2001 From: varsha teratipally Date: Wed, 5 Aug 2020 21:29:11 +0000 Subject: [PATCH 1/4] Detect docker startup failures --- config/docker-monitor.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/docker-monitor.json b/config/docker-monitor.json index 2a4a9884..ad12053c 100644 --- a/config/docker-monitor.json +++ b/config/docker-monitor.json @@ -13,6 +13,11 @@ "type": "CorruptDockerOverlay2", "reason": "NoCorruptDockerOverlay2", "message": "docker overlay2 is functioning properly" + }, + { + "type": "DockerStartupFailure", + "reason": "DockerStartUpSucess", + "message": "Successfully started docker container" } ], "rules": [ @@ -26,6 +31,12 @@ "condition": "CorruptDockerOverlay2", "reason": "CorruptDockerOverlay2", "pattern": "returned error: readlink /var/lib/docker/overlay2.*: invalid argument.*" + }, + { + "type": "permanent", + "condition": "DockerStartupFailure", + "reason": "DockerStartupFailure", + "pattern": "OCI runtime start failed: container process is already dead: unknown$" } ] } From 4ce29a95d56bd47939775202912812755cd0ddcc Mon Sep 17 00:00:00 2001 From: varsha teratipally Date: Thu, 6 Aug 2020 01:30:11 +0000 Subject: [PATCH 2/4] removed the $ symbol as npd handles end of the line --- config/docker-monitor.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/docker-monitor.json b/config/docker-monitor.json index ad12053c..69a51eb2 100644 --- a/config/docker-monitor.json +++ b/config/docker-monitor.json @@ -15,8 +15,8 @@ "message": "docker overlay2 is functioning properly" }, { - "type": "DockerStartupFailure", - "reason": "DockerStartUpSucess", + "type": "DockerContainerStartupFailure", + "reason": "NoDockerContainerStartupFailure", "message": "Successfully started docker container" } ], @@ -34,9 +34,9 @@ }, { "type": "permanent", - "condition": "DockerStartupFailure", - "reason": "DockerStartupFailure", - "pattern": "OCI runtime start failed: container process is already dead: unknown$" + "condition": "DockerContainerStartupFailure", + "reason": "DockerContainerStartupFailure", + "pattern": "OCI runtime start failed: container process is already dead: unknown" } ] } From fbdd9eec9a3956a5f43e680f3dfff045ebfc04a3 Mon Sep 17 00:00:00 2001 From: vteratipally <67723486+vteratipally@users.noreply.github.com> Date: Tue, 11 Aug 2020 09:59:46 -0700 Subject: [PATCH 3/4] Update docker-monitor.json making DockerContainerStartup failure as temporary --- config/docker-monitor.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/config/docker-monitor.json b/config/docker-monitor.json index 69a51eb2..799e7dda 100644 --- a/config/docker-monitor.json +++ b/config/docker-monitor.json @@ -14,11 +14,6 @@ "reason": "NoCorruptDockerOverlay2", "message": "docker overlay2 is functioning properly" }, - { - "type": "DockerContainerStartupFailure", - "reason": "NoDockerContainerStartupFailure", - "message": "Successfully started docker container" - } ], "rules": [ { @@ -33,8 +28,7 @@ "pattern": "returned error: readlink /var/lib/docker/overlay2.*: invalid argument.*" }, { - "type": "permanent", - "condition": "DockerContainerStartupFailure", + "type": "temporary", "reason": "DockerContainerStartupFailure", "pattern": "OCI runtime start failed: container process is already dead: unknown" } From edfd70a16c538f150c7f511b92645191896d76bd Mon Sep 17 00:00:00 2001 From: vteratipally <67723486+vteratipally@users.noreply.github.com> Date: Tue, 11 Aug 2020 10:02:17 -0700 Subject: [PATCH 4/4] Update docker-monitor.json fixed json format error as it doesn't allow trailing commas --- config/docker-monitor.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/docker-monitor.json b/config/docker-monitor.json index 799e7dda..27435be2 100644 --- a/config/docker-monitor.json +++ b/config/docker-monitor.json @@ -13,7 +13,7 @@ "type": "CorruptDockerOverlay2", "reason": "NoCorruptDockerOverlay2", "message": "docker overlay2 is functioning properly" - }, + } ], "rules": [ {