Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more error messages during initialization #174

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

liwenwu-amazon
Copy link
Contributor

Issue #122 , if available:

Description of changes:
One of the common scenario that CNI ipamD fails to start is that it can not communicate with K8S master. Here are 2 possible root causes:

  • security groups are not configured correctly on the across-account ENI attached to the master.
  • or worker node HTTP proxy setting prevent ipamD communicate with master

This PR adds more error msgs when this happens.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@nckturner nckturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one suggestion.

@@ -88,6 +88,8 @@ func CreateKubeClient(apiserver string, kubeconfig string) (clientset.Interface,
log.Infof("Testing communication with server")
v, err := kubeClient.Discovery().ServerVersion()
if err != nil {
log.Infof("Failed to communicate with K8S Server. Please check instance security groups or http proxy setting")
fmt.Printf("Failed to communicate with K8S Server. Please check instance security groups or http proxy setting")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use fmt.Sprintf() to create the string and pass it to both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants