Share
Embed
Transcript
98 slides
-
archana sriram kibana engineer elastic eldnahevitaerc upgrade to 6.0 leading
with empathy archanid ^ change -
Elasticsearch: Core/Infra, Distributed, Search & Aggs, Lucene, Security Documentation Kibana
Operations Kibana Platform Monitoring (Kibana & Elasticsearch) Beats Logstash Cloud Support Kibana QA -
How to ruin your elasticsearch installation A heart-rending tragicomedy A
recurring nightmare -
How to ruin your elasticsearch installation A heart-rending tragicomedy A
recurring nightmare A true story -
[2018-01-27T01:06:02,635][INFO ][o.e.d.z.ZenDiscovery ] [chmgl9ap15] failed to send join request to
master [{chmgl9ap16}{- enENLKCQnaYPJW7IL80YA}{sK8- LS1OQhe9zOCTXJpdFg}{10.212.81.133}{10.212.81.133:9300}{ml.ma x_open_jobs=10, ml.enabled=true}], reason [RemoteTransportException[[chmgl9ap16][10.212.81.133:9300][intern al:discovery/zen/join]]; nested: IllegalStateException[failure when sending a validation request to node]; nested: RemoteTransportException[[chmgl9ap15][10.212.81.53:9300][internal: discovery/zen/join/validate]]; nested: IllegalStateException[Security index is not on the current version [6] - The Upgrade API must be run for 6.x nodes to join the cluster]; ] -
[2018-01-27T01:06:02,635][INFO ][o.e.d.z.ZenDiscovery ] [chmgl9ap15] failed to send join request to
master [{chmgl9ap16}{- enENLKCQnaYPJW7IL80YA}{sK8- LS1OQhe9zOCTXJpdFg}{10.212.81.133}{10.212.81.133:9300}{ml.ma x_open_jobs=10, ml.enabled=true}], reason [RemoteTransportException[[chmgl9ap16][10.212.81.133:9300][intern al:discovery/zen/join]]; nested: IllegalStateException[failure when sending a validation request to node]; nested: RemoteTransportException[[chmgl9ap15][10.212.81.53:9300][internal: discovery/zen/join/validate]]; nested: IllegalStateException[Security index is not on the current version [6] - The Upgrade API must be run for 6.x nodes to join the cluster]; ] -
[2018-01-27T03:13:53,725][ERROR][o.e.g.GatewayMetaState ] [chmgl9ap15] failed to read local state, exiting… org.elasticsearch.ElasticsearchException:
java.io.IOException: failed to read [id:176, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-176.st] -
[2018-01-27T03:13:53,725][ERROR][o.e.g.GatewayMetaState ] [chmgl9ap15] failed to read local state, exiting... org.elasticsearch.ElasticsearchException:
java.io.IOException: failed to read [id:176, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-176.st] -
• First, congratulations on using your literacy skills right now.
People who read instructions are rare. • 30% of users read. 15% both read and understand what they read. • You have no idea how much time went into all this documentation. • I bet you will not click the link to the documentation in the previous bullet point. • Also, those statistics about users are made up. • The next bullet point is really not worth reading, I promise. Just skip over it. • Are you frustrated because you cannot both read this slide and hear what I’m saying? • If I said nonsense right now, would you even notice? How to upgrade without borking your system 38 All the steps you need to follow to do it right! Here are the steps: -
innovate replace legacy features remove fragility improve
user experience keep our users onboard Development Constitution -
Except where otherwise noted, this work is licensed under http://creativecommons.org/licenses/by-nd/4.0/
Creative Commons and the double C in a circle are registered trademarks of Creative Commons in the United States and other countries. Third party marks and brands are the property of their respective holders. 66 Please attribute Elastic with a link to elastic.co -
user_name name email content tweeted_at user tweet user_name name email
user user_name content tweeted_at tweet -
PUT twitter { "mappings": { "user": { "properties": { "name":
{ "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } } -
PUT users { "settings": { "index.mapping.single_type": true }, "mappings": {
"user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } } } } PUT twitter { "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } } -
PUT tweets { "settings": { "index.mapping.single_type": true }, "mappings": {
"tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } } PUT users { "settings": { "index.mapping.single_type": true }, "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } } } } PUT twitter { "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } } -
POST _reindex { "source": { "index": "twitter", "type": "tweet" },
"dest": { "index": "tweets" } } POST _reindex { "source": { "index": "twitter", "type": "user" }, "dest": { "index": "users" } } -
GET users/doc/5 { "_index": "users", "_type": "doc", "_id": "5", "_version":
1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT -
GET users/doc/5 { "_index": "users", "_type": "doc", "_id": "5", "_version":
1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT -
POST users/doc/5 { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]"
} POST twitter/user/5 { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } OLD WAY TO POST A DOCUMENT NEW WAY TO POST A DOCUMENT -
user_name name email content tweeted_at user tweet user_name name email
content tweeted_at doc -
user_name name email content tweeted_at user tweet type user_name name
email content tweeted_at doc -
user_name name email content tweeted_at user tweet type user_name name
email content tweeted_at doc user tweet -
PUT new_twitter { "settings": { "index.mapping.single_type": true }, "mappings": {
"doc": { "properties": { "type": { "type": "keyword" }, "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" }, "content": { "type": "text" }, "tweeted_at": { "type": "date" } } } } } PUT twitter { "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } } -
POST _reindex { "source": { "index": "twitter", }, "dest": {
"index": "new_twitter" }, "script": { "source": """ ctx._source.type = ctx._type; ctx._id = ctx._type + '-' + ctx._id; ctx._type = 'doc'; """ } } -
GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version":
1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version": 2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT -
GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version":
2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT -
GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version":
2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT -
GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version":
2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT -
POST new_twitter/doc/user-5 { "type": "user", "user_name": "eldnahevitaerc", "name": "Archana Sriram",
"email": "[email protected]" } POST twitter/user/5 { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } OLD WAY TO POST A DOCUMENT NEW WAY TO POST A DOCUMENT -
user tweet doc type user_name name email type user_name content
tweeted_at user_name name email content tweeted_at user tweet