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

Falling test on metricbeat system/socket_summary output #8848

Closed
ph opened this issue Oct 31, 2018 · 7 comments · Fixed by #8849
Closed

Falling test on metricbeat system/socket_summary output #8848

ph opened this issue Oct 31, 2018 · 7 comments · Fixed by #8849
Labels

Comments

@ph
Copy link
Contributor

ph commented Oct 31, 2018

I am hitting the following failure on Metricbeat 6.5 and master.

https://travis-ci.org/elastic/beats/jobs/448818231

======================================================================
ERROR: Test system/socket_summary output.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/travis/gopath/src/github.com/elastic/beats/metricbeat/tests/system/test_system.py", line 473, in test_socket_summary
    summary = evt["system"]["socket"]["summary"]
KeyError: 'system'

----------------------------------------------------------------------

I've looked at the existing issue in our repo and I found this one #7973, but the fix was for windows and I've seen it fails on darwin.

@ph ph added Metricbeat Metricbeat flaky-test Unstable or unreliable test cases. labels Oct 31, 2018
@ph
Copy link
Contributor Author

ph commented Oct 31, 2018

@jsoriano have you seen this one?

@jsoriano
Copy link
Member

@ph no, this is new for me, I wonder why it has started to fail now. OSX image in travis hasn't changed. Have you been able to reproduce it locally?

@jsoriano
Copy link
Member

@ph btw, I don't think #7973 is related, do you mean #7868? For Windows there is no implementation, this is why we disabled the test for this OS, but it should work for OSX.

@ph
Copy link
Contributor Author

ph commented Oct 31, 2018

I meant #7868.
I've tested it locally on OSX

======================================================================
ERROR: Test system/socket_summary output.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ph/go/src/github.com/elastic/beats/metricbeat/tests/system/test_system.py", line 473, in test_socket_summary
    summary = evt["system"]["socket"]["summary"]
KeyError: 'system'

----------------------------------------------------------------------

same error, I am running macOS mojave.

@jsoriano
Copy link
Member

@ph
Copy link
Contributor Author

ph commented Oct 31, 2018

I think I know why, I believe I am the responsable for that, let me take a quick look.

ph added a commit to ph/beats that referenced this issue Oct 31, 2018
We were inheriting environment variables on windows only, this make sure
the variables are inherited on unix too. Because the system module in
metricbeat uses `lsof` since the environment variables were cleared the
$PATH was not available so the binary was not found.

fixes: elastic#8848
@ph
Copy link
Contributor Author

ph commented Oct 31, 2018

@jsoriano Its my bad, I though it was a flaky test and I was wrong.

I've created the PR #8849 to fix it.

@ph ph added bug and removed flaky-test Unstable or unreliable test cases. labels Oct 31, 2018
@ph ph closed this as completed in #8849 Oct 31, 2018
ph added a commit that referenced this issue Oct 31, 2018
We were inheriting environment variables on windows only, this make sure
the variables are inherited on unix too. Because the system module in
metricbeat uses `lsof` since the environment variables were cleared the
$PATH was not available so the binary was not found.

fixes: #8848
ph added a commit to ph/beats that referenced this issue Oct 31, 2018
We were inheriting environment variables on windows only, this make sure
the variables are inherited on unix too. Because the system module in
metricbeat uses `lsof` since the environment variables were cleared the
$PATH was not available so the binary was not found.

fixes: elastic#8848
(cherry picked from commit 67abf3b)
ph added a commit to ph/beats that referenced this issue Oct 31, 2018
We were inheriting environment variables on windows only, this make sure
the variables are inherited on unix too. Because the system module in
metricbeat uses `lsof` since the environment variables were cleared the
$PATH was not available so the binary was not found.

fixes: elastic#8848
(cherry picked from commit 67abf3b)
ph added a commit that referenced this issue Oct 31, 2018
We were inheriting environment variables on windows only, this make sure
the variables are inherited on unix too. Because the system module in
metricbeat uses `lsof` since the environment variables were cleared the
$PATH was not available so the binary was not found.

fixes: #8848
(cherry picked from commit 67abf3b)
ph added a commit that referenced this issue Oct 31, 2018
Cherry-pick of PR #8849 to 6.5 branch. Original message: 

We were inheriting environment variables on windows only, this make sure
the variables are inherited on unix too. Because the system module in
metricbeat uses `lsof` since the environment variables were cleared the
$PATH was not available so the binary was not found.

fixes: #8848
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
…lastic#8856)

Cherry-pick of PR elastic#8849 to 6.5 branch. Original message: 

We were inheriting environment variables on windows only, this make sure
the variables are inherited on unix too. Because the system module in
metricbeat uses `lsof` since the environment variables were cleared the
$PATH was not available so the binary was not found.

fixes: elastic#8848
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 a pull request may close this issue.

2 participants