oamg / leapp-repository

Leapp repositories containing actors for the Leapp framework (https://github.com/oamg/leapp). Currently provides leapp repositories for in-place upgrades of RHEL systems.
Apache License 2.0
52 stars 146 forks source link

lvm2-cluster package breaks upgrade #1050

Open andrewlukoshko opened 1 year ago

andrewlukoshko commented 1 year ago

Actual behavior If lvm2-cluster package is installed then upgrade process drops into emergency shell

To Reproduce

  1. Install lvm2-cluster package from Resilient Storage repo
  2. Perform upgrade as usual

Expected behavior System rebooted successfully and upgraded to RHEL8

System information (please complete the following information):

Attach (or provide link to) log files if applicable (optional - may contain confidential information): leapp-logs.tar.gz


Additional context

It's possible to workaround by running /sbin/lvmconf --disable-cluster before upgrade. But after reboot initramfs will be broken anyway and system will be unbootable.

andrewlukoshko commented 1 year ago

@pirat89 could you please take a look?

pirat89 commented 1 year ago

@andrewlukoshko Hi \o thank you for the report. Our team does not have any experience with this setup but from my information lvm2-cluster is not present since RHEL 8 (and most likely the functionality is not present also) so probably the system upgrade should be inhibited if the package is installed. No idea whether there is something what users could do (except something like drop the machine from the cluster, uninstall the package, reboot the system and if still working, then upgrade)

andrewlukoshko commented 1 year ago

@pirat89 lvm2-cluster is mentioned in pes-events.json as removed so it should be just removed during upgrade. But instead of this it breaks it. That's the problem. And unfortunately it breaks it even without any setup, just presence of the package is enough to break upgrade.

pirat89 commented 1 year ago

The error is caused by the failed preun scriptlet of the lvm2-cluster package, trying to disable the cluster. From this point:

a) the package must be removed prior the upgrade b) or the scriptlet must be updated to skip any action in case the in-place upgrade is running

I haven't tried to call the command to disable cluster prior the upgrade. It's possible there are additional steps that could be done, but this is the simplies solution that came to my mind.

In the meanwhile it would be nice to have an inhibitor that prevents any upgrade on such a machine. @oamg/developers @vojtechsokol fyi ^

andrewlukoshko commented 1 year ago

@pirat89 Unfortunately, as I said before, this package itself is a problem, not only its preun scriptlet. If you run /sbin/lvmconf --disable-cluster before update then preun scriptlet will not fail, but after reboot system can't boot because of probably broken initramfs. So currently only option a) can be easy solution. But probably someone can debug what happens with initramfs.

vojtechsokol commented 1 year ago

Hi, there is a bz for this issue (rhbz1820088), but it's closed as wontfix (there are also Jira issues OAMG-3188 and OAMG-5633, most probably RH-internal only). I believe the only feasible solution here is to inhibit the upgrade when the package is present onthe upgraded system.