Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 623246

Summary: Runtime error displays while removing subscription from server
Product: [Community] Candlepin (Migrated to Jira) Reporter: spandey
Component: candlepinAssignee: William Poteat <wpoteat>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: low    
Version: 0.5CC: kbanerje, spandey, wpoteat
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Solaris   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 13:04:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
snip of catlina.out none

Description spandey 2010-08-11 17:17:11 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
100%

Prerequisites
candlepin : on-premises

Steps to repro :
Login to on-premises host 
execute following command to delete “MKT-prads-awesome-s390x-os”
/usr/bin/curl -u admin:admin -k --header 'Content-type: application/json' --header 'Accept: application/json' --request DELETE https://localhost:8443/candlepin/subscriptions/9


Expected Result : 
Above command should remove MKT-prads-awesome-s390x-os” subscription pool from server 

Actual Result : 
[root@localhost ~]# /usr/bin/curl -u admin:admin -k --header 'Content-type: application/json' --header 'Accept: application/json' --request DELETE https://localhost:8443/candlepin/subscriptions/9

{"displayMessage":"Runtime Error org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,569"}[root@localhost ~]#

Comment 1 wes hayutin 2010-08-11 17:58:32 UTC
Sachin, always include a snip from the tomcat log please

Comment 2 wes hayutin 2010-08-11 18:45:36 UTC
This is the correct api to hit s/subscriptions/entitlements


[root@localhost proxy]# /usr/bin/curl -u admin:admin -k --header 'Content-type: application/json' --header 'Accept: application/json' --request DELETE https://localhost:8443/candlepin/entitlements/6
[root@localhost proxy]#

Comment 3 spandey 2010-08-11 18:54:14 UTC
Created attachment 438263 [details]
snip of catlina.out

Comment 4 wes hayutin 2010-08-11 19:15:40 UTC
my fault, My understanding was that Sachin was testing a different scenario here.
reopening

Comment 5 William Poteat 2011-08-17 18:29:05 UTC
No issues with delete of subscription.

Closing bug.

Comment 6 spandey 2011-08-18 08:06:34 UTC
Verified using 

following commands 

list subscription 
curl -k -u admin:admin https://localhost:8443/candlepin/subscriptions

curl -k -u admin:admin -X delete https://10.65.193.123:8443/candlepin/subscriptions/ff80808131db7d6f0131db7e1cca0071

subscription successfully deleted .

Comment 7 Bryan Kearney 2012-07-17 13:04:50 UTC
Marking all community bugs modified or beyong as closed.