[libvirt] [PATCH] Misleading error message when name is missing

Hi, [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. Attached patch (warning: against a completly different git than yours, don't pay attention to wrong shas) thus make this message more generic. Regards, Benjamin PS: please Cc me, I'm not subscribed

On 02/23/2012 09:37 AM, Benjamin Cama wrote:
Hi,
[forwarding this here from RH bug #796732]
Thanks for taking the time to contribute, and for putting up with our split personality on bug reports to BZ vs. patches to the list :)
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.
ACK and pushed. I also added you to AUTHORS; let me know if you need any adjustments to a preferred spelling.
PS: please Cc me, I'm not subscribed
That's list policy in general (hmm, another thing we should document on our bug page - you don't have to be a subscriber to post a bug or patch, because maintainers will reply-all). -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Le jeudi 23 février 2012 à 16:32 -0700, Eric Blake a écrit :
On 02/23/2012 09:37 AM, Benjamin Cama wrote:
[forwarding this here from RH bug #796732]
Thanks for taking the time to contribute, and for putting up with our split personality on bug reports to BZ vs. patches to the list :)
You're welcome. I must admit I don't always take this time, but libvirt is a project that is quite useful to me, so I like giving back something.
ACK and pushed. I also added you to AUTHORS; let me know if you need any adjustments to a preferred spelling.
I didn't expect an entry in AUTHORS for such a trivial change… But thanks anyway!
PS: please Cc me, I'm not subscribed
That's list policy in general (hmm, another thing we should document on our bug page - you don't have to be a subscriber to post a bug or patch, because maintainers will reply-all).
It was just in case, as I didn't read the policy before posting… It's the usual way in most Free Software projects anyway. And having open ML to non-subscribers is also a good practice, thanks for keeping it. And thanks for accepting non-Signed-off patches on non-related repos, too; I'll try to do better next time. Regards, Benjamin
participants (2)
-
Benjamin Cama
-
Eric Blake