Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AF1F10211 for ; Mon, 16 Feb 2015 07:56:44 +0000 (UTC) Received: (qmail 38059 invoked by uid 500); 16 Feb 2015 07:56:44 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 38006 invoked by uid 500); 16 Feb 2015 07:56:43 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 37996 invoked by uid 99); 16 Feb 2015 07:56:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2015 07:56:43 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gayang@wso2.com designates 209.85.212.179 as permitted sender) Received: from [209.85.212.179] (HELO mail-wi0-f179.google.com) (209.85.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2015 07:56:39 +0000 Received: by mail-wi0-f179.google.com with SMTP id hi2so24198130wib.0 for ; Sun, 15 Feb 2015 23:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wso2.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MF8kSoGRTgq74gD/zaFyMhYAJ7Nd/menQCUJELcfvV8=; b=ayRamg0z+N2iucPD0FZqJOqNzVtbb5gQR+9GlkxqIeEjo//N9S0cvokfJf0RsUFgCW 2rwECTXtNqo5Tc3ww93gc60LPWfRPY9C/fBvjZN47MVwSj8+i2gT7dNHYmyU1jfN2Ur3 W01RlHRTpeDviQimBvq98WmgSfQ3i4sRDP48Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MF8kSoGRTgq74gD/zaFyMhYAJ7Nd/menQCUJELcfvV8=; b=B0qCxvl8Ui9GxdW660fj0fdxP2dzv392s/cEYVUk/PqozwJaj0zpt2C9k4aKFixe0d ZTMAv4FRmNicurgCdjsuIVbQ8RLDcjTdIIiXpiXzNpsLesLOhcBPKvBuaipAVonfAo0l NMQyDfxk4rSRW4ZxmXr8qnF8aUxVBZ0k4Tv0CB/O4t9a1+Q/A8NOUC/vM/zFnppDMnD/ +IIBEaCKcpCmJjc69zCIWAf35xYtie3Xhp2WbgPpwptMOYjldcUuyqYerB8Fp7J3/dTB ngFCVQDGJ+eJqgwcONJAOQhPij1Z+vYp+updLqHx2cGQDQpSNewtse12Fhr/7q1FOCz5 NHWA== X-Gm-Message-State: ALoCoQlcUmBvntmBFJ8/zhzvEJ99V2kl6sfZn6MKCYHzd5lLo6SnK1BDV5Gz9JV0jP5IMC7xmfHB MIME-Version: 1.0 X-Received: by 10.180.126.69 with SMTP id mw5mr29555517wib.12.1424073243769; Sun, 15 Feb 2015 23:54:03 -0800 (PST) Received: by 10.194.77.240 with HTTP; Sun, 15 Feb 2015 23:54:03 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Feb 2015 13:24:03 +0530 Message-ID: Subject: Re: [Discuss] Deployment policy needs to be validated From: Gayan Gunarathne To: "dev@stratos.apache.org" Cc: Imesh Gunaratne Content-Type: multipart/alternative; boundary=e89a8f839f1bd44d9f050f2fe3f0 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f839f1bd44d9f050f2fe3f0 Content-Type: text/plain; charset=UTF-8 Yeah.Good point Raj. It is better to have that validation too. Thanks, Gayan On Mon, Feb 16, 2015 at 1:19 PM, Rajkumar Rajaratnam wrote: > To be more clear, > > I am not telling we need to validate "network partitions" while deploying > deployment policy. I am telling we should validate whether all the network > partitions given in the deployment policy are already *deployed/added or > not*. This validation is different from network partitions validation. > > Thanks. > > On Mon, Feb 16, 2015 at 1:01 PM, Rajkumar Rajaratnam > wrote: > >> Hi Gayan, >> >> Please find my comments inline. >> >> On Mon, Feb 16, 2015 at 12:41 PM, Gayan Gunarathne >> wrote: >> >>> Hi Raj, >>> >>> I think we don't need to validate the network partition stuff with the >>> deployment policy.It should validate through network partition management >>> API. >>> >> >> The validation I am talking is different from the validation you are >> referring. While deploying deployment policy, we need to validate whether >> the network partitions given in the deployment policy is already deployed >> or not. Otherwise, one can refer a dummy network partition id in the >> deployment policy. >> >> >>> >>> Deployment policy has only the reference to the network >>> partitions.Network partition management is done through separate REST API >>> methods. >>> >>> Yeah currently network partition management API reside in AS. IMO we can >>> move that network partition management to the CC as well. >>> >> >> I also feel CC is the best place to have network partition management >> APIs. Lets hear others' opinion as well. >> >> Thanks. >> >>> >>> Thanks, >>> Gayan >>> >>> On Mon, Feb 16, 2015 at 12:18 PM, Rajkumar Rajaratnam < >>> rajkumarr@wso2.com> wrote: >>> >>>> Hi Devs, >>>> >>>> I guess $Subject is not done at the moment. I am in the process of >>>> adding the validation. This is the sample deployment policy. >>>> >>>> { >>>> "id": "deployment-policy-2", >>>> "networkPartition": [ >>>> { >>>> "id": "network-partition-1", >>>> "partitionAlgo": "one-after-another", >>>> "partitions": [ >>>> { >>>> "id": "partition-1", >>>> "max": 5 >>>> } >>>> ] >>>> } >>>> ] >>>> } >>>> >>>> AFAIU, we need to validate two things. >>>> >>>> - whether all network partitions are already deployed >>>> - whether all partitions are defined in relevant network partitions >>>> >>>> Are there any other stuffs to be validated? >>>> >>>> Further, deployment policy management APIs are at CC side. Network >>>> partitions management APIs are at AS side. >>>> >>>> I am not sure about this. Do we have a convention that we shouldn't >>>> call AS service from CC? >>>> Thanks. >>>> >>>> -- >>>> Rajkumar Rajaratnam >>>> Committer & PMC Member, Apache Stratos >>>> Software Engineer, WSO2 >>>> >>>> Mobile : +94777568639 >>>> Blog : rajkumarr.com >>>> >>> >>> >>> >>> -- >>> >>> Gayan Gunarathne >>> Technical Lead >>> WSO2 Inc. (http://wso2.com) >>> email : gayang@wso2.com | mobile : +94 766819985 >>> >>> >> >> >> >> -- >> Rajkumar Rajaratnam >> Committer & PMC Member, Apache Stratos >> Software Engineer, WSO2 >> >> Mobile : +94777568639 >> Blog : rajkumarr.com >> > > > > -- > Rajkumar Rajaratnam > Committer & PMC Member, Apache Stratos > Software Engineer, WSO2 > > Mobile : +94777568639 > Blog : rajkumarr.com > -- Gayan Gunarathne Technical Lead WSO2 Inc. (http://wso2.com) email : gayang@wso2.com | mobile : +94 766819985 --e89a8f839f1bd44d9f050f2fe3f0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yeah.Good point Raj. It is better to have that validation = too.

Thanks,
Gayan

On Mon, Feb 16, 2015 at 1:19 PM, = Rajkumar Rajaratnam <rajkumarr@wso2.com> wrote:
To be more clear,

=
I am not telling we need to validate "network partitions" w= hile deploying deployment policy. I am telling we should validate whether a= ll the network partitions given in the deployment policy are already dep= loyed/added or not. This validation is different from network partition= s validation.

Thanks.

On Mon, = Feb 16, 2015 at 1:01 PM, Rajkumar Rajaratnam <rajkumarr@wso2.com>= wrote:
Hi G= ayan,

Please find my comments inline.

On Mon, Feb 16, 2015 = at 12:41 PM, Gayan Gunarathne <gayang@wso2.com> wrote:
Hi Raj,
<= br>I think we don't need to validate the network partition stuff with t= he deployment policy.It should validate through network partition managemen= t API.

The validation I am= talking is different from the validation you are referring. While deployin= g deployment policy, we need to validate whether the network partitions giv= en in the deployment policy is already deployed or not. Otherwise, one can = refer a dummy network partition id in the deployment policy.
=C2=A0
<= /div>

Deployment policy has only the reference to the network partitions.N= etwork partition management is done through separate REST API methods.
<= br>Yeah currently network partition management API reside in AS. IMO we can= move that network partition management to the CC as well.

I also feel CC is the best place to have n= etwork partition management APIs. Lets hear others' opinion as well.
Thanks.

Thanks,
Gayan

On Mon, Feb 16, 2= 015 at 12:18 PM, Rajkumar Rajaratnam <rajkumarr@wso2.com> w= rote:
Hi Devs,

I guess $Subject is not done at the moment= . I am in the process of adding the validation. This is the sample deployme= nt policy.

{
=C2=A0=C2=A0 "id": "deployment-policy= -2",
=C2=A0=C2=A0 "networkPartition": [
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &q= uot;id": "network-partition-1",
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 "partitionAlgo": "one-after-another= ",
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "partition= s": [
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 "id": "partition-1",
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= "max": 5
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 }
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ]
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
=C2=A0=C2=A0 ]
}

