How to trace and examine a hanging task?

35 views
Skip to first unread message

Thomas Steinbach

unread,
Feb 10, 2016, 3:27:55 PM2/10/16
to Ansible Project
Hello,

I am executing a huge playbook, which is hanging on following task:

- name: create default DVC
  docker:
    name: "{{ dapp_name }}-dvc"
    image: "{{ dapp_image }}:{{ dapp_version }}"
    state: present

By executing ps aux | grep vagrant that Ansible would processing following Python file:

vagrant   8260  0.0  0.5  55516 15976 pts/0    S+   18:33   0:00 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1455129213.02-267359423089921/docker


Question: Is there a possibility to trace back, why or at which point the execution of this script is hanging? Is there a possibility to reveal the past output of the process?

What I found out till now: I executed the python script manually and it immediately throws following error and hangs:

vagrant@vagrant-ubuntu-trusty-64:/tmp$ /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1455129213.02-267359423089921/docker
/usr/local/lib/python2.7/dist-packages/docker/utils/utils.py:565: UserWarning: docker.utils.create_host_config() is deprecated. Please use Client.create_host_config() instead.
  'docker.utils.create_host_config() is deprecated. Please use '

This is the exact output of the execution. There is no more output but the cursor remains blinking and the script hangs. By the way, i am using the latest docker-py from pip:

vagrant@vagrant-ubuntu-trusty-64:/tmp$ pip show docker-py
---
Metadata-Version: 2.0
Name: docker-py
Version: 1.7.0
Summary: Python client for Docker.
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: /usr/local/lib/python2.7/dist-packages
Requires: requests, six, websocket-client


Thomas Steinbach

unread,
Feb 10, 2016, 5:23:37 PM2/10/16
to Ansible Project
This is not the answer to my question but I identified, why my playbook was hanging. The prablem was that docker hangs on pulling the image. I restarted the docker daemon and everything went fine.

Not that satisfying but a lesson learned.
Reply all
Reply to author
Forward
0 new messages