[GitHub] [zookeeper] symat edited a comment on pull request #1356: ZOOKEEPER-3829: backward compatibility fix for rolling restart without dynamic reconfig

2020-05-26 Thread GitBox


symat edited a comment on pull request #1356:
URL: https://github.com/apache/zookeeper/pull/1356#issuecomment-633604783







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [zookeeper] shralex commented on pull request #1356: ZOOKEEPER-3829: backward compatibility fix for rolling restart without dynamic reconfig

2020-05-26 Thread GitBox


shralex commented on pull request #1356:
URL: https://github.com/apache/zookeeper/pull/1356#issuecomment-633711162







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [zookeeper] symat commented on a change in pull request #1356: ZOOKEEPER-3829: backward compatibility fix for rolling restart without dynamic reconfig

2020-05-26 Thread GitBox


symat commented on a change in pull request #1356:
URL: https://github.com/apache/zookeeper/pull/1356#discussion_r430210333



##
File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java
##
@@ -943,6 +944,7 @@ public synchronized boolean tryToCommit(Proposal p, long 
zxid, SocketAddress fol
 self.processReconfig(newQV, designatedLeader, zk.getZxid(), true);
 
 if (designatedLeader != self.getId()) {
+LOG.info("Committing a reconfiguration; this leader is not the 
designated leader anymore, setting allowedToCommit = false");

Review comment:
   thanks, good idea

##
File path: 
zookeeper-server/src/test/java/org/apache/zookeeper/test/ReconfigExceptionTest.java
##
@@ -90,6 +90,16 @@ public void tearDown() throws Exception {
 @Test(timeout = 1)
 public void testReconfigDisabled() throws InterruptedException {
 QuorumPeerConfig.setReconfigEnabled(false);
+
+// for thsi test we need to restart the quorum peers to get the config 
change,

Review comment:
   thanks!

##
File path: 
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigRollingRestartCompatibilityTest.java
##
@@ -209,6 +209,237 @@ public void testRollingRestartWithMembershipChange() 
throws Exception {
 }
 }
 
+@Test
+public void testRollingRestartWithExtendedMembershipConfig() throws 
Exception {
+// in this test we are performing rolling restart with extended quorum 
config, see ZOOKEEPER-3829
+
+// Start a quorum with 3 members
+int serverCount = 3;
+String config = generateNewQuorumConfig(serverCount);
+QuorumPeerTestBase.MainThread[] mt = new 
QuorumPeerTestBase.MainThread[serverCount];
+List joiningServers = new ArrayList<>();
+for (int i = 0; i < serverCount; i++) {
+mt[i] = new QuorumPeerTestBase.MainThread(i, clientPorts.get(i), 
config, false);
+mt[i].start();
+joiningServers.add(serverAddress.get(i));
+}
+for (int i = 0; i < serverCount; i++) {
+assertTrue("waiting for server " + i + " being up", 
ClientBase.waitForServerUp("127.0.0.1:" + clientPorts.get(i), 
CONNECTION_TIMEOUT));
+}
+for (int i = 0; i < serverCount; i++) {
+verifyQuorumConfig(i, joiningServers, null);
+verifyQuorumMembers(mt[i]);
+}
+
+// Create updated config with 4 members
+List newServers = new ArrayList<>(joiningServers);
+config = updateExistingQuorumConfig(Arrays.asList(3), new 
ArrayList<>());
+newServers.add(serverAddress.get(3));
+serverCount = serverAddress.size();
+assertEquals("Server count should be 4 after config update.", 
serverCount, 4);
+
+// We are adding one new server to the ensemble. The new server should 
be started with the new config
+mt = Arrays.copyOf(mt, mt.length + 1);
+mt[3] = new QuorumPeerTestBase.MainThread(3, clientPorts.get(3), 
config, false);
+mt[3].start();
+assertTrue("waiting for server 3 being up", 
ClientBase.waitForServerUp("127.0.0.1:" + clientPorts.get(3), 
CONNECTION_TIMEOUT));
+verifyQuorumConfig(3, newServers, null);
+verifyQuorumMembers(mt[3]);
+
+// Now we restart the first 3 servers, one-by-one with the new config
+for (int i = 0; i < 3; i++) {
+mt[i].shutdown();
+
+assertTrue(String.format("Timeout during waiting for server %d to 
go down", i),
+   ClientBase.waitForServerDown("127.0.0.1:" + 
clientPorts.get(i), ClientBase.CONNECTION_TIMEOUT));
+
+mt[i] = new QuorumPeerTestBase.MainThread(i, clientPorts.get(i), 
config, false);
+mt[i].start();
+assertTrue("waiting for server " + i + " being up", 
ClientBase.waitForServerUp("127.0.0.1:" + clientPorts.get(i), 
CONNECTION_TIMEOUT));
+verifyQuorumConfig(i, newServers, null);
+verifyQuorumMembers(mt[i]);
+}
+
+// now verify that all nodes can handle traffic
+for (int i = 0; i < 4; ++i) {
+ZooKeeper zk = ClientBase.createZKClient("127.0.0.1:" + 
clientPorts.get(i));
+ReconfigTest.testNormalOperation(zk, zk, false);
+}
+
+for (int i = 0; i < 4; ++i) {
+mt[i].shutdown();
+}
+}
+
+
+@Test
+public void 
testRollingRestartWithExtendedMembershipConfigRestartingLeaderFirst() throws 
Exception {
+// in this test we are performing rolling restart with extended quorum 
config, see ZOOKEEPER-3829
+// first we start the new nodes, then restart the current leader
+// this is a special case, as the old servers will not be able to join 
to the new nodes after they became leader
+
+// Start a quorum with 3 members
+int serverCount = 3;
+String config = generateNewQuorum

[GitHub] [zookeeper] symat commented on pull request #1356: ZOOKEEPER-3829: backward compatibility fix for rolling restart without dynamic reconfig

2020-05-26 Thread GitBox


symat commented on pull request #1356:
URL: https://github.com/apache/zookeeper/pull/1356#issuecomment-633604783







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [zookeeper] shralex commented on a change in pull request #1356: ZOOKEEPER-3829: backward compatibility fix for rolling restart without dynamic reconfig

2020-05-26 Thread GitBox


shralex commented on a change in pull request #1356:
URL: https://github.com/apache/zookeeper/pull/1356#discussion_r430061009



##
File path: 
zookeeper-server/src/test/java/org/apache/zookeeper/test/ReconfigExceptionTest.java
##
@@ -90,6 +90,16 @@ public void tearDown() throws Exception {
 @Test(timeout = 1)
 public void testReconfigDisabled() throws InterruptedException {
 QuorumPeerConfig.setReconfigEnabled(false);
+
+// for thsi test we need to restart the quorum peers to get the config 
change,

Review comment:
   typo thsi

##
File path: 
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigRollingRestartCompatibilityTest.java
##
@@ -209,6 +209,237 @@ public void testRollingRestartWithMembershipChange() 
throws Exception {
 }
 }
 
+@Test
+public void testRollingRestartWithExtendedMembershipConfig() throws 
Exception {
+// in this test we are performing rolling restart with extended quorum 
config, see ZOOKEEPER-3829
+
+// Start a quorum with 3 members
+int serverCount = 3;
+String config = generateNewQuorumConfig(serverCount);
+QuorumPeerTestBase.MainThread[] mt = new 
QuorumPeerTestBase.MainThread[serverCount];
+List joiningServers = new ArrayList<>();
+for (int i = 0; i < serverCount; i++) {
+mt[i] = new QuorumPeerTestBase.MainThread(i, clientPorts.get(i), 
config, false);
+mt[i].start();
+joiningServers.add(serverAddress.get(i));
+}
+for (int i = 0; i < serverCount; i++) {
+assertTrue("waiting for server " + i + " being up", 
ClientBase.waitForServerUp("127.0.0.1:" + clientPorts.get(i), 
CONNECTION_TIMEOUT));
+}
+for (int i = 0; i < serverCount; i++) {
+verifyQuorumConfig(i, joiningServers, null);
+verifyQuorumMembers(mt[i]);
+}
+
+// Create updated config with 4 members
+List newServers = new ArrayList<>(joiningServers);
+config = updateExistingQuorumConfig(Arrays.asList(3), new 
ArrayList<>());
+newServers.add(serverAddress.get(3));
+serverCount = serverAddress.size();
+assertEquals("Server count should be 4 after config update.", 
serverCount, 4);
+
+// We are adding one new server to the ensemble. The new server should 
be started with the new config
+mt = Arrays.copyOf(mt, mt.length + 1);
+mt[3] = new QuorumPeerTestBase.MainThread(3, clientPorts.get(3), 
config, false);
+mt[3].start();
+assertTrue("waiting for server 3 being up", 
ClientBase.waitForServerUp("127.0.0.1:" + clientPorts.get(3), 
CONNECTION_TIMEOUT));
+verifyQuorumConfig(3, newServers, null);
+verifyQuorumMembers(mt[3]);
+
+// Now we restart the first 3 servers, one-by-one with the new config
+for (int i = 0; i < 3; i++) {
+mt[i].shutdown();
+
+assertTrue(String.format("Timeout during waiting for server %d to 
go down", i),
+   ClientBase.waitForServerDown("127.0.0.1:" + 
clientPorts.get(i), ClientBase.CONNECTION_TIMEOUT));
+
+mt[i] = new QuorumPeerTestBase.MainThread(i, clientPorts.get(i), 
config, false);
+mt[i].start();
+assertTrue("waiting for server " + i + " being up", 
ClientBase.waitForServerUp("127.0.0.1:" + clientPorts.get(i), 
CONNECTION_TIMEOUT));
+verifyQuorumConfig(i, newServers, null);
+verifyQuorumMembers(mt[i]);
+}
+
+// now verify that all nodes can handle traffic
+for (int i = 0; i < 4; ++i) {
+ZooKeeper zk = ClientBase.createZKClient("127.0.0.1:" + 
clientPorts.get(i));
+ReconfigTest.testNormalOperation(zk, zk, false);
+}
+
+for (int i = 0; i < 4; ++i) {
+mt[i].shutdown();
+}
+}
+
+
+@Test
+public void 
testRollingRestartWithExtendedMembershipConfigRestartingLeaderFirst() throws 
Exception {
+// in this test we are performing rolling restart with extended quorum 
config, see ZOOKEEPER-3829
+// first we start the new nodes, then restart the current leader
+// this is a special case, as the old servers will not be able to join 
to the new nodes after they became leader
+
+// Start a quorum with 3 members
+int serverCount = 3;
+String config = generateNewQuorumConfig(serverCount);
+QuorumPeerTestBase.MainThread[] mt = new 
QuorumPeerTestBase.MainThread[serverCount];
+List joiningServers = new ArrayList<>();
+for (int i = 0; i < serverCount; i++) {
+mt[i] = new QuorumPeerTestBase.MainThread(i, clientPorts.get(i), 
config, false);
+mt[i].start();
+joiningServers.add(serverAddress.get(i));
+}
+for (int i = 0; i < serverCount; i++) {
+assertTrue("waiting for server " + i + " being up", 
ClientBase.w

Jenkins build is back to stable : zookeeper-master-maven #820

2020-05-26 Thread Apache Jenkins Server
See 



ZooKeeper_branch34_jdk8 - Build # 2174 - Still Failing

2020-05-26 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_jdk8/2174/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 43.44 KB...]
[junit] Running org.apache.zookeeper.test.RestoreCommittedLogTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
34.285 sec
[junit] Running org.apache.zookeeper.test.SaslAuthDesignatedClientTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.064 sec
[junit] Running org.apache.zookeeper.test.SaslAuthDesignatedServerTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.668 sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailDesignatedClientTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.536 sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailNotifyTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.6 
sec
[junit] Running org.apache.zookeeper.test.SaslAuthFailTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.693 sec
[junit] Running org.apache.zookeeper.test.SaslAuthMissingClientConfigTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.589 sec
[junit] Running org.apache.zookeeper.test.SaslClientTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.087 sec
[junit] Running org.apache.zookeeper.test.SessionInvalidationTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.697 sec
[junit] Running org.apache.zookeeper.test.SessionTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
11.855 sec
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.867 sec
[junit] Running org.apache.zookeeper.test.StandaloneTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.875 sec
[junit] Running org.apache.zookeeper.test.StatTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.462 sec
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest
[junit] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.167 sec
[junit] Running org.apache.zookeeper.test.SyncCallTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.664 sec
[junit] Running org.apache.zookeeper.test.TruncateTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
11.995 sec
[junit] Running org.apache.zookeeper.test.UpgradeTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.978 sec
[junit] Running org.apache.zookeeper.test.WatchedEventTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.37 sec
[junit] Running org.apache.zookeeper.test.WatcherFuncTest
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.391 sec
[junit] Running org.apache.zookeeper.test.WatcherTest
[junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
30.692 sec
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
11.803 sec
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.675 sec
[junit] Running org.apache.jute.BinaryInputArchiveTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.087 sec

fail.build.on.test.failure:

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk8/build.xml:1425: 
The following error occurred while executing this line:
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_jdk8/build.xml:1428: 
Tests failed!

Total time: 48 minutes 5 seconds
Build step 'Invoke Ant' marked build as failure
Archiving artifacts
Recording test results
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
3 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.auth.QuorumKerberosAuthTest.testValidCredentials

Error Message:
waiting for server 0 being up

Stack Trace:
junit.framework.AssertionFailedError: waiting for server 0 being up
at 
org.apache.zookeeper.server.quorum.auth.QuorumAuthTestBase.startQuorum(QuorumAuthTestBase.java:75)
at 
org.apache.zookeeper.server.quorum.auth.QuorumKerberosAuthTest.testValidCredentials(QuorumKerberosAuthTest.java:114)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:55

Jenkins build is back to stable : zookeeper-master-maven-jdk12 #524

2020-05-26 Thread Apache Jenkins Server
See 




Jenkins build is back to normal : PreCommit-ZOOKEEPER-github-pr-build-maven #2079

2020-05-26 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : PreCommit-ZOOKEEPER-github-pr-build-maven #2077

2020-05-26 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: PreCommit-ZOOKEEPER-github-pr-build-maven #2076

2020-05-26 Thread Apache Jenkins Server
See 




Jenkins build became unstable: zookeeper-master-maven-jdk14 #110

2020-05-26 Thread Apache Jenkins Server
See 




Jenkins build became unstable: PreCommit-ZOOKEEPER-github-pr-build-maven #2075

2020-05-26 Thread Apache Jenkins Server
See