Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-1521 Redhat.repo not being backed up when registered to Satellite
  3. RHELC-1524

Redhat.repo not being backed up when registered to Satellite - Integration tests

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0
    • None
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • 2
    • Testable

      The parent issue RHELC-1521 has the label that triggered autocreation of this subtask to track the relative story point estimation for the integration test part of the issue.

      The parent issue description at the time of creation of this issue was:
      When system is registered to Satellite providing CentOS and RHEL repos, the conversion fails during backup of centos-release package.

      In fact this is simmilar to offline conversion.

      Steps to reproduce on CentOS 7 vagrant:

      yum install subscription-manager -y
      # using the old way with katello since I don't have the curl command available now
      wget --no-check-certificate --output-document /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm https://satellite.sat.engineering.redhat.com/pub/katello-ca-consumer-latest.noarch.rpm
      rpm -i /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm
      # probably not needed since this will be downloaded during conversion. I did that for checking if the repos ale really provided
      curl https://raw.githubusercontent.com/oamg/convert2rhel/main/convert2rhel/data/7/x86_64/rhel-certs/69.pem -o /etc/pki/product-default/69.pem
      subscription-manager register --org=<our_org> --activationkey=<key_providing_centos_and_rhel_repos>
      
      # if you don't see rhel repo after running: subscription-manager repos
      subscription-manager refresh
      
      subscription-manager repos --enable="Satellite_Engineering_CentOS_7_Updates_x86_64" --enable="Satellite_Engineering_CentOS_7_Base_x86_64"
      subscription-manager repos --disable="rhel-7-server-rpms"
      cd /etc/yum.repos.d/
      rm c2r_copr.repo Cent* rhel* -f
      
      convert2rhel analyze --debug -y
      

      Actual output (full log attached)

      ========== Error (Must fix before conversion) ==========
      (ERROR) REMOVE_SPECIAL_PACKAGES::UNEXPECTED_ERROR - Unhandled exception caught
           Description: Unhandled exception was caught: [Errno 2] No such file or directory: '/var/lib/convert2rhel/backup/ed2e326f3aefc335463ab68aa15a72c2'
          Please file a bug at https://issues.redhat.com/ to have this fixed or a specific error message added.
          Traceback: Traceback (most recent call last):
            File "/usr/lib/python2.7/site-packages/convert2rhel/actions/__init__.py", line 572, in run
              action.run()
            File "/usr/lib/python2.7/site-packages/convert2rhel/actions/pre_ponr_changes/handle_packages.py", line 120, in run
              backup_control.push(RestorablePackage(pkgs=pkghandler.get_pkg_nevras(all_pkgs), reposdir=backedup_reposdir))
            File "/usr/lib/python2.7/site-packages/convert2rhel/backup/__init__.py", line 72, in push
              restorable.enable()
            File "/usr/lib/python2.7/site-packages/convert2rhel/backup/packages.py", line 142, in enable
              if len(os.listdir(self.reposdir)) == 0 or not os.path.exists(self.reposdir):
          OSError: [Errno 2] No such file or directory: '/var/lib/convert2rhel/backup/ed2e326f3aefc335463ab68aa15a72c2'
      

      Acceptance criteria:

              Unassigned Unassigned
              rhel-process-autobot RHEL Jira bot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: