We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
make build-hcloud-flatcar
HCLOUD_TOKEN=*** HCLOUD_LOCATION=hel1
n/a
$ make build-hcloud-flatcar
A successfully built Flatcar image.
hcloud: TASK [python : Rename pypy folder] ********************************************* hcloud: changed: [default] hcloud: hcloud: TASK [python : Delete downloaded archive] ************************************** hcloud: changed: [default] hcloud: hcloud: PLAY RECAP ********************************************************************* hcloud: default : ok=8 changed=6 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 hcloud: ==> hcloud: Provisioning with Ansible... hcloud: Setting up proxy adapter for Ansible.... ==> hcloud: Executing Ansible: ansible-playbook -e packer_build_name="hcloud" -e packer_builder_type=hcloud --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="spin,slight" 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.31.0/crictl-v1.31.0-linux-amd64.tar.gz crictl_sha256=https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.31.0/crictl-v1.31.0-linux-amd64.tar.gz.sha256 crictl_source_type=http 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="" extra_repos="" extra_rpms="" 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=http kubernetes_semver=v1.31.4 kubernetes_source_type=http kubernetes_load_additional_imgs=false kubernetes_deb_version=1.31.4-1.1 kubernetes_rpm_version=1.31.4 no_proxy= pip_conf_file= python_path=/opt/pypy/site-packages 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=/etc/systemd sysusr_prefix=/opt sysusrlocal_prefix=/opt 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= netplan_removal_excludes="" --extra-vars ansible_python_interpreter=/opt/pypy/bin/pypy --extra-vars --scp-extra-args "-O" -e ansible_ssh_private_key_file=/var/folders/09/vr6q9qp90lv0dt3fbp85qc7c0000gn/T/ansible-key1987708392 -i /var/folders/09/vr6q9qp90lv0dt3fbp85qc7c0000gn/T/packer-provisioner-ansible1803143392 /Users/tcldr1/Desktop/image-builder/images/capi/ansible/node.yml hcloud: hcloud: PLAY [all] ********************************************************************* hcloud: [WARNING]: sftp transfer mechanism failed on [127.0.0.1]. Use ANSIBLE_DEBUG=1 hcloud: to see detailed information hcloud: hcloud: TASK [Gathering Facts] ********************************************************* hcloud: fatal: [default]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"exception": "Traceback (most recent call last):\n File \"/tmp/.ansible/ansible-tmp-1743164895.175585-86525-85468196407213/AnsiballZ_setup.py\", line 107, in <module>\n _ansiballz_main()\n File \"/tmp/.ansible/ansible-tmp-1743164895.175585-86525-85468196407213/AnsiballZ_setup.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/tmp/.ansible/ansible-tmp-1743164895.175585-86525-85468196407213/AnsiballZ_setup.py\", line 44, in invoke_module\n from ansible.module_utils import basic\n File \"/tmp/ansible_ansible.legacy.setup_payload_b3egz05h/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py\", line 5\n from __future__ import annotations\n ^\nSyntaxError: future feature annotations is not defined\nConnection to 127.0.0.1 closed.\r\n", "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/.ansible/ansible-tmp-1743164895.175585-86525-85468196407213/AnsiballZ_setup.py\", line 107, in <module>\n _ansiballz_main()\n File \"/tmp/.ansible/ansible-tmp-1743164895.175585-86525-85468196407213/AnsiballZ_setup.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/tmp/.ansible/ansible-tmp-1743164895.175585-86525-85468196407213/AnsiballZ_setup.py\", line 44, in invoke_module\n from ansible.module_utils import basic\n File \"/tmp/ansible_ansible.legacy.setup_payload_b3egz05h/ansible_ansible.legacy.setup_payload.zip/ansible/module_utils/basic.py\", line 5\n from __future__ import annotations\n ^\nSyntaxError: future feature annotations is not defined\nConnection to 127.0.0.1 closed.\r\n", "module_stdout": "", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"} hcloud: hcloud: PLAY RECAP ********************************************************************* hcloud: default : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 hcloud: ==> hcloud: Provisioning step had errors: Running the cleanup provisioner, if present... ==> hcloud: Destroying server... ==> hcloud: Deleting temporary SSH key... Build 'hcloud' errored after 4 minutes 10 seconds: Error executing Ansible: Non-zero exit status: exit status 2
/kind bug
The text was updated successfully, but these errors were encountered:
The python role installs pypy v3.6, and there is "ansible_extra_vars": "ansible_python_interpreter=/opt/pypy/bin/pypy" to use it.
python
"ansible_extra_vars": "ansible_python_interpreter=/opt/pypy/bin/pypy"
But Ansible uses OS Python 3.9, triggering a syntax error.
I assume the packer/hcloud/flatcar.json's
packer/hcloud/flatcar.json
"ansible_extra_vars": "ansible_python_interpreter=/opt/pypy/bin/pypy",
may conflict with setup/tasks/flatcat-bootstrap.yml
setup/tasks/flatcat-bootstrap.yml
- name: Set the ansible_python_interpreter fact ansible.builtin.set_fact: ansible_python_interpreter: "{{ external_binary_path }}/python" tags: - facts
and that bootstrap step, forces Ansible to use system Python, by overwriting ansible_python_interpreter.
ansible_python_interpreter
That bootstrap line was introduced in this commit "Align external_binary_path setting between roles", 3 years ago.
Tested, works. Preparing PR meanwhile, not sure whether set the path to /opt/pypy/bin/pypy, or drop the step.
/opt/pypy/bin/pypy
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Environment
make build-hcloud-flatcar
What steps did you take and what happened?
$ make build-hcloud-flatcar
What did you expect to happen?
A successfully built Flatcar image.
Relevant log output
Log Output
Anything else you would like to add?
/kind bug
The text was updated successfully, but these errors were encountered: