Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Michael Tokarev
26.01.2012 18:55, Michael Tokarev wrote: 26.01.2012 13:54, ronnie sahlberg wrote: Ok so what about this You use a filename starting with "/proc/self/fd/" and you dont have a proc filesystem mounted? you are on your own! BTW, usual idiom (which was implemented in gawk for example) is to use /d

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Daniel P. Berrange
On Thu, Jan 26, 2012 at 08:54:11PM +1100, ronnie sahlberg wrote: > Ok so what about this > > You use a filename starting with "/proc/self/fd/" and you dont have a > proc filesystem mounted? you are on your own! IMHO that would be bad - turning what could easily be a platform neutral feature in

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Michael Tokarev
26.01.2012 13:54, ronnie sahlberg wrote: Ok so what about this You use a filename starting with "/proc/self/fd/" and you dont have a proc filesystem mounted? you are on your own! No you're not: IF ! STRNCMP (filename, "/proc/self/fd/", 14) THEN fopen(filename, "r") ELSE

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Kevin Wolf
Am 25.01.2012 23:39, schrieb Ronnie Sahlberg: > This patch adds configuration variables for iSCSI to set > initiator-name to use when logging in to the target, > which type of header-digest to negotiate with the target > and username and password for CHAP authentication. > > This allows specifying

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread ronnie sahlberg
Ok so what about this You use a filename starting with "/proc/self/fd/" and you dont have a proc filesystem mounted? you are on your own! regards ronnie sahlberg On Thu, Jan 26, 2012 at 8:27 PM, Kevin Wolf wrote: > Am 26.01.2012 10:18, schrieb ronnie sahlberg: >> Kevin, >> >> Collissions

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Michael Tokarev
On 26.01.2012 13:08, Kevin Wolf wrote: [] >> -readconfig fd:9 > Magic prefixes like this have one big problem: What if someone has a > config file called "fd:9"? We have the very same problem with protocols -readconfig ./fd:9 does the trick. > in the block layer and while in the general case it

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Kevin Wolf
Am 26.01.2012 10:18, schrieb ronnie sahlberg: > Kevin, > > Collissions are bad, but what about > > IF ! STRNCMP (filename, "/proc/self/fd/", 14) THEN > fopen(filename, "r") > ELSE > fdopen(atoi(filename+14), "r") > FI > > modulo better validation for the atio() arguments. > >

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread ronnie sahlberg
Kevin, Collissions are bad, but what about IF ! STRNCMP (filename, "/proc/self/fd/", 14) THEN fopen(filename, "r") ELSE fdopen(atoi(filename+14), "r") FI modulo better validation for the atio() arguments. Probability of anyone using "/proc/self/fd/" as a prefix for normal fil

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread Kevin Wolf
Am 25.01.2012 16:57, schrieb Eric Blake: > On 01/24/2012 11:47 PM, ronnie sahlberg wrote: >> Read from an arbitrary filedescriptor inherited from the parent process : >> 9> vnc=127.0.0.1:0 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1 >> -readconfig /proc/self/fd/9 > > That requires the existenc

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-25 Thread Eric Blake
On 01/25/2012 03:39 PM, Ronnie Sahlberg wrote: > This patch adds configuration variables for iSCSI to set > initiator-name to use when logging in to the target, > which type of header-digest to negotiate with the target > and username and password for CHAP authentication. > > This allows specifyin

[Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-25 Thread Ronnie Sahlberg
This patch adds configuration variables for iSCSI to set initiator-name to use when logging in to the target, which type of header-digest to negotiate with the target and username and password for CHAP authentication. This allows specifying a initiator-name either from the command line -iscsi init

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-25 Thread ronnie sahlberg
Fair enough. I will send a separate tiny patch to add 'fd:' support to specify to qemu to -readconfig from a preexisting filedescriptor. Other protocols like 'exec:' can easily be added later as needed. regards ronnie sahlberg On Thu, Jan 26, 2012 at 2:57 AM, Eric Blake wrote: > On 01/24/2012

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-25 Thread Eric Blake
On 01/24/2012 11:47 PM, ronnie sahlberg wrote: > Read from an arbitrary filedescriptor inherited from the parent process : > 9 vnc=127.0.0.1:0 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1 > -readconfig /proc/self/fd/9 That requires the existence of procfs, which is not portable (although it doe

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-24 Thread ronnie sahlberg
On Tue, Jan 24, 2012 at 5:07 AM, Eric Blake wrote: > > Can -readconfig support reading from an inherited fd, rather than only > taking a file name that qemu has to open()? > ... > > Can you give an actual command line that uses -readconfig, as part of > your example? > Thanks for the review Eric.

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-23 Thread Eric Blake
On 01/21/2012 03:03 AM, Ronnie Sahlberg wrote: > This patch adds configuration variables for iSCSI to set > initiator-name to use when logging in to the target, > which type of header-digest to negotiate with the target > and username and password for CHAP authentication. > > This allows specifyin

[Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-21 Thread Ronnie Sahlberg
This patch adds configuration variables for iSCSI to set initiator-name to use when logging in to the target, which type of header-digest to negotiate with the target and username and password for CHAP authentication. This allows specifying a initiator-name either from the command line -iscsi init

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-20 Thread ronnie sahlberg
On Thu, Jan 19, 2012 at 11:17 PM, Kevin Wolf wrote: > Am 18.12.2011 05:48, schrieb Ronnie Sahlberg: >> This patch adds configuration variables for iSCSI to set >> initiator-name to use when logging in to the target, >> which type of header-digest to negotiate with the target >> and username and pa

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-20 Thread Kevin Wolf
Am 20.01.2012 09:58, schrieb ronnie sahlberg: > On Thu, Jan 19, 2012 at 11:17 PM, Kevin Wolf wrote: >> Am 18.12.2011 05:48, schrieb Ronnie Sahlberg: >>> This patch adds configuration variables for iSCSI to set >>> initiator-name to use when logging in to the target, >>> which type of header-digest

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-19 Thread Kevin Wolf
Am 18.12.2011 05:48, schrieb Ronnie Sahlberg: > This patch adds configuration variables for iSCSI to set > initiator-name to use when logging in to the target, > which type of header-digest to negotiate with the target > and username and password for CHAP authentication. > > This allows specifying

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-03 Thread Daniel P. Berrange
On Fri, Dec 23, 2011 at 10:08:11AM +0100, Paolo Bonzini wrote: > On 12/22/2011 09:51 PM, ronnie sahlberg wrote: > >The difference between qcow2 and iscsi and the problem is that .open() > >is called for all devices before the monitor is started, so .open() is > >called before we would have a chance

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-12-23 Thread ronnie sahlberg
I do recognize that there is real need to provide password to iscsi (and rbd?) via the monitor. I myself do not use libvirt (it is just too much pain to be worth it to try to upgrade it out-of-step with your distribution) but I recognize that likely vast majority of users would use libvirt. Once

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-12-23 Thread Paolo Bonzini
On 12/22/2011 09:51 PM, ronnie sahlberg wrote: The difference between qcow2 and iscsi and the problem is that .open() is called for all devices before the monitor is started, so .open() is called before we would have a chance to even hand the password to qemu. For qcow2 this is not a problem sin

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-12-22 Thread ronnie sahlberg
Hi, You mean using the '-S' mode and setting the key after qemu has initialized all devices but before it actually starts booting the guest? That would not be easy and would probably require some intrusive in qemu itself that might affect other device types, so I am unsure. The difference between

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-12-18 Thread Paolo Bonzini
On 12/18/2011 05:48 AM, Ronnie Sahlberg wrote: This patch adds configuration variables for iSCSI to set initiator-name to use when logging in to the target, which type of header-digest to negotiate with the target and username and password for CHAP authentication. This allows specifying a initia

[Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-12-17 Thread Ronnie Sahlberg
This patch adds configuration variables for iSCSI to set initiator-name to use when logging in to the target, which type of header-digest to negotiate with the target and username and password for CHAP authentication. This allows specifying a initiator-name either from the command line -iscsi init

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-11-27 Thread Orit Wasserman
On 11/27/2011 01:24 AM, Ronnie Sahlberg wrote: > This patch adds configuration variables for iSCSI to set > initiator-name to use when logging in to the target, > which type of header-digest to negotiate with the target > and username and password for CHAP authentication. > > This allows specifyin

[Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-11-26 Thread Ronnie Sahlberg
This patch adds configuration variables for iSCSI to set initiator-name to use when logging in to the target, which type of header-digest to negotiate with the target and username and password for CHAP authentication. This allows specifying a initiator-name either from the command line -iscsi init