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

Revert beat _type changes #3559

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

dreamer-89
Copy link
Member

Description

This PR reverts the temporary changes added to support the typed requests from filebeat. With version spoofing change, these changes are no longer required.
This reverts following PRs from 2.0

  1. fc8803f
  2. 5bd7236

Issues Resolved

#3484

Related

a20cd3e

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dreamer-89 dreamer-89 requested a review from a team as a code owner June 10, 2022 18:55
@dreamer-89 dreamer-89 requested a review from nknize June 10, 2022 18:55
@dreamer-89 dreamer-89 changed the title Revert beat _type changes [WIP] Revert beat _type changes Jun 10, 2022
@dreamer-89
Copy link
Member Author

Verifying changes, please do not merge.

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success d476785
Log 5896

Reports 5896

@dreamer-89
Copy link
Member Author

dreamer-89 commented Jun 10, 2022

Changes verification

  1. Integration tests. The tests which rely on ES version checks passes but ones which are directly using typed end-points fails (expected).

  2. Manual
    Changed min compatibility version using below persistent setting which mock OpenSearch 2.0.0 as 7.10.2, the filebeat client was able to connect to OpenSearch 2.0

curl -X PUT "localhost:9200/_cluster/settings?pretty" -H "Content-Type:application/json" -d '{
  "persistent" : {
    "compatibility.override_main_response_version" : true
  }
}
'

Version changes from 2.0.1-SNAPSHOT to 7.10.2

