Ask Your Question

openstack ansible error "Not able to connect memcached_container while running setup-infrastructure.yml "

asked 2015-08-27 09:20:00 -0500

updated 2015-08-27 09:52:09 -0500

smaffulli gravatar image

i was able to ssh host01 manullay and even able to ssh host01_memcached_container-27c93226 container manully. but when i try to run setup-infrastructure.yml playbook it gives out error.

My ansible.cfg configuration

# Additional plugins
lookup_plugins = plugins/lookups
filter_plugins = plugins/filters

gathering = smart
hostfile = inventory
host_key_checking = False

# Set color options
nocolor = 0

# SSH timeout
timeout = 120

pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o TCPKeepAlive=yes -o ServerAliveInterval=5 -o ServerAliveCountMax=3

ssh host machine :

root@deploy:~# ssh root@host01
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-62-generic x86_64)

 * Documentation:

  System information as of Thu Aug 27 17:59:37 IST 2015

  System load: 0.08 IP address for eth0:
  Usage of /: 21.3% of 42.95GB IP address for eth3:
  Memory usage: 47% IP address for br-mgmt:
  Swap usage: 10% IP address for br-vxlan:
  Processes: 655 IP address for lxcbr0:
  Users logged in: 0

  Graph this data and manage this system at:

Last login: Thu Aug 27 17:59:39 2015 from deploy

SSH memcached container from deploy host

root@deploy:~# ssh root@
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-62-generic x86_64)

 * Documentation:

Error output with -vvv

root@deploy:/opt/os-ansible-deploymemt/playbooks# openstack-ansible setup-infrastructure.yml -vvv
Variable files: "-e @/etc/openstack_deploy/user_secrets.yml -e @/etc/openstack_deploy/user_variables.yml "

PLAY [Install memcached] ******************************************************

GATHERING FACTS ***************************************************************
<> EXEC ssh -C -v -o ControlMaster=auto -o ControlPersist=60s -o TCPKeepAlive=yes -o ServerAliveInterval=5 -o ServerAliveCountMax=3 -o ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=120 /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python'
failed: [host01_memcached_container-27c93226] => {"failed": true, "parsed": false}
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 2
/bin/sh: 1: /usr/bin/python: not found

TASK: [Use the lxc-openstack aa profile] **************************************
FATAL: no hosts matched or all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/root/setup-infrastructure.retry

host01_memcached_container-27c93226 : ok=0 changed=0 unreachable=0 failed=1

Not sure if i miss some configuration , please help .

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-08-27 12:52:48 -0500

Thank you smaffulli.

i found the issue. python was not installed in any of the container. so i made change in container_create.yml as below and it work fine for me .

Path : os-ansible-deployment-kilo\playbooks\roles\lxc_container_create\tasks\container_create.yml

at line 284 :

before : apt-get -y install python2.7

After : apt-get -y install python

after this it worked for me

i am not sure is it bug or not but it worked form me once i changed.

edit flag offensive delete link more

answered 2015-08-27 09:55:00 -0500

smaffulli gravatar image

Ansible error message seems to give a hint of what may be wrong

 /bin/sh: 1: /usr/bin/python: not found

If python is installed on host then update your question.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-08-27 09:20:00 -0500

Seen: 1,188 times

Last updated: Aug 27 '15