Giter Site home page Giter Site logo

oamg / leapp-repository Goto Github PK

View Code? Open in Web Editor NEW
44.0 16.0 139.0 5.07 MB

Leapp repositories containing actors for the Leapp framework (https://github.com/oamg/leapp). Currently provides leapp repositories for in-place upgrades of RHEL systems.

License: Apache License 2.0

Makefile 0.81% Shell 1.33% Python 97.86%
leapp leapp-framework actors upgrades

leapp-repository's Introduction

Before doing anything, please read Leapp framework documentation.


Troubleshooting

Where can I report an issue or RFE related to the framework or other actors?

For your convenience you can pack all logs with this command:

# tar -czf leapp-logs.tgz /var/log/leapp /var/lib/leapp/leapp.db

Then you may attach only the leapp-logs.tgz file.

Where can I seek help?

We’ll gladly answer your questions and lead you to through any troubles with the actor development.

You can reach us at IRC: #leapp on Libera.Chat.

leapp-repository's People

Contributors

abadger avatar alexandrepossebom avatar artmello avatar bocekm avatar dkubek avatar drehak avatar erig0 avatar evgeni avatar examon avatar fellipeh avatar fernflower avatar jakuje avatar jmikovic avatar lkundrak avatar matejmatuska avatar michalhe avatar mkluson avatar mlichvar avatar olysonek avatar pemensik avatar petermocary avatar pirat89 avatar rezney avatar shaded-enmity avatar vinzenz avatar vmojzis avatar vojtechsokol avatar yarda avatar zdohnal avatar zhukovgreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leapp-repository's Issues

Report non-available repositories gracefully

Actual behavior
See the comments in #156. Nowadays, when any repository is not available, upgrade fails without any better messaging about the issue. We should handle this case better and report the problem to user in clear way.

To Reproduce
Create actor that produce custom repository message like this:

CustomTargetRepository(
                repoid='MyFailingRepo',
                name='MyFailingRepo',
                baseurl='https://nonsense.url.com/which/I/put/here',
                enabled=False)

The current state

Host and machine ids are equal (d90cb61aed6b4440aa8dbad821dd12a1): refusing to link journals
GoodRepo                                           61 MB/s | 2.2 MB     00:00    
MyFailingRepo                                       0.0  B/s |   0  B     00:00    
Error: Failed to synchronize cache for repo 'MyFailingRepo'
2019-04-17 09:11:04.278 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged -- /bin/bash -c /usr/bin/dnf rhel-upgrade download /var/lib/leapp/dnf-plugin-data.txt]
2019-04-17 09:11:04.829 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [rm -rf /tmp/download-debugdata]
2019-04-17 09:11:04.896 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [rm -rf /tmp/download-debugdata]
2019-04-17 09:11:04.915 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [cp -a /var/lib/leapp/scratch/mounts/merged/debugdata /tmp/download-debugdata]
cp: cannot stat ‘/var/lib/leapp/scratch/mounts/merged/debugdata’: No such file or directory
2019-04-17 09:11:04.987 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [cp -a /var/lib/leapp/scratch/mounts/merged/debugdata /tmp/download-debugdata]
2019-04-17 09:11:05.12  WARNING  PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: Cannot copy new debugdata. A Leapp Command Error occurred.  
2019-04-17 09:11:05.58  DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/umount /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-04-17 09:11:05.137 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/umount /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-04-17 09:11:05.165 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/umount -fl /var/lib/leapp/scratch/mounts/merged]
2019-04-17 09:11:05.233 DEBUG    PID: 6101 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/umount -fl /var/lib/leapp/scratch/mounts/merged]
2019-04-17 09:11:05.271 INFO     PID: 4987 leapp.workflow.Download: Starting stage After of phase Download
2019-04-17 09:11:05.311 INFO     PID: 4987 leapp.workflow: Workflow interrupted due to the FailPhase error policy

============================================================
                        ERRORS
============================================================

2019-04-17 09:11:05.149314 [ERROR] Actor: prepare_upgrade_transaction Message:  A Leapp Command Error occurred.  

============================================================
                     END OF ERRORS
============================================================

Linux command line parameters are not copied to upgrade initramfs

Actual behavior

Linux command line parameters added before calling leapp upgrade don't affect upgrade process initramfs.

To Reproduce
Steps to reproduce the behavior

  1. Add some parameters to Linux command line (GRUB_CMDLINE in /etc/default/grub)
  2. install leapp
  3. leapp upgrade --debug
  4. reboot
  5. observe Linux command line

Expected behavior

The parameters added above should be present in the upgrade command line.

System information (please complete the following information):

leapp-0.5.0-1.201904011532Z.d0a3c9a.master.el7_6.noarch
leapp-repository-0.5.0-1.201904011554Z.11ac42d.master.el7_6.noarch

s390x: network is not running after upgrade on some machines

