Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Building Ubuntu 24.04 (QEMU) #1631

Open
feitnomore opened this issue Nov 22, 2024 · 2 comments
Open

Error Building Ubuntu 24.04 (QEMU) #1631

feitnomore opened this issue Nov 22, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@feitnomore
Copy link
Contributor

Environment

  • Make target: make build-qemu-ubuntu-2404
  • Run using container image? (Y/N): N
  • Environment vars:
export PACKER_FLAGS="--var 'kubernetes_rpm_version=1.31.2' --var 'kubernetes_semver=v1.31.2' --var 'kubernetes_series=v1.31' --var 'kubernetes_deb_version=1.31.2-1.1'"
export PACKER_VAR_FILES="/root/vars.json"
export PACKER_LOG=1
export FLATCAR_CHANNEL=stable
export FLATCAR_VERSION=4081.2.0
export OEM_ID=kubevirt
  • Vars file:
{
  "extra_rpms": "qemu-guest-agent",
  "extra_debs": "qemu-guest-agent"
}

What steps did you take and what happened?

Nothing special, just runnin make build-qemu-ubuntu-2404

What did you expect to happen?

Image to be ready

Relevant log output

Full log can be found here: https://justpaste.it/dyrt0

Log Output
==> qemu: Provisioning with Ansible...
    qemu: Setting up proxy adapter for Ansible....
