Hi all,

Alright I see, so what Shazni suggests seems to work fine. But, if we made
a mistake and have to migrate data as a result we should do that instead of
tweaking the product to support something like this, because as per my
understanding this is by far never going to be a requirement and will
create all kinds of complications in terms of caching etc.

Thanks,
Senaka.

On Thu, Oct 23, 2014 at 12:52 PM, Pulasthi Supun <[email protected]> wrote:

> Hi All,
>
>
> On Thu, Oct 23, 2014 at 4:59 PM, Janaka Ranabahu <[email protected]> wrote:
>
>> Hi Senaka,
>>
>> On Thu, Oct 23, 2014 at 2:58 PM, Senaka Fernando <[email protected]> wrote:
>>
>>> Hi Danushka,
>>>
>>> No I mean mount the /_system/governance locations of the three
>>> individual registries to the three respective AS nodes.
>>>
>>> Hi Dimuthu,
>>>
>>> This is not a bug, AFAIU, there is an issue in the way we are trying to
>>> mount things.
>>>
>> Are you suggesting that we can not mount 2 locations in 2 different
>> servers that has the same path(ex:- /_system/governance/) into 2 different
>> locations of G-Reg? IMO, that is what we tried to do. We pointed the
>> /_system/governance collection of G-Reg to a mysql instance and tried to
>> add a mount to AS /_system/governance collection to G-Reg's
>> /_system/as/governance location from G-Reg side. IMO, this is a simple
>> mounting scenario.
>>
>
> This is where the issue is created in the handler chain since there are
> two paths with the target path as " /_system/governance" the handler chain
> will at one point match the a wrong handler that corresponds
> " /_system/governance" of Greg to registry get call that is supposed to go
> to the " /_system/governance" of the AS.
>
> The workaround would be to mount the registries in the way that Shazni
> described earlier . Then what we would do is mount the
> " /_system/governance" of Greg will be mounted to " /_system/governance"
> with the following configuration in the Greg side.
>
> <mount path="/_system/governance" overwrite="true">
>      <instanceId>reggov</instanceId>
>      <targetPath>/_system/as/governance</targetPath>
>  </mount>
>
> And the the "/_system/as/governance" is mounted to
> "/_system/as/governance" in Greg with the following configuration.
>
>    <mount path="/_system/as/governance" overwrite="true">
>         <instanceId>asgov</instanceId>
>         <targetPath>/_system/as/governance</targetPath>
>     </mount>
>
> And then in the AS side "/_system/as/governance" will be mounted to the
> "/_system/governance" in AS with the following configuration
>
>    <mount path="/_system/governance" overwrite="true">
>         <instanceId>asgov</instanceId>
>         <targetPath>/_system/as/governance</targetPath>
>     </mount>
>
>
>
> But this will require data migration since data is already in the system.
> The migration would be AFAIU to replace "/_system/governance" with
>  "/_system/as/governance" in the database pointed by the instanceid
> "asgov". I am not sure if any kind of data migration is an option in the
> system. if it is this would be the best way to handle this issue.
>
> To fix the issue in the handler chain if we are not going with the above
> option we would need some time. because even though the cause of the issue
> has been identified it wont be a simple issue because of the complexity of
> the handler chain and it might take several days to come up with a proper
> fix.
>
> Regards,
> Pulasthi
>
>
>> Thanks,
>> Janaka
>>
>> Thanks,
>> Janaka
>>
>>>
>>> Thanks,
>>> Senaka.
>>>
>>>
>>> On Thu, Oct 23, 2014 at 9:42 AM, Dimuthu Leelarathne <[email protected]>
>>> wrote:
>>>
>>>> Hi Senaka,
>>>>
>>>> We have to migrate the whole cloud. If mounting can be done and if it
>>>> is a bug we should fix it.
>>>>
>>>> thanks,
>>>> dimuthu
>>>>
>>>>
>>>> On Thu, Oct 23, 2014 at 2:10 PM, Danushka Fernando <[email protected]>
>>>> wrote:
>>>>
>>>>> We cannot share same governance space across all environments. That's
>>>>> why we isolated the governance spaces.
>>>>> 1. Security reasons - In Development environment Production data
>>>>> should not be accessible.
>>>>> 2. We cannot mount same location since three environments should have
>>>>> three registry resources by same name.
>>>>>
>>>>> Thanks & Regards
>>>>> Danushka Fernando
>>>>> Software Engineer
>>>>> WSO2 inc. http://wso2.com/
>>>>> Mobile : +94716332729
>>>>>
>>>>> On Thu, Oct 23, 2014 at 1:49 PM, Senaka Fernando <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Yes, cool, so why not mount the /_system/governance collection of
>>>>>> this registry into AS? You don't need a separate governance collection 
>>>>>> only
>>>>>> for AS, which is what creates this situation.
>>>>>>
>>>>>> Thanks,
>>>>>> Senaka.
>>>>>>
>>>>>> On Thu, Oct 23, 2014 at 2:55 AM, Danushka Fernando <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Senaka
>>>>>>> For an app in AF users can add Resources like datasources,
>>>>>>> databases, registry properties and apis. We save registry properties and
>>>>>>> apis in cloud registry. So we read/write them from network calls. In 
>>>>>>> cloud
>>>>>>> these network calls cause lot of issues like slowness, timeouts and so 
>>>>>>> on.
>>>>>>> As a solution if we can access the cloud registry without network calls,
>>>>>>> then we can make this more stabilized.
>>>>>>>
>>>>>>> Thanks & Regards
>>>>>>> Danushka Fernando
>>>>>>> Software Engineer
>>>>>>> WSO2 inc. http://wso2.com/
>>>>>>> Mobile : +94716332729
>>>>>>>
>>>>>>> On Thu, Oct 23, 2014 at 4:14 AM, Senaka Fernando <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Danushka,
>>>>>>>>
>>>>>>>> So, in this case, why not keep things simple and have one registry
>>>>>>>> per environment, like in your picture and mount /_system/governance of
>>>>>>>> G-Reg to /_system/governance of AS? Why won't this work?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Senaka.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Oct 22, 2014 at 9:37 PM, Danushka Fernando <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi Senaka
>>>>>>>>> I just added appserver inside the cloud because that what we have
>>>>>>>>> right now. ;)
>>>>>>>>> By network calls I meant #1.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks & Regards
>>>>>>>>> Danushka Fernando
>>>>>>>>> Software Engineer
>>>>>>>>> WSO2 inc. http://wso2.com/
>>>>>>>>> Mobile : +94716332729
>>>>>>>>>
>>>>>>>>> On Thu, Oct 23, 2014 at 1:56 AM, Senaka Fernando <[email protected]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Guys,
>>>>>>>>>>
>>>>>>>>>> So before digging directly into the solution, we should take a
>>>>>>>>>> step back and see whether we are doing the right thing in the first 
>>>>>>>>>> place.
>>>>>>>>>>
>>>>>>>>>> So, firstly Danushka, thanks for sharing the use-case. Having
>>>>>>>>>> said this, AppFactory, long-term is not going to just have AppServer 
>>>>>>>>>> only.
>>>>>>>>>>
>>>>>>>>>> When you say network call do you mean,
>>>>>>>>>> 1. the network call using WS-API to access a single shared
>>>>>>>>>> registry or
>>>>>>>>>> 2. the network call to copy data from G-Reg (dev) to G-Reg
>>>>>>>>>> (test)?
>>>>>>>>>>
>>>>>>>>>> If this is #2, how would having a single mounted registry
>>>>>>>>>> instance solve the problem? Are you planning to share the same 
>>>>>>>>>> resources
>>>>>>>>>> among all environments?
>>>>>>>>>>
>>>>>>>>>> If not, wouldn't you still need to copy from A to B?
>>>>>>>>>>
>>>>>>>>>> If so, are you simply referring to the overhead of copying
>>>>>>>>>> between two G-Reg nodes vs copying from path X to path Y in a single 
>>>>>>>>>> G-Reg?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Senaka.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Oct 22, 2014 at 11:06 AM, Shazni Nazeer <[email protected]>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Pulasthi,
>>>>>>>>>>>
>>>>>>>>>>> Have you done this configuration in GREG or AS? If you want to
>>>>>>>>>>> mount /_system/governance path in AS to /_system/as/governance in 
>>>>>>>>>>> GREG, you
>>>>>>>>>>> have to put the following in AS
>>>>>>>>>>>
>>>>>>>>>>>     <mount path="/_system/governance" overwrite="true">
>>>>>>>>>>>         <instanceId>asgov</instanceId>
>>>>>>>>>>>         <targetPath>/_system/as/governance</targetPath>
>>>>>>>>>>>     </mount>
>>>>>>>>>>>
>>>>>>>>>>> and
>>>>>>>>>>>
>>>>>>>>>>>     <mount path="/_system/as/governance" overwrite="true">
>>>>>>>>>>>         <instanceId>asgov</instanceId>
>>>>>>>>>>>         <targetPath>/_system/as/governance</targetPath>
>>>>>>>>>>>     </mount>
>>>>>>>>>>>
>>>>>>>>>>> in GREG. Replace the <instanceId> as appropriate
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Shazni Nazeer
>>>>>>>>>>>
>>>>>>>>>>> Senior Software Engineer
>>>>>>>>>>>
>>>>>>>>>>> Mob : +94 777737331
>>>>>>>>>>> LinkedIn : http://lk.linkedin.com/in/shazninazeer
>>>>>>>>>>> Blog : http://shazninazeer.blogspot.com
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Oct 22, 2014 at 3:11 PM, Pulasthi Supun <
>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Shazni,
>>>>>>>>>>>>
>>>>>>>>>>>> Nope, the configs are correct
>>>>>>>>>>>>
>>>>>>>>>>>> <mount path="/_system/as/governance" overwrite="true">
>>>>>>>>>>>>         <instanceId>asgov</instanceId>
>>>>>>>>>>>>         <targetPath>/_system/governance</targetPath>
>>>>>>>>>>>>     </mount>
>>>>>>>>>>>>
>>>>>>>>>>>> this config means to mount the /_system/governance path in AS,
>>>>>>>>>>>> into the "/_system/as/governance".
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Pulasthi
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Oct 22, 2014 at 2:45 PM, Shazni Nazeer <[email protected]
>>>>>>>>>>>> > wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Pulasthi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> As I understand you have to change the AS mount as below.
>>>>>>>>>>>>>
>>>>>>>>>>>>> <mount path="/_system/governance" overwrite="true">
>>>>>>>>>>>>>         <instanceId>asgov</instanceId>
>>>>>>>>>>>>>         <targetPath>/_system/as/governance</targetPath>
>>>>>>>>>>>>>     </mount>
>>>>>>>>>>>>>
>>>>>>>>>>>>> i.e.  As Senaka has mentioned you aren't trying to mount
>>>>>>>>>>>>> /_system/governance of AS, but rather /_system/as/governance to
>>>>>>>>>>>>> /_system/governance of GREG.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Shazni Nazeer
>>>>>>>>>>>>>
>>>>>>>>>>>>> Senior Software Engineer
>>>>>>>>>>>>>
>>>>>>>>>>>>> Mob : +94 777737331
>>>>>>>>>>>>> LinkedIn : http://lk.linkedin.com/in/shazninazeer
>>>>>>>>>>>>> Blog : http://shazninazeer.blogspot.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, Oct 22, 2014 at 1:21 AM, Senaka Fernando <
>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Pulasthi,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> You have mounted AS on G-Reg but not G-Reg on AS right? This
>>>>>>>>>>>>>> is not the normal way of setting this up. Any reason for doing 
>>>>>>>>>>>>>> this?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>> Senaka.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Tuesday, October 21, 2014, Pulasthi Supun <
>>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi Senaka/All,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Consider the following mounting scenario
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> A greg has its governance space mounted
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <mount path="/_system/governance" overwrite="true">
>>>>>>>>>>>>>>>         <instanceId>reggov</instanceId>
>>>>>>>>>>>>>>>         <targetPath>/_system/governance</targetPath>
>>>>>>>>>>>>>>>     </mount>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> And the governance space of a separate AS server is mounted
>>>>>>>>>>>>>>> to a different path in the greg.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <mount path="/_system/as/governance" overwrite="true">
>>>>>>>>>>>>>>>         <instanceId>asgov</instanceId>
>>>>>>>>>>>>>>>         <targetPath>/_system/governance</targetPath>
>>>>>>>>>>>>>>>     </mount>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> When the mounts are done mount does not work properly
>>>>>>>>>>>>>>> everything under "/_system/as/governance" is replaced by 
>>>>>>>>>>>>>>> resources that are
>>>>>>>>>>>>>>> in "/_system/governance" . So the governance space of the greg 
>>>>>>>>>>>>>>> is populated
>>>>>>>>>>>>>>> into both paths. When we remove the mount of the greg and only 
>>>>>>>>>>>>>>> mount the
>>>>>>>>>>>>>>> governance of AS, it works properly. Is this a known bug?.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Regards
>>>>>>>>>>>>>>> Pulasthi
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Pulasthi Supun
>>>>>>>>>>>>>>> Software Engineer; WSO2 Inc.; http://wso2.com,
>>>>>>>>>>>>>>> Email: [email protected]
>>>>>>>>>>>>>>> Mobile: +94 (71) 9258281
>>>>>>>>>>>>>>> Blog : http://pulasthisupun.blogspot.com/
>>>>>>>>>>>>>>> Git hub profile: https://github.com/pulasthi
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
>>>>>>>>>>>>>> Solutions Architect; WSO2 Inc.; http://wso2.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Member; Apache Software Foundation; http://apache.org
>>>>>>>>>>>>>> <http://apache.org>E-mail: senaka AT wso2.com 
>>>>>>>>>>>>>> <http://wso2.com>**P:
>>>>>>>>>>>>>> +1 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *M: +44 782 741 1966 <%2B44%20782%20741%201966>Linked-In:
>>>>>>>>>>>>>> http://linkedin.com/in/senakafernando
>>>>>>>>>>>>>> <http://linkedin.com/in/senakafernando>*Lean . Enterprise .
>>>>>>>>>>>>>> Middleware
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> Dev mailing list
>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> --
>>>>>>>>>>>> Pulasthi Supun
>>>>>>>>>>>> Software Engineer; WSO2 Inc.; http://wso2.com,
>>>>>>>>>>>> Email: [email protected]
>>>>>>>>>>>> Mobile: +94 (71) 9258281
>>>>>>>>>>>> Blog : http://pulasthisupun.blogspot.com/
>>>>>>>>>>>> Git hub profile: https://github.com/pulasthi
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
>>>>>>>>>> Solutions Architect; WSO2 Inc.; http://wso2.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *Member; Apache Software Foundation; http://apache.org
>>>>>>>>>> <http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P:
>>>>>>>>>> +1 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *M: +44 782 741 1966 <%2B44%20782%20741%201966>Linked-In:
>>>>>>>>>> http://linkedin.com/in/senakafernando
>>>>>>>>>> <http://linkedin.com/in/senakafernando>*Lean . Enterprise .
>>>>>>>>>> Middleware
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>>
>>>>>>>> *[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
>>>>>>>> Solutions Architect; WSO2 Inc.; http://wso2.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> *Member; Apache Software Foundation; http://apache.org
>>>>>>>> <http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P:
>>>>>>>> +1 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>>>>>>>>
>>>>>>>>
>>>>>>>> *M: +44 782 741 1966 <%2B44%20782%20741%201966>Linked-In:
>>>>>>>> http://linkedin.com/in/senakafernando
>>>>>>>> <http://linkedin.com/in/senakafernando>*Lean . Enterprise .
>>>>>>>> Middleware
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>>
>>>>>> *[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
>>>>>> Solutions Architect; WSO2 Inc.; http://wso2.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> *Member; Apache Software Foundation; http://apache.org
>>>>>> <http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P:
>>>>>> +1 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>>>>>>
>>>>>>
>>>>>> *M: +44 782 741 1966 <%2B44%20782%20741%201966>Linked-In:
>>>>>> http://linkedin.com/in/senakafernando
>>>>>> <http://linkedin.com/in/senakafernando>*Lean . Enterprise .
>>>>>> Middleware
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dimuthu Leelarathne
>>>> Architect & Product Lead of App Factory
>>>>
>>>> WSO2, Inc. (http://wso2.com)
>>>> email: [email protected]
>>>> Mobile : 0773661935
>>>>
>>>> Lean . Enterprise . Middleware
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> *[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
>>> Solutions Architect; WSO2 Inc.; http://wso2.com
>>>
>>>
>>>
>>> *Member; Apache Software Foundation; http://apache.org
>>> <http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P: +1
>>> 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>>>
>>>
>>> *M: +44 782 741 1966 <%2B44%20782%20741%201966>Linked-In:
>>> http://linkedin.com/in/senakafernando
>>> <http://linkedin.com/in/senakafernando>*Lean . Enterprise . Middleware
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Janaka Ranabahu*
>> Senior Software Engineer; WSO2 Inc.; http://wso2.com
>>
>>
>> *E-mail: [email protected] <http://wso2.com>**M: **+94 718370861
>> <%2B94%20718370861>*
>>
>> Lean . Enterprise . Middleware
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> --
> Pulasthi Supun
> Software Engineer; WSO2 Inc.; http://wso2.com,
> Email: [email protected]
> Mobile: +94 (71) 9258281
> Blog : http://pulasthisupun.blogspot.com/
> Git hub profile: https://github.com/pulasthi
>



-- 


*[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
Solutions Architect; WSO2 Inc.; http://wso2.com



*Member; Apache Software Foundation; http://apache.org
<http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P: +1 408
754 7388; ext: 51736*;


*M: +44 782 741 1966Linked-In: http://linkedin.com/in/senakafernando
<http://linkedin.com/in/senakafernando>*Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to