{"action":"created","issue":{"url":"https://api.github.com/repos/wso2/product-ei/issues/4800","repository_url":"https://api.github.com/repos/wso2/product-ei","labels_url":"https://api.github.com/repos/wso2/product-ei/issues/4800/labels{/name}","comments_url":"https://api.github.com/repos/wso2/product-ei/issues/4800/comments","events_url":"https://api.github.com/repos/wso2/product-ei/issues/4800/events","html_url":"https://github.com/wso2/product-ei/issues/4800","id":527935600,"node_id":"MDU6SXNzdWU1Mjc5MzU2MDA=","number":4800,"title":"Registry mounting configuration is retained in the local database.","user":{"login":"VirajHasitha","id":9976728,"node_id":"MDQ6VXNlcjk5NzY3Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/9976728?v=4","gravatar_id":"","url":"https://api.github.com/users/VirajHasitha","html_url":"https://github.com/VirajHasitha","followers_url":"https://api.github.com/users/VirajHasitha/followers","following_url":"https://api.github.com/users/VirajHasitha/following{/other_user}","gists_url":"https://api.github.com/users/VirajHasitha/gists{/gist_id}","starred_url":"https://api.github.com/users/VirajHasitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VirajHasitha/subscriptions","organizations_url":"https://api.github.com/users/VirajHasitha/orgs","repos_url":"https://api.github.com/users/VirajHasitha/repos","events_url":"https://api.github.com/users/VirajHasitha/events{/privacy}","received_events_url":"https://api.github.com/users/VirajHasitha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-11-25T08:47:25Z","updated_at":"2019-11-27T08:09:25Z","closed_at":null,"author_association":"NONE","body":"**Description:**\r\nThe registry mounting configuration is retained in the local database while the first restart of the EI server with incorrect registry mounting configurations. It will not be updated even after we re-correct the configuration and restart the server.\r\n\r\n**Steps to reproduce:**\r\n\r\nCreate a local registry database and a shared registry database and source the relevant script from <EI_HOME>/dbscript/\r\n\r\nIncorrectly configure the registry mount configuration in the registry.xml as below and start the server.\r\n\r\n```\r\n    <remoteInstance url=\"https://localhost:9444/registry\">\r\n        <id>4</id>\r\n        <dbConfig>sharedregistry</dbConfig>\r\n        <readOnly>false</readOnly>\r\n        <enableCache>true</enableCache>\r\n        <registryRoot>/</registryRoot>\r\n    <cacheId>wso2reg@jdbc:mysql://94.198.28.68:3306,94.198.28.69:3306,94.198.28.70:3306/WSO2_REGISTRY_DB?autoReconnect=true</cacheId>\r\n    </remoteInstance>\r\n    \r\n    <mount path=\"/_system/config\" overwrite=\"true\">\r\n        <instanceId>x</instanceId>\r\n        <targetPath>/_system/eiconfig</targetPath>\r\n    </mount>\r\n    \r\n    <mount path=\"/_system/governance\" overwrite=\"true\">\r\n        <instanceId>x</instanceId>\r\n        <targetPath>/_system/governance</targetPath>\r\n    </mount>\r\n```\r\n\r\nDue to the incorrect registry configuration, the shared registry will not mount.\r\n\r\nThen shut down the server and start the server after correctly configuring the registry.xml as below.\r\n\r\n```\r\n    <remoteInstance url=\"https://localhost:9444/registry\">\r\n        <id>4</id>\r\n        <dbConfig>sharedregistry</dbConfig>\r\n        <readOnly>false</readOnly>\r\n        <enableCache>true</enableCache>\r\n        <registryRoot>/</registryRoot>\r\n    <cacheId>wso2reg@jdbc:mysql://94.198.28.68:3306,94.198.28.69:3306,94.198.28.70:3306/WSO2_REGISTRY_DB?autoReconnect=true</cacheId>\r\n    </remoteInstance>\r\n    \r\n    <mount path=\"/_system/config\" overwrite=\"true\">\r\n        <instanceId>4</instanceId>\r\n        <targetPath>/_system/eiconfig</targetPath>\r\n    </mount>\r\n    \r\n    <mount path=\"/_system/governance\" overwrite=\"true\">\r\n        <instanceId>4</instanceId>\r\n        <targetPath>/_system/governance</targetPath>\r\n    </mount>\r\n```\r\nEven after the correct configuration and restart the server, the shared registry will not mount. As per the observation it seems the registry mounting configuration is retained in the local database.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/wso2/product-ei/issues/comments/558977099","html_url":"https://github.com/wso2/product-ei/issues/4800#issuecomment-558977099","issue_url":"https://api.github.com/repos/wso2/product-ei/issues/4800","id":558977099,"node_id":"MDEyOklzc3VlQ29tbWVudDU1ODk3NzA5OQ==","user":{"login":"VirajHasitha","id":9976728,"node_id":"MDQ6VXNlcjk5NzY3Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/9976728?v=4","gravatar_id":"","url":"https://api.github.com/users/VirajHasitha","html_url":"https://github.com/VirajHasitha","followers_url":"https://api.github.com/users/VirajHasitha/followers","following_url":"https://api.github.com/users/VirajHasitha/following{/other_user}","gists_url":"https://api.github.com/users/VirajHasitha/gists{/gist_id}","starred_url":"https://api.github.com/users/VirajHasitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VirajHasitha/subscriptions","organizations_url":"https://api.github.com/users/VirajHasitha/orgs","repos_url":"https://api.github.com/users/VirajHasitha/repos","events_url":"https://api.github.com/users/VirajHasitha/events{/privacy}","received_events_url":"https://api.github.com/users/VirajHasitha/received_events","type":"User","site_admin":false},"created_at":"2019-11-27T08:09:25Z","updated_at":"2019-11-27T08:09:25Z","author_association":"NONE","body":"This is the expected behavior as it is recommended to delete the local h2  when the mounting configuration is changed in registry.xml. Therefore, it is required to delete the local h2 database in order to address this issue. This is also a reason for recommending to keep the local registry in an embedded h2 database."}}
{"actor":{"display_login":"VirajHasitha"}}