There is another known issue with networking on some machines (usually those with older HW, where RHEL-ALT cannot be installed. It's related somehow to this issue:

The problem is somewhere in the initrd. We are not able to create initrd with proper content You can find the cww_init script fails in all cases.

Manual workrounds: Network can be provisioned manually on the machine, e.g. like this:

echo 1 > /sys/bus/ccwgroup/devices/0.0.8000/layer2
echo 1 > /sys/bus/ccwgroup/devices/0.0.8000/online

(that's for enccw0.0.8000 NIC)

When network is running, rebuild the initrd (adding qeth_l2 driver and everything will be ok after next reboot. Another possibility is the remove of rd.znet from the kernel cmdline, but in such case, network will be broken if VLAN is used.

Those workrounds doesn't seem safe enought to implement, so we are investigating how to build correct initrd.

storageinfoscanner parsing error

The parser expects each line of the mount command to contain up to 6 entries separated by space. This wrong since the path to the target mount point can contain spaces. E.g.:

/dev/sr0 on /run/media/user/RHEL-7.6 Server.x86_64 type iso9660 (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2) 

Invalid SELinux model and provided information in case of disabled selinux

The SELinux model does not reflect correctly what information we can get about SElinux with various setup. E.g. in case SElinux is disabled, we cannot get information about runtime mode (just None). Policy cannot contain whatever string. It can contain only these values:

  • targeted - Targeted processes are protected,
  • minimum - Modification of targeted policy. Only selected processes are protected.
  • mls - Multi Level Security protection.

Regarding the /etc/selinux/config file. The model will be changed partially by the PR I will add here later just to fix broken tests. Proper fix will be still need.

  • resolve issue
  • write tests

network_manager_update: the tool script fails

Actual behavior

The network_manager_update actor is failing:

1961|log-message|2019-06-10T13:21:23.877040Z|0ebe6e50-0257-4743-88c0-c8512c1e5678|121||{"level": "INFO", "message": "2019-06-10 13:21:23.877 INFO     PID: 1335 leapp.workflow.FirstBoot: Executing actor network_manager_update_connections "}
1962|log-message|2019-06-10T13:21:23.986432Z|0ebe6e50-0257-4743-88c0-c8512c1e5678|123||{"level": "DEBUG", "message": "2019-06-10 13:21:23.986 DEBUG    PID: 2199 leapp.workflow.FirstBoot.network_manager_update_connections: External command is started: [/usr/bin/python3 tools/nm-update-client-ids.py]"}
1963|process-start|2019-06-10T13:21:23.992039Z|0ebe6e50-0257-4743-88c0-c8512c1e5678|123||{"id": "22a6979b-43b3-4c62-a120-346c8c8cf97b", "parameters": ["/usr/bin/python3", "tools/nm-update-client-ids.py"], "env": null}
1964|process-end|2019-06-10T13:21:24.284408Z|0ebe6e50-0257-4743-88c0-c8512c1e5678|123||22a6979b-43b3-4c62-a120-346c8c8cf97b
1965|process-result|2019-06-10T13:21:24.286618Z|0ebe6e50-0257-4743-88c0-c8512c1e5678|123||{"id": "22a6979b-43b3-4c62-a120-346c8c8cf97b", "parameters": ["/usr/bin/python3", "tools/nm-update-client-ids.py"], "result": {"signal": 0, "exit_code": 1, "pid": 2204, "stdout": "", "stderr": "Traceback (most recent call last):\n  File \"tools/nm-update-client-ids.py\", line 20, in <module>\n    client = NM.Client.new(None)\nGLib.Error: g-io-error-quark: Could not connect: No such file or directory (1)\n"}, "env": null}
1966|log-message|2019-06-10T13:21:24.288657Z|0ebe6e50-0257-4743-88c0-c8512c1e5678|123||{"level": "DEBUG", "message": "2019-06-10 13:21:24.288 DEBUG    PID: 2199 leapp.workflow.FirstBoot.network_manager_update_connections: External command is finished: [/usr/bin/python3 tools/nm-update-client-ids.py]"}
1967|log-message|2019-06-10T13:21:24.290339Z|0ebe6e50-0257-4743-88c0-c8512c1e5678|123||{"level": "WARNING", "message": "2019-06-10 13:21:24.290 WARNING  PID: 2199 leapp.workflow.FirstBoot.network_manager_update_connections: Error calling nm-update-client-ids script: A Leapp Command Error occurred. "}

From that is clean traceback:

Traceback (most recent call last):
  File \"tools/nm-update-client-ids.py\", line 20, in <module>
    client = NM.Client.new(None)\nGLib.Error: g-io-error-quark: Could not connect: No such file or directory (1)

To Reproduce
not sure what is clean reproducer. It appears just on some machines.

  • EDIT: probably a service is not running or finished yet when the actor is processed. The same script is running correctly when tried manually later. I expect we are talking about NetworkManager.service

System information (please complete the following information):
(info from upgraded system)

  • installed leapp rpms
# rpm -qa "*leapp*"
python2-leapp-0.7.0-1.201906060828Z.86683b7.master.el7_6.noarch
leapp-repository-sos-plugin-0.7.0-1.201906071241Z.36696c2.master.el7_6.noarch
leapp-0.7.0-1.201906060828Z.86683b7.master.el7_6.noarch
leapp-repository-deps-el8-5.0.0-1.201906071241Z.36696c2.master.el8.noarch
leapp-deps-el8-5.0.0-1.201906071241Z.36696c2.master.el8.noarch
leapp-repository-0.7.0-1.201906071241Z.36696c2.master.el7_6.noarch
  • network info
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:0f:93:f1 brd ff:ff:ff:ff:ff:ff
    inet 20.10.0.6/24 brd 20.10.0.255 scope global dynamic noprefixroute eth0
       valid_lft 83665sec preferred_lft 83665sec
    inet6 fe80::f816:3eff:fe0f:93f1/64 scope link 
       valid_lft forever preferred_lft forever
  • input message NetworkManagerConfig
{"dhcp": ""}
  • NOTE: the /var/log/leapp/leapp-upgrade.log file doesn't contain any log after the RPMUpgrade phase (that one is the last I can see in the logs, everything else is taken from audit db)

detectgrubconf: split into two actors?

Below you can find format patch I thought to use, but even the solution below is not good. The best here will be to separate the actor into two actors - one in facts phase, another in the check phase.

I am thinking that we can postpone that change for now, as we can do some changes around modules in leapp first, so we will not produce extra models/messages that could confuse people what they can consume and what is kind of "private" msg for specific actor, that can be changed (or call it unstabble).

Or we can rethink approach of the facts phase and enable sometimes generation of the report (I do not like such idea too much and I'd like to see more clean solution, but I maybe exceptions are sometimes welcomed).

From ad2ef8a5cc91bc3677474fb5a3a116512907dbab Mon Sep 17 00:00:00 2001
From: Petr Stodulka <[email protected]>
Date: Tue, 1 Oct 2019 12:20:12 +0200
Subject: [PATCH] detectgrubconf: move to the facts phase

Currently we do not want to do any actors in the checksphase that
require interaction with the system (getting some data from it).
Move the actor to the facts phase, as it requires read from the
/etc/default/grub file.
---
 .../el7toel8/actors/detectgrubconfigerror/actor.py            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/repos/system_upgrade/el7toel8/actors/detectgrubconfigerror/actor.py b/repos/system_upgrade/el7toel8/actors/detectgrubconfigerror/actor.py
index 155536f..9c894e6 100644
--- a/repos/system_upgrade/el7toel8/actors/detectgrubconfigerror/actor.py
+++ b/repos/system_upgrade/el7toel8/actors/detectgrubconfigerror/actor.py
@@ -4,7 +4,7 @@ from leapp.libraries.common.config import architecture
 from leapp.models import GrubConfigError
 from leapp.reporting import Report, create_report
 from leapp import reporting
-from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
 
 
 class DetectGrubConfigError(Actor):
@@ -15,7 +15,7 @@ class DetectGrubConfigError(Actor):
     name = 'detect_grub_config_error'
     consumes = ()
     produces = (Report, GrubConfigError)
-    tags = (ChecksPhaseTag, IPUWorkflowTag)
+    tags = (FactsPhaseTag, IPUWorkflowTag)
 
     def process(self):
         if architecture.matches_architecture(architecture.ARCH_S390X):
-- 
2.21.0

kernel command line args are lost

Actual behavior

upgrade initramfs still inherits Linux command line arguments from the original kernel, but that's the last one: further kernels don't have them.

To Reproduce

  1. add arguments to current kernel
  2. install leapp
  3. run leapp upgrade --debug
  4. reboot
  5. wait for upgrade to finish
  6. observe kernel command line args

Expected behavior

The args you added are still there.

System information (please complete the following information):

  • leapp-0.7.0-1.201906241401Z.cfafac5.master.el7_6.noarch
  • leapp-repository-0.7.0-1.201906211909Z.39e21f2.master.el7_6.noarch

Additional context

grubby --info before calling leapp:

index=0
kernel=/boot/vmlinuz-3.10.0-957.21.3.el7.x86_64
args="ro crashkernel=auto rd.lvm.lv=rhel_kvm-06-guest27/root rd.lvm.lv=rhel_kvm-06-guest27/swap console=ttyS0,115200 LANG=en_US.UTF-8 debug rd.upgrade.debug=1 rd.debug=1 plymouth.enable=0 systemd.log_target=console systemd.journald.forward_to_console"
root=/dev/mapper/rhel_kvm--06--guest27-root
initrd=/boot/initramfs-3.10.0-957.21.3.el7.x86_64.img
title=Red Hat Enterprise Linux Server (3.10.0-957.21.3.el7.x86_64) 7.6 (Maipo)

Excerpts from console:

[...]
Linux version 4.18.0-80.1.2.el8_0.x86_64 ([email protected]) (gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)) #1 SMP Sun Apr 28 09:21:22 UTC 2019
Command line: BOOT_IMAGE=/vmlinuz-upgrade.x86_64 root=/dev/mapper/rhel_kvm--06--guest27-root ro crashkernel=auto rd.lvm.lv=rhel_kvm-06-guest27/root rd.lvm.lv=rhel_kvm-06-guest27/swap console=ttyS0,115200 LANG=en_US.UTF-8 debug rd.upgrade.debug=1 rd.debug=1 plymouth.enable=0 systemd.log_target=console systemd.journald.forward_to_console enforcing=0 rd.plymouth=0
[...]
Linux version 4.18.0-80.1.2.el8_0.x86_64 ([email protected]) (gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)) #1 SMP Sun Apr 28 09:21:22 UTC 2019
Command line: BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-80.1.2.el8_0.x86_64 root=/dev/mapper/rhel_kvm--06--guest27-root ro crashkernel=auto rd.lvm.lv=rhel_kvm-06-guest27/root rd.lvm.lv=rhel_kvm-06-guest27/swap console=ttyS0,115200 net.ifnames=0
[...]
Linux version 4.18.0-80.1.2.el8_0.x86_64 ([email protected]) (gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)) #1 SMP Sun Apr 28 09:21:22 UTC 2019
Command line: BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-80.1.2.el8_0.x86_64 root=/dev/mapper/rhel_kvm--06--guest27-root ro crashkernel=auto rd.lvm.lv=rhel_kvm-06-guest27/root rd.lvm.lv=rhel_kvm-06-guest27/swap console=ttyS0,115200 net.ifnames=0
[...]

This effectively disables systemd debug from FirstBoot so it prevents us from investigating other issues.

Do not call script through /bin/sh and use env param of call

Source:

Request:

  • do not call the script through /bin/sh
  • use env param of run() framework stdlib function (can be passed through IsolatedActions.call() as well)

The original way:

context.call([
    '/bin/sh', '-c',
    'LEAPP_ADD_DRACUT_MODULES="{modules}" LEAPP_KERNEL_ARCH={arch} '
    'LEAPP_DRACUT_INSTALL_FILES={files} {cmd}'.format(
        modules=','.join([mod.name for mod in modules]),
        arch=api.current_actor().configuration.architecture,
        files=' '.join(install_files),
        cmd=os.path.join('/', INITRAM_GEN_SCRIPT_NAME))
])

The requested way:

context.call(
    [os.path.join('/', INITRAM_GEN_SCRIPT_NAME)],
     env={'LEAPP_ADD_DRACUT_MODULES': ','.join([mod.name for mod in modules]),
          'LEAPP_KERNEL_ARCH': api.current_actor().configuration.architecture,
          'LEAPP_DRACUT_INSTALL_FILES': ' '.join(install_files)
        }
)

Credit: @AloisMahdal.

[RFE] Give more info than "unsupported OS"

Actual behavior

When I schedule upgrade from 7.6, I get inhinbit:

============================================================
                           ERRORS                           
============================================================

2020-03-09 07:32:07.110274 [ERROR] Actor: verify_check_results
Message: Unsupported OS

============================================================
                       END OF ERRORS                        
============================================================

To Reproduce
Steps to reproduce the behavior

  1. Get RHEL-7.6
  2. subscribe to CDN
  3. install leapp (from master)
  4. run LEAPP_DEVEL_RPMS_ALL_SIGNED=1 LEAPP_UNSUPPORTED=1 leapp upgrade --debug
  5. See error

Expected behavior

Say more about what leapp does not like about my OS. (Is it the
source OS or target OS? What is supported?)

System information (please complete the following information):

  • RHEL-7.6

  • Linux some-host.redhat.com 3.10.0-957.27.2.el7.x86_64 #1 SMP Tue Jul 9 16:53:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

    leapp-0.9.0-100.202003021951Z.69f3f8c.master.el7_6
    leapp-repository-0.9.0-100.202003051725Z.5e21253.master.el7_6

Update contribution guidelines - code style, actor's description

Style guide:

  • the use of a trailing comma in tuples with only one element, e.g. produces = (MyModelTag,)
  • what specific style of multiline docstring to use (PEP257 does not dictate one style or another)

The description should be separated in two: brief overview description for users (displayable in a list of actors, e.g. in Cockpit) and thorough behavioral description for devels and testers. Mention that the behavioral description of an actor should serve not only for component test developers but also for E2E test devels/QEs.

I ran the upgrade without being subscribed and I'm getting a traceback:

I ran the upgrade without being subscribed and I'm getting a traceback:

2019-06-26 13:17:30.903 INFO     PID: 21332 leapp.workflow.FactsCollection: Executing actor target_userspace_creator 
Process Process-143:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 63, in _do_run
    target_actor(logger=logger, messaging=messaging, config_model=config_model).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 320, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/targetuserspacecreator/actor.py", line 25, in process
    userspacegen.perform()
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py", line 140, in perform
    api.log.warn("Could not receive RHSM information - Is this system registered?")
AttributeError: 'module' object has no attribute 'log'

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

Originally posted by @bocekm in #44 (comment)

Actor prepare_upgrade_transaction unexpectedly terminated

Actual behavior
'leapp upgrade --debug' fails with the following error:

All local data refreshed
Container merged exited successfully.

Process Process-63:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 154, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/prepareupgradetransaction/actor.py", line 233, in process
    error = self.dnf_shell_rpm_download(ofs_info)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/prepareupgradetransaction/actor.py", line 174, in dnf_shell_rpm_download
    with open(os.path.join(overlayfs_info.merged, 'var', 'lib', 'leapp', 'dnf-script.txt'), 'w+') as script:
IOError: [Errno 2] No such file or directory: '/tmp/leapp-overlay/merged/var/lib/leapp/dnf-script.txt'

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

To Reproduce
Steps to reproduce the behavior

  1. install 'leapp'
  2. run 'leapp upgrade --debug'
  3. See error

Expected behavior
leapp upgrade successfully

System information (please complete the following information):

[root@VM ~]# cat /etc/system-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[root@VM ~]# uname -a
Linux VM 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@VM ~]# rpm -qa "*leapp*"
leapp-repository-0.4.0-1.201901171316Z.88a3a26.master.el7_5.noarch
python2-leapp-0.4.0-1.201901211348Z.9e658c7.master.el7_5.noarch
leapp-repository-data-0.4.0-1.201901171316Z.88a3a26.master.el7_5.noarch
leapp-0.4.0-1.201901211348Z.9e658c7.master.el7_5.noarch

Additional context
log

