Bug 1552971

Summary: lvm2 scriptlet failures in install env
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, anprice, bmarzins, bmr, cfeist, heinzm, jonathan, kzak, lvm-team, mcsontos, msnitzer, prajnoha, prockai, vponcova, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 13:27:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin Fenzi 2018-03-08 00:29:44 UTC
On current rawhide (and f28) installs we see: 

DEBUG util.py:439:  (539/775) lvm2-2.02.177-4.fc28.x86_64
DEBUG util.py:439:  Non-fatal POSTIN scriptlet failure in rpm package lvm2
DEBUG util.py:439:  2018-03-06 23:20:36,795: Non-fatal POSTIN scriptlet failure in rpm package lvm2
DEBUG util.py:439:  Non-fatal POSTIN scriptlet failure in rpm package lvm2

It's non fatal, but it should be fixed. 

It seems the lvm2.spec tries to start some things:

systemctl start lvm2-lvmetad.socket

systemctl start lvm2-lvmpolld.socket

According to guidelines: 
https://fedoraproject.org/wiki/Packaging:Systemd#Why_don.27t_we....

"Why don't we....

    Start the service after installation?

Installations can be in changeroots, in an installer context, or in other situations where you don't want the services autostarted."

Comment 1 Marian Csontos 2018-03-09 08:08:02 UTC
No service is started here, this is socket for socket activation. Nothing will be started in chroot.

The socket and lvmetad is important for auto-activation of lvm2 volumes.

Peter, shall we close this a NOTABUG/WONTFIX?

Comment 2 Peter Rajnoha 2018-03-09 11:23:03 UTC
(In reply to Marian Csontos from comment #1)
> No service is started here, this is socket for socket activation. Nothing
> will be started in chroot.
> 
> The socket and lvmetad is important for auto-activation of lvm2 volumes.
> 
> Peter, shall we close this a NOTABUG/WONTFIX?

We need to make those lvm2-{lvmetad,lvmpolld}.socket units to be active after installation. And, these should be only debug messages, so if we don't have another way of making these units started after installation, we need to close this bug then.

Comment 3 Kevin Fenzi 2018-03-10 00:15:49 UTC
Please at least add ' /dev/null 2>&1 || : ' to these socket enable/start calls.

In a chroot it won't do anything, but it does exit 1 and cause a scriptlet failure in anaconda, which can sometimes be fatal. At least ignore the return code so we don't keep seeing this.

Comment 4 Marian Csontos 2018-05-29 13:20:10 UTC
*** Bug 1399776 has been marked as a duplicate of this bug. ***

Comment 5 Marian Csontos 2018-05-29 13:27:08 UTC
I have added the `|| :` part of the fix in lvm2-2.02.178-0.1.rc1.

Thinking about it, I think we can safely use the redirection as well - if systemctl does not work, system is either seriously broken or we are running in special environment e.g. container or chroot.

I have committed second change to fedpkg and will bundle with the next release.