[libvirt] [PATCH] virsh: Parse "--mode readonly, shareable" in virsh attach-disk.

Eric Blake eblake at redhat.com
Mon Jun 16 13:11:54 UTC 2014


On 06/15/2014 03:48 AM, Dongsheng Yang wrote:
> We can not attach a disk with mode of both readonly and shareable.

Correct, because those are orthogonal modes.  You can't be in both modes
at the same time.

> Before:
> 	# virsh attach-disk --domain jeos --source attach.img --target vdb --persistent --mode readonly --mode shareable
> 	error: option --mode already seen
> 	# virsh attach-disk --domain jeos --source attach.img --target vdb --persistent --mode readonly --shareable
> 	error: option --mode already seen
> 	# virsh attach-disk --domain jeos --source attach.img --target vdb --persistent --mode readonly,shareable
> 	error: No support for readonly,shareable in command 'attach-disk'
> After:
> 	# virsh attach-disk --domain jeos --source attach.img --target vdb --persistent --mode readonly,shareable
> 	Disk attached successfully

I'm inclined to NACK this patch.  Pick one or the other, you can't have
both.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140616/ab4805c9/attachment-0001.sig>


More information about the libvir-list mailing list