kube-hetzner / terraform-hcloud-kube-hetzner

Optimized and Maintenance-free Kubernetes on Hetzner Cloud in one command!
MIT License
2.39k stars 368 forks source link

[Bug]: Packer is crashing while creating x86 snapshot #889

Closed Mammut-Felix closed 1 year ago

Mammut-Felix commented 1 year ago

Description

Packer crashes while building the x86 snapshot. Arm is running without errors.

==> hcloud.microos-x86-snapshot: 2023-07-17 12:01:05 (158 MB/s) - ‘openSUSE-MicroOS.x86_64-OpenStack-Cloud.qcow2’ saved [414580736/414580736] ==> hcloud.microos-x86-snapshot: ==> hcloud.microos-x86-snapshot: Provisioning with shell script: /var/folders/yz/q7cxzgw13b31vxjlq1xdjl9r0000gn/T/packer-shell1191919114 ==> hcloud.microos-x86-snapshot: + echo MicroOS image loaded, writing to disk... hcloud.microos-x86-snapshot: MicroOS image loaded, writing to disk... ==> hcloud.microos-x86-snapshot: + ls -a ==> hcloud.microos-x86-snapshot: + grep -ie ^opensuse.*microos.*qcow2$ ==> hcloud.microos-x86-snapshot: + qemu-img convert -p -f qcow2 -O host_device openSUSE-MicroOS.x86_64-OpenStack-Cloud.qcow2 /dev/sda ==> hcloud.microos-x86-snapshot: /tmp/script_2705.sh: 4: qemu-img: not found ==> hcloud.microos-x86-snapshot: Provisioning step had errors: Running the cleanup provisioner, if present... ==> hcloud.microos-x86-snapshot: Destroying server... ==> hcloud.microos-x86-snapshot: Deleting temporary ssh key... Build 'hcloud.microos-x86-snapshot' errored after 1 minute 26 seconds: Script exited with non-zero exit status: 127. Allowed exit codes are: [0]

Kube.tf file

Not needed

Screenshots

No response

Platform

Mac

ifeulner commented 1 year ago

Well, "packer crashes" is not really the right term... if I read the logs right, qemu-imgcould not be found anymore, looks like Hetzner changed the image.

mysticaltech commented 1 year ago

@kube-hetzner/core Can someone reproduce?

M4t7e commented 1 year ago

I just tested it with the latest version from master branch and it worked fine for me.

ifeulner commented 1 year ago

@M4t7e I meant the Hetzner rescue image, this provides the qemu-img binary that is used to write the MicroOS image to disk. And that one was not found regarding to the logs provided above.

Unfortunately I do not have time currently to check it by myself...

M4t7e commented 1 year ago

@ifeulner Yes, I also got it after I posted it and edited my comment immediately... sorry ^^

Here is how my image looks like and now I tested it about 5 times. Still can't reproduce...

==> hcloud.microos-x86-snapshot: + cat /etc/os-release
    hcloud.microos-x86-snapshot: PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    hcloud.microos-x86-snapshot: NAME="Debian GNU/Linux"
    hcloud.microos-x86-snapshot: VERSION_ID="12"
    hcloud.microos-x86-snapshot: VERSION="12 (bookworm)"
    hcloud.microos-x86-snapshot: VERSION_CODENAME=bookworm
    hcloud.microos-x86-snapshot: ID=debian
    hcloud.microos-x86-snapshot: HOME_URL="https://www.debian.org/"
    hcloud.microos-x86-snapshot: SUPPORT_URL="https://www.debian.org/support"
    hcloud.microos-x86-snapshot: BUG_REPORT_URL="https://bugs.debian.org/"
==> hcloud.microos-x86-snapshot: + which qemu-img
    hcloud.microos-x86-snapshot: /usr/bin/qemu-img
mysticaltech commented 1 year ago

Great @M4t7e, thanks for the info. It seems fixed then, they must have received complaints.

aleksasiriski commented 1 year ago

@Mammut-Felix can this be closed?

mysticaltech commented 1 year ago

@Mammut-Felix @aleksasiriski I just doubled checked and all good, so closing this.