-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
kubernetes processor use correct os path separator #9205
Conversation
When appending a trailing slash to the log path directory, it needs to use the correct PathSeperator for the given OS. elastic#9196
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins, test this |
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.
Thank you for opening this @zentron 🎉 🎉 ! I see some more instances of "/"
in this file, can you tackle all of them please?
Also, some test would help
return "/var/lib/kubelet/pods/" | ||
} | ||
|
||
func ContainerLogsPath() string { |
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.
exported function ContainerLogsPath should have comment or be unexported
return "/var/lib/docker/containers/" | ||
} | ||
|
||
func PodLogsPath() string { |
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.
exported function PodLogsPath should have comment or be unexported
@@ -38,6 +40,7 @@ func init() { | |||
} | |||
|
|||
const LogPathMatcherName = "logs_path" | |||
const PathSeparator = string(os.PathSeparator) |
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.
exported const PathSeparator should have comment or be unexported
72e5fdc
to
b176ab5
Compare
@eskibars thanks for the feedback. Have updated the tests to cover the new windows paths and made the other paths windows friendly |
jenkins, test this again |
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.
This is good to go, can you please add a changelog entry?
Pinging @elastic/infrastructure |
@zentron Anyluck with the changelog entry? |
@exekias should we take this over? |
Sorry, i have been sidelined with other work and we have since moved to linux containers so this change is not such a high priority. |
When appending a trailing slash to the log path directory, it needs to use the correct PathSeperator for the given OS.
closes #9196