ubuntu@ip-172-31-33-23:~$ curl localhost:9200
{
  "name" : "runTask-0",
  "cluster_name" : "runTask",
  "cluster_uuid" : "MJfsCrLcT0y9tIHZ034rTQ",
  "version" : {
    "number" : "7.10.2",
    "build_type" : "tar",
    "build_hash" : "d47678543378939ce6edd8baec2d37d9ad37a166",
    "build_date" : "2022-06-10T19:56:45.440887Z",
    "build_snapshot" : true,
    "lucene_version" : "9.1.0",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"

As soon setting upgrade, the errors around unknown type stopped.

...
2022-06-10T20:36:32.217Z	INFO	[publisher_pipeline_output]	pipeline/output.go:143	Connecting to backoff(elasticsearch(http://localhost:9200))
2022-06-10T20:36:32.218Z	INFO	[esclientleg]	eslegclient/connection.go:314	Attempting to connect to Elasticsearch version 2.0.1-SNAPSHOT
2022-06-10T20:36:32.224Z	INFO	[publisher_pipeline_output]	pipeline/output.go:151	Connection to backoff(elasticsearch(http://localhost:9200)) established
2022-06-10T20:36:32.228Z	ERROR	[elasticsearch]	elasticsearch/client.go:224	failed to perform any bulk index operations: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"}],"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"},"status":400}
2022-06-10T20:36:32.228Z	INFO	[publisher]	pipeline/retry.go:219	retryer: send unwait signal to consumer
2022-06-10T20:36:32.228Z	INFO	[publisher]	pipeline/retry.go:223	  done
2022-06-10T20:36:33.481Z	ERROR	[publisher_pipeline_output]	pipeline/output.go:180	failed to publish events: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"}],"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"},"status":400}
2022-06-10T20:36:33.481Z	INFO	[publisher_pipeline_output]	pipeline/output.go:143	Connecting to backoff(elasticsearch(http://localhost:9200))
2022-06-10T20:36:33.481Z	INFO	[publisher]	pipeline/retry.go:219	retryer: send unwait signal to consumer
2022-06-10T20:36:33.481Z	INFO	[publisher]	pipeline/retry.go:223	  done
2022-06-10T20:36:33.482Z	INFO	[esclientleg]	eslegclient/connection.go:314	Attempting to connect to Elasticsearch version 2.0.1-SNAPSHOT
2022-06-10T20:36:33.488Z	INFO	[publisher_pipeline_output]	pipeline/output.go:151	Connection to backoff(elasticsearch(http://localhost:9200)) established
2022-06-10T20:36:33.492Z	ERROR	[elasticsearch]	elasticsearch/client.go:224	failed to perform any bulk index operations: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"}],"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"},"status":400}
2022-06-10T20:36:33.492Z	INFO	[publisher]	pipeline/retry.go:219	retryer: send unwait signal to consumer
2022-06-10T20:36:33.492Z	INFO	[publisher]	pipeline/retry.go:223	  done
2022-06-10T20:36:35.294Z	ERROR	[publisher_pipeline_output]	pipeline/output.go:180	failed to publish events: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"}],"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"},"status":400}
2022-06-10T20:36:35.295Z	INFO	[publisher_pipeline_output]	pipeline/output.go:143	Connecting to backoff(elasticsearch(http://localhost:9200))
2022-06-10T20:36:35.295Z	INFO	[publisher]	pipeline/retry.go:219	retryer: send unwait signal to consumer
2022-06-10T20:36:35.295Z	INFO	[publisher]	pipeline/retry.go:223	  done
2022-06-10T20:36:35.297Z	INFO	[esclientleg]	eslegclient/connection.go:314	Attempting to connect to Elasticsearch version 7.10.2 --> Changes from 2.0.0 -> 7.10.2
2022-06-10T20:36:35.303Z	INFO	[publisher_pipeline_output]	pipeline/output.go:151	Connection to backoff(elasticsearch(http://localhost:9200)) established
2022-06-10T20:36:37.750Z	INFO	[monitoring]	log/log.go:144	Non-zero metrics in the last 30s	{"monitoring": {"metrics": {"beat":{"cgroup":{"cpuacct":{"total":{"ns":22515505942}},"memory":{"mem":{"usage":{"bytes":290816}}}},"cpu":{"system":{"ticks":4070,"time":{"ms":103}},"total":{"ticks":20370,"time":{"ms":285},"value":20370},"user":{"ticks":16300,"time":{"ms":182}}},"handles":{"limit":{"hard":1048576,"soft":1024},"open":12},"info":{"ephemeral_id":"9562ce41-e8ca-4804-9df0-3feb0f83afb2","uptime":{"ms":2490052}},"memstats":{"gc_next":12563312,"memory_alloc":7285552,"memory_total":917167240,"rss":152166400},"runtime":{"goroutines":38}},"filebeat":{"events":{"added":9,"done":9},"harvester":{"open_files":1,"running":1}},"libbeat":{"config":{"module":{"running":1}},"output":{"events":{"acked":9,"active":827,"batches":12,"total":89},"read":{"bytes":37154},"write":{"bytes":240449}},"pipeline":{"clients":2,"events":{"active":0,"published":9,"retry":168,"total":9},"queue":{"acked":9}}},"registrar":{"states":{"current":4,"update":9},"writes":{"success":2,"total":2}},"system":{"load":{"1":0.2,"15":0.1,"5":0.09,"norm":{"1":0.0028,"15":0.0014,"5":0.0013}}}}}}
2022-06-10T20:37:07.750Z	INFO	[monitoring]	log/log.go:144	Non-zero metrics in the last 30s	{"monitoring": {"metrics": {"beat":{"cgroup":{"cpuacct":{"total":{"ns":1292166437}},"memory":{"mem":{"usage":{"bytes":-110592}}}},"cpu":{"system":{"ticks":4080,"time":{"ms":9}},"total":{"ticks":20400,"time":{"ms":26},"value":20400},"user":{"ticks":16320,"time":{"ms":17}}},"handles":{"limit":{"hard":1048576,"soft":1024},"open":12},"info":{"ephemeral_id":"9562ce41-e8ca-4804-9df0-3feb0f83afb2","uptime":{"ms":2520050}},"memstats":{"gc_next":12563312,"memory_alloc":8847800,"memory_total":918729488,"rss":152166400},"runtime":{"goroutines":38}},"filebeat":{"events":{"added":9,"done":9},"harvester":{"open_files":1,"running":1}},"libbeat":{"config":{"module":{"running":1}},"output":{"events":{"acked":9,"active":827,"batches":3,"total":9},"read":{"bytes":1062},"write":{"bytes":25228}},"pipeline":{"clients":2,"events":{"active":0,"published":9,"total":9},"queue":{"acked":9}}},"registrar":{"states":{"current":4,"update":9},"writes":{"success":3,"total":3}},"system":{"load":{"1":0.3,"15":0.11,"5":0.13,"norm":{"1":0.0042,"15":0.0015,"5":0.0018}}}}}}

Meanwhile the docs were added

ubuntu@ip-172-31-33-23:~$ curl localhost:9200/_cat/indices?v
health status index                      uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   filebeat-7.12.1-2022.06.10 S6WNVhKXTbK3I8EO5fUz2g   1   1         17            0      150kb          150kb
ubuntu@ip-172-31-33-23:~$ curl localhost:9200/_cat/indices?v
health status index                      uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   filebeat-7.12.1-2022.06.10 S6WNVhKXTbK3I8EO5fUz2g   1   1         18            0      150kb          150kb

Client: filebeat-7.12.1 (enabled system module)

@dreamer-89 dreamer-89 changed the title [WIP] Revert beat _type changes Revert beat _type changes Jun 10, 2022
Copy link
Collaborator

@nknize nknize left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this!

@nknize nknize merged commit 6462a54 into opensearch-project:2.0 Jun 10, 2022
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.

4 participants