Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-885

Ctrl+C during the transaction validation doesn't lead to a rollback

XMLWordPrintable

    • 8
    • False
    • Hide

      None

      Show
      None
    • False
    • 2023-Q1, 2023-Q2
    • Testable

      Pressing Control+C before the point of return should always lead to a rollback. Using the yum and dnf API during the main transaction validation phase hampers catching the keyboard interrupt signal leading to no rollback.

      Example of pressing Control+C after spotting "Adding CentOS Linux packages to the yum transaction set." with no rollback:

      [02/01/2023 19:10:25] TASK - [Validate the yum transaction] **************************************
      Loaded plugins: fastestmirror, product-id, subscription-manager
      Repository rhel-7-server-rpms is listed more than once in the configuration
      Repository rhel-7-server-optional-rpms is listed more than once in the configuration
      Repository rhel-7-server-extras-rpms is listed more than once in the configuration
      Enabling RHEL repositories:
      rhel-7-server-rpms
      Adding CentOS Linux packages to the yum transaction set.
      Determining fastest mirrors
      [root@c2r-20230201192845 ~]#
      

      Example of the rollback working fine in a later transaction validation phase ("Resolving the dependencies of the packages in the yum transaction set."):

      [02/01/2023 19:01:25] TASK - [Validate the yum transaction] **************************************
      Loaded plugins: fastestmirror, product-id, subscription-manager
      Repository rhel-7-server-rpms is listed more than once in the configuration
      Repository rhel-7-server-optional-rpms is listed more than once in the configuration
      Repository rhel-7-server-extras-rpms is listed more than once in the configuration
      Enabling RHEL repositories:
      rhel-7-server-rpms
      Adding CentOS Linux packages to the yum transaction set.
      Skipping the running kernel: kernel-3.10.0-1160.83.1.el7.x86_64
      Skipping the running kernel: kernel-3.10.0-1160.83.1.el7.x86_64
      Skipping the running kernel: kernel-3.10.0-1160.83.1.el7.x86_64
      Resolving the dependencies of the packages in the yum transaction set.
      Validating the yum transaction set, no modifications to the system will happen this time.
      Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
      ^C[02/01/2023 19:03:42] DEBUG - Traceback (most recent call last):
        File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 111, in main
          pre_ponr_conversion()
        File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 249, in pre_ponr_conversion
          checks.perform_pre_ponr_checks()
        File "/usr/lib/python2.7/site-packages/convert2rhel/checks.py", line 134, in perform_pre_ponr_checks
          validate_package_manager_transaction()
        File "/usr/lib/python2.7/site-packages/convert2rhel/checks.py", line 397, in validate_package_manager_transaction
          validate_transaction=True,
        File "/usr/lib/python2.7/site-packages/convert2rhel/pkgmanager/handlers/yum.py", line 299, in run_transaction
          self._process_transaction(validate_transaction)
        File "/usr/lib/python2.7/site-packages/convert2rhel/pkgmanager/handlers/yum.py", line 218, in _process_transaction
          self._base.processTransaction()
        File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 6603, in processTransaction
          pkgs = self._downloadPackages(callback)
        File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 6627, in _downloadPackages
          probs = self.downloadPkgs(dlpkgs)
        File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2593, in downloadPkgs
          urlgrabber.grabber.parallel_wait()
        File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2395, in parallel_wait
          raise KeyboardInterrupt
      KeyboardInterrupt
      
      Writing breadcrumbs to '/etc/migration-results'.
      [02/01/2023 19:03:42] DEBUG - Prior migration log: {"activities": [{"executed": "/usr/bin/convert2rhel --username convert2rhel_testing --no-rpm-va --debug -y -a", "success": false, "run_id": "null", "activity_ended": "2023-02-01T18:47:31.105964Z", "target_os": "null", "version": "1", "env": {}, "activity": "conversion", "source_os": {"version": "7.9", "id": "Core", "name": "CentOS Linux"}, "packages": [{"nevra": "convert2rhel-1.1-2.20230131170616568441.main.24.g6046a6f.el7.noarch", "signature": "RSA/SHA256, Tue Jan 31 17:07:58 2023, Key ID 175e6797ecf2dde9"}], "activity_started": "2023-02-01T18:46:36.690969Z"}, {"executed": "/usr/bin/convert2rhel --username convert2rhel_testing --no-rpm-va --debug -y -a", "success": false, "run_id": "null", "activity_ended": "2023-02-01T18:54:03.268766Z", "activity_started": "2023-02-01T18:53:12.771746Z", "version": "1", "env": {}, "activity": "conversion", "source_os": {"version": "7.9", "id": "Core", "name": "CentOS Linux"}, "packages": [{"nevra": "convert2rhel-1.1-2.20230131170616568441.main.24.g6046a6f.el7.noarch", "signature": "RSA/SHA256, Tue Jan 31 17:07:58 2023, Key ID 175e6797ecf2dde9"}], "target_os": "null"}]}
      [02/01/2023 19:03:42] DEBUG - Updated migration log: {"activities": [{"executed": "/usr/bin/convert2rhel --username convert2rhel_testing --no-rpm-va --debug -y -a", "success": false, "run_id": "null", "activity_ended": "2023-02-01T18:47:31.105964Z", "target_os": "null", "version": "1", "env": {}, "activity": "conversion", "source_os": {"version": "7.9", "id": "Core", "name": "CentOS Linux"}, "packages": [{"nevra": "convert2rhel-1.1-2.20230131170616568441.main.24.g6046a6f.el7.noarch", "signature": "RSA/SHA256, Tue Jan 31 17:07:58 2023, Key ID 175e6797ecf2dde9"}], "activity_started": "2023-02-01T18:46:36.690969Z"}, {"executed": "/usr/bin/convert2rhel --username convert2rhel_testing --no-rpm-va --debug -y -a", "success": false, "run_id": "null", "activity_ended": "2023-02-01T18:54:03.268766Z", "activity_started": "2023-02-01T18:53:12.771746Z", "version": "1", "env": {}, "activity": "conversion", "source_os": {"version": "7.9", "id": "Core", "name": "CentOS Linux"}, "packages": [{"nevra": "convert2rhel-1.1-2.20230131170616568441.main.24.g6046a6f.el7.noarch", "signature": "RSA/SHA256, Tue Jan 31 17:07:58 2023, Key ID 175e6797ecf2dde9"}], "target_os": "null"}, {"executed": "/usr/bin/convert2rhel --username convert2rhel_testing --no-rpm-va --debug -y -a", "run_id": "null", "packages": [{"nevra": "convert2rhel-1.1-2.20230131170616568441.main.24.g6046a6f.el7.noarch", "signature": "RSA/SHA256, Tue Jan 31 17:07:58 2023, Key ID 175e6797ecf2dde9"}], "target_os": "null", "success": false, "activity_ended": "2023-02-01T19:03:42.408107Z", "version": "1", "env": {}, "activity": "conversion", "source_os": {"version": "7.9", "id": "Core", "name": "CentOS Linux"}, "activity_started": "2023-02-01T18:55:39.874630Z"}]}
      Writing RHSM custom facts to '/etc/rhsm/facts/convert2rhel.facts'.
      WARNING - Abnormal exit! Performing rollback ...
      

      Reproducer:

      • Get any machine (CL or OL, 7 or 8, doesn't matter)
      • Install any newer c2r copr build (e.g. latest from the main branch)
      • Run conversion and wait to see "TASK - [Validate the yum transaction]" and "Adding XLinuxY packages to the yum transaction set."
      • Hit Ctrl+C and observe no rollback

            rolivier@redhat.com Rodolfo Olivieri
            mbocek@redhat.com Michal Bocek
            Daniel Diblik Daniel Diblik
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: