{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/1446","labels_url":"https://api.github.com/repos/systemd/systemd/issues/1446/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/1446/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/1446/events","html_url":"https://github.com/systemd/systemd/issues/1446","id":109478028,"number":1446,"title":"systemd-nspawn: Failed to open /dev/loop-control: Operation not permitted","user":{"login":"jsynacek","id":1014564,"avatar_url":"https://avatars.githubusercontent.com/u/1014564?v=3","gravatar_id":"","url":"https://api.github.com/users/jsynacek","html_url":"https://github.com/jsynacek","followers_url":"https://api.github.com/users/jsynacek/followers","following_url":"https://api.github.com/users/jsynacek/following{/other_user}","gists_url":"https://api.github.com/users/jsynacek/gists{/gist_id}","starred_url":"https://api.github.com/users/jsynacek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsynacek/subscriptions","organizations_url":"https://api.github.com/users/jsynacek/orgs","repos_url":"https://api.github.com/users/jsynacek/repos","events_url":"https://api.github.com/users/jsynacek/events{/privacy}","received_events_url":"https://api.github.com/users/jsynacek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemd/systemd/labels/has-pr","name":"has-pr","color":"009800"},{"url":"https://api.github.com/repos/systemd/systemd/labels/needs-reporter-feedback","name":"needs-reporter-feedback","color":"eb6420"},{"url":"https://api.github.com/repos/systemd/systemd/labels/nspawn","name":"nspawn","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-10-02T11:58:51Z","updated_at":"2015-10-08T08:19:27Z","closed_at":null,"body":"On Fedora (Rawhide, with the current master):\r\n\r\n```\r\n# machinectl list-images\r\nNAME                                      TYPE RO  USAGE  CREATED                      MODIFIED                    \r\nFedora-Cloud-Base-23_Beta-20150915.x86_64 raw  no  647.1M Tue 2015-09-15 23:36:24 CEST Tue 2015-09-15 23:36:24 CEST\r\n\r\n# machinectl start Fedora-Cloud-Base-23_Beta-20150915.x86_64\r\nJob for systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service failed because the control process exited with error code. See \"systemctl status \"systemd-nspawn@Fedora\\\\x2dCloud\\\\x2dBase\\\\x2d23_Beta\\\\x2d20150915.x86_64.service\"\" and \"journalctl -xe\" for details.\r\n\r\n# journalctl -b\r\n...\r\nOct 02 13:55:22 rawhide-development-virt systemd[1]: Starting Container Fedora-Cloud-Base-23_Beta-20150915.x86_64...\r\nOct 02 13:55:22 rawhide-development-virt systemd-nspawn[1040]: Failed to open /dev/loop-control: Operation not permitted\r\nOct 02 13:55:22 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Main process exited, code=exited, status=1/FAILURE\r\nOct 02 13:55:22 rawhide-development-virt systemd[1]: Failed to start Container Fedora-Cloud-Base-23_Beta-20150915.x86_64.\r\nOct 02 13:55:22 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Unit entered failed state.\r\nOct 02 13:55:22 rawhide-development-virt audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64 comm=\"systemd\" exe=\"/usr/lib/systemd/systemd\" hostname=? addr=? terminal=? res=failed'\r\nOct 02 13:55:22 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Failed with result 'exit-code'.\r\n...\r\n```\r\nSee also https://bugzilla.redhat.com/show_bug.cgi?id=1266776."},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/146453244","html_url":"https://github.com/systemd/systemd/issues/1446#issuecomment-146453244","issue_url":"https://api.github.com/repos/systemd/systemd/issues/1446","id":146453244,"user":{"login":"jsynacek","id":1014564,"avatar_url":"https://avatars.githubusercontent.com/u/1014564?v=3","gravatar_id":"","url":"https://api.github.com/users/jsynacek","html_url":"https://github.com/jsynacek","followers_url":"https://api.github.com/users/jsynacek/followers","following_url":"https://api.github.com/users/jsynacek/following{/other_user}","gists_url":"https://api.github.com/users/jsynacek/gists{/gist_id}","starred_url":"https://api.github.com/users/jsynacek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsynacek/subscriptions","organizations_url":"https://api.github.com/users/jsynacek/orgs","repos_url":"https://api.github.com/users/jsynacek/repos","events_url":"https://api.github.com/users/jsynacek/events{/privacy}","received_events_url":"https://api.github.com/users/jsynacek/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T08:19:27Z","updated_at":"2015-10-08T08:19:27Z","body":"I retested this with the latest master (10e6271bf35f0afc798c9a34190175d6d5dce42b). On the first run, I get:\r\n```\r\nOct 08 10:14:18 rawhide-development-virt systemd[1]: Created slice Virtual Machine and Container Slice.\r\nOct 08 10:14:18 rawhide-development-virt systemd[1]: Starting Container Fedora-Cloud-Base-23_Beta-20150915.x86_64...\r\nOct 08 10:14:18 rawhide-development-virt kernel: loop: module loaded\r\nOct 08 10:14:18 rawhide-development-virt systemd-nspawn[961]: Failed to open loop device /dev/loop0: Operation not permitted\r\nOct 08 10:14:18 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Main process exited, code=exited, status=1/FAILURE\r\nOct 08 10:14:18 rawhide-development-virt systemd[1]: Failed to start Container Fedora-Cloud-Base-23_Beta-20150915.x86_64.\r\nOct 08 10:14:18 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Unit entered failed state.\r\nOct 08 10:14:18 rawhide-development-virt audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d2015091\r\nOct 08 10:14:18 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Failed with result 'exit-code'.\r\n```\r\nSo, nspawn attempted to use loop before the kernel module was loaded?\r\n\r\nFrom the second run onwards, I get:\r\n```\r\nOct 08 10:15:44 rawhide-development-virt polkitd[952]: Registered Authentication Agent for unix-process:986:10190 (system bus name :1.78 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedeskt\r\nOct 08 10:15:44 rawhide-development-virt systemd[1]: Starting Container Fedora-Cloud-Base-23_Beta-20150915.x86_64...\r\nOct 08 10:15:44 rawhide-development-virt kernel:  loop0: p1\r\nOct 08 10:15:44 rawhide-development-virt systemd-nspawn[992]: Failed to allocate prober for /dev/loop0p1: Operation not permitted\r\nOct 08 10:15:44 rawhide-development-virt systemd-nspawn[992]: Failed to mount root directory: Operation not permitted\r\nOct 08 10:15:44 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Main process exited, code=exited, status=1/FAILURE\r\nOct 08 10:15:44 rawhide-development-virt systemd[1]: Failed to start Container Fedora-Cloud-Base-23_Beta-20150915.x86_64.\r\nOct 08 10:15:44 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Unit entered failed state.\r\nOct 08 10:15:44 rawhide-development-virt systemd[1]: systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d20150915.x86_64.service: Failed with result 'exit-code'.\r\nOct 08 10:15:44 rawhide-development-virt audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-nspawn@Fedora\\x2dCloud\\x2dBase\\x2d23_Beta\\x2d2015091\r\nOct 08 10:15:44 rawhide-development-virt polkitd[952]: Unregistered Authentication Agent for unix-process:986:10190 (system bus name :1.78, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_\r\nOct 08 10:15:44 rawhide-development-virt sudo[980]: pam_unix(sudo:session): session closed for user root\r\nOct 08 10:15:44 rawhide-development-virt audit[980]: USER_END pid=980 uid=0 auid=17912 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,p\r\nOct 08 10:15:44 rawhide-development-virt audit[980]: CRED_DISP pid=980 uid=0 auid=17912 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct=\"root\" \r\nOct 08 10:15:44 rawhide-development-virt audit[1]: USER_AVC pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='Unknown permission stop for class system exe=\"/usr/lib/systemd/systemd\r\nOct 08 10:15:44 rawhide-development-virt systemd-logind[488]: Removed session 1.\r\nOct 08 10:15:44 rawhide-development-virt systemd-udevd[999]: inotify_add_watch(9, /dev/loop0, 10) failed: No such file or directory\r\nOct 08 10:15:44 rawhide-development-virt systemd[1]: Stopping User Manager for UID 0...\r\n```\r\nHere it looks like a container was actually started, but udev failed there."}}