Bug 1313884

Summary: inconsistent docker api version between docker and atomic
Product: Container Development Kit (CDK) Reporter: Ondřej Pták <optak>
Component: vmsAssignee: Lalatendu Mohanty <lmohanty>
Status: VERIFIED --- QA Contact: David Kutálek <dkutalek>
Severity: high Docs Contact:
Priority: unspecified    
Version: RHEL 7.2.xCC: bgollahe, dustymabe, jgreguske
Target Milestone: beta4   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondřej Pták 2016-03-02 14:27:36 UTC
Description of problem:
atomic is not able to run atomicapp container and application in openshift

Version-Release number of selected component (if applicable):
rhel-cdk-kubernetes-7.2-15.x86_64.vagrant-virtualbox.box
docker-1.8.2-10.el7.x86_64
atomic-1.8-6.git1bc3814.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. vagrant up
2. vagrant ssh
3. oc login
4. oc new-project testing
5. sudo atomic  run tomaskral/helloflask-atomicapp --provider=openshift --providerconfig=/home/vagrant/.kube/config --namespace=testing

Actual results:
fail on assertion: self.inspect is not None, real problem hiddne by atomic:
400 Client Error: Bad Request ("client is newer than server (client API version: 1.21, server API version: 1.20)")

Expected results:
successful deployment of image

Additional info:
this worked in rhel-cdk-kubernetes-7.2-15.x86_64.vagrant-virtualbox.box

Comment 1 Dusty Mabe 2016-03-03 21:14:17 UTC
Ok so I hit some issues with Atomic cli when trying to run this:

```
Status: Image is up to date for docker.io/tomaskral/helloflask-atomicapp:latest

Traceback (most recent call last):
  File "/bin/atomic", line 524, in <module>
    sys.exit(_func())
  File "/usr/lib/python2.7/site-packages/Atomic/run.py", line 46, in run
    args = self._get_args("RUN")
  File "/usr/lib/python2.7/site-packages/Atomic/atomic.py", line 361, in _get_args
    labels = self._get_labels()
  File "/usr/lib/python2.7/site-packages/Atomic/atomic.py", line 279, in _get_labels
    return self._getconfig("Labels", [])
  File "/usr/lib/python2.7/site-packages/Atomic/atomic.py", line 266, in _getconfig
    assert self.inspect is not None
AssertionError
[vagrant@rhel-cdk ~]$ 
```

I didn't see the client/server version mismatch though. I ran the atomicapp directly from the command line (cutting out the Atomic CLI middle man and it worked fine using the following command.

sudo docker run -it --rm  --privileged -v $(pwd):/atomicapp -v /run:/run -v /:/host --net=host --name atomicapp tomaskral/helloflask-atomicapp run --provider=openshift --providerconfig=/home/vagrant/.kube/config --namespace=testing


I did notice some other issues with Atomic CLI though [1]. Maybe that version isn't stable.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1314541

Comment 2 Ondřej Pták 2016-03-03 23:18:54 UTC
Sorry, I didn't mention another related bug, which hides problems with docker api:
https://github.com/projectatomic/atomic/issues/312

Comment 3 Dusty Mabe 2016-03-04 04:32:11 UTC
(In reply to Ondřej Pták from comment #2)
> Sorry, I didn't mention another related bug, which hides problems with
> docker api:
> https://github.com/projectatomic/atomic/issues/312

Got ya. So I think the issue is between docker and atomic cli; which means atomicapp is not at fault here.

Here are the versions of some components on the cdk box that may help with investigation:

$ rpm -qa | grep 'docker\|atomic' 
docker-1.8.2-10.el7.x86_64
python-docker-py-1.6.0-1.el7.noarch
docker-registry-0.9.1-7.el7.x86_64
docker-selinux-1.8.2-8.el7.x86_64
atomic-1.8-6.git1bc3814.el7.x86_64

Comment 4 David Kutálek 2016-03-04 08:37:22 UTC
Actually I think that this issue happened in:
rhel-cdk-kubernetes-7.2-15.x86_64.vagrant-virtualbox.box

And not happened in:
rhel-cdk-kubernetes-7.2-14.x86_64.vagrant-virtualbox.box
(this version I tested and it worked)

There was an update of atomic in box #15 I think.

Comment 5 Ondřej Pták 2016-04-19 12:37:56 UTC
now there is docker 1.9.1 in box, with docker api 1.21
version: rhel-cdk-kubernetes-7.2-23.x86_64.vagrant*