You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Isuru Haththotuwa <is...@apache.org> on 2015/11/27 02:04:55 UTC

Cleaning up User Artifacts at Signup Removal

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?

-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*

Re: Cleaning up User Artifacts at Signup Removal

Posted by Chamila De Alwis <ch...@wso2.com>.
On Fri, Nov 27, 2015 at 12:08 PM, Gayan Gunarathne <ga...@wso2.com> wrote:

> First Tenant 1 is signup and we are making a backup for this signup. Then
> super tenant signup. Then again we have a back up for this as well.Then
> tenant 1 is going to remove his signup. Then what is the backup we are
> going to restore? For me it is difficult to maintain for this for each
> tenant.


I agree. That would not be maintainable. We can check if the signup is of
the supertenant in the AgentGitHandler.py's clone() method, and do the same
on the restore action too.


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Cleaning up User Artifacts at Signup Removal

Posted by Gayan Gunarathne <ga...@wso2.com>.
On Fri, Nov 27, 2015 at 11:35 AM, Isuru Haththotuwa <is...@apache.org>
wrote:

> Hi,
>
> On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <ga...@wso2.com>
> wrote:
>
>> Hi,
>>
>> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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.
>

 Let 's think about this flow,

First Tenant 1 is signup and we are making a backup for this signup. Then
super tenant signup. Then again we have a back up for this as well.Then
tenant 1 is going to remove his signup. Then what is the backup we are
going to restore? For me it is difficult to maintain for this for each
tenant.

If we consider this only for the super tenant only we need to back up only
when the super tenant sign up. We only need to restore the backup only the
case of signup removal of the super tenant.


>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gayang@wso2.com  | mobile : +94 775030545
>>
>> --
>> <%2B94%20766819985>
>> <%2B94%20766819985>
>> Thanks and Regards,
>>
>> Isuru H.
>> <%2B94%20766819985>
>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 

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

Re: Cleaning up User Artifacts at Signup Removal

Posted by Chamila De Alwis <ch...@wso2.com>.
On Thu, Dec 10, 2015 at 11:06 AM, Isuru Haththotuwa <is...@apache.org>
wrote:

> If there are new features with API changes, IMO can go for a major release
> from master branch after 4.1.5 is done, with all bug fixes + new features.
>

+1

It would be confusing if we maintain two branches to release from. After a
certain point IMO we should decide if we are going for the next minor
release or continue with another patch release.


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi,

On Thu, Dec 10, 2015 at 10:57 AM, Akila Ravihansa Perera <ravihansa@wso2.com
> wrote:

> Hi Isuru,
>
> The problem is master branch will have not only bug fixes but also new
> features and backward incompatible API changes which should not go to a
> patch release.
>
If there are new features with API changes, IMO can go for a major release
from master branch after 4.1.5 is done, with all bug fixes + new features.

>
> Thanks.
>
>
> On Thursday, 10 December 2015, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>> +1, will cherry pick the commits to master.
>>
>> On Thu, Dec 10, 2015 at 9:37 AM, Akila Ravihansa Perera <
>> ravihansa@wso2.com> wrote:
>>
>>>
>>>
>>> On Wed, Dec 9, 2015 at 10:58 PM, Rajkumar Rajaratnam <rajkumarr@wso2.com
>>> > wrote:
>>>
>>>> Hi Isuru,
>>>>
>>>> We have rebased stratos-4.1.x branch into master branch. We should
>>>> continue the development in master branch from now onwards.
>>>>
>>> IMHO if everything is merged to master, we should do the next releases
>> from master branch itself.
>>
>>>
>>> +1
>>>
>>> We should continue our dev work on master branch and do the 4.1.x
>>> releases from stratos-4.1.x branch by cherry-picking bug fixes/critical
>>> improvements.
>>>
>>> I think it's best if noone commits to stratos-4.1.x branch except for
>>> the release manager.
>>>
>>>
>>>
>>>
>>>> Thanks,
>>>> Raj.
>>>>
>>>> On Wed, Dec 9, 2015 at 10:39 PM, Isuru Haththotuwa <is...@apache.org>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Wed, Dec 9, 2015 at 10:38 PM, Isuru Haththotuwa <is...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> This is not committed to stratos-4.1.x branch.
>>>>>>
>>>>> Correction:  This is now committed to stratos-4.1.x branch.
>>>>>
>>>>>>
>>>>>> On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <is...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> 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.
>>>>>>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> Gayan Gunarathne
>>>>>>>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>>> Thanks and Regards,
>>>>>>>>>>>
>>>>>>>>>>> Isuru H.
>>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> * <http://wso2.com/>*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Akila Ravihansa Perera
>>>>>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>>>>>
>>>>>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>>> Thanks and Regards,
>>>>>>>>>
>>>>>>>>> Isuru H.
>>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>*
>>>>>>>>> <http://wso2.com/>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> * <http://wso2.com/>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thanks and Regards,
>>>>>>>
>>>>>>> Isuru H.
>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks and Regards,
>>>>>>
>>>>>> Isuru H.
>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks and Regards,
>>>>>
>>>>> Isuru H.
>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Rajkumar Rajaratnam
>>>> Committer & PMC Member, Apache Stratos
>>>> Software Engineer, WSO2
>>>>
>>>> Mobile : +94777568639
>>>> Blog : rajkumarr.com
>>>>
>>>
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
> --
> Akila Ravihansa Perera
> WSO2 Inc.;  http://wso2.com/
>
> Blog: http://ravihansa3000.blogspot.com
>
> --
> <http://ravihansa3000.blogspot.com>
> <http://ravihansa3000.blogspot.com>
> Thanks and Regards,
>
> Isuru H.
> <http://ravihansa3000.blogspot.com>
> +94 716 358 048 <http://ravihansa3000.blogspot.com>* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Cleaning up User Artifacts at Signup Removal

Posted by Gayan Gunarathne <ga...@wso2.com>.
On Thu, Dec 10, 2015 at 10:57 AM, Akila Ravihansa Perera <ravihansa@wso2.com
> wrote:

> Hi Isuru,
>
> The problem is master branch will have not only bug fixes but also new
> features and backward incompatible API changes which should not go to a
> patch release.
>

When we develop new feature and fix the bug, we can push them into the
master branch. If that new feature or bug fix related to the patch release,
we can only cherry pick those changes to the 4.1.x branch.

>
> Thanks.
>
>
> On Thursday, 10 December 2015, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>> +1, will cherry pick the commits to master.
>>
>> On Thu, Dec 10, 2015 at 9:37 AM, Akila Ravihansa Perera <
>> ravihansa@wso2.com> wrote:
>>
>>>
>>>
>>> On Wed, Dec 9, 2015 at 10:58 PM, Rajkumar Rajaratnam <rajkumarr@wso2.com
>>> > wrote:
>>>
>>>> Hi Isuru,
>>>>
>>>> We have rebased stratos-4.1.x branch into master branch. We should
>>>> continue the development in master branch from now onwards.
>>>>
>>> IMHO if everything is merged to master, we should do the next releases
>> from master branch itself.
>>
>>>
>>> +1
>>>
>>> We should continue our dev work on master branch and do the 4.1.x
>>> releases from stratos-4.1.x branch by cherry-picking bug fixes/critical
>>> improvements.
>>>
>>> I think it's best if noone commits to stratos-4.1.x branch except for
>>> the release manager.
>>>
>>>
>>>
>>>
>>>> Thanks,
>>>> Raj.
>>>>
>>>> On Wed, Dec 9, 2015 at 10:39 PM, Isuru Haththotuwa <is...@apache.org>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Wed, Dec 9, 2015 at 10:38 PM, Isuru Haththotuwa <is...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> This is not committed to stratos-4.1.x branch.
>>>>>>
>>>>> Correction:  This is now committed to stratos-4.1.x branch.
>>>>>
>>>>>>
>>>>>> On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <is...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> 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.
>>>>>>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> Gayan Gunarathne
>>>>>>>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>>> Thanks and Regards,
>>>>>>>>>>>
>>>>>>>>>>> Isuru H.
>>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> * <http://wso2.com/>*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Akila Ravihansa Perera
>>>>>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>>>>>
>>>>>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>>> Thanks and Regards,
>>>>>>>>>
>>>>>>>>> Isuru H.
>>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>*
>>>>>>>>> <http://wso2.com/>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> * <http://wso2.com/>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thanks and Regards,
>>>>>>>
>>>>>>> Isuru H.
>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks and Regards,
>>>>>>
>>>>>> Isuru H.
>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks and Regards,
>>>>>
>>>>> Isuru H.
>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Rajkumar Rajaratnam
>>>> Committer & PMC Member, Apache Stratos
>>>> Software Engineer, WSO2
>>>>
>>>> Mobile : +94777568639
>>>> Blog : rajkumarr.com
>>>>
>>>
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
> --
> Akila Ravihansa Perera
> WSO2 Inc.;  http://wso2.com/
>
> Blog: http://ravihansa3000.blogspot.com
>
>