2024/11/22 15:32:11 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:11 Creating inventory file for Ansible run...
2024/11/22 15:32:11 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:11 SSH proxy: serving on 127.0.0.1:46723
==> qemu: Executing Ansible: ansible-playbook -e packer_build_name="qemu" -e packer_builder_type=qemu -e packer_http_addr=10.0.2.2:8284 --ssh-extra-args '-o IdentitiesOnly=yes' --extra-vars containerd_url=https://github.com/containerd/containerd/releases/download/v1.7.20/cri-containerd-cni-1.7.20-linux-amd64.tar.gz containerd_sha256=041fa3cfd4e6689d37516e4c7752741df0974e7985d97258c1009b20f25f33c7 pause_image=registry.k8s.io/pause:3.9 containerd_additional_settings= containerd_cri_socket=/var/run/containerd/containerd.sock containerd_version=1.7.20 containerd_wasm_shims_url=https://github.com/deislabs/containerd-wasm-shims/releases/download/v0.11.1/containerd-wasm-shims-<RTVERSION>-<SHIM>-linux-x86_64.tar.gz containerd_wasm_shims_version=v0.11.1 containerd_wasm_shims_sha256={"lunatic":"7054bc882db755ce5f3ded46d114bfd4e0a318e437fa18a2601295d20b616b32","slight":"a6ea87d965037933a7d9edb5e20cfc175265c8e1ca92a16535f1f3c3f376f5b0","spin":"dcffedb8e4d2f585a851b3de489fa1e8a0054ec0ad72cf111c623623919245d0","wws":"e917f90692d798d80873aa0f37990c7d652f2846129d64fecbfd41ffa77799b8"} containerd_wasm_shims_runtimes="" containerd_wasm_shims_runtime_versions="{"lunatic":"v1","slight":"v1","spin":"v2","wws":"v1"}" crictl_url=https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.30.0/crictl-v1.30.0-linux-amd64.tar.gz crictl_sha256=https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.30.0/crictl-v1.30.0-linux-amd64.tar.gz.sha256 crictl_source_type=pkg custom_role_names="" firstboot_custom_roles_pre="" firstboot_custom_roles_post="" node_custom_roles_pre="" node_custom_roles_post="" disable_public_repos=false extra_debs="qemu-guest-agent" extra_repos="" extra_rpms="qemu-guest-agent" http_proxy= https_proxy= kubeadm_template=etc/kubeadm.yml kubernetes_apiserver_port=6443 kubernetes_cni_http_source=https://github.com/containernetworking/plugins/releases/download kubernetes_cni_http_checksum=sha256:https://storage.googleapis.com/k8s-artifacts-cni/release/v1.2.0/cni-plugins-linux-amd64-v1.2.0.tgz.sha256 kubernetes_goarch=amd64 kubernetes_http_source=https://dl.k8s.io/release kubernetes_container_registry=registry.k8s.io kubernetes_rpm_repo=https://pkgs.k8s.io/core:/stable:/v1.31/rpm/ kubernetes_rpm_gpg_key=https://pkgs.k8s.io/core:/stable:/v1.31/rpm/repodata/repomd.xml.key kubernetes_rpm_gpg_check=True kubernetes_deb_repo=https://pkgs.k8s.io/core:/stable:/v1.31/deb/ kubernetes_deb_gpg_key=https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key kubernetes_cni_deb_version= kubernetes_cni_rpm_version= kubernetes_cni_semver=v1.2.0 kubernetes_cni_source_type=pkg kubernetes_semver=v1.31.2 kubernetes_source_type=pkg kubernetes_load_additional_imgs=false kubernetes_deb_version=1.31.2-1.1 kubernetes_rpm_version=1.31.2 no_proxy= pip_conf_file= python_path= redhat_epel_rpm=https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm epel_rpm_gpg_key= reenable_public_repos=true remove_extra_repos=false systemd_prefix=/usr/lib/systemd sysusr_prefix=/usr sysusrlocal_prefix=/usr/local load_additional_components=false additional_registry_images=false additional_registry_images_list= ecr_credential_provider=false additional_url_images=false additional_url_images_list= additional_executables=false additional_executables_list= additional_executables_destination_path= additional_s3=false build_target=virt amazon_ssm_agent_rpm= enable_containerd_audit= kubernetes_enable_automatic_resource_sizing= debug_tools=false ubuntu_repo=http://us.archive.ubuntu.com/ubuntu ubuntu_security_repo=http://security.ubuntu.com/ubuntu gpu_block_nouveau_loading= --extra-vars ansible_python_interpreter=/usr/bin/python3 --extra-vars  --scp-extra-args "-O" -e ansible_ssh_private_key_file=/tmp/ansible-key1962725259 -i /tmp/packer-provisioner-ansible2991839957 /home/marcelo/local/src/github.com/feitnomore/image-builder/images/capi/ansible/node.yml
    qemu:
    qemu: PLAY [all] *********************************************************************
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 SSH proxy: accepted connection
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 authentication attempt from 127.0.0.1:38934 to 127.0.0.1:46723 as builder using none
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 authentication attempt from 127.0.0.1:38934 to 127.0.0.1:46723 as builder using publickey
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 new env request: LANG=en_US.UTF-8
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 new env request: LC_TERMINAL=iTerm2
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 new env request: LC_TERMINAL_VERSION=3.5.5
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 new exec request: /bin/sh -c '( umask 77 && mkdir -p "` echo /tmp/.ansible `"&& mkdir "` echo /tmp/.ansible/ansible-tmp-1732300332.5463443-1039819-202713980688083 `" && echo ansible-tmp-1732300332.5463443-1039819-202713980688083="` echo /tmp/.ansible/ansible-tmp-1732300332.5463443-1039819-202713980688083 `" ) && sleep 0'
2024/11/22 15:32:12 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 [DEBUG] Opening new ssh session
2024/11/22 15:32:12 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 [ERROR] ssh session open error: 'EOF', attempting reconnect
2024/11/22 15:32:12 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 [DEBUG] reconnecting to TCP connection for SSH
2024/11/22 15:32:12 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 [DEBUG] handshaking with SSH
2024/11/22 15:32:12 [INFO] 0 bytes written for 'stdout'
2024/11/22 15:32:12 [INFO] 0 bytes written for 'stderr'
2024/11/22 15:32:12 [INFO] 0 bytes written for 'stdin'
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 [INFO] 0 bytes written for 'stdout'
2024/11/22 15:32:12 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:32:12 [INFO] 0 bytes written for 'stderr'
==> qemu: ssh: handshake failed: EOF
Cancelling build after receiving interrupt
2024/11/22 15:33:07 Cancelling builder after context cancellation context canceled
2024/11/22 15:33:07 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 Qemu stderr: qemu-system-x86_64: terminating on signal 2
2024/11/22 15:33:07 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 Cancelling provisioning due to context cancellation: context canceled
2024/11/22 15:33:07 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 failed to unlock port lockfile: close tcp 127.0.0.1:5912: use of closed network connection
2024/11/22 15:33:07 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 failed to unlock port lockfile: close tcp 127.0.0.1:3866: use of closed network connection
2024/11/22 15:33:07 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 [INFO] 0 bytes written for 'stdin'
2024/11/22 15:33:07 packer-provisioner-shell plugin: Received interrupt signal (count: 1). Ignoring.
2024/11/22 15:33:07 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 Received interrupt signal (count: 1). Ignoring.
2024/11/22 15:33:07 packer-provisioner-shell plugin: Received interrupt signal (count: 1). Ignoring.
2024/11/22 15:33:07 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 Received interrupt signal (count: 1). Ignoring.
2024/11/22 15:33:07 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 Cancelling hook after context cancellation context canceled
2024/11/22 15:33:07 packer-post-processor-shell-local plugin: Received interrupt signal (count: 1). Ignoring.
2024/11/22 15:33:07 packer-post-processor-shell-local plugin: Received interrupt signal (count: 1). Ignoring.
2024/11/22 15:33:07 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 Received interrupt signal (count: 1). Ignoring.
2024/11/22 15:33:07 Cancelling provisioner after context cancellation context canceled
2024/11/22 15:33:07 packer-plugin-goss_v3.2.13_x5.0_linux_amd64 plugin: 2024/11/22 15:33:07 Received interrupt signal (count: 1). Ignoring.
    qemu:  [ERROR]: User interrupted execution
==> qemu: Deleting output directory...
2024/11/22 15:33:07 [INFO] (telemetry) ending qemu
Build 'qemu' errored after 23 minutes 12 seconds: Build was cancelled.
==> Wait completed after 23 minutes 12 seconds
2024/11/22 15:33:07 [INFO] (telemetry) Finalizing.

==> Wait completed after 23 minutes 12 seconds
Cleanly cancelled builds after being interrupted.
2024/11/22 15:33:08 packer-plugin-ansible_v1.1.0_x5.0_linux_amd64 plugin: 2024/11/22 15:33:08 shutting down the SSH proxy
2024/11/22 15:33:08 [INFO] (telemetry) ending ansible
2024/11/22 15:33:08 waiting for all plugin processes to complete...
2024/11/22 15:33:08 /root/.packer.d/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.0_x5.0_linux_amd64: plugin process exited
2024/11/22 15:33:08 /usr/local/bin/packer: plugin process exited
2024/11/22 15:33:08 /root/.packer.d/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.0_x5.0_linux_amd64: plugin process exited
2024/11/22 15:33:08 /root/.packer.d/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.0_x5.0_linux_amd64: plugin process exited
2024/11/22 15:33:08 /root/.packer.d/plugins/github.com/yaleuniversity/goss/packer-plugin-goss_v3.2.13_x5.0_linux_amd64: plugin process exited
2024/11/22 15:33:08 /usr/local/bin/packer: plugin process exited
2024/11/22 15:33:08 [ERR] Error decoding response stream 204: EOF
2024/11/22 15:33:08 /usr/local/bin/packer: plugin process exited
2024/11/22 15:33:08 /usr/local/bin/packer: plugin process exited
make: *** [Makefile:543: build-qemu-ubuntu-2404] Error 1

Anything else you would like to add?

N/A


/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 22, 2024
@cunningr
Copy link

Hi @feitnomore did you find any workaround or fix for this? I just tried to build with v0.1.40 and Ubuntu 24.04 and get the same issue. When Ansible tries to SSH I get the error:

2024/12/21 13:52:58 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/12/21 13:52:58 [DEBUG] Opening new ssh session
2024/12/21 13:52:58 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/12/21 13:52:58 [ERROR] ssh session open error: 'EOF', attempting reconnect
2024/12/21 13:52:58 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/12/21 13:52:58 [DEBUG] reconnecting to TCP connection for SSH
2024/12/21 13:52:58 packer-plugin-qemu_v1.1.0_x5.0_linux_amd64 plugin: 2024/12/21 13:52:58 [DEBUG] handshaking with SSH
2024/12/21 13:52:58 [INFO] 0 bytes written for 'stdout'
2024/12/21 13:52:58 [INFO] 0 bytes written for 'stderr'
2024/12/21 13:52:58 [INFO] 0 bytes written for 'stdin'
2024/12/21 13:52:58 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2024/12/21 13:52:58 [INFO] 0 bytes written for 'stdout'
2024/12/21 13:52:58 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2024/12/21 13:52:58 [INFO] 0 bytes written for 'stderr'
==> qemu: ssh: handshake failed: EOF

Is this some SSH opts that need updating maybe?

@feitnomore
Copy link
Contributor Author

Nope, I'm stuck 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants