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

Move allocation awareness attributes to list setting #30626

Merged
merged 1 commit into from
May 16, 2018

Conversation

ywelsch
Copy link
Contributor

@ywelsch ywelsch commented May 15, 2018

Allows the setting to be specified using proper array syntax, for example:

"cluster.routing.allocation.awareness.attributes": [ "foo", "bar", "baz" ]

Closes #30617

@ywelsch ywelsch added >bug v7.0.0 :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) v6.4.0 v6.3.1 labels May 15, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Contributor

@bleskes bleskes left a comment

Choose a reason for hiding this comment

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

LGTM. I wonder if this should be marked as breaking as I believe we now return this setting as a list where before we returned it as a string all the time.

@ywelsch
Copy link
Contributor Author

ywelsch commented May 16, 2018

@bleskes fortunately not. The setting is returned in the same way as it was set.

For example:

$ cat bla.json 
{
  "persistent": {
    "cluster.routing.allocation.awareness.attributes": "foo,bar"
  }
}

$ http PUT :9200/_cluster/settings < bla.json
HTTP/1.1 200 OK
content-encoding: gzip
content-length: 118
content-type: application/json; charset=UTF-8

{
    "acknowledged": true,
    "persistent": {
        "cluster": {
            "routing": {
                "allocation": {
                    "awareness": {
                        "attributes": "foo,bar"
                    }
                }
            }
        }
    },
    "transient": {}
}

$ http :9200/_cluster/settings
HTTP/1.1 200 OK
content-encoding: gzip
content-length: 105
content-type: application/json; charset=UTF-8

{
    "persistent": {
        "cluster": {
            "routing": {
                "allocation": {
                    "awareness": {
                        "attributes": "foo,bar"
                    }
                }
            }
        }
    },
    "transient": {}
}

versus

$ cat bla.json 
{
  "persistent": {
    "cluster.routing.allocation.awareness.attributes": ["foo", "bar"]
  }
}

$ http PUT :9200/_cluster/settings < bla.json
HTTP/1.1 200 OK
content-encoding: gzip
content-length: 123
content-type: application/json; charset=UTF-8

{
    "acknowledged": true,
    "persistent": {
        "cluster": {
            "routing": {
                "allocation": {
                    "awareness": {
                        "attributes": [
                            "foo",
                            "bar"
                        ]
                    }
                }
            }
        }
    },
    "transient": {}
}

$ http :9200/_cluster/settings
HTTP/1.1 200 OK
content-encoding: gzip
content-length: 110
content-type: application/json; charset=UTF-8

{
    "persistent": {
        "cluster": {
            "routing": {
                "allocation": {
                    "awareness": {
                        "attributes": [
                            "foo",
                            "bar"
                        ]
                    }
                }
            }
        }
    },
    "transient": {}
}

@bleskes
Copy link
Contributor

bleskes commented May 16, 2018

@ywelsch cool. sometimes you get lucky :)

@ywelsch ywelsch merged commit 3161386 into elastic:master May 16, 2018
ywelsch added a commit that referenced this pull request May 16, 2018
Allows the setting to be specified using proper array syntax, for example:
"cluster.routing.allocation.awareness.attributes": [ "foo", "bar", "baz" ]

Closes #30617
ywelsch added a commit that referenced this pull request May 16, 2018
Allows the setting to be specified using proper array syntax, for example:
"cluster.routing.allocation.awareness.attributes": [ "foo", "bar", "baz" ]

Closes #30617
@bleskes bleskes added v6.3.0 and removed v6.3.1 labels May 16, 2018
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request May 16, 2018
…bad-mkay

* elastic/6.x:
  [ML] Wait for ML indices in rolling upgrade tests (elastic#30615)
  Watcher: Ensure secrets integration tests also run triggered watch (elastic#30478)
  Move allocation awareness attributes to list setting (elastic#30626)
  [Docs] Update code snippet in has-child-query.asciidoc (elastic#30510)
  Allow date math for naming newly-created snapshots (elastic#7939) (elastic#30479)
  Awaits fix a failing test
  Switch many QA projects to use new style requests (elastic#30574)
  QA: System property to override distribution (elastic#30591)
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request May 16, 2018
…ngs-to-true

* elastic/master: (34 commits)
  Test: increase search logging for LicensingTests
  Adjust serialization version in IndicesOptions
  [TEST] Fix compilation
  Remove version argument in RangeFieldType (elastic#30411)
  Remove unused DirectoryUtils class. (elastic#30582)
  Mitigate date histogram slowdowns with non-fixed timezones. (elastic#30534)
  Add a MovingFunction pipeline aggregation, deprecate MovingAvg agg (elastic#29594)
  Removes AwaitsFix on IndicesOptionsTests
  Template upgrades should happen in a system context (elastic#30621)
  Fix bug in BucketMetrics path traversal (elastic#30632)
  Fixes IndiceOptionsTests to serialise correctly (elastic#30644)
  S3 repo plugin populate SettingsFilter (elastic#30652)
  mute IndicesOptionsTests.testSerialization
  Rest High Level client: Add List Tasks (elastic#29546)
  Refactors ClientHelper to combine header logic (elastic#30620)
  [ML] Wait for ML indices in rolling upgrade tests (elastic#30615)
  Watcher: Ensure secrets integration tests also run triggered watch (elastic#30478)
  Move allocation awareness attributes to list setting (elastic#30626)
  [Docs] Update code snippet in has-child-query.asciidoc (elastic#30510)
  Replace custom reloadable Key/TrustManager (elastic#30509)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) v6.3.0 v6.4.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants