Bug 870446
| Summary: | multi operations with attribute manipulation not returning error | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Jenny Severance <jgalipea> |
| Component: | ipa | Assignee: | Rob Crittenden <rcritten> |
| Status: | CLOSED ERRATA | QA Contact: | Namita Soman <nsoman> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.4 | CC: | dpal, mkosek |
| Target Milestone: | rc | ||
| Target Release: | 6.4 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ipa-3.0.0-7.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-21 09:29:31 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jenny Severance
2012-10-26 14:15:39 UTC
Test failure :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipa-group-multiop-005 group-mod --delattr + --addattr null op for gidnumber :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ FAIL ] :: Testing a multi-value manipulation for gidnumber (Expected 1, got 0) :: [ PASS ] :: Making sure gidnumber still exists as 1537800028 in gmodtest :: [ LOG ] :: Duration: 4s :: [ LOG ] :: Assertions: 1 good, 1 bad :: [ FAIL ] :: RESULT: ipa-group-multiop-005 group-mod --delattr + --addattr null op for gidnumber You don't include what error you are expecting. I assume it is No modifications to perform? <snip>
Expected results:
according to help ..
--addattr=STR Add an attribute/value pair. Format is attr=value. The
attribute must be part of the schema.
--delattr=STR Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
delattr should be evaluated last and would have at least expected
# ipa group-mod --delattr gidnumber=523800179 test
ipa: ERROR: 'gid' is required
and return code of 1
</snip>
(In reply to comment #5) This one is reported under CORRECT BEHAVIOR above. The expected results don't match the reported failure. The reported failure is the one where addattr and delattr operate on the same value in the same request. It is under incorrect behavior INCORRECT BEHAVIOR # ipa group-mod --addattr gidnumber=12345678 --delattr gidnumber=12345678 test --------------------- Modified group "test" --------------------- Group name: test Description: test GID: 523800179 # echo $? 0 This used to have return code of 1 which is what I expected. Back to my original question: what error message are you expecting? I check the behavior, for the reported command. Setting both "--addattr gidnumber=12345678 --delattr gidnumber=12345678" is actually allowed even for a single valued attribute, as this operation practically translates to NOOP. But in that case, we should return "no modifications to be performed" error if no other attribute was modified. This *is* a regression: # ipa group-add foogroup Description: foo ---------------------- Added group "foogroup" ---------------------- Group name: foogroup Description: foo GID: 371800003 OK: # ipa group-mod foogroup --delattr=gidnumber=371800000 ipa: ERROR: gidnumber does not contain '371800000' OK: # ipa group-mod foogroup --delattr=gidnumber=371800003 ipa: ERROR: 'gid' is required OK: # ipa group-mod foogroup --addattr=gidnumber=371800000 ipa: ERROR: gidnumber: Only one value allowed. ERROR: # ipa group-mod foogroup --addattr=gidnumber=371800000 --delattr=gidnumber=371800000 ------------------------- Modified group "foogroup" ------------------------- Group name: foogroup Description: foo GID: 371800003 "no modifications to be performed" should have been risen. I will open an upstream ticket. Upstream ticket: https://fedorahosted.org/freeipa/ticket/3220 After discussion with Rob, moving back to RHEL-6. The severeness of this bug may have been underestimated. It affects all updates of integer type, like GID. "no modifications to be performed" will never be shown there. It affects both --*attr family of commands and standard options: # ipa group-mod labusers --gid 94800186 ------------------------- Modified group "labusers" ------------------------- Group name: labusers Description: Lab Users GID: 94800186 Member users: jdoe # ipa group-mod labusers --gid 94800186 ------------------------- Modified group "labusers" ------------------------- Group name: labusers Description: Lab Users GID: 94800186 Member users: jdoe Fixed upstream: master: https://fedorahosted.org/freeipa/changeset/d180d3c10145d4f2ad2d4dfd5243f9f1eb1083b3 ipa-3-0: https://fedorahosted.org/freeipa/changeset/1f1918f97147a9c63b4e8110aa404acc6f7d0324 verified :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipa-group-multiop-005 group-mod --delattr + --addattr null op for gidnumber - bug 870446 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ipa: ERROR: no modifications to be performed :: [ PASS ] :: Testing a multi-value manipulation for gidnumber gidnumber: 771400028 :: [ PASS ] :: Making sure gidnumber still exists as 771400028 in gmodtest '20a67c4c-2eb7-42e9-8bf5-2da0b87538db' ipa-group-multiop-005-group-mod-delattr-addattr-null-op-for-gidnumber-bug-870446 result: PASS metric: 0 Log: /tmp/beakerlib-9818447/journal.txt Info: Searching AVC errors produced since 1355931165.14 (Wed Dec 19 10:32:45 2012) Searching logs... Info: No AVC messages found. Writing to /mnt/testarea/tmp.wW779Q : AvcLog: /mnt/testarea/tmp.wW779Q version :: ipa-server-3.0.0-12.el6 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0528.html |