Bug 466126 - Deleting a system group (With a system as a member) from the api results in ISE
Deleting a system group (With a system as a member) from the api results in ISE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Justin Sherrill
Sayli Karmarkar
Depends On:
Blocks: 456996
  Show dependency treegraph
Reported: 2008-10-08 11:38 EDT by Justin Sherrill
Modified: 2015-03-22 21:09 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-10 15:53:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2008-10-08 11:38:40 EDT
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 18:08:32 EDT
Comment 2 Sayli Karmarkar 2009-01-22 15:36:04 EST
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. 

Comment 3 Michael Mráka 2009-08-13 09:01:37 EDT
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

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

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

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

# ./xmlrpc-client.pl test1182.test.redhat.com mmraka xxx  systemgroup.listAllGroups
Comment 4 Brandon Perkins 2009-09-10 15:53:35 EDT
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.


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