----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7746/ -----------------------------------------------------------
Review request for mesos, Benjamin Hindman, John Sirois, and Ben Mahler. Description ------- This includes a minor refactor of ZooKeeperMasterDetector and a test to repro the bug seen in https://issues.apache.org/jira/browse/MESOS-299 The fix will be coming in the subsequent diff. This addresses bug MESOS-299. https://issues.apache.org/jira/browse/MESOS-299 Diffs ----- src/detector/detector.hpp d859b080b99e23d511458a27272db33c5486bb4b src/detector/detector.cpp 62df8bdf539eb13b2a6dc00eb2f6a07381d59106 src/slave/slave.cpp 5af7464aae17c00a0e707421982d7cb055aabc6c src/tests/zookeeper_tests.cpp 4415a33b94dd6ca360a7dd3ca49f4c29ee25f5e8 Diff: https://reviews.apache.org/r/7746/diff/ Testing ------- As expected, the test fails [vinod@VKone ~/workspace/apache/mesos/build (vinod/master_detector_fix)]$ GLOG_v=1 ./bin/mesos-tests.sh --verbose --gtest_filter="*ZooKeeperTest.MasterDetectorExpire*" .... .... I1025 20:04:47.162278 1898458304 zookeeper_server.cpp:198] Started ZooKeeperServer on port 49773 I1025 20:04:47.213875 27279360 detector.cpp:285] Master detector connected to ZooKeeper ... I1025 20:04:47.214005 27279360 detector.cpp:302] Trying to create path '/mesos' in ZooKeeper I1025 20:04:47.214823 28352512 detector.cpp:285] Master detector connected to ZooKeeper ... I1025 20:04:47.214865 28352512 detector.cpp:302] Trying to create path '/mesos' in ZooKeeper I1025 20:04:47.240025 27279360 detector.cpp:456] Master detector found 0 registered masters GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: noMasterDetected() Stack trace: I1025 20:04:47.257087 28352512 detector.cpp:332] Created ephemeral/sequence znode at '/mesos/0000000000' I1025 20:04:47.257599 26742784 detector.cpp:456] Master detector found 1 registered masters I1025 20:04:47.257779 28352512 detector.cpp:456] Master detector found 1 registered masters I1025 20:04:47.260438 26742784 detector.cpp:491] Master detector got new master pid: (1)@169.254.12.175:49770 I1025 20:04:47.260521 28352512 detector.cpp:491] Master detector got new master pid: (1)@169.254.12.175:49770 GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: newMasterDetected(@0x101b09cf0 (1)@169.254.12.175:49770) Stack trace: 2012-10-25 20:04:47,262:2031(0x10fa22000):ZOO_ERROR@handle_socket_error_msg@1603: Socket [127.0.0.1:49773] zk retcode=-4, errno=64(Host is down): failed while receiving a server response I1025 20:04:47.262936 28352512 detector.cpp:376] Master detector lost connection to ZooKeeper, attempting to reconnect ... ../../src/tests/zookeeper_tests.cpp:327: Failure Failed Waited too long for 'noMasterDetectedCall' ../../src/tests/zookeeper_tests.cpp:315: Failure Actual function call count doesn't match EXPECT_CALL(slave, noMasterDetected())... Expected: to be called once Actual: never called - unsatisfied and active ../../src/tests/zookeeper_tests.cpp:319: Failure Actual function call count doesn't match EXPECT_CALL(slave, newMasterDetected(master.self()))... Expected: to be called once Actual: never called - unsatisfied and active I1025 20:04:49.588414 1898458304 zookeeper_server.cpp:181] Shutdown ZooKeeperServer on port 49773 [ FAILED ] ZooKeeperTest.MasterDetectorExpireZKSession (2576 ms) [----------] 1 test from ZooKeeperTest (2577 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (2914 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] ZooKeeperTest.MasterDetectorExpireZKSession Thanks, Vinod Kone
