Skip to content

[qdrant] backup: datafile backup fails with TLS-enabled clusters (HTTP/0.9 error) #2574

@nayutah

Description

@nayutah

Summary

The qdrant datafile backup actionset (qdrant-snapshot-br) hardcodes endpoint=http://... when connecting to the qdrant API to take collection snapshots. When TLS is enabled on the cluster (tls: true), qdrant only accepts HTTPS connections, causing the backup to fail with curl: (1) Received HTTP/0.9 when not allowed.

Trigger Path

  1. Create a qdrant cluster with tls: true and issuer.name: KubeBlocks
  2. Trigger a datafile backup via Backup resource
  3. Backup job fails immediately

Root Cause

addons/qdrant/actionset (deployed as ActionSet qdrant-snapshot-br) contains:

endpoint=http://${DP_DB_HOST}:6333

This is hardcoded HTTP. When TLS is enabled, qdrant rejects plain HTTP connections — curl receives an unexpected response (HTTP/0.9) from the TLS handshake.

Fix

The backup script needs to detect TLS and switch to HTTPS:

# Detect TLS: check if the TLS cert mount path has files
if [ -f "${TLS_MOUNT_PATH:-/qdrant/tls}/tls.crt" ]; then
  endpoint=https://${DP_DB_HOST}:6333
  CURL_TLS="-k"  # or --cacert ${TLS_MOUNT_PATH}/ca.crt
else
  endpoint=http://${DP_DB_HOST}:6333
  CURL_TLS=""
fi

Or alternatively, inject TLS_ENABLED / TLS_MOUNT_PATH env vars into the backup action via the backup policy env section.

Workaround

Disable TLS on the cluster before taking backups, or use the qdrant cluster without TLS enabled.

Impact

All datafile backups (including scheduled backups via BackupSchedule) fail when TLS is enabled on the qdrant cluster.

Test Environment

  • KubeBlocks v1.0 API
  • qdrant 1.17.1, cluster topology, 3 replicas, TLS enabled (issuer: KubeBlocks)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions