Bug 1275204

Summary: Content View Destroy task fails in finalize instead of plan when still in use
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: Content ManagementAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.2CC: bbuckingham, cwelton, peter.vreman
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-10 12:36:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    
Attachments:
Description Flags
failing task none

Description Peter Vreman 2015-10-26 09:19:58 UTC
Created attachment 1086428 [details]
failing task

Description of problem:
When a Content View is still in use it shall fail in the Plan phase instead of the Finalize phase so the task will not get into paused and keep the locks.


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


How reproducible:


Steps to Reproduce:
1. Create a ContentView
2. Assign ContentView to a ContentHost
3. Delete ContentView

Actual results:
ContentView Delete Tasks gets into state=paused and keeps the locks

Expected results:
ContentView Delete Tasks fails with state=stopped  and result=error

Additional info:

Comment 2 Brad Buckingham 2015-10-29 22:07:33 UTC
Hi Peter,

I attempted to reproduce the scenario above and I am observing the desired behavior.  I am wondering if perhaps there is something different between our scenarios.  Is it possible that the association was to a 'host' and not a 'content host'?

release installed: Satellite 6.1.3

Performed the following (all from the UI):

1. create a content view, add a repository, publish the content view
2. associate the content view with an existing content host
3. attempt to delete the content view (i.e. 'Remove View' button)

Behavior observed:

Error indicating:
Cannot delete 'zoo view' due to associated environments: Library. Cannot delete 'zoo view' due to associated systems: sat613capsule.test.

The task failed during the 'plan' phase with the following high-level details:

Label: Actions::Katello::ContentView::Destroy
Name: Delete
Owner: admin
Started at: 2015-10-29 21:28:17 UTC
Ended at: 2015-10-29 21:28:17 UTC
State: stopped
Result: error

Comment 3 Peter Vreman 2015-11-10 12:36:28 UTC
I detected this in our instance that still had 6.1.2 as can also be seen from the trace that has katello-2.2.0.67 in the path

Confirmed this is fixed in 6.1.3.