Bug 655994 - Inconsistent Error Message Trying to add a service that already exists
Summary: Inconsistent Error Message Trying to add a service that already exists
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-admintools
Version: 2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-22 20:07 UTC by Jenny Severance
Modified: 2015-01-04 23:44 UTC (History)
3 users (show)

Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-27 07:17:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Jenny Severance 2010-11-22 20:07:12 UTC
Description of problem:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hbacsvc-cli-001: Negative - Add HBAC Service that already exists
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa hbacsvc-add sshd
:: [   LOG    ] :: "ipa hbacsvc-add sshd" failed as expected.
:: [   LOG    ] :: ERROR: Message not as expected. GOT: ipa: ERROR: This entry already exists  EXP: ipa: ERROR: HBAC service with name sshd already exists
:: [   FAIL   ] :: Verify expected error message for empty Rule Type (Expected 0, got 1)
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 0 good, 1 bad
:: [   FAIL   ] :: RESULT: ipa-hbacsvc-cli-001: Negative - Add HBAC Service that already exists


Attempting to add duplicate objects normally return a better error message like "ipa: ERROR: HBAC rule with name test already exists"

Version-Release number of selected component (if applicable):
ipa-server-1.91-0.2010110118git813dfe5.fc12.i686
ipa-admintools-1.91-0.2010110118git813dfe5.fc12.i686

How reproducible:
always

Steps to Reproduce:
1. ipa hbacsvc-add sshd
2.
3.
  
Actual results:
ipa: ERROR: This entry already exists

Expected results:
ipa: ERROR: HBAC service with name sshd already exists

Additional info:

Comment 1 Rob Crittenden 2010-11-22 20:25:00 UTC
I'm not sure what is inconsistent about this. Unexpected, maybe, but inconsistent with what?

Comment 2 Dmitri Pal 2010-11-23 04:14:09 UTC
https://fedorahosted.org/freeipa/ticket/530

Comment 3 Rob Crittenden 2010-11-30 20:16:19 UTC
commit: 9120155daeeee8287115a09f280f0e4f075f96df

Comment 4 Jenny Severance 2011-06-10 17:23:32 UTC
verified

# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Wed 20 Apr 2011 09:57:13 AM EDT
Install Date: Thu 19 May 2011 12:47:52 PM EDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.0-23.el6.src.rpm
Size        : 2565882                          License: GPLv3+
Signature   : RSA/8, Thu 21 Apr 2011 03:48:25 PM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hbacsvc-cli-001: Negative - Add HBAC Service that already exists
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:05:48] ::  Executing: ipa hbacsvc-add sshd
ipa: ERROR: hbacsvc with name "sshd" already exists
:: [16:05:50] ::  "ipa hbacsvc-add sshd" failed as expected.
:: [16:05:51] ::  Error message as expected: ipa: ERROR: hbacsvc with name sshd already exists
:: [   PASS   ] :: Verify expected error message for empty Rule Type
'9d0eeaa6-da29-4bf6-a98b-c22fb578cb9f'
ipa-hbacsvc-cli-001 result: PASS
   metric: 0
   Log: /tmp/beakerlib-1459149/journal.txt
    Info: Searching AVC errors produced since 1300824348.38 (Tue Mar 22 16:05:48 2011)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.3tBDFf
:
   AvcLog: /mnt/testarea/tmp.3tBDFf


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