Setup-infrastructure error with "NoneType" during Memcached install

Bug #1477175 reported by Ramon Grullon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Expired
Undecided
Unassigned

Bug Description

Edited file openstack_user_config.yml

shared-infra_hosts:
  ubuntu2:
    ip: 10.163.190.124

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

GATHERING FACTS ***************************************************************
fatal: [ubuntu2_memcached_container-2d2b67b3] => Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 582, in _executor
    exec_rc = self._executor_internal(host, new_stdin)
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 785, in _executor_internal
    return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 964, in _executor_internal_inner
    conn = self.connector.connect(actual_host, actual_port, actual_user, actual_pass, actual_transport, actual_private_key_file, delegate_host)
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/connection.py", line 35, in connect
    conn = utils.plugins.connection_loader.get(transport, self.runner, host, port, user=user, password=password, private_key_file=private_key_file)
  File "/usr/local/lib/python2.7/dist-packages/ansible/utils/plugins.py", line 219, in get
    return getattr(self._module_cache[path], self.class_name)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/connection_plugins/ssh.py", line 44, in __init__
    self.ipv6 = ':' in self.host
TypeError: argument of type 'NoneType' is not iterable

TASK: [apt_package_pinning | Add apt pin preferences] *************************
FATAL: no hosts matched or all hosts have already failed -- aborting

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

ubuntu2_memcached_container-2d2b67b3 : ok=0 changed=0 unreachable=1 failed=0

Revision history for this message
Stanley@Linux Simba (linuxsimba) wrote :

would be helpful if you provided what you've done so far to troubleshoot the issue. looks like the gathering facts step is failing.

 1) can you ping the container from the deployment host, 2) can you lxc-attach into the container from the controller node, 3) can you ssh into the container from the deployment host?

Changed in openstack-ansible:
status: New → Incomplete
Revision history for this message
Emeric (emeric-million) wrote :

I had the same error. After reading the "ssh.py", I've seen it occured when there is no address associated with the host when ansible list host with inventory.

Ansible uses your inventory script with the argument "--host ubuntu2" and if there is something like that :

"{
    "ansible_ssh_host": null,
    "ansible_ssh_port": "22",
    "ansible_ssh_user": "username",
    "ansible_ssh_private_key_file": "~/.ssh/id_rsa"
}"

you can see "ansible_ssh_host" is null.

Hope it helps...

Revision history for this message
Ramon Grullon (rgrullon) wrote :

What file did you actually change the null value in?

Revision history for this message
Stig Telfer (stigtelfer) wrote :

I hit a similar issue: containers had null entries in ansible_ssh_host and container_address in openstack_inventory.json.

This was due to a misconfiguration in openstack_user_config.yml - the name given in ip_from_q did not match any entries defined in cidr_networks

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openstack-ansible because there has been no activity for 60 days.]

Changed in openstack-ansible:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.