Sent a PR [1] with the fix.

[1]. https://github.com/apache/stratos/pull/498/

On Sun, Nov 29, 2015 at 9:18 PM, Isuru Haththotuwa <isuruh@apache.org> wrote:


On Fri, Nov 27, 2015 at 11:51 AM, Akila Ravihansa Perera <ravihansa@wso2.com> wrote:
Hi Isuru,

Good thought. I'd suggest that we just rename the directory by appending "stratos.adc.bak" to existing one. When removing the signup, rename it back to the original name (remove the suffix). Let's keep things simple as possible :)
+1, maybe using a different suffix :)

Thanks.

On Fri, Nov 27, 2015 at 11:35 AM, Isuru Haththotuwa <isuruh@apache.org> wrote:
Hi,

On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <gayang@wso2.com> wrote:
Hi,

On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <isuruh@apache.org> wrote:
Hi Devs,

Currently for a multiTenant Application (multiTenant=true), when a signup is removed, all artifacts which are in the local repository path will be deleted from the file system.
But there are some cases where the runtime of the cartridge instance depends on some of the artifacts which were originally there, and without those artifacts, the cartridge instance runtime would not function properly. I suggest the following to handle this:

  1. Prior to the first clone, take a backup of the artifacts in the local repository path to a temporary location
  2. When the signup is removed, clean all the artifacts which had been cloned to the local repository path location (from the git repository which was provided when signing up), and restore the artifacts (copy them back from the backup location to local repository path)

This will ensure the state of the instance after removal of the signup is equivalent to the state before the signup was created. WDYT?


I assume this is happened for the super tenant sign ups only.Other tenants it works fine. Isn't? So we need to do consider this if is only the super tenant sign up.
We can implement this generically for all single tenant and multi tenant signup removal, without explicitly checking. IMHO that is the best way. 


--
Thanks and Regards,

Isuru H.



--

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gayang@wso2.com  | mobile : +94 775030545

--






--



--
Thanks and Regards,

Isuru H.
+94 716 358 048