<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:26:40 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-2610] sanity test_103: ACL copy failed zfs - umask ignored</title>
                <link>https://jira.whamcloud.com/browse/LU-2610</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This issue was created by maloo for sarah &amp;lt;sarah@whamcloud.com&amp;gt;&lt;/p&gt;

&lt;p&gt;This issue relates to the following test suite run: &lt;a href=&quot;https://maloo.whamcloud.com/test_sets/e2ede512-5ae4-11e2-8985-52540035b04c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://maloo.whamcloud.com/test_sets/e2ede512-5ae4-11e2-8985-52540035b04c&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The sub-test test_103 failed with the following error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;== sanity test 103: acl test =========================================== 16:53:11 (1357692791)
performing cp ...
[3] $ umask 022 -- ok
[4] $ mkdir d -- ok
[5] $ cd d -- ok
[6] $ touch f -- ok
[7] $ setfacl -m u:bin:rw f -- ok
[8] $ ls -l f | awk -- &apos;{ print $1 }&apos; -- failed
-rw-rw-r--+                           ? -rw-rw-rw-+                            
[11] $ cp f g -- ok
[12] $ ls -l g | awk -- &apos;{ print $1 }&apos; -- failed
-rw-r--r--                            ? -rw-rw-rw-                             
[15] $ rm g -- ok
[16] $ cp -p f g -- ok
[17] $ ls -l f | awk -- &apos;{ print $1 }&apos; -- failed
-rw-rw-r--+                           ? -rw-rw-rw-+                            
[20] $ mkdir h -- ok
[21] $ echo blubb &amp;gt; h/x -- ok
[22] $ cp -rp h i -- ok
[23] $ cat i/x -- ok
[26] $ rm -r i -- ok
[31] $ setfacl -R -m u:bin:rwx h -- ok
[32] $ getfacl --omit-header h/x -- failed
user::rw-                             | user::rw-                              
user:bin:rwx                          | user:bin:rwx                           
group::r--                            ? group::rw-                             
mask::rwx                             | mask::rwx                              
other::r--                            ? other::rw-                             
                                      |                                        
[40] $ cp -rp h i -- ok
[41] $ getfacl --omit-header i/x -- failed
user::rw-                             | user::rw-                              
user:bin:rwx                          | user:bin:rwx                           
group::r--                            ? group::rw-                             
mask::rwx                             | mask::rwx                              
other::r--                            ? other::rw-                             
                                      |                                        
[49] $ cd .. -- ok
[50] $ rm -r d -- ok
22 commands (17 passed, 5 failed)
 sanity test_103: @@@@@@ FAIL:  
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>lustre-master #1142 OFED build ZFS</environment>
        <key id="17158">LU-2610</key>
            <summary>sanity test_103: ACL copy failed zfs - umask ignored</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="utopiabound">Nathaniel Clark</assignee>
                                    <reporter username="maloo">Maloo</reporter>
                        <labels>
                            <label>LB</label>
                            <label>sequoia</label>
                            <label>zfs</label>
                    </labels>
                <created>Sat, 12 Jan 2013 02:19:13 +0000</created>
                <updated>Wed, 29 Oct 2014 15:52:29 +0000</updated>
                            <resolved>Wed, 29 Oct 2014 15:52:23 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="50938" author="utopiabound" created="Mon, 21 Jan 2013 16:19:38 +0000"  >&lt;p&gt;In test 103 (over the wire) the REINT_CREATE packet exchange:&lt;br/&gt;
for both ldiskfs and zfs:&lt;br/&gt;
Mode: 040777&lt;br/&gt;
Umask: 0022&lt;/p&gt;

&lt;p&gt;ldiskfs returned Mode: 040755&lt;/p&gt;

&lt;p&gt;ZFS returned Mode: 040777&lt;/p&gt;

&lt;p&gt;ZFS appears to be ignoring the passed umask.&lt;/p&gt;</comment>
                            <comment id="51207" author="utopiabound" created="Fri, 25 Jan 2013 10:22:25 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/5174&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5174&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="51254" author="morrone" created="Fri, 25 Jan 2013 17:05:13 +0000"  >&lt;p&gt;Interesting.  On first glance at your patch I thought &quot;that can&apos;t be right&quot;, but now I see what is going on.  It is surprising to me that the server knows about the umask of the calling thread.  Do you have any idea why it is designed this way?  Why isn&apos;t the umask simply applied to the mode inside the lustre client?&lt;/p&gt;

&lt;p&gt;If it wasn&apos;t before, it seems like a bad design now that we can support multiple OSD.  Making every osd implement the same thing seems error prone, which is what led to this bug.&lt;/p&gt;</comment>
                            <comment id="51288" author="utopiabound" created="Sun, 27 Jan 2013 10:56:05 +0000"  >&lt;p&gt;It&apos;s because POSIX ACLs and umask interact and it&apos;s up to the filesystem to work out the correct interaction.&lt;/p&gt;

