_______________________________________________So I see a small typo here that is going to prevent the map file from working correctly.
Â
The first argument to usermap needs to be the mapfile name, you are using "AssignGroup",
but the mapfile name is Groups.
Â
Also the attribute that you want to set is AccountingGroup, not AcctGroup. Setting AcctGroupUser
and AcctGroup is optional â it can help you to see what the transform is doing, but these are attributes
that none of the Htcondor daemons care about. AccountingGroup is the only one that really matters.
Â
So your config might look like this.
Â
SCHEDD_CLASSAD_USER_MAP_NAMES = $(SCHEDD_CLASSAD_USER_MAP_NAMES) GroupsÂ
CLASSAD_USER_MAPFILE_Groups = /path/to/mapfileÂ
Â
JOB_TRANSFORM_NAMES = AssignGroupÂ
JOB_TRANSFORM_AssignGroup @=endÂ
[
copy_Owner="AcctGroupUser";
copy_AccountingGroup="RequestedAcctGroup";
eval_set_AccountingGroup=usermap("Groups",Owner,AccountingGroup);
]Â
@end
Â
Finally, I see some people already addressed this, but since AcctGroupUser is being used in the transform as a job attribute.
Using it *also* as a group name prefix on the CM is going to cause some confusion.ÂÂ It might be better to use a different name there, the convention is to just use âgroupâ like this
Â
GROUP_NAMES = group_userA
GROUP_QUOTA_group_userA = 100
Â
Â
Hope this helps.
-tj
Â
Â
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of rmorgan466@xxxxxxxxx
Sent: Thursday, April 23, 2020 4:35 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Accounting GroupsÂ
I was able to get further. Thanks to this,Âhttps://indico.cern.ch/event/817927/contributions/3570542/attachments/1913668/3162964/ScheddTransforms.pdf
Â
SCHEDD_CLASSAD_USER_MAP_NAMES = $(SCHEDD_CLASSAD_USER_MAP_NAMES) GroupsÂ
CLASSAD_USER_MAPFILE_Groups = /path/to/mapfileÂ
Â
JOB_TRANSFORM_NAMES = AssignGroupÂ
JOB_TRANSFORM_AssignGroup @=endÂ
[ copy_Owner="AcctGroupUser"; copy_AcctGroup="RequestedAcctGroup"; eval_set_AcctGroup=usermap("AssignGroup",AcctGroupUser,AcctGroup); ]Â
@end
Â
On my CM, I now have
GROUP_NAMES = AcctGroupUser
GROUP_QUOTA_AcctGroupUser_userA = 100
Â
That should set userA quota to 100.
Â
is thisÂcorrect? Also, what is the purpose of the mapfile? I know it must exist but not sure why we need it.Â
Â
On Thu, Apr 23, 2020 at 12:40 PM Rita <rmorgan466@xxxxxxxxx> wrote:
I set the following below
Â
Restarted condor. Submitted a job. And now, I see in my condor_userprio my username and resource used. Is this a good way to validate the change? Now that user accounting groups are squared away, How can I enforce the quota?
Â
JOB_TRANSFORM_NAMES = AssignGroup
Â
JOB_TRANSFORM_AssignGroup = [ eval_set_AccountingGroup = userMap("Groups",Owner,AccountingGroup); ]
Â
Â
Â
Â
Â
On Thu, Apr 23, 2020 at 12:19 PM Gregory Thain <gthain@xxxxxxxxxxx> wrote:
On 4/23/20 10:46 AM, rmorgan466@xxxxxxxxx wrote:
> Hi.
>
> I was wondering if there were any advancements on how to manage
> account groups. Each user will have an accounting group in my setup. I
> want to explicitlyÂset the number of jobs a user can run. I don't want
> a user to use another accounting group. If a user runs without an
> accounting group, their jobs shouldn't run. Is this possible?
With schedd transforms, the schedd can now automatically assign an
accounting group to a user based on a mapping file the admin sets up.Â
Some details are given here, though we hope to improve the documentation:
https://htcondor.readthedocs.io/en/latest/admin-manual/policy-configuration.html?highlight=usermap#job-transforms
-greg
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/
Â
--
--- Get your facts first, then you can distort them as you please.--
Â
--
--- Get your facts first, then you can distort them as you please.--
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/