Ask Your Question
0

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

asked 2018-07-11 09:39:44 -0500

rivimey gravatar image

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 ...

(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-06-05 12:22:51 -0500

I was having exactly this same error. I am trying to set up a test configuration using openstack/stein and the openstack-ansible branch for the stein version. I got a hint from https://lists.linuxcontainers.org/pipermail/lxc-users/2014-February/006162.html (here) about the very last "SystemError: NULL result without error in PyObject_Call"

After learning a bit about lxc containers (haven't used them before) I finally dug up the log file for the lxc container creation that was happening for one of my failed container

root@lion-controller:~# lxc-ls --fancy Failed to load config for lion-controller_galera_container-ef819e62 Failed to load config for lion-controller_heat_api_container-615fadcd Failed to load config for lion-controller_horizon_container-7e0196b4 Failed to load config for lion-controller_keystone_container-a034fb54 Failed to load config for lion-controller_memcached_container-01048ca7 Failed to load config for lion-controller_neutron_server_container-0bfe1977 Failed to load config for lion-controller_nova_api_container-bd163705 Failed to load config for lion-controller_rabbit_mq_container-34878065 Failed to load config for lion-controller_repo_container-4d629dc8 Failed to load config for lion-controller_utility_container-8ef0ac95 NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED lion-controller_cinder_api_container-b0a0f80f RUNNING 1 onboot, openstack 10.0.3.189, 172.16.10.99, 172.16.16.168 - false lion-controller_glance_container-22e98826 RUNNING 1 onboot, openstack 10.0.3.110, 172.16.19.124, 172.16.6.234 - false

root@lion-controller:~# less /var/log/lxc/lxc-lion-controller_rabbit_mq_container-34878065.log lxc-stop lion-controller_rabbit_mq_container-34878065 20190604174309.486 ERROR confile - confile.c:set_config_net_type:289 - Invalid network type eth lxc-stop lion-controller_rabbit_mq_container-34878065 20190604174309.486 ERROR parse - parse.c:lxc_file_for_each_line_mmap:142 - Failed to parse config file "/var/lib/lxc/lion-controller_rabbit_mq_container-34878065/eno4.ini" at line "lxc.net.0.type = eth" lxc-stop lion-controller_rabbit_mq_container-34878065 20190604174309.486 ERROR parse - parse.c:lxc_file_for_each_line_mmap:142 - Failed to parse config file "/var/lib/lxc/lion-controller_rabbit_mq_container-34878065/config" at line "lxc.include = /var/lib/lxc/lion-controller_rabbit_mq_container-34878065/eno4.ini"

In particular, once I finally saw the error there about invalid network type eth in the config file I figured out my issue. I am basically mostly following the example test configuration for an openstack-ansible test environment. But I had specified my br-mgmt bridge to use my physical device eno4 (creating vlans eno4.10 and eno4.20 for br-storage and br-vxlan respectively). So ansible is expecting br-mgmt to be connected to a vlan/veth device on its port, or else I get the unhelpful error message and the failure of the lxc_create_container task. Creating an eno4.30 vlan and putting all of my br-mgmt bridges into that vlan did the trick for me to get past this particular issue.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-07-11 09:39:44 -0500

Seen: 179 times

Last updated: Jul 11 '18