Bug 736251 - Delete provider after manifest import fails
Summary: Delete provider after manifest import fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-09-07 07:24 UTC by Ivan Necas
Modified: 2015-01-04 21:58 UTC (History)
4 users (show)

Fixed In Version: katello-0.1.96-1.git.39.b90cc5f
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 17:56:03 UTC


Attachments (Terms of Use)

Description Ivan Necas 2011-09-07 07:24:46 UTC
How reproducible:


Steps to Reproduce:
1.import manifest
2.delete provider
  
Actual results:
error: operation failed: RestClient::InternalServerError: Pulp::Repository: 500 Internal Server Error "Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 347, in DELETE
    api.delete(id=id)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 470, in delete
    repo = self._get_existing_repo(id)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 116, in _get_existing_repo
    raise PulpException("No Repo with id: %s found" % id)
PulpException: u'No Repo with id: 37067-never-enabled-content-Import_Org_12e624 found'
" (DELETE /pulp/api/repositories/37067-never-enabled-content-Import_Org_12e624/)
RestClient::InternalServerError: Pulp::Repository: 500 Internal Server Error "Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 347, in DELETE
    api.delete(id=id)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 470, in delete
    repo = self._get_existing_repo(id)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 116, in _get_existing_repo
    raise PulpException("No Repo with id: %s found" % id)
PulpException: u'No Repo with id: 37067-never-enabled-content-Import_Org_12e624 found'
" (DELETE /pulp/api/repositories/37067-never-enabled-content-Import_Org_12e624/)


Expected results:
Provider deleted successfully

Additional info:
Probably repo-id generating issue while import_manifest. Should be product_id-repo_name-org, is product_id-content_id-org.

Comment 1 Ivan Necas 2011-09-07 09:34:45 UTC
Fix for this particular problem is in commit a003471ad4f4607.

There is a bug in orchestration with CP as well:
RestClient::InternalServerError: Candlepin::Product: 500 Internal Server Error {"displayMessage":"Runtime Error Error while commiting the transaction at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (DELETE /candlepin/products/37067)
error: operation failed: RestClient::InternalServerError: Candlepin::Product: 500 Internal Server Error {"displayMessage":"Runtime Error Error while commiting the transaction at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (DELETE /candlepin/products/37067)

The problem is subscriptions for products are not deleted properly - problem with providedProducts.

Comment 2 Tomas Strachota 2011-09-13 08:09:07 UTC
I temporarily disabled the failing "provider delete" test in 4e91260a. Please switch it back on once the bug is fixed. Thanks.

Comment 4 Lukas Zapletal 2011-10-07 14:58:21 UTC
Please note there are more tests to enable after this one is fixed. Please run system tests with -d option and enable all previously disabled.

Comment 5 Tomas Strachota 2011-10-26 12:18:09 UTC
Orchestration issues fixed in

commit b90cc5f0eee06a704560c26e45be2cbac213880d
Author: Tomas Strachota <tstrachota@redhat.com>
Date:   Wed Oct 26 14:02:24 2011 +0200

    prod orch - fix for deleting subscriptions of provided products

NOTE: We can no longer delete RedHat providers directly. They can be removed only when it's organization is deleted.

Comment 9 Garik Khachikyan 2012-02-16 12:45:36 UTC
# VERIFIED

Doing org remove when it already has manifest imported - is fine now.

issue is fixed:
---
katello-0.1.238-1.git.1.99abb2d.el6.noarch
package katello-cli is not installed
pulp-0.0.264-1.el6.noarch
candlepin-0.5.17-1.el6.noarch
subscription-manager-0.99.6-1.el6.x86_64
katello-configure-0.1.64-1.git.0.219edef.el6.noarch


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