Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

workflow-helper.sh doesn't execute 2nd docker run #21

Closed
Ottovsky opened this issue Apr 20, 2020 · 1 comment · Fixed by #25
Closed

workflow-helper.sh doesn't execute 2nd docker run #21

Ottovsky opened this issue Apr 20, 2020 · 1 comment · Fixed by #25

Comments

@Ottovsky
Copy link

Hey there,

It looks like there is some sort of race condition in workflow-helper.sh. When workflow-helper.sh is executed as part of init.rd the following command from the mentioned script is not executed:

https://github.com/tinkerbell/osie/blob/master/installer/workflow-helper.sh#L69-L81

docker run --privileged -ti \
	-e "container_uuid=$id" \
	-e "WORKER_ID=$worker_id" \
	-e "DOCKER_REGISTRY=$docker_registry" \
	-e "TINKERBELL_GRPC_AUTHORITY=$grpc_authority" \
	-e "TINKERBELL_CERT_URL=$grpc_cert_url" \
	-e "REGISTRY_USERNAME=$registry_username" \
	-e "REGISTRY_PASSWORD=$registry_password" \
	-v /worker:/worker \
	-v /var/run/docker.sock:/var/run/docker.sock \
	--log-driver=fluentd -t \
	--net host \
	"$docker_registry/tink-worker:latest"

Re-running workflow-helper.sh manually succeeds and executes without problems.

@invidian
Copy link
Contributor

I added some logging capabilities to the script and I get the following error:

the input device is not a TTY

https://stackoverflow.com/a/43099210/2974814 suggests to just remove -it from the command, which I think make sense, as we don't run it interactively anyway.

After this change, tink-worker starts just fine. Will submit a PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants