How to upgrade Openshift Origin Docker to latest version? - docker

We are running Openshift Origin which got installed by using the Ansible playbooks.
This by default installed docker 1.9.1, now we have to upgrade it to the latest version because of frequent crashes of docker.
But seems like Origin package dependent on docker 1.9.1.
So, How do I upgrade docker to latest version which is recognizable by Origin?
Origin 1.4.1, RHEL 7.2

Origin 1.4.1 requires Docker 1.12 and RedHat/CentOS 7.3. (the docs are for OCP 3.4 but they match with Origin 1.4)
Upgrading RHEL to 7.3 should also let you install Docker 1.12:
(master-prod-public)root#master1:~# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
(master-prod-public)root#master1:~# docker version
Client:
Version: 1.12.6
API version: 1.24
Package version: docker-common-1.12.6-16.el7.x86_64
Go version: go1.7.4
Git commit: 3a094bd/1.12.6
Built: Tue Mar 21 13:30:59 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Package version: docker-common-1.12.6-16.el7.x86_64
Go version: go1.7.4
Git commit: 3a094bd/1.12.6
Built: Tue Mar 21 13:30:59 2017
OS/Arch: linux/amd64
Also check if there are any leftover versionlocks:
(m
aster-prod-public)root#master1:~# yum versionlock
Loaded plugins: search-disabled-repos, versionlock
# list of locked packages...
versionlock list done

Related

Are docker version and docker engine version the same? How to check them separately?

docker version returns:
Client:
Version: 17.12.1-ce
API version: 1.35
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:17:40 2018
OS/Arch: linux/amd64
Server
Engine:
Version: 17.12.1-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:16:13 2018
OS/Arch: linux/amd64
Experimental: false
I want to install jupyterhub which requires docker engine 1.12.0, but I doubt that Version 17.12.1 is not the the engine version. How can I get the engine version?
Docker Engine versioning changed from February to March 2017.
The last version in the old format is 1.13.1 (2017-02-08). The first stable version of the community edition in the new format is 17.03.0-ce (2017-03-01).
So, 17.12.1 is newer than 1.12.0 and they both refer to the Docker Engine.
You can check the old versions here: https://docs.docker.com/release-notes/docker-engine/ and the new versions here: https://docs.docker.com/release-notes/docker-ce/.

Kubernetes installation on fedora meets a package conflict

