FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 04-22-2008, 10:46 PM
Michael DeHaan
 
Default libvirt and query strings in EL 5.1 behaves differently than F9

I was talking to Dan yesterday on OFTC about how to express query
strings in libvirt. Basically the new Cobbler wants to generate
kickstarts on the fly, and also do some fun things about remote
registration. This already works for PXE but I am having trouble
passing the kernel options line into libvirt still. What I was trying was:


For instance:
ks=http://server.example.com/blah?op=ks&profile=blah [OR]
ks=http://server.example.com/blah?op=ks;profile=blah

Under F9, this works for me correctly when I use the former method and do

extra = extra.replace("&","&")

However I have recieved reports today that the above does not work on
EL-5.1, where it (also replicated with virsh) chokes -- giving a message
that the end of the XML was unexpected (see pastebin below). I am
thinking the XML escaping built into virt-install/libvirt may not be the
same in EL-5.1? So I knew that query strings can also be delimited by
colons, but that too fails. If the form with the semicolon is easier,
how would I express that with correct escaping so that calls to virtinst
worked in both EL-5 and F-9?


Here is the error we are seeing from the latter query string form on 5.1

http://cobbler.pastebin.com/db0f8c7a

Help?

The last resort is to do something funky and make cobbler tolerate URLs
that do not contain any form of "?", "=", "&", and ";", but I would like
to stick to the RFCs for query string formatting if possible. I do
know that will work however, but if I need to do OS detection and make
calls into libvirt differently that would be doable also (and maybe
preferred).


Thanks!

--Michael







_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-22-2008, 11:00 PM
Pablo Iranzo Gómez
 
Default libvirt and query strings in EL 5.1 behaves differently than F9

Hi

Probably this one is more descriptive (koan generation, virsh test
and xml file for virsh dumped from koan.log)

http://cobbler.pastebin.com/f50f3fa63

The xml is the one dumped on ~/.koan/koan.log

Regards
Pablo




--
Pablo Iranzo Gómez
(http://Alufis35.uv.es/~iranzo/)
(PGPKey Available on http://www.uv.es/~iranzop/PGPKey.pgp)
--
Postulado de Boling sobre la Ley de Murphy:

Si se encuentra bien, no se preocupe. Se le pasará

On Tue, 22 Apr 2008, Michael DeHaan wrote:

> I was talking to Dan yesterday on OFTC about how to express query
> strings in libvirt. Basically the new Cobbler wants to generate
> kickstarts on the fly, and also do some fun things about remote
> registration. This already works for PXE but I am having trouble
> passing the kernel options line into libvirt still. What I was trying was:
>
> For instance:
> ks=http://server.example.com/blah?op=ks&profile=blah [OR]
> ks=http://server.example.com/blah?op=ks;profile=blah
>
> Under F9, this works for me correctly when I use the former method and do
>
> extra = extra.replace("&","&")
>
> However I have recieved reports today that the above does not work on
> EL-5.1, where it (also replicated with virsh) chokes -- giving a message
> that the end of the XML was unexpected (see pastebin below). I am
> thinking the XML escaping built into virt-install/libvirt may not be the
> same in EL-5.1? So I knew that query strings can also be delimited by
> colons, but that too fails. If the form with the semicolon is easier,
> how would I express that with correct escaping so that calls to virtinst
> worked in both EL-5 and F-9?
>
> Here is the error we are seeing from the latter query string form on 5.1
>
> http://cobbler.pastebin.com/db0f8c7a
>
> Help?
>
> The last resort is to do something funky and make cobbler tolerate URLs
> that do not contain any form of "?", "=", "&", and ";", but I would like
> to stick to the RFCs for query string formatting if possible. I do
> know that will work however, but if I need to do OS detection and make
> calls into libvirt differently that would be doable also (and maybe
> preferred).
>
> Thanks!
>
> --Michael
>
>
>
>
>
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools@redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
>

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-22-2008, 11:09 PM
"Daniel P. Berrange"
 
Default libvirt and query strings in EL 5.1 behaves differently than F9

On Tue, Apr 22, 2008 at 06:46:21PM -0400, Michael DeHaan wrote:
> I was talking to Dan yesterday on OFTC about how to express query
> strings in libvirt. Basically the new Cobbler wants to generate
> kickstarts on the fly, and also do some fun things about remote
> registration. This already works for PXE but I am having trouble
> passing the kernel options line into libvirt still. What I was trying was:
>
> For instance:
> ks=http://server.example.com/blah?op=ks&profile=blah [OR]
> ks=http://server.example.com/blah?op=ks;profile=blah
>
> Under F9, this works for me correctly when I use the former method and do
>
> extra = extra.replace("&","&")
>
> However I have recieved reports today that the above does not work on
> EL-5.1, where it (also replicated with virsh) chokes -- giving a message
> that the end of the XML was unexpected (see pastebin below). I am
> thinking the XML escaping built into virt-install/libvirt may not be the
> same in EL-5.1?

It isn't libvirt's job to escape the query string - it just receives
the XML document which must already be valid. If you're using virt-install
APIs for building the XML document, then it is virt-install's job to do
attribute escaping. This was broken in RHEL-5.1 and is fixed for 5.2
and Fedora 8 onwards

https://bugzilla.redhat.com/show_bug.cgi?id=417051

Dan.
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-23-2008, 07:06 AM
Daniel Veillard
 
Default libvirt and query strings in EL 5.1 behaves differently than F9

On Tue, Apr 22, 2008 at 07:51:31PM -0400, Michael DeHaan wrote:
> Daniel P. Berrange wrote:
> >On Tue, Apr 22, 2008 at 07:36:25PM -0400, Michael DeHaan wrote:
> >>So looking at what I posted previously, ex:
> >>
> >> http://server.example.com/?op=ks;profile=foo
> >>
> >>";" is (to my eyes) valid in XML. It is, right? Any idea why that may

To be a bit pedantic, no it's not valid which means conforming to a DTD
and the document has no DTD, but it is well formed which is the basic first
check that libvirt will do. You can verify well-formedness just by seeing no
error when passwd to xmllint --noout:

wei:~ -> xmllint --noout xen.xml
wei:~ ->

> Sure... http://cobbler.pastebin.com/f50f3fa63
>
> 1.
> libvir: Xen Daemon error : POST operation failed: (xend.err
> 'Invalid configuration unexpected EOF')
> 2.
> virDomainCreateLinux() failed POST operation failed: (xend.err
> 'Invalid configuration unexpected EOF')

if it was passed down to xend that means that libvirt didn't spot any
error.

Daniel

--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-23-2008, 10:55 PM
Pablo Iranzo Gómez
 
Default libvirt and query strings in EL 5.1 behaves differently than F9

Cobbler code, interpreted (afaik) on the service code, and the way
it interacts.

Koan git has also be edited to use this schema.

Regards
Pablo



--
Pablo Iranzo Gómez
(http://Alufis35.uv.es/~iranzo/)
(PGPKey Available on http://www.uv.es/~iranzop/PGPKey.pgp)
--
Postulado de Boling sobre la Ley de Murphy:

Si se encuentra bien, no se preocupe. Se le pasará

On Wed, 23 Apr 2008, Robin Bowes wrote:

> Michael DeHaan wrote:
> > My solution was to modify my mod_python URLs from
> >
> > ks=http://foo.example.com/cblr/srv?op=ks&system=foo
> >
> > To also support and use:
> >
> > ks=http://foo.example.com/cblr/srv/op/ks/system/foo
>
> Is that done in the cobbler code or using mod_rewrite?
>
> R.
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools@redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
>

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-23-2008, 11:18 PM
Michael DeHaan
 
Default libvirt and query strings in EL 5.1 behaves differently than F9

Robin Bowes wrote:

Michael DeHaan wrote:

My solution was to modify my mod_python URLs from

ks=http://foo.example.com/cblr/srv?op=ks&system=foo

To also support and use:

ks=http://foo.example.com/cblr/srv/op/ks/system/foo


Is that done in the cobbler code or using mod_rewrite?

R.

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools


Cobbler's code. No Apache configuration directives are required.

The service handler also supports regular query strings but know hows to
translate the "/" form if they see that instead.

Cobbler's various generators also generate the "/" form of the URLs.

--Michael





_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 06:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org