civo / cli-rubygem

Command line interface for interacting with Civo's cloud API
https://www.civo.com
MIT License
15 stars 4 forks source link

Unhandled exception in "civo k8s create" #36

Closed alexellis closed 5 years ago

alexellis commented 5 years ago

After updating today:

sudo gem install civo civo_cli

I got this error:

civo k8s create --nodes=3
Traceback (most recent call last):
    12: from /usr/local/bin/civo:23:in `<main>'
    11: from /usr/local/bin/civo:23:in `load'
    10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
     9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
     8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
     4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
     3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)

civo k8s create --nodes 3
Traceback (most recent call last):
    12: from /usr/local/bin/civo:23:in `<main>'
    11: from /usr/local/bin/civo:23:in `load'
    10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
     9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
     8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
     4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
     3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)

I even get it with no arguments:

 civo k8s create
Traceback (most recent call last):
    12: from /usr/local/bin/civo:23:in `<main>'
    11: from /usr/local/bin/civo:23:in `load'
    10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
     9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
     8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
     4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
     3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)

Or when giving a name:

civo k8s create market
Traceback (most recent call last):
    12: from /usr/local/bin/civo:23:in `<main>'
    11: from /usr/local/bin/civo:23:in `load'
    10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
     9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
     8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
     4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
     3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)

Not sure what is causing this, but it looks like valid usage?

civo k8s 
Commands:
  civo kubernetes config ID/NAME [--save]  # get or save the ~/.kube/config for a Kubernetes cluster by ID or name
  civo kubernetes create [NAME] [...]      # create a new kubernetes cluster with the specified name and provided options
  civo kubernetes help [COMMAND]           # Describe subcommands or one specific subcommand
  civo kubernetes list                     # list all kubernetes clusters
  civo kubernetes remove ID/NAME           # removes an entire Kubernetes cluster with ID/name entered (use with caution!)
  civo kubernetes rename ID/NAME [--name]  # rename Kubernetes cluster
  civo kubernetes scale ID/NAME [--nodes]  # rescale the Kubernetes cluster to a new node count
  civo kubernetes show ID/NAME             # show a Kubernetes cluster by ID or name