Hide Forgot
Created attachment 565319 [details] Fix the missing name error message Description of problem: When creating a network (virsh net-create) with an erroneous XML containing an empty <name> element, the error message is misleading: error: Failed to create network from foo.xml error: missing domain name information It took me a bit of time to figure out that it was the *network* name that was missing (I generate this xml and didn't look at it, first). I realized that the same message is used for missing name when creating a domain, network, or device node. Attached patch (warning: against a completly different git than yours, don't pay attention to wrong shas) thus make this message more generic.
Would you mind also posting your patch upstream, to libvir-list, so that it will get more visibility?
I was wondering if the best way to send that was on a ML, but by looking at http://libvirt.org/bugs.html it seemed to me that bugzilla was the preferred way, so I created an account here and reported this bug. For such a small patch, sending an email would have actually be easier; could you indicate this way of reporting bugs/patch in the above-mentioned page? Thanks.
I've modified bugs.html to reflect that. Patch will be hitting the list momentariliy.
Now upstream; thanks again for your help: commit cff5573da22bfdc0db9d90d6a3a25a520cb1b955 Author: Benjamin Cama <benoar> Date: Thu Feb 23 17:37:30 2012 +0100 virterror: Misleading error message when name is missing [forwarding this here from RH bug #796732] When creating a network (virsh net-create) with an erroneous XML containing an empty <name> element, the error message is misleading: error: Failed to create network from foo.xml error: missing domain name information It took me a bit of time to figure out that it was the *network* name that was missing (I generate this xml and didn't look at it, first). I realized that the same message is used for missing name when creating a domain, network, or device node.