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

Exit with error when Docker version is too old #11543

Closed
dinever opened this issue May 31, 2021 · 10 comments · Fixed by #13842
Closed

Exit with error when Docker version is too old #11543

dinever opened this issue May 31, 2021 · 10 comments · Fixed by #13842
Assignees
Labels
co/docker-driver Issues related to kubernetes in container kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@dinever
Copy link
Contributor

dinever commented May 31, 2021

#10369 dropped the error in the Docker version validation to support old Docker versions.

With this change, the users get a confusing docker info --format : exit status 2 error when they're using ancient Docker versions (<1.13.0) that don't even support docker info --version, see
#11480
#11538

Should we exit with an error and tell users to upgrade their Docker version when it's way too old?

One option is to define two constants: minDockerVer (e.g. 1.13.0) and recommendedDockerVer (18.09.0):

  1. If user Docker version < minDockerVer: Exit with error message
  2. If user Docker version < recommendedDockerVer: Only show suggestions to upgrade Docker
  3. If user Docker version >= recommendedDockerVer: Do nothing
@dinever
Copy link
Contributor Author

dinever commented May 31, 2021

Related to #9077

docker info --format and docker system were both added in v1.13.0

docker cp -a was added in v18.06.0: docker/cli@7a767a1

@dinever
Copy link
Contributor Author

dinever commented May 31, 2021

Another option is to remind the user to upgrade Docker when commands like docker info --format and docker system failed.

@RA489
Copy link

RA489 commented Jun 7, 2021

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Jun 7, 2021
@afbjorklund
Copy link
Collaborator

afbjorklund commented Jun 13, 2021

We should bump the required version for the Docker driver to 2018, and leave the old versions only for the container runtime...

We don't want to spend all resources "supporting" old deprecated versions of Docker and Podman, when even upstream doesn't.

@afbjorklund afbjorklund removed the kind/support Categorizes issue or PR as a support question. label Jun 13, 2021
@afbjorklund
Copy link
Collaborator

@dinever : we already have var minDockerVersion = []int{18, 9, 0} since 4500be1

It should exit with an error, at least require some kind of force flag to run. Recommend 20.10.

@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container kind/feature Categorizes issue or PR as related to a new feature. labels Jun 13, 2021
@spowelljr spowelljr added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jun 15, 2021
@medyagh
Copy link
Member

medyagh commented Jun 23, 2021

I am in favor of at least giving solution message to user if their old docker is cause of the problem like this #11480

(we should still allow users to run old dockers with --force if they wanna do it anyways)

@dinever I would accept a PR that does that (or updates our current validation)

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 21, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 21, 2021
@sharifelgamal sharifelgamal added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Nov 3, 2021
@sharifelgamal
Copy link
Collaborator

Let's add this back in soon.

@sharifelgamal sharifelgamal added this to the 1.25.0-candidate milestone Nov 3, 2021
@spowelljr spowelljr added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Dec 29, 2021
@medyagh
Copy link
Member

medyagh commented Jan 31, 2022

@dinever are u interested in this PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants