opensearch-project / opensearch-oci-object-storage

OpenSearch Repository Plugin For Oci Object Storage
Apache License 2.0
7 stars 19 forks source link

[BUG] OS crashes if region is not provided during instance principle configuration #57

Open IshaGirdhar opened 9 months ago

IshaGirdhar commented 9 months ago

What is the bug?

With OS 2.7.0, once the plugin is installed when the config is provided for the instance principle, if the region is omitted, OS crashes with this error.

[ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [opensearch-es-master-0] fatal error in thread [opensearch[opensearch-es-master-0][snapshot][T#1]], exiting
java.lang.ExceptionInInitializerError: null
    at com.oracle.bmc.Region.getRegionAndRegisterIfNecessary(Region.java:630) ~[?:?]
fatal error in thread [opensearch[opensearch-es-master-0][snapshot][T#1]], exiting
    at com.oracle.bmc.Region.fromRegionCodeOrId(Region.java:439) ~[?:?]

How can one reproduce the bug?

  1. Install standalone OS 2.7.0
  2. Install this plugin
  3. Configure the repository with instance principle PUT /_snapshot/oci_repository { "type": "oci", "settings": { "client": "default", "endpoint": , "bucket": "empty1", "namespace": "empty2", "bucket_compartment_id": "empty3", "useInstancePrincipal": true, "forceBucketCreation" : true } }

What is the expected behavior?

Expect an error if region is not provided, but OS should not crash

What is your host/environment?

OpenSearch: 2.7.0 OS : Oracle-Linux-7.9-2022

Do you have any screenshots?

If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Add any other context about the problem.

dblock commented 3 months ago

[Triage -- attendees 1, 2, 3, 4, 5, 6, 7]

Looks like a valid problem.