2019-01-22 14:39:16.321 INFO     PID: 13814 leapp: Logging has been initialized
2019-01-22 14:39:16.334 INFO     PID: 13814 leapp.repository.common: A new repository 'common' is initialized at /etc/leapp/repos.d/common
2019-01-22 14:39:16.339 DEBUG    PID: 13814 leapp.repository.common: Scanning path /etc/leapp/repos.d/common
2019-01-22 14:39:16.343 DEBUG    PID: 13814 leapp.repository.common: Adding topic - topics/systeminfo.py
2019-01-22 14:39:16.348 INFO     PID: 13814 leapp.repository.system_upgrade_el7toel8: A new repository 'system_upgrade_el7toel8' is initialized at /etc/leapp/repos.d/system_upgrade/el7toel8
2019-01-22 14:39:16.352 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8
2019-01-22 14:39:16.356 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding topic - topics/networkinfo.py
2019-01-22 14:39:16.360 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding topic - topics/transaction.py
2019-01-22 14:39:16.364 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/storageinfo.py
2019-01-22 14:39:16.367 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/installedrpm.py
2019-01-22 14:39:16.370 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/ifaceresult.py
2019-01-22 14:39:16.374 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/selinuxdecisions.py
2019-01-22 14:39:16.378 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/installedredhatsignedrpm.py
2019-01-22 14:39:16.381 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/rpmtransactiontasks.py
2019-01-22 14:39:16.384 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/osreleasefacts.py
2019-01-22 14:39:16.387 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/reports.py
2019-01-22 14:39:16.390 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/targetrepositories.py
2019-01-22 14:39:16.393 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/firewalldecisionm.py
2019-01-22 14:39:16.396 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding model - models/systemfacts.py
2019-01-22 14:39:16.400 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/rpmtransactionconfigtaskscollector
2019-01-22 14:39:16.404 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/rpmtransactionconfigtaskscollector
2019-01-22 14:39:16.407 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/scheduleselinuxrelabeling
2019-01-22 14:39:16.410 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/scheduleselinuxrelabeling
2019-01-22 14:39:16.413 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/osreleasecollector
2019-01-22 14:39:16.416 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/osreleasecollector
2019-01-22 14:39:16.419 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/storagescanner
2019-01-22 14:39:16.422 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/storagescanner
2019-01-22 14:39:16.425 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/systemfacts
2019-01-22 14:39:16.429 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/systemfacts
2019-01-22 14:39:16.432 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/removeinitrdbootentry
2019-01-22 14:39:16.436 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/removeinitrdbootentry
2019-01-22 14:39:16.440 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/createinitrdbootentry
2019-01-22 14:39:16.444 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/createinitrdbootentry
2019-01-22 14:39:16.447 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/dnfshellrpmupgrade
2019-01-22 14:39:16.451 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/dnfshellrpmupgrade
2019-01-22 14:39:16.455 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/removeresumeservice
2019-01-22 14:39:16.458 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/removeresumeservice
2019-01-22 14:39:16.462 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/prepareupgradetransaction
2019-01-22 14:39:16.466 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/prepareupgradetransaction
2019-01-22 14:39:16.470 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/peseventsscanner
2019-01-22 14:39:16.474 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/peseventsscanner
2019-01-22 14:39:16.478 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/checkselinux
2019-01-22 14:39:16.481 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/checkselinux
2019-01-22 14:39:16.485 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/redhatsignedrpmcheck
2019-01-22 14:39:16.488 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/redhatsignedrpmcheck
2019-01-22 14:39:16.492 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/redhatsignedrpmscanner
2019-01-22 14:39:16.495 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/redhatsignedrpmscanner
2019-01-22 14:39:16.499 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/checkosrelease
2019-01-22 14:39:16.502 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/checkosrelease
2019-01-22 14:39:16.506 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/netifacescanner
2019-01-22 14:39:16.509 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/netifacescanner
2019-01-22 14:39:16.513 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/checksystemarch
2019-01-22 14:39:16.516 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/checksystemarch
2019-01-22 14:39:16.520 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/verifycheckresults
2019-01-22 14:39:16.523 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/verifycheckresults
2019-01-22 14:39:16.527 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/firewalldecision
2019-01-22 14:39:16.530 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/firewalldecision
2019-01-22 14:39:16.534 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/checkbtrfs
2019-01-22 14:39:16.537 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/checkbtrfs
2019-01-22 14:39:16.541 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/updateetcsysconfigkernel
2019-01-22 14:39:16.544 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/updateetcsysconfigkernel
2019-01-22 14:39:16.548 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/rpmscanner
2019-01-22 14:39:16.551 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/rpmscanner
2019-01-22 14:39:16.555 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/transactionworkarounds
2019-01-22 14:39:16.558 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/transactionworkarounds
2019-01-22 14:39:16.562 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/filterrpmtransactionevents
2019-01-22 14:39:16.565 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/filterrpmtransactionevents
2019-01-22 14:39:16.569 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/createresumeservice
2019-01-22 14:39:16.573 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/createresumeservice
2019-01-22 14:39:16.576 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/firewalldisable
2019-01-22 14:39:16.580 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/firewalldisable
2019-01-22 14:39:16.583 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/setuptargetrepos
2019-01-22 14:39:16.586 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/setuptargetrepos
2019-01-22 14:39:16.589 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/inhibitwhenluks
2019-01-22 14:39:16.592 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/inhibitwhenluks
2019-01-22 14:39:16.595 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8/actors/setpermissiveselinux
2019-01-22 14:39:16.599 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding actor - actors/setpermissiveselinux
2019-01-22 14:39:16.603 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/initramstart.py
2019-01-22 14:39:16.606 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/ipu.py
2019-01-22 14:39:16.609 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/rpmupgrade.py
2019-01-22 14:39:16.612 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/report.py
2019-01-22 14:39:16.616 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/download.py
2019-01-22 14:39:16.619 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/facts.py
2019-01-22 14:39:16.622 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/thirdpartyapplications.py
2019-01-22 14:39:16.625 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/firstboot.py
2019-01-22 14:39:16.629 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/applications.py
2019-01-22 14:39:16.631 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/checks.py
2019-01-22 14:39:16.634 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/interimpreparation.py
2019-01-22 14:39:16.638 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/preparation.py
2019-01-22 14:39:16.641 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/latetests.py
2019-01-22 14:39:16.645 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding tag - tags/finalization.py
2019-01-22 14:39:16.648 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding workflow - workflows/inplace_upgrade.py
2019-01-22 14:39:16.651 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Adding files - files
2019-01-22 14:39:16.670 DEBUG    PID: 13814 leapp.repository.common: Loading repository common
2019-01-22 14:39:16.674 DEBUG    PID: 13814 leapp.repository.common: Loading tag modules
2019-01-22 14:39:16.677 DEBUG    PID: 13814 leapp.repository.common: Loading topic modules
2019-01-22 14:39:16.699 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Loading repository system_upgrade_el7toel8
2019-01-22 14:39:16.703 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Loading tag modules
2019-01-22 14:39:16.722 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Loading topic modules
2019-01-22 14:39:16.727 DEBUG    PID: 13814 leapp.repository.common: Loading model modules
2019-01-22 14:39:16.730 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Loading model modules
2019-01-22 14:39:16.746 DEBUG    PID: 13814 leapp.repository.common: Extending PATH for common tool paths
2019-01-22 14:39:16.750 DEBUG    PID: 13814 leapp.repository.common: Extending LEAPP_COMMON_FILES for common file paths
2019-01-22 14:39:16.753 DEBUG    PID: 13814 leapp.repository.common: Loading built-in common libraries
2019-01-22 14:39:16.757 DEBUG    PID: 13814 leapp.repository.common: Loading repository provided common libraries
2019-01-22 14:39:16.759 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Extending PATH for common tool paths
2019-01-22 14:39:16.762 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Extending LEAPP_COMMON_FILES for common file paths
2019-01-22 14:39:16.765 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Loading repository provided common libraries
2019-01-22 14:39:16.768 DEBUG    PID: 13814 leapp.repository.common: Running actor discovery
2019-01-22 14:39:16.771 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Running actor discovery
2019-01-22 14:39:16.774 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/rpmtransactionconfigtaskscollector
2019-01-22 14:39:16.791 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/scheduleselinuxrelabeling
2019-01-22 14:39:16.803 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/osreleasecollector
2019-01-22 14:39:16.815 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/storagescanner
2019-01-22 14:39:16.828 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/systemfacts
2019-01-22 14:39:16.842 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/removeinitrdbootentry
2019-01-22 14:39:16.854 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/createinitrdbootentry
2019-01-22 14:39:16.865 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/dnfshellrpmupgrade
2019-01-22 14:39:16.878 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/removeresumeservice
2019-01-22 14:39:16.890 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/prepareupgradetransaction
2019-01-22 14:39:16.904 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/peseventsscanner
2019-01-22 14:39:16.917 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/checkselinux
2019-01-22 14:39:16.930 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/redhatsignedrpmcheck
2019-01-22 14:39:16.943 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/redhatsignedrpmscanner
2019-01-22 14:39:16.956 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/checkosrelease
2019-01-22 14:39:16.969 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/netifacescanner
2019-01-22 14:39:16.983 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/checksystemarch
2019-01-22 14:39:17.1   DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/verifycheckresults
2019-01-22 14:39:17.15  DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/firewalldecision
2019-01-22 14:39:17.28  DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/checkbtrfs
2019-01-22 14:39:17.41  DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/updateetcsysconfigkernel
2019-01-22 14:39:17.54  DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/rpmscanner
2019-01-22 14:39:17.67  DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/transactionworkarounds
2019-01-22 14:39:17.79  DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/filterrpmtransactionevents
2019-01-22 14:39:17.91  DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/createresumeservice
2019-01-22 14:39:17.104 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/firewalldisable
2019-01-22 14:39:17.116 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/setuptargetrepos
2019-01-22 14:39:17.129 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/inhibitwhenluks
2019-01-22 14:39:17.142 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Starting actor discovery in actors/setpermissiveselinux
2019-01-22 14:39:17.156 DEBUG    PID: 13814 leapp.repository.common: Loading workflow modules
2019-01-22 14:39:17.161 DEBUG    PID: 13814 leapp.repository.system_upgrade_el7toel8: Loading workflow modules
2019-01-22 14:39:17.168 INFO     PID: 13814 leapp.workflow: Starting workflow execution: InplaceUpgrade - ID: 21184cec-7e6f-4cb5-bf54-572d60ac6153
2019-01-22 14:39:17.173 INFO     PID: 13814 leapp.workflow: Starting phase FactsCollection
2019-01-22 14:39:17.176 INFO     PID: 13814 leapp.workflow.FactsCollection: Starting stage Before of phase FactsCollection
2019-01-22 14:39:17.183 INFO     PID: 13814 leapp.workflow.FactsCollection: Starting stage Main of phase FactsCollection
2019-01-22 14:39:17.187 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor rpm_scanner 
2019-01-22 14:39:18.371 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor rpm_transaction_config_tasks_collector 
2019-01-22 14:39:18.426 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor system_facts 
2019-01-22 14:39:18.969 DEBUG    PID: 13958 get_firewalld_status: The firewalld service is likely not active
2019-01-22 14:39:18.984 DEBUG    PID: 13958 get_firewalld_status: The firewalld service is likely not enabled nor running
2019-01-22 14:39:18.996 DEBUG    PID: 13958 get_firewalld_status: The iptables service is likely not active
2019-01-22 14:39:19.8   DEBUG    PID: 13958 get_firewalld_status: The iptables service is likely not enabled nor running
2019-01-22 14:39:19.154 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor os_release_collector 
2019-01-22 14:39:19.208 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor transaction_workarounds 
2019-01-22 14:39:19.261 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor storage_scanner 
File descriptor 9 (/dev/urandom) leaked on pvs invocation. Parent PID 14068: /usr/bin/python2
File descriptor 9 (/dev/urandom) leaked on vgs invocation. Parent PID 14068: /usr/bin/python2
File descriptor 9 (/dev/urandom) leaked on lvdisplay invocation. Parent PID 14068: /usr/bin/python2
2019-01-22 14:39:19.430 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor red_hat_signed_rpm_scanner 
2019-01-22 14:39:19.634 INFO     PID: 13814 leapp.workflow.FactsCollection: Skipping experimental actor pes_events_scanner
2019-01-22 14:39:19.639 INFO     PID: 13814 leapp.workflow.FactsCollection: Executing actor check_rpm_transaction_events 
2019-01-22 14:39:19.771 INFO     PID: 13814 leapp.workflow.FactsCollection: Starting stage After of phase FactsCollection
2019-01-22 14:39:19.780 INFO     PID: 13814 leapp.workflow: Starting phase Checks
2019-01-22 14:39:19.784 INFO     PID: 13814 leapp.workflow.Checks: Starting stage Before of phase Checks
2019-01-22 14:39:19.790 INFO     PID: 13814 leapp.workflow.Checks: Starting stage Main of phase Checks
2019-01-22 14:39:19.793 INFO     PID: 13814 leapp.workflow.Checks: Executing actor check_os_release 
2019-01-22 14:39:19.844 INFO     PID: 13814 leapp.workflow.Checks: Executing actor check_system_arch 
2019-01-22 14:39:19.899 INFO     PID: 13814 leapp.workflow.Checks: Executing actor setuptargetrepos 
2019-01-22 14:39:19.964 INFO     PID: 13814 leapp.workflow.Checks: Executing actor check_luks_and_inhibit 
2019-01-22 14:39:20.21  INFO     PID: 13814 leapp.workflow.Checks: Executing actor check_btrfs 
2019-01-22 14:39:20.202 INFO     PID: 13814 leapp.workflow.Checks: Skipping experimental actor firewalld_decision
2019-01-22 14:39:20.206 INFO     PID: 13814 leapp.workflow.Checks: Executing actor red_hat_signed_rpm_check 
2019-01-22 14:39:20.264 INFO     PID: 13814 leapp.workflow.Checks: Executing actor check_se_linux 
2019-01-22 14:39:20.455 INFO     PID: 13814 leapp.workflow.Checks: Starting stage After of phase Checks
2019-01-22 14:39:20.468 INFO     PID: 13814 leapp.workflow: Starting phase Reports
2019-01-22 14:39:20.472 INFO     PID: 13814 leapp.workflow.Reports: Starting stage Before of phase Reports
2019-01-22 14:39:20.480 INFO     PID: 13814 leapp.workflow.Reports: Starting stage Main of phase Reports
2019-01-22 14:39:20.484 INFO     PID: 13814 leapp.workflow.Reports: Executing actor verify_check_results 
2019-01-22 14:39:20.536 INFO     PID: 14378 leapp.workflow.Reports.verify_check_results: Generated report at /tmp/leapp-report.txt
2019-01-22 14:39:20.551 INFO     PID: 13814 leapp.workflow.Reports: Starting stage After of phase Reports
2019-01-22 14:39:20.560 INFO     PID: 13814 leapp.workflow: Starting phase Download
2019-01-22 14:39:20.564 INFO     PID: 13814 leapp.workflow.Download: Starting stage Before of phase Download
2019-01-22 14:39:20.569 INFO     PID: 13814 leapp.workflow.Download: Starting stage Main of phase Download
2019-01-22 14:39:20.572 INFO     PID: 13814 leapp.workflow.Download: Executing actor prepare_upgrade_transaction 
Spawning container merged on /tmp/leapp-overlay/merged.
Press ^] three times within 1s to kill container.
Host and machine ids are equal (c60ae47738b342e99295bbcca8ac7a3a): refusing to link journals
2019-01-22 14:39:27,452 [INFO] subscription-manager:1:MainThread @managercli.py:457 - X-Correlation-ID: d5ff08ddb6be4264bc37c09167c79658
2019-01-22 14:39:27,452 [INFO] subscription-manager:1:MainThread @managercli.py:346 - Client Versions: {'subscription-manager': '1.21.10-2.el7'}
2019-01-22 14:39:27,453 [INFO] subscription-manager:1:MainThread @connection.py:871 - Connection built: host=subscription.test port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2019-01-22 14:39:27,454 [INFO] subscription-manager:1:MainThread @connection.py:871 - Connection built: host=subscription.test port=443 handler=/subscription auth=none
2019-01-22 14:39:27,455 [INFO] subscription-manager:1:MainThread @managercli.py:322 - Consumer Identity name=VM uuid=3481e26c-fa9b-4ef0-a310-c0b2c1c52bb0
2019-01-22 14:39:28,607 [INFO] subscription-manager:1:MainThread @connection.py:588 - Response: status=204, requestUuid=5357bac8-6cef-4d60-9930-06adee45c960, request="PUT /subscription/consumers/3481e26c-fa9b-4ef0-a310-c0b2c1c52bb0"
2019-01-22 14:39:29,844 [INFO] subscription-manager:1:MainThread @connection.py:588 - Response: status=200, request="GET /subscription/"
2019-01-22 14:39:31,286 [INFO] subscription-manager:1:MainThread @connection.py:588 - Response: status=200, requestUuid=effd0ccf-9de0-45ea-8ce8-83dea82d99bd, request="GET /subscription/consumers/3481e26c-fa9b-4ef0-a310-c0b2c1c52bb0/content_overrides"
2019-01-22 14:39:31,287 [WARNING] subscription-manager:1:MainThread @repolib.py:973 - /var/lib/rhsm/repo_server_val/ does not exist, turning manage_repos off.
2019-01-22 14:39:33,198 [INFO] subscription-manager:1:MainThread @connection.py:588 - Response: status=200, requestUuid=9c4400c8-b1a9-4104-bd85-ac5b95adffda, request="GET /subscription/consumers/3481e26c-fa9b-4ef0-a310-c0b2c1c52bb0/release"
2019-01-22 14:39:37,067 [INFO] subscription-manager:1:MainThread @repolib.py:494 - repos updated: Repo updates
...
...
...
2019-01-22 14:39:50,638 [INFO] subscription-manager:1:MainThread @cert_sorter.py:205 - Product status: valid_products=230 partial_products= expired_products= unentitled_producs= future_products= valid_until=2019-07-19 00:00:00+00:00
1 local certificate has been deleted.
All local data refreshed
Container merged exited successfully.

