Skip to content

Ca cert for snapshots - #6010

Merged
generall merged 4 commits into
devfrom
ca-cert-for-snapshots
Feb 18, 2025
Merged

generall merged 4 commits into
devfrom
ca-cert-for-snapshots

Conversation

@generall

Copy link
Copy Markdown
Member

I have a single node hybrid cloud cluster. I configured TLS directly in the DB (no P2P TLS) which sets this:

service:
  # Enable HTTPS for the REST and gRPC API
  enable_tls: true

# TLS configuration.
# Required if either service.enable_tls or cluster.p2p.enable_tls is true.
tls:
  # Server certificate chain file
  cert: ./tls/cert.pem

  # Server private key file
  key: ./tls/key.pem

This works correctly when connecting to Qdrant.
But when I try to load a snapshots from a remote HTTP location:

PUT /collections/midjourney/snapshots/recover
{
  "location": "http://snapshots.qdrant.io/midlib.snapshot"
}

I get the following error returned from Qdrant

{
  "error": "Service internal error: failed to initialize HTTP(S) client: failed to read HTTPS client CA certificate file ./tls/cacert.pem: No such file or directory (os error 2)"
}

Why is a ./tls/cacert.pem mandatory for this operation?


Resolution:

Indeed, ./tls/cacert.pem is not required. Not our config file can accept null as ca_cert.
To covert for the case where default configuration is used, the download will no longer error out if certificate is not found.

@generall
generall requested a review from timvisee February 17, 2025 23:20

@timvisee timvisee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A question about error handling before we merge:

Comment thread config/development.yaml Resolved
Comment thread src/common/http_client.rs Resolved
@generall
generall merged commit fceacef into dev Feb 18, 2025
@generall
generall deleted the ca-cert-for-snapshots branch February 18, 2025 15:08
timvisee added a commit that referenced this pull request Mar 21, 2025
* make cacert optional

* ignore missing cacertificate on creating https client

* Some tweaks

* Update development.yaml

---------

Co-authored-by: timvisee <[email protected]>
@timvisee timvisee mentioned this pull request Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants