Bug 644436

Summary: getGroupInfoFromUserId incorrect for subgroups
Product: Red Hat Enterprise MRG Reporter: Jon Thomas <jthomas>
Component: condorAssignee: Erik Erlandson <eerlands>
Status: CLOSED ERRATA QA Contact: Martin Kudlej <mkudlej>
Severity: medium Docs Contact:
Priority: low    
Version: 1.3CC: fnadge, matt, mkudlej
Target Milestone: 1.3.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: condor-7.4.5-0.2 Doc Type: Bug Fix
Doc Text:
Due to the addition of subgroups to the accounting group feature, the logic in the accountant and getGroupInfoFromUserId() was out of sync with requirements for properly parsing and indexing arbitrary subgroups. This update consolidates Parsing logic for accounting groups into the accountant and the new HFS feature allowing arbitrary subgroups. getGroupInfoFromUserId() is also updated to leverage the consolidated logic. Now, arbitrary HFS groups and subgroups are correctly parsed and maintained.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-15 12:16:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
quotahash patch none

Description Jon Thomas 2010-10-19 16:44:43 UTC
Created attachment 454392 [details]
quotahash patch

There are two parts to this:

1) Use of groupQuotasHash was somehow removed from the code
2) getGroupInfoFromUserId doesn't parse subgroups correctly.

The hash saves the group's maxAllowed number of slots and it's retrieved later and attached (with group usage) to the match classAd. As a side effect, the is_group flag is set which alters the error message from 

LastRejMatchReason = "fair share exceeded"

to

LastRejMatchReason = "group quota exceeded"

repro is:

NUM_CPUS = 20

GROUP_NAMES = a, b
GROUP_QUOTA_DYNAMIC_a = 0.5
GROUP_QUOTA_DYNAMIC_b = 0.5

executable = /bin/sleep
arguments = 6000
universe = vanilla
transfer_executable = true
should_transfer_files = YES
when_to_transfer_output = ON_EXIT
+AccountingGroup = "a.aaa"
queue 20

doesn't work->

negotiatorLog, ScheddLog, and history will show  "fair share exceeded"

works->

negotiatorLog, ScheddLog, and history will show "group quota exceeded"


attaching a patch that fixes this

Comment 1 Erik Erlandson 2010-11-19 21:26:47 UTC
Incorporated Jon's fix here:
V7_4-BZ619557-HFS-tree-structure

Comment 3 Erik Erlandson 2010-12-21 19:29:53 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
Bug was introduced by the addition of subgroups to accounting group feature.

Consequence:
The logic in the accountant and getGroupInfoFromUserId() was out of sync with requirements for properly parsing and indexing arbitrary subgroups.

Fix:
Parsing logic for accounting groups was consolidated into the accountant, and updated for the new HFS feature allowing arbitrary subgroups.  getGroupInfoFromUserId() was updated to leverage the consolidated logic.

Result:
Arbitrary HFS groups and subgroups are now correctly parsed and maintained.

Comment 4 Martin Kudlej 2011-01-14 16:14:53 UTC
Tested on RHEL5.6/4.9 x x86_64/i386 with condor-7.4.4-0.17 and there was "fair share exceeded" in NegotiatorLog. Tested on RHEL5.6/4.9 x x86_64/i386 with condor-7.4.5-0.6 and there is "group quota exceeded" in NegotiatorLog and in in "condor_q -l". -->VERIFIED

Comment 5 Florian Nadge 2011-02-09 14:00:46 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,11 +1 @@
-Cause:
+Due to the addition of subgroups to the accounting group feature, the logic in the accountant and getGroupInfoFromUserId() was out of sync with requirements for properly parsing and indexing arbitrary subgroups. This update consolidates Parsing logic for accounting groups into the accountant and the new HFS feature allowing arbitrary subgroups. getGroupInfoFromUserId() is also updated to leverage the consolidated logic. Now, arbitrary HFS groups and subgroups are correctly parsed and maintained.-Bug was introduced by the addition of subgroups to accounting group feature.
-
-Consequence:
-The logic in the accountant and getGroupInfoFromUserId() was out of sync with requirements for properly parsing and indexing arbitrary subgroups.
-
-Fix:
-Parsing logic for accounting groups was consolidated into the accountant, and updated for the new HFS feature allowing arbitrary subgroups.  getGroupInfoFromUserId() was updated to leverage the consolidated logic.
-
-Result:
-Arbitrary HFS groups and subgroups are now correctly parsed and maintained.

Comment 6 errata-xmlrpc 2011-02-15 12:16:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0217.html