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

Switch the GRPC communication where Agent is running the server and the beats are connecting back to Agent #18973

Merged
merged 22 commits into from
Jun 10, 2020

Conversation

blakerouse
Copy link
Contributor

What does this PR do?

This completes the switch of the GRPC protocol so that the beat application will connect to Agent using the GRPC server running inside the Agent process. This uses the new protocol that allows bi-directional communication for both configuration, status, and actions.

This also completely removes the old GRPC code and protocol files, which are no longer used or needed.

Why is it important?

To only require 1 listening port on the host machine running the GRPC. To use the new elastic-agent-client code to make it easier for new applications to be controlled by Agent.

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@elasticmachine
Copy link
Collaborator

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

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 4, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 4, 2020

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Pull request #18973 updated]

  • Reason: Aborted from #7

  • Start Time: 2020-06-05T14:13:52.917+0000

  • Duration: 7 min 11 sec

  • Commit: 039306aedf325db38c58ac87eb15c3d238be7850

Log output

Expand to view the last 100 lines of log output

[2020-06-05T14:21:01.819Z] Stage "Elastic Agent x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:01.821Z] Stage "Elastic Agent x-pack Windows" skipped due to earlier failure(s)
[2020-06-05T14:21:01.822Z] Stage "Elastic Agent Mac OS X" skipped due to earlier failure(s)
[2020-06-05T14:21:01.822Z] Stage "Filebeat oss" skipped due to earlier failure(s)
[2020-06-05T14:21:01.823Z] Stage "Filebeat x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:01.824Z] Stage "Filebeat Mac OS X" skipped due to earlier failure(s)
[2020-06-05T14:21:01.825Z] Stage "Filebeat x-pack Mac OS X" skipped due to earlier failure(s)
[2020-06-05T14:21:01.825Z] Stage "Filebeat Windows" skipped due to earlier failure(s)
[2020-06-05T14:21:01.826Z] Stage "Filebeat x-pack Windows" skipped due to earlier failure(s)
[2020-06-05T14:21:01.827Z] Stage "Heartbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.827Z] Stage "Auditbeat oss Linux" skipped due to earlier failure(s)
[2020-06-05T14:21:01.828Z] Stage "Auditbeat crosscompile" skipped due to earlier failure(s)
[2020-06-05T14:21:01.829Z] Stage "Auditbeat oss Mac OS X" skipped due to earlier failure(s)
[2020-06-05T14:21:01.830Z] Stage "Auditbeat oss Windows" skipped due to earlier failure(s)
[2020-06-05T14:21:01.830Z] Stage "Auditbeat x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:01.831Z] Stage "Auditbeat x-pack Mac OS X" skipped due to earlier failure(s)
[2020-06-05T14:21:01.832Z] Stage "Auditbeat x-pack Windows" skipped due to earlier failure(s)
[2020-06-05T14:21:01.833Z] Stage "Libbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.833Z] Stage "Libbeat x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:01.834Z] Stage "Metricbeat OSS Unit tests" skipped due to earlier failure(s)
[2020-06-05T14:21:01.835Z] Stage "Metricbeat OSS Integration tests" skipped due to earlier failure(s)
[2020-06-05T14:21:01.836Z] Stage "Metricbeat Python integration tests" skipped due to earlier failure(s)
[2020-06-05T14:21:01.836Z] Stage "Metricbeat x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:01.837Z] Stage "Metricbeat crosscompile" skipped due to earlier failure(s)
[2020-06-05T14:21:01.838Z] Stage "Metricbeat Mac OS X" skipped due to earlier failure(s)
[2020-06-05T14:21:01.838Z] Stage "Metricbeat x-pack Mac OS X" skipped due to earlier failure(s)
[2020-06-05T14:21:01.839Z] Stage "Metricbeat Windows" skipped due to earlier failure(s)
[2020-06-05T14:21:01.840Z] Stage "Metricbeat x-pack Windows" skipped due to earlier failure(s)
[2020-06-05T14:21:01.841Z] Stage "Packetbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.841Z] Stage "dockerlogbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.842Z] Stage "Winlogbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.843Z] Stage "Winlogbeat Windows x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:01.843Z] Stage "Functionbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.844Z] Stage "Journalbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.845Z] Stage "Generators" skipped due to earlier failure(s)
[2020-06-05T14:21:01.845Z] Stage "Kubernetes" skipped due to earlier failure(s)
[2020-06-05T14:21:01.927Z] Stage "Heartbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.928Z] Stage "Libbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.929Z] Stage "Metricbeat x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:01.930Z] Stage "Packetbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.931Z] Stage "dockerlogbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.932Z] Stage "Winlogbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.933Z] Stage "Functionbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.933Z] Stage "Journalbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:01.934Z] Stage "Generators" skipped due to earlier failure(s)
[2020-06-05T14:21:02.510Z] Failed in branch Elastic Agent x-pack
[2020-06-05T14:21:02.511Z] Failed in branch Elastic Agent x-pack Windows
[2020-06-05T14:21:02.512Z] Failed in branch Elastic Agent Mac OS X
[2020-06-05T14:21:02.512Z] Failed in branch Filebeat oss
[2020-06-05T14:21:02.513Z] Failed in branch Filebeat x-pack
[2020-06-05T14:21:02.514Z] Failed in branch Filebeat Mac OS X
[2020-06-05T14:21:02.514Z] Failed in branch Filebeat x-pack Mac OS X
[2020-06-05T14:21:02.515Z] Failed in branch Filebeat Windows
[2020-06-05T14:21:02.515Z] Failed in branch Filebeat x-pack Windows
[2020-06-05T14:21:02.516Z] Failed in branch Auditbeat oss Linux
[2020-06-05T14:21:02.517Z] Failed in branch Auditbeat crosscompile
[2020-06-05T14:21:02.517Z] Failed in branch Auditbeat oss Mac OS X
[2020-06-05T14:21:02.518Z] Failed in branch Auditbeat oss Windows
[2020-06-05T14:21:02.518Z] Failed in branch Auditbeat x-pack
[2020-06-05T14:21:02.519Z] Failed in branch Auditbeat x-pack Mac OS X
[2020-06-05T14:21:02.520Z] Failed in branch Auditbeat x-pack Windows
[2020-06-05T14:21:02.520Z] Failed in branch Libbeat x-pack
[2020-06-05T14:21:02.521Z] Failed in branch Metricbeat OSS Unit tests
[2020-06-05T14:21:02.521Z] Failed in branch Metricbeat OSS Integration tests
[2020-06-05T14:21:02.522Z] Failed in branch Metricbeat Python integration tests
[2020-06-05T14:21:02.523Z] Failed in branch Metricbeat crosscompile
[2020-06-05T14:21:02.523Z] Failed in branch Metricbeat Mac OS X
[2020-06-05T14:21:02.524Z] Failed in branch Metricbeat x-pack Mac OS X
[2020-06-05T14:21:02.524Z] Failed in branch Metricbeat Windows
[2020-06-05T14:21:02.525Z] Failed in branch Metricbeat x-pack Windows
[2020-06-05T14:21:02.526Z] Failed in branch Winlogbeat Windows x-pack
[2020-06-05T14:21:02.526Z] Failed in branch Kubernetes
[2020-06-05T14:21:02.789Z] Stage "Heartbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:02.790Z] Stage "Libbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:02.792Z] Stage "Metricbeat x-pack" skipped due to earlier failure(s)
[2020-06-05T14:21:02.793Z] Stage "Winlogbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:02.794Z] Stage "Functionbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:02.795Z] Stage "Generators" skipped due to earlier failure(s)
[2020-06-05T14:21:02.851Z] Failed in branch Packetbeat
[2020-06-05T14:21:02.852Z] Failed in branch dockerlogbeat
[2020-06-05T14:21:02.853Z] Failed in branch Journalbeat
[2020-06-05T14:21:03.073Z] Stage "Heartbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:03.075Z] Stage "Libbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:03.076Z] Stage "Functionbeat" skipped due to earlier failure(s)
[2020-06-05T14:21:03.077Z] Stage "Generators" skipped due to earlier failure(s)
[2020-06-05T14:21:03.116Z] Failed in branch Metricbeat x-pack
[2020-06-05T14:21:03.116Z] Failed in branch Winlogbeat
[2020-06-05T14:21:03.295Z] Failed in branch Heartbeat
[2020-06-05T14:21:03.296Z] Failed in branch Libbeat
[2020-06-05T14:21:03.296Z] Failed in branch Functionbeat
[2020-06-05T14:21:03.297Z] Stage "Generators" skipped due to earlier failure(s)
[2020-06-05T14:21:03.374Z] Failed in branch Generators
[2020-06-05T14:21:03.677Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18973
[2020-06-05T14:21:03.787Z] [INFO] getVaultSecret: Getting secrets
[2020-06-05T14:21:03.845Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-05T14:21:04.576Z] + chmod 755 generate-build-data.sh
[2020-06-05T14:21:04.576Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18973/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18973/runs/6 ABORTED 431399
[2020-06-05T14:21:04.576Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18973/runs/6/steps/?limit=10000 -o steps-info.json
[2020-06-05T14:21:04.827Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18973/runs/6/tests/?status=FAILED -o tests-errors.json
[2020-06-05T14:21:04.827Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18973/runs/6/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.

change looks good with few questions here and there. i'm going to test it before approval

go.mod Outdated Show resolved Hide resolved
x-pack/elastic-agent/pkg/agent/application/local_mode.go Outdated Show resolved Hide resolved
x-pack/elastic-agent/pkg/agent/application/local_mode.go Outdated Show resolved Hide resolved
func (*ApplicationStatusHandler) OnStatusChange(state *server.ApplicationState, status proto.StateObserved_Status, msg string) {
app, ok := state.App().(*Application)
if !ok {
panic(errors.New("only *Application can be registered when using the ApplicationStatusHandler", errors.TypeUnexpected))
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to crash agent here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think we should, because using this handler means that only *Application is registered in the server and if not then we did something wrong in the code

I would rather make it breaking all of agent so we can fix, then allowing it to hide the issue and be harder to debug in the future

x-pack/libbeat/management/fleet/manager.go Show resolved Hide resolved
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.

one thing i ran into while testing.
the other thing is when i used standalone and enabled some metrics, then made a config change it got stuck at start

2020-06-05T14:41:12+02:00 DEBUG operator.go:217 running operation 'operation-start' for metricbeat.8.0.0
2020-06-05T14:41:12+02:00 INFO  reporter.go:51  2020-06-05T14:41:12+02:00: type: 'STATE': sub_type: 'STARTING' message: Application: metricbeat[d7ba5632-1c93-4ee1-b231-baeaecb94172]: State change: STARTING

expected would be that check is made and start is skipped

x-pack/elastic-agent/pkg/core/plugin/state/state.go Outdated Show resolved Hide resolved
Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Skimming through the code, that part I'm most concerned is that we might get into some race conditions because of the many locks and unlocks we needed.

Not necessarly as part of this PR but it would be great to have some tests where many fake clients are started / stopped randomly with different error states to see if a race condition is found or things break.

@michalpristas
Copy link
Contributor

@blakerouse i was testing this today and it got stuck again when modifying settings.monitoring behavior.
could you revisit locks as nicolas suggested?

@blakerouse
Copy link
Contributor Author

@michalpristas I fixed the issues pointed out by @ruflin in my latest commit. I was under the impression that pkg/agent/operation test was testing the code with configurable but actually none of those tests are running because of TestMain, which was missing os.Exit(m.Run()).

Can you share your agent config so I can test what issue your hitting?

@michalpristas
Copy link
Contributor

i'm using default configuration for standalone and changing it on the fly without restarting agent, like changing set of metrics and datasources, enabling disabling monitoring either as a whole or logs/metrics combinations, mostly just commenting uncommenting pieces of default configuration

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 8, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #18973 updated]

  • Start Time: 2020-06-10T13:12:22.822+0000

  • Duration: 80 min 29 sec

Test stats 🧪

Test Results
Failed 0
Passed 9325
Skipped 1574
Total 10899

@blakerouse
Copy link
Contributor Author

@michalpristas I have fixed the issue with deadlocks. I have noticed that disabling monitoring takes the StopTimeout for metricbeat and filebeat to actually stop (which Agent then force kills).

I am going to look into that in a follow up branch, being I think its an issue in metricbeat/filebeat and not in the Agent side.

@michalpristas
Copy link
Contributor

started with this config (using default output)

datasources:
  - namespace: default
    use_output: default
    inputs:
      - type: system/metrics
        streams:
          - metricset: cpu
            dataset: system.cpu

started ok beats were running
changed configuration while agent is running to

datasources:
  - namespace: default
    use_output: default
    inputs:
      - type: system/metrics
        streams:
          - metricset: cpu
            dataset: system.cpu
          - metricset: memory
            dataset: system.memory
          - metricset: network
            dataset: system.network
          - metricset: filesystem
            dataset: system.filesystem

failed to apply and beat started crashing
logs from agent

2020-06-09T16:59:23+02:00 ERROR reporter.go:47  2020-06-09T16:59:23+02:00: type: 'ERROR': sub_type: 'CONFIG' message: Application: metricbeat[57582998-ce21-4c65-9d76-c961972cca1c]: application 'metricbeat--8.0.0' crashed: /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/core/plugin/app/app.go[213]: unknown error

it tried to start another metricbeat to update configuration and then metricbeat failed on


Exiting: data path already locked by another beat. Please make sure that multiple beats are not sharing the same data path (path.data).

actions resolution does not work properly i guess

@blakerouse
Copy link
Contributor Author

@michalpristas Found the issue and it is now fixed, thanks for the detailed testing!

@michalpristas
Copy link
Contributor

michalpristas commented Jun 10, 2020

one more thing to fix and we're good to go i guess.

when going from default config which spins up 1 filebeat and 2 metricbeats (monitoring enabled)
to configuration where monitoring is disabled

settings.monitoring:
  enabled: true
  logs: true
  metrics: false

they are correctly stopped.
but then when commenting added lines out (re-enabling monitoring), we get nil reference here


2020-06-10T09:18:29+02:00 DEBUG operator.go:217 running operation 'operation-config' for filebeat.8.0.0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xc0 pc=0x46e558b]

goroutine 28 [running]:
sync.(*RWMutex).RLock(...)
        /usr/local/go/src/sync/rwmutex.go:48
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/server.(*ApplicationState).UpdateConfig(0x0, 0xc000188480, 0x414, 0x800, 0xc000188480)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/core/server/server.go:565 +0x2b
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/plugin/app.(*Application).Configure(0xc00031a7e0, 0x4a51100, 0xc0002ad440, 0xc0002cd680, 0x0, 0x0)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/core/plugin/app/configure.go:37 +0x2c4
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation.(*operationConfig).Run(0xc0002cd950, 0x4a51100, 0xc0002ad440, 0x4a565a0, 0xc00031a7e0, 0x0, 0x0)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/operation/operation_config.go:65 +0xf9
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation.(*Operator).runFlow(0xc0000f84d0, 0x4a54180, 0xc00030c000, 0xc00042f350, 0x5, 0x5, 0xc000178340, 0x31)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/operation/operator.go:218 +0x6c4
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation.(*Operator).start(0xc0000f84d0, 0x4a54180, 0xc00030c000, 0xc0002cd680, 0x492ac8e, 0x8)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/operation/operator.go:170 +0x562
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation.(*Operator).handleStartSidecar(0xc0000f84d0, 0x4928f2d, 0x6, 0x492747e, 0x5, 0x492f9e4, 0x10, 0xc0002cd500, 0xc000520000, 0x6000d98)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/operation/monitoring.go:52 +0x3ea
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation.(*Operator).handleRun(0xc0000f84d0, 0x4928f2d, 0x6, 0x492747e, 0x5, 0x492f9e4, 0x10, 0xc0002cd500, 0xc0000b4340, 0x10)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/operation/operator_handlers.go:30 +0x2ca
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation.(*Operator).HandleConfig(0xc0000f84d0, 0x4a4d4c0, 0xc0002a9840, 0x0, 0x4a46500)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/operation/operator.go:149 +0x3f5
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application.(*operatorStream).Execute(0xc000183110, 0xc0002a9840, 0xc000183110, 0x4a46500)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/application/stream.go:57 +0x49
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application.(*router).Dispatch(0xc0001c6de0, 0xc00017c4e0, 0x2c, 0xc00025f560, 0xc0000d7aa8, 0x1)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/application/router.go:87 +0x926
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application.emitter.func1(0xc0002188a0, 0x1, 0x1)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/application/emitter.go:79 +0x82a
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application.readfiles(0xc000248260, 0x1, 0x1, 0xc000046500, 0x14, 0xc00021b680)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/application/emitter.go:89 +0x111
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application.(*periodic).work(0xc000183350, 0xc00042ff40, 0x2)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/application/periodic.go:88 +0x436
github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application.(*periodic).Start.func1(0xc000183350)
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/application/periodic.go:38 +0x1a2
created by github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application.(*periodic).Start
        /go/src/github.com/elastic/beats/x-pack/elastic-agent/pkg/agent/application/periodic.go:26 +0x3f

this is because application is still marked as started (due to latest fix) so Start is skipped
this results in srvState and processState being nil and ^^

@blakerouse
Copy link
Contributor Author

@michalpristas Believe it's fixed now, but at this rate, I won't be surprised if not.

Seems that we need to add even more unit tests, especially to cover the side-car flow as that doesn't seem to have any coverage.

@michalpristas
Copy link
Contributor

yes i'm looking forward to integration tests as unit testing this is just for a peace of mind. these parts are even platfrom specific and OS dependent

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.

tested ok

@blakerouse blakerouse merged commit 0c15394 into elastic:master Jun 10, 2020
@blakerouse blakerouse deleted the connect-grpc-agent branch June 10, 2020 14:52
blakerouse added a commit to blakerouse/beats that referenced this pull request Jun 10, 2020
…he beats are connecting back to Agent (elastic#18973)

* Update libbeat fleet management to use elastic-agent-client.

* Work on switching to the new GRPC.

* More on refactor

* Add back the state.

* Format and check

* Add changelog.

* Cleanup.

* mage fmt in x-pack/libbeat.

* Update go.mod.

* Fix from review.

* Fix NewFromConfig comment

* Update go.mod

* Fix imports.

* Fix some locking issues from review.

* Fix lots of issues, add unit testing to cover restarts on failure reporting or crashes.

* Update go.sum

* Fix TestConfigurableRun.

* Fix range over registered apps in GRPC server using RWLock, switch to sync.Map.

* Fix config.

* Fix tests to work on Windows.

* Fix operation start to not start the same application twice.

* Fix enabling and disabling of monitoring.

(cherry picked from commit 0c15394)
blakerouse added a commit that referenced this pull request Jun 12, 2020
…he beats are connecting back to Agent (#18973) (#19108)

* Update libbeat fleet management to use elastic-agent-client.

* Work on switching to the new GRPC.

* More on refactor

* Add back the state.

* Format and check

* Add changelog.

* Cleanup.

* mage fmt in x-pack/libbeat.

* Update go.mod.

* Fix from review.

* Fix NewFromConfig comment

* Update go.mod

* Fix imports.

* Fix some locking issues from review.

* Fix lots of issues, add unit testing to cover restarts on failure reporting or crashes.

* Update go.sum

* Fix TestConfigurableRun.

* Fix range over registered apps in GRPC server using RWLock, switch to sync.Map.

* Fix config.

* Fix tests to work on Windows.

* Fix operation start to not start the same application twice.

* Fix enabling and disabling of monitoring.

(cherry picked from commit 0c15394)
v1v added a commit to v1v/beats that referenced this pull request Jun 12, 2020
…ngs-archive

* upstream/master: (119 commits)
  Update filebeat input docs (elastic#19110)
  Add ECS fields from log pipeline of PostgreSQL (elastic#19127)
  Init package libbeat/statestore (elastic#19117)
  [Ingest Manager] Retryable downloads of beats (elastic#19102)
  [DOCS] Add output.console to Functionbeat doc and Functionbeat reference file (elastic#18965)
  Add compatibility info (elastic#18929)
  Set ecszap version to v0.2.0 (elastic#19106)
  [filebeat][httpjson] Fix unit test function call (elastic#19124)
  [Filebeat][httpjson] Adds oauth2 support for httpjson input (elastic#18892)
  Allow host.* fields to be disabled in Suricata module (elastic#19107)
  Make selector string casing configurable (elastic#18854)
  Switch the GRPC communication where Agent is running the server and the beats are connecting back to Agent (elastic#18973)
  Disable host.* fields by default for netflow module (elastic#19087)
  Automatically fill zube teams on backports if available (elastic#18924)
  Fix crash on vsphere module (elastic#19078)
  [Ingest Manager] Download snapshot artifacts from snapshots repo (elastic#18685)
  [Ingest Manager] Basic Elastic Agent documentation (elastic#19030)
  Make user.id a string in system/users, in line with ECS (elastic#19019)
  [docs] Add 7.8 release highlights placeholder file (elastic#18493)
  Fix translate_sid's empty target field handling (elastic#18991)
  ...
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…he beats are connecting back to Agent (elastic#18973)

* Update libbeat fleet management to use elastic-agent-client.

* Work on switching to the new GRPC.

* More on refactor

* Add back the state.

* Format and check

* Add changelog.

* Cleanup.

* mage fmt in x-pack/libbeat.

* Update go.mod.

* Fix from review.

* Fix NewFromConfig comment

* Update go.mod

* Fix imports.

* Fix some locking issues from review.

* Fix lots of issues, add unit testing to cover restarts on failure reporting or crashes.

* Update go.sum

* Fix TestConfigurableRun.

* Fix range over registered apps in GRPC server using RWLock, switch to sync.Map.

* Fix config.

* Fix tests to work on Windows.

* Fix operation start to not start the same application twice.

* Fix enabling and disabling of monitoring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants