# Ansible Builder destructive failure

**URL:** <https://forum.ansible.com/t/ansible-builder-destructive-failure/37873>\
**Category:** AWX Project\
**Tags:** rhel, ee\
**Created:** [April 11, 2023, 6:05pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873 "2023-04-11T18:05:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 11, 2023, 6:05pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/1 "2023-04-11T18:05:52Z")

</div>

The day has come. I have to have an EE to talk to network devices. I’m following Calvin Remsburg’s tutorial at [https://www.youtube.com/watch?v=mTllPoQQFjg](https://www.youtube.com/watch?v=mTllPoQQFjg). Around the 46 minute point, he builds the EE.

When build my EE, the RHEL 9 box on which I’m doing the build is ruined. After doing it twice, the box will only run for 30 seconds. Happily, I was working in a sandbox, so no harm done, but what do I do?

Before running ansible-builder I must install pip so I can install builder

> python -m ensurepip --upgrade  
> python -m pip install ansible-builder

I create 3 files:

execution-environment.yml  
\<#

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 11, 2023, 6:17pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/2 "2023-04-11T18:17:13Z")

</div>

Really, the other logs are only partials of the one I’m attaching here. The next log shows the server going down sooner, but now the server even goes down before I do the first step. So, I’ve actually destroyed the server. The next log is only showing the net effects of that. The previous log is just the same log without the verbosity.

There is some chance this log is actually another example of a premature death due to the damage done in the first run. The log from the first run, without the verbosity, is in the previous message.

> **(attachments)**
>
> [ansible-builder-failure2.log](https://forum.ansible.com/uploads/short-url/8b4XngZQFizHF0JRmCVjIzZEdVp.log) (54.1 KB)

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 11, 2023, 8:22pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/3 "2023-04-11T20:22:56Z")

</div>

Hung hard with “docker” as the container-runtime. Maybe better than destructive crashing with podman serving that role.

> **(attachments)**
>
> [docker-builder.log](https://forum.ansible.com/uploads/short-url/eTLCI0f5l2u7ZpecoJ8Uqw5WMrw.log) (26.8 KB)

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 11, 2023, 9:58pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/4 "2023-04-11T21:58:02Z")

</div>

Maybe good news. After an hour or two, the process started moving again, and after another couple hours, it ended. In between, I lost network connection to the box, so I cannot see any of the output from the process. Sigh. And I don’t know where to look for the completed image. Sigh. But I’ll get all that tomorrow. Thank you.

Still pending is the question why the process blew up my Linux box using podman, but if I can do this with a docker build, then I’m happy.

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 12, 2023, 2:10pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/5 "2023-04-12T14:10:53Z")

</div>

The build failed. I have to figure out how to upgrade Python, I gather.  
#19 24.90 Complete!  
#19 24.97 + ‘[’ -f /output/bindep/run.txt ‘]’  
#19 24.97 ++ cat /output/bindep/run.txt  
#19 24.97 + PACKAGES=‘python3-rpm  
#19 24.97 python38-cryptography  
#19 24.97 python38-pytz  
#19 24.97 python38-pyyaml  
#19 24.97 python38-requests  
#19 24.97 qemu-img  
#19 24.97 rsync’  
#19 24.97 + ‘[’ ‘!’ -z ‘python3-rpm  
#19 24.97 python38-cryptography  
#19 24.97 python38-pytz  
#19 24.97 python38-pyyaml  
#19 24.97 python38-requests  
#19 24.97 qemu-img  
#19 24.97 rsync’ ‘]’  
#19 24.97 + /usr/bin/dnf install -y python3-rpm python38-cryptography python38-pytz python38-pyyaml python38-requests qemu-img rsync  
#19 25.50 Last metadata expiration check: 0:00:06 ago on Wed Apr 12 14:04:14 2023.  
#19 25.78 Package python3-rpm-4.16.1.3-22.el9.x86\_64 is already installed.  
#19 25.79 No match for argument: python38-cryptography  
#19 25.80 No match for argument: python38-pytz  
#19 25.81 No match for argument: python38-pyyaml  
#19 25.82 No match for argument: python38-requests  
#19 25.82 Package qemu-img-17:7.2.0-14.el9.x86\_64 is already installed.  
#19 25.82 Package rsync-3.2.3-19.el9.x86\_64 is already installed.  
#19 25.83 Error: Unable to find a match: python38-cryptography python38-pytz python38-pyyaml python38-requests  
#19 ERROR: process “/bin/sh -c /output/install-from-bindep && rm -rf /output/wheels” did not complete successfully: exit code: 1

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 12, 2023, 2:33pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/6 "2023-04-12T14:33:38Z")

</div>

Ansible-builder wants python38-cryptography and other packages that don’t exist. What am I supposed to do about this?

I installed my dependencies and installed cryptography successfully, but dnf is trying to install things that just seem not to exist?  
yum install gcc libffi-devel python3-devel openssl-devel  
python3 -m pip install cryptography  
python3 -m pip install python38-cryptography python38-pytz python38-pyyaml python38-requests qemu-img rsync  
ERROR: Could not find a version that satisfies the requirement python38-cryptography (from versions: none)  
ERROR: No matching distribution found for python38-cryptography

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 13, 2023, 3:35pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/7 "2023-04-13T15:35:10Z")

</div>

Installing python38 packages seems to be impossible on RHEL 9 and hard on RHEL 8.

> dnf -y install python38-cryptography python38-pytz python38-pyyaml python38-requests qemu-img rsync

That works on RHEL 8 after yumming python38 etc.

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 13, 2023, 8:08pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/8 "2023-04-13T20:08:23Z")

</div>

This is unplayable. I really need help.

I finally got ansible-builder to run to completion, and nothing is output.

I ran:  
ansible-builder build --tag [docker-local.rtfx.mycompanysc.com/ansible-ee-juniper:1.0](http://docker-local.rtfx.mycompanysc.com/ansible-ee-juniper:1.0) --build-arg ANSIBLE\_GALAXY\_CLI\_COLLECTION\_OPTS=‘–ignore-certs’ --container-runtime docker \> build\_output\_terse.log

My output was:  
Running command:  
docker build -f context/Dockerfile -t [docker-local.rtfx.mycompanysc.com/ansible-ee-juniper:1.0](http://docker-local.rtfx.mycompanysc.com/ansible-ee-juniper:1.0) --build-arg=ANSIBLE\_GALAXY\_CLI\_COLLECTION\_OPTS=–ignore-certs context  
Complete! The build context can be found at: /root/context

This is my docker status:  
[root@SelfServ30244 ~]# docker image ls  
REPOSITORY TAG IMAGE ID CREATED SIZE  
[root@SelfServ30244 ~]#

This is what’s in my context folder:  
[root@SelfServ30244 context]# ls -ltrR  
.:  
total 4  
drwxr-x— 2 root root 54 Apr 12 15:44 \_build  
-rw-r----- 1 root root 1177 Apr 13 14:55 Dockerfile

./\_build:  
total 8  
-rw-r----- 1 root root 32 Apr 12 15:42 requirements.yml  
-rw-r----- 1 root root 27 Apr 12 15:42 requirements.txt

It succeeded, and there’s no artifact at all to indicate anything happened.

What do I do?

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 13, 2023, 8:40pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/9 "2023-04-13T20:40:07Z")

</div>

Zero image generated by a successful, completed run. I’m baffled.

The command:  
ansible-builder build --tag [docker-local.rtfx.mycompanysc.com/ansible-ee-juniper:1.0](http://docker-local.rtfx.mycompanysc.com/ansible-ee-juniper:1.0) --build-arg ANSIBLE\_GALAXY\_CLI\_COLLECTION\_OPTS=‘–ignore-certs’ -v 3 --container-runtime docker \> build\_output\_verbose.log

Ends with:  
#21 0.216 drwxr-xr-x 1 root root 21 Mar 16 2022 xdg  
#21 0.216 drwxr-xr-x 2 root root 6 Jun 21 2021 xinetd.d  
#21 0.216 drwxr-xr-x 1 root root 57 Apr 13 20:12 yum  
#21 0.216 lrwxrwxrwx 1 root root 12 Jan 12 09:05 yum.conf → dnf/dnf.conf  
#21 0.216 drwxr-xr-x 1 root root 4096 Apr 28 2022 yum.repos.d  
#21 DONE 0.3s

Complete! The build context can be found at: /root/context

And the /root/context folder contains:  
[root@SelfServ30244 ~]# ls -ltrR context  
context:  
total 4  
drwxr-x— 2 root root 54 Apr 12 15:44 \_build  
-rw-r----- 1 root root 1177 Apr 13 16:09 Dockerfile

context/\_build:  
total 8  
-rw-r----- 1 root root 32 Apr 12 15:42 requirements.yml  
-rw-r----- 1 root root 27 Apr 12 15:42 requirements.txt  
[root@SelfServ30244 ~]#

And the docker images list:  
[root@SelfServ30244 ~]# docker image ls  
REPOSITORY TAG IMAGE ID CREATED SIZE  
[root@SelfServ30244 ~]#

> **(attachments)**
>
> [build\_output\_verbose.log.scrubbed](https://forum.ansible.com/uploads/short-url/46GRtFJ1xWOweCeGBt99VtRINyB.scrubbed) (227 KB)

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [April 28, 2023, 5:05pm UTC](https://forum.ansible.com/t/ansible-builder-destructive-failure/37873/10 "2023-04-28T17:05:42Z")

</div>

I made it through all this to yet another problem captured in another thread. I will post the answer to that thread here as well, just to let any who follow know it did all work:

Resolved: Happily. I was able to phone a friend.

My blindspot was around bindep.txt ([https://docs.openstack.org/infra/bindep/](https://docs.openstack.org/infra/bindep/)). My python dependencies were all resolved by the following bindep.txt, though I’m sure I can remove some of these and still succeed.  
findutils [compile platform:centos-8 platform:rhel-8]  
gcc [compile platform:centos-8 platform:rhel-8]  
make [compile platform:centos-8 platform:rhel-8]  
python38-devel [compile platform:centos-8 platform:rhel-8]  
python38-cffi [platform:centos-8 platform:rhel-8]  
python38-cryptography [platform:centos-8 platform:rhel-8]  
python38-pycparser [platform:centos-8 platform:rhel-8]
