Skip to content

Conversation

@loomts
Copy link

@loomts loomts commented Dec 24, 2025

Resolved #1311 , to simplify the config, I just reuse the tls config of clickhouse.
According to https://clickhouse.com/docs/operations/ssl-zookeeper, the sample use OS RootCAs, which can also be handle.

Copy link
Collaborator

@Slach Slach left a comment

Choose a reason for hiding this comment

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

please add parsing /*/client/* from /var/lib/clickhouse/preprocessed_configs/config.xml
when isSecure true instead of using clickhouse TLS connection setting

moreover, could you add zookeeper and keeper tls settings to /tests/integration/docker-compose*.yml and /tests/integration/dynamic_settings.sh

and test it via
RUN_TESTS=^TestS3$ ./test/integration/run.sh

var conn *zk.Conn
if isSecure {
log.Info().Msgf("isSecure=%v, keeperHosts=%v, caPath=%v, certPath=%v, keyPath=%v, skipVerify=%v, use TLS for keeper connection", isSecure, keeperHosts, cfg.ClickHouse.TLSCa, cfg.ClickHouse.TLSCert, cfg.ClickHouse.TLSKey, cfg.ClickHouse.SkipVerify)
tlsConfig, err := utils.NewTLSConfig(cfg.ClickHouse.TLSCa, cfg.ClickHouse.TLSCert, cfg.ClickHouse.TLSKey, cfg.ClickHouse.SkipVerify)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure that this is a good idea to use the same certificates for connecting clickHouse-backup -> clickhouse and clickhouse-backup -> keeper,

according to https://clickhouse.com/docs/operations/ssl-zookeeper

better parse /*/client/* from /var/lib/clickhouse/preprocessed_configs/config.xml
when isSecure true

Copy link
Author

Choose a reason for hiding this comment

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

got it, I will fix it soon, thank you for you guidance.

@Slach
Copy link
Collaborator

Slach commented Dec 24, 2025

thanks you for your contribution

@Slach Slach added this to the 2.6.42 milestone Dec 24, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20477145276

Details

  • 20 of 56 (35.71%) changed or added relevant lines in 5 files are covered.
  • 274 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-1.7%) to 67.02%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/backup/create.go 0 1 0.0%
pkg/clickhouse/clickhouse.go 2 3 66.67%
pkg/utils/utils.go 7 21 33.33%
pkg/keeper/keeper.go 10 30 33.33%
Files with Coverage Reduction New Missed Lines %
pkg/backup/restore.go 1 71.75%
pkg/clickhouse/clickhouse.go 1 78.38%
cmd/clickhouse-backup/main.go 2 75.21%
pkg/storage/object_disk/object_disk.go 5 66.3%
pkg/config/config.go 8 72.64%
pkg/status/status.go 9 67.43%
pkg/server/server.go 11 58.54%
pkg/storage/general.go 12 61.02%
pkg/backup/backuper.go 17 70.95%
pkg/storage/s3.go 23 47.39%
Totals Coverage Status
Change from base Build 20459974961: -1.7%
Covered Lines: 10945
Relevant Lines: 16331

💛 - Coveralls

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.

support tls for keeper and clickhouse communication

3 participants