Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying unsupported config when isManagedServicesOn #7650

Merged
merged 5 commits into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion components/automate-cli/cmd/chef-automate/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var allPassedFlags string = ""
const (
AUTOMATE_CMD_STOP = "sudo chef-automate stop"
AUTOMATE_CMD_START = "sudo chef-automate start"
BACKUP_CONFIG = "file_system"
)

type BackupFromBashtion interface {
Expand Down Expand Up @@ -797,7 +798,7 @@ func runDeleteBackupCmd(cmd *cobra.Command, args []string) error {
start := 0
var validIds []string
var backup []*api.BackupTask

if strings.Contains(args[0], "/") || strings.Contains(args[0], "\\") {
location = args[0]
start = 1
Expand Down Expand Up @@ -1225,6 +1226,18 @@ func (ins *BackupFromBashtionImp) executeOnRemoteAndPoolStatus(commandString str
}()
}
sshUtil.getSSHConfig().hostIP = automateIps[0]

// If managed service and filesystem backup, info: "we don't have support for this configurations"
config, err := getExistingHAConfig()
if err != nil {
return status.Wrap(err, status.ConfigError, "unable to fetch HA config")
}

if config.Architecture.ConfigInitials.BackupConfig == BACKUP_CONFIG && isManagedServicesOn() {
writer.Printf("As of now, we do not support file_system backup with AWS managed DB.\n")
return nil
}

if pooling {
cmdRes, err := sshUtil.connectAndExecuteCommandOnRemote(commandString, true)
if err != nil {
Expand Down