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

Cherry-pick #21931 to 7.10: [Elastic Agent] Fix named pipe communication on Windows 7 #21978

Merged
merged 2 commits into from
Oct 20, 2020

Conversation

blakerouse
Copy link
Contributor

Cherry-pick of PR #21931 to 7.10 branch. Original message:

What does this PR do?

Fixes issue where on Windows 7 the first connection over a npipe would result in the client hanging and the server from never receiving the connection.

After digging deep into the Windows winio module I was able to determine it was an issue in the module and not in the Agent itself. microsoft/go-winio#173 Was reported as the issue, but has not been fixed in winio upstream. Use replace to github.com/bi-zone/go-winio fixes the issue as the change is committed in that repository and tagged.

Why is it important?

So installation of Elastic Agent works as expected and actions talking to the running daemon do not hang and block the executing installation.

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.

Related issues

)

* Fix named pipes on Windows 7.

* Add changelog fix notice.

(cherry picked from commit 803ddca)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 19, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 19, 2020
@blakerouse blakerouse self-assigned this Oct 19, 2020
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21978 opened]

  • Start Time: 2020-10-19T14:16:10.304+0000

  • Duration: 186 min 36 sec

Test stats 🧪

Test Results
Failed 2
Passed 15488
Skipped 1157
Total 16647

Test errors 2

Expand to view the tests failures

  • Name: Build&Test / libbeat-build / TestOutputReload – pipeline

    • Age: 1
    • Duration: 68.7
    • Error Details: Failed
  • Name: Build&Test / libbeat-build / TestOutputReload/client – pipeline

    • Age: 1
    • Duration: 37.23
    • Error Details: Failed

Steps errors 1

Expand to view the steps failures

  • Name: libbeat-build - mage build test
    • Description: mage build test

    • Duration: 22 min 50 sec

    • Start Time: 2020-10-19T14:47:42.622+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-10-19T15:57:41.718Z]   Version:          19.03.13
