On Wed, Nov 11, 2015 at 3:06 PM, Akila Ravihansa Perera <raviha...@wso2.com>
wrote:

> Hi,
>
> I've created a JIRA to track this task [1]. It seems a fix has been done
> in [2] to resolve this. But I'm not sure why we have to iterate through all
> the properties in [3]. Why not just do;
>
> partition.getProperties().getProperty(KUBERNETES_CLUSTER)
>
> +1 We can use this without iterating


> [1] https://issues.apache.org/jira/browse/STRATOS-1610
> [2]
> https://github.com/apache/stratos/commit/b9ff2b10fa743c2eebca8468c99a9ef7ac528f42
> [3]
> https://github.com/apache/stratos/blob/b9ff2b10fa743c2eebca8468c99a9ef7ac528f42/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java#L1383
>
> Thanks.
>
>
> On Tue, Nov 10, 2015 at 3:59 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Yes, it looks like the Kubernetes cluster has been removed before the
>> above instance get terminated. Currently there is no validation to avoid
>> this situation. We may need to fix this.
>>
>> Thanks
>>
>> On Mon, Nov 9, 2015 at 9:10 AM, Akila Ravihansa Perera <
>> raviha...@wso2.com> wrote:
>>
>>> Hi Pubudu,
>>>
>>> Yes, I used the undeploy script. But it shouldn't cause this error
>>> right? Stratos should handle if the artifacts are in use. Even Stratos
>>> console UI calls the API just like curl command.
>>>
>>> Thanks.
>>>
>>>
>>> On Monday, 9 November 2015, Pubudu Gunatilaka <pubu...@wso2.com> wrote:
>>>
>>>> Hi Akila,
>>>>
>>>> Were you using the undeploy.sh script for undeploying?  I came across
>>>> this error while using undeploy.sh script to undeploy application server
>>>> application. But this error is not there if we undeploy from the UI. I
>>>> think this is because script just executes the curl commands to remove all
>>>> the artifacts and it can cause these issues.
>>>>
>>>> Thank you!
>>>>
>>>> On Sun, Nov 8, 2015 at 9:26 PM, Akila Ravihansa Perera <
>>>> raviha...@wso2.com> wrote:
>>>>
>>>>> Hi Gayan,
>>>>>
>>>>> Yes, the application that I tried has a cartridge group.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> On Sun, Nov 8, 2015 at 8:46 PM, Gayan Gunarathne <gay...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Akila,
>>>>>>
>>>>>> Seems we are getting null for KubernetesClusterContext. Seems
>>>>>> kubClusterIdToKubClusterContextMap map don't contain proper values for 
>>>>>> the
>>>>>> given kubernetes ClusterId.
>>>>>> Is that happen when the application has a cartridge group?
>>>>>>
>>>>>> Thanks,
>>>>>> Gayan
>>>>>>
>>>>>>
>>>>>> On Sun, Nov 8, 2015 at 2:32 AM, Akila Ravihansa Perera <
>>>>>> raviha...@wso2.com> wrote:
>>>>>>
>>>>>>> Hi devs,
>>>>>>>
>>>>>>> I'm seeing the following error when undeploying an app on
>>>>>>> Kubernetes. Stratos is unable to delete the Kubernetes pod. Any 
>>>>>>> thoughts?
>>>>>>>
>>>>>>> [2015-11-08 02:29:18,424]  INFO
>>>>>>> {org.apache.stratos.autoscaler.client.AutoscalerCloudControllerClient} -
>>>>>>>  Terminating instance via cloud controller: [member]
>>>>>>> wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain64e12d35-4fb5-4958-9e61-5a1c9becf563
>>>>>>> [2015-11-08 02:29:18,431] ERROR
>>>>>>> {org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas} -
>>>>>>>  Could not terminate container, kubernetes cluster context not found:
>>>>>>> [partition-id] partition-1 [member-id]
>>>>>>> wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain64e12d35-4fb5-4958-9e61-5a1c9becf563
>>>>>>> [2015-11-08 02:29:18,431] ERROR
>>>>>>> {org.apache.stratos.cloud.controller.services.impl.InstanceTerminator} -
>>>>>>>  Instance termination failed! MemberContext
>>>>>>> [applicationId=wso2as-530-application, cartridgeType=wso2as-530-manager,
>>>>>>> clusterId=wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain,
>>>>>>> memberId=wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain64e12d35-4fb5-4958-9e61-5a1c9becf563,
>>>>>>> instanceId=pod-1, partition=Partition [id=partition-1, description=null,
>>>>>>> isPublic=false, provider=kubernetes, properties=Properties
>>>>>>> [properties=[Property [name=cluster, value=kubernetes-cluster-1]]]],
>>>>>>> defaultPrivateIP=10.244.44.12, defaultPublicIP=172.17.8.102,
>>>>>>> allocatedIPs=null, publicIPs=[172.17.8.102], privateIPs=[10.244.44.12],
>>>>>>> initTime=1446929374561, lbClusterId=null,
>>>>>>> networkPartitionId=network-partition-kubernetes, kubernetesPodId=pod-1,
>>>>>>> kubernetesPodName=317e8be610a28c74fdf019800429597c,
>>>>>>> loadBalancingIPType=Public,
>>>>>>> instanceMetadata=org.apache.stratos.cloud.controller.domain.InstanceMetadata@2efac273,
>>>>>>> properties=Properties [properties=[Property [name=MIN_COUNT, value=1],
>>>>>>> Property [name=SCALING_DECISION_ID,
>>>>>>> value=wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain-30f0a2e0-993b-4ebc-9307-ce3cb0be1102]]]]
>>>>>>> java.lang.IllegalArgumentException: Could not terminate container,
>>>>>>> kubernetes cluster context not found: [partition-id] partition-1
>>>>>>> [member-id]
>>>>>>> wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain64e12d35-4fb5-4958-9e61-5a1c9becf563
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.handleNullObject(KubernetesIaas.java:929)
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.terminateContainer(KubernetesIaas.java:861)
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.terminateInstance(KubernetesIaas.java:139)
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.services.impl.InstanceTerminator.run(InstanceTerminator.java:56)
>>>>>>> at
>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>>>> at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>> Exception in thread "pool-32-thread-73"
>>>>>>> org.apache.stratos.cloud.controller.exception.CloudControllerException:
>>>>>>> Instance termination failed! MemberContext
>>>>>>> [applicationId=wso2as-530-application, cartridgeType=wso2as-530-manager,
>>>>>>> clusterId=wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain,
>>>>>>> memberId=wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain64e12d35-4fb5-4958-9e61-5a1c9becf563,
>>>>>>> instanceId=pod-1, partition=Partition [id=partition-1, description=null,
>>>>>>> isPublic=false, provider=kubernetes, properties=Properties
>>>>>>> [properties=[Property [name=cluster, value=kubernetes-cluster-1]]]],
>>>>>>> defaultPrivateIP=10.244.44.12, defaultPublicIP=172.17.8.102,
>>>>>>> allocatedIPs=null, publicIPs=[172.17.8.102], privateIPs=[10.244.44.12],
>>>>>>> initTime=1446929374561, lbClusterId=null,
>>>>>>> networkPartitionId=network-partition-kubernetes, kubernetesPodId=pod-1,
>>>>>>> kubernetesPodName=317e8be610a28c74fdf019800429597c,
>>>>>>> loadBalancingIPType=Public,
>>>>>>> instanceMetadata=org.apache.stratos.cloud.controller.domain.InstanceMetadata@2efac273,
>>>>>>> properties=Properties [properties=[Property [name=MIN_COUNT, value=1],
>>>>>>> Property [name=SCALING_DECISION_ID,
>>>>>>> value=wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain-30f0a2e0-993b-4ebc-9307-ce3cb0be1102]]]]
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.services.impl.InstanceTerminator.run(InstanceTerminator.java:63)
>>>>>>> at
>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>>>> at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>> Caused by: java.lang.IllegalArgumentException: Could not terminate
>>>>>>> container, kubernetes cluster context not found: [partition-id] 
>>>>>>> partition-1
>>>>>>> [member-id]
>>>>>>> wso2as-530-application.wso2as-530-manager.wso2as-530-manager.domain64e12d35-4fb5-4958-9e61-5a1c9becf563
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.handleNullObject(KubernetesIaas.java:929)
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.terminateContainer(KubernetesIaas.java:861)
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas.terminateInstance(KubernetesIaas.java:139)
>>>>>>> at
>>>>>>> org.apache.stratos.cloud.controller.services.impl.InstanceTerminator.run(InstanceTerminator.java:56)
>>>>>>> ... 3 more
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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 : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Akila Ravihansa Perera
>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>
>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Pubudu Gunatilaka*
>>>> Committer and PMC Member - Apache Stratos
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> mobile : +94774079049 <%2B94772207163>
>>>>
>>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> WSO2 Inc.;  http://wso2.com/
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Senior Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> 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 : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>

Reply via email to