-- 

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

Re: Cleaning up User Artifacts at Signup Removal

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
Hi Isuru,

The problem is master branch will have not only bug fixes but also new
features and backward incompatible API changes which should not go to a
patch release.

Thanks.

On Thursday, 10 December 2015, Isuru Haththotuwa <is...@apache.org> wrote:

> +1, will cherry pick the commits to master.
>
> On Thu, Dec 10, 2015 at 9:37 AM, Akila Ravihansa Perera <
> ravihansa@wso2.com <javascript:_e(%7B%7D,'cvml','ravihansa@wso2.com');>>
> wrote:
>
>>
>>
>> On Wed, Dec 9, 2015 at 10:58 PM, Rajkumar Rajaratnam <ra...@wso2.com>
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> We have rebased stratos-4.1.x branch into master branch. We should
>>> continue the development in master branch from now onwards.
>>>
>> IMHO if everything is merged to master, we should do the next releases
> from master branch itself.
>
>>
>> +1
>>
>> We should continue our dev work on master branch and do the 4.1.x
>> releases from stratos-4.1.x branch by cherry-picking bug fixes/critical
>> improvements.
>>
>> I think it's best if noone commits to stratos-4.1.x branch except for the
>> release manager.
>>
>>
>>
>>
>>> Thanks,
>>> Raj.
>>>
>>> On Wed, Dec 9, 2015 at 10:39 PM, Isuru Haththotuwa <is...@apache.org>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Wed, Dec 9, 2015 at 10:38 PM, Isuru Haththotuwa <is...@apache.org>
>>>> wrote:
>>>>
>>>>> This is not committed to stratos-4.1.x branch.
>>>>>
>>>> Correction:  This is now committed to stratos-4.1.x branch.
>>>>
>>>>>
>>>>> On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <is...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> 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.
>>>>>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> Gayan Gunarathne
>>>>>>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>> Thanks and Regards,
>>>>>>>>>>
>>>>>>>>>> Isuru H.
>>>>>>>>>> <%2B94%20766819985>
>>>>>>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> * <http://wso2.com/>*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Akila Ravihansa Perera
>>>>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>>>>
>>>>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>>>>
>>>>>>>> --
>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>> Thanks and Regards,
>>>>>>>>
>>>>>>>> Isuru H.
>>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>*
>>>>>>>> <http://wso2.com/>*
>>>>>>>>
>>>>>>>>
>>>>>>>> * <http://wso2.com/>*
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks and Regards,
>>>>>>
>>>>>> Isuru H.
>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks and Regards,
>>>>>
>>>>> Isuru H.
>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Rajkumar Rajaratnam
>>> Committer & PMC Member, Apache Stratos
>>> Software Engineer, WSO2
>>>
>>> Mobile : +94777568639
>>> Blog : rajkumarr.com
>>>
>>
>>
>>
>> --
>> Akila Ravihansa Perera
>> WSO2 Inc.;  http://wso2.com/
>>
>> Blog: http://ravihansa3000.blogspot.com
>>
>>
>> --
>> Akila Ravihansa Perera
>> WSO2 Inc.;  http://wso2.com/
>>
>> Blog: http://ravihansa3000.blogspot.com
>>
>>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>

