<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:44:03 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-11459] llsom_sync updates LSOM data for some files when called with non-existant user</title>
                <link>https://jira.whamcloud.com/browse/LU-11459</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Looks like llsom_sync is not working correctly when a non-existent changelog user is entered. &lt;/p&gt;

&lt;p&gt;For example, I&apos;ve registered two changelog users on the MDS, set llite.*.xattr_cache = 0 on the client (vm4) and create a new file and overwrite an existing file:&lt;/p&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;[vm3 ~]# dd if=/dev/urandom of=/lustre/scratch/ddfile3 bs=37k count=200
200+0 records in
200+0 records out
7577600 bytes (7.6 MB) copied, 0.0464932 s, 163 MB/s

[vm4 ~]# echo &quot;aa&quot; &amp;gt; /lustre/scratch/ddfile2
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Looking at the LSOM data, we can see the size is correct, but the blocks are not updated.&lt;/p&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;[vm4 ~]# lfs getsom /lustre/scratch/ddfile2
file: /lustre/scratch/ddfile2 size: 3 blocks: 0 flags: 4
[vm4 ~]# lfs getsom /lustre/scratch/ddfile3
file: /lustre/scratch/ddfile3 size: 7577600 blocks: 0 flags: 4
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, sync the LSOM data, but give it a bad changelog user ID.&lt;/p&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;[vm4 ~]# llsom_sync --mdt scratch-MDT0000 --user cli4 -v /lustre/scratch/
Start receiving records
Processed changelog record index:5 type:XATTR(0xf) FID:[0x200000402:0x1:0x0]
Processed changelog record index:6 type:CREAT(0x1) FID:[0x200000402:0x2:0x0]
Processed changelog record index:7 type:XATTR(0xf) FID:[0x200000402:0x2:0x0]
Processed changelog record index:8 type:CLOSE(0xb) FID:[0x200000402:0x2:0x0]
Processed changelog record index:9 type:XATTR(0xf) FID:[0x200000402:0x1:0x0]
Processed changelog record index:10 type:TRUNC(0xd) FID:[0x200000402:0x1:0x0]
Processed changelog record index:11 type:XATTR(0xf) FID:[0x200000402:0x1:0x0]
Processed changelog record index:12 type:CLOSE(0xb) FID:[0x200000402:0x1:0x0]
finished reading [scratch-MDT0000]
Start to sync 2 records.
record 1651949901960989620:8, updated LSOM for fid [0x200000402:0x2:0x0] size:7577600 blocks:14800
llsom_sync: cannot purge records for &apos;cli4&apos;: Invalid argument (22)
llsom_sync: failed to clear changelog record: cli4:8: Invalid argument (22)
[vm4 ~]# lfs getsom /lustre/scratch/ddfile3
file: /lustre/scratch/ddfile3 size: 7577600 blocks: 14800 flags: 4
[vm4 ~]# lfs getsom /lustre/scratch/ddfile2
file: /lustre/scratch/ddfile2 size: 3 blocks: 0 flags: 4
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The changelog record purge error is to be expected since there is no user cli4. The problem is, one file&apos;s LSOM data (blocks) is updated, the other file&apos;s data is not updated.&lt;/p&gt;

&lt;p&gt;From the output of llsom_sync, it looks like updating of the LSOM file data is interrupted when it figured out that the user is not valid. It seems like there are two issues here:&lt;br/&gt;
1. We should update the LSOM data of all files or none of the files when a bad user ID is input&lt;br/&gt;
2. We are not checking the validity of the user at an appropriate time.&lt;/p&gt;

&lt;p&gt;Looking at the llsom_sync code, we don&apos;t check the changelog user in llsom_sync until we call llapi_changelog_clear() to purge changelog records and this routine produces an error.&lt;/p&gt;

&lt;p&gt;Using a valid changelog user, then all file&apos;s LSOM data are updated.&lt;/p&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;[vm4 ~]# llsom_sync --mdt scratch-MDT0000 --user cl2 -v /lustre/scratch/
Start receiving records
Processed changelog record index:5 type:XATTR(0xf) FID:[0x200000402:0x1:0x0]
Processed changelog record index:6 type:CREAT(0x1) FID:[0x200000402:0x2:0x0]
Processed changelog record index:7 type:XATTR(0xf) FID:[0x200000402:0x2:0x0]
Processed changelog record index:8 type:CLOSE(0xb) FID:[0x200000402:0x2:0x0]
Processed changelog record index:9 type:XATTR(0xf) FID:[0x200000402:0x1:0x0]
Processed changelog record index:10 type:TRUNC(0xd) FID:[0x200000402:0x1:0x0]
Processed changelog record index:11 type:XATTR(0xf) FID:[0x200000402:0x1:0x0]
Processed changelog record index:12 type:CLOSE(0xb) FID:[0x200000402:0x1:0x0]
Processed changelog record index:13 type:XATTR(0xf) FID:[0x200000402:0x2:0x0]
finished reading [scratch-MDT0000]
Start to sync 2 records.
record 1651949901960989620:8, updated LSOM for fid [0x200000402:0x2:0x0] size:7577600 blocks:14800
record 1651949963251084516:12, updated LSOM for fid [0x200000402:0x1:0x0] size:3 blocks:8
[vm4 ~]# lfs getsom /lustre/scratch/ddfile3
file: /lustre/scratch/ddfile3 size: 7577600 blocks: 14800 flags: 4
[vm4 ~]# lfs getsom /lustre/scratch/ddfile2
file: /lustre/scratch/ddfile2 size: 3 blocks: 8 flags: 4
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="53475">LU-11459</key>
            <summary>llsom_sync updates LSOM data for some files when called with non-existant user</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="qian_wc">Qian Yingjin</assignee>
                                    <reporter username="jamesanunez">James Nunez</reporter>
                        <labels>
                            <label>LSOM</label>
                            <label>patch</label>
                    </labels>
                <created>Tue, 2 Oct 2018 19:15:27 +0000</created>
                <updated>Fri, 21 Jan 2022 01:13:45 +0000</updated>
                                            <version>Lustre 2.12.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="234244" author="adilger" created="Tue, 2 Oct 2018 21:17:25 +0000"  >&lt;p&gt;I don&apos;t think we need an &quot;all-or-none&quot; semantic for LSOM data.  Since LSOM is, by definition, lazy then there may be any number of reasons why the LSOM attrs are updated or not (e.g. some other client accessed the file, it was stored only on the MDT, whatever.&lt;/p&gt;

&lt;p&gt;I agree it would be useful to have the LSOM tool check for a valid Changelog user when it is first run, so that it can complain to the user appropriately.&lt;/p&gt;</comment>
                            <comment id="234296" author="pjones" created="Wed, 3 Oct 2018 17:35:07 +0000"  >&lt;p&gt;Qian&lt;/p&gt;

&lt;p&gt;Can you please investigate?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="234551" author="qian_wc" created="Mon, 8 Oct 2018 02:32:07 +0000"  >&lt;p&gt;I digged into the code, to have the LSOM sync tool check for a valid Changelog user, we need add an extra RPC to MDS to check it. I will make a patch sooner.&lt;/p&gt;</comment>
                            <comment id="234556" author="gerrit" created="Mon, 8 Oct 2018 11:09:32 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/33315&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/33315&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11459&quot; title=&quot;llsom_sync updates LSOM data for some files when called with non-existant user&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11459&quot;&gt;LU-11459&lt;/a&gt; changelog: valid check for a given changelog user&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2c5c1b7751b0873e2e0b1f905d2926a9d64501e8&lt;/p&gt;</comment>
                    </comments>
                    <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|i003fj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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>