Closed liamwh closed 10 months ago
@liamwh Something is up with WSL, something changed recently and it's not working properly anymore. Please try to generate from a Linux VM. Or help me debug because I do not have any Windows on hand.
Please install the latest stable version and try again. https://github.com/microsoft/WSL/releases
@otavio FYI, please install the latest WSL too and try.
@carstenblt Same for you, please see the WSL link above and try the latest to fix your issues.
@carstenblt Same for you, please see the WSL link above and try the latest to fix your issues.
Not using WSL but MacOS.
@carstenblt Ok, good to know, did you fix your issues? If not don't hesitate to reopen a separate issue.
Can confirm issue reoccurs on MacOS. CLI versions below:
Terraform v1.5.7
on darwin_arm64
packer --version
1.9.4
kubectl version
Client Version: v1.28.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.3
hcloud v1.41.1
WSL CLI versions:
❯ terraform --version
Terraform v1.6.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.3
+ provider registry.terraform.io/hashicorp/local v2.4.1
+ provider registry.terraform.io/hashicorp/null v3.2.2
+ provider registry.terraform.io/hashicorp/random v3.6.0
+ provider registry.terraform.io/hetznercloud/hcloud v1.44.1
+ provider registry.terraform.io/integrations/github v5.40.0
+ provider registry.terraform.io/tenstad/remote v0.1.2
❯ packer --version
1.9.4
hcloud v1.41.1
❯ kubectl version
Client Version: v1.29.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.2
I also tried bumping the pause_before
in the hcloud-microos-snapshots.pkr.hcl
to 2m like so:
# Build the MicroOS x86 snapshot
build {
sources = ["source.hcloud.microos-x86-snapshot"]
# Download the MicroOS x86 image
provisioner "shell" {
inline = ["${local.download_image}${var.opensuse_microos_x86_mirror_link}"]
}
# Write the MicroOS x86 image to disk
provisioner "shell" {
inline = [local.write_image]
expect_disconnect = true
}
# Ensure connection to MicroOS x86 and do house-keeping
provisioner "shell" {
pause_before = "2m"
inline = [local.install_packages]
expect_disconnect = true
}
# Ensure connection to MicroOS x86 and do house-keeping
provisioner "shell" {
pause_before = "2m"
inline = [local.clean_up]
}
}
# Build the MicroOS ARM snapshot
build {
sources = ["source.hcloud.microos-arm-snapshot"]
# Download the MicroOS ARM image
provisioner "shell" {
inline = ["${local.download_image}${var.opensuse_microos_arm_mirror_link}"]
}
# Write the MicroOS ARM image to disk
provisioner "shell" {
inline = [local.write_image]
expect_disconnect = true
}
# Ensure connection to MicroOS ARM and do house-keeping
provisioner "shell" {
pause_before = "2m"
inline = [local.install_packages]
expect_disconnect = true
}
# Ensure connection to MicroOS ARM and do house-keeping
provisioner "shell" {
pause_before = "2m"
inline = [local.clean_up]
}
}
And I also added the ssh_timeout
and set it to 20m
like so:
# Source for the MicroOS ARM snapshot
source "hcloud" "microos-arm-snapshot" {
image = "ubuntu-22.04"
rescue = "linux64"
location = "fsn1"
server_type = "cax11" # disk size of >= 40GiB is needed to install the MicroOS image
snapshot_labels = {
microos-snapshot = "yes"
creator = "kube-hetzner"
}
snapshot_name = "OpenSUSE MicroOS ARM by Kube-Hetzner"
ssh_username = "root"
ssh_timeout = "20m"
token = var.hcloud_token
}
Problem still persists. Log below.
Plan: 19 to add, 0 to change, 0 to destroy. ╷ │ Error: no image found matching the selection │ │ with module.kube-hetzner.data.hcloud_image.microos_x86_snapshot, │ on .terraform/modules/kube-hetzner/main.tf line 6, in data "hcloud_image" "microos_x86_snapshot": │ 6: data "hcloud_image" "microos_x86_snapshot" { │ ╵ ╷ │ Error: no image found matching the selection │ │ with module.kube-hetzner.data.hcloud_image.microos_arm_snapshot, │ on .terraform/modules/kube-hetzner/main.tf line 12, in data "hcloud_image" "microos_arm_snapshot": │ 12: data "hcloud_image" "microos_arm_snapshot" {
What happened with snapshots?
Hi, switching from fsn1 to nbg1 solved the issue for me. Snapshots are available across all regions so there shouldn't be any issues :-)
@liamwh Please try again after installing and connecting to Cloudflare Warp https://one.one.one.one, it a free VPN that might correct those TCP connection issues.
@mysticaltech I can confirm that this fixed the issue for me, thanks! I am curious to learn what made you think Cloudflare Warp might fix the issue?
@liamwh Great to hear! Networking errors always get fixed by cloudflare warp in my experience, they route your traffic to their data center directly and then it takes the high speed lane to its destination ☺️
I encounter the same issue. Unable to upgrade to hcloud >=2^
.
╷
│ Error: no image found matching the selection
│
│ with module.kube-hetzner.data.hcloud_image.microos_x86_snapshot,
│ on .terraform/modules/kube-hetzner/main.tf line 6, in data "hcloud_image" "microos_x86_snapshot":
│ 6: data "hcloud_image" "microos_x86_snapshot" {
│
╵
╷
│ Error: no image found matching the selection
│
│ with module.kube-hetzner.data.hcloud_image.microos_arm_snapshot,
│ on .terraform/modules/kube-hetzner/main.tf line 12, in data "hcloud_image" "microos_arm_snapshot":
│ 12: data "hcloud_image" "microos_arm_snapshot" {
│
╵
Hi, switching from fsn1 to nbg1 solved the issue for me. Snapshots are available across all regions so there shouldn't be any issues :-)
I have nodes both on fsn1
and nbg1
. Switching to nbg1
as suggest did not work for me.
@yannicschroeer Please see the upgrade guide pinned in the discussion section. You need to use the createkh script to create the underlying images.
Description
Failing to take snapshots. Using default configuration as per install instructions on GitHub repo.
packer-build-hcloud-microos-snapshots.log
Kube.tf file
Screenshots
Platform
WSL