Bug 1608275

Summary: Unrelated error about nwfilter when destroy vm in session mode
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: yalzhang <yalzhang>
Component: libvirtAssignee: John Ferlan <jferlan>
Status: CLOSED CURRENTRELEASE QA Contact: yalzhang <yalzhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: chhu, fjin, jdenemar, lmen, tburke, xuzhang
Target Milestone: rcKeywords: TestOnly
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: libvirt-5.0.0-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-11 22:33:05 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:

Description yalzhang@redhat.com 2018-07-25 08:57:12 UTC
Description of problem:
Unrelated error about nwfilter when destroy vm in session mode

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Prepare the env for session mode

$ rm -fr /tmp/libvirtd.log
$ cat /home/test/.config/libvirt/libvirtd.conf

2. run libvirt in 1st terminal:
$ libvirtd

3. on 2nd terminal, start -> destroy a vm, and check the log
$ virsh list --all
 Id    Name                           State
 -     rhel                           shut off
$ virsh start rhel
Domain rhel started

$ grep error /tmp/libvirtd.log | grep nwfilter
==> no outputs

$ virsh destroy rhel
Domain rhel destroyed

$ grep error /tmp/libvirtd.log | grep nwfilter
2018-07-25 08:29:38.948+0000: 42186: error : nwfilterConnectOpen:383 : internal error: unexpected nwfilter URI path '/session', try nwfilter:///system

Actual results:
step 3, unrelated error about nwfilter promoted when destroy vm in session mode

Expected results:
the error should not occur as nwfilter is not supported in session mode

Additional info:
when vm fail to start in session mode, the error will also occur.

Comment 2 John Ferlan 2018-08-23 12:56:30 UTC
Posted a patch upstream:


NB: The error is only ever logged in a session mode log file and not displayed to the user. With or without the patch, domain shutdown worked. The patch just makes it cleaner.

Comment 3 John Ferlan 2018-09-06 22:55:41 UTC
Patches were pushed upstream:

commit dbfe8acae5058d07243bed424afbcfaea06ee41e
Author: John Ferlan <jferlan@redhat.com>
Date:   Mon Aug 27 10:39:39 2018 -0400

    nwfilter: Check for filter presence before open connect during teardown
    Instantiation of an nwfilter binding is only allowed when
    the net->filter is defined for the network; however, the
    teardown of the binding does not make this check. This
    leaves open the possibility that the teardown could be
    called during guest shutdown/teardown in session mode
    resulting in the following error being logged:
        error : nwfilterConnectOpen:383 : internal error: unexpected
        nwfilter URI path '/session', try nwfilter:///system
    So before going through the teardown processing, let's
    be sure the network had a filter and then attempt to
    get a connection. For session mode it's not even possible
    create an nwfilter binding.


$ git describe dbfe8acae5058d07243bed424afbcfaea06ee41e

Comment 4 yalzhang@redhat.com 2019-02-26 05:48:13 UTC
test on upstream libvirt-5.1.0-1.el7.x86_64 with the same scenario in comment 0, it works as expected and no error any more.

Comment 6 yalzhang@redhat.com 2019-07-09 01:37:12 UTC
Test on libvirt-5.0.0-11.module+el8.0.1+3459+e357ef2f.x86_64 with the steps in comment 0, no such error.

Comment 7 Jeff Nelson 2020-03-11 22:33:05 UTC
This was verified and shipped long ago. Closing the bug report.