Bug 466126 - Deleting a system group (With a system as a member) from the api results in ISE
Summary: Deleting a system group (With a system as a member) from the api results in ISE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Sayli Karmarkar
URL:
Whiteboard:
Depends On:
Blocks: 456996
TreeView+ depends on / blocked
 
Reported: 2008-10-08 15:38 UTC by Justin Sherrill
Modified: 2015-03-23 01:09 UTC (History)
2 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 19:53:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2008-10-08 15:38:40 UTC
Description of problem:



Steps to Reproduce:
1. Within the UI, create a system group
2. Add a system to the system group
3. From the api, try to delete the system group
  
Actual results:
xmlrpclib.ProtocolError: <ProtocolError for fjs-0-11.rhndev.redhat.com/rpc/api: 500 Internal Server Error>

Expected results:
System is removed from group and group is deleted



Additional info:
Caused by: java.sql.SQLException: ORA-02292: integrity constraint (RHNSAT.RHN_SG_GROUPS_FK) violated - child record found

	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:1986)
	at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
	at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2520)
	... 31 more

Comment 1 Justin Sherrill 2008-10-14 22:08:32 UTC
fixed
d31b03d..ea5feb9

Comment 2 Sayli Karmarkar 2009-01-22 20:36:04 UTC
Because of bz# 481216, verified using apis: server.systemgroup.addOrRemoveSystems, systemgroup.listSystems, and then removing group using systemgroup.delete

No error/exception and system group is deleted. 

~SayliK

Comment 3 Michael Mráka 2009-08-13 13:01:37 UTC
Verified in stage -> RELEASE_PENDING.

* registered client
* added into group1 in webUI

# ./xmlrpc-client.pl test1182.test.redhat.com mmraka xxx  systemgroup.listSystems group1 
0: group1
id = 1000013341
profile_name = sat-mim1-0813-122024
1: group2
OK

# ./xmlrpc-client.pl test1182.test.redhat.com mmraka xxx  systemgroup.addOrRemoveSystems group1 1000013341 false
OK

#  ./xmlrpc-client.pl test1182.test.redhat.com mmraka xxx  systemgroup.listSystems group1 
0: group1
OK

#  ./xmlrpc-client.pl test1182.test.redhat.com mmraka xxx  systemgroup.delete group1 
0: group1
OK

# ./xmlrpc-client.pl test1182.test.redhat.com mmraka xxx  systemgroup.listAllGroups
group2
OK

Comment 4 Brandon Perkins 2009-09-10 19:53:35 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/RHEA-2009-1434.html


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