OpenSearch/plugins
David Pilato 8b0df47381 readonly on azure repository must be taken into account
While I was fixing a documentation issue (#22007), I looked at the code and discovered that we actually never read what the user entered as a `readonly` parameter when he creates an azure repository.

So if someone sends:

```
PUT _snapshot/my_backup4
{
    "type": "azure",
    "settings": {
        "account": "my_account2",
        "location_mode": "primary_only",
        "readonly": true
    }
}
```

The repository is not actually defined as `readonly`.

It's caused by the fact we are always overwriting `readonly`setting based on `location_mode`.
If a user sets it to `primary_only`, `readonly` is forced to `false`.
If a user sets it to `primary_then_secondary`, `readonly` is forced to `false`.
If a user sets it to `secondary_only`, `readonly` is forced to `false`.

Note that with this change, a user can force a `secondary_only` repository to `readonly: false` which will lead him to an error later on when we check the repository as per definition in Azure, a secondary repository is not writable.
Another option could have been to detect this mismatch and throw an exception in that case. Note sure it is worth writing more code though.

Closes #22053.
2016-12-08 18:54:00 +01:00
..
analysis-icu Upgrade to lucene-6.4.0-snapshot-ec38570 (#21853) 2016-11-29 18:40:31 +01:00
analysis-kuromoji Upgrade to lucene-6.4.0-snapshot-ec38570 (#21853) 2016-11-29 18:40:31 +01:00
analysis-phonetic Upgrade to lucene-6.4.0-snapshot-ec38570 (#21853) 2016-11-29 18:40:31 +01:00
analysis-smartcn Upgrade to lucene-6.4.0-snapshot-ec38570 (#21853) 2016-11-29 18:40:31 +01:00
analysis-stempel Upgrade to lucene-6.4.0-snapshot-ec38570 (#21853) 2016-11-29 18:40:31 +01:00
analysis-ukrainian Upgrade to lucene-6.4.0-snapshot-ec38570 (#21853) 2016-11-29 18:40:31 +01:00
discovery-azure-classic Remove `InternalTestCluster.startNode(s)Async` (#21846) 2016-12-06 12:06:15 +01:00
discovery-ec2 Merge pull request #21956 from alexshadow007/aws_read_timeout 2016-12-07 16:00:48 +01:00
discovery-file Lazy resolve unicast hosts 2016-11-22 14:17:04 -05:00
discovery-gce Remove `InternalTestCluster.startNode(s)Async` (#21846) 2016-12-06 12:06:15 +01:00
ingest-attachment Update to Tika 1.14 2016-11-16 11:29:14 +01:00
ingest-geoip Remove (again) test uses of onModule (#21414) 2016-11-10 16:06:14 -08:00
ingest-user-agent Test: Remove multi process support from rest test runner (#21391) 2016-11-07 15:07:34 -08:00
jvm-example Remove (again) test uses of onModule (#21414) 2016-11-10 16:06:14 -08:00
mapper-murmur3 fix TemplateQueryBuilderTests & Murmur3FieldMapperTests 2016-12-01 14:21:57 +01:00
mapper-size Remove 2.x backward compatibility of mappings. (#21670) 2016-11-30 13:34:46 +01:00
repository-azure readonly on azure repository must be taken into account 2016-12-08 18:54:00 +01:00
repository-gcs Test: Remove multi process support from rest test runner (#21391) 2016-11-07 15:07:34 -08:00
repository-hdfs Test: Remove multi process support from rest test runner (#21391) 2016-11-07 15:07:34 -08:00
repository-s3 Merge pull request #21956 from alexshadow007/aws_read_timeout 2016-12-07 16:00:48 +01:00
store-smb Remove store throttling. (#21573) 2016-11-17 09:33:32 +01:00
build.gradle Build: Remove old maven deploy support (#20403) 2016-09-19 15:10:41 -07:00