{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/17783","labels_url":"https://api.github.com/repos/docker/docker/issues/17783/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/17783/comments","events_url":"https://api.github.com/repos/docker/docker/issues/17783/events","html_url":"https://github.com/docker/docker/issues/17783","id":115656905,"number":17783,"title":"AppArmor \"Invalid Regex\" error while setting docker to complain mode","user":{"login":"venkatramachandran","id":4744258,"avatar_url":"https://avatars.githubusercontent.com/u/4744258?v=3","gravatar_id":"","url":"https://api.github.com/users/venkatramachandran","html_url":"https://github.com/venkatramachandran","followers_url":"https://api.github.com/users/venkatramachandran/followers","following_url":"https://api.github.com/users/venkatramachandran/following{/other_user}","gists_url":"https://api.github.com/users/venkatramachandran/gists{/gist_id}","starred_url":"https://api.github.com/users/venkatramachandran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/venkatramachandran/subscriptions","organizations_url":"https://api.github.com/users/venkatramachandran/orgs","repos_url":"https://api.github.com/users/venkatramachandran/repos","events_url":"https://api.github.com/users/venkatramachandran/events{/privacy}","received_events_url":"https://api.github.com/users/venkatramachandran/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/security/apparmor","name":"area/security/apparmor","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-07T10:04:30Z","updated_at":"2015-11-23T12:15:33Z","closed_at":null,"body":"```\r\nvenkat@instance-2:~$ sudo docker version\r\nClient:\r\n Version:      1.9.0\r\n API version:  1.21\r\n Go version:   go1.4.2\r\n Git commit:   76d6bc9\r\n Built:        Tue Nov  3 17:43:42 UTC 2015\r\n OS/Arch:      linux/amd64\r\nServer:\r\n Version:      1.9.0\r\n API version:  1.21\r\n Go version:   go1.4.2\r\n Git commit:   76d6bc9\r\n Built:        Tue Nov  3 17:43:42 UTC 2015\r\n OS/Arch:      linux/amd64\r\nvenkat@instance-2:~$ sudo docker info\r\nContainers: 3\r\nImages: 15\r\nServer Version: 1.9.0\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 21\r\n Dirperm1 Supported: true\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nKernel Version: 3.19.0-28-generic\r\nOperating System: Ubuntu 14.04.3 LTS\r\nCPUs: 1\r\nTotal Memory: 3.614 GiB\r\nName: instance-2\r\nID: OMLM:5CYV:RIJX:JTKX:66AF:OUMV:CTA7:6P73:76FH:PQYH:PLR5:PJBW\r\nWARNING: No swap limit support\r\nvenkat@instance-2:~$ uname -a\r\nLinux instance-2 3.19.0-28-generic #30~14.04.1-Ubuntu SMP Tue Sep 1 09:32:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n```\r\n\r\nWhile running apparmor to set docker to complain mode, I get a regex validation error:\r\n\r\n```\r\nvenkat@instance-2:~$ sudo aa-complain /etc/apparmor.d/docker \r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3/dist-packages/apparmor/aa.py\", line 2910, in parse_profile_data\r\n    re.compile(p_re)\r\n  File \"/usr/lib/python3.4/re.py\", line 219, in compile\r\n    return _compile(pattern, flags)\r\n  File \"/usr/lib/python3.4/re.py\", line 288, in _compile\r\n    p = sre_compile.compile(pattern, flags)\r\n  File \"/usr/lib/python3.4/sre_compile.py\", line 465, in compile\r\n    p = sre_parse.parse(p, flags)\r\n  File \"/usr/lib/python3.4/sre_parse.py\", line 751, in parse\r\n    raise error(\"unbalanced parenthesis\")\r\nsre_constants.error: unbalanced parenthesis\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\n  File \"/usr/sbin/aa-complain\", line 30, in <module>\r\n    tool.cmd_complain()\r\n  File \"/usr/lib/python3/dist-packages/apparmor/tools.py\", line 154, in cmd_complain\r\n    apparmor.read_profiles()\r\n  File \"/usr/lib/python3/dist-packages/apparmor/aa.py\", line 2594, in read_profiles\r\n    read_profile(profile_dir + '/' + file, True)\r\n  File \"/usr/lib/python3/dist-packages/apparmor/aa.py\", line 2620, in read_profile\r\n    profile_data = parse_profile_data(data, file, 0)\r\n  File \"/usr/lib/python3/dist-packages/apparmor/aa.py\", line 2912, in parse_profile_data\r\n    raise AppArmorException(_('Syntax Error: Invalid Regex %(path)s in file: %(file)s line: %(line)s') % { 'path': path, 'file': file, 'line': lineno + 1 })\r\napparmor.common.AppArmorException: 'Syntax Error: Invalid Regex @{PROC}/{*,**^[0-9*],sys/kernel/shm*} in file: /etc/apparmor.d/docker line: 16'\r\n```\r\n\r\nThis seems to stem from the apparmor.go changes in 7342d59114fe443ae8d59474abb59280f014c493 .\r\n\r\nI am using apparmor version 2.8.95 on Google Compute Engine.\r\n\r\n```\r\nvenkat@instance-2:~$ sudo dpkg -s apparmor | head -12\r\nPackage: apparmor\r\nStatus: install ok installed\r\nPriority: extra\r\nSection: admin\r\nInstalled-Size: 1183\r\nMaintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>\r\nArchitecture: amd64\r\nVersion: 2.8.95~2430-0ubuntu5.3\r\nReplaces: apparmor-parser, apparmor-utils (<< 2.8.0-0ubuntu28), libapache2-mod-apparmor (<< 2.5.1-0ubuntu3)\r\nDepends: libc6 (>= 2.14), debconf (>= 0.5) | debconf-2.0, python3, libapparmor-perl, lsb-base, initramfs-tools, debconf\r\nSuggests: apparmor-profiles, apparmor-docs, apparmor-utils\r\nBreaks: apparmor-easyprof-ubuntu (<< 1.1.14), apparmor-utils (<< 2.8.0-0ubuntu28), libapache2-mod-apparmor (<< 2.5.1-0ubuntu3), libvirt-bin (<< 1.2.2-0ubuntu9~), lightd\r\nm (<< 1.9.14-0ubuntu2~), lxc (<< 1.0.2-0ubuntu2~)\r\n```\r\n\r\nIs there some dependency I am missing that is causing this error?"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/158917248","html_url":"https://github.com/docker/docker/issues/17783#issuecomment-158917248","issue_url":"https://api.github.com/repos/docker/docker/issues/17783","id":158917248,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T12:15:33Z","updated_at":"2015-11-23T12:15:33Z","body":"/cc @jfrazelle @ewindisch PTAL"}}