-
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 Network Policy logging on Windows Nodes #2052
Fix Network Policy logging on Windows Nodes #2052
Conversation
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
/test-all |
Codecov Report
@@ Coverage Diff @@
## main #2052 +/- ##
===========================================
+ Coverage 41.41% 64.84% +23.43%
===========================================
Files 131 270 +139
Lines 16437 20366 +3929
===========================================
+ Hits 6807 13206 +6399
+ Misses 9049 5823 -3226
- Partials 581 1337 +756
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test-all |
/test-windows-networkpolicy |
/test-networkpolicy |
/test-all |
/test-e2e |
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
pkg/util/logdir/logdir.go
Outdated
if logDirFlag == nil { | ||
logDir = antreaWellKnownLogDir | ||
} else if len(logDirFlag.Value.String()) == 0 { | ||
logDir = logDirFlag.DefValue |
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.
Out of curiosity, what's the default value?
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.
That's a good question. I copied the code from support bundle and it seems wrong now. DefValue
will be an empty string, but it should be os.TempDir()
. I will wait for the tests to pass then fix before I merge (this code path is not actually used by any test).
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
skipping tests because they are not affected by the last commit |
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
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
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
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
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
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
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
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