----- Original Message -----
From: "Jay Shaughnessy" <jshaughn(a)redhat.com>
To: rhq-devel(a)lists.fedorahosted.org
Sent: Monday, March 5, 2012 8:26:57 AM
Subject: Re: Confusing AS4 Plugin Functionality
+1 to total removal. The one-off feature doesn't make sense, and if
used will likely break or generate unexpected results.
Although, I'm not sure I support refactoring of the AS4,5 and Tomcat
code unless there is a driving need, and not just for the sake of
refactoring.
This is one of the line items left from the recent content shake-up. It's not a full
refactoring but more of a code consolidation. All three server plugins have almost
identical code that deals with content deployments and SHA calculations. Prior to my
recent fixes, all three plugins had almost identical bugs in this area. Consolidating all
this code in a common place is the next logical step to eliminate future problem.
Moreover, if we move away from updating the manifest to storing SHA in the agent data
folder, then it would be beneficial to have to update only one class.
Also, I'm not sure the revert feature is needed at the content
level.
And as an aside, Bundle provisioning already supports revert.
On 3/2/2012 5:25 PM, Stefan Negrea wrote:
> Hello Everybody,
>
> I am still working on content system BZs and came across something
> interesting and unique to JBoss AS4 plugin. I had a lengthy talk
> with Ian and the conclusion was that it will require a little bit
> of rework.
>
>
> The AS4 plugin has a concept of backup/restore for applications.
> The backup is done when creating a new application but only when
> the newly created application is to be deployed on top of an
> existing application. The original application is kept in a
> folder/file with .bak appended to its name. There is an option in
> the deploy wizard regarding backup creation, the default value is
> no. Every application has an operation called "revert". This works
> only if the .bak file is present on the disk. If the user calls
> revert that operation is non-reversible, only one single revert is
> possible.
>
> Now there are a couple of problems with this:
> 1) Content redeployments using the content tab do not create the
> .bak file. The revert works only in the narrow case described
> above.2
> 2) Unless the user knows exactly what the backup setting does, it
> will probably go unnoticed (and no backup is done).
> 2) Lets suppose the .bak was created. And lets suppose a user
> redeploys content (through the content system) a couple of times
> and then calls revert. The app will be reverted to the content
> prior to creating the new app. So the revert operation is very
> misleading. It's not reverting to previous content but to content
> prior to resource creation.
> 3) It is not very clear to users when the revert operation is
> available.
> 4) This functionality can only be found in the AS4 plugin. No other
> plugin has a similar concept implemented.
> 5) If the application is large, there is no way to delete the .bak
> file from RHQ. The only workaround is to manually delete the file
> afterwards.
>
>
> My proposal:
> 1) Remove this functionality completely. The revert concept should
> be implemented at content system level.
> 2) Remove the revert operation from web applications.
> 2) Prevent deployments of applications on top of existing
> applications. If an app is already deployed on disk at the same
> location then fail the operation to create a new resource. This
> will eliminate the need to have a .bak file on disk.
>
> Here are some reasons to support my proposal:
> 1) AS4 plugin functionality will be aligned with Tomcat and AS5.
> 2) No more confusing revert operations and use cases.
> 3) Simpler and easier to maintain plugin code.
> 4) Make a clear design choice that this functionality should be
> implemented at content system level.
> 5) The code that does the actual deployments will be nearly
> identical between AS4, AS5 and Tomcat and can be refactored to a
> common location.
>
>
> Does my proposal make sense? Is there anything I am missing with
> regards to this confusing functionality? Is there anybody actually
> using .bak files and revert?
>
>
> Thank you,
> Stefan Negrea
>
> Software Engineer
> _______________________________________________
> rhq-devel mailing list
> rhq-devel(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/rhq-devel
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-devel