Process Process-63:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 154, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/prepareupgradetransaction/actor.py", line 233, in process
    error = self.dnf_shell_rpm_download(ofs_info)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/prepareupgradetransaction/actor.py", line 174, in dnf_shell_rpm_download
    with open(os.path.join(overlayfs_info.merged, 'var', 'lib', 'leapp', 'dnf-script.txt'), 'w+') as script:
IOError: [Errno 2] No such file or directory: '/tmp/leapp-overlay/merged/var/lib/leapp/dnf-script.txt'

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

Upgrade failure due to missing /var/cache/dnf/metadata_lock.pid

Actual behavior
A clear and concise description of what the bug is.

To Reproduce

  1. morf upg el7toel8 @noop | sh
  2. See error in leapp.err

Note that the bug is not reproducible and was encountered only once.

Expected behavior
Successful upgrade

System information (please complete the following information):

distro: RHEL-7.6, arch: x86_64, family: RedHatEnterpriseLinux7, variant:Server

2019-06-17T09:20:44-0400 678735f59d39d4315408271c36f03ae0 1.7M /etc/leapp/files/pes-events.json
2019-06-17T09:20:46-0400 ab4673fac8c7735aa9d48c056a53c21b 4.0K /etc/leapp/files/repomap.csv
leapp-0.7.0-1.201906141216Z.cb60658.master.el7_6.noarch
leapp-repository-0.7.0-1.201906121148Z.d8387b4.master.el7_6.noarch
leapp-repository-sos-plugin-0.7.0-1.201906121148Z.d8387b4.master.el7_6.noarch
python2-leapp-0.7.0-1.201906141216Z.cb60658.master.el7_6.noarch
snactor-0.7.0-1.201906141216Z.cb60658.master.el7_6.noarch

Logs:

