tinkerbell / playground

Example deployments of the Tinkerbell Stack for use as playground environments
Apache License 2.0
126 stars 85 forks source link

"docker-compose up -d" step failing with error "sync-images-to-local-registry container "0d851d894440" is unhealthy" #148

Closed ashokjanardhana closed 1 year ago

ashokjanardhana commented 1 year ago

I am trying out steps to bring-up Tinkerbell on baremetal server with Windows 2019 installed. I am following steps mentioned in location "https://github.com/tinkerbell/sandbox/blob/main/docs/quickstarts/COMPOSE.md". In the above location at Step-4, after executing "docker-compose up -d" command, getting following error and not able to proceed.

ERROR : for sync-images-to-local-registry container "0d851d894440" is unhealthy. ERROR: Encountered errors while bringing up the project.

Expected Behaviour

Step-4 should complete with out errors and should be able to start the provisioner successfully and proceed further bring up of new machine.

Current Behaviour

Getting error in step-4 as explained above.

Possible Solution

Steps to Reproduce (for bugs)

Refer : https://github.com/tinkerbell/sandbox/blob/main/docs/quickstarts/COMPOSE.md

  1. Make sure pre-requisite are met and all components working fine.
  2. Start executing from Step-1

Context

I am trying to bring-up test machine.

Your Environment

Trying to setup provisioner on Windows 2019 DC. Running Tinkerbell on baremetal

gabrielbarata commented 1 year ago

I resolved that on sandbox\deploy\compose\sync-images-to-local-registry\upload.sh, adding dest=$(echo $dest|sed 's/\r$//') after read -r src dest <<<"$l". But, unfortunately, I still couldn't get the tinkerbell to work.

ashokjanardhana commented 1 year ago

@gabrielbarata , Thanks a lot for the response. I tried adding the line you mentioned ( dest=$(echo $dest|sed 's/\r$//') ) in upload.sh and re-ran the command "docker-compose up -d". Unfortunately issue is not resolved, still seeing the same error as before i.e "ERROR: for sync-images-to-local-registry Container "c1d2fcdaeda3" is unhealthy."

Copy/pasting the snippet from upload.sh below:

for l in "${lines[@]}"; do
        read -r src dest <<<"$l"
        dest=$(echo $dest|sed 's/\r$//')    **------> The line you mentioned to add.**
        echo "::::: syncying $src → $url/$dest :::::" >&2
        skopeo copy --all --dest-tls-verify=false --dest-creds="$user:$pass" "docker://$src" "docker://$url/$dest"
done

( I am seeing same error in Ubuntu also. Code snippet given above is from Ubuntu )

gabrielbarata commented 1 year ago

Can you run docker-compose logs sync-images-to-local-registry please?

ashokjanardhana commented 1 year ago

@gabrielbarata , I ran the command you gave but I am not seeing any logs getting displayed. Please find the console ouput.

xy@ab:~/sandbox/deploy/compose$ sudo docker-compose logs sync-images-to-local-registry
Attaching to
xy@ab:~/sandbox/deploy/compose$