{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/comments/311777419","pull_request_review_id":272247400,"id":311777419,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxMTc3NzQxOQ==","diff_hunk":"@@ -0,0 +1,24 @@\n+{\n+    \"DISABLE_DATABASE\": {\n+        \"redis\":{\n+            \"port\": 6379,\n+            \"socket\": \"/var/run/redis/redis.sock\",\n+            \"databases\" : [\"CONFIG_DB\",\"STATE_DB\",\"LOGLEVEL_DB\",\"SYSMON_DB\"]","path":"dockers/docker-database/database_config.json","position":6,"original_position":6,"commit_id":"f64aca6e3b9b2ae3161a7016854e378347750308","original_commit_id":"f64aca6e3b9b2ae3161a7016854e378347750308","user":{"login":"qiluo-msft","id":11406616,"node_id":"MDQ6VXNlcjExNDA2NjE2","avatar_url":"https://avatars1.githubusercontent.com/u/11406616?v=4","gravatar_id":"","url":"https://api.github.com/users/qiluo-msft","html_url":"https://github.com/qiluo-msft","followers_url":"https://api.github.com/users/qiluo-msft/followers","following_url":"https://api.github.com/users/qiluo-msft/following{/other_user}","gists_url":"https://api.github.com/users/qiluo-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/qiluo-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiluo-msft/subscriptions","organizations_url":"https://api.github.com/users/qiluo-msft/orgs","repos_url":"https://api.github.com/users/qiluo-msft/repos","events_url":"https://api.github.com/users/qiluo-msft/events{/privacy}","received_events_url":"https://api.github.com/users/qiluo-msft/received_events","type":"User","site_admin":false},"body":">CONFIG_DB [](start = 28, length = 9)\r\n\r\nHow do you specify the database number for CONFIG_DB, etc.? Considering warm-reboot into a new image with a new database_config.json for splitting migration, we need to keep CONFIG_DB  at the same database number.","created_at":"2019-08-07T21:47:09Z","updated_at":"2019-08-07T21:47:09Z","html_url":"https://github.com/Azure/sonic-buildimage/pull/2182#discussion_r311777419","pull_request_url":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/comments/311777419"},"html":{"href":"https://github.com/Azure/sonic-buildimage/pull/2182#discussion_r311777419"},"pull_request":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182","id":224857659,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0ODU3NjU5","html_url":"https://github.com/Azure/sonic-buildimage/pull/2182","diff_url":"https://github.com/Azure/sonic-buildimage/pull/2182.diff","patch_url":"https://github.com/Azure/sonic-buildimage/pull/2182.patch","issue_url":"https://api.github.com/repos/Azure/sonic-buildimage/issues/2182","number":2182,"state":"open","locked":false,"title":"create multiple Redis DB instances based on CONFIG at /etc/sonic/database_config.json","user":{"login":"dzhangalibaba","id":41927498,"node_id":"MDQ6VXNlcjQxOTI3NDk4","avatar_url":"https://avatars0.githubusercontent.com/u/41927498?v=4","gravatar_id":"","url":"https://api.github.com/users/dzhangalibaba","html_url":"https://github.com/dzhangalibaba","followers_url":"https://api.github.com/users/dzhangalibaba/followers","following_url":"https://api.github.com/users/dzhangalibaba/following{/other_user}","gists_url":"https://api.github.com/users/dzhangalibaba/gists{/gist_id}","starred_url":"https://api.github.com/users/dzhangalibaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzhangalibaba/subscriptions","organizations_url":"https://api.github.com/users/dzhangalibaba/orgs","repos_url":"https://api.github.com/users/dzhangalibaba/repos","events_url":"https://api.github.com/users/dzhangalibaba/events{/privacy}","received_events_url":"https://api.github.com/users/dzhangalibaba/received_events","type":"User","site_admin":false},"body":"* this is the first step to moving different databases  tables into different database instances\r\n\r\n* in this PR, only handle multiple database instances creation based on user configuration at /etc/sonic/database_config.json \r\n\r\n* we keep current method to create single database instance if no extra/new DATABASE configuration exist in database_config.json file. \r\n\r\n* if user try to configure more db instances at database_config.json , we create those new db instances along with the original db instance existing today.\r\n\r\n* The configuration is as below, later we can add more db related information if needed:\r\n{\r\n...\r\n \"DATABASE\": {\r\n     \"redis-db-01\" : {\r\n          \"port\" : \"6380\",\r\n          \"database\": [\"APPL_DB\", \"STATE_DB\"]\r\n      },\r\n     \"redis-db-02\" : {\r\n          \"port\" : \"6381\",\r\n          \"database\":[\"ASIC_DB\"]\r\n      },\r\n  }\r\n...\r\n}  \r\n\r\n* The detail description is at design doc  at https://github.com/Azure/SONiC/pull/271\r\n\r\n* The main idea is : when database.sh started, we check the configuration and generate corresponding scripts. \r\n\r\n* rc.local service handle old_config copy when loading new images, there is no dependency between rc.local and database service today, for safety and make sure the copy operation are done before database try to read it, we make database service run after rc.local \r\n\r\n* Then database docker started,  we check the configuration and generate corresponding scripts/.conf in database docker as well.\r\n\r\n* based on those conf, we create databases instances as required.\r\n\r\n* at last, we ping_pong check database are up and continue\r\n\r\n Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com","created_at":"2018-10-23T00:46:56Z","updated_at":"2019-08-07T21:47:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"539709216051abc447265230f06f0fba69ed79ff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":338300689,"node_id":"MDU6TGFiZWwzMzgzMDA2ODk=","url":"https://api.github.com/repos/Azure/sonic-buildimage/labels/Enhancement%20:robot:","name":"Enhancement :robot:","color":"84b6eb","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182/commits","review_comments_url":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182/comments","review_comment_url":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/sonic-buildimage/issues/2182/comments","statuses_url":"https://api.github.com/repos/Azure/sonic-buildimage/statuses/f64aca6e3b9b2ae3161a7016854e378347750308","head":{"label":"dzhangalibaba:createDBinst","ref":"createDBinst","sha":"f64aca6e3b9b2ae3161a7016854e378347750308","user":{"login":"dzhangalibaba","id":41927498,"node_id":"MDQ6VXNlcjQxOTI3NDk4","avatar_url":"https://avatars0.githubusercontent.com/u/41927498?v=4","gravatar_id":"","url":"https://api.github.com/users/dzhangalibaba","html_url":"https://github.com/dzhangalibaba","followers_url":"https://api.github.com/users/dzhangalibaba/followers","following_url":"https://api.github.com/users/dzhangalibaba/following{/other_user}","gists_url":"https://api.github.com/users/dzhangalibaba/gists{/gist_id}","starred_url":"https://api.github.com/users/dzhangalibaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzhangalibaba/subscriptions","organizations_url":"https://api.github.com/users/dzhangalibaba/orgs","repos_url":"https://api.github.com/users/dzhangalibaba/repos","events_url":"https://api.github.com/users/dzhangalibaba/events{/privacy}","received_events_url":"https://api.github.com/users/dzhangalibaba/received_events","type":"User","site_admin":false},"repo":{"id":147566259,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc1NjYyNTk=","name":"sonic-buildimage","full_name":"dzhangalibaba/sonic-buildimage","private":false,"owner":{"login":"dzhangalibaba","id":41927498,"node_id":"MDQ6VXNlcjQxOTI3NDk4","avatar_url":"https://avatars0.githubusercontent.com/u/41927498?v=4","gravatar_id":"","url":"https://api.github.com/users/dzhangalibaba","html_url":"https://github.com/dzhangalibaba","followers_url":"https://api.github.com/users/dzhangalibaba/followers","following_url":"https://api.github.com/users/dzhangalibaba/following{/other_user}","gists_url":"https://api.github.com/users/dzhangalibaba/gists{/gist_id}","starred_url":"https://api.github.com/users/dzhangalibaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzhangalibaba/subscriptions","organizations_url":"https://api.github.com/users/dzhangalibaba/orgs","repos_url":"https://api.github.com/users/dzhangalibaba/repos","events_url":"https://api.github.com/users/dzhangalibaba/events{/privacy}","received_events_url":"https://api.github.com/users/dzhangalibaba/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dzhangalibaba/sonic-buildimage","description":"Scripts which perform an installable binary image build for SONiC","fork":true,"url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage","forks_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/forks","keys_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/teams","hooks_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/hooks","issue_events_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/issues/events{/number}","events_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/events","assignees_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/assignees{/user}","branches_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/branches{/branch}","tags_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/tags","blobs_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/git/refs{/sha}","trees_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/statuses/{sha}","languages_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/languages","stargazers_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/stargazers","contributors_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/contributors","subscribers_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/subscribers","subscription_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/subscription","commits_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/commits{/sha}","git_commits_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/git/commits{/sha}","comments_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/comments{/number}","issue_comment_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/issues/comments{/number}","contents_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/contents/{+path}","compare_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/merges","archive_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/downloads","issues_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/issues{/number}","pulls_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/pulls{/number}","milestones_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/milestones{/number}","notifications_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/labels{/name}","releases_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/releases{/id}","deployments_url":"https://api.github.com/repos/dzhangalibaba/sonic-buildimage/deployments","created_at":"2018-09-05T19:03:09Z","updated_at":"2019-08-07T21:32:04Z","pushed_at":"2019-08-07T21:32:02Z","git_url":"git://github.com/dzhangalibaba/sonic-buildimage.git","ssh_url":"git@github.com:dzhangalibaba/sonic-buildimage.git","clone_url":"https://github.com/dzhangalibaba/sonic-buildimage.git","svn_url":"https://github.com/dzhangalibaba/sonic-buildimage","homepage":null,"size":6804,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"530a0c93b01554dcfffe492858cb2a0271293dc2","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":53432472,"node_id":"MDEwOlJlcG9zaXRvcnk1MzQzMjQ3Mg==","name":"sonic-buildimage","full_name":"Azure/sonic-buildimage","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/sonic-buildimage","description":"Scripts which perform an installable binary image build for SONiC","fork":false,"url":"https://api.github.com/repos/Azure/sonic-buildimage","forks_url":"https://api.github.com/repos/Azure/sonic-buildimage/forks","keys_url":"https://api.github.com/repos/Azure/sonic-buildimage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/sonic-buildimage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/sonic-buildimage/teams","hooks_url":"https://api.github.com/repos/Azure/sonic-buildimage/hooks","issue_events_url":"https://api.github.com/repos/Azure/sonic-buildimage/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/sonic-buildimage/events","assignees_url":"https://api.github.com/repos/Azure/sonic-buildimage/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/sonic-buildimage/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/sonic-buildimage/tags","blobs_url":"https://api.github.com/repos/Azure/sonic-buildimage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/sonic-buildimage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/sonic-buildimage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/sonic-buildimage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/sonic-buildimage/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/sonic-buildimage/languages","stargazers_url":"https://api.github.com/repos/Azure/sonic-buildimage/stargazers","contributors_url":"https://api.github.com/repos/Azure/sonic-buildimage/contributors","subscribers_url":"https://api.github.com/repos/Azure/sonic-buildimage/subscribers","subscription_url":"https://api.github.com/repos/Azure/sonic-buildimage/subscription","commits_url":"https://api.github.com/repos/Azure/sonic-buildimage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/sonic-buildimage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/sonic-buildimage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/sonic-buildimage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/sonic-buildimage/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/sonic-buildimage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/sonic-buildimage/merges","archive_url":"https://api.github.com/repos/Azure/sonic-buildimage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/sonic-buildimage/downloads","issues_url":"https://api.github.com/repos/Azure/sonic-buildimage/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/sonic-buildimage/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/sonic-buildimage/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/sonic-buildimage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/sonic-buildimage/labels{/name}","releases_url":"https://api.github.com/repos/Azure/sonic-buildimage/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/sonic-buildimage/deployments","created_at":"2016-03-08T17:42:37Z","updated_at":"2019-08-07T20:01:07Z","pushed_at":"2019-08-07T20:00:42Z","git_url":"git://github.com/Azure/sonic-buildimage.git","ssh_url":"git@github.com:Azure/sonic-buildimage.git","clone_url":"https://github.com/Azure/sonic-buildimage.git","svn_url":"https://github.com/Azure/sonic-buildimage","homepage":null,"size":7374,"stargazers_count":163,"watchers_count":163,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":331,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":207,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":331,"open_issues":207,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182"},"html":{"href":"https://github.com/Azure/sonic-buildimage/pull/2182"},"issue":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/issues/2182"},"comments":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/issues/2182/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/pulls/2182/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/sonic-buildimage/statuses/f64aca6e3b9b2ae3161a7016854e378347750308"}},"author_association":"NONE"}}
{"actor":{"display_login":"qiluo-msft"}}