Skip to content

Commit

Permalink
Stop the bundle generation with pf9ctl (#379)
Browse files Browse the repository at this point in the history
* Stop the bundle generation with pf9ctl

* Remove the support bundle command

* Remove the support bundle command and tests
  • Loading branch information
vedantjoshi84 authored Aug 5, 2024
1 parent 30e0164 commit 2c27746
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 568 deletions.
20 changes: 0 additions & 20 deletions cmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/platform9/pf9ctl/pkg/objects"
"github.com/platform9/pf9ctl/pkg/pmk"
"github.com/platform9/pf9ctl/pkg/qbert"
"github.com/platform9/pf9ctl/pkg/supportBundle"
"github.com/platform9/pf9ctl/pkg/util"
"github.com/spf13/cobra"
"go.uber.org/zap"
Expand Down Expand Up @@ -328,11 +327,6 @@ func bootstrapCmdRun(cmd *cobra.Command, args []string) {

result, err := pmk.CheckNode(*cfg, c, auth, bootConfig)
if err != nil {
// Uploads pf9cli log bundle if checknode fails
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
if errbundle != nil {
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
}
zap.S().Fatalf("Unable to perform pre-requisite checks on this node: %s", err.Error())
}

Expand Down Expand Up @@ -360,13 +354,6 @@ func bootstrapCmdRun(cmd *cobra.Command, args []string) {

zap.S().Debug("========== Running prep-node as a part of bootstrap ==========")
if err := pmk.PrepNode(*cfg, c, auth); err != nil {

// Uploads pf9cli log bundle if prepnode failed to get prepared
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
if errbundle != nil {
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
}

zap.S().Debugf("Unable to prep node: %s\n", err.Error())
zap.S().Fatalf("\nFailed to prepare node. %s. See %s or use --verbose for logs\n", err.Error(), log.GetLogLocation(util.Pf9Log))
}
Expand Down Expand Up @@ -436,13 +423,6 @@ func bootstrapCmdRun(cmd *cobra.Command, args []string) {
}

if err := pmk.Bootstrap(*cfg, c, payload, auth, bootConfig); err != nil {

// Uploads pf9cli log bundle if bootstrap command fails
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
if errbundle != nil {
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
}

zap.S().Debugf("Unable to bootstrap node: %s\n", err.Error())
zap.S().Fatalf("Failed to bootstrap node. %s. See %s or use --verbose for logs\n", err.Error(), log.GetLogLocation(util.Pf9Log))
}
Expand Down
6 changes: 0 additions & 6 deletions cmd/checkNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/platform9/pf9ctl/pkg/log"
"github.com/platform9/pf9ctl/pkg/objects"
"github.com/platform9/pf9ctl/pkg/pmk"
"github.com/platform9/pf9ctl/pkg/supportBundle"
"github.com/platform9/pf9ctl/pkg/util"
"github.com/spf13/cobra"
"go.uber.org/zap"
Expand Down Expand Up @@ -113,11 +112,6 @@ func checkNodeRun(cmd *cobra.Command, args []string) {

result, err := pmk.CheckNode(*cfg, c, auth, nc)
if err != nil {
// Uploads pf9cli log bundle if checknode fails
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
if errbundle != nil {
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
}
zap.S().Fatalf("Unable to perform pre-requisite checks on this node: %s", err.Error())
}

Expand Down
13 changes: 0 additions & 13 deletions cmd/prepNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/platform9/pf9ctl/pkg/platform"
"github.com/platform9/pf9ctl/pkg/pmk"
"github.com/platform9/pf9ctl/pkg/ssh"
"github.com/platform9/pf9ctl/pkg/supportBundle"
"github.com/platform9/pf9ctl/pkg/util"
"github.com/spf13/cobra"
"go.uber.org/zap"
Expand Down Expand Up @@ -147,11 +146,6 @@ func prepNodeRun(cmd *cobra.Command, args []string) {
// If all pre-requisite checks passed in Check-Node then prep-node
result, err := pmk.CheckNode(*cfg, c, auth, nodeConfig)
if err != nil {
// Uploads pf9cli log bundle if pre-requisite checks fails
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
if errbundle != nil {
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
}
zap.S().Fatalf("\nPre-requisite check(s) failed %s\n", err.Error())
}

Expand Down Expand Up @@ -180,13 +174,6 @@ func prepNodeRun(cmd *cobra.Command, args []string) {
}

if err := pmk.PrepNode(*cfg, c, auth); err != nil {

// Uploads pf9cli log bundle if prepnode failed to get prepared
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
if errbundle != nil {
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
}

zap.S().Debugf("Unable to prep node: %s\n", err.Error())
zap.S().Fatalf("\nFailed to prepare node. %s. See %s or use --verbose for logs\n", err.Error(), log.GetLogLocation(util.Pf9Log))
}
Expand Down
97 changes: 0 additions & 97 deletions cmd/supportBundle.go

This file was deleted.

Loading

0 comments on commit 2c27746

Please sign in to comment.