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

Provide relevant error message when unsupported auth strategy and network plugins are used in cluster.yml file #52

Closed
soumyalj opened this issue Nov 27, 2017 · 1 comment
Assignees
Labels

Comments

@soumyalj
Copy link

  1. Create a cluster with one master [controlplane, etcd] node and the other worker node using cluster.yml file. Use the command ./rke_darwin-amd64 cluster up --cluster-file cluster.yml
    Cluster.yml file example:
auth:
  strategy: x200
network:
  plugin: abcd
hosts:
  - advertised_hostname: server1
    ip: 1.1.1.1
    user: ubuntu
    role: [controlplane, etcd]
    docker_socket: /var/run/docker.sock
    advertise_address: 10.1.1.1
  - advertised_hostname: server2
    ip: 2.2.2.2
    user: ubuntu
    role: [worker]
    advertise_address: 10.2.2.2

services:
  etcd:
    image: quay.io/coreos/etcd:latest
  kube-api:
    image: quay.io/coreos/hyperkube:v1.7.5_coreos.0
    service_cluster_ip_range: 10.233.0.0/18
    extra_args:
      v: 4
  kube-controller:
    image: quay.io/coreos/hyperkube:v1.7.5_coreos.0
    cluster_cidr: 10.233.64.0/18
    service_cluster_ip_range: 10.233.0.0/18
  scheduler:
    image: quay.io/coreos/hyperkube:v1.7.5_coreos.0
  kubelet:
    image: quay.io/coreos/hyperkube:v1.7.5_coreos.0
    cluster_domain: cluster.local
    cluster_dns_server: 10.233.0.3
    infra_container_image: gcr.io/google_containers/pause-amd64:3.0
  kubeproxy:
    image: quay.io/coreos/hyperkube:v1.7.5_coreos.0

Cluster creation fails but does not provide any indication that the fields are unsupported/invalid.
It fails with the below error:

soumyas-MBP:rke soumya$ ./rke_darwin-amd64 cluster up --cluster-file clusterdigworking.yml
INFO[0000] Building Kubernetes cluster                  
INFO[0000] [ssh] Checking private key                   
INFO[0000] [ssh] Start tunnel for host [rketest1] 
INFO[0000] [ssh] Start tunnel for host [rketest1] 
INFO[0000] [ssh] Start tunnel for host [rketes2]  
INFO[0000] [state] Found local kube config file, trying to get state from cluster 
INFO[0000] [state] Fetching cluster state from Kubernetes 
INFO[0030] Timed out waiting for kubernetes cluster to get state 
INFO[0030] [etcd] Building up Etcd Plane..              
INFO[0031] [etcd] Successfully pulled etcd image on host [rketest1] 
INFO[0031] [etcd] Successfully started etcd container on host [rketest1] 
INFO[0031] [etcd] Successfully started Etcd Plane..     
INFO[0031] [controlplane] Building up Controller Plane.. 
INFO[0033] [controlplane] Successfully pulled kube-api image on host [rketest1] 
INFO[0033] [controlplane] Successfully started kube-api container on host [rketest1] 
INFO[0034] [controlplane] Successfully pulled kube-controller image on host [rketest1] 
INFO[0034] [controlplane] Successfully started kube-controller container on host [soumyarketest1] 
INFO[0034] [controlplane] Successfully pulled scheduler image on host [rketest1] 
INFO[0035] [controlplane] Successfully started scheduler container on host [rketest1] 
INFO[0035] [controlplane] Successfully started Controller Plane.. 
INFO[0035] [worker] Building up Worker Plane..          
INFO[0035] [worker] Successfully pulled kubelet image on host [rketest1] 
INFO[0035] [worker] Successfully started kubelet container on host [rketest1] 
INFO[0036] [worker] Successfully pulled kube-proxy image on host [rketest1] 
INFO[0036] [worker] Successfully started kube-proxy container on host [rketest1] 
INFO[0038] [worker] Successfully pulled nginx-proxy image on host [rketes2] 
INFO[0038] [worker] Successfully started nginx-proxy container on host [rketes2] 
INFO[0038] [worker] Successfully pulled kubelet image on host [rketes2] 
INFO[0039] [worker] Successfully started kubelet container on host [rketes2] 
INFO[0039] [worker] Successfully pulled kube-proxy image on host [rketes2] 
INFO[0040] [worker] Successfully started kube-proxy container on host [rketes2] 
INFO[0040] [worker] Successfully started Worker Plane.. 
INFO[0040] [reconcile] Reconciling cluster state        
INFO[0040] [reconcile] This is newly generated cluster  
INFO[0040] [certificates] Save kubernetes certificates as secrets 
INFO[0040] [certificates] Successfuly saved certificates as kubernetes secret [k8s-certs] 
INFO[0040] [state] Saving cluster state to Kubernetes   
FATA[0070] [state] Failed to save configuration state: [state] Timeout waiting for kubernetes to be ready 

Relevant error messages must be provided to help the user fix the issue.

@soumyalj
Copy link
Author

Tested with rke version v0.0.6-dev. Relevant error messages are provided when unsupported strategy and plugins are used:

soumyas-MBP:rke soumya$ ./rke_darwin-amd64 up --config clusterdigworking.yml
INFO[0000] Building Kubernetes cluster                  
FATA[0000] Failed to validate cluster: Authentication strategy [x200] is not supported 

soumyas-MBP:rke soumya$ ./rke_darwin-amd64 up --config clusterdigworking.yml
INFO[0000] Building Kubernetes cluster                  
FATA[0000] Failed to validate cluster: Network plugin [abcd] is not supported 

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

No branches or pull requests

3 participants