leapp-repository icon indicating copy to clipboard operation
leapp-repository copied to clipboard

system_facts actor: StopActorExecutionError should be converted to an inhibitor

Open timmullin opened this issue 11 months ago • 1 comments

As it stands, if the system_facts actor has an issue parsing /etc/default/grub, it will raise a StopActorExecutionError exception. This will cause the issue to not be reported as an inhibitor. Since this issue prevents the upgrade from proceeding, it would be preferable to have it reported as an inhibitor so it will be detected as such when running "preupgrade".

Steps to reproduce:

  • Start on a CentOS 7 with leapp installed and setup to upgrade to AlmaLinux 8
  • Add the following line to /etc/default/grub: "unset GRUB_TERMINAL_OUTPUT"
  • Run "leapp preupgrade"

The preupgrade will halt due to the grub file issue, the error will be displayed on the terminal, and will be reported in /var/log/leapp/leapp-report.json. But, it will not be flagged as an inhibitor. This means that any code that processes the leapp-report.json file will not see that there were any issues that would inhibit the upgrade.

Another, more comprehensive fix, for this issue and others would be to have the code that catches StopActorExecutionError exceptions to flag the issue as an inhibitor when writing them to the report file (since anything causing the exception to be thrown would inhibit an upgrade operation).

timmullin avatar Feb 28 '24 19:02 timmullin

Further background. In the failure case, the customer had this line, which appears to have confused leapp.

# grep -H GRUB_TERMINAL_OUTPUT /etc/default/grub
/etc/def`ault/grub:unset GRUB_TERMINAL_OUTPUT

Leading to:

* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m] 
* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m] 2024-01-20 03:54:58.894422 [ERROR] Actor: system_facts
* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m] Message: Failed parsing of /etc/default/grub
* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m] Summary:
* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m]     Problematic line: unset GRUB_TERMINAL_OUTPUT
* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m]     Error: need more than 1 value to unpack
* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m] 
* 2024-01-20 03:55:30 (4264) [ESC[32mINFOESC[0m] 

toddr avatar Feb 28 '24 23:02 toddr