Skip to content

Commit

Permalink
Correct the way how the client knobs are passed down and used
Browse files Browse the repository at this point in the history
  • Loading branch information
johscheuer committed Jul 7, 2023
1 parent 4f14519 commit 2e5847b
Show file tree
Hide file tree
Showing 5 changed files with 371 additions and 190 deletions.
1 change: 0 additions & 1 deletion controllers/backup_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ package controllers

import (
"fmt"

"github.com/FoundationDB/fdb-kubernetes-operator/pkg/fdbadminclient/mock"

"github.com/FoundationDB/fdb-kubernetes-operator/internal"
Expand Down
8 changes: 6 additions & 2 deletions fdbclient/admin_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,13 @@ func (client *cliAdminClient) getArgsAndTimeout(command cliCommand) ([]string, t
args = append(args, "--exec", command.command)
}

args = append(args, command.getClusterFileFlag(), client.clusterFilePath, "--log")
// If we want to print out the version we don't have to pass the cluster file path
if len(args) == 0 || args[0] != "--version" {
args = append(args, command.getClusterFileFlag(), client.clusterFilePath)
}

// We only want to pass the knobs to fdbbackup and fdbrestore
if command.isFdbCli() {
if !command.isFdbCli() {
args = append(args, client.knobs...)
}

Expand Down
Loading

0 comments on commit 2e5847b

Please sign in to comment.