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 in role geerlingguy.docker_arm when applying to Ubuntu 24.04 ARM #706

Closed
gabrielgradinaru opened this issue May 12, 2024 · 0 comments
Labels

Comments

@gabrielgradinaru
Copy link
Contributor

Describe the bug
Error when running ansible from M1 Macbook Air to VM running Ubuntu Server 24.04 ARM with QEMU virtualization.

Environment

  • Ansible-NAS revision (git rev-parse --short HEAD):
    a4773cf64
  • Ansible version (paste the entire output of ansible --version on the machine you run the playbook from):
ansible [core 2.15.8]
  config file = /Users/gabi/Various kits/Projects/ansible-nas/ansible.cfg
  configured module search path = ['/Users/gabi/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/gabi/Library/Python/3.9/lib/python/site-packages/ansible
  ansible collection location = /Users/gabi/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/gabi/Library/Python/3.9/bin/ansible
  python version = 3.9.6 (default, Feb  3 2024, 15:58:27) [Clang 15.0.0 (clang-1500.3.9.4)] (/Library/Developer/CommandLineTools/usr/bin/python3)
  jinja version = 3.1.3
  libyaml = True
  • Ansible-NAS operating system (cat /etc/lsb-release on the Ansible-NAS box) - Support won't be provided for non-LTS releases of Ubuntu:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"
  • Ansible-NAS kernel (uname -a on the Ansible-NAS box):
    Linux ansible-nas-test 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 02:32:42 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
  • Ansible-NAS Python version (python --version on the Ansible-NAS box):
    Python 3.12.3
  • Ansible-NAS Docker version (docker --version on the Ansible-NAS box):
    Docker version 26.1.2, build 211e74b
  • Latest Docker logs (journalctl -u docker.service on the Ansible-NAS box):
May 12 11:52:28 ansible-nas-test systemd[1]: Starting docker.service - Docker Application Container Engine...
May 12 11:52:28 ansible-nas-test dockerd[4919]: time="2024-05-12T11:52:28.678069629Z" level=info msg="Starting up"
May 12 11:52:28 ansible-nas-test dockerd[4919]: time="2024-05-12T11:52:28.679393970Z" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve>
May 12 11:52:28 ansible-nas-test dockerd[4919]: time="2024-05-12T11:52:28.795322775Z" level=info msg="Loading containers: start."
May 12 11:52:28 ansible-nas-test dockerd[4919]: time="2024-05-12T11:52:28.935076345Z" level=info msg="Loading containers: done."
May 12 11:52:28 ansible-nas-test dockerd[4919]: time="2024-05-12T11:52:28.952825490Z" level=info msg="Docker daemon" commit=ef1912d containerd-snapshotter=false storage-driver=overlay2 version=26.1.2
May 12 11:52:28 ansible-nas-test dockerd[4919]: time="2024-05-12T11:52:28.952902532Z" level=info msg="Daemon has completed initialization"
May 12 11:52:28 ansible-nas-test dockerd[4919]: time="2024-05-12T11:52:28.976285045Z" level=info msg="API listen on /run/docker.sock"
May 12 11:52:28 ansible-nas-test systemd[1]: Started docker.service - Docker Application Container Engine.
  • Are you running the playbook from a remote box or the Ansible-NAS box itself?
    remote box, but it's the same physical machine (Macbook Air M1)
  • Vagrant version, if testing (vagrant --version):
    Not applicable
  • Ansible-NAS filesystems (df -hT on the Ansible-NAS box):
Filesystem     Type      Size  Used Avail Use% Mounted on
tmpfs          tmpfs     391M  5.0M  386M   2% /run
efivarfs       efivarfs  256K   25K  232K  10% /sys/firmware/efi/efivars
/dev/vda2      ext4       23G  6.8G   15G  32% /
tmpfs          tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
/dev/vda1      vfat      1.1G  6.4M  1.1G   1% /boot/efi
tmpfs          tmpfs     391M   12K  391M   1% /run/user/1000
  • Mounted filesystems (mount on the Ansible-NAS box)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1941392k,nr_inodes=485348,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=399644k,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/vda2 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=432)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/vda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=399640k,nr_inodes=99910,mode=700,uid=1000,gid=1000,inode64)

all.yml Variables

  • docker_image_directory: /var/lib/docker
  • docker_home: /hdd/docker
  • docker_storage_driver: overlay2
  • samba_shares_root: /mnt/Volume3

Expected behavior
ansible-nas should run without issues

Actual behavior
Got error: Unable to find any of pip3 to use. pip needs to be installed.

Steps to reproduce

  • On a macbook with apple silicone download Ubuntu Server 24.04 ARM (https://ubuntu.com/download/server/arm)
  • In UTM, create a VM with QEMU using the above image
  • Run ansible-nas from macbook to apply on the VM

Playbook Output

TASK [geerlingguy.docker_arm : Install Docker Compose using Pip.] ******************************************************************************************************************************************
task path: /Users/gabi/.ansible/roles/geerlingguy.docker_arm/tasks/main.yml:36
......<debug logs>.....
fatal: [ansible-nas]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "chdir": null,
            "editable": false,
            "executable": "pip3",
            "extra_args": null,
            "name": [
                "docker-compose"
            ],
            "requirements": null,
            "state": "present",
            "umask": null,
            "version": null,
            "virtualenv": null,
            "virtualenv_command": "virtualenv",
            "virtualenv_python": null,
            "virtualenv_site_packages": false
        }
    },
    "msg": "Unable to find any of pip3 to use.  pip needs to be installed."
}

Full debug log available here:
full_debug_log.txt

Additional context
Noticed that role geerlingguy.docker_arm was archived and replaced by geerlingguy.docker. So for my particular case, solution was to remove role geerlingguy.docker_arm, but I'm not sure how it works for other ARM devices, such as a Raspberry PI, as I do not own any others.
More details in PR: #705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant