Description of problem: Unrelated error about nwfilter when destroy vm in session mode Version-Release number of selected component (if applicable): libvirt-4.5.0-4.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare the env for session mode $ rm -fr /tmp/libvirtd.log $ cat /home/test/.config/libvirt/libvirtd.conf log_level=1 log_outputs="1:file:/tmp/libvirtd.log" 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.
Posted a patch upstream: https://www.redhat.com/archives/libvir-list/2018-August/msg01464.html 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.
Patches were pushed upstream: commit dbfe8acae5058d07243bed424afbcfaea06ee41e Author: John Ferlan <jferlan> 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 v4.7.0-56-gdbfe8acae5 $
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.
Test on libvirt-5.0.0-11.module+el8.0.1+3459+e357ef2f.x86_64 with the steps in comment 0, no such error.
This was verified and shipped long ago. Closing the bug report.