Open
Description
Description
With #63513 feature states were added to elasticsearch allowing users to backup system indices and other related state of certain features. But there is a small oddity with the way the API's works now: when a policy which has featureStates: ['none'] is executed, the resulting snapshot will endup with featureStates: []. This is very confusing as the api states that if the array is empty then it includes all features.
Would it be possible that when a policy that has featureStates: ['none']
is executed, the resulting snapshot would have featureStates: ['none']
instead of features: []
?
PUT _slm/policy/test-api-no-features
{
"name": "test-api-none",
"schedule": "0 30 1 * * ?",
"repository": "test",
"config": {
"include_global_state": true,
"feature_states": ["none"]
}
}
# execute newly created policy and then retrieve it
GET _snapshot/test/*
Which results in:
{
"snapshots": [
{
"snapshot": "test-api-none-zokojrvfqdmv6j7yd48sdq",
"uuid": "B28zlvQfSySZOhaaU_QLSw",
"repository": "test",
"version_id": 8030099,
"version": "8.3.0",
"indices": [
".ds-.slm-history-5-2022.05.10-000001",
".ds-.logs-deprecation.elasticsearch-default-2022.05.10-000001",
".kibana-event-log-8.3.0-000001",
".ds-ilm-history-5-2022.05.10-000001"
],
"data_streams": [
"ilm-history-5",
".logs-deprecation.elasticsearch-default",
".slm-history-5"
],
"include_global_state": true,
"metadata": {
"policy": "test-api-no-features"
},
"state": "SUCCESS",
"start_time": "2022-05-10T12:13:59.604Z",
"start_time_in_millis": 1652184839604,
"end_time": "2022-05-10T12:14:03.262Z",
"end_time_in_millis": 1652184843262,
"duration_in_millis": 3658,
"failures": [],
"shards": {
"total": 4,
"failed": 0,
"successful": 4
},
"feature_states": []
}
],
"total": 1,
"remaining": 0
}