We have a bunch of accounts that all have similar headers that we want to block from specific partitions. For instance we want to block or permit group_* and all the groups of that pattern. Is there a way to do this in Slurm with out listing out all the groups? Could a pattern match functionaliyy be added via either * or regex?
Hello Paul, I've checked and currently there isn't any type of name expansion logic when parsing names from partition configuration options like AllowGroups or AllowAccounts. However, an option to simplify your list (taking into account the current limitations) would be to make use of the account hierarchy. AllowAccounts also works for all subaccounts down the hierarchy [1], so if you are working with those, you could just join all your desired accounts under other parent accounts and just use those as a filter. This depends entirely on your needs, but it might be more work than just specifying the full group/account list in the partition configuration. Best regards, Ricard. [1] https://slurm.schedmd.com/slurm.conf.html#OPT_AllowAccounts
That won't really work for our fairshare set up as we are using classic fairshare and have no intention of moving to Fair Tree. Nesting also doesn't work with in our fairshare policy and schema. It would be good to add this feature for greater flexibility for those who can't do nesting. -Paul Edmon- On 2/7/2024 4:38 AM, bugs@schedmd.com wrote: > > *Comment # 1 <https://bugs.schedmd.com/show_bug.cgi?id=18887#c1> on > bug 18887 <https://bugs.schedmd.com/show_bug.cgi?id=18887> from Ricard > Zarco Badia <mailto:ricard@schedmd.com> * > Hello Paul, > > I've checked and currently there isn't any type of name expansion logic when > parsing names from partition configuration options like AllowGroups or > AllowAccounts. > > However, an option to simplify your list (taking into account the current > limitations) would be to make use of the account hierarchy. AllowAccounts also > works for all subaccounts down the hierarchy [1], so if you are working with > those, you could just join all your desired accounts under other parent > accounts and just use those as a filter. This depends entirely on your needs, > but it might be more work than just specifying the full group/account list in > the partition configuration. > > Best regards, Ricard. > > [1]https://slurm.schedmd.com/slurm.conf.html#OPT_AllowAccounts > ------------------------------------------------------------------------ > You are receiving this mail because: > > * You reported the bug. >
Hello Paul, We are evaluating the viability of this. Just to make the scope very clear, would something like "AllowAccounts=account*,account2*,..." be sufficient for your needs? I want to make clear that I'm specifically talking about the AllowAccounts option and only name suffix expansion, without going into more regex-like features. Best regards, Ricard.
Yes, a star would be fine. It would be great to do that for AllowAccounts, AllowGroups, DenyAccounts, DenyGroups, as they all have the same problem of listing out a huge number of groups when a pattern match would do. A regex would give more flexibility but is likely more work, a * would work fine for our situation. -Paul Edmon- On 2/7/2024 11:02 AM, bugs@schedmd.com wrote: > > *Comment # 4 <https://bugs.schedmd.com/show_bug.cgi?id=18887#c4> on > bug 18887 <https://bugs.schedmd.com/show_bug.cgi?id=18887> from Ricard > Zarco Badia <mailto:ricard@schedmd.com> * > Hello Paul, > > We are evaluating the viability of this. Just to make the scope very clear, > would something like "AllowAccounts=account*,account2*,..." be sufficient for > your needs? > > I want to make clear that I'm specifically talking about the AllowAccounts > option and only name suffix expansion, without going into more regex-like > features. > > Best regards, Ricard. > ------------------------------------------------------------------------ > You are receiving this mail because: > > * You reported the bug. >
Hello Paul, We can implement a basic name expansion for names ending with "*" for the Allow/DenyAccounts option, but this won't be added in the short term and will most likely be for the next major release of Slurm. I will be changing the severity level to 5 (enhancement). Best regards, Ricard.
Thanks! -Paul Edmon- On 2/8/24 5:42 AM, bugs@schedmd.com wrote: > Ricard Zarco Badia <mailto:ricard@schedmd.com> changed bug 18887 > <https://bugs.schedmd.com/show_bug.cgi?id=18887> > What Removed Added > Severity 4 - Minor Issue 5 - Enhancement > Target Release --- 24.08 > > *Comment # 7 <https://bugs.schedmd.com/show_bug.cgi?id=18887#c7> on > bug 18887 <https://bugs.schedmd.com/show_bug.cgi?id=18887> from Ricard > Zarco Badia <mailto:ricard@schedmd.com> * > Hello Paul, > > We can implement a basic name expansion for names ending with "*" for the > Allow/DenyAccounts option, but this won't be added in the short term and will > most likely be for the next major release of Slurm. > > I will be changing the severity level to 5 (enhancement). > > Best regards, Ricard. > ------------------------------------------------------------------------ > You are receiving this mail because: > > * You reported the bug. >