-
Notifications
You must be signed in to change notification settings - Fork 370
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
Fix Clean-AntreaNetwork.ps1 invocation in Prepare-AntreaAgent.ps1 #5859
Fix Clean-AntreaNetwork.ps1 invocation in Prepare-AntreaAgent.ps1 #5859
Conversation
hack/windows/Clean-AntreaNetwork.ps1
Outdated
@@ -128,6 +128,9 @@ switch ($OVSRunMode) | |||
} | |||
} | |||
"container" { | |||
# In container mode, OVS services run in containers, not as host services. | |||
# We can remove host services if they exist. | |||
RemoveOVSService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bit tricky to remove OVS services when specifying that $OVSRunMode=container.
Write-Host "Cleaning stale Antrea network resources if they exist..." | ||
& $CleanAntreaNetworkScript | ||
& $CleanAntreaNetworkScript -OVSRunMode $ovsRunMode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We called $CleanAntreaNetworkScript
is just to clean-up antrea-hns network. If we add "remove OVS service" here, it may break the prepare-AntreaAgent script in this scenario: for the first time, we call "./Prepare-AntreaAgent.ps1 -RunOVSServices $false", for the second time , we call "./Prepare-AntreaAgent.ps1 -RunOVSServices $true". The second run would fail because OVS services are removed.
If the purpose is just to remove OVS services (e.g. we want to update Windows host from running OVS as service to running inside container), we can use a separate call "./Clean-AntreaNetwork.ps1 -RemoveOVS $true -OVSRunMode service"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove the call to RemoveOVSService
in Clean-AntreaNetwork.ps1
In "containerized OVS" mode, Clean-AntreaNetwork.ps1 should be invoked with `-OVSRunMode "container"`. Fixes antrea-io#5852 Signed-off-by: Antonin Bas <[email protected]>
9f3fcbb
to
c744726
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/skip-all |
In "containerized OVS" mode, Clean-AntreaNetwork.ps1 should be invoked with
-OVSRunMode "container"
.Fixes #5852