Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-3334

[leapp] UnicodeDecodeError: 'ascii' codec can't decode byte during the DNF transaction actor

Details

    • Normal
    • sst_upgrades
    • False
    • Hide

      None

      Show
      None
    • If docs needed, set a value

    Description

      Description of problem:
      An error occurred just after the DNF transaction, leading to the emergency shell.
      It seems to fail while trying to remove the target userspace directory in using shutil.rmtree().
      Rebooting shows a RHEL 8 OS without post-upgrade actions which was problematic (Satellite server here).

      Version-Release number of selected component (if applicable):
      leapp-upgrade-el7toel8-0.17.0-1.el7_9

      How reproducible:
      Always for the customer. Unable to reproduce internally.

      Actual results:
      [ 1617.173425] localhost upgrade[2241]: tfm-rubygem-thor-1.0.1-3.el7sat.noarch
      [ 1622.741102] localhost upgrade[2241]: tfm-rubygem-thread_safe-0.3.6-6.el7sat.noarch Process Process-216:
      [ 1622.741102] localhost upgrade[2241]: Traceback (most recent call last):
      [ 1622.743537] localhost upgrade[2241]: File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
      [ 1622.743537] localhost upgrade[2241]: sys.stdin.close()
      [ 1622.743537] localhost upgrade[2241]: File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
      [ 1622.743537] localhost upgrade[2241]: self._target(*self._args, **self._kwargs)
      [ 1622.743537] localhost upgrade[2241]: File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
      [ 1622.746925] localhost upgrade[2241]: actor_instance.run(*args, **kwargs)
      [ 1622.746925] localhost upgrade[2241]: File "/usr/lib/python2.7/site-packages/leapp/actors/_init_.py", line 289, in run
      [ 1622.746925] localhost upgrade[2241]: self.process(*args)
      [ 1622.746925] localhost upgrade[2241]: File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/dnfupgradetransaction/actor.py", line 60, in process
      [ 1622.749744] localhost upgrade[2241]: shutil.rmtree(userspace.path)
      [ 1622.749744] localhost upgrade[2241]: File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      [ 1622.749744] localhost upgrade[2241]: elif onerror is None:
      [ 1622.749744] localhost upgrade[2241]: File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      [ 1622.749744] localhost upgrade[2241]: elif onerror is None:
      [ 1622.749744] localhost upgrade[2241]: File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      [ 1622.749744] localhost upgrade[2241]: elif onerror is None:
      [ 1622.749744] localhost upgrade[2241]: File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      [ 1622.749744] localhost upgrade[2241]: elif onerror is None:
      [ 1622.749744] localhost upgrade[2241]: File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      [ 1622.749744] localhost upgrade[2241]: elif onerror is None:
      [ 1622.749744] localhost upgrade[2241]: File "/usr/lib64/python2.7/shutil.py", line 241, in rmtree
      [ 1622.749744] localhost upgrade[2241]: is false and onerror is None, an exception is raised.
      [ 1622.749744] localhost upgrade[2241]: File "/usr/lib64/python2.7/posixpath.py", line 80, in join
      [ 1622.749744] localhost upgrade[2241]: # Trailing '/'es are stripped from head unless it is the root.
      [ 1622.749744] localhost upgrade[2241]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 29: ordinal not in range(128)
      [ 1622.749744] localhost upgrade[2241]:
      [ 1622.749744] localhost upgrade[2241]: tfm-rubygem-tilt-2.0.8-5.el7sat.noarch
      [ 1622.749744] localhost upgrade[2241]: tfm-rubygem-timeliness-0.3.10-2.el7sat.noarch
      [ 1622.749744] localhost upgrade[2241]: tfm-rubygem-tzinfo-1.2.10-1.el7sat.noarch

      Additional info:
      As a workaround it has been suggested to catch all errors in the except clause line 61 (remove EnvironmentError).
      From `/usr/share/leapp-repository/repositories/system_upgrade/common/actors/dnfupgradetransaction/actor.py`:
      56 self.produce(TransactionCompleted())
      57 userspace = next(self.consume(TargetUserSpaceInfo), None)
      58 if userspace:
      59 try:
      60 shutil.rmtree(userspace.path)
      61 except EnvironmentError:
      62 self.log.info("Failed to remove temporary userspace - error ignored", exc_info=True)

      Attachments

        Activity

          People

            leapp-notifications leapp-notifications
            rhn-support-cbesson Christophe Besson
            leapp-notifications leapp-notifications
            RHEL Upgrades QE Team RHEL Upgrades QE Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: