Closed mdshuai closed 7 years ago
Hey @mdshuai, This is due to the docker-py and docker libraries writing to the same files. Please try doing the following:
pip uninstall docker-py
pip uninstall docker
pip install docker
docker-py is the older library for docker. They renamed when they went to 2.0. This is a common problem so we will try to find a workaround for that. Please let me know if that fixes your issue.
@dymurray Thanks for your reply, it work for me. I can build success
The issue now is why I install docker-py
in my local? becase catasb now need this. So we need update catasb
to use latest docker library
catasb local: Failed to import docker-py
detail:
# ./run_setup_local.sh
[WARNING]: provided hosts list is empty, only localhost is available
PLAY [localhost] ***************************************************************
TASK [setup] *******************************************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
skipping: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
skipping: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : set_fact] **********************************************
ok: [localhost]
TASK [openshift_setup : file] **************************************************
ok: [localhost]
TASK [openshift_setup : Download oc binary "https://github.com/openshift/origin/releases/download/v3.6.0-alpha.1/openshift-origin-client-tools-v3.6.0-alpha.1-46942ad-linux-64bit.tar.gz"] ***
ok: [localhost]
TASK [openshift_setup : extract archive] ***************************************
skipping: [localhost]
TASK [openshift_setup : Untar openshift-origin-client-tools-v3.6.0-alpha.1-46942ad-linux-64bit.tar.gz] ***
skipping: [localhost]
TASK [openshift_setup : Install oc] ********************************************
skipping: [localhost]
TASK [openshift_setup : Install oc] ********************************************
ok: [localhost]
TASK [openshift_setup : Download kube_ctl, "https://storage.googleapis.com/kubernetes-release/release/v1.6.0/bin/linux/amd64/kubectl"] ***
ok: [localhost]
TASK [openshift_setup : Wait, up to 20 minutes, till we can SSH into the host with the DNS name '172.17.0.1'] ***
skipping: [localhost]
TASK [openshift_setup : Resetting cluster, False] ******************************
skipping: [localhost]
TASK [openshift_setup : Install docker through pip as it's a requirement of ansible docker module] ***
ok: [localhost]
TASK [openshift_setup : Removing certain docker images if they exist so we are sure we are pulling latest] ***
skipping: [localhost] => (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/ansible-service-broker-apb'})
skipping: [localhost] => (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/ansible-service-broker-asb'})
skipping: [localhost] => (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/ansible-service-broker-etcd'})
skipping: [localhost] => (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/postgresql-demo-apb'})
skipping: [localhost] => (item={u'tag': u'summit', u'img': u'docker.io/ansibleplaybookbundle/rds-postgres-apb'})
skipping: [localhost] => (item={u'tag': u'app-latest', u'img': u'manageiq/manageiq-pods'})
skipping: [localhost] => (item={u'tag': u'memcached-latest', u'img': u'manageiq/manageiq-pods'})
skipping: [localhost] => (item={u'tag': u'postgresql-latest', u'img': u'manageiq/manageiq-pods'})
skipping: [localhost] => (item={u'tag': u'postgis', u'img': u'docker.io/fabianvf/postgresql'})
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
PLAY RECAP *********************************************************************
localhost : ok=14 changed=0 unreachable=0 failed=1
Create a new issue in catasb
and close this https://github.com/fusor/catasb/issues/52
When run apb build, I get an error, anyone could help what's wrong with my env? thanks.