kontena / pharos-cluster

Pharos - The Kubernetes Distribution
https://k8spharos.dev/
Apache License 2.0
311 stars 43 forks source link

ConfigureClient NoMethodError when performing a worker host reset #1463

Closed kke closed 5 years ago

kke commented 5 years ago
$ pharos reset -a 10.77.2.103
...
==> Do you really want to reset the host 10.77.2.103 (data may be lost)? yes
...
==> Gather host facts @ 10.77.2.103
...
==> Configure kube client @
ERROR: NoMethodError : undefined method `transport' for nil:NilClass

    [] Unretriable exception, reraising
    [] Error: undefined method `transport' for nil:NilClass
    []     /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/pharos-cluster-2.4.3/lib/pharos/phase.rb:58:in `transport'
    []     /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/pharos-cluster-2.4.3/lib/pharos/phases/configure_client.rb:24:in `kubeconfig'
kke commented 5 years ago

The ClusterManager#apply_reset_hosts gets a list of filtered hosts, of which none is a master. It needs to get a full config + filtered config.