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

AntreaPolicy cannot be enabled on Windows #2050

Closed
antoninbas opened this issue Apr 8, 2021 · 0 comments · Fixed by #2052
Closed

AntreaPolicy cannot be enabled on Windows #2050

antoninbas opened this issue Apr 8, 2021 · 0 comments · Fixed by #2052
Assignees
Labels
area/monitoring/logging Issues or PRs related to logging. area/network-policy/action Issues or PRs related to network policy actions. kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@antoninbas
Copy link
Contributor

Describe the bug
When AntreaPolicy is enabled on Windows, the Agent cannot start and enters a CrashLoopBackoff state because of the following issue:

E0408 14:31:39.321068    9932 packetin.go:80] Failed to initialize logger to audit Antrea Policies open /var/log/antrea/networkpolicy/np.log: The system cannot find the path specified.
F0408 14:31:39.325071    9932 main.go:58] Error running agent: error creating new NetworkPolicy controller: open /var/log/antrea/networkpolicy/np.log: The system cannot find the path specified.
goroutine 1 [running]:
k8s.io/klog.stacks(0xc000586000, 0xc0006eea20, 0xc2, 0x10a)
	C:/gopath/pkg/mod/k8s.io/[email protected]/klog.go:875 +0xbf
k8s.io/klog.(*loggingT).output(0x33d6a80, 0xc000000003, 0xc0006aacb0, 0x330a20b, 0x7, 0x3a, 0x0)
	C:/gopath/pkg/mod/k8s.io/[email protected]/klog.go:826 +0x365
k8s.io/klog.(*loggingT).printf(0x33d6a80, 0x3, 0x244df2c, 0x17, 0xc000557d58, 0x1, 0x1)
	C:/gopath/pkg/mod/k8s.io/[email protected]/klog.go:707 +0x153
k8s.io/klog.Fatalf(...)
	C:/gopath/pkg/mod/k8s.io/[email protected]/klog.go:1276
main.newAgentCommand.func1(0xc00002b900, 0xc000506060, 0x0, 0x6)
	C:/antrea/cmd/antrea-agent/main.go:58 +0x21b
github.com/spf13/cobra.(*Command).execute(0xc00002b900, 0xc000154010, 0x6, 0x7, 0xc00002b900, 0xc000154010)
	C:/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc00002b900, 0x0, 0x0, 0x0)
	C:/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x30b
github.com/spf13/cobra.(*Command).Execute(...)
	C:/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:864
main.main()
	C:/antrea/cmd/antrea-agent/main.go:37 +0x59

To Reproduce
Deploy Antrea, with the AntreaPolicy feature enabled, in a K8s cluster with at least one Windows Node.

Expected
Antrea Agents on the Windows Node(s) should run successfully.

Actual behavior
Antrea Agents on the Windows Node(s) get into a CrashLoopBackoff state.

Versions:
Antrea Versions: v0.13.x and main

Additional context
Issue discovered when running tests for #1999

@antoninbas antoninbas added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Apr 8, 2021
@antoninbas antoninbas added this to the Antrea v1.0 release milestone Apr 8, 2021
@antoninbas antoninbas self-assigned this Apr 8, 2021
@antoninbas antoninbas added area/monitoring/logging Issues or PRs related to logging. area/network-policy/action Issues or PRs related to network policy actions. labels Apr 8, 2021
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 8, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes antrea-io#2050
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 8, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes antrea-io#2050
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 8, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes antrea-io#2050
antoninbas added a commit that referenced this issue Apr 9, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes #2050
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 30, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes antrea-io#2050
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 30, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes antrea-io#2050
antoninbas added a commit that referenced this issue Apr 30, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes #2050
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 30, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes antrea-io#2050
antoninbas added a commit that referenced this issue May 1, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes #2050
antoninbas added a commit to antoninbas/antrea that referenced this issue May 1, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes antrea-io#2050
antoninbas added a commit that referenced this issue May 3, 2021
On Windows Nodes the path should be /k/antrea/logs/networkpolicy/np.log
and not /var/log/antrea/networkpolicy/np.log, as decided by the log_dir
flag.

We unify the approach for support bundle and Network Policy logging.

Fixes #2050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/monitoring/logging Issues or PRs related to logging. area/network-policy/action Issues or PRs related to network policy actions. kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant