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

Update repolist for use with micrdnf in offline satellite env #578

Open
budgester opened this issue Jul 12, 2023 · 6 comments
Open

Update repolist for use with micrdnf in offline satellite env #578

budgester opened this issue Jul 12, 2023 · 6 comments
Labels
needs_info Waiting on feedback. Will be closed.

Comments

@budgester
Copy link

How do you go about updating the repos that microdnf uses when your in a restricted environment with ansible-builder. We currently use satelite for our repos.

/usr/bin/microdnf install -y --nodocs --setopt install_weak_deps=0 gcc java-17-openjdk libcurl-devel libssh-devel libxml2-devel make openssl openssl-devel python38-Cython python38-devel unzip
--
Downloading metadata...
error: cannot update repo 'ubi-8-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (6): Couldn't resolve host name for https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/repodata/repomd.xml [Could not resolve host: cdn-ubi.redhat.com]
Error: error building at STEP "RUN /output/scripts/assemble": error while running runtime: exit status 1
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Jul 12, 2023
@Akasurde
Copy link
Member

@budgester Thanks for reporting this issue. Can you access the repomd.xml from outside (the container)? Also, do you have any proxy in place? Please provide the ee.yml and the image used for this issue? Thanks in advance.

@budgester
Copy link
Author

We don't use a proxy, this is an internet restricted environment. So we have an jfrog artifactory for python packages and redhat satellite for yum packages.

If I was using dnf I'd have more tools but the ee image only has microdnf baked into it. So I need to add a satelite repo and certs to enable microdnf to have the ability to install yum packages.

I can access the satellite repomd.xml from the host machine, but not within the container.

---
version: 3

dependencies:
  galaxy: requirements.yml
  python: requirements.txt
  system: bindep.txt

images:
  base_image:
    name: artifactory.mydomain.co.uk/redhatcontainers/ansible-automation-platform-23/ee-supported-rhel8:latest

options:
  package_manager_path: /usr/bin/microdnf

additional_build_steps:
  prepend_base:
    - RUN $PYCMD -m pip config debug
    - RUN cat /etc/yum.repos.d/redhat.repo
    - COPY pip.conf /etc/pip.conf
    - COPY redhat.repo /etc/yum.repos.d/redhat.repo
    - RUN $PKGMGR makecache --disablerepo=* --enablerepo=rhel-8-for-x86_64-baseos-rpms
    - RUN $PKGMGR repolist
    - RUN $PYCMD -m pip config list

@budgester
Copy link
Author

This seems to have helped..

#350 (comment)

I think I'm down to environmental issues now.

Installing: openssl-devel;1:1.1.1k-9.el8_7;x86_64;rhel-8-for-x86_64-baseos-rpms
Installing: libxml2-devel;2.9.7-16.el8;x86_64;rhel-8-for-x86_64-appstream-rpms
error: SQLite error on "/var/lib/dnf/history.sqlite": Reading a row failed: database or disk is full
Error: error building at STEP "RUN /output/scripts/assemble": error while running runtime: exit status 1
An error occurred (rc=1), see output line(s) above for details.

@Akasurde
Copy link
Member

@budgester Should we close this issue as an environment issue?

@Akasurde Akasurde added needs_info Waiting on feedback. Will be closed. and removed needs_triage New item that needs to be triaged labels Aug 10, 2023
@budgester
Copy link
Author

I think it should have a documentation update. I'll try and get a PR to update the docs together.

@Akasurde
Copy link
Member

@budgester Any updates? Thanks.

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