[2020-10-19T15:57:41.718Z]   API version:      1.40 (minimum version 1.12)
[2020-10-19T15:57:41.718Z]   Go version:       go1.13.15
[2020-10-19T15:57:41.718Z]   Git commit:       4484c46d9d
[2020-10-19T15:57:41.718Z]   Built:            Wed Sep 16 17:01:06 2020
[2020-10-19T15:57:41.718Z]   OS/Arch:          linux/amd64
[2020-10-19T15:57:41.718Z]   Experimental:     false
[2020-10-19T15:57:41.718Z]  containerd:
[2020-10-19T15:57:41.718Z]   Version:          1.3.7
[2020-10-19T15:57:41.718Z]   GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
[2020-10-19T15:57:41.718Z]  runc:
[2020-10-19T15:57:41.718Z]   Version:          1.0.0-rc10
[2020-10-19T15:57:41.718Z]   GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
[2020-10-19T15:57:41.718Z]  docker-init:
[2020-10-19T15:57:41.718Z]   Version:          0.18.0
[2020-10-19T15:57:41.718Z]   GitCommit:        fec3683
[2020-10-19T17:20:44.845Z] Cancelling nested steps due to timeout
[2020-10-19T17:20:44.875Z] Failed in branch metricbeat-unitTest
[2020-10-19T17:20:54.401Z] [INFO] unstashV2: JOB_GCS_BUCKET is set. bucket param got precedency instead.
[2020-10-19T17:20:54.423Z] [INFO] unstashV2: JOB_GCS_CREDENTIALS is set. credentialsId param got precedency instead.
[2020-10-19T17:20:54.483Z] [Google Cloud Storage Plugin] Found 1 files to download from pattern: gs://beats-ci-temp/Beats/beats/PR-21978-1/source/source.tgz
[2020-10-19T17:20:54.500Z] [Google Cloud Storage Plugin] Downloading: Beats/beats/PR-21978-1/source/source.tgz to local path: /var/lib/jenkins/workspace/Beats_beats_PR-21978/source.tgz
[2020-10-19T17:21:11.611Z] + tar --version
[2020-10-19T17:21:11.937Z] + tar -xpf source.tgz
[2020-10-19T17:21:24.516Z] + rm source.tgz
[2020-10-19T17:21:24.610Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats
[2020-10-19T17:21:24.640Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/libbeat-stress-tests-1603118878635
[2020-10-19T17:21:24.732Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/winlogbeat-crosscompile-1603118940900
[2020-10-19T17:21:24.829Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/auditbeat-crosscompile-1603118971726
[2020-10-19T17:21:24.921Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-dockerlogbeat-build-1603119025276
[2020-10-19T17:21:25.013Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-elastic-agent-build-1603119056745
[2020-10-19T17:21:25.104Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/journalbeat-unitTest-1603119057576
[2020-10-19T17:21:25.195Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/libbeat-crosscompile-1603119129670
[2020-10-19T17:21:25.285Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-functionbeat-build-1603119177452
[2020-10-19T17:21:25.374Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/packetbeat-build-1603119260117
[2020-10-19T17:21:25.465Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/auditbeat-windows-windows-2019-1603119396844
[2020-10-19T17:21:25.558Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/heartbeat-windows-windows-2019-1603119441244
[2020-10-19T17:21:25.649Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/auditbeat-build-1603119446160
[2020-10-19T17:21:25.748Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-elastic-agent-windows-windows-2019-1603119465125
[2020-10-19T17:21:25.839Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/heartbeat-build-1603119467956
[2020-10-19T17:21:25.930Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/generator-metricbeat-test-1603119507179
[2020-10-19T17:21:26.020Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/generator-beat-test-1603119573816
[2020-10-19T17:21:26.111Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/metricbeat-crosscompile-1603119583940
[2020-10-19T17:21:26.200Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-auditbeat-windows-windows-2019-1603119622919
[2020-10-19T17:21:26.290Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-functionbeat-windows-windows-2019-1603119627763
[2020-10-19T17:21:26.382Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-auditbeat-build-1603119654232
[2020-10-19T17:21:26.471Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/filebeat-windows-windows-2019-1603119661869
[2020-10-19T17:21:26.563Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/packetbeat-windows-windows-2019-1603119681344
[2020-10-19T17:21:26.660Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/winlogbeat-windows-windows-2019-1603119685081
[2020-10-19T17:21:26.753Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-winlogbeat-build-windows-2019-1603119689797
[2020-10-19T17:21:26.846Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-libbeat-build-1603119865609
[2020-10-19T17:21:26.937Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/metricbeat-windows-windows-2019-1603119876678
[2020-10-19T17:21:27.032Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-filebeat-windows-windows-2019-1603119886773
[2020-10-19T17:21:27.122Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-metricbeat-windows-windows-2019-1603120050360
[2020-10-19T17:21:27.219Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/libbeat-build-1603120178844
[2020-10-19T17:21:27.313Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/filebeat-build-1603120373003
[2020-10-19T17:21:27.408Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/metricbeat-pythonIntegTest-1603121072921
[2020-10-19T17:21:27.498Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/metricbeat-goIntegTest-1603121079334
[2020-10-19T17:21:27.596Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-filebeat-build-1603121227227
[2020-10-19T17:21:27.688Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats/x-pack-metricbeat-build-1603122656737
[2020-10-19T17:21:28.106Z] + cat
[2020-10-19T17:21:28.106Z] + /usr/local/bin/runbld ./runbld-test-reports --job-name elastic+beats+pull-request
[2020-10-19T17:21:28.106Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-10-19T17:21:36.263Z] runbld>>> runbld started
[2020-10-19T17:21:36.263Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-10-19T17:21:37.649Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-10-19T17:21:37.649Z] runbld>>> Matches in the system config:
[2020-10-19T17:21:37.649Z] runbld>>> - Matched ^elastic\+beats
[2020-10-19T17:21:37.649Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-10-19T17:21:39.034Z] runbld>>> Debug logging enabled.
[2020-10-19T17:21:39.034Z] runbld>>> Storing result
[2020-10-19T17:21:39.295Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-10-19T17:21:39.295Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20201019172138-3A87B147
[2020-10-19T17:21:39.295Z] runbld>>> Adding system facts.
[2020-10-19T17:21:40.684Z] runbld>>> Adding vcs info for the latest commit:  61a881e74d44bece1c292641d978825db49735d4
[2020-10-19T17:21:40.684Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-10-19T17:21:40.684Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-10-19T17:21:40.684Z] Processing JUnit reports with runbld...
[2020-10-19T17:21:40.684Z] + echo 'Processing JUnit reports with runbld...'
[2020-10-19T17:21:41.255Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-10-19T17:21:41.255Z] runbld>>> DURATION: 40ms
[2020-10-19T17:21:41.255Z] runbld>>> STDOUT: 40 bytes
[2020-10-19T17:21:41.255Z] runbld>>> STDERR: 49 bytes
[2020-10-19T17:21:41.255Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-10-19T17:21:41.255Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-21978
[2020-10-19T17:21:42.198Z] runbld>>> Storing build metadata: 
[2020-10-19T17:21:42.198Z] runbld>>> Adding test report.
[2020-10-19T17:21:42.198Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-21978/src/github.com/elastic/beats
[2020-10-19T17:21:43.140Z] runbld>>> Found 120 test output files
[2020-10-19T17:21:44.846Z] Body did not finish within grace period; terminating with extreme prejudice
[2020-10-19T17:21:44.861Z] ERROR: runbld post build action failed.
[2020-10-19T17:21:44.861Z] Timeout has been exceeded
[2020-10-19T17:21:45.170Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-21978
[2020-10-19T17:21:45.242Z] [INFO] getVaultSecret: Getting secrets
[2020-10-19T17:21:45.295Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-10-19T17:21:46.119Z] + chmod 755 generate-build-data.sh
[2020-10-19T17:21:46.119Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21978/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21978/runs/1 ABORTED 11135545
[2020-10-19T17:21:46.119Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21978/runs/1/steps/?limit=10000 -o steps-info.json
[2020-10-19T17:21:49.347Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21978/runs/1/tests/?status=FAILED -o tests-errors.json
[2020-10-19T17:21:51.423Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21978/runs/1/log/ -o pipeline-log.txt

Copy link
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

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

Backport looks ok, please fix CHANGELOG before merging

@blakerouse blakerouse merged commit 6607147 into elastic:7.10 Oct 20, 2020
@blakerouse blakerouse deleted the backport_21931_7.10 branch October 20, 2020 17:56
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21978 updated]

  • Start Time: 2020-10-20T16:29:39.062+0000

  • Duration: 103 min 1 sec

Test stats 🧪

Test Results
Failed 0
Passed 16353
Skipped 1367
Total 17720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants