fusor / catasb

Ansible scripts to setup an 'oc cluster up' environment for testing the Service Catalog and Ansible Service Broker on EC2 or Local
47 stars 33 forks source link

Need update docker library > 2.0 #52

Closed mdshuai closed 7 years ago

mdshuai commented 7 years ago

According the https://github.com/fusor/ansible-playbook-bundle/issues/36#issuecomment-303703261 we need update docker library > 2.0, otherwise it will conflict with apb build

# pip list|grep docker
docker (2.3.0)
docker-pycreds (0.2.1)

Local install failed with:
TASK [openshift_setup : Pulling all docker images we require] ******************
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/ansible-service-broker-apb'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/ansible-service-broker-apb", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/ansible-service-broker-asb'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/ansible-service-broker-asb", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/ansible-service-broker-etcd'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/ansible-service-broker-etcd", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/postgresql-demo-apb'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/postgresql-demo-apb", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/rds-postgres-apb'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/rds-postgres-apb", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'app-latest', u'img': u'manageiq/manageiq-pods'}) => {"failed": true, "item": {"img": "manageiq/manageiq-pods", "tag": "app-latest"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'memcached-latest', u'img': u'manageiq/manageiq-pods'}) => {"failed": true, "item": {"img": "manageiq/manageiq-pods", "tag": "memcached-latest"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'postgresql-latest', u'img': u'manageiq/manageiq-pods'}) => {"failed": true, "item": {"img": "manageiq/manageiq-pods", "tag": "postgresql-latest"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'postgis', u'img': u'docker.io/fabianvf/postgresql'}) => {"failed": true, "item": {"img": "docker.io/fabianvf/postgresql", "tag": "postgis"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/controller-manager'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/controller-manager", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/apiserver'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/apiserver", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'latest', u'img': u'docker.io/centos/python-35-centos7'}) => {"failed": true, "item": {"img": "docker.io/centos/python-35-centos7", "tag": "latest"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'latest', u'img': u'docker.io/centos/python-34-centos7'}) => {"failed": true, "item": {"img": "docker.io/centos/python-34-centos7", "tag": "latest"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'latest', u'img': u'docker.io/centos/python-27-centos7'}) => {"failed": true, "item": {"img": "docker.io/centos/python-27-centos7", "tag": "latest"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/origin'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/origin", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/origin-sti-builder'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/origin-sti-builder", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/origin-deployer'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/origin-deployer", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/origin-docker-registry'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/origin-docker-registry", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
failed: [localhost] (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/origin-haproxy-router'}) => {"failed": true, "item": {"img": "docker.io/ansibleplaybookbundle/origin-haproxy-router", "tag": "summit"}, "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"}
    to retry, use: --limit @/data/src/github.com/fusor/catasb/ansible/setup_local_environment.retry
mdshuai commented 7 years ago

cc @dymurray

jwmatthews commented 7 years ago

I saw success by running: pip uninstall docker docker-py

Then re-running our ansible scripts.

jwmatthews commented 7 years ago

I think this issue is now resolved with the above workaround if the older docker-py was installed.

Please re-open otherwise.

jwmatthews commented 7 years ago

Note, I saw this again, but I was on ansible-2.2

Once I upgraded to ansible 2.3.0 issue was resolved.