Skip to content

Commit

Permalink
Permit wait_for_active_shards warnings in master
Browse files Browse the repository at this point in the history
Part of the fixes for elastic#66419, this commit permits nodes to emit the
deprecation warning regarding not specifying `?wait_for_active_shards`
when closing an index in 7.x versions for x ≥ 12. This change is
required on `master` too since the BWC tests encounter these warnings.

Relates elastic#67246, which is the 7.x part of this change.
  • Loading branch information
DaveCTurner committed Jan 14, 2021
1 parent 11640bc commit 726450e
Show file tree
Hide file tree
Showing 34 changed files with 179 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
---
"Create a snapshot and then restore it":
- skip:
features: ["allowed_warnings"]

# Create repository
- do:
Expand Down Expand Up @@ -47,6 +49,8 @@
- do:
indices.close:
index : test_index
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

# Restore index
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
---
"Create a snapshot and then restore it":
- skip:
features: ["allowed_warnings"]

# Create repository
- do:
Expand Down Expand Up @@ -49,6 +51,8 @@
- do:
indices.close:
index : test_index
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

# Restore index
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@
- skip:
version: " - 7.3.99"
reason: "is_write_index is shown in cat.aliases starting version 7.4.0"
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -399,6 +400,8 @@
- do:
indices.close:
index: test_index
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
cat.aliases:
Expand All @@ -419,7 +422,7 @@
"Alias against closed index (pre 7.4.0)":
- skip:
version: "7.4.0 - "
features: node_selector
features: ["node_selector", "allowed_warnings"]
reason: "is_write_index is shown in cat.aliases starting version 7.4.0"

- do:
Expand All @@ -432,6 +435,8 @@
- do:
indices.close:
index: test_index
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
node_selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- skip:
version: "7.2.0 - "
reason: "closed indices are replicated starting version 7.2.0"
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -66,6 +67,8 @@
- do:
indices.close:
index: index-2
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand Down Expand Up @@ -95,6 +98,7 @@
- skip:
version: " - 7.1.99"
reason: "closed indices are replicated starting version 7.2.0"
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -107,6 +111,8 @@
- do:
indices.close:
index: index-2
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand Down Expand Up @@ -221,6 +227,8 @@
---
"Test cat indices sort":
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
Expand Down Expand Up @@ -249,6 +257,8 @@
- do:
indices.close:
index: bar
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
cat.indices:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
- skip:
version: " - 7.99.99"
reason: format of bytes output changed in 8.0.0
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -96,6 +97,8 @@
- do:
indices.close:
index: index2
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
---
"Test cat segments on closed index behaviour":
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -95,6 +97,8 @@
- do:
indices.close:
index: index1
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
catch: bad_request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- skip:
version: " - 7.1.99"
reason: closed indices are replicated starting version 7.2.0
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -68,6 +69,8 @@
- do:
indices.close:
index: test_closed
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- match: { acknowledged: true }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
- skip:
version: "7.2.0 - "
reason: "closed indices are replicated starting version 7.2.0"
features: ["allowed_warnings"]

- do:
indices.create:
Expand Down Expand Up @@ -180,6 +181,8 @@
- do:
indices.close:
index: index-2
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

# closing the index-2 turns the cluster health back to green
Expand Down Expand Up @@ -208,6 +211,7 @@
- skip:
version: " - 7.1.99"
reason: "closed indices are replicated starting version 7.2.0"
features: ["allowed_warnings"]

- do:
indices.create:
Expand Down Expand Up @@ -255,6 +259,8 @@
- do:
indices.close:
index: index-2
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
setup:
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -23,6 +25,8 @@ setup:
- do:
indices.close:
index: index-2
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
cluster.health:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
setup:
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -25,6 +27,8 @@ setup:
- do:
indices.close:
index: test_close_index
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

---
"Test expand_wildcards parameter on closed, open indices and both":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
setup:
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
Expand Down Expand Up @@ -38,6 +40,8 @@ setup:
- do:
indices.close:
index: test_index_3
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
cluster.health:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
setup:

- do:
indices.create:
index: test_index
Expand Down Expand Up @@ -303,10 +302,14 @@ setup:

---
"Get alias against closed indices":
- skip:
features: ["allowed_warnings"]

- do:
indices.close:
index: test_index_2
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
indices.get_alias:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
setup:
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
index: test-xxx
Expand Down Expand Up @@ -52,6 +55,8 @@ setup:
- do:
indices.close:
index: test-xyy
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- do:
cluster.health:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
"Basic test for index open/close":
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
index: test_index
Expand All @@ -14,6 +17,8 @@
- do:
indices.close:
index: test_index
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand All @@ -38,6 +43,8 @@

---
"Open index with wait_for_active_shards set to all":
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
Expand All @@ -49,6 +56,8 @@
- do:
indices.close:
index: test_index
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand Down Expand Up @@ -81,6 +90,9 @@
- match: { shards_acknowledged: true }
---
"Close index response with result per index":
- skip:
features: ["allowed_warnings"]

- do:
indices.create:
index: index_1
Expand All @@ -105,6 +117,8 @@
- do:
indices.close:
index: "index_*"
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"

- match: { acknowledged: true }
- match: { shards_acknowledged: true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ setup:

---
"All indices":
- skip:
features: ["allowed_warnings"]

- do:
indices.close:
index: _all
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand All @@ -50,9 +55,14 @@ setup:

---
"Trailing wildcard":
- skip:
features: ["allowed_warnings"]

- do:
indices.close:
index: test_*
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand All @@ -77,9 +87,14 @@ setup:

---
"Only wildcard":
- skip:
features: ["allowed_warnings"]

- do:
indices.close:
index: '*'
allowed_warnings:
- "the default value for the ?wait_for_active_shards parameter will change from '0' to 'index-setting' in version 8; specify '?wait_for_active_shards=index-setting' to adopt the future default behaviour, or '?wait_for_active_shards=0' to preserve today's behaviour"
- is_true: acknowledged

- do:
Expand Down
Loading

0 comments on commit 726450e

Please sign in to comment.