Bug 645412 - Request ability to revert deployments back all the way
Summary: Request ability to revert deployments back all the way
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Provisioning
Version: 3.0.0
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Mike Foley
URL:
Whiteboard:
: 647815 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-21 13:27 UTC by dsteigne
Modified: 2018-10-27 17:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-02 07:24:55 UTC
Embargoed:


Attachments (Terms of Use)

Description dsteigne 2010-10-21 13:27:13 UTC
Description of problem:
Currently, if there are versions 1.0,2.0,3.0 of the bundle. 1.0 being the first version. In this case the maximum version we can roll-back to is 1.0

Would like the ability to rollback to version before 1.0 ie version before first version of the bundle 1.0 is deployed.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Mazzitelli 2010-10-21 13:35:36 UTC
perhaps this could easily be implemented by adding a new method to BundleFacet:

BundleFacet.purge(BundlePurgeRequest request)

where this purges everything in the destination directory. This should also purge the hidden .rhqdeployments content - this API should remove everything RHQ related as well as the content it previously copied down.

Comment 2 John Mazzitelli 2010-12-23 18:03:42 UTC
(In reply to comment #1)
> perhaps this could easily be implemented by adding a new method to BundleFacet:
> 
> BundleFacet.purge(BundlePurgeRequest request)
> 
> where this purges everything in the destination directory. This should also
> purge the hidden .rhqdeployments content - this API should remove everything
> RHQ related as well as the content it previously copied down.

also have to worry about backed up files. its possible the current live deployment had collisions that it backed up - we'll need to revert those backed up files to get back to the original state prior to the first deployment. and that's an ant bundle specific thing. but we need to know which bundle type we are reverting to know which plugin to talk to

Comment 3 John Mazzitelli 2011-01-24 20:39:39 UTC
More commits are pushed. This is how the feature currently works and what I think is still needed:

First, this new feature is called "purge" because removes all files the last deployment laid down. If its an ant recipe (which is the more common of the two types of bundles), this means we delete all external raw files as well as the full deployment directory (and all its subdirectories).

This is not technically a full-rollback - because it is possible some other files existed in the original deploy dir and were backed up. However, if that is the case and you want to retain those original files, you can still do a step-by-step revert back from the live deployment back to version 1 and then you can purge. But you rarely will actually need to do this (as opposed to doing just a purge) because normally a deployment really just created a new deployment directory and put everything in there (i.e. there were no original files that got backed up that need to be restored after the purge).

If the deployment did not ask to manage the deploy dir (e.g. if deploying a EAR or WAR to JBossAS's /deploy directory, we don't fully manage /deploy) then we need to make sure we don't fully purge the deploy dir. This is not currently what happens, I need to write code so purge doesn't blow away the entire deploy dir - it needs to only delete files/subdirs that the deployment laid down.

Comment 4 John Mazzitelli 2011-01-25 13:51:04 UTC
Pushed more code that checks to see if the deploy dir is fully managed - if it is, we purge the deploy dir fully. If not, we just remove files we put in the deploy dir - if we put subdirs in the deploy dir, we purge them completely.

Comment 5 John Mazzitelli 2011-01-26 15:55:02 UTC
this is to be considered done now.

if you want to remove a bundle completely, you use the purge feature now.

Comment 6 John Mazzitelli 2011-03-24 14:10:14 UTC
*** Bug 647815 has been marked as a duplicate of this bug. ***

Comment 7 Sunil Kondkar 2011-06-24 10:19:35 UTC
Verified on build#158 (Version: 4.1.0-SNAPSHOT Build Number: c1539ab)

The purge feature removed all the contents in the deployment directory. It displays a message in UI as 'You successfully purged the bundle destination [testdest] from all of the remote machines.'

Marking as verified.

Comment 8 Heiko W. Rupp 2013-09-02 07:24:55 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.


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