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

[Agent] Handle abs paths on windows correctly #17461

Merged
merged 5 commits into from
Apr 6, 2020

Conversation

michalpristas
Copy link
Contributor

What does this PR do?

If absolute path in unix format is used in config, IsAbs on windows returns false. so we first transform it to windows path format and then handle the logic as usual.
For transformation volume of root directory passed is used, it is usually a directory where installed beat is located.

Why is it important?

Supporting windows

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Fixes #17449

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Project:fleet)

Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets get the jenkins changes in before so we can test it on CI.

@ph ph added needs_backport PR is waiting to be backported to other branches. Team:Ingest Management labels Apr 3, 2020
@ph
Copy link
Contributor

ph commented Apr 3, 2020

I've looked at our lint job and this look like some instability from Jenkins:

04:47:23  java.lang.InterruptedException: no matches found within 10000
04:47:23  	at hudson.FilePath$ValidateAntFileMask.hasMatch(FilePath.java:2826)
04:47:23  	at hudson.FilePath$ValidateAntFileMask.invoke(FilePath.java:2705)
04:47:23  	at hudson.FilePath$ValidateAntFileMask.invoke(FilePath.java:2686)
04:47:23  	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3073)
04:47:23  Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from beats-ci-immutable-ubuntu-1604-1585902730876288756.c.elastic-ci-prod.internal/10.224.0.86:56266=

@ph ph merged commit 160567d into elastic:master Apr 6, 2020
@ph
Copy link
Contributor

ph commented Apr 8, 2020

backported in #17599

@ph ph removed the needs_backport PR is waiting to be backported to other branches. label Apr 8, 2020
ph pushed a commit to ph/beats that referenced this pull request Apr 10, 2020
ph added a commit that referenced this pull request Apr 14, 2020
)

* [Agent] Rename agent to elastic-agent (#17391)

[Agent] Rename agent to elastic-agent (#17391)

(cherry picked from commit 66609a3)

* Add Elastic Agent in the Jenkinsfile (#17445)

* Add Elastic Agent in the Jenkinsfile

With the recent moves to Jenkins pipeline the Elastic Agent project was
not currently tested.

* Add Elastic Agent in the Jenkinsfile (#17445)

* Add Elastic Agent in the Jenkinsfile

With the recent moves to Jenkins pipeline the Elastic Agent project was
not currently tested.

* [Agent] Fix merge of config (#17399)

[Agent] Fix merge of config #17399

* [Agent] Handle abs paths on windows correctly (#17461)

* handle windows correctly

* Missing commits from the initial merges of the agent -> master

Co-authored-by: Michal Pristas <[email protected]>
Co-authored-by: Pier-Hugues Pellerin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Agent] Join path logic for install hooks is incorrect on windows.
3 participants