aboutsummaryrefslogtreecommitdiffstats
path: root/docker-api
diff options
context:
space:
mode:
authorvalerijf <valerijf@yahoo-inc.com>2016-09-14 16:24:30 +0200
committervalerijf <valerijf@yahoo-inc.com>2016-09-14 16:24:30 +0200
commit03b78c8896fe91869fd6a6f548321552e7065807 (patch)
treeac8208721c8d77f8ce05cc72df4c5bb77e5fc0f9 /docker-api
parent103fee83f0c984a21f654374c9257f6cbb5327a8 (diff)
Code review fixes
Diffstat (limited to 'docker-api')
-rw-r--r--docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java
index 05fe692ce7a..e5607bd0863 100644
--- a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java
+++ b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java
@@ -124,6 +124,7 @@ public class DockerImpl implements Docker {
private void setupDockerNetworkIfNeeded() throws IOException, InterruptedException {
if (! dockerClient.listNetworksCmd().withNameFilter(DOCKER_CUSTOM_MACVLAN_NETWORK_NAME).exec().isEmpty()) return;
+ // Use IPv6 address if there is a mix of IP4 and IPv6 by taking the longest address.
List<InetAddress> hostAddresses = Arrays.asList(InetAddress.getAllByName(com.yahoo.net.HostName.getLocalhost()));
InetAddress hostAddress = Collections.max(hostAddresses,
(o1, o2) -> o1.getAddress().length - o2.getAddress().length);
@@ -144,7 +145,6 @@ public class DockerImpl implements Docker {
.withDriver("macvlan")
.withEnableIpv6(true)
.withIpam(ipam)
- .withCheckDuplicate(true)
.withOptions(dockerNetworkOptions)
.exec();
}