Bug 785799

Summary: Importing manifest failed with force selected.
Product: [Retired] Subscription Asset Manager Reporter: Eric Sammons <esammons>
Component: candlepinAssignee: Tom McKay <tomckay>
Status: CLOSED CURRENTRELEASE QA Contact: SAM QE List <sam-qe-list>
Severity: high Docs Contact:
Priority: urgent    
Version: 1.0.0CC: tomckay
Target Milestone: rc   
Target Release: 1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Red Hat Enterprise Linux Server release 6.2 (Santiago) katello-headpin-all-0.1.129-2.el6.noarch candlepin-0.5.14-1.el6.noarch
Last Closed: 2012-04-27 00:21:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 703617    

Description Eric Sammons 2012-01-30 16:30:53 UTC
Description of problem:
Organization already has a manifest loaded; when attempting to overwrite the currently installed manifest with a new, using [x]force, an error is returned suggesting the sysadmin use force to overwrite the existing manifest.

'''
Subscription manifest upload for provider 'Red Hat' failed.
Reason: Owner has already imported from another distributor
If you are uploading an older manifest, you can use the Force checkbox to overwrite existing data.
'''

Steps to Reproduce: (assuming a manifest is already installed)
1. Login to SAM
2. Navigate to Content Management
3. Browse for manifest
4. Check []force
5. and upload new manifest
  
Actual results:
Subscription manifest upload for provider 'Red Hat' failed.
Reason: Owner has already imported from another distributor
If you are uploading an older manifest, you can use the Force checkbox to overwrite existing data.


Expected results:
New manifest should be installed overwriting the existing.

Comment 1 Eric Sammons 2012-02-01 14:21:09 UTC
To clarify, this bug seems to surface in the following reproducer:

1. Load manifest.zip into org1
2. Navigate to org2.
3. Load manifest.zip into org2
4. Receive error to use force
5. Check Force
6. Attempt to load manifest.zip in to org2 again
7. Receive same error

In automation it seems that I am able to load the same manifest in to multiple orgs, that is interesting behavior but more than that this error should not tell the sysadmin to use force, but rather should error out with something along the lines of manifest.zip has already been loaded in to another org, please try a new manifest.

Comment 2 Tom McKay 2012-02-06 15:47:41 UTC
commit 730dada6515918d8667c4c57d580659059b44e7d
Author: Tom McKay <thomasmckay>
Date:   Mon Feb 6 10:45:10 2012 -0500

    785799 - show error message suggesting use of force upload not shown when force upload is already set


To test:

1. Upload manifest w/o force checkbox
   -> should see success notice
2. Upload an older manifest from different distributor w/o force checkbox
   -> should see error notice suggesting use of force
3. Upload older manifest again w/ force checkbox on
   -> should see error notice but without suggestion of using force