Skip to content

Commit 2c27746

Browse files
Stop the bundle generation with pf9ctl (#379)
* Stop the bundle generation with pf9ctl * Remove the support bundle command * Remove the support bundle command and tests
1 parent 30e0164 commit 2c27746

File tree

6 files changed

+0
-568
lines changed

6 files changed

+0
-568
lines changed

cmd/bootstrap.go

-20
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/platform9/pf9ctl/pkg/objects"
1818
"github.com/platform9/pf9ctl/pkg/pmk"
1919
"github.com/platform9/pf9ctl/pkg/qbert"
20-
"github.com/platform9/pf9ctl/pkg/supportBundle"
2120
"github.com/platform9/pf9ctl/pkg/util"
2221
"github.com/spf13/cobra"
2322
"go.uber.org/zap"
@@ -328,11 +327,6 @@ func bootstrapCmdRun(cmd *cobra.Command, args []string) {
328327

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

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

361355
zap.S().Debug("========== Running prep-node as a part of bootstrap ==========")
362356
if err := pmk.PrepNode(*cfg, c, auth); err != nil {
363-
364-
// Uploads pf9cli log bundle if prepnode failed to get prepared
365-
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
366-
if errbundle != nil {
367-
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
368-
}
369-
370357
zap.S().Debugf("Unable to prep node: %s\n", err.Error())
371358
zap.S().Fatalf("\nFailed to prepare node. %s. See %s or use --verbose for logs\n", err.Error(), log.GetLogLocation(util.Pf9Log))
372359
}
@@ -436,13 +423,6 @@ func bootstrapCmdRun(cmd *cobra.Command, args []string) {
436423
}
437424

438425
if err := pmk.Bootstrap(*cfg, c, payload, auth, bootConfig); err != nil {
439-
440-
// Uploads pf9cli log bundle if bootstrap command fails
441-
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
442-
if errbundle != nil {
443-
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
444-
}
445-
446426
zap.S().Debugf("Unable to bootstrap node: %s\n", err.Error())
447427
zap.S().Fatalf("Failed to bootstrap node. %s. See %s or use --verbose for logs\n", err.Error(), log.GetLogLocation(util.Pf9Log))
448428
}

cmd/checkNode.go

-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/platform9/pf9ctl/pkg/log"
1515
"github.com/platform9/pf9ctl/pkg/objects"
1616
"github.com/platform9/pf9ctl/pkg/pmk"
17-
"github.com/platform9/pf9ctl/pkg/supportBundle"
1817
"github.com/platform9/pf9ctl/pkg/util"
1918
"github.com/spf13/cobra"
2019
"go.uber.org/zap"
@@ -113,11 +112,6 @@ func checkNodeRun(cmd *cobra.Command, args []string) {
113112

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

cmd/prepNode.go

-13
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"github.com/platform9/pf9ctl/pkg/platform"
2020
"github.com/platform9/pf9ctl/pkg/pmk"
2121
"github.com/platform9/pf9ctl/pkg/ssh"
22-
"github.com/platform9/pf9ctl/pkg/supportBundle"
2322
"github.com/platform9/pf9ctl/pkg/util"
2423
"github.com/spf13/cobra"
2524
"go.uber.org/zap"
@@ -147,11 +146,6 @@ func prepNodeRun(cmd *cobra.Command, args []string) {
147146
// If all pre-requisite checks passed in Check-Node then prep-node
148147
result, err := pmk.CheckNode(*cfg, c, auth, nodeConfig)
149148
if err != nil {
150-
// Uploads pf9cli log bundle if pre-requisite checks fails
151-
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
152-
if errbundle != nil {
153-
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
154-
}
155149
zap.S().Fatalf("\nPre-requisite check(s) failed %s\n", err.Error())
156150
}
157151

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

182176
if err := pmk.PrepNode(*cfg, c, auth); err != nil {
183-
184-
// Uploads pf9cli log bundle if prepnode failed to get prepared
185-
errbundle := supportBundle.SupportBundleUpload(*cfg, c, isRemote)
186-
if errbundle != nil {
187-
zap.S().Debugf("Unable to upload supportbundle to s3 bucket %s", errbundle.Error())
188-
}
189-
190177
zap.S().Debugf("Unable to prep node: %s\n", err.Error())
191178
zap.S().Fatalf("\nFailed to prepare node. %s. See %s or use --verbose for logs\n", err.Error(), log.GetLogLocation(util.Pf9Log))
192179
}

cmd/supportBundle.go

-97
This file was deleted.

0 commit comments

Comments
 (0)