Skip to content

Commit

Permalink
Revert nanny_contact_address option from worker args (still debugging)
Browse files Browse the repository at this point in the history
  • Loading branch information
oshadura committed Feb 23, 2023
1 parent 95a6425 commit 38d2ed9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docker/k8s-worker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 10 additions & 15 deletions docker/prepare-env/prepare-env-cc-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down Expand Up @@ -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;}'`
Expand All @@ -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
Expand Down

0 comments on commit 38d2ed9

Please sign in to comment.