paypal / dce-go

Docker Compose Executor to launch pod of docker containers in Apache Mesos.
Apache License 2.0
63 stars 48 forks source link

Trace Health Status update based on tag status if available #135

Closed spachamsrisriniv closed 2 years ago

spachamsrisriniv commented 2 years ago

Following stepMetrics should be marked us status error if tag status is unhealthy or starting or unknown

  {
        "stepName": "HealthCheck-riskauditcomputeserv",
        "status": "Success",
        "tags": {
            "containerId": "f87f91f1a165300b1e217b668cfa72191ae8f95375505423b50343715a4cb677",
            "exitCode": 0,
            "healthStatus": "unhealthy",
            "running": false,
            "serviceName": "riskauditcomputeserv"
        },
        "startTime": 1650440096,
        "endTime": 1650441247,
        "execTimeMS": 1151000
    }

    {
        "stepName": "HealthCheck-opsconfig",
        "status": "Success",
        "tags": {
            "containerId": "42418248f5d1a2719eb25743315b2761e8cedceb87e24b546522db678ac04968",
            "exitCode": 0,
            "healthStatus": "starting",
            "running": false,
            "serviceName": "opsconfig"
        },
        "startTime": 1650440096,
        "endTime": 1650440097,
   }     

updated step metrics opsconfig is updated as Error

{
    "stepMetrics": [
            [
                {
                    "stepName": "paypal2_LaunchTaskPostImagePull",
                    "status": "Success",
                    "startTime": 1652212006,
                    "endTime": 1652212006
                }
            ],
            [
                {
                    "stepName": "HealthCheck-keystorecontainer",
                    "status": "Success",
                    "tags": {
                        "containerId": "5b2719580355f232eda91aa9f38b4539be7c4fa1ab152016650b1615afe98b7c",
                        "exitCode": "0",
                        "healthStatus": "healthy",
                        "running": "false",
                        "serviceName": "keystorecontainer"
                    },
                    "startTime": 1652212028,
                    "endTime": 1652212049,
                    "execTimeMS": 21000
                }
            ],
            [
                {
                    "stepName": "paypal2_LaunchTaskPreImagePull",
                    "status": "Success",
                    "startTime": 1652211975,
                    "endTime": 1652211975
                }
            ],
            [
                {
                    "stepName": "HealthCheck-opsconfig",
                    "status": "Error",
                    "tags": {
                        "containerId": "619181c3a55498441e22259d5bbf414f139ae68217771b37140a09174bdefb09",
                        "exitCode": "0",
                        "healthStatus": "starting",
                        "running": "false",
                        "serviceName": "opsconfig"
                    },
                    "startTime": 1652212028,
                    "endTime": 1652212028
                }
            ],
            [
                {
                    "stepName": "paypal2_PostLaunchTask",
                    "status": "Success",
                    "startTime": 1652212049,
                    "endTime": 1652212080,
                    "execTimeMS": 31000
                }
            ],
            [
                {
                    "stepName": "general_LaunchTaskPreImagePull",
                    "status": "Success",
                    "startTime": 1652211975,
                    "endTime": 1652211975
                }
            ],
            [
                {
                    "stepName": "Image_Pull",
                    "status": "Success",
                    "startTime": 1652211976,
                    "endTime": 1652212006,
                    "execTimeMS": 30000
                }
            ],
            [
                {
                    "stepName": "paypal1_LaunchTaskPostImagePull",
                    "status": "Success",
                    "startTime": 1652212006,
                    "endTime": 1652212006
                }
            ],
            [
                {
                    "stepName": "genesis_LaunchTaskPostImagePull",
                    "status": "Success",
                    "startTime": 1652212006,
                    "endTime": 1652212006
                }
            ],
            [
                {
                    "stepName": "HealthCheck-networkproxy",
                    "status": "Success",
                    "tags": {
                        "containerId": "e52c05d1f41cd748f197bad11e25c5697e58ad5f6a955070c85aec9a56974705",
                        "exitCode": "0",
                        "healthStatus": "healthy",
                        "running": "true",
                        "serviceName": "networkproxy"
                    },
                    "startTime": 1652212028,
                    "endTime": 1652212049,
                    "execTimeMS": 21000
                }
            ],
            [
                {
                    "stepName": "HealthCheck-dockerserv",
                    "status": "Success",
                    "tags": {
                        "containerId": "6c6e846e6a570f68b8b93ac47f384d3fb5249cfedf023751afb5caf33824291c",
                        "exitCode": "0",
                        "healthStatus": "healthy",
                        "running": "true",
                        "serviceName": "dockerserv"
                    },
                    "startTime": 1652212028,
                    "endTime": 1652212049,
                    "execTimeMS": 21000
                }
            ],
            [
                {
                    "stepName": "HealthCheck-appidentityfetcher",
                    "status": "Success",
                    "tags": {
                        "containerId": "297f16debc181730b7339e84c06aa779858a25d2b63d0111ec645378180f226b",
                        "exitCode": "0",
                        "healthStatus": "healthy",
                        "running": "false",
                        "serviceName": "appidentityfetcher"
                    },
                    "startTime": 1652212028,
                    "endTime": 1652212049,
                    "execTimeMS": 21000
                }
            ],
            [
                {
                    "stepName": "general_PostLaunchTask",
                    "status": "Success",
                    "startTime": 1652212049,
                    "endTime": 1652212049
                }
            ],
            [
                {
                    "stepName": "genesis_LaunchTaskPreImagePull",
                    "status": "Success",
                    "startTime": 1652211975,
                    "endTime": 1652211975
                }
            ],
            [
                {
                    "stepName": "general_LaunchTaskPostImagePull",
                    "status": "Success",
                    "startTime": 1652212006,
                    "endTime": 1652212006
                }
            ],
            [
                {
                    "stepName": "Launch_Pod",
                    "status": "Success",
                    "startTime": 1652212006,
                    "endTime": 1652212014,
                    "execTimeMS": 8000
                }
            ],
            [
                {
                    "stepName": "HealthCheck-evergreen_jvm_infra",
                    "status": "Success",
                    "tags": {
                        "containerId": "cf4f06a61f879e51818548692695f95182368cb4c29ea34e10685b8fe91c954f",
                        "exitCode": "0",
                        "healthStatus": "healthy",
                        "running": "false",
                        "serviceName": "evergreen_jvm_infra"
                    },
                    "startTime": 1652212028,
                    "endTime": 1652212049,
                    "execTimeMS": 21000
                }
            ],
            [
                {
                    "stepName": "paypal1_PostLaunchTask",
                    "status": "Success",
                    "startTime": 1652212049,
                    "endTime": 1652212049
                }
            ],
            [
                {
                    "stepName": "genesis_PostLaunchTask",
                    "status": "Success",
                    "startTime": 1652212049,
                    "endTime": 1652212049
                }
            ],
            [
                {
                    "stepName": "paypal1_LaunchTaskPreImagePull",
                    "status": "Success",
                    "startTime": 1652211975,
                    "endTime": 1652211975
                }
            ]
        ]
    }