RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 664629 - Can't start guest with "disallow-dhcp-server" network filter
Summary: Can't start guest with "disallow-dhcp-server" network filter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 773561
TreeView+ depends on / blocked
 
Reported: 2010-12-21 02:10 UTC by xhu
Modified: 2012-01-12 09:32 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.3-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 773561 (view as bug list)
Environment:
Last Closed: 2011-12-06 10:53:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log info collection (1.64 KB, text/plain)
2011-06-24 06:09 UTC, Huming Jiang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description xhu 2010-12-21 02:10:07 UTC
Description of problem:
Can't start guest with "disallow-dhcp-server" network filter

Version-Release number of selected component (if applicable):
kernel-2.6.32-71.el6.x86_64
libvirt-0.8.1-27.el6.x86_64
qemu-kvm-0.12.1.2-2.113.el6.x86_64

How reproducible:
everytimes

Steps to Reproduce:
1. define a guest with "<filterref filter='disallow-dhcp-server'/>" in interface section
<interface type='network'>
      <mac address='52:54:00:0a:ba:19'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <filterref filter='disallow-dhcp-server'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

2. start the guest
# virsh start demo
error: Failed to start domain rhel6
error: Unknown failure
  
Actual results:
After step 2, errors occure

Expected results:
the guest can be started successfully without errors

Additional info:

Comment 1 Osier Yang 2010-12-21 03:32:06 UTC
xhu, coud you provide more info, e.g. the guest log(/var/log/libvirt/qemu/$guest.log), and libvirtd log(/var/log/messages)?

Comment 2 RHEL Program Management 2011-04-04 01:49:45 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Huming Jiang 2011-06-24 06:09:31 UTC
Created attachment 509677 [details]
log info collection

Comment 4 Huming Jiang 2011-06-24 06:14:21 UTC
Could reproduce this bug on the following components, So set the bug status as "assign".

Version-Release number of selected component (if applicable):
kernel-2.6.32-160.el6.x86_64
libvirt-0.9.2-1.el6.x86_64
qemu-kvm-0.12.1.2-2.165.el6.x86_64

Steps:
1. # cat disallow-dhcp-server.xml
<filter name='disallow-dhcp-server' chain='ipv4'>
  <rule action='accept' direction='out' priority='100'>
    <ip srcipaddr='0.0.0.0' dstipaddr='255.255.255.255' protocol='udp' srcportstart='68' dstportstart='67'/>
  </rule>
  <rule action='drop' direction='in' priority='100'>
    <ip srcipaddr='$DHCPSERVER' protocol='udp' srcportstart='67' dstportstart='68'/>
  </rule>
</filter>

2. # virsh nwfilter-define disallow-dhcp-server.xml
Network filter disallow-dhcp-server defined from disallow-dhcp-server.xml

3.  define a guest with "<filterref filter='disallow-dhcp-server'/>" in interface section
# virsh dumpxml rh6
...
    <interface type='network'>
      <mac address='52:54:00:6c:73:8c'/>
      <source network='default'/>
      <model type='virtio'/>
      <filterref filter='disallow-dhcp-server'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...
4. # virsh start rh6
error: Failed to start domain rh6
error: An error occurred, but the cause is unknown

No useful info could be found in the three log files. See the attachment in comment 3.

Comment 5 Laine Stump 2011-06-24 20:58:08 UTC
Without getting into the usefulness of the filter you're creating (it disallows one particular DHCP server but allows all others), the reason for the failure is that you've specified a variable in the filter definition, but haven't provided it as a parameter when you reference the filter.

Rather than this:

      <filterref filter='disallow-dhcp-server'/>

You need to do this:

      <filterref filter='disallow-dhcp-server'>
        <parameter name='DHCPSERVER' value='192.168.122.1'/>
      </filterref>

for example.

The error message that's produced is rather vague, though, so I'm leaving the bug open as a request to get that fixed. (I've notified the person who wrote this code).

Comment 6 Laine Stump 2011-06-27 17:08:58 UTC
The missing error message has been added to libvirt upstream in the following commit, and will be in the next rebase of libvirt for RHEL6:

commit ecfbf79541c76a884b25af6b022b601570f39b25
Author: Stefan Berger <stefanb.com>
Date:   Mon Jun 27 12:53:59 2011 -0400

    nwfilter: Return error message about unresolvable variables
    
    This is in response to bugzilla 664629
    
    https://bugzilla.redhat.com/show_bug.cgi?id=664629
    
    The patch below returns an appropriate error message if the chain of
    nwfilters is found to contain unresolvable variables and therefore
    cannot be instantiated.
    
    Example: The following XMl added to a domain:
    
        <interface type='bridge'>
          <mac address='52:54:00:9f:80:45'/>
          <source bridge='virbr0'/>
          <model type='virtio'/>
          <filterref filter='test'/>
        </interface>
    
    that references the following filter
    
    <filter name='test' chain='root'>
      <filterref filter='clean-traffic'/>
      <filterref filter='allow-dhcp-server'/>
    </filter>
    
    now displays upon 'virsh start mydomain'
    
    error: Failed to start domain mydomain
    error: internal error Cannot instantiate filter due to unresolvable variable: DHCPSERVER
    
    'DHPCSERVER' is contained in allow-dhcp-server.

Comment 8 Huming Jiang 2011-06-28 06:29:30 UTC
(In reply to comment #4)
> Could reproduce this bug on the following components, So set the bug status as
> "assign".
> 
> Version-Release number of selected component (if applicable):
> kernel-2.6.32-160.el6.x86_64
> libvirt-0.9.2-1.el6.x86_64
> qemu-kvm-0.12.1.2-2.165.el6.x86_64
> 
> Steps:
> 1. # cat disallow-dhcp-server.xml
> <filter name='disallow-dhcp-server' chain='ipv4'>
>   <rule action='accept' direction='out' priority='100'>
>     <ip srcipaddr='0.0.0.0' dstipaddr='255.255.255.255' protocol='udp'
> srcportstart='68' dstportstart='67'/>
>   </rule>
>   <rule action='drop' direction='in' priority='100'>
>     <ip srcipaddr='$DHCPSERVER' protocol='udp' srcportstart='67'
> dstportstart='68'/>
>   </rule>
> </filter>
> 
> 2. # virsh nwfilter-define disallow-dhcp-server.xml
> Network filter disallow-dhcp-server defined from disallow-dhcp-server.xml
> 
> 3.  define a guest with "<filterref filter='disallow-dhcp-server'/>" in
> interface section
> # virsh dumpxml rh6
> ...
>     <interface type='network'>
>       <mac address='52:54:00:6c:73:8c'/>
>       <source network='default'/>
>       <model type='virtio'/>
>       <filterref filter='disallow-dhcp-server'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
> ...
> 4. # virsh start rh6
> error: Failed to start domain rh6
> error: An error occurred, but the cause is unknown
> 
> No useful info could be found in the three log files. See the attachment in
> comment 3.

As comment 5 told, redo comment 4, change step 3 as:
# virsh dumpxml rh6
...
    <interface type='network'>
      <mac address='52:54:00:e4:e3:45'/>
      <source network='default'/>
      <filterref filter='disallow-dhcp-server'>
        <parameter name='DHCPSERVER' value='10.66.3.215'/>
      </filterref>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...
#virsh start rh6
Domain rh started

It is ok.

Comment 9 xhu 2011-06-28 07:15:21 UTC
(In reply to comment #8)
> (In reply to comment #4)
> > Could reproduce this bug on the following components, So set the bug status as
> > "assign".
> > 
> > Version-Release number of selected component (if applicable):
> > kernel-2.6.32-160.el6.x86_64
> > libvirt-0.9.2-1.el6.x86_64
> > qemu-kvm-0.12.1.2-2.165.el6.x86_64
> > 
> > Steps:
> > 1. # cat disallow-dhcp-server.xml
> > <filter name='disallow-dhcp-server' chain='ipv4'>
> >   <rule action='accept' direction='out' priority='100'>
> >     <ip srcipaddr='0.0.0.0' dstipaddr='255.255.255.255' protocol='udp'
> > srcportstart='68' dstportstart='67'/>
> >   </rule>
> >   <rule action='drop' direction='in' priority='100'>
> >     <ip srcipaddr='$DHCPSERVER' protocol='udp' srcportstart='67'
> > dstportstart='68'/>
> >   </rule>
> > </filter>
> > 
> > 2. # virsh nwfilter-define disallow-dhcp-server.xml
> > Network filter disallow-dhcp-server defined from disallow-dhcp-server.xml
> > 
> > 3.  define a guest with "<filterref filter='disallow-dhcp-server'/>" in
> > interface section
> > # virsh dumpxml rh6
> > ...
> >     <interface type='network'>
> >       <mac address='52:54:00:6c:73:8c'/>
> >       <source network='default'/>
> >       <model type='virtio'/>
> >       <filterref filter='disallow-dhcp-server'/>
> >       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> > function='0x0'/>
> >     </interface>
> > ...
> > 4. # virsh start rh6
> > error: Failed to start domain rh6
> > error: An error occurred, but the cause is unknown
> > 
> > No useful info could be found in the three log files. See the attachment in
> > comment 3.
> 
> As comment 5 told, redo comment 4, change step 3 as:
> # virsh dumpxml rh6
> ...
>     <interface type='network'>
>       <mac address='52:54:00:e4:e3:45'/>
>       <source network='default'/>
>       <filterref filter='disallow-dhcp-server'>
>         <parameter name='DHCPSERVER' value='10.66.3.215'/>
>       </filterref>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
> ...
> #virsh start rh6
> Domain rh started
> 
> It is ok.

Can the guest get ip and visit the public network?

Comment 10 Huming Jiang 2011-06-28 08:52:27 UTC
The guest with the filter 'disallow-dhcp-server' could not get ip and could not visit the public network.

Comment 13 errata-xmlrpc 2011-12-06 10:53:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


Note You need to log in before you can comment on or make changes to this bug.