JonasProgrammer / docker-machine-driver-hetzner

Docker machine driver for the new hetzner cloud API
https://jonasprogrammer.github.io/docker-machine-driver-hetzner/
MIT License
431 stars 53 forks source link

Creating clusters fails #75

Closed ghost closed 2 years ago

ghost commented 2 years ago

I'm having issues provisioning RKE clusters (always fails at installing docker), [ERROR] error syncing 'c-wdlz9/m-h9dsx': handler node-controller: Error creating machine: Error installing Docker: , requeuing I've tried ubuntu 18 and 20, debian, fedora with the same outcome. I've also tried it on digital ocean and all works fine.

My note driver and template are

  active            = true
  builtin           = false
  name              = "Hetzner TF"
  ui_url            = "https://storage.googleapis.com/hcloud-rancher-v2-ui-driver/component.js"
  url               = "https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases/download/3.5.0/docker-machine-driver-hetzner_3.5.0_linux_amd64.tar.gz"
  whitelist_domains = ["storage.googleapis.com"]
}

resource "rancher2_node_template" "hc_node_template" {
  name      = "hc-node-template"
  driver_id = rancher2_node_driver.hetzner_node_driver.id
  hetzner_config {
    api_token       = var.hcloud_token
    image           = "ubuntu-18.04"
    server_location = "nbg1"
    server_type     = "cpx21"
    # cloudinit       = ""
    use_private_network = false
  }
}

And also not able to provision RKE2 clusters - since it asks for a cloud credential - which it never saves so cannot proceed. Should I provide screenshots or a recording (is that an issue just on my end perhaps?

Trying to add cluster I get this image

And after adding anything in there, it doesn't save and I get this image

And the box says "Sorry, no matching options"

JonasProgrammer commented 2 years ago

Hi and sorry this is causing you troubles.

I'm not familiar with RKE, but is there any way you can access the raw docker-machine logs in order to debug the issue? From the information provided my best guess is that there is no Hetzner API key being passed, but that's a very vague guess.

ghost commented 2 years ago

Hi and thanks for your reply Will try to find those (do you know where I can find them exactly?) - the above is from the pod logs, searched the whole disk for the VM id. If it's because of the API key missing, I could get that for RKE2, where I can't actually add it. For RKE1, its never asked of me. My node definition includes the api key... So not sure how it's not there, because VMs are provisioned, just the software on them never installed and connecting to master node

Realized, I didn't give the versions: rancher 2.6.2 running on Ubuntu 20.04

JonasProgrammer commented 2 years ago

Hi,

sorry, unfortunately I have absolutely no experience with RKE, as stated. I'm pretty positive the log output is going somewhere, but I cannot give you any hints on that either.

For clarification: This driver is only the low-level part that does communication with Hetzner and -- when it works -- provides docker-machine with the means to get a docker instance up and running. I know that there is are some upstream projects reyling on this, like Max' Rancher driver, but I have no proper knowledge about any of them.

Perhaps you could first try to get help on how to extract logs from RKE and we can have a look at what is going wrong afterwards.

Regards

ghost commented 2 years ago

Hi again,

Yeah, the machines are provisioned correctly. Ah yeah, you're right, probably should've opened this ticket here : https://github.com/mxschmitt/ui-driver-hetzner If that's the one you are referring to :)