Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: $TARGET_BIN not found when docker run the image #3297

Merged
merged 7 commits into from
Feb 15, 2024
Merged

Conversation

daviderli614
Copy link
Member

@daviderli614 daviderli614 commented Feb 8, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This fixes #3298

Start the latest version of the greptime docker image and have an error:

Events:
  Type     Reason     Age                 From               Message
  ----     ------     ----                ----               -------
  Normal   Scheduled  2m12s               default-scheduler  Successfully assigned default/e2e-cluster-meta-c4b459789-z88zc to kind-control-plane
  Normal   Pulled     22s                 kubelet            Successfully pulled image "greptime/greptimedb:latest" in 1m50.002557716s (1m50.002580925s including waiting)
  Normal   Created    17s (x2 over 22s)   kubelet            Created container meta
  Warning  Failed     17s (x2 over 21s)   kubelet            Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "$TARGET_BIN": executable file not found in $PATH: unknown
  Normal   Pulled     17s                 kubelet            Successfully pulled image "greptime/greptimedb:latest" in 2.782102751s (2.782123793s including waiting)
  Warning  BackOff    12s (x3 over 17s)   kubelet            Back-off restarting failed container meta in pod e2e-cluster-meta-c4b459789-z88zc_default(834ac864-18c2-47ef-b7da-3a1d3b35a870)
  Normal   Pulling    1s (x3 over 2m12s)  kubelet            Pulling image "greptime/greptimedb:latest"

This is related to moby/moby#18492.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added docs-not-required This change does not impact docs. size/xs and removed docs-not-required This change does not impact docs. labels Feb 8, 2024
@daviderli614 daviderli614 added the docs-not-required This change does not impact docs. label Feb 8, 2024
@daviderli614 daviderli614 added the C-bug Category Bugs label Feb 8, 2024
@tisonkun tisonkun marked this pull request as draft February 8, 2024 15:25
@daviderli614
Copy link
Member Author

Seems to be a problem with this pr:#3254
I back to a working version, let the docker image running.

@daviderli614 daviderli614 requested a review from zyy17 February 8, 2024 16:42
@zyy17 zyy17 requested a review from MichaelScofield February 8, 2024 23:28
@zyy17
Copy link
Collaborator

zyy17 commented Feb 8, 2024

It’s not a good solution to revert the original PR without finding out the root cause of why run image failed. From the logs, I guess maybe the root cause should be TAGETBIN_BIN which it only works in build-time. IMO, the right solution is to add ENV instruction to inject the TARGET_BIN to envrionment.

@daviderli614 daviderli614 reopened this Feb 9, 2024
@daviderli614
Copy link
Member Author

I try to using ENV set TARGET_BIN.

docker/ci/centos/Dockerfile Outdated Show resolved Hide resolved
docker/ci/ubuntu/Dockerfile Outdated Show resolved Hide resolved
docker/ci/ubuntu/Dockerfile Outdated Show resolved Hide resolved
@zyy17 zyy17 changed the title fix: TARGET_BIN path fix: $TARGET_BIN not found when docker run the image Feb 15, 2024
@daviderli614 daviderli614 marked this pull request as ready for review February 15, 2024 10:52
Copy link
Collaborator

@zyy17 zyy17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zyy17
Copy link
Collaborator

zyy17 commented Feb 15, 2024

@MichaelScofield PTAL

@zyy17 zyy17 requested a review from sunng87 February 15, 2024 11:15
Copy link
Collaborator

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I updated the PR descirption for the background. You can add the necessary info in the PR description for the next time :D

@tisonkun tisonkun added this pull request to the merge queue Feb 15, 2024
@daviderli614
Copy link
Member Author

Thank @tisonkun

Merged via the queue into main with commit 31ace9d Feb 15, 2024
37 checks passed
@tisonkun tisonkun deleted the fix/docker-path branch February 15, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs docs-not-required This change does not impact docs.
Projects
None yet
3 participants