-- 
Akila Ravihansa Perera
WSO2 Inc.;  http://wso2.com/

Blog: http://ravihansa3000.blogspot.com

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
+1, will cherry pick the commits to master.

On Thu, Dec 10, 2015 at 9:37 AM, Akila Ravihansa Perera <ra...@wso2.com>
wrote:

>
>
> On Wed, Dec 9, 2015 at 10:58 PM, Rajkumar Rajaratnam <ra...@wso2.com>
> wrote:
>
>> Hi Isuru,
>>
>> We have rebased stratos-4.1.x branch into master branch. We should
>> continue the development in master branch from now onwards.
>>
> IMHO if everything is merged to master, we should do the next releases
from master branch itself.

>
> +1
>
> We should continue our dev work on master branch and do the 4.1.x releases
> from stratos-4.1.x branch by cherry-picking bug fixes/critical improvements.
>
> I think it's best if noone commits to stratos-4.1.x branch except for the
> release manager.
>
>
>
>
>> Thanks,
>> Raj.
>>
>> On Wed, Dec 9, 2015 at 10:39 PM, Isuru Haththotuwa <is...@apache.org>
>> wrote:
>>
>>>
>>>
>>> On Wed, Dec 9, 2015 at 10:38 PM, Isuru Haththotuwa <is...@apache.org>
>>> wrote:
>>>
>>>> This is not committed to stratos-4.1.x branch.
>>>>
>>> Correction:  This is now committed to stratos-4.1.x branch.
>>>
>>>>
>>>> On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <is...@apache.org>
>>>> wrote:
>>>>
>>>>> 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 <is...@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.
>>>>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Gayan Gunarathne
>>>>>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> <%2B94%20766819985>
>>>>>>>>> <%2B94%20766819985>
>>>>>>>>> Thanks and Regards,
>>>>>>>>>
>>>>>>>>> Isuru H.
>>>>>>>>> <%2B94%20766819985>
>>>>>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> * <http://wso2.com/>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Akila Ravihansa Perera
>>>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>>>
>>>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>>>
>>>>>>> --
>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>> Thanks and Regards,
>>>>>>>
>>>>>>> Isuru H.
>>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>*
>>>>>>> <http://wso2.com/>*
>>>>>>>
>>>>>>>
>>>>>>> * <http://wso2.com/>*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks and Regards,
>>>>>
>>>>> Isuru H.
>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>>
>>
>>
>> --
>> Rajkumar Rajaratnam
>> Committer & PMC Member, Apache Stratos
>> Software Engineer, WSO2
>>
>> Mobile : +94777568639
>> Blog : rajkumarr.com
>>
>
>
>
> --
> Akila Ravihansa Perera
> WSO2 Inc.;  http://wso2.com/
>
> Blog: http://ravihansa3000.blogspot.com
>
>
> --
> Akila Ravihansa Perera
> WSO2 Inc.;  http://wso2.com/
>
> Blog: http://ravihansa3000.blogspot.com
>
>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*

Cleaning up User Artifacts at Signup Removal

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
On Wed, Dec 9, 2015 at 10:58 PM, Rajkumar Rajaratnam <rajkumarr@wso2.com
<javascript:_e(%7B%7D,'cvml','rajkumarr@wso2.com');>> wrote:

> Hi Isuru,
>
> We have rebased stratos-4.1.x branch into master branch. We should
> continue the development in master branch from now onwards.
>

+1

We should continue our dev work on master branch and do the 4.1.x releases
from stratos-4.1.x branch by cherry-picking bug fixes/critical improvements.

I think it's best if noone commits to stratos-4.1.x branch except for the
release manager.




