diff --git a/docker/k8s-worker/supervisord.conf b/docker/k8s-worker/supervisord.conf index a79a16c3..bea1e0e7 100644 --- a/docker/k8s-worker/supervisord.conf +++ b/docker/k8s-worker/supervisord.conf @@ -68,7 +68,7 @@ serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket ; Adding (ENV_WORKER_ID) should fixes https://github.com/CoffeaTeam/jhub/issues/37 [program:dask-worker] -command=/bin/bash -c "dask-worker tls://%(ENV_HOST_IP)s:8786 --nthreads 2 --tls-ca-file %(ENV_CERT_DIR)s/..data/ca.pem --tls-cert %(ENV_CERT_DIR)s/..data/hostcert.pem --tls-key %(ENV_CERT_DIR)s/..data/hostcert.pem --nanny --nanny-port 8001 --nanny-contact-address tls://%(ENV_WORKER_IP)s:8001 --listen-address tls://0.0.0.0:8788 --name kubernetes-worker-%(ENV_WORKER_ID)s --contact-address tls://%(ENV_WORKER_IP)s:8788" +command=/bin/bash -c "dask-worker tls://%(ENV_HOST_IP)s:8786 --nthreads 2 --tls-ca-file %(ENV_CERT_DIR)s/..data/ca.pem --tls-cert %(ENV_CERT_DIR)s/..data/hostcert.pem --tls-key %(ENV_CERT_DIR)s/..data/hostcert.pem --nanny --listen-address tls://0.0.0.0:8788 --name kubernetes-worker-%(ENV_WORKER_ID)s --contact-address tls://%(ENV_WORKER_IP)s:8788" startretries=100 autostart=true autorestart=true diff --git a/docker/prepare-env/prepare-env-cc-analysis.sh b/docker/prepare-env/prepare-env-cc-analysis.sh index 09b80763..c5db35dd 100644 --- a/docker/prepare-env/prepare-env-cc-analysis.sh +++ b/docker/prepare-env/prepare-env-cc-analysis.sh @@ -47,14 +47,14 @@ if [[ ! -v COFFEA_CASA_SIDECAR ]]; then echo "Got dask_HostPort, proceeding..." echo - while true; do - if grep nanny_HostPort "$_CONDOR_JOB_AD"; then - break - fi - sleep 1 - done - echo "Got nanny_HostPort, proceeding..." - echo + #while true; do + # if grep nanny_HostPort "$_CONDOR_JOB_AD"; then + # break + # fi + # sleep 1 + #done + #echo "Got nanny_HostPort, proceeding..." + #echo if [ -z "$_CONDOR_JOB_IWD" ]; then echo "Error: something is wrong, $_CONDOR_JOB_IWD (path to the initial working directory the job was born with) was not defined!" @@ -113,12 +113,9 @@ if [[ ! -v COFFEA_CASA_SIDECAR ]]; then # memory requested for worker, hostname of scheduler), parcing HTCondor Job AD file` # Nanny container port will be used later... PORT=`cat $_CONDOR_JOB_AD | grep dask_HostPort | tr -d '"' | awk '{print $NF;}'` - NANNYPORT=`cat $_CONDOR_JOB_AD | grep nanny_HostPort | tr -d '"' | awk '{print $NF;}'` - NANNYCONTAINER_PORT=`cat $_CONDOR_JOB_AD | grep nanny_ContainerPort | tr -d '"' | awk '{print $NF;}'` - CONTAINER_PORT=`cat $_CONDOR_JOB_AD | grep dask_ContainerPort | tr -d '"' | awk '{print $NF;}'` - #FIXME: - #NANNY_PORT=`cat $_CONDOR_JOB_AD | grep nanny_HostPort | tr -d '"' | awk '{print $NF;}'` + #NANNYPORT=`cat $_CONDOR_JOB_AD | grep nanny_HostPort | tr -d '"' | awk '{print $NF;}'` #NANNYCONTAINER_PORT=`cat $_CONDOR_JOB_AD | grep nanny_ContainerPort | tr -d '"' | awk '{print $NF;}'` + CONTAINER_PORT=`cat $_CONDOR_JOB_AD | grep dask_ContainerPort | tr -d '"' | awk '{print $NF;}'` HOST=`cat $_CONDOR_JOB_AD | grep RemoteHost | tr -d '"' | tr '@' ' ' | awk '{print $NF;}'` NAME=`cat $_CONDOR_JOB_AD | grep "DaskWorkerName " | tr -d '"' | awk '{print $NF;}'` CPUS=`cat $_CONDOR_JOB_AD | grep "DaskWorkerCores " | tr -d '"' | awk '{print $NF;}'` @@ -142,12 +139,10 @@ if [[ ! -v COFFEA_CASA_SIDECAR ]]; then --nthreads $CPUS \ --memory-limit $MEMORY_MB_FORMATTED \ --nanny \ - --nanny-port $NANNYCONTAINER_PORT \ --death-timeout 60 \ --protocol tls \ --lifetime 7200 \ --listen-address tls://0.0.0.0:$CONTAINER_PORT \ - --nanny-contact-address tls://$HOST:$NANNYPORT \ --contact-address tls://$HOST:$PORT" # Debug print echo $HTCONDOR_COMAND 1>&2