Bug 1001094 - virsh net-update reports an invalid pointer error with non-existent network
virsh net-update reports an invalid pointer error with non-existent network
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-26 09:39 EDT by Ján Tomko
Modified: 2014-06-17 20:54 EDT (History)
4 users (show)

See Also:
Fixed In Version: libvirt-1.1.1-3.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:28:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ján Tomko 2013-08-26 09:39:20 EDT
Description of problem:
virsh net-update reports an invalid pointer error with non-existent network

Version-Release number of selected component (if applicable):
libvirt-1.1.1-2.el7

How reproducible:
I'm certain that it happens all the time.

Steps to Reproduce:
1. Run virsh net-update with a non-existent network:
virsh # net-update net404 delete dns-srv '<srv service='name'/>"

Actual results:
error: failed to get network 'net404'
error: Network not found: no network with matching name 'net404'
error: invalid network pointer in virNetworkFree

Expected results:
No invalid pointer error.
Comment 1 Ján Tomko 2013-08-26 09:42:12 EDT
Upstream patch posted:
https://www.redhat.com/archives/libvir-list/2013-August/msg01301.html
Comment 3 Ján Tomko 2013-08-26 10:01:19 EDT
Now fixed upstream:
commit 784cca89c51fd13383064f248a6b375fb34e516f
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2013-08-26 12:51:08 +0200
Commit:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2013-08-26 15:51:15 +0200

    Don't free NULL network in cmdNetworkUpdate
    
    If the network has not been found, virNetworkFree(NULL)
    was called, resulting in an extra error:
    error: invalid network pointer in virNetworkFree
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1001094

git describe: v1.1.1-212-g784cca8
Comment 5 hongming 2013-09-02 03:46:38 EDT
Verify it using libvirt-1.1.1-3.el7.x86_64. The result is expected. Move its status to VERIFIED.


virsh # net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes

virsh # net-update net404 delete dns-srv '<srv service='name'/>"
error: failed to get network 'net404'
error: Network not found: no network with matching name 'net404'
Comment 6 Ludek Smid 2014-06-13 05:28:04 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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