<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>47239</bug_id>
          
          <creation_ts>2023-08-15 03:43:34 +0300</creation_ts>
          <short_desc>systemd-nspawn@.service не работает</short_desc>
          <delta_ts>2023-08-15 15:24:28 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>systemd-container</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Вадим Илларионов">gbIMoBou</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>arseny</cc>
    
    <cc>shaba</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>231407</commentid>
    <comment_count>0</comment_count>
    <who name="Вадим Илларионов">gbIMoBou</who>
    <bug_when>2023-08-15 03:43:34 +0300</bug_when>
    <thetext>При попытке запуска вновь созданного контейнера в пользовательском пространстве имён выдаёт следующее:

авг 15 01:25:42 comp.ill systemd[1]: Starting Container vpn...
авг 15 01:25:42 comp.ill systemd-nspawn[3642]: Failed to set up ID mapped mounts: Operation not permitted
авг 15 01:25:42 comp.ill systemd-nspawn[3631]: Short read while reading cgroup mode (0 bytes). The child is most likely dead.
авг 15 01:25:42 comp.ill systemd[1]: systemd-nspawn@vpn.service: Main process exited, code=exited, status=1/FAILURE
авг 15 01:25:42 comp.ill systemd[1]: systemd-nspawn@vpn.service: Failed with result &apos;exit-code&apos;.
авг 15 01:25:42 comp.ill systemd[1]: Failed to start Container vpn.

Стоит убрать опцию &apos;-U&apos; -- как всё волшебным образом взлетает.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231412</commentid>
    <comment_count>1</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2023-08-15 08:02:39 +0300</bug_when>
    <thetext>На правильный пакет.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231464</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Shabalin">shaba</who>
    <bug_when>2023-08-15 15:24:28 +0300</bug_when>
    <thetext>cat /etc/sysctl.d/50-systemd-nspawn.conf 
# 2^23
fs.inotify.max_queued_events = 8388608
# 2^16
fs.inotify.max_user_instances = 65536
# 2^22
fs.inotify.max_user_watches = 4194304

-kernel.idmap_mounts = 1

Спасибо нашим ядрам за заботу о безопасности.
Вам решать, что использовать, kernel.idmap_mounts или -U.
Паковать такую настройку в пакет systemd-container я еще не решился.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>