Skip to content

Commit c747961

Browse files
committed
Update unexpected cluster state error messages
1 parent 7a80e77 commit c747961

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cli/cmd/cluster.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ var _upCmd = &cobra.Command{
127127
clusterState, err := clusterstate.GetClusterState(awsClient, &accessConfig)
128128
if err != nil {
129129
if errors.GetKind(err) == clusterstate.ErrUnexpectedCloudFormationStatus {
130-
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state, please run `cortex cluster down` to delete the cluster or delete the cloudformation stacks manually in your AWS console %s", clusterConfig.ClusterName, *clusterConfig.Region, getCloudFormationURL(*clusterConfig.Region, clusterConfig.ClusterName)))
130+
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state; please run `cortex cluster down` to delete the cluster, or delete the cloudformation stacks manually in your AWS console (%s)", clusterConfig.ClusterName, *clusterConfig.Region, getCloudFormationURL(*clusterConfig.Region, clusterConfig.ClusterName)))
131131
}
132132
exit.Error(err)
133133
}
@@ -204,7 +204,7 @@ var _configureCmd = &cobra.Command{
204204
clusterState, err := clusterstate.GetClusterState(awsClient, accessConfig)
205205
if err != nil {
206206
if errors.GetKind(err) == clusterstate.ErrUnexpectedCloudFormationStatus {
207-
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state, please run `cortex cluster down` to delete the cluster or delete the cloudformation stacks manually in your AWS console %s", *accessConfig.ClusterName, *accessConfig.Region, getCloudFormationURLWithAccessConfig(accessConfig)))
207+
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state; please run `cortex cluster down` to delete the cluster, or delete the cloudformation stacks manually in your AWS console (%s)", *accessConfig.ClusterName, *accessConfig.Region, getCloudFormationURLWithAccessConfig(accessConfig)))
208208
}
209209
exit.Error(err)
210210
}
@@ -297,7 +297,7 @@ var _downCmd = &cobra.Command{
297297
clusterState, err := clusterstate.GetClusterState(awsClient, accessConfig)
298298
if err != nil {
299299
if errors.GetKind(err) == clusterstate.ErrUnexpectedCloudFormationStatus {
300-
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state, please delete the cloudformation stacks manually in your AWS console %s", *accessConfig.ClusterName, *accessConfig.Region, getCloudFormationURLWithAccessConfig(accessConfig)))
300+
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state; please delete the cloudformation stacks manually in your AWS console (%s)", *accessConfig.ClusterName, *accessConfig.Region, getCloudFormationURLWithAccessConfig(accessConfig)))
301301
}
302302
exit.Error(err)
303303
}
@@ -415,7 +415,7 @@ func printInfoClusterState(awsClient *aws.Client, accessConfig *clusterconfig.Ac
415415
clusterState, err := clusterstate.GetClusterState(awsClient, accessConfig)
416416
if err != nil {
417417
if errors.GetKind(err) == clusterstate.ErrUnexpectedCloudFormationStatus {
418-
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state, please run `cortex cluster down` to delete the cluster or delete the cloudformation stacks manually in your AWS console %s", *accessConfig.ClusterName, *accessConfig.Region, getCloudFormationURLWithAccessConfig(accessConfig)))
418+
fmt.Println(fmt.Sprintf("cluster named \"%s\" in %s is in an unexpected state; please run `cortex cluster down` to delete the cluster, or delete the cloudformation stacks manually in your AWS console (%s)", *accessConfig.ClusterName, *accessConfig.Region, getCloudFormationURLWithAccessConfig(accessConfig)))
419419
}
420420
return err
421421
}

cli/cmd/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func ErrorClusterAlreadyDeleted(clusterName string, region string) error {
289289
func ErrorFailedClusterStatus(status clusterstate.Status, clusterName string, region string) error {
290290
return errors.WithStack(&errors.Error{
291291
Kind: ErrFailedClusterStatus,
292-
Message: fmt.Sprintf("cluster \"%s\" in %s encountered an unexpected status %s, please try to delete the cluster with `cortex cluster down` or delete the cloudformation stacks manually in your AWS console %s", clusterName, region, string(status), getCloudFormationURL(clusterName, region)),
292+
Message: fmt.Sprintf("cluster \"%s\" in %s encountered an unexpected status %s; please try to delete the cluster with `cortex cluster down`, or delete the cloudformation stacks manually in your AWS console (%s)", clusterName, region, string(status), getCloudFormationURL(clusterName, region)),
293293
})
294294
}
295295

0 commit comments

Comments
 (0)