Re: [Dev] Deletion of Faulty Proxy Services Not Supported

2018-01-15 Thread Thishani Lucas
Hi Isuru and All,

I tested the scenario in the windows environment and was able to reproduce
the issue. Apart from this, I have certain concerns regarding the deletion
of services.

When deleting a proxy deployed via a capp, the file in the temporary capp
folder is deleted and the relevant axis service is undeployed. But is it a
good practice to allow deleting an artifact deployed via a capp? Even if we
allow, shouldn't we remove the entire capp?

The deleting of faulty proxy deployed via a capp is anyway not happening
because of the above mentioned substring issue.

Now we have two things to do.

   - Fix the issue with deleting of faulty services by removing the
   substring method.
   - If we're allowing deletion of services from capp, then we should
   re-write the method [1] since it has an incorrect logic to remove capp
   faulty services.

Please provide your suggestions.

[1]
https://github.com/wso2/carbon-deployment/blob/4.7.x/components/service-mgt/axis2-service-mgt/org.wso2.carbon.service.mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L777

Thanks,
Thishani


On Wed, Jan 10, 2018 at 2:27 PM, Isuru Udana  wrote:

> Hi Thishani,
>
> Shall we check on the windows environment as well. I think there are some
> issues in the logic written for windows.
> And I am not sure condition in L792 is correct. Can you please check that
> one also ?
>
> Thanks.
>
>
>
> On Wed, Jan 10, 2018 at 2:15 PM, Thishani Lucas  wrote:
>
>> Hi Vinod,
>>
>> Of course yes I can do that. But if there is no use with that substring,
>> I thought of simply removing it. But yes, for now I'll follow your
>> suggestion.
>>
>> Thanks,
>> Thishani
>>
>> On Wed, Jan 10, 2018 at 2:06 PM, Vinod Kavinda  wrote:
>>
>>> Hi Thishani,
>>> Why don't you just add the file separator (/) before appending the
>>> service name in line [1]? It won't break any requirement achieved by
>>> substring method.
>>>
>>> [1] - https://github.com/wso2/carbon-deployment/blob/4.7.x/compo
>>> nents/service-mgt/axis2-service-mgt/org.wso2.carbon.service.
>>> mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L793
>>>
>>> Regards,
>>> Vinod
>>>
>>> On Wed, Jan 10, 2018 at 1:59 PM, Thishani Lucas 
>>> wrote:
>>>
 Hi All,

 Please find the link to the relevant code below [1].

 [1] https://github.com/wso2/carbon-deployment/blob/4.7.x/com
 ponents/service-mgt/axis2-service-mgt/org.wso2.carbon.servic
 e.mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L777

 Thanks.

 On Wed, Jan 10, 2018 at 1:26 PM, Isuru Udana  wrote:

> Hi Thishani,
>
> Please discuss these type of topics in dev list. And please provide
> links to relevant sources in github as explaining the logics in words is
> not that useful to someone to understand the question.
>
> Thanks.
>
> On Wed, Jan 10, 2018 at 1:12 PM, Thishani Lucas 
> wrote:
>
>>
>>
>> On Wed, Jan 10, 2018 at 12:46 PM, Thishani Lucas 
>> wrote:
>>
>>> Hi All,
>>>
>>> It seems that the deletion of faulty proxy services being not
>>> supported is not because to disallow modifying capp.
>>>
>>> The class ServiceAdmin.java in the package
>>> org.wso2.carbon.service.mgt of carbon deployment, is having a method
>>> 'deleteFaultyServiceGroup'. In that method we're doing a substring of 
>>> the
>>> variable 'repository', which holds the path to the artifacts (eg : "
>>> */home/thishani/wso2ei-6.1.1/repository/deployment/server/*"). But
>>> the substring method is removing the ending slash. Because of this, when
>>> appending the service name that should be undeployed, the file path is
>>> derived as "
>>> */home/thishani/wso2ei-6.1.1/repository/deployment/serverFaultyProxy*".
>>> Since this file does not exist in the system, it's not getting removed 
>>> and
>>> the service is also not getting undeployed.
>>>
>>> Therefore, I'm planning to remove that substring function. But I
>>> want to make sure if there is any reason for doing that substring. Is 
>>> that
>>> needed for any other product's functionality? Other than EI? If so, 
>>> please
>>> let me know, so that I can come up with a different solution.
>>>
>>> Thanks,
>>> Thishani
>>>
>>>
>>>
>>> On Tue, Jan 9, 2018 at 6:12 PM, Thishani Lucas 
>>> wrote:
>>>
 Hi All,

 Currently, deleting faulty proxy services in the EI is not
 possible. This has been reported as an issue in [1]. This might be 
 because
 since we're allowing deployment of proxies through capp and that the
 configurations of the capp should not be modified, the deletion of 
 faulty
 proxy services is not supported. IMO, 

Re: [Dev] Deletion of Faulty Proxy Services Not Supported

2018-01-10 Thread Isuru Udana
Hi Thishani,

Shall we check on the windows environment as well. I think there are some
issues in the logic written for windows.
And I am not sure condition in L792 is correct. Can you please check that
one also ?

Thanks.



On Wed, Jan 10, 2018 at 2:15 PM, Thishani Lucas  wrote:

> Hi Vinod,
>
> Of course yes I can do that. But if there is no use with that substring, I
> thought of simply removing it. But yes, for now I'll follow your suggestion.
>
> Thanks,
> Thishani
>
> On Wed, Jan 10, 2018 at 2:06 PM, Vinod Kavinda  wrote:
>
>> Hi Thishani,
>> Why don't you just add the file separator (/) before appending the
>> service name in line [1]? It won't break any requirement achieved by
>> substring method.
>>
>> [1] - https://github.com/wso2/carbon-deployment/blob/4.7.x/compo
>> nents/service-mgt/axis2-service-mgt/org.wso2.carbon.service.
>> mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L793
>>
>> Regards,
>> Vinod
>>
>> On Wed, Jan 10, 2018 at 1:59 PM, Thishani Lucas 
>> wrote:
>>
>>> Hi All,
>>>
>>> Please find the link to the relevant code below [1].
>>>
>>> [1] https://github.com/wso2/carbon-deployment/blob/4.7.x/com
>>> ponents/service-mgt/axis2-service-mgt/org.wso2.carbon.servic
>>> e.mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L777
>>>
>>> Thanks.
>>>
>>> On Wed, Jan 10, 2018 at 1:26 PM, Isuru Udana  wrote:
>>>
 Hi Thishani,

 Please discuss these type of topics in dev list. And please provide
 links to relevant sources in github as explaining the logics in words is
 not that useful to someone to understand the question.

 Thanks.

 On Wed, Jan 10, 2018 at 1:12 PM, Thishani Lucas 
 wrote:

>
>
> On Wed, Jan 10, 2018 at 12:46 PM, Thishani Lucas 
> wrote:
>
>> Hi All,
>>
>> It seems that the deletion of faulty proxy services being not
>> supported is not because to disallow modifying capp.
>>
>> The class ServiceAdmin.java in the package
>> org.wso2.carbon.service.mgt of carbon deployment, is having a method
>> 'deleteFaultyServiceGroup'. In that method we're doing a substring of the
>> variable 'repository', which holds the path to the artifacts (eg : "
>> */home/thishani/wso2ei-6.1.1/repository/deployment/server/*"). But
>> the substring method is removing the ending slash. Because of this, when
>> appending the service name that should be undeployed, the file path is
>> derived as "
>> */home/thishani/wso2ei-6.1.1/repository/deployment/serverFaultyProxy*".
>> Since this file does not exist in the system, it's not getting removed 
>> and
>> the service is also not getting undeployed.
>>
>> Therefore, I'm planning to remove that substring function. But I want
>> to make sure if there is any reason for doing that substring. Is that
>> needed for any other product's functionality? Other than EI? If so, 
>> please
>> let me know, so that I can come up with a different solution.
>>
>> Thanks,
>> Thishani
>>
>>
>>
>> On Tue, Jan 9, 2018 at 6:12 PM, Thishani Lucas 
>> wrote:
>>
>>> Hi All,
>>>
>>> Currently, deleting faulty proxy services in the EI is not possible.
>>> This has been reported as an issue in [1]. This might be because since
>>> we're allowing deployment of proxies through capp and that the
>>> configurations of the capp should not be modified, the deletion of 
>>> faulty
>>> proxy services is not supported. IMO, we should support deletion of 
>>> faulty
>>> proxies that are not deployed via a capp.
>>>
>>> Would that cause any issues? WDYT?
>>>
>>> [1] https://wso2.org/jira/browse/ESBJAVA-4068
>>>
>>>
>>> Thanks,
>>> Thishani
>>>
>>> --
>>> Regards,
>>>
>>> *Thishani Lucas*
>>> *Software Engineer*
>>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>>> *lean.enterprise.middle-ware*
>>>
>>> *Tel: +94 77 2556931 <+94%2077%20255%206931> *
>>>
>>> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
>>> *
>>>
>>> 
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> *Thishani Lucas*
>> *Software Engineer*
>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>> *lean.enterprise.middle-ware*
>>
>> *Tel: +94 77 2556931 <+94%2077%20255%206931> *
>>
>> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
>> *
>>
>> 
>>
>
>
>
> --
> Regards,
>
> *Thishani Lucas*
> *Software Engineer*
> *WSO2 Lanka (Private) Limited**: http://wso2.com 

Re: [Dev] Deletion of Faulty Proxy Services Not Supported

2018-01-10 Thread Thishani Lucas
Hi Vinod,

Of course yes I can do that. But if there is no use with that substring, I
thought of simply removing it. But yes, for now I'll follow your suggestion.

Thanks,
Thishani

On Wed, Jan 10, 2018 at 2:06 PM, Vinod Kavinda  wrote:

> Hi Thishani,
> Why don't you just add the file separator (/) before appending the service
> name in line [1]? It won't break any requirement achieved by substring
> method.
>
> [1] - https://github.com/wso2/carbon-deployment/blob/4.7.x/
> components/service-mgt/axis2-service-mgt/org.wso2.carbon.
> service.mgt/src/main/java/org/wso2/carbon/service/mgt/
> ServiceAdmin.java#L793
>
> Regards,
> Vinod
>
> On Wed, Jan 10, 2018 at 1:59 PM, Thishani Lucas  wrote:
>
>> Hi All,
>>
>> Please find the link to the relevant code below [1].
>>
>> [1] https://github.com/wso2/carbon-deployment/blob/4.7.x/com
>> ponents/service-mgt/axis2-service-mgt/org.wso2.carbon.servic
>> e.mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L777
>>
>> Thanks.
>>
>> On Wed, Jan 10, 2018 at 1:26 PM, Isuru Udana  wrote:
>>
>>> Hi Thishani,
>>>
>>> Please discuss these type of topics in dev list. And please provide
>>> links to relevant sources in github as explaining the logics in words is
>>> not that useful to someone to understand the question.
>>>
>>> Thanks.
>>>
>>> On Wed, Jan 10, 2018 at 1:12 PM, Thishani Lucas 
>>> wrote:
>>>


 On Wed, Jan 10, 2018 at 12:46 PM, Thishani Lucas 
 wrote:

> Hi All,
>
> It seems that the deletion of faulty proxy services being not
> supported is not because to disallow modifying capp.
>
> The class ServiceAdmin.java in the package org.wso2.carbon.service.mgt
> of carbon deployment, is having a method 'deleteFaultyServiceGroup'. In
> that method we're doing a substring of the variable 'repository', which
> holds the path to the artifacts (eg : "
> */home/thishani/wso2ei-6.1.1/repository/deployment/server/*"). But
> the substring method is removing the ending slash. Because of this, when
> appending the service name that should be undeployed, the file path is
> derived as "
> */home/thishani/wso2ei-6.1.1/repository/deployment/serverFaultyProxy*".
> Since this file does not exist in the system, it's not getting removed and
> the service is also not getting undeployed.
>
> Therefore, I'm planning to remove that substring function. But I want
> to make sure if there is any reason for doing that substring. Is that
> needed for any other product's functionality? Other than EI? If so, please
> let me know, so that I can come up with a different solution.
>
> Thanks,
> Thishani
>
>
>
> On Tue, Jan 9, 2018 at 6:12 PM, Thishani Lucas 
> wrote:
>
>> Hi All,
>>
>> Currently, deleting faulty proxy services in the EI is not possible.
>> This has been reported as an issue in [1]. This might be because since
>> we're allowing deployment of proxies through capp and that the
>> configurations of the capp should not be modified, the deletion of faulty
>> proxy services is not supported. IMO, we should support deletion of 
>> faulty
>> proxies that are not deployed via a capp.
>>
>> Would that cause any issues? WDYT?
>>
>> [1] https://wso2.org/jira/browse/ESBJAVA-4068
>>
>>
>> Thanks,
>> Thishani
>>
>> --
>> Regards,
>>
>> *Thishani Lucas*
>> *Software Engineer*
>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>> *lean.enterprise.middle-ware*
>>
>> *Tel: +94 77 2556931 <+94%2077%20255%206931> *
>>
>> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
>> *
>>
>> 
>>
>
>
>
> --
> Regards,
>
> *Thishani Lucas*
> *Software Engineer*
> *WSO2 Lanka (Private) Limited**: http://wso2.com *
> *lean.enterprise.middle-ware*
>
> *Tel: +94 77 2556931 <+94%2077%20255%206931> *
>
> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
> *
>
> 
>



 --
 Regards,

 *Thishani Lucas*
 *Software Engineer*
 *WSO2 Lanka (Private) Limited**: http://wso2.com *
 *lean.enterprise.middle-ware*

 *Tel: +94 77 2556931 <077%20255%206931> *

 *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
 *

 

>>>
>>>
>>>
>>> --
>>> *Isuru Udana*
>>> Senior Technical Lead
>>> WSO2 Inc.; http://wso2.com
>>> email: isu...@wso2.com cell: +94 77 3791887 <+94%2077%20379%201887>
>>> blog: http://mytecheye.blogspot.com/
>>>
>>

Re: [Dev] Deletion of Faulty Proxy Services Not Supported

2018-01-10 Thread Vinod Kavinda
Hi Thishani,
Why don't you just add the file separator (/) before appending the service
name in line [1]? It won't break any requirement achieved by substring
method.

[1] -
https://github.com/wso2/carbon-deployment/blob/4.7.x/components/service-mgt/axis2-service-mgt/org.wso2.carbon.service.mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L793


Regards,
Vinod

On Wed, Jan 10, 2018 at 1:59 PM, Thishani Lucas  wrote:

> Hi All,
>
> Please find the link to the relevant code below [1].
>
> [1] https://github.com/wso2/carbon-deployment/blob/4.7.x/
> components/service-mgt/axis2-service-mgt/org.wso2.carbon.
> service.mgt/src/main/java/org/wso2/carbon/service/mgt/
> ServiceAdmin.java#L777
>
> Thanks.
>
> On Wed, Jan 10, 2018 at 1:26 PM, Isuru Udana  wrote:
>
>> Hi Thishani,
>>
>> Please discuss these type of topics in dev list. And please provide links
>> to relevant sources in github as explaining the logics in words is not that
>> useful to someone to understand the question.
>>
>> Thanks.
>>
>> On Wed, Jan 10, 2018 at 1:12 PM, Thishani Lucas 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jan 10, 2018 at 12:46 PM, Thishani Lucas 
>>> wrote:
>>>
 Hi All,

 It seems that the deletion of faulty proxy services being not supported
 is not because to disallow modifying capp.

 The class ServiceAdmin.java in the package org.wso2.carbon.service.mgt
 of carbon deployment, is having a method 'deleteFaultyServiceGroup'. In
 that method we're doing a substring of the variable 'repository', which
 holds the path to the artifacts (eg : "
 */home/thishani/wso2ei-6.1.1/repository/deployment/server/*"). But the
 substring method is removing the ending slash. Because of this, when
 appending the service name that should be undeployed, the file path is
 derived as "
 */home/thishani/wso2ei-6.1.1/repository/deployment/serverFaultyProxy*".
 Since this file does not exist in the system, it's not getting removed and
 the service is also not getting undeployed.

 Therefore, I'm planning to remove that substring function. But I want
 to make sure if there is any reason for doing that substring. Is that
 needed for any other product's functionality? Other than EI? If so, please
 let me know, so that I can come up with a different solution.

 Thanks,
 Thishani



 On Tue, Jan 9, 2018 at 6:12 PM, Thishani Lucas 
 wrote:

> Hi All,
>
> Currently, deleting faulty proxy services in the EI is not possible.
> This has been reported as an issue in [1]. This might be because since
> we're allowing deployment of proxies through capp and that the
> configurations of the capp should not be modified, the deletion of faulty
> proxy services is not supported. IMO, we should support deletion of faulty
> proxies that are not deployed via a capp.
>
> Would that cause any issues? WDYT?
>
> [1] https://wso2.org/jira/browse/ESBJAVA-4068
>
>
> Thanks,
> Thishani
>
> --
> Regards,
>
> *Thishani Lucas*
> *Software Engineer*
> *WSO2 Lanka (Private) Limited**: http://wso2.com *
> *lean.enterprise.middle-ware*
>
> *Tel: +94 77 2556931 <+94%2077%20255%206931> *
>
> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
> *
>
> 
>



 --
 Regards,

 *Thishani Lucas*
 *Software Engineer*
 *WSO2 Lanka (Private) Limited**: http://wso2.com *
 *lean.enterprise.middle-ware*

 *Tel: +94 77 2556931 <+94%2077%20255%206931> *

 *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
 *

 

>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>> *Thishani Lucas*
>>> *Software Engineer*
>>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>>> *lean.enterprise.middle-ware*
>>>
>>> *Tel: +94 77 2556931 <077%20255%206931> *
>>>
>>> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
>>> *
>>>
>>> 
>>>
>>
>>
>>
>> --
>> *Isuru Udana*
>> Senior Technical Lead
>> WSO2 Inc.; http://wso2.com
>> email: isu...@wso2.com cell: +94 77 3791887 <+94%2077%20379%201887>
>> blog: http://mytecheye.blogspot.com/
>>
>
>
>
> --
> Regards,
>
> *Thishani Lucas*
> *Software Engineer*
> *WSO2 Lanka (Private) Limited**: http://wso2.com *
> *lean.enterprise.middle-ware*
>
> *Tel: +94 77 2556931 <+94%2077%20255%206931> *
>
> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
> *
>
> 
>



-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . 

Re: [Dev] Deletion of Faulty Proxy Services Not Supported

2018-01-10 Thread Thishani Lucas
Hi All,

Please find the link to the relevant code below [1].

[1]
https://github.com/wso2/carbon-deployment/blob/4.7.x/components/service-mgt/axis2-service-mgt/org.wso2.carbon.service.mgt/src/main/java/org/wso2/carbon/service/mgt/ServiceAdmin.java#L777

Thanks.

On Wed, Jan 10, 2018 at 1:26 PM, Isuru Udana  wrote:

> Hi Thishani,
>
> Please discuss these type of topics in dev list. And please provide links
> to relevant sources in github as explaining the logics in words is not that
> useful to someone to understand the question.
>
> Thanks.
>
> On Wed, Jan 10, 2018 at 1:12 PM, Thishani Lucas  wrote:
>
>>
>>
>> On Wed, Jan 10, 2018 at 12:46 PM, Thishani Lucas 
>> wrote:
>>
>>> Hi All,
>>>
>>> It seems that the deletion of faulty proxy services being not supported
>>> is not because to disallow modifying capp.
>>>
>>> The class ServiceAdmin.java in the package org.wso2.carbon.service.mgt
>>> of carbon deployment, is having a method 'deleteFaultyServiceGroup'. In
>>> that method we're doing a substring of the variable 'repository', which
>>> holds the path to the artifacts (eg : "
>>> */home/thishani/wso2ei-6.1.1/repository/deployment/server/*"). But the
>>> substring method is removing the ending slash. Because of this, when
>>> appending the service name that should be undeployed, the file path is
>>> derived as "
>>> */home/thishani/wso2ei-6.1.1/repository/deployment/serverFaultyProxy*".
>>> Since this file does not exist in the system, it's not getting removed and
>>> the service is also not getting undeployed.
>>>
>>> Therefore, I'm planning to remove that substring function. But I want to
>>> make sure if there is any reason for doing that substring. Is that needed
>>> for any other product's functionality? Other than EI? If so, please let me
>>> know, so that I can come up with a different solution.
>>>
>>> Thanks,
>>> Thishani
>>>
>>>
>>>
>>> On Tue, Jan 9, 2018 at 6:12 PM, Thishani Lucas 
>>> wrote:
>>>
 Hi All,

 Currently, deleting faulty proxy services in the EI is not possible.
 This has been reported as an issue in [1]. This might be because since
 we're allowing deployment of proxies through capp and that the
 configurations of the capp should not be modified, the deletion of faulty
 proxy services is not supported. IMO, we should support deletion of faulty
 proxies that are not deployed via a capp.

 Would that cause any issues? WDYT?

 [1] https://wso2.org/jira/browse/ESBJAVA-4068


 Thanks,
 Thishani

 --
 Regards,

 *Thishani Lucas*
 *Software Engineer*
 *WSO2 Lanka (Private) Limited**: http://wso2.com *
 *lean.enterprise.middle-ware*

 *Tel: +94 77 2556931 <+94%2077%20255%206931> *

 *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
 *

 

>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>> *Thishani Lucas*
>>> *Software Engineer*
>>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>>> *lean.enterprise.middle-ware*
>>>
>>> *Tel: +94 77 2556931 <+94%2077%20255%206931> *
>>>
>>> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
>>> *
>>>
>>> 
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> *Thishani Lucas*
>> *Software Engineer*
>> *WSO2 Lanka (Private) Limited**: http://wso2.com *
>> *lean.enterprise.middle-ware*
>>
>> *Tel: +94 77 2556931 <077%20255%206931> *
>>
>> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/
>> *
>>
>> 
>>
>
>
>
> --
> *Isuru Udana*
> Senior Technical Lead
> WSO2 Inc.; http://wso2.com
> email: isu...@wso2.com cell: +94 77 3791887 <+94%2077%20379%201887>
> blog: http://mytecheye.blogspot.com/
>



-- 
Regards,

*Thishani Lucas*
*Software Engineer*
*WSO2 Lanka (Private) Limited**: http://wso2.com *
*lean.enterprise.middle-ware*

*Tel: +94 77 2556931 *

*LinkedIn: https://www.linkedin.com/in/thishani-lucas/
*


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev