Bug 768243

Summary: Error msg needs to be improved when manifest import failed with "409 conflict: import is older than existing data"
Product: [Retired] Katello Reporter: Sachin Ghai <sghai>
Component: Webservice APIAssignee: Petr Chalupa <pchalupa>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.XCC: gkhachik, inecas, pchalupa, tsanders
Target Milestone: ---Keywords: Triaged
Target Release: 1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 13:09:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sachin Ghai 2011-12-16 06:17:32 UTC
Description of problem:
I was trying to import two different manifests in two different org's and got following errors:

katello> provider import_manifest --org ACME_Corporation --name "Red Hat" --file /root/stageSamTestSimple20Nov2011.zip
Manifest imported                     
katello> 

First import succeeded and on second import got: 

katello> provider import_manifest --name "Red Hat" --org sghai_org --file /root/stageManifest06October2011.zip
Importing manifest, please wait... Manifest import for provider [ Red Hat ] failed, Candlepin::Owner: 409 Conflict {"displayMessage":"Import is older than existing data"} (POST /candlepin/owners/sghai_org/imports)

then I tried --force option and it was imported successfully:

[root@dhcp201-123 ~]# katello -u admin -p admin provider import_manifest --org sghai_org --name "Red Hat" --file /root/stageSamTestSimple20Nov2011.zip --force
Manifest imported  


Version-Release number of selected component (if applicable):
[root@dhcp201-195 ~]# rpm -qa | grep katello
katello-glue-candlepin-0.1.143-2.el6.noarch
katello-cli-common-0.1.25-2.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-certs-tools-1.0.1-2.el6.noarch
katello-glue-pulp-0.1.143-2.el6.noarch
katello-all-0.1.143-2.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-configure-0.1.37-2.el6.noarch
katello-common-0.1.143-2.el6.noarch
katello-0.1.143-2.el6.noarch
katello-cli-0.1.25-2.el6.noarch
katello-glue-foreman-0.1.143-2.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch


How reproducible:
always

Steps to Reproduce:
1. Import Nov's simple manifest in org1 
2. Then try to import Oct's manifest in org2 and without --force
3.
  
Actual results:
importing manifest, please wait... Manifest import for provider [ Red Hat ] failed, Candlepin::Owner: 409 Conflict {"displayMessage":"Import is older than existing data"} (POST /candlepin/owners/sghai_org/imports

Expected results:
I think if user tries to import different manifests in different org's then no error should be raised. 

or User should get a proper *warning* message like: Import is older then existing data, please try with --force option to import manifest.

Additional info:

Comment 1 Petr Chalupa 2012-04-10 15:30:09 UTC
fixed in fafe972c37431370f99157c94f9af710774292f6

Comment 2 Bryan Kearney 2012-07-17 13:09:52 UTC
Moving all community bugs with fixes to closed.