Skip to content

Azure storage needs the endpoint suffix after v1.15.0 #5449

Closed

Description

@friedrichg

Describe the bug
After da2ad99
all the containers that depend on block storage resources hang on authorization failing to start.
There is no message.

it's necessary to specify the endpoint suffix for all values,
In my case I had to specify blob.core.windows.net
the empty value is no longer valid.

  # Azure storage endpoint suffix without schema. The account name will be
  # prefixed to this value to create the FQDN
  # CLI flag: -ruler-storage.azure.endpoint-suffix
  [endpoint_suffix: <string> | default = ""]

Expected behavior
Cortex should now fail to start if the suffix value is not provided

Additional Context

One can see the problem with

$ cat alertmanager.yaml
alertmanager:
  data_dir: /data
  enable_api: true
alertmanager_storage:
  azure:
    account_key: dmFsaWRhY2NvdW50a2V5 # validstoragekey encoded with base64
    account_name: validstorageaccountname
    container_name: validcontainername
    # endpoint_suffix: blob.core.windows.net
  backend: azure
server:
  log_level: debug
target: alertmanager

$ docker run -e AZURE_SDK_GO_LOGGING=all -v $PWD/alertmanager.yaml:/alertmanager.yaml cortexproject/cortex:master-da2ad99 -config.file=/alertmanager.yaml
...
Get "https://validstorageaccountname./validcontainername?restype=container": dial tcp: lookup validstorageaccountname. on 192.168.5.3:53: no such host
...

Activity

  1. alanprot commented on Jul 10, 2023

    @alanprot
    Member

    Seems related to thanos-io/thanos#6175

  2. moki1202 commented on Jul 25, 2023

    @moki1202
    Contributor

    @friedrichg @alanprot here's my approach to this, I can add a validate function in pkg/storage/bucket/azure/config.go which checks whether endpoint_suffix is empty or not, and execute the function right after parsing the command line flags. If error occurs then I can just do os.Exit(1). Is this approach correct?

  3. friedrichg commented on Jul 31, 2023

    @friedrichg
    MemberAuthor

    @moki1202 fixing in thanos should be more appropriate

  4. yeya24 commented on Sep 20, 2024

    @yeya24
    Contributor

    Do we still need a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions