> On Oct. 28, 2012, 7:53 p.m., Ben Mahler wrote: > > src/detector/detector.cpp, line 470 > > <https://reviews.apache.org/r/7746/diff/4/?file=180546#file180546line470> > > > > s/the/a since there can be many contending detectors, correct?
no, only one type of detector per use > On Oct. 28, 2012, 7:53 p.m., Ben Mahler wrote: > > src/detector/detector.cpp, line 484 > > <https://reviews.apache.org/r/7746/diff/4/?file=180546#file180546line484> > > > > Maybe a little bit about why it will never know? I'm assuming there's > > some zk semantics that cause this? done - Vinod ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7746/#review12867 ----------------------------------------------------------- On Oct. 29, 2012, 7:34 p.m., Vinod Kone wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/7746/ > ----------------------------------------------------------- > > (Updated Oct. 29, 2012, 7:34 p.m.) > > > Review request for mesos, Benjamin Hindman and Ben Mahler. > > > Description > ------- > > BenM's comments > > > Fix for master detector > > > 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 0321bc516166aacfd261c48f1f4293622d18ae0e > src/tests/zookeeper_test_server.hpp > 06320439b993f9612ea01303f7446dadf97dc045 > src/tests/zookeeper_tests.cpp 3f001affe0dd4b8002e99a658c47b8ea86ddb7d6 > > Diff: https://reviews.apache.org/r/7746/diff/ > > > Testing > ------- > > Test output before the fix: > > [vinod@VKone ~/workspace/apache/mesos/build (vinod/master_detector_fix)]$ > GLOG_v=1 ./bin/mesos-tests.sh --verbose > --gtest_filter="*ZooKeeperTest.MasterDetectorExpire*" > .... > .... > I1026 00:05:39.087263 27279360 detector.cpp:286] Master detector connected to > ZooKeeper ... > I1026 00:05:39.087425 27279360 detector.cpp:303] Trying to create path > '/mesos' in ZooKeeper > I1026 00:05:39.087811 26742784 detector.cpp:286] Master detector connected to > ZooKeeper ... > I1026 00:05:39.087836 26742784 detector.cpp:303] Trying to create path > '/mesos' in ZooKeeper > I1026 00:05:39.102313 27279360 detector.cpp:467] Master detector found 0 > registered masters > I1026 00:05:39.110910 26742784 detector.cpp:333] Created ephemeral/sequence > znode at '/mesos/0000000000' > I1026 00:05:39.111507 27815936 detector.cpp:467] Master detector found 1 > registered masters > I1026 00:05:39.111590 26742784 detector.cpp:467] Master detector found 1 > registered masters > I1026 00:05:39.114651 27815936 detector.cpp:502] Master detector got new > master pid: (1)@192.168.1.127:51375 > I1026 00:05:39.114917 26742784 detector.cpp:502] Master detector got new > master pid: (1)@192.168.1.127:51375 > 2012-10-26 > 00:05:39,116:15851(0x10fa9f000):ZOO_ERROR@handle_socket_error_msg@1603: > Socket [127.0.0.1:51378] zk retcode=-4, errno=64(Host is down): failed while > receiving a server response > I1026 00:05:39.116739 27279360 detector.cpp:378] Master detector lost > connection to ZooKeeper, attempting to reconnect ... > 2012-10-26 > 00:05:42,450:15851(0x10fa9f000):ZOO_ERROR@handle_socket_error_msg@1621: > Socket [127.0.0.1:51378] zk retcode=-112, errno=70(Stale NFS file handle): > sessionId=0x13a9be3f5b90000 has expired. > W1026 00:05:42.450742 27279360 detector.cpp:397] Master detector ZooKeeper > session expired! > I1026 00:05:42.454856 27279360 detector.cpp:286] Master detector connected to > ZooKeeper ... > I1026 00:05:42.454888 27279360 detector.cpp:303] Trying to create path > '/mesos' in ZooKeeper > I1026 00:05:42.501096 27279360 detector.cpp:467] Master detector found 1 > registered masters > ../../src/tests/zookeeper_tests.cpp:332: Failure > Failed > Waited too long for 'newMasterDetectedCall2' > ../../src/tests/zookeeper_tests.cpp:324: 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 > I1026 00:05:44.844130 1898458304 zookeeper_server.cpp:181] Shutdown > ZooKeeperServer on port 51378 > [ FAILED ] ZooKeeperTest.MasterDetectorExpireZKSession (5929 ms) > [----------] 1 test from ZooKeeperTest (5929 ms total) > > [----------] Global test environment tear-down > [==========] 1 test from 1 test case ran. (6147 ms total) > [ PASSED ] 0 tests. > [ FAILED ] 1 test, listed below: > [ FAILED ] ZooKeeperTest.MasterDetectorExpireZKSession > > > Test output after the fix: > > [vinod@VKone ~/workspace/apache/mesos/build (vinod/master_detector_fix)]$ > GLOG_v=1 ./bin/mesos-tests.sh --verbose > --gtest_filter="*ZooKeeperTest.MasterDetectorExpire*" > ... > ... > I1025 23:42:01.587967 26742784 detector.cpp:286] Master detector connected to > ZooKeeper ... > I1025 23:42:01.588099 26742784 detector.cpp:303] Trying to create path > '/mesos' in ZooKeeper > I1025 23:42:01.588544 27279360 detector.cpp:286] Master detector connected to > ZooKeeper ... > I1025 23:42:01.588577 27279360 detector.cpp:303] Trying to create path > '/mesos' in ZooKeeper > I1025 23:42:01.609194 26742784 detector.cpp:333] Created ephemeral/sequence > znode at '/mesos/0000000000' > I1025 23:42:01.610599 27279360 detector.cpp:467] Master detector found 1 > registered masters > I1025 23:42:01.610780 26742784 detector.cpp:467] Master detector found 1 > registered masters > I1025 23:42:01.613991 27279360 detector.cpp:502] Master detector got new > master pid: (1)@192.168.1.127:51025 > I1025 23:42:01.614141 26742784 detector.cpp:502] Master detector got new > master pid: (1)@192.168.1.127:51025 > 2012-10-25 > 23:42:01,616:12480(0x10faa8000):ZOO_ERROR@handle_socket_error_msg@1603: > Socket [127.0.0.1:51028] zk retcode=-4, errno=64(Host is down): failed while > receiving a server response > I1025 23:42:01.616317 26742784 detector.cpp:378] Master detector lost > connection to ZooKeeper, attempting to reconnect ... > 2012-10-25 > 23:42:04,950:12480(0x10faa8000):ZOO_ERROR@handle_socket_error_msg@1621: > Socket [127.0.0.1:51028] zk retcode=-112, errno=70(Stale NFS file handle): > sessionId=0x13a9bce54800001 has expired. > W1025 23:42:04.950316 26742784 detector.cpp:397] Master detector ZooKeeper > session expired! > I1025 23:42:04.954572 27815936 detector.cpp:286] Master detector connected to > ZooKeeper ... > I1025 23:42:04.954607 27815936 detector.cpp:303] Trying to create path > '/mesos' in ZooKeeper > I1025 23:42:05.008098 27815936 detector.cpp:467] Master detector found 1 > registered masters > I1025 23:42:05.008566 27815936 detector.cpp:502] Master detector got new > master pid: (1)@192.168.1.127:51025 > I1025 23:42:05.010418 1898458304 zookeeper_server.cpp:181] Shutdown > ZooKeeperServer on port 51028 > [ OK ] ZooKeeperTest.MasterDetectorExpireZKSession (3633 ms) > [----------] 1 test from ZooKeeperTest (3634 ms total) > > [----------] Global test environment tear-down > [==========] 1 test from 1 test case ran. (4068 ms total) > [ PASSED ] 1 test. > > > Thanks, > > Vinod Kone > >
