geerlingguy / ansible-role-docker_arm

Ansible Role - Docker for ARM and Pi
MIT License
98 stars 29 forks source link

Installation failed on current Raspi OS (Debian 10.10) #24

Closed cybermcm closed 3 years ago

cybermcm commented 3 years ago

I'm completely new to Ansible so please point me to the right direction if I messed up. Clean Raspi OS install

root@raspi02:/opt/docker/_ansible# ansible-playbook raspi_docker.yml

PLAY [raspi docker install] **********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.pip : Ensure Pip is installed.] ************************************************************************************************************************************************************************************
^[[A^[[Bchanged: [raspi03.corp.xxx.abc]

TASK [geerlingguy.pip : Ensure pip_install_packages are installed.] ******************************************************************************************************************************************************************
changed: [raspi03.corp.xxx.abc] => (item={'name': 'docker'})

TASK [geerlingguy.docker_arm : Check if Docker is already present.] ******************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Download Docker install convenience script.] **********************************************************************************************************************************************************
changed: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Run Docker install convenience script.] ***************************************************************************************************************************************************************
fatal: [raspi03.corp.xxx.abc]: FAILED! => {"changed": true, "cmd": ["/tmp/get-docker.sh"], "delta": "0:01:20.804713", "end": "2021-07-30 16:16:53.132732", "msg": "non-zero return code", "rc": 100, "start": "2021-07-30 16:15:32.328019", "stderr": "+ sh -c apt-get update -qq >/dev/null\n+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null\n+ sh -c curl -fsSL \"https://download.docker.com/linux/raspbian/gpg\" | apt-key add -qq - >/dev/null\nWarning: apt-key output should not be parsed (stdout is not a terminal)\n+ sh -c echo \"deb [arch=armhf] https://download.docker.com/linux/raspbian buster stable\" > /etc/apt/sources.list.d/docker.list\n+ sh -c apt-get update -qq >/dev/null\n+ [ -n  ]\n+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null\nE: Sub-process /usr/bin/dpkg returned an error code (1)", "stderr_lines": ["+ sh -c apt-get update -qq >/dev/null", "+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null", "+ sh -c curl -fsSL \"https://download.docker.com/linux/raspbian/gpg\" | apt-key add -qq - >/dev/null", "Warning: apt-key output should not be parsed (stdout is not a terminal)", "+ sh -c echo \"deb [arch=armhf] https://download.docker.com/linux/raspbian buster stable\" > /etc/apt/sources.list.d/docker.list", "+ sh -c apt-get update -qq >/dev/null", "+ [ -n  ]", "+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "# Executing docker install script, commit: 7cae5f8b0decc17d6571f9f52eb840fbc13b2737", "stdout_lines": ["# Executing docker install script, commit: 7cae5f8b0decc17d6571f9f52eb840fbc13b2737"]}
        to retry, use: --limit @/opt/docker/_ansible/raspi_docker.retry

PLAY RECAP ***************************************************************************************************************************************************************************************************************************
raspi03.corp.xxx.abc      : ok=5    changed=3    unreachable=0    failed=1

root@raspi02:/opt/docker/_ansible# ansible-playbook raspi_docker.yml

PLAY [raspi docker install] **********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.pip : Ensure Pip is installed.] ************************************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.pip : Ensure pip_install_packages are installed.] ******************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc] => (item={'name': 'docker'})

TASK [geerlingguy.docker_arm : Check if Docker is already present.] ******************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Download Docker install convenience script.] **********************************************************************************************************************************************************
skipping: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Run Docker install convenience script.] ***************************************************************************************************************************************************************
skipping: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Make sure Docker CE is the version specified.] ********************************************************************************************************************************************************
fatal: [raspi03.corp.xxx.abc]: FAILED! => {"cache_update_time": 1627654543, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"  --force-yes   install 'docker-ce=5:19.03.12~3-0~raspbian-buster' -o APT::Install-Recommends=no' failed: W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["W: --force-yes is deprecated, use one of the options starting with --allow instead.", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nRecommended packages:\n  cgroupfs-mount | cgroup-lite libltdl7\nThe following packages will be DOWNGRADED:\n  docker-ce\n0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.\n1 not fully installed or removed.\nNeed to get 14.4 MB of archives.\nAfter this operation, 8739 kB disk space will be freed.\nGet:1 https://download.docker.com/linux/raspbian buster/stable armhf docker-ce armhf 5:19.03.12~3-0~raspbian-buster [14.4 MB]\nFetched 14.4 MB in 15s (953 kB/s)\ndpkg: warning: downgrading docker-ce from 5:20.10.7~3-0~raspbian-buster to 5:19.03.12~3-0~raspbian-buster\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 43339 files and directories currently installed.)\r\nPreparing to unpack .../docker-ce_5%3a19.03.12~3-0~raspbian-buster_armhf.deb ...\r\nUnpacking docker-ce (5:19.03.12~3-0~raspbian-buster) over (5:20.10.7~3-0~raspbian-buster) ...\r\nSetting up docker-ce (5:19.03.12~3-0~raspbian-buster) ...\r\nJob for docker.service failed because the control process exited with error code.\r\nSee \"systemctl status docker.service\" and \"journalctl -xe\" for details.\r\ninvoke-rc.d: initscript docker, action \"start\" failed.\r\n* docker.service - Docker Application Container Engine\r\n   Loaded: loaded (\u001b]8;;file://raspi03/lib/systemd/system/docker.service\u0007/lib/systemd/system/docker.service\u001b]8;;\u0007; enabled; vendor preset: enabled)\r\n   Active: activating (auto-restart) (Result: exit-code) since Fri 2021-07-30 16:17:49 CEST; 20ms ago\r\n     Docs: \u001b]8;;https://docs.docker.com\u0007https://docs.docker.com\u001b]8;;\u0007\r\n  Process: 14420 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock \u001b[0;1;31m(code=exited, status=1/FAILURE)\u001b[0m\r\n Main PID: 14420 (code=exited, status=1/FAILURE)\r\ndpkg: error processing package docker-ce (--configure):\r\n installed docker-ce package post-installation script subprocess returned error exit status 1\r\nProcessing triggers for systemd (241-7~deb10u7+rpi1) ...\r\nErrors were encountered while processing:\r\n docker-ce\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Recommended packages:", "  cgroupfs-mount | cgroup-lite libltdl7", "The following packages will be DOWNGRADED:", "  docker-ce", "0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.", "1 not fully installed or removed.", "Need to get 14.4 MB of archives.", "After this operation, 8739 kB disk space will be freed.", "Get:1 https://download.docker.com/linux/raspbian buster/stable armhf docker-ce armhf 5:19.03.12~3-0~raspbian-buster [14.4 MB]", "Fetched 14.4 MB in 15s (953 kB/s)", "dpkg: warning: downgrading docker-ce from 5:20.10.7~3-0~raspbian-buster to 5:19.03.12~3-0~raspbian-buster", "(Reading database ... ", "(Reading database ... 5%", "(Reading database ... 10%", "(Reading database ... 15%", "(Reading database ... 20%", "(Reading database ... 25%", "(Reading database ... 30%", "(Reading database ... 35%", "(Reading database ... 40%", "(Reading database ... 45%", "(Reading database ... 50%", "(Reading database ... 55%", "(Reading database ... 60%", "(Reading database ... 65%", "(Reading database ... 70%", "(Reading database ... 75%", "(Reading database ... 80%", "(Reading database ... 85%", "(Reading database ... 90%", "(Reading database ... 95%", "(Reading database ... 100%", "(Reading database ... 43339 files and directories currently installed.)", "Preparing to unpack .../docker-ce_5%3a19.03.12~3-0~raspbian-buster_armhf.deb ...", "Unpacking docker-ce (5:19.03.12~3-0~raspbian-buster) over (5:20.10.7~3-0~raspbian-buster) ...", "Setting up docker-ce (5:19.03.12~3-0~raspbian-buster) ...", "Job for docker.service failed because the control process exited with error code.", "See \"systemctl status docker.service\" and \"journalctl -xe\" for details.", "invoke-rc.d: initscript docker, action \"start\" failed.", "* docker.service - Docker Application Container Engine", "   Loaded: loaded (\u001b]8;;file://raspi03/lib/systemd/system/docker.service\u0007/lib/systemd/system/docker.service\u001b]8;;\u0007; enabled; vendor preset: enabled)", "   Active: activating (auto-restart) (Result: exit-code) since Fri 2021-07-30 16:17:49 CEST; 20ms ago", "     Docs: \u001b]8;;https://docs.docker.com\u0007https://docs.docker.com\u001b]8;;\u0007", "  Process: 14420 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock \u001b[0;1;31m(code=exited, status=1/FAILURE)\u001b[0m", " Main PID: 14420 (code=exited, status=1/FAILURE)", "dpkg: error processing package docker-ce (--configure):", " installed docker-ce package post-installation script subprocess returned error exit status 1", "Processing triggers for systemd (241-7~deb10u7+rpi1) ...", "Errors were encountered while processing:", " docker-ce"]}
        to retry, use: --limit @/opt/docker/_ansible/raspi_docker.retry

PLAY RECAP ***************************************************************************************************************************************************************************************************************************
raspi03.corp.xxx.abc      : ok=4    changed=0    unreachable=0    failed=1

root@raspi02:/opt/docker/_ansible# ansible-playbook raspi_docker.yml

PLAY [raspi docker install] **********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.pip : Ensure Pip is installed.] ************************************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.pip : Ensure pip_install_packages are installed.] ******************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc] => (item={'name': 'docker'})

TASK [geerlingguy.docker_arm : Check if Docker is already present.] ******************************************************************************************************************************************************************
ok: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Download Docker install convenience script.] **********************************************************************************************************************************************************
skipping: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Run Docker install convenience script.] ***************************************************************************************************************************************************************
skipping: [raspi03.corp.xxx.abc]

TASK [geerlingguy.docker_arm : Make sure Docker CE is the version specified.] ********************************************************************************************************************************************************
fatal: [raspi03.corp.xxx.abc]: FAILED! => {"cache_update_time": 1627654543, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"  --force-yes   install 'docker-ce=5:19.03.12~3-0~raspbian-buster' -o APT::Install-Recommends=no' failed: W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "W: --force-yes is deprecated, use one of the options starting with --allow instead.\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["W: --force-yes is deprecated, use one of the options starting with --allow instead.", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\ndocker-ce is already the newest version (5:19.03.12~3-0~raspbian-buster).\n0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\n1 not fully installed or removed.\nAfter this operation, 0 B of additional disk space will be used.\nSetting up docker-ce (5:19.03.12~3-0~raspbian-buster) ...\r\nJob for docker.service failed because the control process exited with error code.\r\nSee \"systemctl status docker.service\" and \"journalctl -xe\" for details.\r\ninvoke-rc.d: initscript docker, action \"start\" failed.\r\n* docker.service - Docker Application Container Engine\r\n   Loaded: loaded (\u001b]8;;file://raspi03/lib/systemd/system/docker.service\u0007/lib/systemd/system/docker.service\u001b]8;;\u0007; enabled; vendor preset: enabled)\r\n   Active: activating (auto-restart) (Result: exit-code) since Fri 2021-07-30 16:23:22 CEST; 20ms ago\r\n     Docs: \u001b]8;;https://docs.docker.com\u0007https://docs.docker.com\u001b]8;;\u0007\r\n  Process: 14972 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock \u001b[0;1;31m(code=exited, status=1/FAILURE)\u001b[0m\r\n Main PID: 14972 (code=exited, status=1/FAILURE)\r\ndpkg: error processing package docker-ce (--configure):\r\n installed docker-ce package post-installation script subprocess returned error exit status 1\r\nErrors were encountered while processing:\r\n docker-ce\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "docker-ce is already the newest version (5:19.03.12~3-0~raspbian-buster).", "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.", "1 not fully installed or removed.", "After this operation, 0 B of additional disk space will be used.", "Setting up docker-ce (5:19.03.12~3-0~raspbian-buster) ...", "Job for docker.service failed because the control process exited with error code.", "See \"systemctl status docker.service\" and \"journalctl -xe\" for details.", "invoke-rc.d: initscript docker, action \"start\" failed.", "* docker.service - Docker Application Container Engine", "   Loaded: loaded (\u001b]8;;file://raspi03/lib/systemd/system/docker.service\u0007/lib/systemd/system/docker.service\u001b]8;;\u0007; enabled; vendor preset: enabled)", "   Active: activating (auto-restart) (Result: exit-code) since Fri 2021-07-30 16:23:22 CEST; 20ms ago", "     Docs: \u001b]8;;https://docs.docker.com\u0007https://docs.docker.com\u001b]8;;\u0007", "  Process: 14972 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock \u001b[0;1;31m(code=exited, status=1/FAILURE)\u001b[0m", " Main PID: 14972 (code=exited, status=1/FAILURE)", "dpkg: error processing package docker-ce (--configure):", " installed docker-ce package post-installation script subprocess returned error exit status 1", "Errors were encountered while processing:", " docker-ce"]}
        to retry, use: --limit @/opt/docker/_ansible/raspi_docker.retry

PLAY RECAP ***************************************************************************************************************************************************************************************************************************
raspi03.corp.xxx.abc      : ok=4    changed=0    unreachable=0    failed=1

playbook:

---
- name: raspi docker install
  hosts: raspi03.corp.xxx.abc
  remote_user: pi
  become: yes
  ignore_unreachable: yes

  vars:
    pip_package: python3-pip
    pip_install_packages:
      - name: docker

  roles:
    - geerlingguy.pip
    - geerlingguy.docker_arm
cybermcm commented 3 years ago

please forget my issue, Raspi needed just a reboot, now all is working fine, sorry for that... thx for your role...