civo/kube100

Network not shown in web interface and not able to create cluster through api.

Closed this issue · 1 comments

Since today my networks do not get shown anymore in web interface. I find them through the api though.

Also creating a cluster with this network does not work since it does not find the network.

Civo::Network.all
Reloading...
  Flexirest Civo::Network:/v2/networks - Trying to read from cache
  Flexirest Civo::Network#all - Requesting https://api.civo.com/v2/networks
  Flexirest Civo::Network#all - Response received 151 bytes
  Flexirest (596.8ms) Civo::Network#all
=>
#<Flexirest::ResultIterator:0x00007ff5d3957c40
 @_headers=
  {"date"=>"Thu, 08 Jul 2021 16:44:41 GMT",
   "content-type"=>"application/json; charset=utf-8",
   "transfer-encoding"=>"chunked",
   "connection"=>"keep-alive",
   "x-frame-options"=>"SAMEORIGIN",
   "x-xss-protection"=>"1; mode=block",
   "x-content-type-options"=>"nosniff",
   "x-download-options"=>"noopen",
   "x-permitted-cross-domain-policies"=>"none",
   "referrer-policy"=>"strict-origin-when-cross-origin",
   "x-ratelimit-limit"=>"50",
   "x-ratelimit-remaining"=>"49",
   "x-request-id"=>"ff54f4970fadb49957eae1279bb993c9",
   "x-runtime"=>"0.389327",
   "vary"=>"Origin",
   "x-ratelimit-reset"=>"1625762700",
   "strict-transport-security"=>"max-age=15724800; includeSubDomains"},
 @_status=200,
 @items=[#<Civo::Network id: "f90b74d2-6878-4175-a319-cbe46b0aa193", default: false, name: "test", label: "test">]>

civo_cluster = Civo::Kubernetes.create(
      name: "slug",
      #num_target_nodes: node_count,
      target_nodes_size: 'g3.xsmall',
      #kubernetes_version: kubernetes_version,	# the version of K3s to install (optional, the default is currently the latest available)
      #tags: tags, # tags	a space separated list of tags, to be used freely as required (optional)
      #applications: applications # applications	a comma separated list of applications to install. Spaces within application names are fine, but shouldn't be either side of the comma. If you want to remove a default installed application, prefix it with a "-", e.g. -traefik.
      network_id: "f90b74d2-6878-4175-a319-cbe46b0aa193", #	The Civo network ID for the network in which you wish to install the cluster (required).
      region: "LON1"
    )
 
# result
  Flexirest Civo::Kubernetes#create - Requesting https://api.civo.com/v2/kubernetes/clusters
  Flexirest (823.4ms) Civo::Kubernetes#create
/Users/dani/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/flexirest-1.10.6/lib/flexirest/request.rb:680:in `handle_response': The POST to '/v2/kubernetes/clusters' returned a 500 status, which raised a Flexirest::HTTPInternalServerException with a body of: {"code":"database_network_lookup","result":"internal server error","reason":"Failed to lookup a network within the internal database"} (Flexirest::HTTPInternalServerException)

i found the issue. the problem was that i did not set the region so it was in nyc instead of lon