Bug 2218058

Summary: systemctl restart postfix (soft errors)
Product: [Fedora] Fedora Reporter: Luigi Cantoni <luigic>
Component: postfixAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 38CC: jskarvad, olysonek-foss, pgnet.dev
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: postfix-3.8.1-3.fc39 postfix-3.7.4-3.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-13 23:52:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luigi Cantoni 2023-06-28 02:53:47 UTC
There are some soft errors when:
systemctl restart postfix
is executed

Reproducible: Always

Steps to Reproduce:
1.systemctl restart postfix
2.
3.
Actual Results:  
restorecon[40673]: /usr/sbin/restorecon: lstat(/var/spool/postfix/pid/master.pid) failed: No such file or directory
postfix[40737]: egrep: warning: egrep is obsolescent; using grep -E

Expected Results:  
no errors should appear

systemd[1]: Starting postfix.service - Postfix Mail Transport Agent...
restorecon[40673]: /usr/sbin/restorecon: lstat(/var/spool/postfix/pid/master.pid) failed: No such file or directory
postfix[40737]: egrep: warning: egrep is obsolescent; using grep -E
postfix/postfix-script[40744]: starting the Postfix mail system
postfix/master[40746]: daemon started -- version 3.7.4, configuration /etc/postfix
systemd[1]: Started postfix.service - Postfix Mail Transport Agent.

The egrep issue is new and I am sure a simple search for the command and a change where it is used will fix this soft error.

Also it looks to me like the restorecon command is executed before the pid file is created as its there after the restart is completed.

Comment 1 Jaroslav Škarvada 2023-07-11 10:20:23 UTC
I merged the fix: https://src.fedoraproject.org/rpms/postfix/pull-request/9

Comment 2 Fedora Update System 2023-07-11 12:06:02 UTC
FEDORA-2023-4ee4cc6721 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4ee4cc6721

Comment 3 Fedora Update System 2023-07-11 12:09:38 UTC
FEDORA-2023-45d0eabc36 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-45d0eabc36

Comment 4 Fedora Update System 2023-07-12 02:12:02 UTC
FEDORA-2023-45d0eabc36 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-45d0eabc36`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-45d0eabc36

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-07-13 23:52:12 UTC
FEDORA-2023-18495e9c7c has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Luigi Cantoni 2023-07-14 00:12:48 UTC
Thanks for the patch.
I have installed the patch and can confirm the
restorecon[40673]: /usr/sbin/restorecon: lstat(/var/spool/postfix/pid/master.pid) failed: No such file or directory
portion of the error appears to be fixed.

the use of egrep does still appear to be there.
postfix[53786]: egrep: warning: egrep is obsolescent; using grep -E
this is a soft error so hopefully is fixed in the F39 version (I am on F38)

Comment 7 Fedora Update System 2023-07-20 05:24:39 UTC
FEDORA-2023-45d0eabc36 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Luigi Cantoni 2023-08-02 09:03:16 UTC
I have done a standard dnf upgrade on another machine and it appears to correctly fix the restorecon problem as expected.
From repo    : updates
unlike my test which was
From repo    : updates-testing

Great work thanks.