Bug 644436 - getGroupInfoFromUserId incorrect for subgroups
Summary: getGroupInfoFromUserId incorrect for subgroups
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor
Version: 1.3
Hardware: All
OS: Linux
low
medium
Target Milestone: 1.3.2
: ---
Assignee: Erik Erlandson
QA Contact: Martin Kudlej
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-19 16:44 UTC by Jon Thomas
Modified: 2011-02-15 12:16 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-02-15 12:16:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
quotahash patch (2.32 KB, patch)
2010-10-19 16:44 UTC, Jon Thomas
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0217 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging and Grid bug fix and enhancement update 2011-02-15 12:10:15 UTC

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


Note You need to log in before you can comment on or make changes to this bug.