{"action":"created","issue":{"url":"https://api.github.com/repos/lxc/lxc/issues/1026","repository_url":"https://api.github.com/repos/lxc/lxc","labels_url":"https://api.github.com/repos/lxc/lxc/issues/1026/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxc/issues/1026/comments","events_url":"https://api.github.com/repos/lxc/lxc/issues/1026/events","html_url":"https://github.com/lxc/lxc/issues/1026","id":155325619,"number":1026,"title":"Creating a Xenial container on a Xenial host breaks apparmor, requires restart/reboot","user":{"login":"schammy","id":753595,"avatar_url":"https://avatars1.githubusercontent.com/u/753595?v=4","gravatar_id":"","url":"https://api.github.com/users/schammy","html_url":"https://github.com/schammy","followers_url":"https://api.github.com/users/schammy/followers","following_url":"https://api.github.com/users/schammy/following{/other_user}","gists_url":"https://api.github.com/users/schammy/gists{/gist_id}","starred_url":"https://api.github.com/users/schammy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schammy/subscriptions","organizations_url":"https://api.github.com/users/schammy/orgs","repos_url":"https://api.github.com/users/schammy/repos","events_url":"https://api.github.com/users/schammy/events{/privacy}","received_events_url":"https://api.github.com/users/schammy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-05-17T18:13:07Z","updated_at":"2017-10-20T20:37:00Z","closed_at":null,"author_association":"NONE","body":"I have Ubuntu 16.04 (Xenial) installed on several machines in my data center, all set up within the last week or two, so they have all the updates installed, etc, and only a fairly basic set of packages installed (since most of the magic happens inside containers).\n\nMy script creates containers with the following command, obviously for Xenial containers $DISTRO is \"ubuntu\" and $DISTRO2 is \"xenial\".\n\n`lxc-create -t download -n $HOSTNAME -B $backingstore --config=/tmp/lxc.conf -- -d $DISTRO -r $DISTRO2 -a amd64`\n\nIt works and the container boots up. However, if I stop and start that container again, or start/stop any other container, or try to create a new container and start it, they all fail 100% of the time. It doesn't affect running containers otherwise though, they keep operating fine as long as they're not stopped.\n\nI have to either `service apparmor restart` or fully reboot the machine to fix this issue.\n\nThis is what I see when I try to start one in the foreground:\n\n```\nroot@23:~/bin# lxc-start -n lb13 -F\nlxc-start: lsm/apparmor.c: apparmor_process_label_set: 234 No such file or directory - failed to change apparmor profile to lxc-container-default-cgns\nlxc-start: sync.c: __sync_wait: 52 An error occurred in another process (expected sequence number 4)\nlxc-start: start.c: __lxc_start: 1329 failed to spawn 'lb13'\nlxc-start: lxc_start.c: main: 344 The container failed to start.\nlxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.\n```\n\nThis only happens with Xenial containers. I also use a bunch of Debian 8 containers, no issues there. And I've tested Trusty, although I don't use it for anything, and that works fine also.\n"},"comment":{"url":"https://api.github.com/repos/lxc/lxc/issues/comments/338316149","html_url":"https://github.com/lxc/lxc/issues/1026#issuecomment-338316149","issue_url":"https://api.github.com/repos/lxc/lxc/issues/1026","id":338316149,"user":{"login":"Evidlo","id":5455841,"avatar_url":"https://avatars1.githubusercontent.com/u/5455841?v=4","gravatar_id":"","url":"https://api.github.com/users/Evidlo","html_url":"https://github.com/Evidlo","followers_url":"https://api.github.com/users/Evidlo/followers","following_url":"https://api.github.com/users/Evidlo/following{/other_user}","gists_url":"https://api.github.com/users/Evidlo/gists{/gist_id}","starred_url":"https://api.github.com/users/Evidlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evidlo/subscriptions","organizations_url":"https://api.github.com/users/Evidlo/orgs","repos_url":"https://api.github.com/users/Evidlo/repos","events_url":"https://api.github.com/users/Evidlo/events{/privacy}","received_events_url":"https://api.github.com/users/Evidlo/received_events","type":"User","site_admin":false},"created_at":"2017-10-20T20:37:00Z","updated_at":"2017-10-20T20:37:00Z","author_association":"NONE","body":"2.11.0-8.1"}}
{"actor":{"display_login":"Evidlo"}}