> Thanks,
> Raj.
>
> On Wed, Dec 9, 2015 at 10:39 PM, Isuru Haththotuwa <isuruh@apache.org
> <javascript:_e(%7B%7D,'cvml','isuruh@apache.org');>> wrote:
>
>>
>>
>> On Wed, Dec 9, 2015 at 10:38 PM, Isuru Haththotuwa <isuruh@apache.org
>> <javascript:_e(%7B%7D,'cvml','isuruh@apache.org');>> wrote:
>>
>>> This is not committed to stratos-4.1.x branch.
>>>
>> Correction:  This is now committed to stratos-4.1.x branch.
>>
>>>
>>> On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <isuruh@apache.org
>>> <javascript:_e(%7B%7D,'cvml','isuruh@apache.org');>> wrote:
>>>
>>>> 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
>>>> <javascript:_e(%7B%7D,'cvml','isuruh@apache.org');>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Fri, Nov 27, 2015 at 11:51 AM, Akila Ravihansa Perera <
>>>>> ravihansa@wso2.com
>>>>> <javascript:_e(%7B%7D,'cvml','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 <javascript:_e(%7B%7D,'cvml','isuruh@apache.org');>
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <gayang@wso2.com
>>>>>>> <javascript:_e(%7B%7D,'cvml','gayang@wso2.com');>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <
>>>>>>>> isuruh@apache.org
>>>>>>>> <javascript:_e(%7B%7D,'cvml','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.
>>>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> Gayan Gunarathne
>>>>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>> email : gayang@wso2.com
>>>>>>>> <javascript:_e(%7B%7D,'cvml','gayang@wso2.com');>  | mobile : +94
>>>>>>>> 775030545
>>>>>>>>
>>>>>>>> --
>>>>>>>> <%2B94%20766819985>
>>>>>>>> <%2B94%20766819985>
>>>>>>>> Thanks and Regards,
>>>>>>>>
>>>>>>>> Isuru H.
>>>>>>>> <%2B94%20766819985>
>>>>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>>>>
>>>>>>>>
>>>>>>>> * <http://wso2.com/>*
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Akila Ravihansa Perera
>>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>>
>>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>>
>>>>>> --
>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>> Thanks and Regards,
>>>>>>
>>>>>> Isuru H.
>>>>>> <http://ravihansa3000.blogspot.com>
>>>>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>*
>>>>>> <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>> * <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Software Engineer, WSO2
>
> Mobile : +94777568639
> Blog : rajkumarr.com
>



-- 
Akila Ravihansa Perera
WSO2 Inc.;  http://wso2.com/

Blog: http://ravihansa3000.blogspot.com


-- 
Akila Ravihansa Perera
WSO2 Inc.;  http://wso2.com/

Blog: http://ravihansa3000.blogspot.com

Re: Cleaning up User Artifacts at Signup Removal

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi Isuru,

We have rebased stratos-4.1.x branch into master branch. We should continue
the development in master branch from now onwards.

Thanks,
Raj.

On Wed, Dec 9, 2015 at 10:39 PM, Isuru Haththotuwa <is...@apache.org>
wrote:

>
>
> On Wed, Dec 9, 2015 at 10:38 PM, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>> This is not committed to stratos-4.1.x branch.
>>
> Correction:  This is now committed to stratos-4.1.x branch.
>
>>
>> On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <is...@apache.org>
>> wrote:
>>
>>> 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 <is...@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 <ga...@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.
>>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Gayan Gunarathne
>>>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>>>>
>>>>>>> --
>>>>>>> <%2B94%20766819985>
>>>>>>> <%2B94%20766819985>
>>>>>>> Thanks and Regards,
>>>>>>>
>>>>>>> Isuru H.
>>>>>>> <%2B94%20766819985>
>>>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>>>
>>>>>>>
>>>>>>> * <http://wso2.com/>*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Akila Ravihansa Perera
>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>
>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>
>>>>> --
>>>>> <http://ravihansa3000.blogspot.com>
>>>>> <http://ravihansa3000.blogspot.com>
>>>>> Thanks and Regards,
>>>>>
>>>>> Isuru H.
>>>>> <http://ravihansa3000.blogspot.com>
>>>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>*
>>>>> <http://wso2.com/>*
>>>>>
>>>>>
>>>>> * <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>


-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2

Mobile : +94777568639
Blog : rajkumarr.com

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
On Wed, Dec 9, 2015 at 10:38 PM, Isuru Haththotuwa <is...@apache.org>
wrote:

> This is not committed to stratos-4.1.x branch.
>
Correction:  This is now committed to stratos-4.1.x branch.

>
> On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>> 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 <is...@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 <is...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <ga...@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.
>>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Gayan Gunarathne
>>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>>> Committer & PMC Member, Apache Stratos
>>>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>>>
>>>>>> --
>>>>>> <%2B94%20766819985>
>>>>>> <%2B94%20766819985>
>>>>>> Thanks and Regards,
>>>>>>
>>>>>> Isuru H.
>>>>>> <%2B94%20766819985>
>>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>> * <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> Akila Ravihansa Perera
>>>> WSO2 Inc.;  http://wso2.com/
>>>>
>>>> Blog: http://ravihansa3000.blogspot.com
>>>>
>>>> --
>>>> <http://ravihansa3000.blogspot.com>
>>>> <http://ravihansa3000.blogspot.com>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> <http://ravihansa3000.blogspot.com>
>>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>*
>>>> <http://wso2.com/>*
>>>>
>>>>
>>>> * <http://wso2.com/>*
>>>>
>>>>
>>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
This is not committed to stratos-4.1.x branch.

On Tue, Dec 1, 2015 at 7:34 PM, Isuru Haththotuwa <is...@apache.org> wrote:

> 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 <is...@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 <is...@apache.org>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <ga...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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.
>>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Gayan Gunarathne
>>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>>> Committer & PMC Member, Apache Stratos
>>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>>
>>>>> --
>>>>> <%2B94%20766819985>
>>>>> <%2B94%20766819985>
>>>>> Thanks and Regards,
>>>>>
>>>>> Isuru H.
>>>>> <%2B94%20766819985>
>>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>>
>>>>>
>>>>> * <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>> --
>>> <http://ravihansa3000.blogspot.com>
>>> <http://ravihansa3000.blogspot.com>
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> <http://ravihansa3000.blogspot.com>
>>> +94 716 358 048 <http://ravihansa3000.blogspot.com>* <http://wso2.com/>*
>>>
>>>
>>> * <http://wso2.com/>*
>>>
>>>
>>>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
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 <is...@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 <is...@apache.org>
>> wrote:
>>
>>> Hi,
>>>
>>> On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <ga...@wso2.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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.
>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Gayan Gunarathne
>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>> Committer & PMC Member, Apache Stratos
>>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>>
>>>> --
>>>> <%2B94%20766819985>
>>>> <%2B94%20766819985>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> <%2B94%20766819985>
>>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>>
>>>>
>>>> * <http://wso2.com/>*
>>>>
>>>>
>>>>
>>
>>
>> --
>> Akila Ravihansa Perera
>> WSO2 Inc.;  http://wso2.com/
>>
>> Blog: http://ravihansa3000.blogspot.com
>>
>> --
>> <http://ravihansa3000.blogspot.com>
>> <http://ravihansa3000.blogspot.com>
>> Thanks and Regards,
>>
>> Isuru H.
>> <http://ravihansa3000.blogspot.com>
>> +94 716 358 048 <http://ravihansa3000.blogspot.com>* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
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 <is...@apache.org>
> wrote:
>
>> Hi,
>>
>> On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <ga...@wso2.com>
>> wrote:
>>
>>> Hi,
>>>
>>> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Gayan Gunarathne
>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>> Committer & PMC Member, Apache Stratos
>>> email : gayang@wso2.com  | mobile : +94 775030545
>>>
>>> --
>>> <%2B94%20766819985>
>>> <%2B94%20766819985>
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> <%2B94%20766819985>
>>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>>
>>>
>>> * <http://wso2.com/>*
>>>
>>>
>>>
>
>
> --
> Akila Ravihansa Perera
> WSO2 Inc.;  http://wso2.com/
>
> Blog: http://ravihansa3000.blogspot.com
>
> --
> <http://ravihansa3000.blogspot.com>
> <http://ravihansa3000.blogspot.com>
> Thanks and Regards,
>
> Isuru H.
> <http://ravihansa3000.blogspot.com>
> +94 716 358 048 <http://ravihansa3000.blogspot.com>* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Cleaning up User Artifacts at Signup Removal

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
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 :)

Thanks.

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

> Hi,
>
> On Fri, Nov 27, 2015 at 11:13 AM, Gayan Gunarathne <ga...@wso2.com>
> wrote:
>
>> Hi,
>>
>> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gayang@wso2.com  | mobile : +94 775030545
>>
>> --
>> <%2B94%20766819985>
>> <%2B94%20766819985>
>> Thanks and Regards,
>>
>> Isuru H.
>> <%2B94%20766819985>
>> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 
Akila Ravihansa Perera
WSO2 Inc.;  http://wso2.com/

Blog: http://ravihansa3000.blogspot.com

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi,

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

> Hi,
>
> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gayang@wso2.com  | mobile : +94 775030545
>
> --
> <%2B94%20766819985>
> <%2B94%20766819985>
> Thanks and Regards,
>
> Isuru H.
> <%2B94%20766819985>
> +94 716 358 048 <%2B94%20766819985>* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Cleaning up User Artifacts at Signup Removal

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi,

On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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.


> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>


-- 

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

Re: Cleaning up User Artifacts at Signup Removal

Posted by Chamila De Alwis <ch...@wso2.com>.
+1

We can implement this in the ADC Checkout plugin and in an event plugin for
ApplicationSignupRemoval.  Are there any concerns regarding server restarts
after resetting the tenant space?


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@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?
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>

Re: Cleaning up User Artifacts at Signup Removal

Posted by Imesh Gunaratne <im...@apache.org>.
On Sunday, November 29, 2015, Isuru Haththotuwa <is...@apache.org> wrote:

>
> IMHO we should not have to implement anything specific for carbon servers.
> If there are any artifacts initially, take a backup of those. If there are
> no artifacts, no need to take a backup. And there might be scenarios where
> the same thing can be used in non-carbon servers as well, after signup is
> removed. WDYT?
>

+1

>
>> +1 for the suggestion. I do not see any problem of taking a backup of
>> those files. It should only do once, and files may only take few kilobytes
>> of disk space.
>>
>> Thanks
>>
>> --
>> Imesh Gunaratne
>>
>> Senior Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>

-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Cleaning up User Artifacts at Signup Removal

Posted by Isuru Haththotuwa <is...@apache.org>.
Thanks for all the responses.

On Sat, Nov 28, 2015 at 11:26 PM, Imesh Gunaratne <im...@apache.org> wrote:

>
>
> On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@apache.org>
> wrote:
>>
>>
>>    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?
>>
>
> AFAIU this issue is specific for Carbon based servers/cartridges.
> Therefore it should be handled in the cartridge using an extension, this
> might be the ADC extension point. The actual problem has occurred because
> of having hot deployable configuration files inside the artifact deployment
> folder of super tenant. This may not happen for other tenants as they start
> with a blank folder for tenant artifacts.
>
IMHO we should not have to implement anything specific for carbon servers.
If there are any artifacts initially, take a backup of those. If there are
no artifacts, no need to take a backup. And there might be scenarios where
the same thing can be used in non-carbon servers as well, after signup is
removed. WDYT?

>
> +1 for the suggestion. I do not see any problem of taking a backup of
> those files. It should only do once, and files may only take few kilobytes
> of disk space.
>
> Thanks
>
> --
> Imesh Gunaratne
>
> Senior Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Cleaning up User Artifacts at Signup Removal

Posted by Imesh Gunaratne <im...@apache.org>.
On Fri, Nov 27, 2015 at 6:34 AM, Isuru Haththotuwa <is...@apache.org>
wrote:
>
>
>    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?
>

AFAIU this issue is specific for Carbon based servers/cartridges. Therefore
it should be handled in the cartridge using an extension, this might be the
ADC extension point. The actual problem has occurred because of having hot
deployable configuration files inside the artifact deployment folder of
super tenant. This may not happen for other tenants as they start with a
blank folder for tenant artifacts.

+1 for the suggestion. I do not see any problem of taking a backup of those
files. It should only do once, and files may only take few kilobytes of
disk space.

Thanks

-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos