<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/14/2014 12:30 PM, Sheldon wrote:<br>
</div>
<blockquote cite="mid:539C6A7C.5050608@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">I'd like to give up to support ".<br>
<br>
" is not allowed by dnsmasq.<br>
the number of " but be even<br>
</div>
</blockquote>
<br>
ACK.<br>
<br>
<blockquote cite="mid:539C6A7C.5050608@linux.vnet.ibm.com"
type="cite">
<div class="moz-cite-prefix">
ERROR:cherrypy.error.62418064:[14/Jun/2014:23:11:44] HTTP
Traceback (most recent call last):<br>
File
"/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line
656, in respond<br>
response.body = self.handler()<br>
File
"/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py",
line 188, in __call__<br>
self.body = self.oldhandler(*args, **kwargs)<br>
File
"/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line
34, in __call__<br>
return self.callable(*self.args, **self.kwargs)<br>
File
"/home/shhfeng/work/workdir/kimchi/src/kimchi/control/base.py",
line 72, in wrapper<br>
ident = fn(*model_args)<br>
File
"/home/shhfeng/work/workdir/kimchi/src/kimchi/model/networks.py",
line 308, in activate<br>
network.create()<br>
File
"/home/shhfeng/work/workdir/kimchi/src/kimchi/model/libvirtconnection.py",
line 62, in wrapper<br>
ret = f(*args, **kwargs)<br>
File "/usr/lib64/python2.7/site-packages/libvirt.py", line
2318, in create<br>
if ret == -1: raise libvirtError ('virNetworkCreate()
failed', net=self)<br>
libvirtError: internal error: Child process (/sbin/dnsmasq
'--conf-file=/var/lib/libvirt/dnsmasq/@#$%^&*()_+=-!~|{}[];'\''`"::::?><\.conf')
unexpected exit status 1: <br>
dnsmasq: missing " at line 10 of
/var/lib/libvirt/dnsmasq/@#$%^&*()_+=-!~|{}[];'`"::::?><\.conf<br>
<br>
<br>
<br>
I create a network with name "ab", with contains two ". also
error.<br>
<br>
ERROR:cherrypy.error.62418064:[14/Jun/2014:23:24:49] HTTP
Traceback (most recent call last):<br>
File
"/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line
656, in respond<br>
response.body = self.handler()<br>
File
"/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py",
line 188, in __call__<br>
self.body = self.oldhandler(*args, **kwargs)<br>
File
"/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line
34, in __call__<br>
return self.callable(*self.args, **self.kwargs)<br>
File
"/home/shhfeng/work/workdir/kimchi/src/kimchi/control/base.py",
line 72, in wrapper<br>
ident = fn(*model_args)<br>
File
"/home/shhfeng/work/workdir/kimchi/src/kimchi/model/networks.py",
line 308, in activate<br>
network.create()<br>
File
"/home/shhfeng/work/workdir/kimchi/src/kimchi/model/libvirtconnection.py",
line 62, in wrapper<br>
ret = f(*args, **kwargs)<br>
File "/usr/lib64/python2.7/site-packages/libvirt.py", line
2318, in create<br>
if ret == -1: raise libvirtError ('virNetworkCreate()
failed', net=self)<br>
libvirtError: An error occurred, but the cause is unknown<br>
<br>
<br>
On 06/14/2014 10:16 PM, Sheldon wrote:<br>
</div>
<blockquote cite="mid:539C5956.7040608@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 06/14/2014 06:01 PM, Sheldon
wrote:<br>
</div>
<blockquote cite="mid:539C1D84.2000808@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 06/13/2014 07:52 PM, Aline
Manera wrote:<br>
</div>
<blockquote cite="mid:539AE610.2060409@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 06/13/2014 04:43 AM, Sheldon
wrote:<br>
</div>
<blockquote cite="mid:539AAB87.7070903@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 06/13/2014 04:58 AM, Aline
Manera wrote:<br>
</div>
<blockquote cite="mid:539A147D.4050204@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 06/12/2014 08:19 AM, <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:shaohef@linux.vnet.ibm.com">shaohef@linux.vnet.ibm.com</a>
wrote:<br>
</div>
<blockquote
cite="mid:1402571942-6157-1-git-send-email-shaohef@linux.vnet.ibm.com"
type="cite">
<pre wrap="">From: ShaoHe Feng <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
Both '-' and '_' are allowed by libvirt, so we should not put extra
restrictions.
Signed-off-by: ShaoHe Feng <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
---
ui/js/src/kimchi.network.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index 23930cd..c6e828d 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -321,7 +321,7 @@ kimchi.cleanNetworkDialog = function() {
kimchi.setupNetworkFormEvent = function() {
$("#networkName").on("keyup", function(event) {
- $("#networkName").toggleClass("invalid-field", !$("#networkName").val().match(/^[a-zA-Z0-9_]+$/));
+ $("#networkName").toggleClass("invalid-field", !$("#networkName").val().match(/^[\-\w]+$/));
kimchi.updateNetworkFormButton();
});
$("#networkTypeIso").on("click", function(event) {
</pre>
</blockquote>
<br>
<font face="DejaVu Sans Mono">I agree with Cristian.<br>
You should remove the whole line:<br>
</font><br>
$("#networkName").toggleClass("invalid-field",
!$("#networkName").val().match(/^[a-zA-Z0-9_]+$/));<br>
<br>
</blockquote>
what about some little restrictions than libvirt. <br>
such as wildcard "*", "?" and "/", [], {} ! are not
allowed. <br>
<br>
</blockquote>
<br>
Yes, we need to restrict only the characters not allowed by
libvirt<br>
</blockquote>
so only "/" is restricted? the same rule with VM name and
storage-pool name?<br>
<blockquote cite="mid:539AE610.2060409@linux.vnet.ibm.com"
type="cite"> <br>
<blockquote cite="mid:539AAB87.7070903@linux.vnet.ibm.com"
type="cite"> for wildcard can be used in shell. such as:<br>
$ ls dat*<br>
debugreports objectstore screenshots sessions<br>
$ ls dat?<br>
debugreports objectstore screenshots sessions<br>
$ ls data<br>
debugreports objectstore screenshots sessions<br>
$ ls [d]ata<br>
debugreports objectstore screenshots sessions<br>
<br>
shell meta characters and control operator should we
support?<br>
" ' ` = $ < > | & ( ) { } ; && || !<br>
I have do some test as follow:<br>
<br>
1. <br>
I rename the network as "dd/ddd", libvirt will report an
error:<br>
create file '/etc/libvirt/qemu/networks/dd/ddd.xml.new':
No such file or directory <br>
We do can help libvirt to escape "/". And seems linux
support every character. <br>
<br>
</blockquote>
<br>
It is because '/' is a special character in xml files.<br>
</blockquote>
</blockquote>
Seems it is not the xml special character. <br>
$ touch dd\/ddd.xml<br>
touch: cannot touch ‘dd/ddd.xml’: No such file or directory.<br>
<br>
"\" may cause a big trouble. <br>
I'd like to not escape "\", what about you? <br>
<br>
seems only "< & >" are xml special characters.<br>
<blockquote cite="mid:539C1D84.2000808@linux.vnet.ibm.com"
type="cite">
<blockquote cite="mid:539AE610.2060409@linux.vnet.ibm.com"
type="cite"> We need to scape it.<br>
<br>
<blockquote cite="mid:539AAB87.7070903@linux.vnet.ibm.com"
type="cite"> 2.<br>
I also create a <span class="column column-name cell"
title="*.efault">network named "*.efault", kimchi can
work works well, that's kimchi UI's problem. <br>
it report: "Error: Syntax error, unrecognized
expression: #*.efault</span>". <br>
I can also fix this problem.<br>
<br>
</blockquote>
<br>
Please, send a patch for it too<br>
<br>
<blockquote cite="mid:539AAB87.7070903@linux.vnet.ibm.com"
type="cite"> virsh # net-list --all<br>
Name State Autostart Persistent<br>
----------------------------------------------------------<br>
*.efault inactive yes yes<br>
brg20 active yes yes<br>
dddd active yes yes<br>
default active yes yes<br>
test_abc active yes yes<br>
<br>
strangely, I can not list the persistent network
*.efault.xml file. <br>
$ sudo ls /var/lib/libvirt/network/<br>
dddd.xml default.xml test_abc.xml<br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
<br>
<blockquote cite="mid:539AAB87.7070903@linux.vnet.ibm.com"
type="cite"> <br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</blockquote>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</blockquote>
<br>
</body>
</html>