This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2260862 - install_packages script adds repo sections always (non-idempotently)
Summary: install_packages script adds repo sections always (non-idempotently)
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.15.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-29 14:30 UTC by Lukas Pramuk
Modified: 2024-06-06 17:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 17:00:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   SAT-22889 0 None Migrated None 2024-06-06 17:00:54 UTC

Description Lukas Pramuk 2024-01-29 14:30:52 UTC
Description of problem:
After successfully running ./install_packages satellite installer fails with:
[ERROR ] [configure] Could not prefetch yumrepo provider 'inifile': Section "Satellite-local" is already defined, cannot redefine (file: /etc/yum.repos.d/satellite-local.repo)

Version-Release number of selected component (if applicable):
6.15.0
Satellite-6.15-RHEL-8-20240129.n.0-x86_64-dvd.iso

How reproducible:
100%

Steps to Reproduce:
1. Perform disconnected installation
# cd /media/sat6
# ./install_packages --nogpgsigs
...
This script will install the satellite packages on the current machine.
   - Ensuring we are in an expected directory.
   - Copying installation files.
   - Creating Satellite Repository File
   - Creating Maintenance Repository File
   - Checking to see if Satellite is already installed.
   - Importing the gpg key.
   - WARNING: Package GPG signatures will be ignored!
   - WARNING: Package GPG signatures will be ignored!
   - Installation repository will remain configured for future package installs.
   - Installation media can now be safely unmounted.

Install is complete. Please run satellite-installer --scenario satellite

2. Run satellite-installer 
# satellite-installer --scenario satellite
2024-01-29 05:59:16 [NOTICE] [root] Loading installer configuration. This will take some time.
2024-01-29 05:59:20 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2024-01-29 05:59:20 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2024-01-29 06:00:39 [NOTICE] [configure] Starting system configuration.
2024-01-29 06:01:01 [NOTICE] [configure] 250 configuration steps out of 1615 steps complete.
2024-01-29 06:01:12 [ERROR ] [configure] Could not prefetch yumrepo provider 'inifile': Section "Satellite-local" is already defined, cannot redefine (file: /etc/yum.repos.d/satellite-local.repo)
2024-01-29 06:01:12 [NOTICE] [configure] 500 configuration steps out of 1616 steps complete.
2024-01-29 06:01:21 [NOTICE] [configure] 750 configuration steps out of 1618 steps complete.
2024-01-29 06:01:54 [NOTICE] [configure] 1000 configuration steps out of 1643 steps complete.
2024-01-29 06:02:05 [NOTICE] [configure] 1250 configuration steps out of 1645 steps complete.
2024-01-29 06:04:56 [NOTICE] [configure] 1500 configuration steps out of 1645 steps complete.

2024-01-29 06:07:40 [NOTICE] [configure] System configuration has finished.

Error 1: Puppet Yumrepo resource 'ansible-runner' failed. Logs:
  /Stage[main]/Foreman_proxy::Plugin::Ansible::Runner/Yumrepo[ansible-runner]/before
    before to Package[ansible-runner]
  /Stage[main]/Foreman_proxy::Plugin::Ansible::Runner/Yumrepo[ansible-runner]
    Starting to evaluate the resource (489 of 1615)
    Skipping because provider prefetch failed
    Resource is being skipped, unscheduling all events
    Evaluated in 0.00 seconds

1 error was detected during installation.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/satellite.log
Package versions are being locked.


Actual results:
error during installer run

Expected results:
installer runs successfully

Additional info:
/var/log/foreman-installer/satellite.log:
2024-01-29 06:01:12 [DEBUG ] [configure] Class[Foreman_proxy::Plugin::Ansible::Runner]: Starting to evaluate the resource (488 of 1615)
2024-01-29 06:01:12 [DEBUG ] [configure] Class[Foreman_proxy::Plugin::Ansible::Runner]: Evaluated in 0.00 seconds
2024-01-29 06:01:12 [DEBUG ] [configure] Prefetching inifile resources for yumrepo
2024-01-29 06:01:12 [ERROR ] [configure] Could not prefetch yumrepo provider 'inifile': Section "Satellite-local" is already defined, cannot redefine (file: /etc/yum.repos.d/satellite-local.repo)
2024-01-29 06:01:12 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Plugin::Ansible::Runner/Yumrepo[ansible-runner]: Starting to evaluate the resource (489 of 1615)
2024-01-29 06:01:12 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Plugin::Ansible::Runner/Yumrepo[ansible-runner]: Skipping because provider prefetch failed
2024-01-29 06:01:12 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Plugin::Ansible::Runner/Yumrepo[ansible-runner]: Resource is being skipped, unscheduling all events
2024-01-29 06:01:12 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Plugin::Ansible::Runner/Yumrepo[ansible-runner]: Evaluated in 0.00 seconds
2024-01-29 06:01:12 [DEBUG ] [configure] /Package[ansible-runner]: Starting to evaluate the resource (490 of 1615)
2024-01-29 06:01:12 [INFO  ] [configure] /Package[ansible-runner]: Dependency Yumrepo[ansible-runner] has failures: true

Comment 1 Lukas Pramuk 2024-01-29 16:40:44 UTC
I've had to find out how I got into this situation since I can't reproduce it.

After accidentally running ./install_packages twice (upon 2nd run I added --nogpgsigs option) a satellite repo looks like this:

# cat /etc/yum.repos.d/satellite-local.repo 

#
# Repository for the locally mounted repo
#
[Satellite-local]
name=Satellite-local
baseurl=file:///opt/satellite//Satellite
enabled=1
gpgcheck=0
#
# Repository for the locally mounted repo
#
[Maintenance-local]
name=Maintenance-local
baseurl=file:///opt/satellite//Maintenance
enabled=1
gpgcheck=0
#
# Repository for the locally mounted repo
#
[Satellite-local]
name=Satellite-local
baseurl=file:///opt/satellite//Satellite
enabled=1
gpgcheck=0
#
# Repository for the locally mounted repo
#
[Maintenance-local]
name=Maintenance-local
baseurl=file:///opt/satellite//Maintenance
enabled=1


>>> install_packages script adds entries always (i.e. non-idempotently)

Comment 2 Eric Helms 2024-06-06 17:00:55 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.