From f7132771588e7bddbb3c04f628f750a328985da7 Mon Sep 17 00:00:00 2001 From: vishal Date: Mon, 25 Nov 2019 19:34:12 -0500 Subject: [PATCH 1/3] Update cluster.go --- cli/cmd/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go index f1891d2009..8da4f9f058 100644 --- a/cli/cmd/cluster.go +++ b/cli/cmd/cluster.go @@ -267,7 +267,7 @@ func refreshCachedClusterConfig(awsCreds *AWSCredentials) *clusterconfig.Cluster } if userClusterConfig.Region == nil { - errors.Exit(fmt.Sprintf("unable to find %s; please configure \"%s\" to the s3 region of an existing cortex cluster or create a cortex cluster with `cortex cluster up`", clusterconfig.RegionKey, clusterconfig.RegionKey)) + errors.Exit(fmt.Sprintf("unable to find an existing cortex cluster; please configure \"%s\" to the s3 region of an existing cortex cluster or create a cortex cluster with `cortex cluster up`", clusterconfig.RegionKey, clusterconfig.RegionKey)) } out, err := runRefreshClusterConfig(userClusterConfig, awsCreds) From 431ad47c5bedf8e754aa9e3e41e7922383242b0f Mon Sep 17 00:00:00 2001 From: vishal Date: Mon, 25 Nov 2019 19:35:05 -0500 Subject: [PATCH 2/3] Remove redundant string interpolation variable --- cli/cmd/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go index 8da4f9f058..4bf068accf 100644 --- a/cli/cmd/cluster.go +++ b/cli/cmd/cluster.go @@ -267,7 +267,7 @@ func refreshCachedClusterConfig(awsCreds *AWSCredentials) *clusterconfig.Cluster } if userClusterConfig.Region == nil { - errors.Exit(fmt.Sprintf("unable to find an existing cortex cluster; please configure \"%s\" to the s3 region of an existing cortex cluster or create a cortex cluster with `cortex cluster up`", clusterconfig.RegionKey, clusterconfig.RegionKey)) + errors.Exit(fmt.Sprintf("unable to find an existing cortex cluster; please configure \"%s\" to the s3 region of an existing cortex cluster or create a cortex cluster with `cortex cluster up`", clusterconfig.RegionKey)) } out, err := runRefreshClusterConfig(userClusterConfig, awsCreds) From f7981dd49f172e66477361042d69b0924bbcdf69 Mon Sep 17 00:00:00 2001 From: vishal Date: Mon, 25 Nov 2019 19:45:08 -0500 Subject: [PATCH 3/3] Reorder and add units to instance volume size --- pkg/lib/clusterconfig/clusterconfig.go | 3 ++- pkg/lib/clusterconfig/config_key.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/lib/clusterconfig/clusterconfig.go b/pkg/lib/clusterconfig/clusterconfig.go index ca1ad4099c..1e1f66441a 100644 --- a/pkg/lib/clusterconfig/clusterconfig.go +++ b/pkg/lib/clusterconfig/clusterconfig.go @@ -719,9 +719,10 @@ func (cc *ClusterConfig) UserFacingTable() []table.KV { items = append(items, table.KV{K: BucketUserFacingKey, V: *cc.Bucket}) items = append(items, table.KV{K: SpotUserFacingKey, V: s.YesNo(*cc.Spot)}) items = append(items, table.KV{K: InstanceTypeUserFacingKey, V: *cc.InstanceType}) - items = append(items, table.KV{K: InstanceVolumeSizeUserFacingKey, V: cc.InstanceVolumeSize}) items = append(items, table.KV{K: MinInstancesUserFacingKey, V: *cc.MinInstances}) items = append(items, table.KV{K: MaxInstancesUserFacingKey, V: *cc.MaxInstances}) + items = append(items, table.KV{K: InstanceVolumeSizeUserFacingKey, V: cc.InstanceVolumeSize}) + if cc.Spot != nil { items = append(items, table.KV{K: InstanceDistributionUserFacingKey, V: cc.SpotConfig.InstanceDistribution}) items = append(items, table.KV{K: OnDemandBaseCapacityUserFacingKey, V: *cc.SpotConfig.OnDemandBaseCapacity}) diff --git a/pkg/lib/clusterconfig/config_key.go b/pkg/lib/clusterconfig/config_key.go index 41fe748836..620d6246da 100644 --- a/pkg/lib/clusterconfig/config_key.go +++ b/pkg/lib/clusterconfig/config_key.go @@ -62,7 +62,7 @@ const ( InstanceTypeUserFacingKey = "instance type" MinInstancesUserFacingKey = "min instances" MaxInstancesUserFacingKey = "max instances" - InstanceVolumeSizeUserFacingKey = "instance volume size" + InstanceVolumeSizeUserFacingKey = "instance volume size (Gi)" InstanceDistributionUserFacingKey = "spot instance distribution" OnDemandBaseCapacityUserFacingKey = "spot on demand base capacity" OnDemandPercentageAboveBaseCapacityUserFacingKey = "spot on demand percentage above base capacity"