Comment 2 for bug 1996612

Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

While testing locally:
running the command to build things[1] launches apparently 99 processes such as:

/usr/bin/python3.9 /usr/bin/ansible-playbook -i /tmp/tripleos0h7wdgf/hosts.yaml -vvv /tmp/tripleos0h7wdgf/tripleo-multi-playbook.yaml

Now, the content of the files involved here isn't THAT weird imho - the playbook looks like:
- connection: local
  gather_facts: true
  hosts: localhost
  name: Generate localhost facts
- connection: local
  gather_facts: false
  hosts: all
  name: Generate container file(s)
  roles:
  - role: tripleo_container_image_build
  vars:
    tcib_args:
      TRIPLEO_ANSIBLE_REQ: /usr/share/openstack-tripleo-common-containers/container-images/kolla/tripleo-ansible-ee/requirements.yaml

which makes sense.

The inventory, on the other hand.... it explains why ansible tries to get the python_interpreter so many times[2]. I'm wondering if we couldn't pass the python interpreter as a host var via the inventory - especially since we're passing, right now, the tcib_python_version to the CLI... Maybe something to consider?

In any cases: the build is stuck here. Nothing is showing up in the log. The last line therein is:
2022-11-15 13:50:32,019 p=68068 u=stack n=ansible | <designate-backend-bind9> EXEC /bin/sh -c '/usr/bin/python3.9 && sleep 0'

and it's been like that for the time it took to make this comment here - over 7 minutes (with data gathering and so on).

The ansible.log is in the same state, so it's not doing things in the background I'd say... And the process listing doesn't show anything like that.

I see the following possibilities:
- either ensure we're not running too many things in parallel with the second "playbook" (using "serial: X" option)
- see what happens if we pass the ansible_python_interpreter to the inventory
- ... any other ideas?

[1] openstack tripleo container image build \
        --base registry.access.redhat.com/ubi9:latest \
        --debug --distro centos \
        --exclude neutron-mlnx-agent \
        --extra-config /home/stack/extra_config.yaml \
        --namespace tripleomastercentos9 \
        --prefix openstack \
        --push --registry 127.0.0.1:5000 \
        --tag adaac75f69ae93d6ae76ee320b90dc0a \
        --volume /etc/yum.repos.d:/etc/distro.repos.d:z \
        --volume /etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z \
        --volume /etc/dnf/vars:/etc/dnf/vars:z \
        --work-dir /home/stack/container-builds \
        --tcib-extras tcib_release=9 \
        --tcib-extras tcib_python_version=3.9 >/home/stack/container_image_build.log 2>&1

all:
  hosts:
    aodh-api:
      ansible_connection: local
      tcib_actions:
      - run: dnf -y install {{ tcib_packages.common | join(' ') }} && dnf clean all
          && rm -rf /var/cache/dnf
      - run: mkdir -p /var/www/cgi-bin/aodh && chmod 755 /var/www/cgi-bin/aodh &&
          cp -a /usr/bin/aodh-api /var/www/cgi-bin/aodh/ && sed -i -r 's,^(Listen
          80),#\1,' /etc/httpd/conf/httpd.conf && sed -i -r 's,^(Listen 443),#\1,'
          /etc/httpd/conf.d/ssl.conf
      - run: ln -s /usr/share/openstack-tripleo-common/healthcheck/aodh-api /openstack/healthcheck
          && chmod a+rx /openstack/healthcheck
      tcib_distro: centos
      tcib_from: 127.0.0.1:5000/tripleomastercentos9/openstack-aodh-base:adaac75f69ae93d6ae76ee320b90dc0a
      tcib_meta:
        name: aodh-api
      tcib_packages:
        common:
        - httpd
        - mod_ssl
        - openstack-aodh-api
        - python3-ldappool
        - python3-mod_wsgi
      tcib_path: /home/stack/container-builds/b53ac1db-40c7-40b1-bf9d-7fb3d1b10afc/base/os/aodh-base/aodh-api
      tcib_python_version: '3.9'
      tcib_release: '9'
      workdir: /home/stack/container-builds/b53ac1db-40c7-40b1-bf9d-7fb3d1b10afc/base/os/aodh-base/aodh-api
    aodh-base:
      ansible_connection: local
      tcib_actions:
      - run: bash /usr/local/bin/uid_gid_manage aodh
      - run: dnf -y install {{ tcib_packages.common | join(' ') }} && dnf clean all
          && rm -rf /var/cache/dnf
      tcib_distro: centos
      tcib_from: 127.0.0.1:5000/tripleomastercentos9/openstack-os:adaac75f69ae93d6ae76ee320b90dc0a
      tcib_meta:
        name: aodh-base
      tcib_packages:
        common:
        - openstack-aodh-common
      tcib_path: /home/stack/container-builds/b53ac1db-40c7-40b1-bf9d-7fb3d1b10afc/base/os/aodh-base
      tcib_python_version: '3.9'
      tcib_release: '9'
      workdir: /home/stack/container-builds/b53ac1db-40c7-40b1-bf9d-7fb3d1b10afc/base/os/aodh-base

[.....]