[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Fix cd-insert problem not detecting type.

On Mon, 2013-03-11 at 17:38 +0000, Ian Jackson wrote:
> Frediano Ziglio writes ("Re: [PATCH] Fix cd-insert problem not detecting 
> type."):
> > I think that changing XLU code (libxlu_disk_l.l) could just make some
> > other code break or move the parser back.
> I don't think we need to substantially change the existing parser.  I
> think we need to make sure we use it in the normal way.
> >   I think we should keep the
> > command line syntax compatibility
> Well, currently the command line syntax doesn't support "raw:<blah>"
> etc. which is what you are trying to introduce.  "raw:<blah>" would
> mean a file whose name starts "raw..." etc.  So it is not possible to
> make your use case work without breaking some obscure cases.

In 4.1 you could use prefixes that using a regex are


you could use similar syntax in Xml file. If you run just "xl cd-insert"
output is

'xl cd-insert' requires at least 3 arguments.

Usage: xl [-vfN] cd-insert <Domain> <VirtualDevice> <type:path>

Insert a cdrom into a guest's cd drive.

so anyway user still expect a similar syntax. block-attach support a
different syntax where parameters are split using different command line
arguments. Now it seems that code was changed trying to embed old syntax
in new parameters way but target parameter was used which does not
support old syntax.

It seems that libxlu_disk_l.l try even to emulate the old syntax but it
does not set correctly "old" format and backend, for instance for raw
should set backend to tap and format to raw while it just set format.

> My proposal is that we should bite this bullet and regularise the
> parsing, so that xl cd-insert takes the same kind of argument as xl
> block-attach.
> >   while updating internal code so perhaps the better option is to
> > detect is user tried to give a specific type and add the correct
> > "format" option to pass to parse_disk_config.  If you agree with
> > this I can write a patch. Is not clear however which "types" are
> > supported for xl cd-insert command. It seems a mix of backend (like
> > "phy") and formats (like "raw"). Is this expected?
> These "types" are a xend thing and are indeed a mixture of backend,
> format, and other information.  In xl they are supported (where they
> are) for backward compatibility, but they are not recommended.

> Ian.

By the way, do we want to break cd-insert command line syntax or just
add a new format?
Or is it better to add a new "block-change" command?
Currently using 4.2 you can't specify as many format as 4.1.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.