[Openstack] Fatal error during container create (ansible-openstack on bionic)

Ruth Ivimey-Cook ruth at ivimey.org
Wed Jul 11 18:44:31 UTC 2018


I am getting a fatal error in lxc_create when running openstack-ansible 
playbooks/setup-hosts.yml and hoping someone can push me in the right 
direction. Logs below...

I am interpreting the fatal error as some sort of missing config, which 
is why I included the warnings that happened earlier in the above. Is 
that right? Is there any way I can isolate where exactly in the ansible 
setup this happens?

The only significant changes I've made to the ansible setup are

- comment out `linux-image-extra-{{ ansible_kernel }}` package from the 
ubuntu config as it no longer exists.
- create /etc/ansible/.../*ubuntu-18.04.yml files by copying the 
equivalent ubuntu-16.04.yml file, where no 18.04 version was already 
present.

 > ~/openstack-ansible$ sudo openstack-ansible playbooks/setup-hosts.yml
 >
 > Variable files: "-e @/etc/openstack_deploy/user_secrets.yml -e 
@/etc/openstack_deploy/user_variables.yml "
 >
 >  [WARNING]: Unable to parse /etc/openstack_deploy/inventory.ini as an 
inventory source

 > [DEPRECATION WARNING]: 'include' for playbook includes. You should 
use 'import_playbook' instead. This
 >
 > feature will be removed in version 2.8. Deprecation warnings can be 
disabled by setting
 >
 > deprecation_warnings=False in ansible.cfg.
 >
 >  [WARNING]: Could not match supplied host pattern, ignoring: 
all_lxc_containers
 >
 >  [WARNING]: Could not match supplied host pattern, ignoring: 
all_nspawn_containers
 >
 > PLAY [Install Ansible prerequisites] 
*************************************************************************
 >
 > TASK [Ensure python is installed] 
****************************************************************************
 >
 > ok: [aio1]


... lots of stuff that works...

 > TASK [Create the new LXC service log directory] 
**************************************************************
 >
 > ok: [aio1]
 >
 > TASK [Create the LXC service log aggregation link] 
***********************************************************
 >
 > ok: [aio1]
 >
 > TASK [apt_package_pinning : Add apt pin preferences] 
*********************************************************
 >
 > TASK [lxc_hosts : Check for the presence of a public key file on the 
deployment host] ************************
 >
 > ok: [aio1 -> localhost]
 >
 > TASK [lxc_hosts : Fail if a ssh public key is not set in a var and is 
not present on the deployment host] ****
 >
 > TASK [lxc_hosts : Gather variables for each operating system] 
************************************************
 >
 > ok: [aio1] => 
(item=/etc/ansible/roles/lxc_hosts/vars/ubuntu-18.04-host.yml)
 >
 > TASK [lxc_hosts : Gather container variables] 
****************************************************************
 >
 >  [WARNING]: Invalid request to find a file that matches a "null" value
 >
 > ok: [aio1] => (item=/etc/ansible/roles/lxc_hosts/vars/ubuntu-18.04.yml)
 >
 > TASK [lxc_hosts : include_tasks] 
*****************************************************************************
 >
 > included: /etc/ansible/roles/lxc_hosts/tasks/lxc_pre_install.yml for aio1

A little later in the same run:

 > TASK [lxc_container_create : Check the physical_host variable is set] 
****************************************
 >
 > TASK [lxc_container_create : Collect physical host facts if missing] 
*****************************************
 >
 > TASK [lxc_container_create : Kernel version and LXC backing store 
check] *************************************
 >
 > TASK [lxc_container_create : Gather variables for each operating 
system] *************************************
 >
 >  [WARNING]: Invalid request to find a file that matches a "null" value
 >
 >  [WARNING]: Invalid request to find a file that matches a "null" value
 >
 > ok: [aio1_cinder_api_container-3255dd97] => 
(item=/etc/ansible/roles/lxc_container_create/vars/ubuntu-18.04.yml)
 >
 >  [WARNING]: Invalid request to find a file that matches a "null" value
 >
 > ok: [aio1_designate_container-54f1c305] => 
(item=/etc/ansible/roles/lxc_container_create/vars/ubuntu-18.04.yml)
 >
 >  [WARNING]: Invalid request to find a file that matches a "null" value
 >
 >  [WARNING]: Invalid request to find a file that matches a "null" value

And then, finally, the fatal error:

 > TASK [lxc_container_create : include_tasks] 
******************************************************************
 >
 > included: 
/etc/ansible/roles/lxc_container_create/tasks/lxc_container_create_dir.yml 
for aio1_cinder_api_container-3255dd97, 
aio1_designate_container-54f1c305, aio1_galera_container-b332cdef, 
aio1_glance_container-8d10cc70, aio1_heat_api_container-362fdd4a, 
aio1_horizon_container-d76a2adc, aio1_keystone_container-78616d24, 
aio1_memcached_container-916a4563, 
aio1_neutron_server_container-3bf65b1d, 
aio1_nova_api_container-91ebf932, aio1_repo_container-f56147bc, 
aio1_rabbit_mq_container-bfd8534a, aio1_rsyslog_container-ce40ff7f, 
aio1_swift_proxy_container-eada6cf1, aio1_utility_container-195113e0
 >
 > TASK [lxc_container_create : Create container (dir)] 
*********************************************************
 >
 > fatal: [aio1_cinder_api_container-3255dd97 -> 172.29.236.100]: 
FAILED! => {"changed": false, "module_stderr": "Shared connection to 
172.29.236.100 closed.\r\n", "module_stdout": "Failed to load config for 
aio1_cinder_api_container-3255dd97\r\n443: error creating container 
aio1_cinder_api_container-3255dd97\r\nTraceback (most recent call 
last):\r\n  File 
\"/tmp/ansible_GSPHbc/ansible_module_lxc_container.py\", line 1772, in 
<module>\r\n    main()\r\n  File 
\"/tmp/ansible_GSPHbc/ansible_module_lxc_container.py\", line 1767, in 
main\r\n    lxc_manage = LxcContainerManagement(module=module)\r\n  File 
\"/tmp/ansible_GSPHbc/ansible_module_lxc_container.py\", line 619, in 
__init__\r\n    self.container = self.get_container_bind()\r\n File 
\"/tmp/ansible_GSPHbc/ansible_module_lxc_container.py\", line 624, in 
get_container_bind\r\n    return 
lxc.Container(name=self.container_name)\r\n  File 
\"/usr/lib/python2.7/dist-packages/lxc/__init__.py\", line 153, in 
__init__\r\n    _lxc.Container.__init__(self, name)\r\nSystemError: NULL 
result without error in PyObject_Call\r\n", "msg": "MODULE FAILURE", 
"rc": 1}

Context: I want to run openstack on ubuntu bionic, and using ansible 
seemed to be the best way forward. I know openstack-ansible is only 
supported on xenial, but as I'm a software developer I thought I'd give 
it a go. I first commented out the OS checks... and have got a good deal 
of progress since. However, I have hit a problem and am hoping someone 
can help.

I also posted this question on the ask.openstack pages but it's still 
awaiting moderation :(

https://ask.openstack.org/en/question/115193/fatal-error-during-container-create-ansible-openstack-on-bionic/




More information about the Openstack mailing list