You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2014/07/30 16:26:54 UTC
git commit: updated refs/heads/master to 74862fa
Repository: cloudstack
Updated Branches:
refs/heads/master e1be03587 -> 74862fada
CLOUDSTACK-7121: Make IPv6 preference over IPv4 configurable
Also set the logging to info instead of debug
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/74862fad
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/74862fad
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/74862fad
Branch: refs/heads/master
Commit: 74862fada51d18f554ed423900b39765be73ffec
Parents: e1be035
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Wed Jul 30 16:26:09 2014 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Wed Jul 30 16:26:09 2014 +0200
----------------------------------------------------------------------
agent/src/com/cloud/agent/AgentShell.java | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/74862fad/agent/src/com/cloud/agent/AgentShell.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/AgentShell.java b/agent/src/com/cloud/agent/AgentShell.java
index 230bafc..67b7b2f 100644
--- a/agent/src/com/cloud/agent/AgentShell.java
+++ b/agent/src/com/cloud/agent/AgentShell.java
@@ -424,11 +424,25 @@ public class AgentShell implements IAgentShell, Daemon {
ipv6disabled = Boolean.parseBoolean(ipv6);
}
+ boolean ipv6prefer = false;
+ String ipv6p = getProperty(null, "ipv6prefer");
+ if (ipv6p != null) {
+ ipv6prefer = Boolean.parseBoolean(ipv6p);
+ }
+
if (ipv6disabled) {
- s_logger.debug("Preferring IPv4 address family for agent connection");
+ s_logger.info("Preferring IPv4 address family for agent connection");
System.setProperty("java.net.preferIPv4Stack", "true");
+ if (ipv6prefer) {
+ s_logger.info("ipv6prefer is set to true, but ipv6disabled is false. Not preferring IPv6 for agent connection");
+ }
} else {
- s_logger.debug("Preferring IPv6 address family for agent connection");
+ if (ipv6prefer) {
+ s_logger.info("Preferring IPv6 address family for agent connection");
+ System.setProperty("java.net.preferIPv6Addresses", "true");
+ } else {
+ s_logger.info("Using default Java settings for IPv6 preference for agent connection");
+ }
}
String instance = getProperty(null, "instance");