42|d4958737-2572-4302-804a-3f5374fa09cd|2019-06-17T13:44:25.690981Z|errors|ErrorModel|prepare_upgrade_transaction|Download|76afa99a5c4c7e9a382fa7ae4ec970d8e3c2b556b37d05f082404efbfa1d7d3d|{"actor": "prepare_upgrade_transaction", "details": null, "message": " A Leapp Command Error occurred.  ", "severity": "error", "time": "2019-06-17T09:44:25.690688Z"}|koza-2.lab.eng.bos.redhat.com
2019-06-17 09:42:53.765 INFO     PID: 14168 leapp.workflow: Starting phase Download
2019-06-17 09:42:53.868 INFO     PID: 14168 leapp.workflow.Download: Starting stage Before of phase Download
2019-06-17 09:42:54.53  INFO     PID: 14168 leapp.workflow.Download: Starting stage Main of phase Download
2019-06-17 09:42:54.150 INFO     PID: 14168 leapp.workflow.Download: Executing actor prepare_upgrade_transaction 
2019-06-17 09:42:54.640 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [subscription-manager list --consumed]
2019-06-17 09:43:15.217 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [subscription-manager list --consumed]
2019-06-17 09:43:15.225 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/usr/bin/dnf clean all]
2019-06-17 09:43:15.803 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/usr/bin/dnf clean all]
2019-06-17 09:43:15.889 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/mount -t overlay overlay2 -o lowerdir=/,upperdir=/var/lib/leapp/scratch/mounts/upper,workdir=/var/lib/leapp/scratch/mounts/work /var/lib/leapp/scratch/mounts/merged]
2019-06-17 09:43:16.299 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/mount -t overlay overlay2 -o lowerdir=/,upperdir=/var/lib/leapp/scratch/mounts/upper,workdir=/var/lib/leapp/scratch/mounts/work /var/lib/leapp/scratch/mounts/merged]
2019-06-17 09:43:16.316 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [subscription-manager release]
2019-06-17 09:43:18.852 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [subscription-manager release]
2019-06-17 09:43:18.953 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged subscription-manager release --unset]
Host and machine ids are equal (e855bb79afce4739a0ae238b8b386cc5): refusing to link journals
2019-06-17 09:43:26.761 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged subscription-manager release --unset]
2019-06-17 09:43:26.812 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged rm -f /etc/pki/product-default/69.pem]
Host and machine ids are equal (e855bb79afce4739a0ae238b8b386cc5): refusing to link journals
2019-06-17 09:43:27.125 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged rm -f /etc/pki/product-default/69.pem]
2019-06-17 09:43:27.150 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged subscription-manager refresh]
Host and machine ids are equal (e855bb79afce4739a0ae238b8b386cc5): refusing to link journals
2019-06-17 09:43:40.941 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged subscription-manager refresh]
2019-06-17 09:43:40.999 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged subscription-manager repos]
Host and machine ids are equal (e855bb79afce4739a0ae238b8b386cc5): refusing to link journals
2019-06-17 09:44:02.158 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged subscription-manager repos]
2019-06-17 09:44:02.268 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged -- /bin/bash -c /etc/leapp/repos.d/system_upgrade/el7toel8/tools/handleyumconfig]
Host and machine ids are equal (e855bb79afce4739a0ae238b8b386cc5): refusing to link journals
2019-06-17 09:44:03.222 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged -- /bin/bash -c /etc/leapp/repos.d/system_upgrade/el7toel8/tools/handleyumconfig]
2019-06-17 09:44:03.255 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/rm -rf /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:03.413 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/rm -rf /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:03.451 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/mkdir -p /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:03.603 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/mkdir -p /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:03.645 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/mount --bind /var/cache/dnf /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:03.786 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/mount --bind /var/cache/dnf /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:03.822 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged -- /bin/bash -c /usr/bin/dnf rhel-upgrade download /var/lib/leapp/dnf-plugin-data.txt]
Host and machine ids are equal (e855bb79afce4739a0ae238b8b386cc5): refusing to link journals
[Errno 2] No such file or directory: '/var/cache/dnf/metadata_lock.pid'
2019-06-17 09:44:24.527 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [systemd-nspawn --register=no --quiet -D /var/lib/leapp/scratch/mounts/merged -- /bin/bash -c /usr/bin/dnf rhel-upgrade download /var/lib/leapp/dnf-plugin-data.txt]
2019-06-17 09:44:24.763 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [cp -a /var/lib/leapp/scratch/mounts/merged/debugdata /var/log/leapp/dnf-debugdata/]
cp: cannot stat ‘/var/lib/leapp/scratch/mounts/merged/debugdata’: No such file or directory
2019-06-17 09:44:25.75  DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [cp -a /var/lib/leapp/scratch/mounts/merged/debugdata /var/log/leapp/dnf-debugdata/]
2019-06-17 09:44:25.104 WARNING  PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: Cannot copy new debugdata. A Leapp Command Error occurred.  
2019-06-17 09:44:25.135 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/umount /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:25.613 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/umount /var/lib/leapp/scratch/mounts/merged/var/cache/dnf]
2019-06-17 09:44:25.734 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is started: [/bin/umount -fl /var/lib/leapp/scratch/mounts/merged]
2019-06-17 09:44:26.405 DEBUG    PID: 16227 leapp.workflow.Download.prepare_upgrade_transaction: External command is finished: [/bin/umount -fl /var/lib/leapp/scratch/mounts/merged]
2019-06-17 09:44:26.532 INFO     PID: 14168 leapp.workflow.Download: Starting stage After of phase Download
2019-06-17 09:44:26.785 INFO     PID: 14168 leapp.workflow: Workflow interrupted due to the FailPhase error policy

what to do with "missing" rpms in target repos?

Currently we would like to see what packages we expect to install on the target system and we cannot find them. That can happen because of various reasons, but the one that hit many systems is problem with dscoverability of rpms inside rpm modules (...sigh...). When module is not enabled, we cannot discover rpms inside. That's something that should be covered in future;

  • by reporting the missing rpms / warn users
  • or by stopping upgrade even
  • ...

Relates to PRs #405 and #403.

Model inheritance doesn't work as expected in certain cases

Actual behavior
If several models are inherited from the same model but don't have a list field redefined the
api.consume(OtherModelB) call returns items of both OtherModelB and OtherModelC.

from leapp.models import fields, Model, SomeModelA

SomeModelA(Model):
    items =  fields.List(fields.Model(RPM), default=[])

class OtherModelB(SomeModelA):
    pass

class OtherModelC(SomeModelA):
   pass

To Reproduce
Checkout PR 15835f8 and run tests

LEAPP_TESTED_ACTOR="$PWD/actors/redhatsignedrpmscanner" pytest -sv actors/redhatsignedrpmscanner/

Do not use efibootmgr when it's not installed (non-uefi)

