Bug 1221122

Summary: Hammer content-view remove version doesnt remove anything (but reports it did)
Product: Red Hat Satellite Reporter: Ade Bradshaw <abradshaw>
Component: HammerAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: abradshaw, bbuckingham, cfouant, daobrien
Target Milestone: UnspecifiedKeywords: ReleaseNotes
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-01 18:37:26 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: 1190823    

Description Ade Bradshaw 2015-05-13 10:35:51 UTC
Description of problem:
Hammer content-view remove version, erm doesnt!


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

How reproducible:
100%


Steps to Reproduce:
1. Create a number of versions of a content view
2. for i in 29 28 27 26 25 24 23 22 21 21; do hammer content-view remove-version --organization myorg --name SOE --content-view-version "$i"; done
(it reports each one as removed)
3. Check the UI - they are still there
4. Run the same command as step 2 again, it again reports they have been removed


Actual results:
Content view versions remain after informing you they were removed

Expected results:
The version of the content view to be gone


Additional info:

[root@sat61 ~]# for i in 29 28 27 26 25 24 23 22 21 21; do hammer content-view remove-version --organization myorg --name SOE --content-view-version "$i"; done
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed

[root@sat61beta ~]# for i in 29 28 27 26 25 24 23 22 21 21; do hammer content-view remove-version --organization myorg --name SOE --content-view-version "$i"; done
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed
The component version has been removed

# rpm -qa | grep hammer
rubygem-hammer_cli-0.1.4.10-1.el7sat.noarch
rubygem-hammer_cli_import-0.10.6.5-1.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.11-1.el7sat.noarch
rubygem-hammer_cli_katello-0.0.7.10-1.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el7sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.9-1.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch
rubygem-hammer_cli_gutterball-0.0.1.2-1.el7sat.noarch

Comment 1 RHEL Program Management 2015-05-13 10:43:00 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Brad Buckingham 2015-05-19 12:47:16 UTC
Note: the content view version removal is an asynchronous task; therefore, the following text should be changed:
   "The component version has been removed"

to something like:
   "The component version has been schedule for removal"

In addition, it would be useful to provide the user with the task ID, so that they may monitor it's completion.

Comment 4 David O'Brien 2015-06-16 03:46:38 UTC
(In reply to Brad Buckingham from comment #3)
> Note: the content view version removal is an asynchronous task; therefore,
> the following text should be changed:
>    "The component version has been removed"
> 
> to something like:
>    "The component version has been schedule for removal"
> 
> In addition, it would be useful to provide the user with the task ID, so
> that they may monitor it's completion.

Does this mean the CV versions *do* get removed, but not straight away?

I need to know exactly what happens before I create a rel  note. If the text is misleading I can say that, but if the CV version never gets removed, I need to say that as well.

thanks

Comment 6 Brad Buckingham 2015-08-06 15:45:14 UTC
David, apologies for the delay. :(  What is stated in the notes is accurate.  The version will be deleted, once the asynchronous task completes.

Comment 7 Christine Fouant 2016-04-01 18:37:26 UTC
Since the other bug has 3 ACKs and blocker flag, I'm closing this (earlier) bug rather than the other one.

*** This bug has been marked as a duplicate of bug 1320146 ***