{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarmkit/issues/1162","repository_url":"https://api.github.com/repos/docker/swarmkit","labels_url":"https://api.github.com/repos/docker/swarmkit/issues/1162/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/1162/comments","events_url":"https://api.github.com/repos/docker/swarmkit/issues/1162/events","html_url":"https://github.com/docker/swarmkit/pull/1162","id":165233304,"number":1162,"title":"[WIP] raft: update stress test to cover node leave and join","user":{"login":"runshenzhu","id":7114218,"avatar_url":"https://avatars.githubusercontent.com/u/7114218?v=3","gravatar_id":"","url":"https://api.github.com/users/runshenzhu","html_url":"https://github.com/runshenzhu","followers_url":"https://api.github.com/users/runshenzhu/followers","following_url":"https://api.github.com/users/runshenzhu/following{/other_user}","gists_url":"https://api.github.com/users/runshenzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/runshenzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runshenzhu/subscriptions","organizations_url":"https://api.github.com/users/runshenzhu/orgs","repos_url":"https://api.github.com/users/runshenzhu/repos","events_url":"https://api.github.com/users/runshenzhu/events{/privacy}","received_events_url":"https://api.github.com/users/runshenzhu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarmkit/labels/area/raft","name":"area/raft","color":"fef2c0"},{"url":"https://api.github.com/repos/docker/swarmkit/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-07-13T04:09:36Z","updated_at":"2016-07-14T22:57:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/1162","html_url":"https://github.com/docker/swarmkit/pull/1162","diff_url":"https://github.com/docker/swarmkit/pull/1162.diff","patch_url":"https://github.com/docker/swarmkit/pull/1162.patch"},"body":"add node leave and join to the raft stress test\r\n\r\nHere is the test work flow:\r\n```\r\n\tcreate a cluster with 5 nodes\r\n\r\n\tkeep proposing value (proposalNum times)\r\n\t\tincrease clock from time to time\r\n\r\n\t\tif propose successfully\r\n\t\t\ttry to kill a node (stop or leave)\r\n\t\tif active nodes are too few\r\n\t\t\tbring one node back (restart or create-and-join)\r\n\r\n\tcheck that stored values are among proposed values\r\n\tcheck successfully proposed values are among stored values\r\n```\r\nThere are 2 potential problems in this PR.\r\n* First, this update makes test code a little more complicated than before. It's not easy to understand.\r\n* Second, [WaitForCluster](https://github.com/runshenzhu/swarmkit/blob/697669ab9e76f99f0f3a7c06f6beb8d6ad5610da/manager/state/raft/raft_test.go#L669) sometimes fails. I can't figure out which part, test itself or raft code, leads to this failure. \r\n\r\n/cc: @dperny @aaronlehmann @abronan \r\nSigned-off-by: runshenzhu <runshen.zhu@gmail.com>"},"comment":{"url":"https://api.github.com/repos/docker/swarmkit/issues/comments/232816492","html_url":"https://github.com/docker/swarmkit/pull/1162#issuecomment-232816492","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/1162","id":232816492,"user":{"login":"runshenzhu","id":7114218,"avatar_url":"https://avatars.githubusercontent.com/u/7114218?v=3","gravatar_id":"","url":"https://api.github.com/users/runshenzhu","html_url":"https://github.com/runshenzhu","followers_url":"https://api.github.com/users/runshenzhu/followers","following_url":"https://api.github.com/users/runshenzhu/following{/other_user}","gists_url":"https://api.github.com/users/runshenzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/runshenzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runshenzhu/subscriptions","organizations_url":"https://api.github.com/users/runshenzhu/orgs","repos_url":"https://api.github.com/users/runshenzhu/repos","events_url":"https://api.github.com/users/runshenzhu/events{/privacy}","received_events_url":"https://api.github.com/users/runshenzhu/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T22:57:57Z","updated_at":"2016-07-14T22:57:57Z","body":"@aaronlehmann Yes, the test in this PR shuts down nodes forcefully and brings many problems. [This test](https://github.com/runshenzhu/swarmkit/commits/raft-leave-join) fixes this problem, and waits for the cluster to be stable when killing a node. \r\n\r\nAlso, the new test demonstrates the bug of `Leader` leaving in 2 nodes much more clearly."}}
{"actor":{"display_login":"runshenzhu"}}