Skip to content

Commit 45f9e9d

Browse files
authored
Add clusterName as debug info for troubleshooting (#2696)
* Add clusterName as debug info for troubleshooting * Bump eksctl to v0.100.0 for fixing apiVersion changes eksctl version before v0.100.0 generated kubeconfig with apiVersion "v1alpha1", needed to upgrade it to 0.100.0 or later to have "v1beta1" generated. for more info, please check for the links below: - https://github.com/weaveworks/eksctl/releases - https://github.com/weaveworks/eksctl/releases/tag/v0.100.0 - eksctl-io/eksctl#5288 - eksctl-io/eksctl#5287
1 parent 9c79e45 commit 45f9e9d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

pkg/targetgroupbinding/networking_manager.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,10 @@ func (m *defaultNetworkingManager) resolveEndpointSGForENI(ctx context.Context,
525525
}
526526
}
527527
if len(sgIDsWithClusterTag) != 1 {
528-
return "", errors.Errorf("expect exactly one securityGroup tagged with %v for eni %v, got: %v",
529-
clusterResourceTagKey, eniInfo.NetworkInterfaceID, sgIDsWithClusterTag.List())
528+
// user may provide incorrect `--cluster-name` at bootstrap or modify the tag key unexpectedly, it is hard to find out if no clusterName included in error message.
529+
// having `clusterName` included in error message might be helpful for shorten the troubleshooting time spent.
530+
return "", errors.Errorf("expect exactly one securityGroup tagged with %v for eni %v, got: %v (clusterName: %v)",
531+
clusterResourceTagKey, eniInfo.NetworkInterfaceID, sgIDsWithClusterTag.List(), m.clusterName)
530532
}
531533
sgID, _ := sgIDsWithClusterTag.PopAny()
532534
return sgID, nil

scripts/ci_e2e_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CONTROLLER_IAM_POLICY_NAME="lb-controller-e2e-${PULL_NUMBER}-$BUILD_ID"
2929
CONTROLLER_IAM_POLICY_ARN="" # will be fulfilled during setup_controller_iam_sa
3030

3131
# Cluster settings
32-
EKSCTL_VERSION="v0.77.0"
32+
EKSCTL_VERSION="v0.100.0"
3333
CLUSTER_NAME="lb-controller-e2e-${PULL_NUMBER}-$BUILD_ID"
3434
CLUSTER_VERSION=${CLUSTER_VERSION:-"1.19"}
3535
CLUSTER_INSTANCE_TYPE="m5.xlarge"

scripts/lib/eksctl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ EKSCTL_TEMPLATE_IAM_SA="$(dirname "${BASH_SOURCE[0]}")/eksctl_tmpl_iam_sa.yaml"
1616
# Arguments:
1717
# version the version of eksctl
1818
#
19-
# sample: eksctl::init 0.34.0
19+
# sample: eksctl::init 0.100.0
2020
#######################################
2121
eksctl::init() {
2222
declare -r version="$1"
@@ -76,7 +76,7 @@ eksctl::init() {
7676
# node_count EKS cluster's node count
7777
# cluster_kubeconfig filename of cluster's kubeconfig
7878
#
79-
# sample: eksctl::create_cluster awesome-cluster us-west-2 1.18 m5.xlarge 4 awesome-cluster.kubeconfig
79+
# sample: eksctl::create_cluster awesome-cluster us-west-2 1.19 m5.xlarge 4 awesome-cluster.kubeconfig
8080
#######################################
8181
eksctl::create_cluster() {
8282
declare -r cluster_name="$1" region="$2" k8s_version="$3" instance_type="$4" node_count="$5" cluster_kubeconfig="$6"

0 commit comments

Comments
 (0)