Have a 6.1 instance trying to upgrade and it attempts to enable non-existent repositories: # ./bin/foreman-maintain upgrade run --target-version 6.2 --whitelist=disk-io ... Running migration scripts to Satellite 6.2 ================================================================================ Setup repositories: | Configuring repositories for 6.2 [FAIL] Failed executing subscription-manager repos --enable=rhel-18-server-rpms --enable=rhel-18-rhscl-18-rpms --enable=rhel-18-server-satellite-6.2-rpms, exit status 1: Error: 'rhel-18-server-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Error: 'rhel-18-rhscl-18-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Error: 'rhel-18-server-satellite-6.2-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. I'm not sure where this '18' is coming from but that doesn't map to anything available.
Looks like the parsing from the RPM string is off: # rpm -qf /etc/redhat-release redhat-release-server-7.4-18.el7.x86_64 it is getting the '18' vs the 7.4 we also really do NOT want to use 7.4 and want to use 7Server or 6Server. Never pin to a specific version of RHEL as there won't ever exist a repo-id for: rhel-7.4-server-satellite-6.2-rpms and instead we only have: rhel-7-server-satellite-6.2-rpms I'd suggest switching to facter vs parsing the RPM: # facter operatingsystemmajrelease 7
we also have the wrong repo-id for the SCL: Error: 'rhel-7-rhscl-7-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. it is: rhel-server-rhscl-7-rpms no need for the extra 7
Yeah, I hit the same issue today on rhel6 system: Error: 'rhel-6-rhscl-6-rpms' does not match a valid repository ID. it should be: rhel-server-rhscl-6-rpms
VERIFIED Version Tested: # rpm -q rubygem-foreman_maintain rubygem-foreman_maintain-0.1.1-1.el7sat.noarch D, [2017-12-19 05:39:08-0500 #107219] DEBUG -- : Running command subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-server-rhscl-7-rpms --enable=rhel-7-server-satellite-6.2-rpms with stdin nil D, [2017-12-19 05:39:18-0500 #107219] DEBUG -- : output of the command: Repository 'rhel-7-server-rpms' is enabled for this system. Repository 'rhel-7-server-satellite-6.2-rpms' is enabled for this system. Repository 'rhel-server-rhscl-7-rpms' is enabled for this system. Upgrading from 6.1 to 6.2 on rhel 7 correctly enabled the repositories.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0330