Skip to content

Commit

Permalink
Fixed issue with initializing cluster versions before 7.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
brett19 committed Dec 1, 2023
1 parent e2f42ed commit 1c71338
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions utils/clustercontrol/nodemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,20 @@ type SetupOneNodeClusterOptions struct {
func (m *NodeManager) SetupOneNodeCluster(ctx context.Context, opts *SetupOneNodeClusterOptions) error {
c := m.Controller()

err := c.NodeInit(ctx, &NodeInitOptions{
Hostname: "127.0.0.1",
Afamily: "ipv4",
})
if err != nil {
return errors.Wrap(err, "failed to setup services")
}
// While Couchbase Server 7.0+ seems to invoke this as part of cluster initialization
// it does not appear to be neccessary for a properly functioning cluster, and it is
// not supported on 6.6 and before, so it's just disabled here.
/*
err := c.NodeInit(ctx, &NodeInitOptions{
Hostname: "127.0.0.1",
Afamily: "ipv4",
})
if err != nil {
return errors.Wrap(err, "failed to perform nodeInit")
}
*/

err = c.UpdateDefaultPool(ctx, &UpdateDefaultPoolOptions{
err := c.UpdateDefaultPool(ctx, &UpdateDefaultPoolOptions{
ClusterName: "test-cluster",
KvMemoryQuotaMB: opts.KvMemoryQuotaMB,
IndexMemoryQuotaMB: opts.IndexMemoryQuotaMB,
Expand Down

0 comments on commit 1c71338

Please sign in to comment.