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

Anaconda backtrace when enabling a service that doesn't exist

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-8.10, rhel-9.4
    • anaconda
    • None
    • No
    • Moderate
    • rhel-sst-installer
    • ssg_front_door
    • None
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • None

      What were you trying to do that didn't work?

      When enabling a service in the kickstart but the required package is not installed, this leads to getting a backtrace instead of proper error:

      Kickstart excerpt:

      services --enabled=autofs
      
      %packages
      @^minimal-environment
      @guest-agents
      kexec-tools
      %end
      

      Result:

      anaconda 34.25.4.9 exception report
      Traceback (most recent call first):
        File "/usr/lib/python3.9/site-packages/dasbus/client/handler.py", line 497, in _handle_method_error
          raise exception from None
        File "/usr/lib/python3.9/site-packages/dasbus/client/handler.py", line 477, in _get_method_reply
          return self._handle_method_error(error)
        File "/usr/lib/python3.9/site-packages/dasbus/client/handler.py", line 444, in _call_method
          return self._get_method_reply(
        File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/common/task/__init__.py", line 47, in sync_run_task
          task_proxy.Finish()
        File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 527, in run_task
          sync_run_task(self._task_proxy)
        File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 496, in start
          self.run_task()
        File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 311, in start
          item.start()
        File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 311, in start
          item.start()
        File "/usr/lib64/python3.9/site-packages/pyanaconda/installation_tasks.py", line 311, in start
          item.start()
        File "/usr/lib64/python3.9/site-packages/pyanaconda/installation.py", line 399, in run_installation
          queue.start()
        File "/usr/lib64/python3.9/threading.py", line 917, in run
          self._target(*self._args, **self._kwargs)
        File "/usr/lib64/python3.9/site-packages/pyanaconda/threading.py", line 275, in run
          threading.Thread.run(self)
      dasbus.error.DBusError: Error enabling service autofs: 1
      

      The real reason is of course there is no such autofs.service since the package was not marked for installation, this is burried into the logs and hard to detect:

      09:56:55,754 WARNING org.fedoraproject.Anaconda.Modules.Services:INFO:program:Running... systemctl enable autofs --root /mnt/sysroot
      09:56:55,760 WARNING org.fedoraproject.Anaconda.Modules.Services:INFO:program:Failed to enable unit, unit autofs.service does not exist.
      09:56:55,760 WARNING org.fedoraproject.Anaconda.Modules.Services:DEBUG:program:Return code: 1
      

      What is the impact of this issue to you?

      Confusing message, hard to troubleshoot

      Please provide the package NVR for which the bug is seen:

      Anaconda on RHEL8 and RHEL9.4

      How reproducible is this bug?:

      Always, see above

              anaconda-maint-list anaconda-maint-list
              rhn-support-rmetrich Renaud Métrich
              anaconda-maint-list anaconda-maint-list
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: