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

[Solved] Build fails in some kind of permission issue #711

Closed
ladd-a opened this issue Sep 11, 2024 · 2 comments
Closed

[Solved] Build fails in some kind of permission issue #711

ladd-a opened this issue Sep 11, 2024 · 2 comments
Labels
needs_info Waiting on feedback. Will be closed.

Comments

@ladd-a
Copy link

ladd-a commented Sep 11, 2024

I've had to recreate my build environment and for some reason there is a permission issue at pip_install step:

[1/4] STEP 15/16: RUN /output/scripts/pip_install $PYCMD
/bin/sh: line 1: /output/scripts/pip_install: Permission denied
Error: error building at STEP "RUN /output/scripts/pip_install $PYCMD": error while running runtime: exit status 126

At first I suspected this is an issue with one of the new packages I added to the build dependencies, but removing that had no effect. Also ruled out system as it seems to happen despite disabling apparmor and trying build as root on ubuntu 22.04.

This image build fine approx. 10 months ago in similar environment (using same ubuntu version).

This is my execution-environment.yml:

---
version: 3

build_arg_defaults:
  ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: '--pre'

dependencies:
  ansible_core:
    package_pip: ansible-core
  ansible_runner:
    package_pip: ansible-runner
  python:
    - jmespath
    - pyVim
    - pyVmomi
    - pexpect
    - lxml
    - pymssql
    - cryptography
    - git+https://github.com/vmware/vsphere-automation-sdk-python.git
  galaxy: galaxy.yaml

images:
  base_image:
    name: registry.redhat.io/ansible-automation-platform-24/ee-minimal-rhel9:latest

options:
  package_manager_path: /usr/bin/microdnf
$ adt --version
ansible-builder                          3.1.0
ansible-core                             2.17.4
ansible-creator                          24.9.0
ansible-dev-environment                  24.9.0
ansible-dev-tools                        24.8.0
ansible-lint                             24.9.0
ansible-navigator                        24.9.0
ansible-sign                             0.1.1
molecule                                 24.8.0
pytest-ansible                           24.9.0
tox-ansible                              24.9.0

$ python3 --version
Python 3.10.12

$ podman --version
podman version 3.4.4

Also the builder seems to run earlier python version by default, is that a problem?:

[1/4] STEP 13/16: RUN $PYCMD -V
Python 3.9.18
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Sep 11, 2024
@Shrews
Copy link
Contributor

Shrews commented Sep 11, 2024

Your EE (minus the galaxy.yaml file that was not provided) builds successfully for me on Ubuntu 22.04 using ansible-builder version 3.1 and with podman version 3.4.4.

A few questions for you:

  • Are you running ansible-builder directly on your machine, or are you invoking it within a Podman container image?
  • What is the exact ansible-builder command you are using for your build? Is it on the command line, or is it being invoked indirectly through the devtools utilities? If the latter, did you try running the ansible-builder command directly?
  • Can you please add the -vvv option to your ansible-builder build command and provide the entire output for us to examine?

@Shrews Shrews added needs_info Waiting on feedback. Will be closed. and removed needs_triage New item that needs to be triaged labels Sep 11, 2024
@ladd-a
Copy link
Author

ladd-a commented Sep 11, 2024

While gathering details it hit me that the context files were continuously reported up-to-date, and then I realized that I had run the initial build when files were still on a thumb-drive. I removed the context directory and everything seems to work now. This was just an user error, thanks for help.

For reference, I am running ansible-builder in QEMU KVM. I guess some limitation was set on the mounted device which caused corruption on the context directory.

@ladd-a ladd-a closed this as completed Sep 11, 2024
@ladd-a ladd-a changed the title Build fails in some kind of permission issue [Solved] Build fails in some kind of permission issue Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_info Waiting on feedback. Will be closed.
Projects
None yet
Development

No branches or pull requests

2 participants