Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #5859: Fix Clean-AntreaNetwork.ps1 invocation in #5866

Merged
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
2 changes: 1 addition & 1 deletion hack/windows/Clean-AntreaNetwork.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Remove ovsdb-server and ovs-vswitchd services fom the host. The default value is $false. If this argument is set
as true, this script would remove the two Windows services from the host. Otherwise, we consider that these
services are supposed to be running on the host, so the script would try to recover them if their statuses are
not as expected.
not as expected. The parameter is ignored when OVSRunMode is "container".
.PARAMETER OVSRunMode
OVS run mode can be <container> if OVS userspace processes were running inside a container in antrea-agent Pod
or <service> if OVS userspace processes were running as a Service on host. Default mode is <service>.
Expand Down
6 changes: 5 additions & 1 deletion hack/windows/Prepare-AntreaAgent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ if ($AntreaHnsNetwork) {
}
}
if ($NeedCleanNetwork) {
$ovsRunMode = "service"
if ($RunOVSServices -eq $false) {
$ovsRunMode = "container"
}
Write-Host "Cleaning stale Antrea network resources if they exist..."
& $CleanAntreaNetworkScript
& $CleanAntreaNetworkScript -OVSRunMode $ovsRunMode
}
# Enure OVS services are running.
Write-Host "Starting ovsdb-server service..."
Expand Down