From 5ad3a277989b14bb99f934dbb2f24c40afd1c65a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 22 Sep 2016 16:32:57 +0100 Subject: [PATCH] Add container logs to the build Currently we don't have logs of what happened in the containers. This commit changes the lxc_container_create default bind mounts to ensure that the /var/log directory from the containers is bind mounted to /var/log/{{ inventory_hostname }} on the host. The tox configuration is also changed to ensure that links are not dereferenced in the log copy, and that the layout of the log storage is the same as that of the integrated gate. Change-Id: I56f5e422313c405d4f65feb8e445d4f4b0700566 Co-Authored-By: Jesse Pretorius Signed-off-by: Jean-Philippe Evrard --- test-prepare-containers.yml | 2 ++ test-vars.yml | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/test-prepare-containers.yml b/test-prepare-containers.yml index b5c0bc1d..f76e93db 100644 --- a/test-prepare-containers.yml +++ b/test-prepare-containers.yml @@ -36,3 +36,5 @@ host: "{{ ansible_host | default(inventory_hostname) }}" search_regex: OpenSSH delay: 1 + vars_files: + - test-vars.yml diff --git a/test-vars.yml b/test-vars.yml index 636e50eb..cba03c17 100644 --- a/test-vars.yml +++ b/test-vars.yml @@ -49,6 +49,13 @@ test_neutron_agent_host: "{{ hostvars[groups[test_neutron_agent_group][0]]['ansi test_swift_proxy_host: "{{ hostvars[groups[test_swift_proxy_group][0]]['ansible_host'] }}" test_ironic_api_host: "{{ hostvars[groups[test_ironic_api_group][0]]['ansible_host'] }}" +## LXC container default bind mounts +lxc_container_default_bind_mounts: + - host_directory: "/openstack/backup/{{ inventory_hostname }}" + container_directory: "/var/backup" + - host_directory: "/openstack/log/{{ inventory_hostname }}" + container_directory: "/var/log" + # LXC Settings lxc_net_address: 10.100.100.1 lxc_net_netmask: 255.255.255.0