diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 761970b5bf..6866c693fb 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -120,6 +120,7 @@ stages: echo "Deploy Azure-CNS" sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=$(make azure-ipam-version) CNS_VERSION=$(make cns-version) INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) kubectl get po -owide -A + kubectl get crd -A - ${{if eq(parameters.hubbleEnabled, true)}}: - job: deploy_cilium_components displayName: Deploy Cilium with Hubble @@ -154,6 +155,7 @@ stages: echo "Deploy Azure-CNS" sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=$(make azure-ipam-version) CNS_VERSION=$(make cns-version) INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) kubectl get po -owide -A + kubectl get crd -A - job: deploy_pods condition: and( and( not(canceled()), not(failed()) ), or( contains(variables.CONTROL_SCENARIO, 'scaleTest') , contains(variables.CONTROL_SCENARIO, 'all') ) ) diff --git a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml index a34fdf5d7d..2661c09157 100644 --- a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml @@ -65,6 +65,7 @@ steps: echo "Waiting < 2 minutes for cilium to be ready" # Ensure Cilium is ready Xm\Xs cilium status --wait --wait-duration 2m + kubectl get crd -A retryCountOnTaskFailure: 3 name: "CiliumStatus" displayName: "Cilium Status" diff --git a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e.steps.yaml b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e.steps.yaml index 6a4a28c721..e777082f9b 100644 --- a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e.steps.yaml +++ b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e.steps.yaml @@ -49,6 +49,7 @@ steps: envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY},${IPV6_HP_BPF_VERSION}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset-dualstack.yaml | kubectl apply -f - envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A + kubectl get crd -A name: "installCilium" displayName: "Install Cilium on AKS Dualstack Overlay" diff --git a/.pipelines/singletenancy/cilium-nodesubnet/cilium-nodesubnet-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-nodesubnet/cilium-nodesubnet-e2e-step-template.yaml index 242ec88bd9..f3b488ade5 100644 --- a/.pipelines/singletenancy/cilium-nodesubnet/cilium-nodesubnet-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-nodesubnet/cilium-nodesubnet-e2e-step-template.yaml @@ -69,6 +69,7 @@ steps: envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset.yaml | kubectl apply -f - envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A + kubectl get crd -A name: "installCilium" displayName: "Install Cilium" diff --git a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml index cc3d1709c9..7a81685b85 100644 --- a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml @@ -69,6 +69,7 @@ steps: echo "Waiting < 2 minutes for cilium to be ready" # Ensure Cilium is ready Xm\Xs cilium status --wait --wait-duration 2m + kubectl get crd -A retryCountOnTaskFailure: 3 name: "CiliumStatus" displayName: "Cilium Status" diff --git a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e.steps.yaml b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e.steps.yaml index fcf07d60f9..987c52d05f 100644 --- a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e.steps.yaml +++ b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e.steps.yaml @@ -64,6 +64,7 @@ steps: echo "Waiting < 2 minutes for cilium to be ready" # Ensure Cilium is ready Xm\Xs cilium status --wait --wait-duration 2m + kubectl get crd -A retryCountOnTaskFailure: 3 name: "CiliumStatus" displayName: "Cilium Status" diff --git a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml index 2a17bbe0d8..7a1a4342de 100644 --- a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml @@ -91,6 +91,7 @@ steps: echo "Waiting < 2 minutes for cilium to be ready" # Ensure Cilium is ready Xm\Xs cilium status --wait --wait-duration 2m + kubectl get crd -A retryCountOnTaskFailure: 3 name: "CiliumStatus" displayName: "Cilium Status" diff --git a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e.steps.yaml b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e.steps.yaml index ae2fcae814..195e295117 100644 --- a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e.steps.yaml +++ b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e.steps.yaml @@ -86,6 +86,7 @@ steps: echo "Waiting < 2 minutes for cilium to be ready" # Ensure Cilium is ready Xm\Xs cilium status --wait --wait-duration 2m + kubectl get crd -A retryCountOnTaskFailure: 3 name: "CiliumStatus" displayName: "Cilium Status" diff --git a/.pipelines/singletenancy/cilium/cilium-e2e.steps.yaml b/.pipelines/singletenancy/cilium/cilium-e2e.steps.yaml index 88bc15f8e6..69bc3a734e 100644 --- a/.pipelines/singletenancy/cilium/cilium-e2e.steps.yaml +++ b/.pipelines/singletenancy/cilium/cilium-e2e.steps.yaml @@ -64,6 +64,7 @@ steps: echo "Waiting < 2 minutes for cilium to be ready" # Ensure Cilium is ready Xm\Xs cilium status --wait --wait-duration 2m + kubectl get crd -A retryCountOnTaskFailure: 3 name: "CiliumStatus" displayName: "Cilium Status" diff --git a/.pipelines/templates/cilium-tests.yaml b/.pipelines/templates/cilium-tests.yaml index cc393a09b3..6821e4ec56 100644 --- a/.pipelines/templates/cilium-tests.yaml +++ b/.pipelines/templates/cilium-tests.yaml @@ -4,6 +4,7 @@ steps: echo "Waiting < 2 minutes for cilium to be ready" # Ensure Cilium is ready Xm\Xs cilium status --wait --wait-duration 2m + kubectl get crd -A retryCountOnTaskFailure: 3 name: "CiliumStatus" displayName: "Cilium Status" diff --git a/build/tools/go.mod b/build/tools/go.mod index f991912620..89448cba89 100644 --- a/build/tools/go.mod +++ b/build/tools/go.mod @@ -11,7 +11,7 @@ require ( github.com/golangci/golangci-lint v1.63.4 github.com/jstemmer/go-junit-report v1.0.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 - google.golang.org/protobuf v1.36.2 + google.golang.org/protobuf v1.36.3 mvdan.cc/gofumpt v0.7.0 sigs.k8s.io/controller-tools v0.16.3 ) diff --git a/build/tools/go.sum b/build/tools/go.sum index f26beb8a17..4ad117aa9f 100644 --- a/build/tools/go.sum +++ b/build/tools/go.sum @@ -606,8 +606,8 @@ google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA= -google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= -google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/cns/service/main.go b/cns/service/main.go index f242c3da84..f8235bba9e 100644 --- a/cns/service/main.go +++ b/cns/service/main.go @@ -799,11 +799,15 @@ func main() { } // Setting the remote ARP MAC address to 12-34-56-78-9a-bc on windows for external traffic if HNS is enabled - err = platform.SetSdnRemoteArpMacAddress(rootCtx) + arpCtx, arpCtxCancel := context.WithTimeout(rootCtx, 30*time.Second) + err = platform.SetSdnRemoteArpMacAddress(arpCtx) if err != nil { logger.Errorf("Failed to set remote ARP MAC address: %v", err) + arpCtxCancel() return } + arpCtxCancel() + // We are only setting the PriorityVLANTag in 'cns.Direct' mode, because it neatly maps today, to 'isUsingMultitenancy' // In the future, we would want to have a better CNS flag, to explicitly say, this CNS is using multitenancy if cnsconfig.ChannelMode == cns.Direct { diff --git a/go.mod b/go.mod index 1888537ee0..531ec8bf86 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.23.2 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1 github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets v0.12.0 github.com/Masterminds/semver v1.5.0 github.com/Microsoft/go-winio v0.6.2 @@ -41,7 +41,7 @@ require ( golang.org/x/sys v0.29.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/grpc v1.69.2 - google.golang.org/protobuf v1.36.2 + google.golang.org/protobuf v1.36.3 gopkg.in/natefinch/lumberjack.v2 v2.2.1 k8s.io/api v0.30.7 k8s.io/apiextensions-apiserver v0.30.1 @@ -57,7 +57,7 @@ require ( code.cloudfoundry.org/clock v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-iptables v0.8.0 @@ -160,9 +160,9 @@ replace ( github.com/onsi/gomega => github.com/onsi/gomega v1.10.0 ) -retract ( - v1.15.22 // typo in the version number. - v1.16.15 // typo in the version number. - v1.16.16 // contains only retractions, has to be newer than 1.16.15. - v1.16.17 // contains only retractions, new version to retract 1.15.22. +retract ( + v1.16.17 // contains only retractions, new version to retract 1.15.22. + v1.16.16 // contains only retractions, has to be newer than 1.16.15. + v1.16.15 // typo in the version number. + v1.15.22 // typo in the version number. ) diff --git a/go.sum b/go.sum index 0b745c17ec..61e28ade6b 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,10 @@ code.cloudfoundry.org/clock v1.0.0 h1:kFXWQM4bxYvdBw2X8BbBeXwQNgfoWv1vqAk2ZZyBN2 code.cloudfoundry.org/clock v1.0.0/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 h1:g0EZJwz7xkXQiZAI5xi9f3WWFYBlX1CPTrR+NDToRkQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0/go.mod h1:XCW7KnZet0Opnr7HccfUw1PLc4CjHqpcaxW8DHklNkQ= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 h1:B/dfvscEQtew9dVuoxqxrUKKv8Ih2f55PydknDamU+g= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0/go.mod h1:fiPSssYvltE08HJchL04dOy+RD4hgrjph0cwGGMntdI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0 h1:+m0M/LFxN43KvULkDNfdXOgrjtg6UYJPFBJyuEcRCAw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0/go.mod h1:PwOyop78lveYMRs6oCxjiVyBdyCgIYH6XHIVZO9/SFQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1 h1:1mvYtZfWQAnwNah/C+Z+Jb9rQH95LPE2vlmMuWAHJk8= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1/go.mod h1:75I/mXtme1JyWFtz8GocPHVFyH421IBoZErnO16dd0k= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.1 h1:Bk5uOhSAenHyR5P61D/NzeQCv+4fEVV8mOkJ82NqpWw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.1/go.mod h1:QZ4pw3or1WPmRBxf0cHd1tknzrT54WPBOQoGutCPvSU= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets v0.12.0 h1:xnO4sFyG8UH2fElBkcqLTOZsAajvKfnSlgBBW8dXYjw= @@ -32,8 +32,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1. github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 h1:kYRSnvJju5gYVyhkij+RTJ/VR6QIUaCfWeaFm2ycsjQ= +github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= @@ -249,8 +249,8 @@ github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFS github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= -github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA= +github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= +github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -426,8 +426,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= -google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/platform/os_windows.go b/platform/os_windows.go index c76b8a7042..1ce81b24d8 100644 --- a/platform/os_windows.go +++ b/platform/os_windows.go @@ -247,6 +247,18 @@ func (p *execClient) ExecutePowershellCommandWithContext(ctx context.Context, co // SetSdnRemoteArpMacAddress sets the regkey for SDNRemoteArpMacAddress needed for multitenancy if hns is enabled func SetSdnRemoteArpMacAddress(ctx context.Context) error { + if err := setSDNRemoteARPRegKey(); err != nil { + return err + } + log.Printf("SDNRemoteArpMacAddress regKey set successfully") + if err := restartHNS(ctx); err != nil { + return err + } + log.Printf("HNS service restarted successfully") + return nil +} + +func setSDNRemoteARPRegKey() error { log.Printf("Setting SDNRemoteArpMacAddress regKey") // open the registry key k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SYSTEM\CurrentControlSet\Services\hns\State`, registry.READ|registry.SET_VALUE) @@ -265,7 +277,10 @@ func SetSdnRemoteArpMacAddress(ctx context.Context) error { if err = k.SetStringValue("SDNRemoteArpMacAddress", SDNRemoteArpMacAddress); err != nil { return errors.Wrap(err, "could not set registry key") } - log.Printf("SDNRemoteArpMacAddress regKey set successfully") + return nil +} + +func restartHNS(ctx context.Context) error { log.Printf("Restarting HNS service") // connect to the service manager m, err := mgr.Connect() @@ -279,16 +294,8 @@ func SetSdnRemoteArpMacAddress(ctx context.Context) error { return errors.Wrap(err, "could not access service") } defer service.Close() - if err := restartService(ctx, service); err != nil { - return errors.Wrap(err, "could not restart service") - } - log.Printf("HNS service restarted successfully") - return nil -} - -func restartService(ctx context.Context, s *mgr.Service) error { // Stop the service - _, err := s.Control(svc.Stop) + _, err = service.Control(svc.Stop) if err != nil { return errors.Wrap(err, "could not stop service") } @@ -296,7 +303,7 @@ func restartService(ctx context.Context, s *mgr.Service) error { ticker := time.NewTicker(500 * time.Millisecond) //nolint:gomnd // 500ms defer ticker.Stop() for { // hacky cancellable do-while - status, err := s.Query() + status, err := service.Query() if err != nil { return errors.Wrap(err, "could not query service status") } @@ -310,7 +317,7 @@ func restartService(ctx context.Context, s *mgr.Service) error { } } // Start the service again - if err := s.Start(); err != nil { + if err := service.Start(); err != nil { return errors.Wrap(err, "could not start service") } return nil diff --git a/test/integration/manifests/cilium/cilium-nightly-config.yaml b/test/integration/manifests/cilium/cilium-nightly-config.yaml index 09cb637462..09145ec643 100644 --- a/test/integration/manifests/cilium/cilium-nightly-config.yaml +++ b/test/integration/manifests/cilium/cilium-nightly-config.yaml @@ -9,6 +9,7 @@ data: bpf-map-dynamic-size-ratio: "0.0025" bpf-policy-map-max: "16384" bpf-root: /sys/fs/bpf + ces-slice-mode: fcfs cgroup-root: /run/cilium/cgroupv2 cilium-endpoint-gc-interval: 5m0s cluster-id: "0" @@ -19,6 +20,7 @@ data: enable-auto-protect-node-port-range: "true" enable-bgp-control-plane: "false" enable-bpf-clock-probe: "true" + enable-cilium-endpoint-slice: "true" enable-endpoint-health-checking: "false" enable-endpoint-routes: "true" enable-health-check-nodeport: "true" diff --git a/test/integration/manifests/cilium/v1.13/cilium-operator/templates/deployment.yaml b/test/integration/manifests/cilium/v1.13/cilium-operator/templates/deployment.yaml index cdc0e79d83..df782a03e8 100644 --- a/test/integration/manifests/cilium/v1.13/cilium-operator/templates/deployment.yaml +++ b/test/integration/manifests/cilium/v1.13/cilium-operator/templates/deployment.yaml @@ -38,6 +38,8 @@ spec: - --debug=$(CILIUM_DEBUG) - --identity-gc-interval=0m20s - --identity-heartbeat-timeout=0m20s + - --enable-cilium-endpoint-slice=true + - --ces-slice-mode=cesSliceModeFCFS env: - name: K8S_NODE_NAME valueFrom: diff --git a/test/integration/manifests/cilium/v1.14/cilium-operator/templates/deployment.yaml b/test/integration/manifests/cilium/v1.14/cilium-operator/templates/deployment.yaml index cdc0e79d83..df782a03e8 100644 --- a/test/integration/manifests/cilium/v1.14/cilium-operator/templates/deployment.yaml +++ b/test/integration/manifests/cilium/v1.14/cilium-operator/templates/deployment.yaml @@ -38,6 +38,8 @@ spec: - --debug=$(CILIUM_DEBUG) - --identity-gc-interval=0m20s - --identity-heartbeat-timeout=0m20s + - --enable-cilium-endpoint-slice=true + - --ces-slice-mode=cesSliceModeFCFS env: - name: K8S_NODE_NAME valueFrom: diff --git a/test/integration/manifests/cilium/v1.16/cilium-operator/templates/deployment.yaml b/test/integration/manifests/cilium/v1.16/cilium-operator/templates/deployment.yaml index cdc0e79d83..df782a03e8 100644 --- a/test/integration/manifests/cilium/v1.16/cilium-operator/templates/deployment.yaml +++ b/test/integration/manifests/cilium/v1.16/cilium-operator/templates/deployment.yaml @@ -38,6 +38,8 @@ spec: - --debug=$(CILIUM_DEBUG) - --identity-gc-interval=0m20s - --identity-heartbeat-timeout=0m20s + - --enable-cilium-endpoint-slice=true + - --ces-slice-mode=cesSliceModeFCFS env: - name: K8S_NODE_NAME valueFrom: