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

Quoting issue breaking idempotence #1070

Open
cdenneen opened this issue Feb 12, 2020 · 0 comments
Open

Quoting issue breaking idempotence #1070

cdenneen opened this issue Feb 12, 2020 · 0 comments

Comments

@cdenneen
Copy link
Contributor

cdenneen commented Feb 12, 2020

Appears to be issue with this again: #957

Module 6.4.0

Slightly different because some values that @alexharv074 had to quote like Boolean and Integer values appear to be okay now but still showing a diff regardless that the result is the same:

template

{
    "order": 1,
    "index_patterns" : [ "logstash-cloudtrail*" ],
    "settings" : {
      "index.mapping.total_fields.limit": 8000,
      "index.mapping.ignore_malformed": true,
      "index.routing.allocation.require.node_type": "hot",
      "index.refresh_interval" : "30s",
      "index.merge.scheduler.max_thread_count" : 1,
      "index.number_of_replicas" : 2,
      "index.number_of_shards" : 2,
      "index.lifecycle.rollover_alias": "logstash-cloudtrail-write",
      "index.lifecycle.name": "logging_policy"
    },
    "mappings" : {
      "_doc": {
        "dynamic_templates" : [ {
          "message_field" : {
            "path_match" : "message",
            "match_mapping_type" : "string",
            "mapping" : {
              "norms" : false,
              "type" : "text"
            }
          }
        }, {
          "string_fields" : {
            "match" : "*",
            "match_mapping_type" : "string",
            "mapping" : {
              "type" : "text", "norms" : false,
              "fields" : {
                "keyword" : { "type" : "keyword", "ignore_above" : "256" }
              }
            }
          }
        } ],
        "properties" : {
          "@timestamp" : { "type" : "date" },
          "@version" : { "type" : "keyword" }
        }
      }
    },
    "aliases" : {
      "all_logs": {}
    }
  }

puppet run

Notice: /Stage[main]/Profile::Elasticsearch/Elasticsearch::Template[logstash-cloudtrail]/Elasticsearch_template[logstash-cloudtrail]/content: current_value {"order"=>1, "index_patterns"=>["logstash-cloudtrail*"], "settings"=>{"index"=>{"lifecycle"=>{"name"=>"logging_policy", "rollover_alias"=>"logstash-cloudtrail-write"}, "routing"=>{"allocation"=>{"require"=>{"node_type"=>"hot"}}}, "mapping"=>{"total_fields"=>{"limit"=>8000}, "ignore_malformed"=>"true"}, "refresh_interval"=>"30s", "number_of_shards"=>2, "merge"=>{"scheduler"=>{"max_thread_count"=>1}}, "number_of_replicas"=>2}}, "mappings"=>{"_doc"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "mapping"=>{"norms"=>false, "type"=>"text"}, "match_mapping_type"=>"string"}}, {"string_fields"=>{"mapping"=>{"norms"=>false, "type"=>"text", "fields"=>{"keyword"=>{"ignore_above"=>256, "type"=>"keyword"}}}, "match_mapping_type"=>"string", "match"=>"*"}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}}}}, "aliases"=>{"all_logs"=>{}}}, should be {"order"=>1, "aliases"=>{"all_logs"=>{}}, "mappings"=>{"_doc"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"norms"=>false, "type"=>"text"}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}}}}, "index_patterns"=>["logstash-cloudtrail*"], "settings"=>{"index"=>{"mapping.total_fields.limit"=>8000, "mapping.ignore_malformed"=>true, "routing.allocation.require.node_type"=>"hot", "refresh_interval"=>"30s", "merge.scheduler.max_thread_count"=>1, "number_of_replicas"=>2, "number_of_shards"=>2, "lifecycle.rollover_alias"=>"logstash-cloudtrail-write", "lifecycle.name"=>"logging_policy"}}} (noop)
Notice: Elasticsearch::Template[logstash-cloudtrail]: Would have triggered 'refresh' from 1 events

ruby diff

[
  [0] [
    [0] "-",
    [1] "settings.index.lifecycle",
    [2] {
                "name" => "logging_policy",
      "rollover_alias" => "logstash-cloudtrail-write"
    }
  ],
  [1] [
    [0] "-",
    [1] "settings.index.mapping",
    [2] {
      "ignore_malformed" => "true",
          "total_fields" => {
        "limit" => 8000
      }
    }
  ],
  [2] [
    [0] "-",
    [1] "settings.index.merge",
    [2] {
      "scheduler" => {
        "max_thread_count" => 1
      }
    }
  ],
  [3] [
    [0] "-",
    [1] "settings.index.routing",
    [2] {
      "allocation" => {
        "require" => {
          "node_type" => "hot"
        }
      }
    }
  ],
  [4] [
    [0] "+",
    [1] "settings.index.lifecycle.name",
    [2] "logging_policy"
  ],
  [5] [
    [0] "+",
    [1] "settings.index.lifecycle.rollover_alias",
    [2] "logstash-cloudtrail-write"
  ],
  [6] [
    [0] "+",
    [1] "settings.index.mapping.ignore_malformed",
    [2] true
  ],
  [7] [
    [0] "+",
    [1] "settings.index.mapping.total_fields.limit",
    [2] 8000
  ],
  [8] [
    [0] "+",
    [1] "settings.index.merge.scheduler.max_thread_count",
    [2] 1
  ],
  [9] [
    [0] "+",
    [1] "settings.index.routing.allocation.require.node_type",
    [2] "hot"
  ]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant