RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2119385 - Failing %prein scriptlet during IPU 8 -> 9 breaking the in-place upgrade process
Summary: Failing %prein scriptlet during IPU 8 -> 9 breaking the in-place upgrade process
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: dovecot
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: Evgeny Fedin
URL:
Whiteboard:
: 2165923 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-18 13:47 UTC by Petr Stodulka
Modified: 2023-05-09 08:40 UTC (History)
5 users (show)

Fixed In Version: dovecot-2.3.16-8.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:37:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-131418 0 None None None 2022-08-18 13:52:07 UTC
Red Hat Knowledge Base (Solution) 6996167 0 None None None 2023-01-31 15:11:56 UTC
Red Hat Product Errata RHBA-2023:2242 0 None None None 2023-05-09 07:37:38 UTC

Description Petr Stodulka 2022-08-18 13:47:57 UTC
Description of problem:

From the DNF transaction during the in-place upgrade 8 -> 9:
~~~
Error in PREIN scriptlet in rpm package dovecot
...
...
Dec 03 06:02:22 localhost upgrade[1188]:   Running scriptlet: dovecot-1:2.3.16-3.el9.x86_64                     436/1182
Dec 03 06:02:22 localhost upgrade[1188]: error: %prein(dovecot-1:2.3.16-3.el9.x86_64) scriptlet failed, exit status 1
Dec 03 06:02:22 localhost upgrade[1188]:   Upgrading        : gnupg2-smime-2.3.3-1.el9.x86_64                   437/1182
Dec 03 06:02:22 localhost upgrade[1188]: error: dovecot-1:2.3.16-3.el9.x86_64: install failed
...
...
2021-12-03 06:06:08.280 DEBUG    PID: 588 leapp.workflow.RPMUpgrade.dnf_upgrade_transaction: Failed: dovecot-1:2.3.8-9.el8.x86_64
2021-12-03 06:06:08.282 DEBUG    PID: 588 leapp.workflow.RPMUpgrade.dnf_upgrade_transaction: Failed: dovecot-1:2.3.16-3.el9.x86_64
...
...
Dec 03 06:06:30 localhost upgrade[602]: error: dovecot-1:2.3.8-9.el8.x86_64: erase skipped 
~~~

From the scriptlet:

~~~
# do not let dovecot run during upgrade rhbz#134325                                                                                                                                                                                           
if [ "$1" = "2" ]; then                                                                                                                                                                                                                       
  rm -f /var/run/dovecot/dovecot-restart-after-rpm-install                                                                                                                                                                                    
  /bin/systemctl is-active dovecot.service >/dev/null 2>&1 && touch /var/run/dovecot/dovecot-restart-after-rpm-install ||:                                                                                                                    
  /bin/systemctl stop dovecot.service >/dev/null 2>&1                                                                                                                                                                                         
fi         
~~~

The scriptlet crashes due to call of systemctl commands that requries running systemd; but the scriptlet (the DNF upgrade transaction) is executed inside the container where systemd is not running. Also, regarding the design of in-place upgrades, we know that dovecot will not be running for sure during that time
so the stopping of the service is not needed, nor restarting.  


Steps to Reproduce:
1. install and setup dovecot
2. dnf install leapp-upgrade
3. upgrade the system - see the error during the DNF transaction after the reboot


Actual results:
system ends in emergency console due to the failed scriptlet

Expected results:
Dovecot is successfuly upgraded without breaking the DNF transaction by failing scriptlet.

Additional info:
To check that IPU 8 -> 9 is happening, test envar LEAPP_IPU_IN_PROGRESS:
    LEAPP_IPU_IN_PROGRESS == 8to9

Comment 11 Petr Stodulka 2023-01-31 14:56:40 UTC
*** Bug 2165923 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2023-05-09 07:37:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (dovecot bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2242


Note You need to log in before you can comment on or make changes to this bug.