Otherwise

    dracut: ========================================================================
    dracut: *** Creating initramfs image file '/artifacts/initramfs-upgrade.x86_64.img' done ***
    2019-10-30 07:11:47.838 DEBUG    PID: 1132 leapp.workflow.InterimPreparation.initram_disk_generator: External command has finished: ['systemd-nspawn', '--register=no', '--quiet', '-D', u'/var/lib/leapp/el8userspace', '/bin/sh', '-c', 'LEAPP_ADD_DRACUT_MODULES="sys-upgrade-redhat,sys-upgrade" LEAPP_KERNEL_ARCH=x86_64 LEAPP_DRACUT_INSTALL_FILES="" /generate-initram.sh']
    2019-10-30 07:11:47.925 INFO     PID: 29959 leapp.workflow.InterimPreparation: Executing actor add_upgrade_boot_entry
    2019-10-30 07:11:47.954 DEBUG    PID: 7580 leapp.workflow.InterimPreparation.add_upgrade_boot_entry: External command has started: ['/usr/sbin/grubby', '--remove-kernel', '/boot/vmlinuz-upgrade.x86_64']
    2019-10-30 07:11:47.975 DEBUG    PID: 7580 leapp.workflow.InterimPreparation.add_upgrade_boot_entry: External command has finished: ['/usr/sbin/grubby', '--remove-kernel', '/boot/vmlinuz-upgrade.x86_64']
    2019-10-30 07:11:47.977 DEBUG    PID: 7580 leapp.workflow.InterimPreparation.add_upgrade_boot_entry: External command has started: ['/usr/sbin/grubby', '--add-kernel', '/boot/vmlinuz-upgrade.x86_64', '--initrd', '/boot/initramfs-upgrade.x86_64.img', '--title', 'RHEL-Upgrade-Initramfs', '--copy-default', '--make-default', '--args', 'debug enforcing=0 rd.plymouth=0 plymouth.enable=0']
    2019-10-30 07:11:48.31  DEBUG    PID: 7580 leapp.workflow.InterimPreparation.add_upgrade_boot_entry: External command has finished: ['/usr/sbin/grubby', '--add-kernel', '/boot/vmlinuz-upgrade.x86_64', '--initrd', '/boot/initramfs-upgrade.x86_64.img', '--title', 'RHEL-Upgrade-Initramfs', '--copy-default', '--make-default', '--args', 'debug enforcing=0 rd.plymouth=0 plymouth.enable=0']
    2019-10-30 07:11:48.40  INFO     PID: 29959 leapp.workflow.InterimPreparation: Executing actor efi_interim_fix
    2019-10-30 07:11:48.67  DEBUG    PID: 7629 leapp.workflow.InterimPreparation.efi_interim_fix: External command has started: ['/sbin/efibootmgr']
    2019-10-30 07:11:48.78  DEBUG    PID: 7635 leapp.workflow.InterimPreparation.efi_interim_fix: External command has finished: ['/sbin/efibootmgr']
    Process Process-283:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
        self.run()
      File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
        self._target(*self._args, **self._kwargs)
      File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 63, in _do_run
        target_actor(logger=logger, messaging=messaging, config_model=config_model).run(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 320, in run
        self.process(*args)
      File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/efibootorderfix/interim/actor.py", line 17, in process
        efi_reboot_fix.maybe_emit_updated_boot_entry()
      File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/efi_reboot_fix.py", line 27, in maybe_emit_updated_boot_entry
        efi_info = run(['/sbin/efibootmgr'], checked=False, split=True)
      File "/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py", line 177, in run
        result = _call(args, callback_raw=callback_raw, callback_linebuffered=callback_linebuffered, env=env)
      File "/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/call.py", line 218, in _call
        os.execvpe(command[0], command, env=environ)
      File "/usr/lib64/python2.7/os.py", line 353, in execvpe
        _execvpe(file, args, env)
      File "/usr/lib64/python2.7/os.py", line 368, in _execvpe
        func(file, *argrest)
    OSError: [Errno 2] No such file or directory

leapp upgrade command failing when selinux is disabled

Actual behavior
leapp upgrade command failing when selinux is disabled

To Reproduce
Steps to reproduce the behavior

  1. Disable SELinux
  2. run "leapp upgrade"

Expected behavior
leap upgrade command should work without any Traceback

System information (please complete the following information):

  • OS and version: (e.g. Fedora 29 or $ cat /etc/system-release)
    Red Hat Enterprise Linux Server release 7.6 (Maipo)
  • # uname -a
    Linux qe-blade-14.testrelm1001.test 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • # rpm -qa "*leapp*"
    python2-leapp-0.4.0-1.201901110920Z.a3beb13.master.el7_5.noarch
    leapp-0.4.0-1.201901110920Z.a3beb13.master.el7_5.noarch
    leapp-repository-0.4.0-0.201901111130Z.0be0a79.remove_test_repo.PR38.el7_5.noarch
    leapp-repository-data-0.4.0-0.201901111130Z.0be0a79.remove_test_repo.PR38.el7_5.noarch

Additional context
Console Output

  • # leapp upgrade
    2019-01-11 07:36:43.462 INFO PID: 1833 leapp: Logging has been initialized
    2019-01-11 07:36:43.595 INFO PID: 1833 leapp.repository.common: A new repository 'common' is initialized at /etc/leapp/repos.d/common
    2019-01-11 07:36:43.721 INFO PID: 1833 leapp.repository.system_upgrade_el7toel8: A new repository 'system_upgrade_el7toel8' is initialized at /etc/leapp/repos.d/system_upgrade/el7toel8
    2019-01-11 07:36:44.256 INFO PID: 1833 leapp.workflow: Starting workflow execution: InplaceUpgrade - ID: d6b52ce8-75cc-4193-89c3-2f4613b2c301
    2019-01-11 07:36:44.404 INFO PID: 1833 leapp.workflow: Starting phase Facts collection
    2019-01-11 07:36:44.529 INFO PID: 1833 leapp.workflow.Facts collection: Starting stage Before of phase Facts collection
    2019-01-11 07:36:44.779 INFO PID: 1833 leapp.workflow.Facts collection: Starting stage Main of phase Facts collection
    2019-01-11 07:36:44.904 INFO PID: 1833 leapp.workflow.Facts collection: Executing actor transaction_workarounds
    2019-01-11 07:36:45.321 INFO PID: 1833 leapp.workflow.Facts collection: Executing actor rpm_scanner
    2019-01-11 07:36:47.746 INFO PID: 1833 leapp.workflow.Facts collection: Executing actor rpm_transaction_config_tasks_collector
    2019-01-11 07:36:48.188 INFO PID: 1833 leapp.workflow.Facts collection: Executing actor os_release_collector
    2019-01-11 07:36:48.613 INFO PID: 1833 leapp.workflow.Facts collection: Executing actor red_hat_signed_rpm_scanner
    2019-01-11 07:36:49.339 INFO PID: 1833 leapp.workflow.Facts collection: Executing actor system_facts
    2019-01-11 07:36:49.677 WARNING PID: 2076 leapp.workflow.Facts collection.system_facts: Unable to read parameter "hotmod" of kernel module "ipmi_si"
    Process Process-41:
    Traceback (most recent call last):
    File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
    File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
    File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
    File "/usr/lib/python2.7/site-packages/leapp/actors/init.py", line 129, in run
    self.process(*args)
    File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/systemfacts/actor.py", line 21, in process
    selinux=systemfacts.get_selinux_status(),
    File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py", line 227, in get_selinux_status
    return SELinux(**outdata)
    File "/usr/lib/python2.7/site-packages/leapp/models/init.py", line 86, in init
    getattr(defined_fields[field], init_method)(kwargs, field, self)
    File "/usr/lib/python2.7/site-packages/leapp/models/fields/init.py", line 110, in from_initialization
    self._validate_model_value(value=source_value, name=name)
    File "/usr/lib/python2.7/site-packages/leapp/models/fields/init.py", line 166, in _validate_model_value
    super(BuiltinField, self)._validate_model_value(value, name)
    File "/usr/lib/python2.7/site-packages/leapp/models/fields/init.py", line 62, in _validate_model_value
    raise ModelViolationError('The value of "{name}" field is None, but this is not allowed'.format(name=name))
    ModelViolationError: The value of "policy" field is None, but this is not allowed

Actor prepare_upgrade_transaction unexpectedly terminated

[root@linux ~]# leapp upgrade
Process Process-62:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 299, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/storagescanner/actor.py", line 21, in process
    self.produce(library.get_storage_info())
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/storagescanner/libraries/library.py", line 200, in get_storage_info
    fstab=_get_fstab_info('/etc/fstab'),
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/storagescanner/libraries/library.py", line 15, in inner
    return list(f(*args, **kwargs))
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/storagescanner/libraries/library.py", line 90, in _get_fstab_info
    fs_spec, fs_file, fs_vfstype, fs_mntops, fs_freq, fs_passno = entry.split()
ValueError: need more than 4 values to unpack

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

To Reproduce
Steps to reproduce the behavior

install 'leapp'
run 'leapp upgrade'
See error

Expected behavior
leapp upgrade successfully

System information (please complete the following information):

[root@linux ~]# cat /etc/system-release
Red Hat Enterprise Linux Workstation release 7.6 (Maipo)

EDIT(pirat89): fixed formatting to make it readable

repository messes with import hooks

Actual behavior
Repository messes badly with import paths. It forces scripts inside git repository to use import leapp. It it is not fully configured (because Fedora 29 is not fully supported), even scripts that do not import any part of leapp modules fail.

Stop that. It complicates debugging of library parts on host machine. Moving the same file outside repository seems lame.

To Reproduce
Steps to reproduce the behavior

  1. git clone https://github.com/oamg/leapp-repository.git
  2. cd leapp-repository
  3. (touch empty.py && pytest empty.py; rm empty.py)
  4. See error
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/leapp/models/__init__.py", line 177, in resolve
INTERNALERROR>     cls._resolved = globals()[cls._referenced]
INTERNALERROR> KeyError: 'ReportReference'
INTERNALERROR> 
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR> 
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/_pytest/main.py", line 176, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/__init__.py", line 617, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/__init__.py", line 222, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/__init__.py", line 216, in <lambda>
INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 201, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 76, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 180, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/tmp/leapp-repository/conftest.py", line 31, in pytest_sessionstart
INTERNALERROR>     repo.load()
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/leapp/repository/manager.py", line 103, in load
INTERNALERROR>     resolve_model_references()
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/leapp/models/__init__.py", line 192, in resolve_model_references
INTERNALERROR>     reference.resolve()
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/leapp/models/__init__.py", line 179, in resolve
INTERNALERROR>     raise ModelDefinitionError('Undefined Model "{}"'.format(cls._referenced))
INTERNALERROR> leapp.exceptions.ModelDefinitionError: Undefined Model "ReportReference"

Expected behavior
A clear and concise description of what you expected to happen.

=================================================== test session starts ===================================================
platform linux -- Python 3.7.4, pytest-3.6.4, py-1.5.4, pluggy-0.6.0
rootdir: /tmp, inifile:
plugins: beakerlib-0.7.1, leapp-0.8.1
collected 0 items                                                                                                         

============================================== no tests ran in 0.00 seconds ===============================================

System information (please complete the following information):

  • OS and version: (e.g. Fedora 29 or $ cat /etc/system-release)
    Fedora release 29 (Twenty Nine)
  • # uname -a
    Linux menpad 5.2.11-100.fc29.x86_64 #1 SMP Thu Aug 29 12:52:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • # rpm -qa "*leapp*" (or shorthashes of commits in case of manual installation):
$ rpm -qa 'leapp*' 'python*-leapp*'
leapp-deps-0.8.1-100.201909191012Z.85c9791.master.fc29.noarch
python3-leapp-0.8.1-100.201910021534Z.20036ad.master.fc29.noarch

Additional context
It might be wise to include special initialization inside leapp module. But if no module is included, it should not block any unrelated script placed somewhere under git clone.

FIx minor 'issues' related to #44 PR

It includes stuff like polishing of texts, format of output reports/logs, .... Minor stuff that would be nice to fix.
Related to #44

P.S. See the discussions (even those closed) to see related stuff.

CheckSkippedRepositories: improve the remediation instruction

The current remediation instruction tells people to open support ticket when discovered a repository which contains RH signed RPMs. However, it could be that people could create own repositories with our packages (with different name). In such case the msg could be misleading. It could be better to mention a condition, that they can open support ticket in case it is repository provided by RH (with the original name), otherwise we will not support it - in those cases, they should change the repository name (it this helps - not sure whether repo name is changed in the record about installed rpm from yum, as we are getting it).

Incorrect error when missing repomap.csv or not being on 7.6

When /etc/leapp/files/repomap.csv is missing, the upgrade is not inhibited by the repositoriesmapping actor with the message "Repositories map file not found".
Instead I'm getting:

2019-08-09 17:08:03.78  DEBUG    PID: 28670 leapp.workflow.FactsCollection.target_userspace_creator: Target RHSM Info: SKUs: [u'ES0113909'] Repositories: [u'rhel-8-for-x86_64-baseos-rpms', u'rhel-8-for-x86_64-appstream-rpms']
2019-08-09 17:08:03.430 DEBUG    PID: 28670 leapp.workflow.FactsCollection.target_userspace_creator: Gathered target repositories:
...
2019-08-09 17:08:27.251042 [ERROR] Actor: target_userspace_creator Message: There are no enabled target repositories for the upgrade process to proceed.
Detail: {u'hint': u'Ensure your system is correctly registered with the subscription manager and that your current subscription is entitled to install the requested target version 8.0'}

The repositoriesmapping needs to run before the targetuserspacecreator. @vinzenz, don't you know of a better solution than sending a message between these just to create a dependency link?

Directories under /etc/yum/* need to make way for ../dnf symlinks after upgrade.

original report by @cwyamz

preforming an upgrade from 7.6 to 8 using leapp the user is required to dnf install yum due to yum being in the to_remove file but the transaction fails:
Error unpacking rpm package yum-4.0.9-1.el8.noarch
"error: unpacking of archive failed on file /etc/yum/pluginconf.d: cpio: File from package already exists as a directory in system"

The work around is to rename /etc/yum to /etc/yum.bak and retry.
More info here: https://bugzilla.redhat.com/show_bug.cgi?id=1626736#c9

libdnf-0.22.3-1.el8.x86_64
dnf-4.0.9-1.el8.noarch
leapp-0.4.0-1.el7_5.noarch

EDIT: See #29 for additional info.

Traceback of the nm-update-client-ids.py

The script:
https://github.com/oamg/leapp-repository/blob/master/repos/system_upgrade/el7toel8/actors/networkmanagerupdateconnections/tools/nm-update-client-ids.py

Traceback:

    [    7.881571] leapp3[861]: 2019-10-23 07:08:08.614 DEBUG    PID: 1365 leapp.wor
    kflow.FirstBoot.network_manager_update_connections: External command has started
    : ['/usr/bin/python3', 'tools/nm-update-client-ids.py']                          
    [    7.992307] leapp3[861]: Traceback (most recent call last):                  
    [    7.995981] leapp3[861]:   File "tools/nm-update-client-ids.py", line 22, in  
    <module>                                                                        
    [    7.996023] leapp3[861]:     client = NM.Client.new(None)                    
    [    7.999522] leapp3[861]: GLib.Error: g-io-error-quark: Could not connect: No  
    such file or directory (1)                                                      
    [    8.004272] leapp3[861]: 2019-10-23 07:08:08.742 DEBUG    PID: 1365 leapp.wor
    kflow.FirstBoot.network_manager_update_connections: Command ['/usr/bin/python3',
     'tools/nm-update-client-ids.py'] failed with exit code 1.                      
    [    8.011275] leapp3[861]: 2019-10-23 07:08:08.749 DEBUG    PID: 1365 leapp.wor
    kflow.FirstBoot.network_manager_update_connections: External command has finishe
    d: ['/usr/bin/python3', 'tools/nm-update-client-ids.py']                        
    [    8.025095] leapp3[861]: 2019-10-23 07:08:08.751 WARNING  PID: 1365 leapp.wor
    kflow.FirstBoot.network_manager_update_connections: Error calling nm-update-clie
    nt-ids script: Command ['/usr/bin/python3', 'tools/nm-update-client-ids.py'] fai
    led with exit code 1.

Environment:
s390x machine, most probably without connection to the inter/intranet during the actor execution (because another failed with socket.gaierror: [Errno -2] Name or service not know
n)

Ccing @bengal, the author of the script.

I ran the upgrade without being subscribed and I'm getting a traceback:

I ran the upgrade without being subscribed and I'm getting a traceback:

2019-06-26 13:17:30.903 INFO     PID: 21332 leapp.workflow.FactsCollection: Executing actor target_userspace_creator 
Process Process-143:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 63, in _do_run
    target_actor(logger=logger, messaging=messaging, config_model=config_model).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 320, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/targetuserspacecreator/actor.py", line 25, in process
    userspacegen.perform()
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py", line 140, in perform
    api.log.warn("Could not receive RHSM information - Is this system registered?")
AttributeError: 'module' object has no attribute 'log'

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

Originally posted by @bocekm in #44 (comment)

To be exact, I executed it on the latest RHEL 7.7 compose, if that can make any difference in this case.

chrony actor traceback due to run(checked= ...)

Actual behavior

chrony actor raises traceback due to unknown argument:

Process Process-120:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 299, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/checkchrony/actor.py", line 29, in process
    check_chrony('chrony' in installed_packages)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/checkchrony/libraries/library.py", line 19, in check_chrony
    if is_config_default():
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/checkchrony/libraries/library.py", line 7, in is_config_default
    result = run(['rpm', '-V', '--nomtime', 'chrony'], checked=False)
TypeError: run() got an unexpected keyword argument 'checked'

To Reproduce

  1. install leapp
  2. run leapp --upgrade

Expected behavior

Pre-boot part of the upgrade workflow

System information (please complete the following information):

leapp-0.7.0-1.201904300837Z.f766a84.master.el7_6.noarch
leapp-repository-0.7.0-1.201905140917Z.24efd84.master.el7_6.noarch

Redesign possibility to affect RPM transaction

See the PR #73 for additional info (just related PR, doesn't resolve this issue). It is expected that there will be cases (e.g. PR #35) which will require additional actions during the RPM upgrade transaction (e.g. installation of specific RPMs) based on gathered facts about the syste (e.g. configuration of specific service). Current situation is confusing as the actor preparing the RPM transaction consumes FilteredRpmTransactionTasks msgs. However, people usually want to find something how to add new task and from that point the RpmTransactionTasks model is the one that looks they want to use it (even regarding additional actors, e.g. the transactionworkrounds actor.

We should rethink our current design a little here and modify it better, so it will be clear and intuitive what users should use.

NOTE: It is possible we will want to use the "filtered" data for reporting purposes - that means, by actors inside ChecksPhase - in furure.

Podman: snactor discovery and run issues

Actual behavior
I try to discover supported entities from the el7toel8 repository and it's failed because of missing common repository. Linking these repos together doesn't help.

To Reproduce
Clone repo
cd leapp-repository/repos/system_upgrade/el7toel8
snactor discovery
<traceback_see_below>
snactor link --path ../../common
snactor discovery
<traceback_see_below>

Expected behavior
list of entities

System information (please complete the following information):
fedora rawhide + virtualenv leapp
snactor version 0.5.0
leapp-repository commit 8d722af

$ snactor discover
Traceback (most recent call last):
  File "/usr/bin/snactor", line 9, in <module>
    load_entry_point('leapp==0.5.0', 'console_scripts', 'snactor')()
  File "/usr/lib/python2.7/site-packages/leapp/snactor/__init__.py", line 67, in main
    cli.command.execute(version=_('snactor version {}').format(VERSION))
  File "/usr/lib/python2.7/site-packages/leapp/utils/clicmd.py", line 80, in execute
    args.func(args)
  File "/usr/lib/python2.7/site-packages/leapp/utils/clicmd.py", line 102, in called
    self.target(args)
  File "/usr/lib/python2.7/site-packages/leapp/utils/repository.py", line 20, in checker
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/snactor/commands/discover.py", line 105, in cli
    repository = find_and_scan_repositories(base_dir, include_locals=True)
  File "/usr/lib/python2.7/site-packages/leapp/repository/scan.py", line 57, in find_and_scan_repositories
    _resolve_repository_links(manager=manager, include_locals=include_locals)
  File "/usr/lib/python2.7/site-packages/leapp/repository/scan.py", line 39, in _resolve_repository_links
    raise RepositoryConfigurationError('Missing repositories detected: {}'.format(', '.join(missing)))
leapp.exceptions.RepositoryConfigurationError: Missing repositories detected: efcf9016-f2d1-4609-9329-a298e6587b3c

no /usr/bin/yum after the upgrade

Note: This has been reported earlier when we had internal version of this repo, however for some reason it has not been migrated when the internal repo was moved.


The smallest RHEL-8 installation contains `yum' package (backwards-compatibility layer). However, this is not installed after upgrading via leapp upgrade.

Steps to reproduce:

  1. get new RHEL-7 machine
  2. install leapp
  3. subscribe to RHEL-7 and RHEL-8 via RHSM
  4. leapp upgrade --debug --whitelist-experimental patchdnf
  5. reboot; wait
  6. yum

Result:

-bash: yum: command not found

Expected result:

yum usage message

kernel-rpm-macros fails transaction

Actual behavior
We have redhat-rpm-config in /etc/leapp/transaction/to_remove meaning that it is always removed. But this package is required by kernel-rpm-macros, so the transaction fails if kernel-rpm-macros is installed:

Error: 
 Problem 1: cannot install the best candidate for the job
  - conflicting requests
 Problem 2: package kernel-rpm-macros-116-1.el8.noarch requires redhat-rpm-config >= 13, but none of the providers can be installed
  - cannot install the best candidate for the job
  - conflicting requests

To Reproduce
Steps to reproduce the behavior

  1. install kernel-rpm-macros
  2. run leapp upgrade --debug
  3. See error

Expected behavior
Transaction does not fail with kernel-rpm-macros installed. It can be done by adding it to the to_remove file as well.

`rhsm release --unset` in initramdisk

We hitting issue now because the network is down and rhsm is trying to connect to the server. We need to fix it properly to be able to do upgrades when people have set the release and do not block upgrades at all.

IPU workflow does not handle XFS with ftype=0 correctly

Currently, we try to handle XFS with ftype=0 in TargetUserspaceCreator actor which runs in FactsPhase and consumes XFSPresence message, however XFSPresence message is produced by CheckXFS actor that on the other hand runs in CheckPhase which is executed after FactsPhase and thus cannot possibly receive the message. As a result we does not create a disk image as the $SUBJECT workaround.

class CheckXFS(Actor):
    """
    Check if XFS filesystem is in use.

    If XFS filesystem without ftype is in use, produce a message to influence
    PrepareUpgradeTransaction actor about necessary steps during execution.
    """

    name = 'check_xfs'
    consumes = (StorageInfo,)
    produces = (XFSPresence,)
    tags = (ChecksPhaseTag, IPUWorkflowTag,)

    def process(self):
        check_xfs()
class TargetUserspaceCreator(Actor):
    """
    Initializes a directory to be populated as a minimal environment to run binaries from the target system.

    The target userspace is set up in a directory so one can run it in a containerized environment to perform tasks
    as if the system running would be the target system. This allows us to use the target system RPM stack including
    DNF which gives us the ability to use RPM features from the target system.
    The userspace environment is also used to generate a initram disk with dracut using the target system binaries
    such as kernel, systemd etc etc
    """

    name = 'target_userspace_creator'
    consumes = (OSReleaseFacts, RepositoriesMap, RequiredTargetUserspacePackages,
                SourceRHSMInfo, TargetRepositories, XFSPresence)
    produces = (TargetRHSMInfo, TargetUserSpaceInfo, UsedTargetRepositories)
    tags = (IPUWorkflowTag, FactsPhaseTag)

    def process(self):
        if version.is_supported_version() and next(self.consume(RepositoriesMap), None):
            userspacegen.perform()

See the workflow extract:

    class FactsCollectionPhase(Phase):
        '''Get information (facts) about the system (e.g. installed packages, configuration, ...).

        No decision should be done in this phase. Scan the system to get information you need and provide
        it to other actors in the following phases.
        '''
        name = 'FactsCollection'
        filter = TagFilter(FactsPhaseTag)
        policies = Policies(Policies.Errors.FailPhase,
                            Policies.Retry.Phase)
        flags = Flags()

    class ChecksPhase(Phase):
        '''Check upgradability of the system, produce user question if needed and produce output for the report.

        Check whether it is possible to upgrade the system and detect potential risks. It is not expected to get
        additional information about the system in this phase, but rather work with data provided by the actors from
        the FactsCollection. When a potential risk is detected for upgrade, produce messages for the Reports phase.
        '''
        name = 'Checks'
        filter = TagFilter(ChecksPhaseTag)
        policies = Policies(Policies.Errors.FailPhase,
                            Policies.Retry.Phase)
        flags = Flags()

leapp3 AVC during upgrade (allow init_t admin_home_t:file execute)

Actual behavior

leapp3 causes AVC post-upgrade.

To Reproduce

  1. install leapp
  2. run leapp upgrade
  3. See SELinux AVC's

Expected behavior

No AVC's

System information (please complete the following information):

  • OS and version: RHEL-7 then RHEL-8

  • # uname -a - don't have this

  • # rpm -qa "*leapp*"

    leapp-0.6.0-1.201904160717Z.2a584d5.master.el7_6.noarch
    leapp-repository-0.6.0-1.201904160719Z.91370ef.master.el7_6.noarch
    leapp-repository-sos-plugin-0.6.0-1.201904160719Z.91370ef.master.el7_6.noarch
    python2-leapp-0.6.0-1.201904160717Z.2a584d5.master.el7_6.noarch


Additional context

time->Tue Apr 16 10:47:14 2019
type=PROCTITLE msg=audit(1555411634.878:88): proctitle="(leapp3)"
type=SYSCALL msg=audit(1555411634.878:88): arch=c000003e syscall=59 success=no exit=-13 a0=55b832698d80 a1=55b832616c50 a2=55b832695de0 a3=55b832698ec0 items=0 ppid=1 pid=18189 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="(leapp3)" exe="/usr/lib/systemd/systemd" subj=system_u:system_r:init_t:s0 key=(null)
type=AVC msg=audit(1555411634.878:88): avc:  denied  { execute } for  pid=18189 comm="(leapp3)" name="leapp3" dev="dm-0" ino=902405 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:admin_home_t:s0 tclass=file permissive=0

..which audit2allow translates to:

allow init_t admin_home_t:file execute;

The timestamps correspond to roughly 10 minutes past relabel.

upgrade initramfs entry cannot be found by grubby

Actual behavior
After running leapp --upgrade, grubby --info=DEFAULT cannot find the newly added kernel, exiting with 1 and printing grubby: kernel not found.

To Reproduce

leapp --upgrade
grubby --info=DEFAULT

Expected behavior
Newly added entry

System information (please complete the following information):

RHEL-7.6 and leapp-repository-0.7.0-1.201906101721Z.8ebef3f.master.el7_6.noarch


Additional context

Likely caused by #238 plus a likely bug in grubby. #238 actually added quotes around the entry title text, which results in a technically valid name but this could have broken subsequent grubby call.

I'm not sure if the upgrade is affected; it could be just the grubby bug.

"Leapp command Error has occurred" instead of proper upgrade inhibition in case not enough space available at /

To reproduce on an openstack vm:
fallocate -l $(($(df --output=avail /boot | tail -1) / 1025))M /boot/dump

and run leapp preupgrade

Instead of upgrade inhibition with human-readable report and console logging you'll get

rocess Process-172:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 63, in _do_run
    target_actor(logger=logger, messaging=messaging, config_model=config_model).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 320, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/targetuserspacecreator/actor.py", line 25, in process
    userspacegen.perform()
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py", line 182, in perform
    prepare_target_userspace(context, constants.TARGET_USERSPACE, target_repoids, list(packages))
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py", line 36, in prepare_target_userspace
    callback_raw=utils.logging_handler
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/mounting.py", line 153, in call
    return run(self.type.make_command(cmd), *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py", line 178, in run
    result=result
CalledProcessError: A Leapp Command Error occurred. 

While preupgrade.log will have

2019-09-09 11:08:08.338 DEBUG    PID: 10967 leapp.workflow.FactsCollection.target_userspace_creator: Error: Transaction check error:
...
2019-09-09 11:08:08.404 DEBUG    PID: 10967 leapp.workflow.FactsCollection.target_userspace_creator: Error Summary
2019-09-09 11:08:08.405 DEBUG    PID: 10967 leapp.workflow.FactsCollection.target_userspace_creator: -------------
2019-09-09 11:08:08.407 DEBUG    PID: 10967 leapp.workflow.FactsCollection.target_userspace_creator: Disk Requirements:
2019-09-09 11:08:08.409 DEBUG    PID: 10967 leapp.workflow.FactsCollection.target_userspace_creator:    At least 40MB more space needed on the / filesystem.

long error logs instead of short messages

Actual behavior
Report messages printed on stdout during the run of the leapp upgrade contains currently title, severity, summary. But it should rather contain just title as it should be short and people would see more in the report. Additionally, should not be "summary" called "description"?

Example of the output:

============================================================
                        ERRORS
============================================================

2019-04-06 14:31:06.331662 [ERROR] Actor: verify_check_results Message: Firewalld is using an unsupported ipset type.: high: These ipset types are not supported by firewalld's nftables backend:
    -hash:ip,port

Expected behavior

============================================================
                        ERRORS
============================================================

2019-04-06 14:31:06.331662 [ERROR] Actor: verify_check_results Message: Firewalld is using an unsupported ipset type

System information (please complete the following information):

# rpm -qa "*leapp*"
leapp-deps-0.5.0-1.201904041617Z.3a9e34a.master.el7_6.noarch
leapp-0.5.0-1.201904041617Z.3a9e34a.master.el7_6.noarch
leapp-repository-sos-plugin-0.5.0-0.201904051425Z.27f8611.firewalld.PR113.el7_6.noarch
leapp-repository-0.5.0-0.201904051425Z.27f8611.firewalld.PR113.el7_6.noarch
python2-leapp-0.5.0-1.201904041617Z.3a9e34a.master.el7_6.noarch
leapp-repository-deps-0.5.0-0.201904051425Z.27f8611.firewalld.PR113.el7_6.noarch

env shebang in nm-update-client-ids.py

Actual behavior

Tool embedded with NetworkManagerUpdateClientId actor contains env based shebang, which is against packaging guidelines.

To Reproduce

$ cd /usr/share/leapp-repository/repositories/system_upgrade/el7toel8
$ grep '^#!/.*env' -R
actors/networkmanagerupdateclientid/tools/nm-update-client-ids.py:#!/usr/bin/env python

Expected behavior

No env-based shebang. Most probably #!/usr/bin/python is the right one, although I'm not 100% sure

System information (please complete the following information):

  • leapp-repository-0.5.0-1.201902121352Z.34c2486.master.el7_5.noarch

Create tests for peseventscanner

Current tests for the peseventscanner are disabled now as the expected file is currently empty and the tests cannot be proccesed correctly. In all cases, tests are not sufficient. Create tests and modify actor if needed, to proove its valid implementation.

Do not use PES events with input packages defined in to_remove

Actual behavior
We have /etc/leapp/transaction/to_remove file which is used to list packages to be removed during the upgrade. Even though such package is passed to dnf as to be removed, if this package is present in any Renamed/Replaced/Split/Merged PES event as "input" package, such event is parsed and the event's "output" packages are added incorrectly to the dnf transaction.

Example: python-docs is in PES as split to python2-docs and python3-docs.

To Reproduce

  1. Install python-docs
  2. Run leapp upgrade --debug
  3. See error:
Package python-docs-2.7.5-2.el7.noarch is already installed.
Problem: cannot install the best candidate for the job
  - conflicting requests

Expected behavior
dnf is not told to install python2-docs, python3-docs.

Attachments
dnf-plugin-data.txt - mentions:

  • python-devel in to_remove
  • python2-docs, python3-docs in to_install

system_facts actor fails when no baseurl is present in repo file

When no baseurl is present in repo file (e.g. repo file for epel7 uses metalink instead), the system_facts fails.

Reproducer

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

leapp upgrade

2019-01-03 16:50:32.507 INFO     PID: 4256 leapp: Logging has been initialized
2019-01-03 16:50:32.541 INFO     PID: 4256 leapp.repository.common: A new repository 'common' is initialized at /etc/leapp/repos.d/common
2019-01-03 16:50:32.570 INFO     PID: 4256 leapp.repository.system_upgrade_el7toel8: A new repository 'system_upgrade_el7toel8' is initialized at /etc/leapp/repos.d/system_upgrade/el7toel8
2019-01-03 16:50:32.774 INFO     PID: 4256 leapp.workflow: Starting workflow execution: InplaceUpgrade - ID: 66c51e03-1134-445f-9811-0223be43c173
2019-01-03 16:50:32.796 INFO     PID: 4256 leapp.workflow: Starting phase Facts collection
2019-01-03 16:50:32.820 INFO     PID: 4256 leapp.workflow.Facts collection: Starting stage Before of phase Facts collection
2019-01-03 16:50:32.870 INFO     PID: 4256 leapp.workflow.Facts collection: Starting stage Main of phase Facts collection
2019-01-03 16:50:32.896 INFO     PID: 4256 leapp.workflow.Facts collection: Executing actor rpm_scanner
2019-01-03 16:50:33.452 INFO     PID: 4256 leapp.workflow.Facts collection: Executing actor system_facts
Process Process-34:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 121, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/systemfacts/actor.py", line 20, in process
    repositories=systemfacts.get_repositories(),
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py", line 27, in inner
    return list(f(*args, **kwargs))
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py", line 204, in get_repositories
    yield Repositories(file=repo, data=_parse(repo))
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py", line 27, in inner
    return list(f(*args, **kwargs))
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/systemfacts/libraries/systemfacts.py", line 198, in _parse
    yield RepositoryData(**prepared)
  File "/usr/lib/python2.7/site-packages/leapp/models/__init__.py", line 86, in __init__
    getattr(defined_fields[field], init_method)(kwargs, field, self)
  File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 110, in from_initialization
    self._validate_model_value(value=source_value, name=name)
  File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 166, in _validate_model_value
    super(BuiltinField, self)._validate_model_value(value, name)
  File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 62, in _validate_model_value
    raise ModelViolationError('The value of "{name}" field is None, but this is not allowed'.format(name=name))
▽odelViolationError: The value of "baseurl" field is None, but this is not allowed

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

finish fixing of overlayfs unmounting

This is follow up of Issue #2. Make it more robust (the actor.py file, use try-exception-final to ensure the overlayfs will be really unmounted always) and add tests. Current implementation resolves just subset of issues.

modify models & actors related to kernel cmdline,..

We have now several actors working with kernel cmdline, to get just particular information. However, there is not any actor providing the whole info about the kernel cmdline, which seems usable. Additionally, such actors are running in factsphase usually, but much better could be to run them in checksphase. That could be easy if the cmdline is provided through msgs.

Additionally, KernelCmdlineArg model, points regarding the name it could provide such information, however, the use is completely different - well, it's documented, but I think we should do something around to make it more intuitive.

Upgrade failure due to missing leapp/dnf-plugin-data.txt

Actual behavior
'leapp upgrade --debug' fails with the following log.
It's a clean installed RHEL-7.6 Server system.

2019-02-20 17:45:56.151 INFO     PID: 6144 leapp.workflow.Download: Executing actor prepare_upgrade_transaction
Process Process-83:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 228, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/prepareupgradetransaction/actor.py", line 286, in process
    error = self.dnf_plugin_rpm_download(ofs_info)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/prepareupgradetransaction/actor.py", line 193, in dnf_plugin_rpm_download
    with open(os.path.join(overlayfs_info.merged, 'var', 'lib', 'leapp', 'dnf-plugin-data.txt'), 'w+') as data:
IOError: [Errno 2] No such file or directory: '/var/lib/leapp/scratch/mounts/merged/var/lib/leapp/dnf-plugin-data.txt'

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

[root@VM ~]# ls /var/lib/leapp/scratch/mounts/merged/var/lib/leapp/
ls: cannot access /var/lib/leapp/scratch/mounts/merged/var/lib/leapp/: No such file or directory
[root@VM ~]# ls /var/lib/leapp/scratch/mounts/merged/var/lib/
rhsm  rpm
[root@VM ~]# rpm -q leapp
leapp-0.5.0-1.201902181202Z.28bb8bc.master.el7_5.noarch
[root@VM ~]# findmnt /
TARGET SOURCE                 FSTYPE OPTIONS
/      /dev/mapper/vg0-lvroot ext4   rw,relatime,data=ordered
[root@VM ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[root@VM ~]# uname -a
Linux VM 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

To Reproduce
Steps to reproduce the behavior

  1. leapp upgrade --debug

Expected behavior
Successful upgrade without error.

System information (please complete the following information):

  • OS and version: RHEL-7.6 GA
  • # uname -a: kernel-3.10.0-957.el7.x86_64
  • # rpm -qa "*leapp*" (or shorthashes of commits in case of manual installation): leapp-0.5.0-1.201902181202Z.28bb8bc.master.el7_5.noarch
# rpm -qa "leapp*"
[root@VM ~]# rpm -qa "leapp*"
leapp-deps-0.5.0-1.201902181202Z.28bb8bc.master.el7_5.noarch
leapp-0.5.0-1.201902181202Z.28bb8bc.master.el7_5.noarch
leapp-repository-deps-0.5.0-1.201902191106Z.8a99cb6.master.el7_5.noarch
leapp-repository-0.5.0-1.201902191106Z.8a99cb6.master.el7_5.noarch
leapp-repository-data-0.5.0-1.201902191106Z.8a99cb6.master.el7_5.noarch
  • attach (or provide link to) log files if applicable (optional - may contain confidential information):
    • /var/log/upgrade.log
    • /tmp/leapp-report.txt
    • # tar -czf dnf-debug.tgz /tmp/download-debugdata
    • /var/lib/leapp/leapp.db
    • journalctl
  • anything else you would like to provide (e.g. storage info):
NAME           MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda            252:0    0   16G  0 disk
├─vda1         252:1    0  256M  0 part /boot
├─vda2         252:2    0  7.5G  0 part
│ ├─vg0-lvroot 253:0    0    5G  0 lvm  /
│ ├─vg0-lvswap 253:1    0    4M  0 lvm  [SWAP]
│ ├─vg0-lvhome 253:2    0  504M  0 lvm  /home
│ └─vg0-lvvar  253:3    0    4G  0 lvm  /var
└─vda3         252:3    0  8.3G  0 part
  └─vg0-lvvar  253:3    0    4G  0 lvm  /var
loop0            7:0    0    2G  0 loop /var/lib/leapp/scratch/mounts

Additional context
Please let me know if you need any other infomation, or login credential if needed. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.