Skip to content

Commit

Permalink
fix(client): check the initial host first
Browse files Browse the repository at this point in the history
The fix for #3707 includes extending the cluster kept in the DB with the 'host'
property, which represents the initial host used when adding a cluster to Scylla Manager. Scylla-operator passes the DNS name here,
making it immune to the ephemeral IPs in the Kubernetes environment. This commit adds the initial host as the first host to query
in order to discover node IPs.
  • Loading branch information
karol-kokoszka committed Feb 22, 2024
1 parent e46ee90 commit 5522381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/service/cluster/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (s *Service) createClient(ctx context.Context, clusterID uuid.UUID) (*scyll
config.Port = fmt.Sprint(c.Port)
}
config.AuthToken = c.AuthToken
config.Hosts = c.KnownHosts
config.Hosts = append([]string{c.Host}, c.KnownHosts...)

client, err := scyllaclient.NewClient(config, s.logger.Named("client"))
if err != nil {
Expand Down

0 comments on commit 5522381

Please sign in to comment.