AFAIU,= we need to validate two things.
  • whether all network partitions = are already deployed
  • whether all partitions are defined in relevant= network partitions

Are there any other stuffs to be validated?=

Further, deployment policy management APIs are at CC side. Network p= artitions management APIs are at AS side.

I am not sure about this. D= o we have a convention that we shouldn't call AS service from CC?
<= /p>

Thanks.

--
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
<= div>Software Engineer, WSO2

<= font face=3D"verdana, sans-serif">Blog : rajkumarr.com



<= font color=3D"#888888">--

Gayan Gunarathne
Technical Lead
WSO2 Inc. <= /span>(http://wso2.com)
email=C2= =A0 : gayang@wso2.com<= /a>=C2=A0 | m<= font color=3D"#888888">obile : +94 766819985
=C2=A0
<= /font>



--
<= div>
Rajkumar Rajara= tnam
Committer & PMC Member, Apache Stratos<= br>
Software Engineer, WSO2

Mobile : +94777568639
Blog : rajkumarr.com
=
=



--
<= div>
Rajkumar Rajaratnam
=
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2

= Blog : rajkumarr.com



--
=

Gayan Gunarathne
= Technical Lead
WSO2 Inc. (http://wso2.com)
email=C2=A0 = : gayang@wso2.com<= /span>=C2=A0 | mobile : +94 766819985
=C2=A0

--e89a8f839f1bd44d9f050f2fe3f0--