<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8613</bug_id>
          
          <creation_ts>2015-10-29 14:54:03 +0000</creation_ts>
          <short_desc>udev-extraconf: automount does not work with systemd &gt;= 219</short_desc>
          <delta_ts>2017-12-06 16:49:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>General Runtime</product>
          <component>General Runtime</component>
          <version>1.8</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Check 2.0 also</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frederico Cadete">frederico.cadete</reporter>
          <assigned_to name="Alejandro Hernandez">alejandro.hernandez</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>56005</commentid>
    <comment_count>0</comment_count>
    <who name="Frederico Cadete">frederico.cadete</who>
    <bug_when>2015-10-29 14:54:03 +0000</bug_when>
    <thetext>With systemd 219 and higher, systemd-udevd.service now has MountFlags=slave.
This means that udevd runs in its own mount namespace. Whatever udev rules mount, it will only be visible inside that namespace. See [1].

The result is that after upgrading to Yocto, the mount directory is correctly created inside /run/media/sda1 but processes in the global mount namespace will see that directory as empty.

Workaround hack: patch systemd-udevd.service to have MountFlags=shared, which reverts to the previous behavior. I am not sure this is desirable. I don&apos;t really understand the motivation behind this systemd change and what is the proper way of doing automounts from the systemd perspective.

[1] https://github.com/systemd/systemd/commit/c2c13f2df42e0691aecabe3979ea81cd7faa35c7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62482</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2016-05-26 18:34:17 +0000</bug_when>
    <thetext>After doing some research, I believe the best option is to manually specify MountFlags=slave which was the default before, also other distros are doing it too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62483</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2016-05-26 18:35:22 +0000</bug_when>
    <thetext>This patch is a backport from debian, and fizes the issue on master, I will backport it and request for it to be merged.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f2092e67ea880301058396b831a9a18905317d0d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62487</commentid>
    <comment_count>3</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2016-05-26 20:00:44 +0000</bug_when>
    <thetext>Just clarifying that we DONT specify MountFlags=slave, that was a typo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68849</commentid>
    <comment_count>4</comment_count>
    <who name="Alejandro Hernandez">alejandro.hernandez</who>
    <bug_when>2016-12-05 20:57:11 +0000</bug_when>
    <thetext>Fixed here:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=fido&amp;id=c53ddb2006f04051b00df3189fe8d35bb49ef3c7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>