From 7b673ccdb442e9cf052a1e5ddad239c1b7e4cb7b Mon Sep 17 00:00:00 2001 From: frikky Date: Sat, 22 Jan 2022 01:46:16 +0000 Subject: [PATCH] Added small fixes to orborus and sdk --- backend/app_sdk/app_base.py | 8 +++++++- docker-compose.yml | 2 +- functions/onprem/orborus/build.sh | 2 +- functions/onprem/orborus/orborus.go | 10 +++++++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index f6a5a83e..cda19d93 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -2612,7 +2612,13 @@ class AppBase: for i in range(0, curminlength): tmpitem = json.loads(json.dumps(parameter["value"])) for key, value in replacements.items(): - replacement = json.dumps(json.loads(value)[i]) + replacement = value + try: + replacement = json.dumps(json.loads(value)[i]) + except IndexError as e: + self.logger.info(f"[ERROR] Failed handling value parsing with index: {e}") + pass + if replacement.startswith("\"") and replacement.endswith("\""): replacement = replacement[1:len(replacement)-1] #except json.decoder.JSONDecodeError as e: diff --git a/docker-compose.yml b/docker-compose.yml index d5c27571..19405365 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,7 +64,7 @@ services: - SHUFFLE_SWARM_CONFIG=runn restart: unless-stopped opensearch: - image: opensearchproject/opensearch:1.2.3 + image: opensearchproject/opensearch:1.2.4 hostname: shuffle-opensearch container_name: shuffle-opensearch environment: diff --git a/functions/onprem/orborus/build.sh b/functions/onprem/orborus/build.sh index f0186a6e..fa93483b 100644 --- a/functions/onprem/orborus/build.sh +++ b/functions/onprem/orborus/build.sh @@ -1,5 +1,5 @@ NAME=shuffle-orborus -VERSION=0.9.50 +VERSION=0.9.51 echo "Running docker build with $NAME:$VERSION" #docker rmi frikky/shuffle:$NAME --force diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 1c48f902..9fdc9b56 100644 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -37,9 +37,11 @@ import ( "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/swarm" + //"github.com/docker/docker/api/types/filters" dockerclient "github.com/docker/docker/client" - "github.com/satori/go.uuid" + uuid "github.com/satori/go.uuid" + //network "github.com/docker/docker/api/types/network" //natting "github.com/docker/go-connections/nat" "github.com/mackerelio/go-osstat/cpu" @@ -538,8 +540,14 @@ func deployWorker(image string, identifier string, env []string, executionReques nil, identifier+"-2", ) + if err != nil { + log.Printf("[ERROR] Failed to CREATE container (2): %s", err) + } err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) + if err != nil { + log.Printf("[ERROR] Failed to start container (2): %s", err) + } } else { log.Printf("[ERROR] Failed initial container start. Quitting as this is NOT a simple network issue. Err: %s", err) }