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

Unable to build an AWX Execution Enviroment including this collection #14

Open
josepaulog opened this issue Sep 25, 2024 · 0 comments
Open

Comments

@josepaulog
Copy link

josepaulog commented Sep 25, 2024

Summary

I'm attempting to create an AWX Execution Environment (EE) using AWX EE, but the build is failing because ansible-builder cannot locate the requirements.txt file.

It seems there's an issue with the collection that's not working properly with ansible-builder.

Component Name

ansible-builder

Ansible Version

ansible [core 2.16.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.12/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.3 (main, Jun 19 2024, 10:06:03) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] (/usr/bin/python3.12)
  jinja version = 3.1.2
  libyaml = True


ansible-builder --version
3.1.0

UM_Info Collection Version

# /usr/lib/python3.12/site-packages/ansible_collections
Collection                               Version
---------------------------------------- -------
amazon.aws                               7.2.0
ansible.netcommon                        5.3.0
ansible.posix                            1.5.4
ansible.utils                            2.12.0
ansible.windows                          2.2.0
arista.eos                               6.2.2
awx.awx                                  23.6.0
azure.azcollection                       1.19.0
check_point.mgmt                         5.2.2
chocolatey.chocolatey                    1.5.1
cisco.aci                                2.8.0
cisco.asa                                4.0.3
cisco.dnac                               6.10.2
cisco.intersight                         2.0.7
cisco.ios                                5.3.0
cisco.iosxr                              6.1.1
cisco.ise                                2.7.0
cisco.meraki                             2.17.2
cisco.mso                                2.5.0
cisco.nxos                               5.3.0
cisco.ucs                                1.10.0
cloud.common                             2.1.4
cloudscale_ch.cloud                      2.3.1
community.aws                            7.1.0
community.azure                          2.0.0
community.ciscosmb                       1.0.7
community.crypto                         2.17.1
community.digitalocean                   1.26.0
community.dns                            2.8.0
community.docker                         3.7.0
community.general                        8.3.0
community.grafana                        1.7.0
community.hashi_vault                    6.1.0
community.hrobot                         1.9.0
community.library_inventory_filtering_v1 1.0.0
community.libvirt                        1.3.0
community.mongodb                        1.6.3
community.mysql                          3.8.0
community.network                        5.0.2
community.okd                            2.3.0
community.postgresql                     3.3.0
community.proxysql                       1.5.1
community.rabbitmq                       1.2.3
community.routeros                       2.12.0
community.sap                            2.0.0
community.sap_libs                       1.4.2
community.sops                           1.6.7
community.vmware                         4.1.0
community.windows                        2.1.0
community.zabbix                         2.3.1
containers.podman                        1.11.0
cyberark.conjur                          1.2.2
cyberark.pas                             1.0.25
dellemc.enterprise_sonic                 2.4.0
dellemc.openmanage                       8.7.0
dellemc.powerflex                        2.1.0
dellemc.unity                            1.7.1
f5networks.f5_modules                    1.27.1
fortinet.fortimanager                    2.3.1
fortinet.fortios                         2.3.4
frr.frr                                  2.0.2
gluster.gluster                          1.0.2
google.cloud                             1.3.0
grafana.grafana                          2.2.4
hetzner.hcloud                           2.4.1
hpe.nimble                               1.1.4
ibm.qradar                               2.1.0
ibm.spectrum_virtualize                  2.0.0
ibm.storage_virtualize                   2.2.0
infinidat.infinibox                      1.3.12
infoblox.nios_modules                    1.6.1
inspur.ispim                             2.2.0
inspur.sm                                2.3.0
junipernetworks.junos                    5.3.1
kubernetes.core                          2.4.0
lowlydba.sqlserver                       2.2.2
microsoft.ad                             1.4.1
netapp.aws                               21.7.1
netapp.azure                             21.10.1
netapp.cloudmanager                      21.22.1
netapp.elementsw                         21.7.0
netapp.ontap                             22.9.0
netapp.storagegrid                       21.11.1
netapp.um_info                           21.8.1
netapp_eseries.santricity                1.4.0
netbox.netbox                            3.16.0
ngine_io.cloudstack                      2.3.0
ngine_io.exoscale                        1.1.0
openstack.cloud                          2.2.0
openvswitch.openvswitch                  2.1.1
ovirt.ovirt                              3.2.0
purestorage.flasharray                   1.26.0
purestorage.flashblade                   1.15.0
purestorage.fusion                       1.6.0
sensu.sensu_go                           1.14.0
splunk.es                                2.1.2
t_systems_mms.icinga_director            2.0.1
telekom_mms.icinga_director              1.35.0
theforeman.foreman                       3.15.0
vmware.vmware_rest                       2.3.1
vultr.cloud                              1.12.1
vyos.vyos                                4.1.0
wti.remote                               1.0.5

Playbook

It´s not a playbook issue.

Steps to Reproduce

Clone AWX EE repository https://github.com/ansible/awx-ee
Include the collection in execution-environment.yml
Build the image using ansible-builder

Expected Results

docker image built.

Actual Results

Ansible Builder is generating your execution environment build context.
File ./context/_build/requirements.yml is already up-to-date.
File ./context/_build/requirements.txt is already up-to-date.
File ./context/_build/bindep.txt is already up-to-date.
File context/_build/scripts/assemble is already up-to-date.
File context/_build/scripts/install-from-bindep is already up-to-date.
File context/_build/scripts/introspect.py is already up-to-date.
File context/_build/scripts/check_galaxy is already up-to-date.
File context/_build/scripts/check_ansible is already up-to-date.
File context/_build/scripts/pip_install is already up-to-date.
File context/_build/scripts/entrypoint is already up-to-date.
Ansible Builder is building your execution environment image. Tags: quay.io/josepaulo_gomes/awx-netapp-ee-2024-09-netapp
Running command:
  docker build -f ./context/Dockerfile -t quay.io/josepaulo_gomes/awx-netapp-ee-2024-09-netapp ./context
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
[1/4] STEP 1/17: FROM quay.io/centos/centos:stream9 AS base
[1/4] STEP 2/17: USER root
--> Using cache 4408c255b9d467d5c50bb02443939d89d7bbe17fad957f5562e279381f73a856
--> 4408c255b9d4
[1/4] STEP 3/17: ENV PIP_BREAK_SYSTEM_PACKAGES=1
--> Using cache 6b69aae72b7b5b0ed6262acfea962033fd521058ee70d595e657b30a25f537d2
--> 6b69aae72b7b
[1/4] STEP 4/17: ARG EE_BASE_IMAGE
--> Using cache 168339337b2f3640aeff6dc2f71aedfdf34d2566a1985a5abcca259d77c476cb
--> 168339337b2f
[1/4] STEP 5/17: ARG PYCMD
--> Using cache 6db84588bddf67e8887752c809c8428e7817a538ed4d0862f6e1b29f52214575
--> 6db84588bddf
[1/4] STEP 6/17: ARG PYPKG
--> Using cache 9f1aab533e4ae244856f2843a4785ab3e04a27c05cc739d21e8fe84be1681a46
--> 9f1aab533e4a
[1/4] STEP 7/17: ARG PKGMGR_PRESERVE_CACHE
--> Using cache 10f4d35ae48cfe7a962fa765d48c5c4896719e4d6162d9e7be8b8ea88810d247
--> 10f4d35ae48c
[1/4] STEP 8/17: ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS
--> Using cache 9344cf3fcdb68366f36af66a258194e005a7b21c53be66331c078b4276a15e51
--> 9344cf3fcdb6
[1/4] STEP 9/17: ARG ANSIBLE_GALAXY_CLI_ROLE_OPTS
--> Using cache c03060d60e944cfeab9fa9174df569b254d7dfc9ad6f5b8eb710448182ed3b47
--> c03060d60e94
[1/4] STEP 10/17: ARG ANSIBLE_INSTALL_REFS
--> Using cache 72eba22dd6f457b008db11c30239090e686e86f68c548f80be97599544a90b23
--> 72eba22dd6f4
[1/4] STEP 11/17: ARG PKGMGR
--> Using cache d734910bd96fa52525028be4b84f8d57417a60602fa806214392c1af39c5e5a1
--> d734910bd96f
[1/4] STEP 12/17: COPY _build/scripts/ /output/scripts/
--> Using cache 82942e1efffc6dcace76ac0854bcd36a0f008355c223d89f0342ca397f0c41f1
--> 82942e1efffc
[1/4] STEP 13/17: COPY _build/scripts/entrypoint /opt/builder/bin/entrypoint
--> Using cache d160105df9edc1c92fc2f27a4bd5cd1c90793e94cbaff4124ea4fb169fd5dba7
--> d160105df9ed
[1/4] STEP 14/17: RUN $PKGMGR install $PYPKG -y ; if [ -z $PKGMGR_PRESERVE_CACHE ]; then $PKGMGR clean all; fi
--> Using cache efbb0e995ea9d4196e56b5118c962f7ddf9c0c0665adda20c72771c07a084ef7
--> efbb0e995ea9
[1/4] STEP 15/17: RUN /output/scripts/pip_install $PYCMD
--> Using cache 37b40b3c451060f555f48f5fd70a9ad2c1743aa70d77683e5553c45db9d80d63
--> 37b40b3c4510
[1/4] STEP 16/17: RUN $PYCMD -m pip install --no-cache-dir $ANSIBLE_INSTALL_REFS
--> Using cache 22fed2360e742d24e915d866d0c36c8c67bde43bdb910c4ccacfe8e77e39f0aa
--> 22fed2360e74
[1/4] STEP 17/17: RUN $PYCMD -m pip install -U pip
--> Using cache 957a13d17bec9bb8828c844b119ea26d3e1a11a4717def24d377276d4d8d5063
--> 957a13d17bec
[2/4] STEP 1/15: FROM 957a13d17bec9bb8828c844b119ea26d3e1a11a4717def24d377276d4d8d5063 AS galaxy
[2/4] STEP 2/15: ARG EE_BASE_IMAGE
--> Using cache 7fcda9272533a21de20e4ee700bd9e366c72c83e2a8f2ce8f223753b7443ef71
--> 7fcda9272533
[2/4] STEP 3/15: ARG PYCMD
--> Using cache a40c273cb4adeb2fd9f74c732d2675636698aef36918d2e6eec44c27883eeed8
--> a40c273cb4ad
[2/4] STEP 4/15: ARG PYPKG
--> Using cache e66111d0628cae36422c8c4b7c0ce3353cfeddd25ce3a45716e25835bb2123f4
--> e66111d0628c
[2/4] STEP 5/15: ARG PKGMGR_PRESERVE_CACHE
--> Using cache 65bef737f40fcb67c6a96ab94932c7706f29e6243b8f6a420d54bc0409b176b8
--> 65bef737f40f
[2/4] STEP 6/15: ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS
--> Using cache af3c6ff362722c6b33ba71b46c8ac08838eab2f3bab6348867784bb5620509c1
--> af3c6ff36272
[2/4] STEP 7/15: ARG ANSIBLE_GALAXY_CLI_ROLE_OPTS
--> Using cache 4ebd72a3cd9abe02026658cec3abf2733691ff5ea075fcbf72473b4d46224bf9
--> 4ebd72a3cd9a
[2/4] STEP 8/15: ARG ANSIBLE_INSTALL_REFS
--> Using cache c82faaa70aee3a784566a60d2b8c63190f5a322290eb6cb74d423d07434d0d56
--> c82faaa70aee
[2/4] STEP 9/15: ARG PKGMGR
--> Using cache c273c0d2354bb8a8fc3453278c93bdc22c6122ea109508c749f834ddce1989ca
--> c273c0d2354b
[2/4] STEP 10/15: RUN /output/scripts/check_galaxy
--> Using cache 5fd065c0ec93714b01dd8113c8ffe454737954aaaaee184ed5876e0d62d1beb3
--> 5fd065c0ec93
[2/4] STEP 11/15: COPY _build /build
--> Using cache a07977794342ad9cf4d3e96b3244977215b5dc33f331b09b1435314ccaff5d40
--> a07977794342
[2/4] STEP 12/15: WORKDIR /build
--> Using cache 11273d1962de3153704f3ac6a4a6bd2c607b6b4aff03c89b3028532b19891a16
--> 11273d1962de
[2/4] STEP 13/15: RUN mkdir -p /usr/share/ansible
--> Using cache 61bd785d80767f232c2251bd1a96e07584278528dc1724617f86fd061eb54c73
--> 61bd785d8076
[2/4] STEP 14/15: RUN ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path "/usr/share/ansible/roles"
--> Using cache 9126b5da0c95a79df622c69eba6b4e40b529aae37156ff97ad797abfa86f3846
--> 9126b5da0c95
[2/4] STEP 15/15: RUN ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections"
--> Using cache d67070c4eaadede7fd12db6139df2b2f82df9895c0246f31f7aa48fa0ba40c28
--> d67070c4eaad
[3/4] STEP 1/17: FROM 957a13d17bec9bb8828c844b119ea26d3e1a11a4717def24d377276d4d8d5063 AS builder
[3/4] STEP 2/17: ENV PIP_BREAK_SYSTEM_PACKAGES=1
--> Using cache b6c38d0fdaa887ef31c973b02c3e7644785bcce395ca57631e12224ac1a4ffee
--> b6c38d0fdaa8
[3/4] STEP 3/17: WORKDIR /build
--> Using cache 6f8860376745e24c57d14c597ea7052a95b9c6c4a43ea9b03cca64f9549dcc10
--> 6f8860376745
[3/4] STEP 4/17: ARG EE_BASE_IMAGE
--> Using cache 204f8dcee8e792675f1a53723db37ea1317edd102b81e1f76d6bfac8de6e6b5e
--> 204f8dcee8e7
[3/4] STEP 5/17: ARG PYCMD
--> Using cache 1af1950052b16bf13c3baa3c383234a05d6394921e75eb8f325104cf7758b662
--> 1af1950052b1
[3/4] STEP 6/17: ARG PYPKG
--> Using cache 11811a63132bd6130cb3d2f45495f49a5d41fd6b8bb33426a24ffc9891b1152b
--> 11811a63132b
[3/4] STEP 7/17: ARG PKGMGR_PRESERVE_CACHE
--> Using cache 5ee2761b28fe66faf250074db02488a90da0d0e44675ee241bd8a70e89de5bf7
--> 5ee2761b28fe
[3/4] STEP 8/17: ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS
--> Using cache 3ed2875fd21e872fcfc33b04f4e10cf310b61cdf850749c8420ff0261b2668fb
--> 3ed2875fd21e
[3/4] STEP 9/17: ARG ANSIBLE_GALAXY_CLI_ROLE_OPTS
--> Using cache bec1504dd1fa9ab0dc566ed3fbdb1fd8515b912877d532fbe4738304b609657f
--> bec1504dd1fa
[3/4] STEP 10/17: ARG ANSIBLE_INSTALL_REFS
--> Using cache f010925a57cdbbd9b926b611618d1334040003e840b7adbad5c654f9c1edc067
--> f010925a57cd
[3/4] STEP 11/17: ARG PKGMGR
--> Using cache ba7352fcfdfb8ae625ace43abfa6c4f1a2238a23c2527de081de9889c107e28f
--> ba7352fcfdfb
[3/4] STEP 12/17: RUN $PYCMD -m pip install --no-cache-dir bindep pyyaml packaging
--> Using cache 308e004438c1d6ee43157a2f15a8a1e3ba433e7586b767ae284caef7c8891009
--> 308e004438c1
[3/4] STEP 13/17: COPY --from=galaxy /usr/share/ansible /usr/share/ansible
--> Using cache 07028daf40e944975b3ce0c8d98b732644d15324fdbedfbad0b8146381573d65
--> 07028daf40e9
[3/4] STEP 14/17: COPY _build/requirements.txt requirements.txt
--> Using cache 9678a43b5014aedfcd5cc698045c154281fb9cf5e3fe0e73a521cd931095ea95
--> 9678a43b5014
[3/4] STEP 15/17: COPY _build/bindep.txt bindep.txt
--> Using cache 34fd141bb2f803f49dab0d0ce0f6257e3e374e6715143d8b2677c27d5f85dbdd
--> 34fd141bb2f8
[3/4] STEP 16/17: RUN $PYCMD /output/scripts/introspect.py introspect --user-pip=requirements.txt --user-bindep=bindep.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt
Expected requirements file not present at: /usr/share/ansible/collections/ansible_collections/netapp/requirements.txt
Traceback (most recent call last):
  File "/output/scripts/introspect.py", line 507, in <module>
    main()
  File "/output/scripts/introspect.py", line 500, in main
    run_introspect(args, logger)
  File "/output/scripts/introspect.py", line 392, in run_introspect
    data = process(args.folder,
           ^^^^^^^^^^^^^^^^^^^^
  File "/output/scripts/introspect.py", line 205, in process
    col_pip_lines, col_sys_lines = process_collection(path)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/output/scripts/introspect.py", line 145, in process_collection
    pip_lines = pip_file_data(os.path.join(path, py_file))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/output/scripts/introspect.py", line 105, in pip_file_data
    pip_content = read_req_file(path)
                  ^^^^^^^^^^^^^^^^^^^
  File "/output/scripts/introspect.py", line 100, in read_req_file
    with open(path, 'r') as f:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/ansible/collections/ansible_collections/netapp/um_info/../requirements.txt'
Error: building at STEP "RUN $PYCMD /output/scripts/introspect.py introspect --user-pip=requirements.txt --user-bindep=bindep.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt": while running runtime: exit status 1

An error occurred (rc=1), see output line(s) above for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant