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

kubernetes processor use correct os path separator #9205

Closed
wants to merge 3 commits into from

Conversation

zentron
Copy link

@zentron zentron commented Nov 22, 2018

When appending a trailing slash to the log path directory, it needs to use the correct PathSeperator for the given OS.
closes #9196

When appending a trailing slash to the log path directory, it needs to use the correct PathSeperator for the given OS.
elastic#9196
@elasticmachine
Copy link
Collaborator

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?

@jsoriano jsoriano added review libbeat containers Related to containers use case Filebeat Filebeat and removed libbeat labels Nov 23, 2018
@jsoriano
Copy link
Member

jenkins, test this

Copy link
Contributor

@exekias exekias left a 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 {

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 {

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)

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

@zentron
Copy link
Author

zentron commented Nov 27, 2018

@eskibars thanks for the feedback. Have updated the tests to cover the new windows paths and made the other paths windows friendly

@jsoriano
Copy link
Member

jenkins, test this again

Copy link
Contributor

@exekias exekias left a 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?

@ruflin ruflin added the Team:Integrations Label for the Integrations team label Dec 17, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/infrastructure

@eloyekunle
Copy link
Contributor

@zentron Anyluck with the changelog entry?

@ruflin
Copy link
Member

ruflin commented Apr 3, 2019

@exekias should we take this over?

@zentron
Copy link
Author

zentron commented Apr 8, 2019

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.

@exekias
Copy link
Contributor

exekias commented Apr 11, 2019

Thank you @zentron for opening this! I have created a copy with the needed changes to merge it: #11760, closing this in favor of that one

@exekias exekias closed this Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Related to containers use case Filebeat Filebeat review Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes_metadata metadata does not work on windows
7 participants