Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ public class NetworkGlobalProperty {

@GlobalProperty(name = "bridge.disable.iptables", defaultValue = "false")
public static boolean BRIDGE_DISABLE_IPTABLES;

@GlobalProperty(name = "bridge.disable.ip6tables", defaultValue = "false")
public static boolean BRIDGE_DISABLE_IP6TABLES;
}
2 changes: 2 additions & 0 deletions plugin/kvm/src/main/java/org/zstack/kvm/KVMAgentCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -3840,6 +3840,7 @@ public static class RefreshAllRulesOnHostResponse extends AgentResponse {

public static class CheckDefaultSecurityGroupCmd extends AgentCommand {
Boolean skipIpv6;
Boolean disableIp6Tables;
}

public static class CheckDefaultSecurityGroupResponse extends AgentResponse {
Expand All @@ -3863,6 +3864,7 @@ public static class UpdateGroupMemberResponse extends AgentResponse {

public static class CleanupUnusedRulesOnHostCmd extends AgentCommand {
Boolean skipIpv6;
Boolean disableIp6Tables;
}

public static class CleanupUnusedRulesOnHostResponse extends AgentResponse {
Expand Down
4 changes: 2 additions & 2 deletions plugin/kvm/src/main/java/org/zstack/kvm/KVMHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -6235,8 +6235,8 @@ public void run(final FlowTrigger trigger, Map data) {
deployArguments.setInit("true");
runner.setFullDeploy(true);
}
if (NetworkGlobalProperty.SKIP_IPV6) {
deployArguments.setSkipIpv6("true");
if (NetworkGlobalProperty.SKIP_IPV6 || NetworkGlobalProperty.BRIDGE_DISABLE_IP6TABLES) {
deployArguments.setDisableIp6Tables("true");
}

for (KvmHostAgentDeploymentExtensionPoint ext : pluginRegistry.getExtensionList(KvmHostAgentDeploymentExtensionPoint.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class KVMHostDeployArguments extends SyncTimeRequestedDeployArguments {
private String init;
@SerializedName("skipIpv6")
private String skipIpv6;
@SerializedName("disableIp6Tables")
private String disableIp6Tables;
@SerializedName("isBareMetal2Gateway")
private String isBareMetal2Gateway;
@SerializedName("bridgeDisableIptables")
Expand Down Expand Up @@ -53,6 +55,14 @@ public void setSkipIpv6(String skipIpv6) {
this.skipIpv6 = skipIpv6;
}

public String getDisableIp6Tables() {
return disableIp6Tables;
}

public void setDisableIp6Tables(String disableIp6Tables) {
this.disableIp6Tables = disableIp6Tables;
}

public String getIsBareMetal2Gateway() {
return isBareMetal2Gateway;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void applyRules(final HostRuleTO hto, final Completion complete) {
@Override
public void checkDefaultRules(String hostUuid, Completion completion) {
CheckDefaultSecurityGroupCmd cmd = new CheckDefaultSecurityGroupCmd();
cmd.skipIpv6 = NetworkGlobalProperty.SKIP_IPV6;
cmd.disableIp6Tables = NetworkGlobalProperty.SKIP_IPV6 || NetworkGlobalProperty.BRIDGE_DISABLE_IP6TABLES;

KVMHostAsyncHttpCallMsg msg = new KVMHostAsyncHttpCallMsg();
msg.setHostUuid(hostUuid);
Expand Down Expand Up @@ -193,7 +193,7 @@ public void run(MessageReply reply) {
@Override
public void cleanUpUnusedRuleOnHost(String hostUuid, final Completion completion) {
KVMAgentCommands.CleanupUnusedRulesOnHostCmd cmd = new KVMAgentCommands.CleanupUnusedRulesOnHostCmd();
cmd.skipIpv6 = NetworkGlobalProperty.SKIP_IPV6;
cmd.disableIp6Tables = NetworkGlobalProperty.SKIP_IPV6 || NetworkGlobalProperty.BRIDGE_DISABLE_IP6TABLES;
KVMHostAsyncHttpCallMsg msg = new KVMHostAsyncHttpCallMsg();
msg.setHostUuid(hostUuid);
msg.setCommand(cmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ class MigrateVmSetDefaultRuleCase extends SubCase {

retryInSecs {
assert cmd != null
assert cmd.skipIpv6 == false
assert cmd.disableIp6Tables == false
assert ccmd != null
assert ccmd.skipIpv6 == false
assert ccmd.disableIp6Tables == false
}
}
}