&lt;p&gt;I think ACL + umask calculations are done in OSD because of the different way&apos;s ACLs are stored (that&apos;s my impression from working through the code), but I agree it isn&apos;t well encapsulated.&lt;/p&gt;</comment>
                            <comment id="51304" author="laisiyao" created="Mon, 28 Jan 2013 02:46:34 +0000"  >&lt;p&gt;Chris, it&apos;s designed to be so because the creation mode is decided by umask and parent default ACL, and it&apos;s not a good idea to hold parent UPDATE lock by client in creation. So finally it&apos;s decided to send calling thread umask to MDS and let server backend filesystem to calculate the correct mode.&lt;/p&gt;

&lt;p&gt;Linux kernel also lets bottom filesystem to do this instead of in VFS, so that ldiskfs can get the correct mode. I don&apos;t find ZFS does this at the first glance of code. Nathaniel, could you test this with ZFS as local filesystem?&lt;/p&gt;</comment>
                            <comment id="51331" author="utopiabound" created="Mon, 28 Jan 2013 10:36:39 +0000"  >&lt;p&gt;ZFS does behave correctly as a local filesystem (in my limited testing).  It honoured umask during file creation, I didn&apos;t do extensive umask vs ACL testing though. &lt;/p&gt;</comment>
                            <comment id="51713" author="laisiyao" created="Mon, 4 Feb 2013 04:56:29 +0000"  >&lt;p&gt;Ldiskfs handles ACL and creation mode in low level, see ldiskfs_new_inode(), in contrast, ZFS handles this in ZPL layer, however lustre calls DMU directly to make new node, that&apos;s why we see different result in these two OSD backend filesystem.&lt;/p&gt;

&lt;p&gt;Nathaniel, now that you want to fix all this in MDD layer, I think you need check the patch for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-974&quot; title=&quot;Lustre does not ignore umask when default ACL with mask is set&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-974&quot;&gt;&lt;del&gt;LU-974&lt;/del&gt;&lt;/a&gt;, because in that patch it&apos;s left to be done in OSD.&lt;/p&gt;</comment>
                            <comment id="51722" author="utopiabound" created="Mon, 4 Feb 2013 09:58:47 +0000"  >&lt;p&gt;My patch still has the OSD layer taking care of setting the mode.  The mdd change just ensures that if mode+umask is different the the current computed node that the osd layer is called finish setting that mode. I was cognizant of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-974&quot; title=&quot;Lustre does not ignore umask when default ACL with mask is set&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-974&quot;&gt;&lt;del&gt;LU-974&lt;/del&gt;&lt;/a&gt; patch, and I didn&apos;t want to change what layer set the mode.&lt;/p&gt;

&lt;p&gt;I could update my patch so that osd-ldiskfs takes advantage of the cr_umask instead of passing it in via current-&amp;gt;fs-&amp;gt;umask from mdd, which would essentially just move where current-&amp;gt;fs-&amp;gt;umask gets set from mdd_internal.h::mdo_create_obj to osd_handler.c::__osd_object_create.&lt;/p&gt;
</comment>
                            <comment id="51762" author="laisiyao" created="Mon, 4 Feb 2013 21:03:27 +0000"  >&lt;p&gt;Actually for ldiskfs __mdd_acl_init() is redundant, because ACL is handled internally by ldiskfs in creation already. IMHO this function exists because in original design, ACL initialization should be done in MDD layer, and only the interfaces of get/set xattr are needed for OSD. (this is how ZFS OSD is implemented).&lt;/p&gt;

&lt;p&gt;If this is true, __mdd_acl_init() should act the same as ldiskfs_init_acl(), and also note __mdd_acl_init() is now inside #ifdef CONFIG_FS_POSIX_ACL and if (got_def_acl), this will not be true any more, because __mdd_acl_init() should initialise mode even when acl doesn&apos;t exist.&lt;/p&gt;</comment>
                            <comment id="52984" author="pjones" created="Mon, 25 Feb 2013 20:24:20 +0000"  >&lt;p&gt;Lai advises that this issue will be more completely addressed by &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2804&quot; title=&quot;umask in default ACL is not being transferred over remote operation &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2804&quot;&gt;&lt;del&gt;LU-2804&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="95393" author="adilger" created="Wed, 1 Oct 2014 07:10:41 +0000"  >&lt;p&gt;sanity.sh test_40 is being skipped due to this bug.  If the problem was fixed by &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2804&quot; title=&quot;umask in default ACL is not being transferred over remote operation &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2804&quot;&gt;&lt;del&gt;LU-2804&lt;/del&gt;&lt;/a&gt; then a patch is needed to re-enable this test.&lt;/p&gt;</comment>
                            <comment id="95414" author="utopiabound" created="Wed, 1 Oct 2014 13:40:49 +0000"  >&lt;p&gt;Re-enable test_40&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/12153&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12153&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="97841" author="utopiabound" created="Wed, 29 Oct 2014 15:52:23 +0000"  >&lt;p&gt;Patch landed to master (prior to 2.6.54)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="17288">LU-2672</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="17543">LU-2804</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzvf47:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6094</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>