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

Running HammerDB DockerFile-built container in any K8s distro is failing #495

Closed
sm-shaw opened this issue Jan 25, 2023 Discussed in #493 · 3 comments · Fixed by #524
Closed

Running HammerDB DockerFile-built container in any K8s distro is failing #495

sm-shaw opened this issue Jan 25, 2023 Discussed in #493 · 3 comments · Fixed by #524
Assignees
Labels
bug Something isn't working docker docker file and image related

Comments

@sm-shaw
Copy link
Contributor

sm-shaw commented Jan 25, 2023

Discussed in #493

Originally posted by rfsonders January 23, 2023
Hi folks.
I am attempting, without success, to run the Dockerfile-built container, deployed to any K8s distro. Even testing with the small k8s docker desktop distro. The container loops with CrashLoopBackOff. Over and over. Also tested with AKS. Same error.

The container does run fine, directly in docker. I can bash right in and execute .tcl, not a problem.
I am at a loss as to why the same container will not start in k8s.

Any help, thoughts, or direction would be appreciated.
Thank you!

@sm-shaw
Copy link
Contributor Author

sm-shaw commented Jan 25, 2023

Converted to an Issue, so this is something that we can track and resolve.

@sm-shaw sm-shaw added the bug Something isn't working label Jan 25, 2023
@rfsonders
Copy link

Hello.
Some workarounds can be.

  1. at the end of the DockerFile. CMD tail -f /dev/null
  2. In the .yaml
    command:
    • "sleep"
    • "604800"

I am still testing as to which is a better option.

@sm-shaw sm-shaw added the docker docker file and image related label Jan 26, 2023
@pooja-jain-17
Copy link
Collaborator

Hello Robert, Thanks for pointing this out.

As I understand, the HammerDB docker container immediately exits as we spin it without the interactive options (-it)
For example if we run as
docker run --name hammerdb hammerdb-v4.6
instead of
docker run -it --name hammerdb hammerdb-v4.6 bash
Which is what I suspect is leading to CrashLoopbackoff on K8s.

I liked your suggestion of adding sleep infinity to the yaml. I have tried and I think that it works fine.
Here is a snippet of the yaml.

apiVersion: v1
kind: Pod
metadata:
  name: hammerdb
spec:
  containers:
  - name: testpod
    image: tpcorg/hammerdb:latest
    command: ["sleep", "infinity"]

About the other suggestion, adding "CMD tail -f /dev/null" in the Dockerfile, This works too, but this may lead to Docker hangs or rogue containers running in background. I am not too sure about including this in the Dockerfile for now.

Thanks.

@sm-shaw sm-shaw linked a pull request Mar 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker docker file and image related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants