<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:00:24 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-13335] add name lookup for project IDs</title>
                <link>https://jira.whamcloud.com/browse/LU-13335</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It would be useful to allow names to be mapped to projid numbers using the &lt;tt&gt;/etc/projid&lt;/tt&gt; file (&lt;a href=&quot;https://man7.org/linux/man-pages/man5/projid.5.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;projid.5&lt;/a&gt;), as is used by the XFS quota utility (&lt;a href=&quot;https://man7.org/linux/man-pages/man8/xfs_quota.8.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;xfs_quota.8&lt;/a&gt;):&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;usera:1
userc:3
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There should be a new function &lt;tt&gt;struct ll_project *llapi_getprjname(const char *name)&lt;/tt&gt; function that is called by &lt;tt&gt;lfs&lt;/tt&gt; and &lt;tt&gt;lctl&lt;/tt&gt; to read the &lt;tt&gt;/etc/projid&lt;/tt&gt; file and lookup the name and return the projid, while &lt;tt&gt;struct ll_project *llapi_getprjid(__u32 prjid)&lt;/tt&gt; would lookup the numeric project ID and return the name:&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;struct ll_project {
        __u32 lp_projid;
        char *lp_name;
};
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Returning the struct instead of a single value (name or prjid) allows expanding this interface in the future (e.g. to list which users are allowed to use/change the group, passwords for the group, etc. as with &lt;tt&gt;getgrnam()&lt;/tt&gt;, &lt;tt&gt;getgrgid()&lt;/tt&gt;, &lt;tt&gt;getpwnam()&lt;/tt&gt;, &lt;tt&gt;getpwuid()&lt;/tt&gt;).&lt;/p&gt;

&lt;p&gt;It isn&apos;t very clear what benefit the &lt;tt&gt;/etc/projects&lt;/tt&gt; file (&lt;a href=&quot;https://man7.org/linux/man-pages/man5/projects.5.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;projects.5&lt;/a&gt;) provides, so I&apos;m not yet sure whether we need to implement support for this or not.&lt;/p&gt;</description>
                <environment></environment>
        <key id="58288">LU-13335</key>
            <summary>add name lookup for project IDs</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="wc-triage">WC Triage</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>lad23dd</label>
                            <label>lug23dd</label>
                            <label>medium</label>
                    </labels>
                <created>Thu, 5 Mar 2020 18:41:32 +0000</created>
                <updated>Sat, 9 Dec 2023 00:20:07 +0000</updated>
                                                                                <due></due>
                            <votes>1</votes>
                                    <watches>14</watches>
                                                                            <comments>
                            <comment id="264676" author="bzzz" created="Thu, 5 Mar 2020 18:43:35 +0000"  >&lt;p&gt;shouldn&apos;t that be a part of Lustre FS, like config-log or something similar?&lt;/p&gt;</comment>
                            <comment id="264830" author="adilger" created="Sat, 7 Mar 2020 00:54:02 +0000"  >&lt;p&gt;We don&apos;t manage username-&amp;gt;uid or groupname-&amp;gt;gid mapping in Lustre, but rather depend on external services for mapping.  The XFS filesystem is using &quot;&lt;tt&gt;/etc/projid&lt;/tt&gt;&quot; for projname-&amp;gt;projid mapping, so it makes sense to be compatible with this.&lt;/p&gt;

&lt;p&gt;Once the basic projname-&amp;gt;projid mapping is handled, then we could potentially expand this to manage the configuration in Lustre, or via NIS or AD or whatever is in use at the site (as is done with &lt;tt&gt;getgrnam()&lt;/tt&gt;, &lt;tt&gt;getgrgid()&lt;/tt&gt;, ...), but that is a lot more work.&lt;/p&gt;</comment>
                            <comment id="277229" author="adilger" created="Tue, 11 Aug 2020 20:23:29 +0000"  >&lt;p&gt;It looks like there is already a stub &lt;tt&gt;lfs.c::name2projid()&lt;/tt&gt; function used in most of the relevant code that needs to be filled in to convert the name to the numeric projid.  That would need to call &lt;tt&gt;llapi_getprjid()&lt;/tt&gt; for the name lookup.&lt;/p&gt;

&lt;p&gt;The one place this is not done correctly is in &lt;tt&gt;lfs_project()&lt;/tt&gt;, where it only calls &lt;tt&gt;str2quotaid()&lt;/tt&gt;, unlike &lt;tt&gt;lfs_find()&lt;/tt&gt;, &lt;tt&gt;lfs_setquota()&lt;/tt&gt; and &lt;tt&gt;lfs_quota()&lt;/tt&gt; that call the respective &lt;tt&gt;name2&amp;#42;id()&lt;/tt&gt; function first, and only fall back to &lt;tt&gt;str2quotaid()&lt;/tt&gt; if they return an error.  (As an aside, &lt;tt&gt;str2quotaid()&lt;/tt&gt; should rename the internal &quot;&lt;tt&gt;projid_tmp&lt;/tt&gt;&quot; variable to &quot;&lt;tt&gt;tmpid&lt;/tt&gt;&quot; since function this is used for parsing and verifying all kinds of numeric IDs).&lt;/p&gt;</comment>
                            <comment id="304366" author="adilger" created="Sun, 13 Jun 2021 08:51:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=mrb&quot; class=&quot;user-hover&quot; rel=&quot;mrb&quot;&gt;mrb&lt;/a&gt;, we had briefly discussed at LUG that you might work on this improvement.  Is that still on your radar?&lt;/p&gt;</comment>
                            <comment id="311464" author="adilger" created="Fri, 27 Aug 2021 22:34:20 +0000"  >&lt;p&gt;I&apos;ve also thought for a while that mapping &lt;tt&gt;username:uid&lt;/tt&gt; to the same &lt;tt&gt;projid&lt;/tt&gt; by default would be very convenient.  For example, &quot;&lt;tt&gt;lfs project -p adilger -r -s /lustre/home/adilger&lt;/tt&gt;&quot; with &lt;tt&gt;uid=1000&lt;/tt&gt; would fall back to &lt;tt&gt;projid=1000&lt;/tt&gt; if there is no matching &quot;&lt;tt&gt;adilger&lt;/tt&gt;&quot; entry in &lt;tt&gt;/etc/projid&lt;/tt&gt;.  That avoids the need to duplicate the entire &lt;tt&gt;/etc/passwd&lt;/tt&gt; into &lt;tt&gt;/etc/projid&lt;/tt&gt; for the common case where projid=uid, and potentially avoids the need to manage distributing &lt;tt&gt;/etc/projid&lt;/tt&gt; to all of the client nodes since &lt;tt&gt;getpwnam()&lt;/tt&gt; can query the configured network name database (LDAP, AD, etc) if configured in &lt;tt&gt;/etc/nsswitch.conf&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="322654" author="adilger" created="Fri, 14 Jan 2022 00:18:08 +0000"  >&lt;p&gt;There is also a more extensive &lt;tt&gt;/etc/projid&lt;/tt&gt; format defined by &lt;a href=&quot;https://docs.oracle.com/cd/E19044-01/sol.containers/817-1592/rmtaskproj-12/index.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Solaris&lt;/a&gt;, that is apparently also handled by &lt;tt&gt;/etc/nsswitch.conf&lt;/tt&gt;, so we should maintain compatibility with that for extensions beyond the basic &lt;tt&gt;projname:projid&lt;/tt&gt; fields, essentially just ignoring any extra fields for now:&lt;/p&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;projname:projid:comment:user-list:group-list:attributes
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The fields are defined as follows:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;projname&lt;/tt&gt; - The name of the project. The name must be a string that consists of alphanumeric characters, underline (&lt;tt&gt;&amp;#95;&lt;/tt&gt;) characters, hyphens (&lt;tt&gt;&amp;#45;&lt;/tt&gt;), and periods (&lt;tt&gt;.&lt;/tt&gt;). The period, which is reserved for projects with special meaning to the operating system, can only be used in the names of default projects for users. &lt;tt&gt;projname&lt;/tt&gt; cannot contain colons (&lt;tt&gt;:&lt;/tt&gt;) or newline characters.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;projid&lt;/tt&gt; - The project&apos;s unique numerical ID (PROJID) within the system. The maximum value of the &lt;tt&gt;projid&lt;/tt&gt; field is UID_MAX (2147483647).&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;comment&lt;/tt&gt; - A description of the project.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;user-list&lt;/tt&gt; - A comma-separated list of users who are allowed in the project. Wildcards can be used in this field. An asterisk (&lt;tt&gt;*&lt;/tt&gt;) allows all users to join the project. An exclamation point followed by an asterisk (&lt;tt&gt;&amp;#33;&amp;#42;&lt;/tt&gt;) excludes all users from the project. An exclamation mark (&lt;tt&gt;&amp;#33;&lt;/tt&gt;) followed by a user name excludes the specified user from the project.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;group-list&lt;/tt&gt; - A comma-separated list of groups of users who are allowed in the project. Wildcards can be used in this field. An asterisk (&lt;tt&gt;&amp;#42;&lt;/tt&gt;) allows all groups to join the project. An exclamation point followed by an asterisk (&lt;tt&gt;&amp;#33;&amp;#42;&lt;/tt&gt;) excludes all groups from the project. An exclamation mark (&lt;tt&gt;&amp;#33;&lt;/tt&gt;) followed by a group name excludes the specified group from the project.&lt;/li&gt;
	&lt;li&gt;attributes - A semicolon-separated list of name-value pairs, such as resource controls (see &lt;a href=&quot;https://docs.oracle.com/cd/E19044-01/sol.containers/817-1592/rmctrls-1/index.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Chapter 6, Resource Controls (Overview)&lt;/a&gt;). name is an arbitrary string that specifies the object-related attribute, and value is the optional value for that attribute.
&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;    name[=value]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In the name-value pair, names are restricted to letters, digits, underscores, and periods. A period is conventionally used as a separator between the categories and subcategories of the resource control (rctl). The first character of an attribute name must be a letter. The name is case sensitive.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Values can be structured by using commas and parentheses to establish precedence.&lt;/p&gt;

&lt;p&gt;A semicolon is used to separate name-value pairs. A semicolon cannot be used in a value definition. A colon is used to separate project fields. A colon cannot be used in a value definition.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="322655" author="adilger" created="Fri, 14 Jan 2022 00:24:45 +0000"  >&lt;p&gt;It might potentially be useful to push a patch upstream for Linux &lt;tt&gt;/etc/nsswitch.conf&lt;/tt&gt; to add the &quot;&lt;tt&gt;project&lt;/tt&gt;&quot; as a valid database type.  Since it is glibc, it may not be as obvious as one would hope (both technically and politically), but maybe just cargo-cult copying of e.g. &quot;&lt;tt&gt;passwd&lt;/tt&gt;&quot; or &quot;&lt;tt&gt;group&lt;/tt&gt;&quot; handling would be enough to start?   Adding new &lt;tt&gt;getprojnam()&lt;/tt&gt; and &lt;tt&gt;getprojid()&lt;/tt&gt; calls would be needed also.&lt;/p&gt;</comment>
                            <comment id="322855" author="gerrit" created="Sat, 15 Jan 2022 05:43:32 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/46144&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/46144&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13335&quot; title=&quot;add name lookup for project IDs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13335&quot;&gt;LU-13335&lt;/a&gt; utils: allow projid lookup by name&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 0ef6dd733f261aa2ce7788f4f0f6b29100f1979d&lt;/p&gt;</comment>
                            <comment id="324373" author="gerrit" created="Fri, 28 Jan 2022 23:44:02 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/46369&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/46369&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13335&quot; title=&quot;add name lookup for project IDs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13335&quot;&gt;LU-13335&lt;/a&gt; ldiskfs: add projid to debug logs&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8092bd00214ae19f87207914feeb97cab7faabbe&lt;/p&gt;</comment>
                            <comment id="340016" author="gerrit" created="Mon, 11 Jul 2022 06:50:26 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/46369/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/46369/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13335&quot; title=&quot;add name lookup for project IDs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13335&quot;&gt;LU-13335&lt;/a&gt; ldiskfs: add projid to debug logs&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 6bceb0030d15b70097d75f8da2d373310fe2c658&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="55103">LU-12056</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="65831">LU-14968</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|i00uz3:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>