You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Imesh Gunaratne <im...@apache.org> on 2015/02/22 05:40:09 UTC

[Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Hi Devs,

Currently we create a replication controller for each member in Kubernetes.
As a result if the pod stop responding the replication controller will
remove the existing pod and create a new one. Then the new pod will get a
new pod id.

Once this happens Stratos will not be able to manage this pod because we
have no information about this process. Therefore I think we may need to do
$subject and directly create pods.

Thanks


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Posted by Imesh Gunaratne <im...@apache.org>.
I have now pushed this fix to master branch and merged to
master-deployment-policy-fix-merge branch. A new tag has been created to
track Kubernetes fix: 4.1.0-beta-kubernetes-v4

Thanks

On Fri, Feb 27, 2015 at 7:34 AM, Imesh Gunaratne <im...@apache.org> wrote:

> I found the cause of the problem and fixed it!
>
> - Host ports should be unique for a host. Which means the same host port
> cannot be defined in multiple pods. This is the cause of the above issue.
> - Host ports are not mandatory to expose ports of pods to the external
> network, rather services should be used.
> - Service should contain public ip addresses of minions.
> - Service should be created before creating the pod.
>
> Now multiple pods can be created for the same service. I have updated the
> Kubernetes live test with this. Will push the changes to remote repo soon.
>
> Thanks
>
> On Thu, Feb 26, 2015 at 6:08 PM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> It looks like this is the same issue which we discussed in "[Discuss]
>> Kubernetes constraint violation for host port":
>> https://github.com/GoogleCloudPlatform/kubernetes/issues/1751
>>
>> On Thu, Feb 26, 2015 at 4:30 PM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> I'm seeing a problem here, the second pod does not get a host ip
>>> allocated. Not sure whether it was caused by this modification, I'm now
>>> investigating it.
>>>
>>> Thanks
>>>
>>> On Sun, Feb 22, 2015 at 2:00 PM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> Hi Devs,
>>>>
>>>> I have now completed this modification and pushed to master branch. I
>>>> verified this with single-cartridge and tomcat sample applications.
>>>>
>>>> Now we only create Kubernetes Services and Pods. For each port mapping
>>>> there will be a Kubernetes service created. For each member there will be a
>>>> pod created.
>>>>
>>>> Thanks
>>>>
>>>> On Sun, Feb 22, 2015 at 10:39 AM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> Thanks for the feedback Lakmal. I will make this change.
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Sun, Feb 22, 2015 at 10:15 AM, Lakmal Warusawithana <
>>>>> lakmal@wso2.com> wrote:
>>>>>
>>>>>> Yes, I think we should create pods directly until we can have call
>>>>>> back methods for get pod information from Kubernetes.
>>>>>>
>>>>>> On Sun, Feb 22, 2015 at 10:10 AM, Imesh Gunaratne <im...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Devs,
>>>>>>>
>>>>>>> Currently we create a replication controller for each member in
>>>>>>> Kubernetes. As a result if the pod stop responding the replication
>>>>>>> controller will remove the existing pod and create a new one. Then the new
>>>>>>> pod will get a new pod id.
>>>>>>>
>>>>>>> Once this happens Stratos will not be able to manage this pod
>>>>>>> because we have no information about this process. Therefore I think we may
>>>>>>> need to do $subject and directly create pods.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Imesh Gunaratne
>>>>>>>
>>>>>>> Technical Lead, WSO2
>>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Lakmal Warusawithana
>>>>>> Vice President, Apache Stratos
>>>>>> Director - Cloud Architecture; WSO2 Inc.
>>>>>> Mobile : +94714289692
>>>>>> Blog : http://lakmalsview.blogspot.com/
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Posted by Imesh Gunaratne <im...@apache.org>.
I found the cause of the problem and fixed it!

- Host ports should be unique for a host. Which means the same host port
cannot be defined in multiple pods. This is the cause of the above issue.
- Host ports are not mandatory to expose ports of pods to the external
network, rather services should be used.
- Service should contain public ip addresses of minions.
- Service should be created before creating the pod.

Now multiple pods can be created for the same service. I have updated the
Kubernetes live test with this. Will push the changes to remote repo soon.

Thanks

On Thu, Feb 26, 2015 at 6:08 PM, Imesh Gunaratne <im...@apache.org> wrote:

> It looks like this is the same issue which we discussed in "[Discuss]
> Kubernetes constraint violation for host port":
> https://github.com/GoogleCloudPlatform/kubernetes/issues/1751
>
> On Thu, Feb 26, 2015 at 4:30 PM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi Devs,
>>
>> I'm seeing a problem here, the second pod does not get a host ip
>> allocated. Not sure whether it was caused by this modification, I'm now
>> investigating it.
>>
>> Thanks
>>
>> On Sun, Feb 22, 2015 at 2:00 PM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> I have now completed this modification and pushed to master branch. I
>>> verified this with single-cartridge and tomcat sample applications.
>>>
>>> Now we only create Kubernetes Services and Pods. For each port mapping
>>> there will be a Kubernetes service created. For each member there will be a
>>> pod created.
>>>
>>> Thanks
>>>
>>> On Sun, Feb 22, 2015 at 10:39 AM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> Thanks for the feedback Lakmal. I will make this change.
>>>>
>>>> Thanks
>>>>
>>>> On Sun, Feb 22, 2015 at 10:15 AM, Lakmal Warusawithana <lakmal@wso2.com
>>>> > wrote:
>>>>
>>>>> Yes, I think we should create pods directly until we can have call
>>>>> back methods for get pod information from Kubernetes.
>>>>>
>>>>> On Sun, Feb 22, 2015 at 10:10 AM, Imesh Gunaratne <im...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Hi Devs,
>>>>>>
>>>>>> Currently we create a replication controller for each member in
>>>>>> Kubernetes. As a result if the pod stop responding the replication
>>>>>> controller will remove the existing pod and create a new one. Then the new
>>>>>> pod will get a new pod id.
>>>>>>
>>>>>> Once this happens Stratos will not be able to manage this pod because
>>>>>> we have no information about this process. Therefore I think we may need to
>>>>>> do $subject and directly create pods.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Imesh Gunaratne
>>>>>>
>>>>>> Technical Lead, WSO2
>>>>>> Committer & PMC Member, Apache Stratos
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Lakmal Warusawithana
>>>>> Vice President, Apache Stratos
>>>>> Director - Cloud Architecture; WSO2 Inc.
>>>>> Mobile : +94714289692
>>>>> Blog : http://lakmalsview.blogspot.com/
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Posted by Imesh Gunaratne <im...@apache.org>.
It looks like this is the same issue which we discussed in "[Discuss]
Kubernetes constraint violation for host port":
https://github.com/GoogleCloudPlatform/kubernetes/issues/1751

On Thu, Feb 26, 2015 at 4:30 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Devs,
>
> I'm seeing a problem here, the second pod does not get a host ip
> allocated. Not sure whether it was caused by this modification, I'm now
> investigating it.
>
> Thanks
>
> On Sun, Feb 22, 2015 at 2:00 PM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi Devs,
>>
>> I have now completed this modification and pushed to master branch. I
>> verified this with single-cartridge and tomcat sample applications.
>>
>> Now we only create Kubernetes Services and Pods. For each port mapping
>> there will be a Kubernetes service created. For each member there will be a
>> pod created.
>>
>> Thanks
>>
>> On Sun, Feb 22, 2015 at 10:39 AM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Thanks for the feedback Lakmal. I will make this change.
>>>
>>> Thanks
>>>
>>> On Sun, Feb 22, 2015 at 10:15 AM, Lakmal Warusawithana <la...@wso2.com>
>>> wrote:
>>>
>>>> Yes, I think we should create pods directly until we can have call back
>>>> methods for get pod information from Kubernetes.
>>>>
>>>> On Sun, Feb 22, 2015 at 10:10 AM, Imesh Gunaratne <im...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Devs,
>>>>>
>>>>> Currently we create a replication controller for each member in
>>>>> Kubernetes. As a result if the pod stop responding the replication
>>>>> controller will remove the existing pod and create a new one. Then the new
>>>>> pod will get a new pod id.
>>>>>
>>>>> Once this happens Stratos will not be able to manage this pod because
>>>>> we have no information about this process. Therefore I think we may need to
>>>>> do $subject and directly create pods.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Lakmal Warusawithana
>>>> Vice President, Apache Stratos
>>>> Director - Cloud Architecture; WSO2 Inc.
>>>> Mobile : +94714289692
>>>> Blog : http://lakmalsview.blogspot.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Devs,

I'm seeing a problem here, the second pod does not get a host ip allocated.
Not sure whether it was caused by this modification, I'm now investigating
it.

Thanks

On Sun, Feb 22, 2015 at 2:00 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Devs,
>
> I have now completed this modification and pushed to master branch. I
> verified this with single-cartridge and tomcat sample applications.
>
> Now we only create Kubernetes Services and Pods. For each port mapping
> there will be a Kubernetes service created. For each member there will be a
> pod created.
>
> Thanks
>
> On Sun, Feb 22, 2015 at 10:39 AM, Imesh Gunaratne <im...@apache.org>
> wrote:
>
>> Thanks for the feedback Lakmal. I will make this change.
>>
>> Thanks
>>
>> On Sun, Feb 22, 2015 at 10:15 AM, Lakmal Warusawithana <la...@wso2.com>
>> wrote:
>>
>>> Yes, I think we should create pods directly until we can have call back
>>> methods for get pod information from Kubernetes.
>>>
>>> On Sun, Feb 22, 2015 at 10:10 AM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> Hi Devs,
>>>>
>>>> Currently we create a replication controller for each member in
>>>> Kubernetes. As a result if the pod stop responding the replication
>>>> controller will remove the existing pod and create a new one. Then the new
>>>> pod will get a new pod id.
>>>>
>>>> Once this happens Stratos will not be able to manage this pod because
>>>> we have no information about this process. Therefore I think we may need to
>>>> do $subject and directly create pods.
>>>>
>>>> Thanks
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>
>>>
>>>
>>> --
>>> Lakmal Warusawithana
>>> Vice President, Apache Stratos
>>> Director - Cloud Architecture; WSO2 Inc.
>>> Mobile : +94714289692
>>> Blog : http://lakmalsview.blogspot.com/
>>>
>>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Devs,

I have now completed this modification and pushed to master branch. I
verified this with single-cartridge and tomcat sample applications.

Now we only create Kubernetes Services and Pods. For each port mapping
there will be a Kubernetes service created. For each member there will be a
pod created.

Thanks

On Sun, Feb 22, 2015 at 10:39 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Thanks for the feedback Lakmal. I will make this change.
>
> Thanks
>
> On Sun, Feb 22, 2015 at 10:15 AM, Lakmal Warusawithana <la...@wso2.com>
> wrote:
>
>> Yes, I think we should create pods directly until we can have call back
>> methods for get pod information from Kubernetes.
>>
>> On Sun, Feb 22, 2015 at 10:10 AM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> Currently we create a replication controller for each member in
>>> Kubernetes. As a result if the pod stop responding the replication
>>> controller will remove the existing pod and create a new one. Then the new
>>> pod will get a new pod id.
>>>
>>> Once this happens Stratos will not be able to manage this pod because we
>>> have no information about this process. Therefore I think we may need to do
>>> $subject and directly create pods.
>>>
>>> Thanks
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Lakmal Warusawithana
>> Vice President, Apache Stratos
>> Director - Cloud Architecture; WSO2 Inc.
>> Mobile : +94714289692
>> Blog : http://lakmalsview.blogspot.com/
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Posted by Imesh Gunaratne <im...@apache.org>.
Thanks for the feedback Lakmal. I will make this change.

Thanks

On Sun, Feb 22, 2015 at 10:15 AM, Lakmal Warusawithana <la...@wso2.com>
wrote:

> Yes, I think we should create pods directly until we can have call back
> methods for get pod information from Kubernetes.
>
> On Sun, Feb 22, 2015 at 10:10 AM, Imesh Gunaratne <im...@apache.org>
> wrote:
>
>> Hi Devs,
>>
>> Currently we create a replication controller for each member in
>> Kubernetes. As a result if the pod stop responding the replication
>> controller will remove the existing pod and create a new one. Then the new
>> pod will get a new pod id.
>>
>> Once this happens Stratos will not be able to manage this pod because we
>> have no information about this process. Therefore I think we may need to do
>> $subject and directly create pods.
>>
>> Thanks
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Lakmal Warusawithana
> Vice President, Apache Stratos
> Director - Cloud Architecture; WSO2 Inc.
> Mobile : +94714289692
> Blog : http://lakmalsview.blogspot.com/
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] [Kubernetes] Might need to avoid using Replication Controllers

Posted by Lakmal Warusawithana <la...@wso2.com>.
Yes, I think we should create pods directly until we can have call back
methods for get pod information from Kubernetes.

On Sun, Feb 22, 2015 at 10:10 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Devs,
>
> Currently we create a replication controller for each member in
> Kubernetes. As a result if the pod stop responding the replication
> controller will remove the existing pod and create a new one. Then the new
> pod will get a new pod id.
>
> Once this happens Stratos will not be able to manage this pod because we
> have no information about this process. Therefore I think we may need to do
> $subject and directly create pods.
>
> Thanks
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Lakmal Warusawithana
Vice President, Apache Stratos
Director - Cloud Architecture; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/