hitachienergy / epiphany

Cloud and on-premises automation for Kubernetes centered industrial grade solutions.
Apache License 2.0
138 stars 107 forks source link

[BUG] `download-requirements.py` script fails when executed in AlmaLinux docker container #3178

Closed przemyslavic closed 2 years ago

przemyslavic commented 2 years ago

Describe the bug The script fails when executed in the almalinux 8.4/8.5 container (e.g. for offline mode).

2022-06-01T07:12:30.7047743Z [command]/usr/local/bin/docker run --entrypoint /bin/bash --rm -v /tmp/build/epi-cli:/shared almalinux:8.4 -c /usr/libexec/platform-python /shared/build/prepare_scripts_almalinux_8_4_x86_64/download-requirements.py /shared/build/offline_requirements_almalinux_8_4_x86_64 almalinux-8
2022-06-01T07:12:31.7780172Z 2022-06-01 07:12:31,772 [INFO]: Info summary:
2022-06-01T07:12:31.7787688Z --------------------------------------------------
2022-06-01T07:12:31.7790749Z OS Arch: x86_64
2022-06-01T07:12:31.7796031Z OS Type: almalinux-8
2022-06-01T07:12:31.7798841Z Script location: /shared/build/prepare_scripts_almalinux_8_4_x86_64
2022-06-01T07:12:31.7801213Z Directories used:
2022-06-01T07:12:31.7806338Z - files:              /shared/build/offline_requirements_almalinux_8_4_x86_64/files
2022-06-01T07:12:31.7809597Z - grafana dashboards: /shared/build/offline_requirements_almalinux_8_4_x86_64/grafana_dashboards
2022-06-01T07:12:31.7814046Z - images:             /shared/build/offline_requirements_almalinux_8_4_x86_64/images
2022-06-01T07:12:31.7816353Z - packages:           /shared/build/offline_requirements_almalinux_8_4_x86_64/packages
2022-06-01T07:12:31.7820107Z Repos backup file: /var/tmp/enabled-system-repos.tar
2022-06-01T07:12:31.7822611Z Log file location: /download-requirements.log
2022-06-01T07:12:31.7824779Z Retries count: 3
2022-06-01T07:12:31.7828366Z --------------------------------------------------
2022-06-01T07:12:31.8157247Z 2022-06-01 07:12:31,776 [INFO]: PyYAML not found, trying to install python3-pyyaml package...
2022-06-01T07:12:45.4626343Z 2022-06-01 07:12:45,461 [INFO]: Done.
2022-06-01T07:12:45.6691546Z 2022-06-01 07:12:45,667 [INFO]: Installing base packages...
2022-06-01T07:12:45.9192930Z 2022-06-01 07:12:45,917 [WARNING]: No such command: config-manager. Please use /usr/bin/dnf --help
2022-06-01T07:12:45.9194248Z It could be a DNF plugin command, try: "dnf install 'dnf-command(config-manager)'"
2022-06-01T07:12:45.9194641Z 
2022-06-01T07:12:46.1441818Z 2022-06-01 07:12:46,140 [WARNING]: No such command: config-manager. Please use /usr/bin/dnf --help
2022-06-01T07:12:46.1443108Z It could be a DNF plugin command, try: "dnf install 'dnf-command(config-manager)'"
2022-06-01T07:12:46.1443545Z 
2022-06-01T07:12:46.3888182Z 2022-06-01 07:12:46,385 [WARNING]: No such command: config-manager. Please use /usr/bin/dnf --help
2022-06-01T07:12:46.3896750Z It could be a DNF plugin command, try: "dnf install 'dnf-command(config-manager)'"
2022-06-01T07:12:46.3897316Z 
2022-06-01T07:12:46.3898375Z 2022-06-01 07:12:46,385 [ERROR]: Retries count reached maximum, command: `dnf config-manager --dump-variables`
2022-06-01T07:12:48.1116348Z ##[error]The process '/usr/local/bin/docker' failed with exit code 1
2022-06-01T07:12:48.1173838Z ##[section]Finishing: download requirements

This bug was introduced in the following PR #3154.

How to reproduce Steps to reproduce the behavior:

  1. execute epicli prepare --os almalinux-8 --arch x86_64
  2. docker run -it -v /path/to/shared/directory/:/shared almalinux:8.4 / almalinux:8.5
  3. execute /usr/libexec/platform-python /shared/build/prepare_scripts_almalinux_8_x86_64/download-requirements.py /shared/build/offline_requirements_almalinux_8_x86_64 almalinux-8 in the container

Expected behavior The script should execute without any issues.

Config files

Environment

epicli version: [2.0.1dev]

Additional context


DoD checklist

to-bar commented 2 years ago

Fixed in PR #3169