Skip to content

Instantly share code, notes, and snippets.

@odyssey4me
Created August 7, 2016 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odyssey4me/dc94e44d96d94e36bf11c0b8faa0c7ee to your computer and use it in GitHub Desktop.
Save odyssey4me/dc94e44d96d94e36bf11c0b8faa0c7ee to your computer and use it in GitHub Desktop.
Ansible lxc_container module: A bug related to logging for LXC containers
#!/bin/bash
apt-get update && \
apt-get purge -y nano && \
apt-get install -y git vim tmux fail2ban \
build-essential python2.7 python-dev \
libssl-dev libffi-dev
apt-get -t trusty-backports install -y lxc lxc-dev
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
pip install -U lxc-python2 setuptools ansible
root@lxc1:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.4 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.4 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
root@lxc1:~# dpkg-query --list | grep "linux\|lxc"
ii liblxc1 2.0.3-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (library)
ii libselinux1:amd64 2.2.2-1ubuntu0.1 amd64 SELinux runtime shared libraries
ii linux-firmware 1.127.22 all Firmware for Linux kernel drivers
ii linux-generic 3.13.0.88.94 amd64 Complete Generic Linux kernel and headers
ii linux-headers-3.13.0-88 3.13.0-88.135 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-88-generic 3.13.0-88.135 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii linux-headers-generic 3.13.0.88.94 amd64 Generic Linux kernel headers
ii linux-image-3.13.0-88-generic 3.13.0-88.135 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-88-generic 3.13.0-88.135 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-generic 3.13.0.88.94 amd64 Generic Linux kernel image
ii linux-libc-dev:amd64 3.13.0-92.139 amd64 Linux Kernel Headers for development
ii lxc 2.0.3-0ubuntu1~ubuntu14.04.1 all Transitional package for lxc1
ii lxc-common 2.0.3-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (common tools)
ii lxc-dev 2.0.3-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (development)
ii lxc-templates 2.0.3-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (templates)
ii lxc1 2.0.3-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools
ii lxcfs 2.0.2-0ubuntu1~ubuntu14.04.1 amd64 FUSE based filesystem for LXC
ii python3-lxc 2.0.3-0ubuntu1~ubuntu14.04.1 amd64 Linux Containers userspace tools (Python 3.x bindings)
ii util-linux 2.20.1-5.1ubuntu20.7 amd64 Miscellaneous system utilities
root@lxc1:~# uname -a
Linux lxc1 3.13.0-88-generic #135-Ubuntu SMP Wed Jun 8 21:10:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@lxc1:~# pip freeze
ansible==2.1.1.0
cffi==1.7.0
chardet==2.0.1
Cheetah==2.4.4
cloud-init==0.7.5
configobj==4.7.2
cryptography==1.4
distro-info==0.12
enum34==1.1.6
euca2ools==3.0.1
idna==2.1
ipaddress==1.0.16
Jinja2==2.8
jsonpatch==1.3
jsonpointer==1.0
lxc-python2==0.1
lxml==3.3.3
MarkupSafe==0.23
oauth==1.0.1
paramiko==2.0.2
prettytable==0.7.2
pyasn1==0.1.9
pycparser==2.14
pycrypto==2.6.1
pyinotify==0.9.4
pyserial==2.6
PyYAML==3.11
requestbuilder==0.1.0b1
requests==2.2.1
six==1.10.0
urllib3==1.7.1
[all]
localhost ansible_connection=local physical_host=localhost ansible_become=True ansible_user=root
container1 ansible_connection=lxc physical_host=localhost ansible_become=True ansible_user=root
container2 ansible_connection=lxc physical_host=localhost ansible_become=True ansible_user=root
[hosts]
localhost
[all_containers]
container1
container2
- name: Prepare the hosts
hosts: hosts
tasks:
- name: Install LXC packages
apt:
pkg: "{{ item }}"
state: latest
default_release: "trusty-backports"
with_items:
- lxc
- lxc-dev
tags: prepare-host
- name: Install pip
shell: "curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7"
tags: prepare-host
- name: Install LXC python library
pip:
name: lxc-python2
state: latest
tags: prepare-host
- name: Create and prepare containers
hosts: all_containers
gather_facts: no
tasks:
- name: Clean up containers
lxc_container:
name: "{{ inventory_hostname }}"
state: absent
delegate_to: "{{ physical_host }}"
tags:
- destroy
- name: Create the containers
lxc_container:
name: "{{ inventory_hostname }}"
template: download
state: started
backing_store: dir
template_options: --dist ubuntu --release trusty --arch amd64
container_log: yes
container_log_level: DEBUG
delegate_to: "{{ physical_host }}"
- name: Deploy the container prep script
copy:
content: |
#!/usr/bin/env bash
set -e -x
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes python2.7
rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
userdel --force --remove ubuntu || true
apt-get clean
dest: "/var/lib/lxc/{{ inventory_hostname }}/rootfs/usr/local/bin/cache-prep-commands.sh"
mode: "0755"
delegate_to: "{{ physical_host }}"
- name: Execute the container prep script
command: "chroot /var/lib/lxc/{{ inventory_hostname }}/rootfs /usr/local/bin/cache-prep-commands.sh"
delegate_to: "{{ physical_host }}"
- name: Change container1 using the lxc_container module
hosts: container1
gather_facts: no
tasks:
- name: Execute a command
lxc_container:
name: "{{ inventory_hostname }}"
container_log: yes
container_log_level: DEBUG
container_command: |
echo "hello world" | tee /opt/command
delegate_to: "{{ physical_host }}"
- name: Change container config
lxc_container:
name: "{{ inventory_hostname }}"
container_log: yes
container_log_level: DEBUG
container_config:
- "lxc.aa_profile=unconfined"
- "lxc.cgroup.devices.allow=a *:* rmw"
delegate_to: "{{ physical_host }}"
- name: Stop the container
lxc_container:
name: "{{ inventory_hostname }}"
container_log: yes
container_log_level: DEBUG
state: stopped
delegate_to: "{{ physical_host }}"
- name: Start the container
lxc_container:
name: "{{ inventory_hostname }}"
container_log: yes
container_log_level: DEBUG
state: started
delegate_to: "{{ physical_host }}"
- name: Change container2 without using the lxc_container module
hosts: container2
gather_facts: no
tasks:
- name: Execute a command
command: >
lxc-attach --name {{ inventory_hostname }}
--logfile /var/log/lxc/lxc-{{ inventory_hostname }}.log
--logpriority DEBUG
--
bash -c 'echo "hello world" | tee /opt/command'
delegate_to: "{{ physical_host }}"
- name: Change container config
lineinfile:
dest: "/var/lib/lxc/{{ inventory_hostname }}/config"
line: "{{ item | replace('=', ' = ') | regex_replace('\\s+', ' ') }}"
with_items:
- "lxc.aa_profile=unconfined"
- "lxc.cgroup.devices.allow=a *:* rmw"
delegate_to: "{{ physical_host }}"
- name: Stop the container
command: >
lxc-stop --name {{ inventory_hostname }}
--logfile /var/log/lxc/lxc-{{ inventory_hostname }}.log
--logpriority DEBUG
delegate_to: "{{ physical_host }}"
- name: Start the container
command: >
lxc-start --daemon --name {{ inventory_hostname }}
--logfile /var/log/lxc/lxc-{{ inventory_hostname }}.log
--logpriority DEBUG
delegate_to: "{{ physical_host }}"
PLAY [Prepare the hosts] *******************************************************
TASK [setup] *******************************************************************
ok: [localhost]
TASK [Install LXC packages] ****************************************************
ok: [localhost] => (item=[u'lxc', u'lxc-dev'])
TASK [Install pip] *************************************************************
changed: [localhost]
[WARNING]: Consider using get_url or uri module rather than running curl
TASK [Install LXC python library] **********************************************
ok: [localhost]
PLAY [Create and prepare containers] *******************************************
TASK [Clean up containers] *****************************************************
ok: [container1 -> localhost]
ok: [container2 -> localhost]
TASK [Create the containers] ***************************************************
changed: [container2 -> localhost]
changed: [container1 -> localhost]
TASK [Deploy the container prep script] ****************************************
changed: [container2 -> localhost]
changed: [container1 -> localhost]
TASK [Execute the container prep script] ***************************************
changed: [container1 -> localhost]
changed: [container2 -> localhost]
PLAY [Change container1 using the lxc_container module] ************************
TASK [Execute a command] *******************************************************
changed: [container1 -> localhost]
TASK [Change container config] *************************************************
changed: [container1 -> localhost]
TASK [Stop the container] ******************************************************
changed: [container1 -> localhost]
TASK [Start the container] *****************************************************
changed: [container1 -> localhost]
PLAY [Change container2 without using the lxc_container module] ****************
TASK [Execute a command] *******************************************************
changed: [container2 -> localhost]
TASK [Change container config] *************************************************
changed: [container2 -> localhost] => (item=lxc.aa_profile=unconfined)
changed: [container2 -> localhost] => (item=lxc.cgroup.devices.allow=a *:* rmw)
TASK [Stop the container] ******************************************************
changed: [container2 -> localhost]
TASK [Start the container] *****************************************************
changed: [container2 -> localhost]
PLAY RECAP *********************************************************************
container1 : ok=8 changed=7 unreachable=0 failed=0
container2 : ok=8 changed=7 unreachable=0 failed=0
localhost : ok=4 changed=1 unreachable=0 failed=0
lxc-create 20160807214041.091 WARN lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored. It will soon become an error.
lxc-create 20160807214041.092 INFO lxc_create_ui - lxc_create.c:main:324 - container created
lxc-create 20160807214041.091 WARN lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored. It will soon become an error.
lxc-create 20160807214041.092 INFO lxc_create_ui - lxc_create.c:main:324 - container created
root@lxc1:~# cat /var/log/lxc/lxc-container2.log
lxc-create 20160807214040.591 WARN lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored. It will soon become an error.
lxc-create 20160807214040.592 INFO lxc_create_ui - lxc_create.c:main:324 - container created
lxc-attach 20160807214059.403 WARN lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored. It will soon become an error.
lxc-attach 20160807214059.405 WARN lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored. It will soon become an error.
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .reject_force_umount # comment this to allow umount -f; not recommended.
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for reject_force_umount action 0
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for reject_force_umount action 0
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .[all].
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .kexec_load errno 1.
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for kexec_load action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for kexec_load action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .open_by_handle_at errno 1.
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for open_by_handle_at action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for open_by_handle_at action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .init_module errno 1.
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for init_module action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for init_module action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .finit_module errno 1.
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for finit_module action 327681
lxc-attach 20160807214059.406 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:233 - Seccomp: got negative # for syscall: finit_module
lxc-attach 20160807214059.406 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:234 - This syscall will NOT be blacklisted
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for finit_module action 327681
lxc-attach 20160807214059.406 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:233 - Seccomp: got negative # for syscall: finit_module
lxc-attach 20160807214059.406 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:234 - This syscall will NOT be blacklisted
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .delete_module errno 1.
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for delete_module action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for delete_module action 327681
lxc-attach 20160807214059.406 INFO lxc_seccomp - seccomp.c:parse_config_v2:456 - Merging in the compat seccomp ctx into the main one
lxc-stop 20160807214059.879 WARN lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored. It will soon become an error.
lxc-stop 20160807214059.881 DEBUG lxc_commands - commands.c:lxc_cmd_get_state:579 - 'container2' is in 'RUNNING' state
lxc-stop 20160807214059.881 DEBUG lxc_commands - commands.c:lxc_cmd_get_state:579 - 'container2' is in 'RUNNING' state
lxc-stop 20160807214059.882 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 4
lxc-stop 20160807214059.883 INFO lxc_monitor - monitor.c:lxc_monitor_sock_name:178 - using monitor sock name lxc/ad055575fe28ddd5//var/lib/lxc
lxc-stop 20160807214059.883 DEBUG lxc_commands - commands.c:lxc_cmd_get_state:579 - 'container2' is in 'RUNNING' state
lxc-start 20160807214101.542 INFO lxc_start_ui - lxc_start.c:main:264 - using rcfile /var/lib/lxc/container2/config
lxc-start 20160807214101.542 WARN lxc_confile - confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored. It will soon become an error.
lxc-start 20160807214101.908 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive response
lxc-start 20160807214101.909 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 4
lxc-start 20160807214101.911 INFO lxc_container - lxccontainer.c:do_lxcapi_start:797 - Attempting to set proc title to [lxc monitor] /var/lib/lxc container2
lxc-start 20160807214101.911 INFO lxc_utils - utils.c:setproctitle:1460 - setting cmdline failed - Invalid argument
lxc-start 20160807214101.911 INFO lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver AppArmor
lxc-start 20160807214101.911 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .reject_force_umount # comment this to allow umount -f; not recommended.
lxc-start 20160807214101.911 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for reject_force_umount action 0
lxc-start 20160807214101.911 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts
lxc-start 20160807214101.911 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for reject_force_umount action 0
lxc-start 20160807214101.911 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .[all].
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .kexec_load errno 1.
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for kexec_load action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for kexec_load action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .open_by_handle_at errno 1.
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for open_by_handle_at action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for open_by_handle_at action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .init_module errno 1.
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for init_module action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for init_module action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .finit_module errno 1.
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for finit_module action 327681
lxc-start 20160807214101.912 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:233 - Seccomp: got negative # for syscall: finit_module
lxc-start 20160807214101.912 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:234 - This syscall will NOT be blacklisted
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for finit_module action 327681
lxc-start 20160807214101.912 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:233 - Seccomp: got negative # for syscall: finit_module
lxc-start 20160807214101.912 WARN lxc_seccomp - seccomp.c:do_resolve_add_rule:234 - This syscall will NOT be blacklisted
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .delete_module errno 1.
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for delete_module action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:449 - Adding compat rule for delete_module action 327681
lxc-start 20160807214101.912 INFO lxc_seccomp - seccomp.c:parse_config_v2:456 - Merging in the compat seccomp ctx into the main one
lxc-start 20160807214101.912 DEBUG lxc_start - start.c:setup_signal_fd:289 - sigchild handler set
lxc-start 20160807214101.912 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 4
lxc-start 20160807214101.912 DEBUG lxc_console - console.c:lxc_console_peer_default:469 - no console peer
lxc-start 20160807214101.912 INFO lxc_start - start.c:lxc_init:488 - 'container2' is initialized
lxc-start 20160807214101.914 DEBUG lxc_start - start.c:__lxc_start:1326 - Not dropping cap_sys_boot or watching utmp
lxc-start 20160807214101.914 INFO lxc_monitor - monitor.c:lxc_monitor_sock_name:178 - using monitor sock name lxc/ad055575fe28ddd5//var/lib/lxc
lxc-start 20160807214101.915 DEBUG lxc_conf - conf.c:instantiate_veth:2614 - instantiated veth 'veth0IW5EP/vethXTXLPQ', index is '27'
lxc-start 20160807214101.915 INFO lxc_cgroup - cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for container2
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.deny' set to 'a'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c *:* m'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'b *:* m'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:3 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:5 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:7 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:0 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:1 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:2 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:8 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:9 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 136:* rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:229 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 254:0 rm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:200 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:228 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:232 rwm'
lxc-start 20160807214101.917 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'a *:* rmw'
lxc-start 20160807214101.917 INFO lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1671 - cgroup has been setup
lxc-start 20160807214101.947 DEBUG lxc_conf - conf.c:lxc_assign_network:3048 - move '(null)' to '9542'
lxc-start 20160807214101.947 DEBUG lxc_conf - conf.c:setup_rootfs:1215 - mounted '/var/lib/lxc/container2/rootfs' on '/usr/lib/x86_64-linux-gnu/lxc'
lxc-start 20160807214101.947 INFO lxc_conf - conf.c:setup_utsname:843 - 'container2' hostname has been setup
lxc-start 20160807214101.967 DEBUG lxc_conf - conf.c:setup_hw_addr:2145 - mac address '00:16:3e:0c:73:0a' on 'eth0' has been setup
lxc-start 20160807214101.967 DEBUG lxc_conf - conf.c:setup_netdev:2372 - 'eth0' has been setup
lxc-start 20160807214101.967 INFO lxc_conf - conf.c:setup_network:2393 - network has been setup
lxc-start 20160807214101.967 INFO lxc_conf - conf.c:mount_autodev:1072 - Mounting container /dev
lxc-start 20160807214101.967 INFO lxc_conf - conf.c:mount_autodev:1095 - Mounted tmpfs onto /usr/lib/x86_64-linux-gnu/lxc/dev
lxc-start 20160807214101.967 INFO lxc_conf - conf.c:mount_autodev:1113 - Mounted container /dev
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1657 - remounting /sys/fs/fuse/connections on /usr/lib/x86_64-linux-gnu/lxc/sys/fs/fuse/connections to respect bind or remount options
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1672 - (at remount) flags for /sys/fs/fuse/connections was 4096, required extra flags are 0
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1681 - mountflags already was 4096, skipping remount
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1707 - mounted '/sys/fs/fuse/connections' on '/usr/lib/x86_64-linux-gnu/lxc/sys/fs/fuse/connections', type 'none'
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1657 - remounting /sys/kernel/debug on /usr/lib/x86_64-linux-gnu/lxc/sys/kernel/debug to respect bind or remount options
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1672 - (at remount) flags for /sys/kernel/debug was 4096, required extra flags are 0
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1681 - mountflags already was 4096, skipping remount
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1707 - mounted '/sys/kernel/debug' on '/usr/lib/x86_64-linux-gnu/lxc/sys/kernel/debug', type 'none'
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1657 - remounting /sys/kernel/security on /usr/lib/x86_64-linux-gnu/lxc/sys/kernel/security to respect bind or remount options
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1672 - (at remount) flags for /sys/kernel/security was 4096, required extra flags are 0
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1681 - mountflags already was 4096, skipping remount
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1707 - mounted '/sys/kernel/security' on '/usr/lib/x86_64-linux-gnu/lxc/sys/kernel/security', type 'none'
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1657 - remounting /sys/fs/pstore on /usr/lib/x86_64-linux-gnu/lxc/sys/fs/pstore to respect bind or remount options
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1672 - (at remount) flags for /sys/fs/pstore was 4096, required extra flags are 0
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1681 - mountflags already was 4096, skipping remount
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1707 - mounted '/sys/fs/pstore' on '/usr/lib/x86_64-linux-gnu/lxc/sys/fs/pstore', type 'none'
lxc-start 20160807214101.968 DEBUG lxc_conf - conf.c:mount_entry:1707 - mounted 'mqueue' on '/usr/lib/x86_64-linux-gnu/lxc/dev/mqueue', type 'mqueue'
lxc-start 20160807214101.968 INFO lxc_conf - conf.c:mount_file_entries:1926 - mount points have been setup
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/systemd read-only
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/systemd//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/systemd//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/systemd//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpuset read-only
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/cpuset//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpuset//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpuset//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpu read-only
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/cpu//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpu//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpu//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpuacct read-only
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/cpuacct//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpuacct//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/cpuacct//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/memory read-only
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/memory//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/memory//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/memory//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/devices read-only
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/devices//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/devices//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/devices//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/freezer read-only
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/freezer//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/freezer//lxc/container2
lxc-start 20160807214101.968 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/freezer//lxc/container2
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/blkio read-only
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/blkio//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/blkio//lxc/container2
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/blkio//lxc/container2
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/perf_event read-only
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/perf_event//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/perf_event//lxc/container2
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/perf_event//lxc/container2
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1276 - Remounted /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/hugetlb read-only
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1282 - Mounting /sys/fs/cgroup/hugetlb//lxc/container2 onto /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/hugetlb//lxc/container2
lxc-start 20160807214101.969 INFO lxc_cgfsng - cgfsng.c:do_secondstage_mounts_if_needed:1290 - Completed second stage cgroup automounts for /usr/lib/x86_64-linux-gnu/lxc/sys/fs/cgroup/hugetlb//lxc/container2
lxc-start 20160807214101.969 INFO lxc_conf - conf.c:run_script_argv:367 - Executing script '/usr/share/lxcfs/lxc.mount.hook' for container 'container2', config section 'lxc'
lxc-start 20160807214102.226 INFO lxc_conf - conf.c:fill_autodev:1141 - Creating initial consoles under container /dev
lxc-start 20160807214102.226 INFO lxc_conf - conf.c:fill_autodev:1152 - Populating container /dev
lxc-start 20160807214102.226 INFO lxc_conf - conf.c:fill_autodev:1189 - Populated container /dev
lxc-start 20160807214102.226 INFO lxc_conf - conf.c:setup_ttydir_console:1458 - created /usr/lib/x86_64-linux-gnu/lxc/dev/lxc
lxc-start 20160807214102.226 INFO lxc_conf - conf.c:setup_ttydir_console:1504 - console has been setup on lxc/console
lxc-start 20160807214102.226 INFO lxc_utils - utils.c:mount_proc_if_needed:1726 - I am 1, /proc/self points to '1'
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:setup_rootfs_pivot_root:1050 - pivot_root syscall to '/usr/lib/x86_64-linux-gnu/lxc' successful
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:lxc_create_tty:3292 - allocated pty '/dev/pts/0' (9/12)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:lxc_create_tty:3292 - allocated pty '/dev/pts/1' (13/14)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:lxc_create_tty:3292 - allocated pty '/dev/pts/2' (15/16)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:lxc_create_tty:3292 - allocated pty '/dev/pts/3' (17/18)
lxc-start 20160807214102.247 INFO lxc_conf - conf.c:lxc_create_tty:3303 - tty's configured
lxc-start 20160807214102.247 INFO lxc_conf - conf.c:setup_tty:995 - 4 tty(s) has been setup
lxc-start 20160807214102.247 INFO lxc_conf - conf.c:setup_personality:1393 - set personality to '0x0'
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:setup_caps:2056 - drop capability 'mac_admin' (33)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:setup_caps:2056 - drop capability 'mac_override' (32)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:setup_caps:2056 - drop capability 'sys_time' (25)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:setup_caps:2056 - drop capability 'sys_module' (16)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:setup_caps:2056 - drop capability 'sys_rawio' (17)
lxc-start 20160807214102.247 DEBUG lxc_conf - conf.c:setup_caps:2065 - capabilities have been setup
lxc-start 20160807214102.247 NOTICE lxc_conf - conf.c:lxc_setup:3839 - 'container2' is setup.
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.deny' set to 'a'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c *:* m'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'b *:* m'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:3 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:5 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:7 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:0 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:1 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 5:2 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:8 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 1:9 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 136:* rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:229 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 254:0 rm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:200 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:228 rwm'
lxc-start 20160807214102.247 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'c 10:232 rwm'
lxc-start 20160807214102.248 DEBUG lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1667 - cgroup 'devices.allow' set to 'a *:* rmw'
lxc-start 20160807214102.248 INFO lxc_cgfsng - cgfsng.c:cgfsng_setup_limits:1671 - cgroup has been setup
lxc-start 20160807214102.248 INFO lxc_apparmor - lsm/apparmor.c:apparmor_process_label_set:238 - changed apparmor profile to unconfined
lxc-start 20160807214102.248 NOTICE lxc_start - start.c:start:1435 - exec'ing '/sbin/init'
lxc-start 20160807214102.248 NOTICE lxc_start - start.c:post_start:1446 - '/sbin/init' started with pid '9542'
lxc-start 20160807214102.248 WARN lxc_start - start.c:signal_handler:337 - invalid pid for SIGCHLD
lxc-start 20160807214102.248 DEBUG lxc_commands - commands.c:lxc_cmd_handler:893 - peer has disconnected
lxc-start 20160807214102.249 DEBUG lxc_commands - commands.c:lxc_cmd_handler:893 - peer has disconnected
lxc-start 20160807214102.249 DEBUG lxc_commands - commands.c:lxc_cmd_get_state:579 - 'container2' is in 'RUNNING' state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment