Fixed more issues with worker grabbing logs
This commit is contained in:
@@ -2880,6 +2880,7 @@ class AppBase:
|
|||||||
logger = logging.getLogger(f"{cls.__name__}")
|
logger = logging.getLogger(f"{cls.__name__}")
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
logger.info("[DEBUG] Normal execution.")
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
### DEFAULT
|
### DEFAULT
|
||||||
NAME=shuffle-app_sdk
|
NAME=shuffle-app_sdk
|
||||||
VERSION=0.9.31
|
VERSION=0.9.32
|
||||||
|
|
||||||
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
|
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
|
||||||
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly
|
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
environment:
|
environment:
|
||||||
- SHUFFLE_WORKER_VERSION=0.9.25
|
- SHUFFLE_WORKER_VERSION=nightly
|
||||||
- ORG_ID=${ORG_ID}
|
- ORG_ID=${ORG_ID}
|
||||||
- ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
|
- ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
|
||||||
- BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT}
|
- BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT}
|
||||||
|
|||||||
@@ -225,13 +225,14 @@ func deployServiceWorkers(image string) {
|
|||||||
replicas := uint64(2)
|
replicas := uint64(2)
|
||||||
scaleReplicas := os.Getenv("SHUFFLE_SCALE_REPLICAS")
|
scaleReplicas := os.Getenv("SHUFFLE_SCALE_REPLICAS")
|
||||||
if len(scaleReplicas) > 0 {
|
if len(scaleReplicas) > 0 {
|
||||||
log.Printf("[DEBUG] SHUFFLE_SCALE_REPLICAS set to value %#v. Trying to overwrite default (2/node)", scaleReplicas)
|
|
||||||
tmpInt, err := strconv.Atoi(scaleReplicas)
|
tmpInt, err := strconv.Atoi(scaleReplicas)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] %s is not a valid number for replication", scaleReplicas)
|
log.Printf("[ERROR] %s is not a valid number for replication", scaleReplicas)
|
||||||
} else {
|
} else {
|
||||||
replicas = uint64(tmpInt)
|
replicas = uint64(tmpInt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("[DEBUG] SHUFFLE_SCALE_REPLICAS set to value %#v. Trying to overwrite default (%d/node)", scaleReplicas, replicas)
|
||||||
}
|
}
|
||||||
|
|
||||||
innerContainerName := fmt.Sprintf("shuffle-workers")
|
innerContainerName := fmt.Sprintf("shuffle-workers")
|
||||||
|
|||||||
@@ -570,6 +570,8 @@ github.com/shuffle/shuffle-shared v0.1.31 h1:+7OCH8G2fcg0Emqw3AR4iRZ9aFOEshi83HT
|
|||||||
github.com/shuffle/shuffle-shared v0.1.31/go.mod h1:0QrK51T12CpCj/be8hXduj/RtDnoeaZ3rfogELZE2IU=
|
github.com/shuffle/shuffle-shared v0.1.31/go.mod h1:0QrK51T12CpCj/be8hXduj/RtDnoeaZ3rfogELZE2IU=
|
||||||
github.com/shuffle/shuffle-shared v0.1.32 h1:VzYecAkUbydIe5ufe5z6T+3PaaKWJASVznhUdxoBe3M=
|
github.com/shuffle/shuffle-shared v0.1.32 h1:VzYecAkUbydIe5ufe5z6T+3PaaKWJASVznhUdxoBe3M=
|
||||||
github.com/shuffle/shuffle-shared v0.1.32/go.mod h1:0QrK51T12CpCj/be8hXduj/RtDnoeaZ3rfogELZE2IU=
|
github.com/shuffle/shuffle-shared v0.1.32/go.mod h1:0QrK51T12CpCj/be8hXduj/RtDnoeaZ3rfogELZE2IU=
|
||||||
|
github.com/shuffle/shuffle-shared v0.1.33 h1:1U0yKWNfW7K7EKOj2aqSmd20UIA+nJeIurGEfx29ffU=
|
||||||
|
github.com/shuffle/shuffle-shared v0.1.33/go.mod h1:0QrK51T12CpCj/be8hXduj/RtDnoeaZ3rfogELZE2IU=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||||
|
|||||||
@@ -401,6 +401,7 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
|
|||||||
if workflowExecution.ExecutionSource != "default" {
|
if workflowExecution.ExecutionSource != "default" {
|
||||||
log.Printf("[INFO] Handling NON-default execution source %s - NOT waiting or validating!", workflowExecution.ExecutionSource)
|
log.Printf("[INFO] Handling NON-default execution source %s - NOT waiting or validating!", workflowExecution.ExecutionSource)
|
||||||
} else if workflowExecution.ExecutionSource == "default" {
|
} else if workflowExecution.ExecutionSource == "default" {
|
||||||
|
/*
|
||||||
time.Sleep(2 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
|
|
||||||
stats, err := cli.ContainerInspect(ctx, cont.ID)
|
stats, err := cli.ContainerInspect(ctx, cont.ID)
|
||||||
@@ -427,8 +428,7 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
|
|||||||
// FIXME: Re-add log tracking which can be sent to backend
|
// FIXME: Re-add log tracking which can be sent to backend
|
||||||
//allLogs[actionId] = logs
|
//allLogs[actionId] = logs
|
||||||
|
|
||||||
if stats.ContainerJSONBase.State.Status == "exited" && (!strings.Contains(logs, "Normal execution.") && !strings.Contains(logs, "indicates microservices")) {
|
if stats.ContainerJSONBase.State.Status == "exited" && (!strings.Contains(logs, "Normal execution") && !strings.Contains(logs, "indicates microservices") && !strings.Contains(logs, "starting action result")) {
|
||||||
|
|
||||||
if len(logs) > 10 {
|
if len(logs) > 10 {
|
||||||
log.Printf("[ERROR] BAD Execution Logs for %s: %s", action.ID, logs)
|
log.Printf("[ERROR] BAD Execution Logs for %s: %s", action.ID, logs)
|
||||||
exit = true
|
exit = true
|
||||||
@@ -441,6 +441,8 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
|
|||||||
return errors.New(fmt.Sprintf(`{"success": false, "reason": "Container %s exited prematurely.","debug": "docker logs -f %s"}`, cont.ID, cont.ID))
|
return errors.New(fmt.Sprintf(`{"success": false, "reason": "Container %s exited prematurely.","debug": "docker logs -f %s"}`, cont.ID, cont.ID))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
log.Printf("[INFO] Handling DEFAULT execution source %s - SKIPPING wait anyway due to exited issues!", workflowExecution.ExecutionSource)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] Deployed container ID %s", cont.ID)
|
log.Printf("[DEBUG] Deployed container ID %s", cont.ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user