2

this is my registry on ESB 4.9.0 pointing to my GREG 5.2.0 instance

<dbConfig name="remote_registry">
      <dataSource>jdbc/WSO2CarbonDB_GREG</dataSource>
</dbConfig>

<remoteInstance url="https://y.y.y.46:9445/registry">
    <id>gregid</id>
    <dbConfig>remote_registry</dbConfig>
    <cacheId>regadmin@jdbc:mysql://x.x.x.45:3306/governancedb</cacheId>
        <readOnly>true</readOnly>
        <enableCache>true</enableCache>
    <registryRoot>/</registryRoot>
</remoteInstance>

<mount path="/_system/governace" overwrite="true">
     <instanceId>gregid</instanceId>
     <targetPath>/_system/governance</targetPath>
</mount>

No error, but is simple ignored, the registry is local If I change the mount point like that

<mount path="/_system/gov_reg" overwrite="true">
     <instanceId>gregid</instanceId>
     <targetPath>/_system/governance</targetPath> </mount>

everything works as expected. It's an expected behaviour and I'm missing something here ?

TIA

Community
  • 1
  • 1
  • Let me know if below answer didn't help you. – tk_ Jun 24 '16 at 07:18
  • Hi @thusharaK thanks your answer Unfortunately the first mount doesn't work for me It only works when I specify a mounth poath DIFFERENT than _system/governace – Massimo Danieli - Jun 24 '16 at 09:15
  • What do you mean by it doesn't work? Please share the error msg. – tk_ Jun 24 '16 at 10:41
  • @thusharaK I mean the the _system/governace is local, not the one in greg No error at all in the logs TID: [-1234] [] [2016-06-27 13:41:19,229] INFO {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - Writing logs {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} – Massimo Danieli - Jun 27 '16 at 12:45
  • TID: [-1234] [] [2016-06-27 13:41:38,481] INFO {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - Registry Mode : READ-WRITE {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} TID: [-1234] [] [2016-06-27 13:41:54,096] INFO {org.wso2.carbon.registry.eventing.internal.RegistryEventingServiceComponent} - Successfully Initialized Eventing on Registry {org.wso2.carbon.registry.eventing.internal.RegistryEventingServiceComponent} – Massimo Danieli - Jun 27 '16 at 12:47

3 Answers3

1

Your configuration looks fine.

Since we already mount the all governance registry from config.

<mount path="/_system/governance" overwrite="true">
        <instanceId>gregid</instanceId>
        <targetPath>/_system/governance</targetPath>
</mount>

Configuring sub collection in governance registry again is not make sense. According to my understanding, However I don't see a real use case of mounting /_system/governace governance registry in ESB node. We can set the specific gov path for each ESB node (prod, dev, test) as,

<mount path="/_system/governance/env1" overwrite="true">
        <instanceId>gregid</instanceId>
        <targetPath>/_system/governance/prod</targetPath>
</mount>

For more validation please go through below posts,

Additional reading

Sharing Registry Space across Multiple Product Instances

tk_
  • 16,415
  • 8
  • 80
  • 90
0

Please make sure there's no duplicate mount config sections for /_system/governance in your registry.xml.

Amila Maharachchi
  • 2,121
  • 2
  • 15
  • 21
0

[SOLVED]

I do ignore the reason, but ive cheked the system/local reg

/_system/local/repository/components/org.wso2.carbon.registry/mount/-_system-governance

and noticed that in Properties target was pointing to the old value 'instanceid'

manually corrected and now all is working fine

Below the corrispondent bit in my ansible template

<remoteInstance url="https://{{ greg_ip }}:{{ greg_carbon_port }}/registry">
    <id>gregid</id>
    <dbConfig>remote_registry</dbConfig>
    <cacheId>regadmin@jdbc:mysql://{{ mysql_db }}:3306/governancedb</cacheId>
    {% if  'WKR' in group_names %}
    <readOnly>true</readOnly>
    {% else %}
    <readOnly>false</readOnly>
    {% endif %}
    <enableCache>true</enableCache>
    <registryRoot>/</registryRoot>
</remoteInstance>

<mount path="/_system/governance" overwrite="true">
     <instanceId>gregid</instanceId>
     <targetPath>/_system/governance</targetPath>
</mount>