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

Healthcheck doc and completion fixes #3455

Closed
wants to merge 4 commits into from
Closed

Healthcheck doc and completion fixes #3455

wants to merge 4 commits into from

Conversation

csomh
Copy link
Contributor

@csomh csomh commented Jun 28, 2019

The --healthcheck-* docs and completion has some issues in podman version 1.4.2 on Fedora 30:

  • Bash completion completes --health-*. Although this would be compatible with Docker CLI (is podman still aiming for this?), the actual implementation is --healthcheck-*.
  • --healthcheck-command=command is documented as --healthcheck=command.
  • --no-healthcheck has currently(?) no implementation, while it's offered by bash completion.
  • It's nowhere mentioned that healthchecks only work when running as root.

This change attempts to address all the above.

Let me know if any of this needs adjustment.

Hunor Csomortáni added 4 commits June 28, 2019 13:06
Avoid users having to guess if the issue is with their setup or the way
they run the commands.

Signed-off-by: Hunor Csomortáni <[email protected]>
Although this is not compatible with [Docker CLI].

[Docker CLI]: https://docs.docker.com/engine/reference/run/#healthcheck

Signed-off-by: Hunor Csomortáni <[email protected]>
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: csomh
To complete the pull request process, please assign umohnani8
You can assign the PR to them by writing /assign @umohnani8 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added size/S needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 28, 2019
@openshift-ci-robot
Copy link
Collaborator

Hi @csomh. Thanks for your PR.

I'm waiting for a containers or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rh-atomic-bot
Copy link
Collaborator

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@rhatdan
Copy link
Member

rhatdan commented Jun 28, 2019

Our aim is to be compatable with Docker, So I would prefer to change the commands to match Docker commands.

      --health-cmd string              Command to run to check health
      --health-interval duration       Time between running the check
      --health-retries int             Consecutive failures needed to
                                       report unhealthy
      --health-start-period duration   Start period for the container to
                                       health-retries countdown
      --health-timeout duration        Maximum time to allow one check to
      --no-healthcheck                 Disable any container-specified

@baude PTAL

@rhatdan
Copy link
Member

rhatdan commented Jun 28, 2019

@csomh If you could open a PR to fix podman run commands to use the "Docker" equivalents, and perhaps alias the names podman chose, I think that would be the best fix.

@TomSweeneyRedHat
Copy link
Member

bot, add author to whitelist

@baude
Copy link
Member

baude commented Jun 28, 2019

there is no docker equiv. they dont do any of this outside of the dockerfile as far as I know.

@csomh
Copy link
Contributor Author

csomh commented Jun 28, 2019

@csomh If you could open a PR to fix podman run commands to use the "Docker" equivalents, and perhaps alias the names podman chose, I think that would be the best fix.

Sure, will do next week.

@csomh
Copy link
Contributor Author

csomh commented Jun 28, 2019

there is no docker equiv. they dont do any of this outside of the dockerfile as far as I know.

@baude it's possible to run:

$ docker run --health-cmd='echo 1' --health-interval=3s fedora:latest sleep 100

and see the container shown as healthy in docker ps.

$ docker --version
Docker version 1.13.1, build 1185cfd/1.13.1

The only option missing from the version above is --health-start-period (which is API 1.29+).

@baude
Copy link
Member

baude commented Jun 28, 2019

cool! that is news to me!

@csomh csomh closed this Jul 4, 2019
stefanb2 added a commit to stefanb2/libpod that referenced this pull request Jul 14, 2019
Fix Docker CLI compatibility issue: the "--healthcheck-command" option
value should not be split but instead be passed as single string to
"CMD-SHELL", i.e. "/bin/sh -c <opt>".

On the other hand implement the same extension as is already available
for "--entrypoint", i.e. allow the option value to be a JSON array of
strings. This will make life easier for tools like podman-compose.

Updated "--healthcheck-command" option values in tests accordingly.

Continuation of containers#3455 & containers#3507

Signed-off-by: Stefan Becker <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants