Bug 2152377

Summary: Leapp fails : Actor quagga_to_frr unexpectedly terminated with exit code: 1
Product: Red Hat Enterprise Linux 7 Reporter: paygupta
Component: leapp-repositoryAssignee: Leapp Notifications Bot <leapp-notifications-bot>
Status: ASSIGNED --- QA Contact: upgrades-and-conversions
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.9CC: pstodulk
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description paygupta 2022-12-11 10:50:26 UTC
Description of problem:

During final phase of leapp upgrade system goes to Emergency mode with below error :

=========================================================================================
Actor quagga_to_frr unexpectedly terminated with exit code: 1 - Please check the above details
=========================================================================================

Version-Release number of selected component (if applicable):

leapp-0.15.0-2.el7_9.noarch
leapp-deps-0.15.0-2.el7_9.noarch
leapp-upgrade-el7toel8-0.17.0-1.el7_9.noarch
leapp-upgrade-el7toel8-deps-0.17.0-1.el7_9.noarch

quagga-0.99.22.4-5.el7_4.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install "quagga" package on RHEL 7.9 system
2. Install leapp packages
3. Run leapp preupgrade
4. RUn leapp upgrade
5. Reboot the system 
6. Boot from Upgrade initramfs

Actual results:

System goes to Emergency mode with below error :

 ====> * quagga_to_frr
         Edit frr configuration on the new system.
 Process Process-224:
 Traceback (most recent call last):
   File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
     self.run()
   File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
     self._target(*self._args, **self._kwargs)
   File "/root/tmp_leapp_py3/leapp/repository/actor_definition.py", line 72, in _do_run
     actor_instance.run(*args, **kwargs)
   File "/root/tmp_leapp_py3/leapp/actors/__init__.py", line 289, in run
     self.process(*args)
   File "/etc/leapp/repos.d/system_upgrade/el7toel8/actors/quaggatofrr/actor.py", line 23, in process
     process_facts(quagga_facts)
   File "/etc/leapp/repos.d/system_upgrade/el7toel8/actors/quaggatofrr/libraries/quaggatofrr.py", line 99, in process_facts
     _copy_config_files(QUAGGA_CONF_FILES, FRR_CONF_FILES)
   File "/etc/leapp/repos.d/system_upgrade/el7toel8/actors/quaggatofrr/libraries/quaggatofrr.py", line 82, in _copy_config_files
     shutil.copy(full_path, dest_path)
   File "/usr/lib64/python3.6/shutil.py", line 245, in copy
     copyfile(src, dst, follow_symlinks=follow_symlinks)
   File "/usr/lib64/python3.6/shutil.py", line 121, in copyfile
     with open(dst, 'wb') as fdst:
 IsADirectoryError: [Errno 21] Is a directory: '/etc/frr/'
 ==============================================================================================
 Actor quagga_to_frr unexpectedly terminated with exit code: 1 - Please check the above details
 ==============================================================================================
 Debug output written to /var/log/leapp/leapp-upgrade.log
 ============================================================
                           REPORT
 ============================================================
 A report has been generated at /var/log/leapp/leapp-report.json
 A report has been generated at /var/log/leapp/leapp-report.txt
 ============================================================
                        END OF REPORT
 ============================================================

Expected results:

Upgrade should complete without any error.

Comment 4 Petr Stodulka 2023-01-27 13:32:16 UTC
The fix has been merged in upstream and will be part of the next release:
* https://github.com/oamg/leapp-repository/pull/1008

Comment 5 Petr Stodulka 2023-01-27 13:41:37 UTC
My apologize, I switched the bug. This issue dissapears with this release due to mentioned fix also, as the frr package will be installed during the upgrade, however we want to keep it opened to deliver additional fix that will work as a seatbelt in case it happens (for whatever reason) that frr packages will not be installed.