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

fix(keycloak): update more than 10 sub-groups (#9690) #9692

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FabienSalles
Copy link

@FabienSalles FabienSalles commented Feb 5, 2025

SUMMARY

Fixes #9690

When we want to create or update a sub-group, we fetch children of the parent group to know which sub group exist and should be updated.
The API is paginated by default with a maximum of 10 result and the api call did not set the corresponding paremeter (max).

This PR set max parameter with the number of existing sub-groups retrieve by another API endpoint

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

community.general.keycloak_group

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug identity module_utils module_utils new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels Feb 5, 2025
@FabienSalles
Copy link
Author

This PR fix the issue on my side but I couldn't launch integration tests.
I encountered this error :

➜ ansible-test integration keycloak_group --docker default -v --allow-unsupported
Configured locale: en_US.UTF-8
Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found.
Run command: docker -v
Detected "docker" container runtime version: Docker version 27.3.1, build ce12230
Run command: docker info --format '{{ json . }}'
Run command: docker version --format '{{ json . }}'
Container runtime: docker client=27.3.1 server=27.3.1 cgroup=v2
Assuming Docker is available on localhost.
Run command: docker image inspect quay.io/ansible/default-test-container:8.12.0
Run command: docker image inspect quay.io/ansible/ansible-test-utility-container:2.0.0
Run command: docker run --volume /sys/fs/cgroup:/probe:ro --name ansible-test-probe-w05jUWs4 --rm quay.io/ansible/a ...
Container host audit status: EPERM (-1)
Container host max open files: 1048576
Container loginuid: 4294967295 (not set)
Starting new "ansible-test-controller-w05jUWs4" container.
Run command: docker run --tmpfs /tmp:exec --tmpfs /run:exec --tmpfs /run/lock --volume /var/run/docker.sock:/var/ru ...
Adding "ansible-test-controller-w05jUWs4" to container database.
Run command: docker container inspect ansible-test-controller-w05jUWs4
Run command: docker run --pid host --privileged --name ansible-test-init-controller-w05jUWs4 --rm quay.io/ansible/a ...
Stream command with data: docker exec -i ansible-test-controller-w05jUWs4 /bin/sh
Scanning collection root: /home/fsalles/projects/github/ansible_collections
Including collection: community.general (3379 files)
Creating a payload archive containing 4398 files...
Created a 4420857 byte payload archive containing 4398 files in 0 seconds.
Run command with stdin: docker exec -i ansible-test-controller-w05jUWs4 tar oxzf - -C /root
Creating container database.
Stream command: docker exec ansible-test-controller-w05jUWs4 /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_c ...
Configured locale: en_US.UTF-8
Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found.
Parsing container database.
Run command: /usr/bin/python3.12 -c 'import cryptography'
Installing requirements for Python 3.12 (controller)
Stream command with data: /usr/bin/python3.12
Execute command: /usr/bin/python3.12 /tmp/ansible-test-myda__97-pip.py install --disable-pip-version-check -r requirements/ansible.txt -c requirements/constraints.txt
Run command: /usr/bin/python3.12 /root/ansible/test/lib/ansible_test/_util/target/tools/yamlcheck.py
Configuring target inventory.
Running keycloak_group integration test role
Initializing "/tmp/ansible-test-j6twz7rb-injector" as the temporary injector directory.
Injecting "/tmp/python-2txgnooi-ansible/python" as a execv wrapper for the "/usr/bin/python3.12" interpreter.
Stream command: ansible-playbook keycloak_group-pf3atz77.yml -i inventory -v
Using /root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_group-n7qfvbhl-ÅÑŚÌβŁÈ/tests/integration/integration.cfg as config file
running playbook inside collection community.general
ERROR! couldn't resolve module/action 'community.docker.docker_container'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_group-n7qfvbhl-ÅÑŚÌβŁÈ/tests/integration/targets/keycloak_group/tasks/main.yml': line 6, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Start container
  ^ here
NOTICE: To resume at this test target, use the option: --start-at keycloak_group
FATAL: Command "ansible-playbook keycloak_group-pf3atz77.yml -i inventory -v" returned exit status 4.
Run command with stdout: docker exec -i ansible-test-controller-w05jUWs4 sh -c 'tar cf - -C /root/ansible_collectio ...
Run command with stdin: tar oxzf - -C /home/fsalles/projects/github/ansible_collections/community/general/tests
FATAL: Command "docker exec ansible-test-controller-w05jUWs4 /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/community/general LC_ALL=en_US.UTF-8 /usr/bin/python3.12 /root/ansible/bin/ansible-test integration keycloak_group -v --allow-destructive --containers '{}' --allow-unsupported --truncate 120 --color yes --host-path tests/output/.tmp/host-w52xrjiy --metadata tests/output/.tmp/metadata-dgufm4ea.json" returned exit status 1.
Run command: docker stop --time 0 ansible-test-controller-w05jUWs4
Run command: docker rm ansible-test-controller-w05jUWs4

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch labels Feb 5, 2025
@felixfontein
Copy link
Collaborator

Thanks for your contribution!

You need the community.docker collection to run the keycloak integration tests (see ERROR! couldn't resolve module/action 'community.docker.docker_container').

@FabienSalles
Copy link
Author

Thanks for your reply.

How I can install it correctly for ansible integration tests ?

It is already installed on my computer but the error still persist :

general on 🐳 v27.3.1 (docker.sock) …
➜ ansible-galaxy collection install community.docker                                                                
Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.

general on 🐳 v27.3.1 (docker.sock) …
➜ ansible-galaxy collection install community.docker --force
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-4.3.1.tar.gz to /home/fsalles/.ansible/tmp/ansible-local-375385_8pxmj8z/tmpkcuvmf0h/community-docker-4.3.1-ijzp0_g1
Installing 'community.docker:4.3.1' to '/home/fsalles/.ansible/collections/ansible_collections/community/docker'
community.docker:4.3.1 was installed successfully
'community.library_inventory_filtering_v1:1.0.0' is already installed, skipping.

@felixfontein
Copy link
Collaborator

Ah, I missed that you're using --docker. Then you must have it installed in the same tree where the community.general checkout lives, i.e. if the c.g checkout is in /path/to/ansible_collections/community/general, community.docker needs to be in /path/to/ansible_collections/community/docker.

@FabienSalles
Copy link
Author

FabienSalles commented Feb 5, 2025

Thanks.

I have another issue now :

TASK [setup_docker : Start docker service] *************************************
"Unable to start service docker: A dependency job for docker.service failed. See 'journalctl -xe' for details.\n"

I don't know how to retrieve more useful information.

It seems docker installation does not work properly :

ASK [setup_docker : Install docker] *******************************************
task path: /root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_group-kr0v3ho3-ÅÑŚÌβŁÈ/tests/integration/targets/setup_docker/tasks/default.yml:10
Running ansible.legacy.apt
Using module file /root/ansible/lib/ansible/modules/apt.py
Pipelining is enabled.
<testhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<testhost> EXEC /bin/sh -c '/usr/bin/python3.12 && sleep 0'
changed: [testhost] => (item=docker.io) => {
    "ansible_loop_var": "item",
    "cache_update_time": 1738763002,
    "cache_updated": false,
    "changed": true,
    "diff": {},
    "invocation": {
        "module_args": {
            "allow_change_held_packages": false,
            "allow_downgrade": false,
            "allow_unauthenticated": false,
            "autoclean": false,
            "autoremove": false,
            "cache_valid_time": 0,
            "clean": false,
            "deb": null,
            "default_release": null,
            "dpkg_options": "force-confdef,force-confold",
            "fail_on_autoremove": false,
            "force": false,
            "force_apt_get": false,
            "install_recommends": null,
            "lock_timeout": 60,
            "name": "docker.io",
            "only_upgrade": false,
            "package": [
                "docker.io"
            ],
            "policy_rc_d": null,
            "purge": false,
            "state": "present",
            "update_cache": null,
            "update_cache_retries": 5,
            "update_cache_retry_max_delay": 12,
            "upgrade": null
        }
    },
    "item": "docker.io",
    "stderr": "debconf: delaying package configuration, since apt-utils is not installed\n",
    "stderr_lines": [
        "debconf: delaying package configuration, since apt-utils is not installed"
    ],
    "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n  apparmor bridge-utils containerd dbus dns-root-data dnsmasq-base iproute2\n  iptables libatm1 libcap2-bin libdbus-1-3 libelf1 libidn11 libip6tc2 libmnl0\n  libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libpam-cap libxtables12\n  netbase netcat netcat-openbsd pigz runc ubuntu-fan xz-utils\nSuggested packages:\n  apparmor-profiles-extra apparmor-utils ifupdown default-dbus-session-bus\n  | dbus-session-bus aufs-tools btrfs-progs cgroupfs-mount | cgroup-lite\n  debootstrap docker-buildx docker-compose-v2 docker-doc rinse zfs-fuse\n  | zfsutils iproute2-doc firewalld kmod nftables\nThe following NEW packages will be installed:\n  apparmor bridge-utils containerd dbus dns-root-data dnsmasq-base docker.io\n  iproute2 iptables libatm1 libcap2-bin libdbus-1-3 libelf1 libidn11 libip6tc2\n  libmnl0 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libpam-cap\n  libxtables12 netbase netcat netcat-openbsd pigz runc ubuntu-fan xz-utils\n0 upgraded, 28 newly installed, 0 to remove and 126 not upgraded.\nNeed to get 74.1 MB of archives.\nAfter this operation, 312 MB of additional disk space will be used.\nGet:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 pigz amd64 2.4-1 [57.4 kB]\nGet:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdbus-1-3 amd64 1.12.16-2ubuntu2.3 [179 kB]\nGet:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dbus amd64 1.12.16-2ubuntu2.3 [151 kB]\nGet:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libelf1 amd64 0.176-1.1ubuntu0.1 [44.2 kB]\nGet:5 http://archive.ubuntu.com/ubuntu focal/main amd64 libmnl0 amd64 1.0.4-2 [12.3 kB]\nGet:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxtables12 amd64 1.8.4-3ubuntu2.1 [28.7 kB]\nGet:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcap2-bin amd64 1:2.32-1ubuntu0.1 [26.2 kB]\nGet:8 http://archive.ubuntu.com/ubuntu focal/main amd64 iproute2 amd64 5.5.0-1ubuntu1 [858 kB]\nGet:9 http://archive.ubuntu.com/ubuntu focal/main amd64 libatm1 amd64 1:2.5.1-4 [21.8 kB]\nGet:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libpam-cap amd64 1:2.32-1ubuntu0.1 [8364 B]\nGet:11 http://archive.ubuntu.com/ubuntu focal/main amd64 netbase all 6.1 [13.1 kB]\nGet:12 http://archive.ubuntu.com/ubuntu focal/main amd64 netcat-openbsd amd64 1.206-1ubuntu1 [37.8 kB]\nGet:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 xz-utils amd64 5.2.4-1ubuntu1.1 [82.6 kB]\nGet:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 apparmor amd64 2.13.3-7ubuntu5.4 [505 kB]\nGet:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libip6tc2 amd64 1.8.4-3ubuntu2.1 [19.4 kB]\nGet:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libnfnetlink0 amd64 1.0.1-3build1 [13.8 kB]\nGet:17 http://archive.ubuntu.com/ubuntu focal/main amd64 libnetfilter-conntrack3 amd64 1.0.7-2 [41.4 kB]\nGet:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libnftnl11 amd64 1.1.5-1 [57.8 kB]\nGet:19 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 iptables amd64 1.8.4-3ubuntu2.1 [390 kB]\nGet:20 http://archive.ubuntu.com/ubuntu focal/main amd64 bridge-utils amd64 1.6-2ubuntu1 [30.5 kB]\nGet:21 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 runc amd64 1.1.12-0ubuntu2~20.04.1 [8066 kB]\nGet:22 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 containerd amd64 1.7.24-0ubuntu1~20.04.1 [33.6 MB]\nGet:23 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dns-root-data all 2023112702~ubuntu0.20.04.1 [5308 B]\nGet:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libidn11 amd64 1.33-2.2ubuntu2 [46.2 kB]\nGet:25 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dnsmasq-base amd64 2.90-0ubuntu0.20.04.1 [350 kB]\nGet:26 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 docker.io amd64 26.1.3-0ubuntu1~20.04.1 [29.5 MB]\nGet:27 http://archive.ubuntu.com/ubuntu focal/universe amd64 netcat all 1.206-1ubuntu1 [2172 B]\nGet:28 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ubuntu-fan all 0.12.13ubuntu0.1 [34.4 kB]\nFetched 74.1 MB in 9s (8325 kB/s)\nSelecting previously unselected package pigz.\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 ... 22952 files and directories currently installed.)\r\nPreparing to unpack .../00-pigz_2.4-1_amd64.deb ...\r\nUnpacking pigz (2.4-1) ...\r\nSelecting previously unselected package libdbus-1-3:amd64.\r\nPreparing to unpack .../01-libdbus-1-3_1.12.16-2ubuntu2.3_amd64.deb ...\r\nUnpacking libdbus-1-3:amd64 (1.12.16-2ubuntu2.3) ...\r\nSelecting previously unselected package dbus.\r\nPreparing to unpack .../02-dbus_1.12.16-2ubuntu2.3_amd64.deb ...\r\nUnpacking dbus (1.12.16-2ubuntu2.3) ...\r\nSelecting previously unselected package libelf1:amd64.\r\nPreparing to unpack .../03-libelf1_0.176-1.1ubuntu0.1_amd64.deb ...\r\nUnpacking libelf1:amd64 (0.176-1.1ubuntu0.1) ...\r\nSelecting previously unselected package libmnl0:amd64.\r\nPreparing to unpack .../04-libmnl0_1.0.4-2_amd64.deb ...\r\nUnpacking libmnl0:amd64 (1.0.4-2) ...\r\nSelecting previously unselected package libxtables12:amd64.\r\nPreparing to unpack .../05-libxtables12_1.8.4-3ubuntu2.1_amd64.deb ...\r\nUnpacking libxtables12:amd64 (1.8.4-3ubuntu2.1) ...\r\nSelecting previously unselected package libcap2-bin.\r\nPreparing to unpack .../06-libcap2-bin_1%3a2.32-1ubuntu0.1_amd64.deb ...\r\nUnpacking libcap2-bin (1:2.32-1ubuntu0.1) ...\r\nSelecting previously unselected package iproute2.\r\nPreparing to unpack .../07-iproute2_5.5.0-1ubuntu1_amd64.deb ...\r\nUnpacking iproute2 (5.5.0-1ubuntu1) ...\r\nSelecting previously unselected package libatm1:amd64.\r\nPreparing to unpack .../08-libatm1_1%3a2.5.1-4_amd64.deb ...\r\nUnpacking libatm1:amd64 (1:2.5.1-4) ...\r\nSelecting previously unselected package libpam-cap:amd64.\r\nPreparing to unpack .../09-libpam-cap_1%3a2.32-1ubuntu0.1_amd64.deb ...\r\nUnpacking libpam-cap:amd64 (1:2.32-1ubuntu0.1) ...\r\nSelecting previously unselected package netbase.\r\nPreparing to unpack .../10-netbase_6.1_all.deb ...\r\nUnpacking netbase (6.1) ...\r\nSelecting previously unselected package netcat-openbsd.\r\nPreparing to unpack .../11-netcat-openbsd_1.206-1ubuntu1_amd64.deb ...\r\nUnpacking netcat-openbsd (1.206-1ubuntu1) ...\r\nSelecting previously unselected package xz-utils.\r\nPreparing to unpack .../12-xz-utils_5.2.4-1ubuntu1.1_amd64.deb ...\r\nUnpacking xz-utils (5.2.4-1ubuntu1.1) ...\r\nSelecting previously unselected package apparmor.\r\nPreparing to unpack .../13-apparmor_2.13.3-7ubuntu5.4_amd64.deb ...\r\nUnpacking apparmor (2.13.3-7ubuntu5.4) ...\r\nSelecting previously unselected package libip6tc2:amd64.\r\nPreparing to unpack .../14-libip6tc2_1.8.4-3ubuntu2.1_amd64.deb ...\r\nUnpacking libip6tc2:amd64 (1.8.4-3ubuntu2.1) ...\r\nSelecting previously unselected package libnfnetlink0:amd64.\r\nPreparing to unpack .../15-libnfnetlink0_1.0.1-3build1_amd64.deb ...\r\nUnpacking libnfnetlink0:amd64 (1.0.1-3build1) ...\r\nSelecting previously unselected package libnetfilter-conntrack3:amd64.\r\nPreparing to unpack .../16-libnetfilter-conntrack3_1.0.7-2_amd64.deb ...\r\nUnpacking libnetfilter-conntrack3:amd64 (1.0.7-2) ...\r\nSelecting previously unselected package libnftnl11:amd64.\r\nPreparing to unpack .../17-libnftnl11_1.1.5-1_amd64.deb ...\r\nUnpacking libnftnl11:amd64 (1.1.5-1) ...\r\nSelecting previously unselected package iptables.\r\nPreparing to unpack .../18-iptables_1.8.4-3ubuntu2.1_amd64.deb ...\r\nUnpacking iptables (1.8.4-3ubuntu2.1) ...\r\nSelecting previously unselected package bridge-utils.\r\nPreparing to unpack .../19-bridge-utils_1.6-2ubuntu1_amd64.deb ...\r\nUnpacking bridge-utils (1.6-2ubuntu1) ...\r\nSelecting previously unselected package runc.\r\nPreparing to unpack .../20-runc_1.1.12-0ubuntu2~20.04.1_amd64.deb ...\r\nUnpacking runc (1.1.12-0ubuntu2~20.04.1) ...\r\nSelecting previously unselected package containerd.\r\nPreparing to unpack .../21-containerd_1.7.24-0ubuntu1~20.04.1_amd64.deb ...\r\nUnpacking containerd (1.7.24-0ubuntu1~20.04.1) ...\r\nSelecting previously unselected package dns-root-data.\r\nPreparing to unpack .../22-dns-root-data_2023112702~ubuntu0.20.04.1_all.deb ...\r\nUnpacking dns-root-data (2023112702~ubuntu0.20.04.1) ...\r\nSelecting previously unselected package libidn11:amd64.\r\nPreparing to unpack .../23-libidn11_1.33-2.2ubuntu2_amd64.deb ...\r\nUnpacking libidn11:amd64 (1.33-2.2ubuntu2) ...\r\nSelecting previously unselected package dnsmasq-base.\r\nPreparing to unpack .../24-dnsmasq-base_2.90-0ubuntu0.20.04.1_amd64.deb ...\r\nUnpacking dnsmasq-base (2.90-0ubuntu0.20.04.1) ...\r\nSelecting previously unselected package docker.io.\r\nPreparing to unpack .../25-docker.io_26.1.3-0ubuntu1~20.04.1_amd64.deb ...\r\nUnpacking docker.io (26.1.3-0ubuntu1~20.04.1) ...\r\nSelecting previously unselected package netcat.\r\nPreparing to unpack .../26-netcat_1.206-1ubuntu1_all.deb ...\r\nUnpacking netcat (1.206-1ubuntu1) ...\r\nSelecting previously unselected package ubuntu-fan.\r\nPreparing to unpack .../27-ubuntu-fan_0.12.13ubuntu0.1_all.deb ...\r\nUnpacking ubuntu-fan (0.12.13ubuntu0.1) ...\r\nSetting up libip6tc2:amd64 (1.8.4-3ubuntu2.1) ...\r\nSetting up netcat-openbsd (1.206-1ubuntu1) ...\r\nupdate-alternatives: using /bin/nc.openbsd to provide /bin/nc (nc) in auto mode\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/nc.1.gz because associated file /usr/share/man/man1/nc_openbsd.1.gz (of link group nc) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/netcat.1.gz because associated file /usr/share/man/man1/nc_openbsd.1.gz (of link group nc) doesn't exist\r\nSetting up netcat (1.206-1ubuntu1) ...\r\nSetting up libatm1:amd64 (1:2.5.1-4) ...\r\nSetting up runc (1.1.12-0ubuntu2~20.04.1) ...\r\nSetting up dns-root-data (2023112702~ubuntu0.20.04.1) ...\r\nSetting up libcap2-bin (1:2.32-1ubuntu0.1) ...\r\nSetting up apparmor (2.13.3-7ubuntu5.4) ...\r\nCreated symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service.\r\nSetting up libidn11:amd64 (1.33-2.2ubuntu2) ...\r\nSetting up libdbus-1-3:amd64 (1.12.16-2ubuntu2.3) ...\r\nSetting up dbus (1.12.16-2ubuntu2.3) ...\r\nSetting up xz-utils (5.2.4-1ubuntu1.1) ...\r\nupdate-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist\r\nupdate-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist\r\nSetting up libmnl0:amd64 (1.0.4-2) ...\r\nSetting up libxtables12:amd64 (1.8.4-3ubuntu2.1) ...\r\nSetting up bridge-utils (1.6-2ubuntu1) ...\r\nSetting up pigz (2.4-1) ...\r\nSetting up libnfnetlink0:amd64 (1.0.1-3build1) ...\r\nSetting up netbase (6.1) ...\r\nSetting up containerd (1.7.24-0ubuntu1~20.04.1) ...\r\nCreated symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.\r\nSetting up libelf1:amd64 (0.176-1.1ubuntu0.1) ...\r\nSetting up libpam-cap:amd64 (1:2.32-1ubuntu0.1) ...\r\nSetting up iproute2 (5.5.0-1ubuntu1) ...\r\nSetting up libnftnl11:amd64 (1.1.5-1) ...\r\nSetting up libnetfilter-conntrack3:amd64 (1.0.7-2) ...\r\nSetting up iptables (1.8.4-3ubuntu2.1) ...\r\nupdate-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode\r\nupdate-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode\r\nupdate-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode\r\nupdate-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode\r\nSetting up docker.io (26.1.3-0ubuntu1~20.04.1) ...\r\nAdding group `docker' (GID 107) ...\r\nDone.\r\nCreated symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.\r\nCreated symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.\r\nA dependency job for docker.service failed. See '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 (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)\r\n     Active: inactive (dead)\r\nTriggeredBy: ● docker.socket\r\n       Docs: https://docs.docker.com\r\n\r\nFeb 05 13:43:41 ff31d8626efd systemd[1]: Dependency failed for Docker Application Container Engine.\r\nFeb 05 13:43:41 ff31d8626efd systemd[1]: docker.service: Job docker.service/start failed with result 'dependency'.\r\nSetting up dnsmasq-base (2.90-0ubuntu0.20.04.1) ...\r\nSetting up ubuntu-fan (0.12.13ubuntu0.1) ...\r\nCreated symlink /etc/systemd/system/multi-user.target.wants/ubuntu-fan.service → /lib/systemd/system/ubuntu-fan.service.\r\nProcessing triggers for systemd (245.4-4ubuntu3.22) ...\r\nProcessing triggers for libc-bin (2.31-0ubuntu9.9) ...\r\nProcessing triggers for dbus (1.12.16-2ubuntu2.3) ...\r\n",
    "stdout_lines": [
        "Reading package lists...",
        "Building dependency tree...",
        "Reading state information...",
        "The following additional packages will be installed:",
        "  apparmor bridge-utils containerd dbus dns-root-data dnsmasq-base iproute2",
        "  iptables libatm1 libcap2-bin libdbus-1-3 libelf1 libidn11 libip6tc2 libmnl0",
        "  libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libpam-cap libxtables12",
        "  netbase netcat netcat-openbsd pigz runc ubuntu-fan xz-utils",
        "Suggested packages:",
        "  apparmor-profiles-extra apparmor-utils ifupdown default-dbus-session-bus",
        "  | dbus-session-bus aufs-tools btrfs-progs cgroupfs-mount | cgroup-lite",
        "  debootstrap docker-buildx docker-compose-v2 docker-doc rinse zfs-fuse",
        "  | zfsutils iproute2-doc firewalld kmod nftables",
        "The following NEW packages will be installed:",
        "  apparmor bridge-utils containerd dbus dns-root-data dnsmasq-base docker.io",
        "  iproute2 iptables libatm1 libcap2-bin libdbus-1-3 libelf1 libidn11 libip6tc2",
        "  libmnl0 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 libpam-cap",
        "  libxtables12 netbase netcat netcat-openbsd pigz runc ubuntu-fan xz-utils",
        "0 upgraded, 28 newly installed, 0 to remove and 126 not upgraded.",
        "Need to get 74.1 MB of archives.",
        "After this operation, 312 MB of additional disk space will be used.",
        "Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 pigz amd64 2.4-1 [57.4 kB]",
        "Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdbus-1-3 amd64 1.12.16-2ubuntu2.3 [179 kB]",
        "Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dbus amd64 1.12.16-2ubuntu2.3 [151 kB]",
        "Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libelf1 amd64 0.176-1.1ubuntu0.1 [44.2 kB]",
        "Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 libmnl0 amd64 1.0.4-2 [12.3 kB]",
        "Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxtables12 amd64 1.8.4-3ubuntu2.1 [28.7 kB]",
        "Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcap2-bin amd64 1:2.32-1ubuntu0.1 [26.2 kB]",
        "Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 iproute2 amd64 5.5.0-1ubuntu1 [858 kB]",
        "Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 libatm1 amd64 1:2.5.1-4 [21.8 kB]",
        "Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libpam-cap amd64 1:2.32-1ubuntu0.1 [8364 B]",
        "Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 netbase all 6.1 [13.1 kB]",
        "Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 netcat-openbsd amd64 1.206-1ubuntu1 [37.8 kB]",
        "Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 xz-utils amd64 5.2.4-1ubuntu1.1 [82.6 kB]",
        "Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 apparmor amd64 2.13.3-7ubuntu5.4 [505 kB]",
        "Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libip6tc2 amd64 1.8.4-3ubuntu2.1 [19.4 kB]",
        "Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libnfnetlink0 amd64 1.0.1-3build1 [13.8 kB]",
        "Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 libnetfilter-conntrack3 amd64 1.0.7-2 [41.4 kB]",
        "Get:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libnftnl11 amd64 1.1.5-1 [57.8 kB]",
        "Get:19 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 iptables amd64 1.8.4-3ubuntu2.1 [390 kB]",
        "Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 bridge-utils amd64 1.6-2ubuntu1 [30.5 kB]",
        "Get:21 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 runc amd64 1.1.12-0ubuntu2~20.04.1 [8066 kB]",
        "Get:22 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 containerd amd64 1.7.24-0ubuntu1~20.04.1 [33.6 MB]",
        "Get:23 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dns-root-data all 2023112702~ubuntu0.20.04.1 [5308 B]",
        "Get:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libidn11 amd64 1.33-2.2ubuntu2 [46.2 kB]",
        "Get:25 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dnsmasq-base amd64 2.90-0ubuntu0.20.04.1 [350 kB]",
        "Get:26 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 docker.io amd64 26.1.3-0ubuntu1~20.04.1 [29.5 MB]",
        "Get:27 http://archive.ubuntu.com/ubuntu focal/universe amd64 netcat all 1.206-1ubuntu1 [2172 B]",
        "Get:28 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ubuntu-fan all 0.12.13ubuntu0.1 [34.4 kB]",
        "Fetched 74.1 MB in 9s (8325 kB/s)",
        "Selecting previously unselected package pigz.",
        "(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 ... 22952 files and directories currently installed.)",
        "Preparing to unpack .../00-pigz_2.4-1_amd64.deb ...",
        "Unpacking pigz (2.4-1) ...",
        "Selecting previously unselected package libdbus-1-3:amd64.",
        "Preparing to unpack .../01-libdbus-1-3_1.12.16-2ubuntu2.3_amd64.deb ...",
        "Unpacking libdbus-1-3:amd64 (1.12.16-2ubuntu2.3) ...",
        "Selecting previously unselected package dbus.",
        "Preparing to unpack .../02-dbus_1.12.16-2ubuntu2.3_amd64.deb ...",
        "Unpacking dbus (1.12.16-2ubuntu2.3) ...",
        "Selecting previously unselected package libelf1:amd64.",
        "Preparing to unpack .../03-libelf1_0.176-1.1ubuntu0.1_amd64.deb ...",
        "Unpacking libelf1:amd64 (0.176-1.1ubuntu0.1) ...",
        "Selecting previously unselected package libmnl0:amd64.",
        "Preparing to unpack .../04-libmnl0_1.0.4-2_amd64.deb ...",
        "Unpacking libmnl0:amd64 (1.0.4-2) ...",
        "Selecting previously unselected package libxtables12:amd64.",
        "Preparing to unpack .../05-libxtables12_1.8.4-3ubuntu2.1_amd64.deb ...",
        "Unpacking libxtables12:amd64 (1.8.4-3ubuntu2.1) ...",
        "Selecting previously unselected package libcap2-bin.",
        "Preparing to unpack .../06-libcap2-bin_1%3a2.32-1ubuntu0.1_amd64.deb ...",
        "Unpacking libcap2-bin (1:2.32-1ubuntu0.1) ...",
        "Selecting previously unselected package iproute2.",
        "Preparing to unpack .../07-iproute2_5.5.0-1ubuntu1_amd64.deb ...",
        "Unpacking iproute2 (5.5.0-1ubuntu1) ...",
        "Selecting previously unselected package libatm1:amd64.",
        "Preparing to unpack .../08-libatm1_1%3a2.5.1-4_amd64.deb ...",
        "Unpacking libatm1:amd64 (1:2.5.1-4) ...",
        "Selecting previously unselected package libpam-cap:amd64.",
        "Preparing to unpack .../09-libpam-cap_1%3a2.32-1ubuntu0.1_amd64.deb ...",
        "Unpacking libpam-cap:amd64 (1:2.32-1ubuntu0.1) ...",
        "Selecting previously unselected package netbase.",
        "Preparing to unpack .../10-netbase_6.1_all.deb ...",
        "Unpacking netbase (6.1) ...",
        "Selecting previously unselected package netcat-openbsd.",
        "Preparing to unpack .../11-netcat-openbsd_1.206-1ubuntu1_amd64.deb ...",
        "Unpacking netcat-openbsd (1.206-1ubuntu1) ...",
        "Selecting previously unselected package xz-utils.",
        "Preparing to unpack .../12-xz-utils_5.2.4-1ubuntu1.1_amd64.deb ...",
        "Unpacking xz-utils (5.2.4-1ubuntu1.1) ...",
        "Selecting previously unselected package apparmor.",
        "Preparing to unpack .../13-apparmor_2.13.3-7ubuntu5.4_amd64.deb ...",
        "Unpacking apparmor (2.13.3-7ubuntu5.4) ...",
        "Selecting previously unselected package libip6tc2:amd64.",
        "Preparing to unpack .../14-libip6tc2_1.8.4-3ubuntu2.1_amd64.deb ...",
        "Unpacking libip6tc2:amd64 (1.8.4-3ubuntu2.1) ...",
        "Selecting previously unselected package libnfnetlink0:amd64.",
        "Preparing to unpack .../15-libnfnetlink0_1.0.1-3build1_amd64.deb ...",
        "Unpacking libnfnetlink0:amd64 (1.0.1-3build1) ...",
        "Selecting previously unselected package libnetfilter-conntrack3:amd64.",
        "Preparing to unpack .../16-libnetfilter-conntrack3_1.0.7-2_amd64.deb ...",
        "Unpacking libnetfilter-conntrack3:amd64 (1.0.7-2) ...",
        "Selecting previously unselected package libnftnl11:amd64.",
        "Preparing to unpack .../17-libnftnl11_1.1.5-1_amd64.deb ...",
        "Unpacking libnftnl11:amd64 (1.1.5-1) ...",
        "Selecting previously unselected package iptables.",
        "Preparing to unpack .../18-iptables_1.8.4-3ubuntu2.1_amd64.deb ...",
        "Unpacking iptables (1.8.4-3ubuntu2.1) ...",
        "Selecting previously unselected package bridge-utils.",
        "Preparing to unpack .../19-bridge-utils_1.6-2ubuntu1_amd64.deb ...",
        "Unpacking bridge-utils (1.6-2ubuntu1) ...",
        "Selecting previously unselected package runc.",
        "Preparing to unpack .../20-runc_1.1.12-0ubuntu2~20.04.1_amd64.deb ...",
        "Unpacking runc (1.1.12-0ubuntu2~20.04.1) ...",
        "Selecting previously unselected package containerd.",
        "Preparing to unpack .../21-containerd_1.7.24-0ubuntu1~20.04.1_amd64.deb ...",
        "Unpacking containerd (1.7.24-0ubuntu1~20.04.1) ...",
        "Selecting previously unselected package dns-root-data.",
        "Preparing to unpack .../22-dns-root-data_2023112702~ubuntu0.20.04.1_all.deb ...",
        "Unpacking dns-root-data (2023112702~ubuntu0.20.04.1) ...",
        "Selecting previously unselected package libidn11:amd64.",
        "Preparing to unpack .../23-libidn11_1.33-2.2ubuntu2_amd64.deb ...",
        "Unpacking libidn11:amd64 (1.33-2.2ubuntu2) ...",
        "Selecting previously unselected package dnsmasq-base.",
        "Preparing to unpack .../24-dnsmasq-base_2.90-0ubuntu0.20.04.1_amd64.deb ...",
        "Unpacking dnsmasq-base (2.90-0ubuntu0.20.04.1) ...",
        "Selecting previously unselected package docker.io.",
        "Preparing to unpack .../25-docker.io_26.1.3-0ubuntu1~20.04.1_amd64.deb ...",
        "Unpacking docker.io (26.1.3-0ubuntu1~20.04.1) ...",
        "Selecting previously unselected package netcat.",
        "Preparing to unpack .../26-netcat_1.206-1ubuntu1_all.deb ...",
        "Unpacking netcat (1.206-1ubuntu1) ...",
        "Selecting previously unselected package ubuntu-fan.",
        "Preparing to unpack .../27-ubuntu-fan_0.12.13ubuntu0.1_all.deb ...",
        "Unpacking ubuntu-fan (0.12.13ubuntu0.1) ...",
        "Setting up libip6tc2:amd64 (1.8.4-3ubuntu2.1) ...",
        "Setting up netcat-openbsd (1.206-1ubuntu1) ...",
        "update-alternatives: using /bin/nc.openbsd to provide /bin/nc (nc) in auto mode",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/nc.1.gz because associated file /usr/share/man/man1/nc_openbsd.1.gz (of link group nc) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/netcat.1.gz because associated file /usr/share/man/man1/nc_openbsd.1.gz (of link group nc) doesn't exist",
        "Setting up netcat (1.206-1ubuntu1) ...",
        "Setting up libatm1:amd64 (1:2.5.1-4) ...",
        "Setting up runc (1.1.12-0ubuntu2~20.04.1) ...",
        "Setting up dns-root-data (2023112702~ubuntu0.20.04.1) ...",
        "Setting up libcap2-bin (1:2.32-1ubuntu0.1) ...",
        "Setting up apparmor (2.13.3-7ubuntu5.4) ...",
        "Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service.",
        "Setting up libidn11:amd64 (1.33-2.2ubuntu2) ...",
        "Setting up libdbus-1-3:amd64 (1.12.16-2ubuntu2.3) ...",
        "Setting up dbus (1.12.16-2ubuntu2.3) ...",
        "Setting up xz-utils (5.2.4-1ubuntu1.1) ...",
        "update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist",
        "update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist",
        "Setting up libmnl0:amd64 (1.0.4-2) ...",
        "Setting up libxtables12:amd64 (1.8.4-3ubuntu2.1) ...",
        "Setting up bridge-utils (1.6-2ubuntu1) ...",
        "Setting up pigz (2.4-1) ...",
        "Setting up libnfnetlink0:amd64 (1.0.1-3build1) ...",
        "Setting up netbase (6.1) ...",
        "Setting up containerd (1.7.24-0ubuntu1~20.04.1) ...",
        "Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.",
        "Setting up libelf1:amd64 (0.176-1.1ubuntu0.1) ...",
        "Setting up libpam-cap:amd64 (1:2.32-1ubuntu0.1) ...",
        "Setting up iproute2 (5.5.0-1ubuntu1) ...",
        "Setting up libnftnl11:amd64 (1.1.5-1) ...",
        "Setting up libnetfilter-conntrack3:amd64 (1.0.7-2) ...",
        "Setting up iptables (1.8.4-3ubuntu2.1) ...",
        "update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode",
        "update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode",
        "update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode",
        "update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode",
        "Setting up docker.io (26.1.3-0ubuntu1~20.04.1) ...",
        "Adding group `docker' (GID 107) ...",
        "Done.",
        "Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.",
        "Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.",
        "A dependency job for docker.service failed. See 'journalctl -xe' for details.",
        "invoke-rc.d: initscript docker, action \"start\" failed.",
        "● docker.service - Docker Application Container Engine",
        "     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)",
        "     Active: inactive (dead)",
        "TriggeredBy: ● docker.socket",
        "       Docs: https://docs.docker.com",
        "",
        "Feb 05 13:43:41 ff31d8626efd systemd[1]: Dependency failed for Docker Application Container Engine.",
        "Feb 05 13:43:41 ff31d8626efd systemd[1]: docker.service: Job docker.service/start failed with result 'dependency'.",
        "Setting up dnsmasq-base (2.90-0ubuntu0.20.04.1) ...",
        "Setting up ubuntu-fan (0.12.13ubuntu0.1) ...",
        "Created symlink /etc/systemd/system/multi-user.target.wants/ubuntu-fan.service → /lib/systemd/system/ubuntu-fan.service.",
        "Processing triggers for systemd (245.4-4ubuntu3.22) ...",
        "Processing triggers for libc-bin (2.31-0ubuntu9.9) ...",
        "Processing triggers for dbus (1.12.16-2ubuntu2.3) ..."
    ]
}

@russoz
Copy link
Collaborator

russoz commented Feb 6, 2025

Hi @FabienSalles

when you pass --docker default in the command line, that means the entire test will execute within a docker container. Now as part of this test, as you have noticed, it tries to install docker then run a keycloak container, inside the test container. It uses setup_docker for that - which I wrote - and it's been a while but I am pretty sure I did not consider that scenario (running docker inside docker). It was rather designed to run docker from a VM instead.

If I may suggest, give it a try to andebox by yours truly:

https://pypi.org/project/andebox/

You can run this somewhat easily in your local machine using vagrant by simply running:

$ andebox vagrant -n ubuntu-noble -s -- --allow-unsupported keycloak_group

In fact I have just executed this (on the main branch, so not testing your PR at the moment) and other than the violent aggression to the swap partitions of my old laptop, everything ran just fine. ;-)

Naturally you will need vagrant installed and you will have to create your Vagrantfile at the project dir (do not commit that file). Mine looks like this for the ubuntu part, YMMV:

  config.vm.define "ubuntu-noble" do |noble|   # Ubuntu 24.04
    noble.vm.hostname = 'ubuntu-noble'
    noble.vm.box = "jcpetro97/ubuntu2404"
    noble.vm.synced_folder ".", "/vagrant", rsync__exclude: ['.tox/', '.git/', '.vagrant']
    noble.vm.provider "virtualbox" do |vb|
      vb.customize ["modifyvm", :id, "--audio", "none"]
      vb.customize ["modifyvm", :id, "--memory", "4096"]
    end
    noble.vm.provision "shell", inline: <<-SHELL
      apt-get -y update
      apt-get -y install python3-pip virtualenv python3-venv
      virtualenv --python 3 /venv
      /venv/bin/pip install -U pip setuptools
      /venv/bin/pip install andebox ansible-core decorator
    SHELL
  end

@FabienSalles
Copy link
Author

@russoz thank you a lot for the explanation

I managed to get the tests to work but :

  • I'm forced to destroy the VM after each execution otherwise the tests crashed
  • test execution is really long (4 min each time)
  • and now, all tests passed even if I removed my fix and I added tests to highlight the bug (see below my tests)

To finish, I don't think integration tests are the best place to test this.
There are already tests that call the corresponding API, I should create a unit test to verify that I am using and sending the parameter correctly in the api call, but my poor knowledge of python prevents me from doing it.

I'm sorry, I don't think I'll have time to go any further.
I don't know your criteria for merging the PR but the CI passed, I didn't break anything and my fix unblocked my client.

Would it be possible to stop there?

Tanks again for your time (you to @felixfontein 🙏)

See below my Ansible integration tests which should fail (for the update case) but pass even if I remove my fix :

- name: Create more than 10 sub groups using parent name
  community.general.keycloak_group:
    auth_keycloak_url: "{{ url }}"
    auth_realm: "{{ admin_realm }}"
    auth_username: "{{ admin_user }}"
    auth_password: "{{ admin_password }}"
    realm: "{{ realm }}"
    name: "subgrp{{ item }}"
    parents:
      - name: rootgrp
  loop: "{{ range(0, 12)|list }}"
  register: result

- name: Assert that subgroup was correctly created
  assert:
    that:
      - item is not failed
  loop: "{{ result.results }}"

- name: Update more than 10 sub groups using parent name
  community.general.keycloak_group:
    auth_keycloak_url: "{{ url }}"
    auth_realm: "{{ admin_realm }}"
    auth_username: "{{ admin_user }}"
    auth_password: "{{ admin_password }}"
    realm: "{{ realm }}"
    name: "subgrp{{ item }}"
    parents:
      - name: rootgrp
  loop: "{{ range(0, 12)|list }}"
  register: result

- name: Assert that subgroup was correctly updated
  assert:
    that:
      - item is not failed
  loop: "{{ result.results }}"

@russoz
Copy link
Collaborator

russoz commented Feb 7, 2025

Hi @FabienSalles if you don't mind, keep the PR open (and don't delete the branch), we can take this slowly - no rush from our side. About your initial comments:

  • Need to destroy the VM: 99.9% of the times, that derives from tests that do not clean up after themselves. In this case I find it a bit weird because, in theory, keycloak is running inside a container, inside the VM, so if we kill the container and run the test again, it should be a new container. Maybe that is all that is missing, but I would need to verify that.
  • Test is long: well, need to break the eggs to make the omelette. A fresh VM running this test spends time: a) coming up, b) installing and configuring docker, then finally c) running the tests. If we can solve the previous item (VM restart) this is bound to go down, but nonetheless I believe it will still be somewhat long.
  • As it comes down to your change and how/if tests passed then all I can say is that it happens to all of us :-) but let's fix these other issues and we can take a closer look into it (again, no rush).

How does that sound to you?

@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch bug This issue/PR relates to a bug check-before-release PR will be looked at again shortly before release and merged if possible. identity module_utils module_utils new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review stale_ci CI is older than 7 days, rerun before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

community.general.keycloak_group: Unable to create/update more than 10 sub groups
4 participants