Skip to content

Conversation

@tamilmani1989
Copy link
Member

@tamilmani1989 tamilmani1989 commented May 26, 2021

Reason for Change:

Disable cleaning up hns network and state files from windows cni. Since state and hns network is cleaned up by CRI startup script, no need for cni to cleanup those.

Issue Fixed:

Requirements:

Notes:
This PR is workaround for the issue: #947

@ashvindeodhar
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

cnm/ipam/ipam.go Outdated
requiresRequestReplay = false
returnCode = 0
returnStr = "Success"
rehydrateIpamInfoOnReboot = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this should be "false"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not cni..true for cnm

@AbelHu
Copy link
Member

AbelHu commented Jul 19, 2021

Since state and hns network is cleaned up by CRI startup script, no need for cni to cleanup those. @tamilmani1989 what is the CRI startup script? Do you mean that kubeletstart.ps1 in aks-engine?

@tamilmani1989
Copy link
Member Author

Since state and hns network is cleaned up by CRI startup script, no need for cni to cleanup those. @tamilmani1989 what is the CRI startup script? Do you mean that kubeletstart.ps1 in aks-engine?

Nope this one: https://github.com/Azure/aks-engine/blob/master/staging/provisioning/windows/cleanupnetwork.ps1

Copy link
Collaborator

@rbtr rbtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking on gofmt

cni/ipam/ipam.go Outdated

const (
ipamV6 = "azure-vnet-ipamv6"
rehydrateIpamInfoOnReboot = false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs gofmt


const (
rehydrateNetworkInfoOnReboot = false
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplify single declaration

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a constant false? this just hides whatever the real test is from me when I read the code where it is checked (like, is this actually a "is running on windows" bit?)
I think it would be much clearer if, where ever we use this conditional, we were checking the actual underlying condition that makes this switch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope this is not running on windows.. cnm and cni uses same code path. have to rehydrate for cnm but not for cni

)

const (
snatConfigFileName = "/tmp/snatConfig"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplify single declaration

@tamilmani1989
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tamilmani1989
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tamilmani1989
Copy link
Member Author

auto trigger pipeline getting failed due to some infra issue. Manually triggered pipeline for this PR: https://msazure.visualstudio.com/One/_build/results?buildId=44757594&view=results

@tamilmani1989
Copy link
Member Author

@tamilmani1989 tamilmani1989 merged commit b63e523 into Azure:master Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants