Reputation: 51
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
Upvotes: 2
Views: 236
Reputation: 51
[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>
Upvotes: 0
Reputation: 2149
Please make sure there's no duplicate mount config sections for /_system/governance in your registry.xml.
Upvotes: 0
Reputation: 17358
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
Upvotes: 1