From cdff82f1d8ea05d50ec2bd2338cc841c40c7eef3 Mon Sep 17 00:00:00 2001 From: Vamsi Kalapala Date: Fri, 18 Feb 2022 13:03:48 -0800 Subject: [PATCH 1/4] Fixing a test failure --- npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go b/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go index c0f2c52ca2..0af1d1589f 100644 --- a/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go +++ b/npm/pkg/dataplane/ipsets/ipsetmanager_windows_test.go @@ -6,6 +6,7 @@ import ( "github.com/Azure/azure-container-networking/common" "github.com/Azure/azure-container-networking/network/hnswrapper" + "github.com/Azure/azure-container-networking/npm/util" testutils "github.com/Azure/azure-container-networking/test/utils" "github.com/Microsoft/hcsshim/hcn" "github.com/stretchr/testify/require" From 10b0ed1b5b3799498721ee476aa8ca83d0fc70db Mon Sep 17 00:00:00 2001 From: Vamsi Kalapala Date: Fri, 18 Feb 2022 13:31:34 -0800 Subject: [PATCH 2/4] comment unused cmds --- npm/cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/cmd/root.go b/npm/cmd/root.go index 0c9bc38b79..11f907305d 100644 --- a/npm/cmd/root.go +++ b/npm/cmd/root.go @@ -16,8 +16,8 @@ func NewRootCmd() *cobra.Command { startCmd := newStartNPMCmd() - startCmd.AddCommand(newStartNPMControlplaneCmd()) - startCmd.AddCommand(newStartNPMDaemonCmd()) + //startCmd.AddCommand(newStartNPMControlplaneCmd()) + //startCmd.AddCommand(newStartNPMDaemonCmd()) rootCmd.AddCommand(startCmd) From b3e5a28c460d8829d3f95d293095ca7d56328b23 Mon Sep 17 00:00:00 2001 From: Vamsi Kalapala Date: Tue, 22 Feb 2022 14:33:00 -0800 Subject: [PATCH 3/4] Fixing some behavior workarounds for HNS --- npm/pkg/dataplane/policies/policy_windows.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/npm/pkg/dataplane/policies/policy_windows.go b/npm/pkg/dataplane/policies/policy_windows.go index 2705b733f4..0b418070c5 100644 --- a/npm/pkg/dataplane/policies/policy_windows.go +++ b/npm/pkg/dataplane/policies/policy_windows.go @@ -69,6 +69,7 @@ func (acl *ACLPolicy) convertToAclSettings() (*NPMACLPolSettings, error) { return policySettings, ErrNamedPortsNotSupported } + policySettings.RuleType = hcn.RuleTypeSwitch policySettings.Id = acl.PolicyID policySettings.Direction = getHCNDirection(acl.Direction) policySettings.Action = getHCNAction(acl.Target) @@ -82,8 +83,12 @@ func (acl *ACLPolicy) convertToAclSettings() (*NPMACLPolSettings, error) { if !ok { return policySettings, ErrProtocolNotSupported } - policySettings.Protocols = protoNum + if protoNum == "256" { + policySettings.Protocols = "" + } else { + policySettings.Protocols = protoNum + } // Ignore adding ruletype for now as there is a bug // policySettings.RuleType = hcn.RuleTypeSwitch From 2930dd762fdd8e85688f85c0b5bfa4399ad19d66 Mon Sep 17 00:00:00 2001 From: Vamsi Kalapala Date: Thu, 24 Feb 2022 11:15:07 -0800 Subject: [PATCH 4/4] moving fan out one step up --- npm/cmd/root.go | 5 ++--- npm/deploy/manifests/controller/azure-npm.yaml | 1 - npm/deploy/manifests/daemon/azure-npm.yaml | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/npm/cmd/root.go b/npm/cmd/root.go index 11f907305d..ea07743d70 100644 --- a/npm/cmd/root.go +++ b/npm/cmd/root.go @@ -16,9 +16,8 @@ func NewRootCmd() *cobra.Command { startCmd := newStartNPMCmd() - //startCmd.AddCommand(newStartNPMControlplaneCmd()) - //startCmd.AddCommand(newStartNPMDaemonCmd()) - + rootCmd.AddCommand(newStartNPMControlplaneCmd()) + rootCmd.AddCommand(newStartNPMDaemonCmd()) rootCmd.AddCommand(startCmd) rootCmd.AddCommand(newDebugCmd()) diff --git a/npm/deploy/manifests/controller/azure-npm.yaml b/npm/deploy/manifests/controller/azure-npm.yaml index 5804e79db9..f1045cfa03 100644 --- a/npm/deploy/manifests/controller/azure-npm.yaml +++ b/npm/deploy/manifests/controller/azure-npm.yaml @@ -133,7 +133,6 @@ spec: spec: containers: - args: - - start - controlplane ports: - name: metrics diff --git a/npm/deploy/manifests/daemon/azure-npm.yaml b/npm/deploy/manifests/daemon/azure-npm.yaml index 3b4ca0e35e..5b4677c045 100644 --- a/npm/deploy/manifests/daemon/azure-npm.yaml +++ b/npm/deploy/manifests/daemon/azure-npm.yaml @@ -116,7 +116,6 @@ spec: spec: containers: - args: - - start - daemon command: - azure-npm