[libvirt] [PATCH 0/2] Fix network names with quotes

Daniel P. Berrange berrange at redhat.com
Tue Jun 9 14:44:44 UTC 2015


On Tue, Jun 09, 2015 at 07:44:36PM +0530, Shivaprasad bhat wrote:
> On Mon, Jun 8, 2015 at 7:09 PM, Michal Privoznik <mprivozn at redhat.com> wrote:
> > On 01.06.2015 10:06, Shivaprasad G Bhat wrote:
> >> The following series implements...
> >>
> >> ---
> >>
> >> Shivaprasad G Bhat (2):
> >>       fix domaincommon.rng to accept network name with quotes
> >>       escape quotes for dsmasq conf contents
> >>
> >>
> >>  docs/schemas/domaincommon.rng                      |    2 +-
> >>  src/util/virdnsmasq.c                              |   25 +++++++++++++++----
> >>  src/util/virpidfile.c                              |   15 ++++++++----
> >>  .../nat-network-name-with-quotes.conf              |   20 +++++++++++++++
> >>  .../nat-network-name-with-quotes.xml               |   26 ++++++++++++++++++++
> >>  tests/networkxml2conftest.c                        |    1 +
> >>  6 files changed, 79 insertions(+), 10 deletions(-)
> >>  create mode 100644 tests/networkxml2confdata/nat-network-name-with-quotes.conf
> >>  create mode 100644 tests/networkxml2confdata/nat-network-name-with-quotes.xml
> >>
> >
> >
> > There's nothing wrong with the patches. I'm just curious, what's the use
> > case? I always thought that name should be something simple. On the
> > other hand, we do something similar with domain names IIRC.
> >
> 
> Hi Michal,
> 
> I too am not sure if the client apps use the quotes. My tester
> reported it having issues as he was trying
> combinations including non-english language characters.
> 
> I saw the quotes being handled diligently everywhere except here. So
> posted the patches fixing them.

I was able to define a guest using quotes in the name, and start it
successfully. So on that basis, I think we should allow it for networks
and other object types whereever possible, for sake of consistency.

IOW, I don't care whether there's an explicit use case mentioned - it
is justiable based on existing practice :-)

$ virsh list
 Id    Name                           State
----------------------------------------------------
 3     ser"foo"ial                    running

$ ps -axuwf | grep qemu

berrange 18386  0.3  0.2 1398604 48240 ?       Sl   15:26   0:03 /usr/bin/qemu-system-x86_64 -machine accel=kvm -name ser"foo"ial -S -machine pc-i440fx-1.4,accel=tcg,usb=off -cpu SandyBridge,+erms,+smep,+fsgsbase,+rdrand,+f16c,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vm

$ ls $XDG_RUNTIME_DIR/libvirt/qemu/run/
ser"foo"ial.pid  ser"foo"ial.xml

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list