Bug 1949388

Summary: Unexpected error show in log when restarting libvirtd
Product: Red Hat Enterprise Linux 9 Reporter: yafu <yafu>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED CURRENTRELEASE QA Contact: yafu <yafu>
Severity: unspecified Docs Contact:
Priority: high    
Version: 9.0CC: jdenemar, meili, mprivozn, virt-maint, xuzhang, yalzhang
Target Milestone: betaKeywords: Regression, Triaged, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-7.5.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-07 21:57:54 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: 7.5.0
Embargoed:

Description yafu 2021-04-14 07:39:28 UTC
Description of problem:
Unexpected error show in log when restarting libvirtd

Version-Release number of selected component (if applicable):
libvirt-7.0.0-4.el9.x86_64
kernel-5.11.0-2.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Restart libvirtd:
#systemctl restart libvirtd

2.Check the syslog:
#cat /var/log/messages
...
Apr 13 05:35:39 * libvirtd[189229]: libcap-ng used by "/usr/sbin/libvirtd" failed due to not having CAP_SETPCAP in capng_apply
Apr 13 05:35:39 * libvirtd[189230]: libcap-ng used by "/usr/sbin/libvirtd" failed due to not having CAP_SETPCAP in capng_apply

Actual results:
Unexpected error show in log when restarting libvirtd

Expected results:
No error show in log when restarting libvirtd


Additional info:

Comment 1 Michal Privoznik 2021-06-25 07:23:49 UTC
Patch proposed upstream:

https://listman.redhat.com/archives/libvir-list/2021-June/msg00744.html

Comment 2 Michal Privoznik 2021-06-29 06:54:35 UTC
Merged upstream as:

438b50dda8 virSetUIDGIDWithCaps: Don't drop CAP_SETPCAP right away

v7.5.0-rc1-4-g438b50dda8

Comment 5 yafu 2021-07-19 07:55:09 UTC
Verified with libvirt-daemon-7.5.0-1.el9.x86_64.

Test steps:
1.Restart libvirtd:
#systemctl restart libvirtd

2.Check the syslog:
# grep -E 'libvirtd.*fail*' /var/log/messages
no output