Skip to content

Commit

Permalink
Issue 3630: Bookiefailovertest failure in docker swarm (pravega#3633)
Browse files Browse the repository at this point in the history
* Changes bookkeeper.bkAckQuorumSize to 3 in segmentstore

* Removes index-volumes mount from bookkeeper and explicitly sets BK_useHostNameAsBookieID to false

Signed-off-by: anishakj <[email protected]>
  • Loading branch information
anishakj authored and fpj committed Apr 16, 2019
1 parent 490864e commit 5c4ce97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ private ServiceSpec setServiceSpec() {
Map<String, String> labels = new HashMap<>();
labels.put("com.docker.swarm.service.name", serviceName);

Mount mount1 = Mount.builder().type("volume").source("index-volume").target("/bk/index")
.build();
Mount mount2 = Mount.builder().type("volume").source("bookkeeper-logs")
.target("/opt/dl_all/distributedlog-service/logs/")
.build();
Expand All @@ -76,10 +74,12 @@ private ServiceSpec setServiceSpec() {
String env2 = "ZK=" + zk;
String env3 = "bookiePort=" + String.valueOf(BK_PORT);
String env4 = "DLOG_EXTRA_OPTS=-Xms512m";
String env5 = "BK_useHostNameAsBookieID=false";
stringList.add(env1);
stringList.add(env2);
stringList.add(env3);
stringList.add(env4);
stringList.add(env5);

final TaskSpec taskSpec = TaskSpec
.builder().restartPolicy(RestartPolicy.builder().maxAttempts(1).condition(RESTART_POLICY_ANY).build())
Expand All @@ -88,7 +88,7 @@ private ServiceSpec setServiceSpec() {
.labels(labels)
.image(IMAGE_PATH + "nautilus/bookkeeper:" + PRAVEGA_VERSION)
.healthcheck(ContainerConfig.Healthcheck.builder().test(defaultHealthCheck(BK_PORT)).build())
.mounts(Arrays.asList(mount1, mount2))
.mounts(Arrays.asList(mount2))
.env(stringList).build())
.networks(NetworkAttachmentConfig.builder().target(DOCKER_NETWORK).aliases(serviceName).build())
.resources(ResourceRequirements.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ private ServiceSpec setServiceSpec() {
stringBuilderMap.put("log.level", "DEBUG");
stringBuilderMap.put("curator-default-session-timeout", String.valueOf(30 * 1000));
stringBuilderMap.put("hdfs.replaceDataNodesOnFailure", "false");
stringBuilderMap.put("bookkeeper.bkAckQuorumSize", "3");
for (Map.Entry<String, String> entry : stringBuilderMap.entrySet()) {
systemPropertyBuilder.append("-D").append(entry.getKey()).append("=").append(entry.getValue()).append(" ");
}
Expand Down

0 comments on commit 5c4ce97

Please sign in to comment.