When I follow the kubernetes guide to install kubernetes on my local machine which runs fedora 27. I have already installed docker-ce 17.12(followed the Docker CE documentation).
bellow is the install output. is there any body can figure out what should I do to make kubernetes installed but also keep my docker-ce?
[ian#thinkpad ~]$ sudo LANG=en_US.UTF-8 dnf install kubernetes
Last metadata expiration check: 7:31:34 ago on Sat 13 Jan 2018 12:51:44 PM CST.
Error:
Problem: package kubernetes-node-1.7.3-1.fc27.x86_64 requires docker, but none of the providers can be installed
- package docker-ce-17.12.0.ce-1.fc27.x86_64 conflicts with docker provided by docker-2:1.13.1-42.git4402c09.fc27.x86_64
- package docker-ce-17.12.0.ce-1.fc27.x86_64 conflicts with docker provided by docker-2:1.13.1-26.gitb5e3294.fc27.x86_64
- problem with installed package docker-ce-17.12.0.ce-1.fc27.x86_64
- package kubernetes-1.7.3-1.fc27.x86_64 requires kubernetes-node = 1.7.3-1.fc27, but none of the providers can be installed
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
[ian#thinkpad ~]$ docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:12:17 2017
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:14:50 2017
OS/Arch: linux/amd64
Experimental: false
[ian#thinkpad ~]$
Just requested for push of f27 update of kubernetes-1.9.1 [1] to the stable repository that allows to install either docker or docker-ce. It should take day or 2 to transit. Meantime you can install the kubernetes-node rpm from the update [1]. Tested that locally. Let me know if it does not work for you.
[1] https://bodhi.fedoraproject.org/updates/FEDORA-2018-d0a64cb26c
Regards
Jan
This is a known issue and an update is pending. Eventually, that will be in the updates set for F27 proper. In the meantime, you can get it from updates-testing, by doing:
sudo dnf --enablerepo=updates-testing install kubernetes
... and if that works for you, please add feedback on the pending update.

Docker - Client version is newer than server

Docker daemon in minikube
When I do
docker version
I have
Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.23)
I want to use export DOCKER_API_VERSION=1.23 to downgrade docker.
But it doesn't work when I use minikube and use eval $(minikube docker-env). The client version is always 1.23
Please see the image about the comparison before and after using minikube docker daemon. The DOCKER_API_VERSION is always 1.23. But the client version is not 1.23.
I cannot reproduce the issue with the newest minikube image and the latest docker installation. I think that the cause is that you are using an old version of minikube. Could you check that?
2017-10-04 17:17:34 ⌚ ip-192-168-200-196 in ~
○ → eval $(minikube docker-env)
2017-10-04 17:17:36 ⌚ ip-192-168-200-196 in ~
○ → docker version
Client:
Version: 17.09.0-ce
API version: 1.24 (downgraded from 1.23)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: darwin/amd64
Server:
Version: 1.12.6
API version: 1.24 (minimum version )
Go version: go1.6.4
Git commit: 78d1802
Built: Wed Jan 11 00:23:16 2017
OS/Arch: linux/amd64
Experimental: false
2017-10-04 17:17:41 ⌚ ip-192-168-200-196 in ~
○ → minikube version
minikube version: v0.22.2

How to know that docker installed in redhat is community or enterprise edition?

Some person has install docker in my Redhat system . I want to know whether it is community edition or enterprise edition . How can i do so?
I know community edition is not for Redhat .
May be some person would have created centos.repo in Redhat and installed docker ce .
This is what
docker version
gives
When i do
"rpm -qif /usr/bin/docker"
With docker version command
CE : Comunity edition
EE : Entreprise edition
So 17.06.0-ce correspond to community edition
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:18:10 2017
OS/Arch: linux/amd64
Server:
Version: 17.06.0-ce
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:17:03 2017
OS/Arch: linux/amd64
Experimental: false
If you haven't ce or ee, it's because you have installed docker.io package, which is maintened by Ubuntu.
Version: 1.12.3
On Windows, you can also look about docker here :
EDIT
Docker Community Edition (Docker CE) is not supported on RHEL.
So, you have Docker entreprise edition.
See Docker documentation
Anyway, there are some ways to install docker-ce, but you will see docker community edition with docker version.
It seems to me that this is neither the Community Edition nor the Enterprise Edition. Based on the version and build date you posted, it looks like a build from the Red Hat Enterprise Linux 7 Extras channels (as the build time is identical to what is built into its docker client binary—but the time is different from the RPM build time, which confused me initially).
You should be able to double-check using
rpm -qif /usr/bin/docker
and compare the package signer with the official Red Hat product signing keys.
Software provided in the Red Hat Enterprise Linux Extras channels is fully supported by Red Hat. (The difference from other channels is the update frequency, not the support coverage.) In this sense, these builds are closer to the Enterprise Edition from Docker, Inc., because there is vendor support (unlike the Community Edition, which is, I think, unsupported).
Disclaimer: While I work for Red Hat, you need to review the agreements for yourself to determine support coverage etc., and contact customer support in case there are open questions.
Just execute docker version. All before Docker version 17.03 did not have a -ce or -ee in the version.
# docker version
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:07:40 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 11:07:40 2017
OS/Arch: linux/amd64
Experimental: false

Why is docker-compose throwing an error?

$ docker-compose up
Creating network "app_default" with the default driver
ERROR: b'failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network'
What is the meaning of this error, and how can I fix it?
Additional context:
$ docker-compose version
docker-compose version 1.7.1, build 6c29830
docker-py version: 1.8.1
CPython version: 3.5.1
OpenSSL version: OpenSSL 1.0.2h 3 May 2016
$ docker version
Client:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 21:49:11 2016
OS/Arch: darwin/amd64
Server:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Wed Apr 27 00:34:20 2016
OS/Arch: linux/amd64
Are you using some vpn service?
Here is a link to a possible reason:
https://github.com/docker/libnetwork/issues/779
I was having this problem. Solved by removing all docker defined networks with:
docker network rm `docker network ls -q`

Resources