Re: [libvirt] virtio-scsi support proposal, v2

2011-12-23 Thread Paolo Bonzini
On 12/23/2011 12:57 PM, Osier Yang wrote: > IMHO "device=lun" is the right way to go here, per we want the > the device is exposed to guest as a LUN but not a normal disk. > But it seems for Laine's patch, it's also right to use "type=lun", > as it tries to disable/enable SG_IO for normal disk? Th

Re: [libvirt] [PATCH 0/2] qemu: add new disk type='lun' for bus='virtio'

2011-12-23 Thread Paolo Bonzini
On 12/23/2011 12:15 AM, Daniel P. Berrange wrote: The 'type' attribute refers to how the host emulator deals with the disk. The 'device' attribute refers to what type of device hardware is exposed to the guest. What we're doing here is controlling whether the host emulator allows SG_IO. The gue

[libvirt] virtio-scsi support proposal, v2

2011-12-23 Thread Paolo Bonzini
Here is a revised version of the virtio-scsi proposal. There's actually not too much left intact from v1. :) The main simplification is in how SCSI hosts can be addressed in a stable manner. SCSI controller models == Existing controller models are "auto", "buslogic", "lsilo

Re: [libvirt] [PATCH v2] Add new attribute writeout to element

2011-12-22 Thread Paolo Bonzini
On 12/22/2011 03:20 PM, Eric Blake wrote: > Usage: > > > > I still don't like the proposed XML. We need to get consensus on where to put it, with my proposal being: Right, other types of drivers might include a userspace NFS client, or some kind of "artificial"

Re: [libvirt] Associate a LUN as disk with WWNN/WWPN

2011-11-30 Thread Paolo Bonzini
On 11/28/2011 03:01 PM, Dave Allan wrote: We'd then extend the domain disk XML to take a pool/volume definition. I like the idea. It could be used for other things: - QEMU usermode iSCSI backend, including storing iSCSI secrets outside the domain XML. In this case, multiple domains will usu

Re: [libvirt] RE : Re: [PATCH] util: fix thinko in runIO

2011-11-28 Thread Paolo Bonzini
On 11/26/2011 02:14 PM, Bastien ROUCARIES wrote: Malloc page than realloc to smaller does not work ? There is no constraint that realloc(X, N) returns X, even if N is smaller than the previous allocation size. Paolo -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/m

Re: [libvirt] [PATCH] util: fix thinko in runIO

2011-11-25 Thread Paolo Bonzini
> Indeed; Linux has posix_memalign, and mingw never runs the io helper > (although it does compile it, hence the #if). If gnulib would give > us posix_memalign on mingw, we could nuke this #if altogether. That's pretty difficult (unless you also add a posix_memalign_free) because at the time posi

[libvirt] [PATCH] util: fix thinko in runIO

2011-11-24 Thread Paolo Bonzini
When aligning you need to clear the bits in the mask and leave the others aside. Likely this code has never run, and will never run. Signed-off-by: Paolo Bonzini --- src/util/iohelper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/iohelper.c b/src/util

Re: [libvirt] [PATCH] Add support for systemd init service

2011-11-11 Thread Paolo Bonzini
On 11/11/2011 03:32 PM, Daniel P. Berrange wrote: +%makeinstall SYSTEMD_UNIT_DIR=%{?buildroot:%{buildroot}}%{_unitdir} Is this correct since DESTDIR is prepended to it? Shouldn't it just be just %{_unitdir}? Otherwise looks good; it would be nicer to make it a configure option, but that's n

[libvirt] QEMU 1.0 test day - November 7th

2011-10-27 Thread Paolo Bonzini
Hi all, QEMU 1.0 test day will be held on November 7th. Any kind of testing that you can contribute will be appreciated---including testing your favorite hypervisor, desktop virtualization or management stack together with the new release. You are also welcome to add testing hints at http:

Re: [libvirt] changes to domain XML for SCSI support

2011-10-27 Thread Paolo Bonzini
On 10/27/2011 11:19 AM, Daniel P. Berrange wrote: where host selects the qdev parent device, while channel/target/lun are passed as qdev properties (the QEMU names are respectively channel, scsi-id, lun). The problem here is that we already have an address type that is used for SCSI - typ

Re: [libvirt] changes to domain XML for SCSI support

2011-10-26 Thread Paolo Bonzini
On 10/26/2011 06:15 PM, Dave Allan wrote: > In NPIV, a virtual HBA is created using "virsh nodedev-create" and > passed to the guest. Such virtual adapter does have a stable > address, namely its WWN. As such, it can be addressed simply by > generalizing the kind of source address that can

[libvirt] changes to domain XML for SCSI support

2011-10-26 Thread Paolo Bonzini
Hi all, let's kick off the discussion on what changes are needed in domain XML for more complete SCSI support. There are three relevant topics: 1) providing channel/target/lun addresses for SCSI disks; 2) supporting LUN passthrough; 3) supporting SCSI host passthrough. A fourth topic is s

Re: [libvirt] Polling for QEMU 1.0 test day

2011-10-11 Thread Paolo Bonzini
On 10/11/2011 06:02 PM, Rick Vernam wrote: On Tuesday 11 October 2011 10:45:14 Paolo Bonzini wrote: Hi all, please go here to cast your vote on when QEMU 1.0 test day will be help. http://www.doodle.com/35ae4zk7e4ndb5qq Having an "official" date will make it easier to put

Re: [libvirt] [PATCH 1/2] qemu: correct misspelled 'enospc' option, and only use for werror

2011-10-05 Thread Paolo Bonzini
On 10/04/2011 08:35 PM, Laine Stump wrote: This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=730909 When support for setting the qemu disk error policy to 'enospc' was added, it was inadvertantly as "enospace". This patch corrects that on the qemu commandline (while retaining the

Re: [libvirt] [Qemu-devel] Killing block migration in qemu?

2011-08-17 Thread Paolo Bonzini
On 08/17/2011 10:21 AM, Stefan Hajnoczi wrote: On Wed, Aug 17, 2011 at 5:51 PM, Paolo Bonzini wrote: following discussions yesterday with Juan Quintela and Marcelo Tosatti, here is my humble proposal: remove block migration from qemu master. It seems to me that keeping block migration is

Re: [libvirt] FYI: qemu -M option deprecated upstream, removed from -help output

2011-07-26 Thread Paolo Bonzini
On 07/25/2011 10:22 PM, Eric Blake wrote: As long as QEMU supports -M ? it should not be a problem. The -M option is not scraped from -help output. If -M is going away, then libvirt _should_ scrape -help output to see whether to use -M or -machine, rather than blindly using -M. -M going aw

Re: [libvirt] FYI: qemu -M option deprecated upstream, removed from -help output

2011-07-25 Thread Paolo Bonzini
On 07/25/2011 11:12 AM, Richard W.M. Jones wrote: I guess this may affect the qemu driver in future ... Thanks to Markus Armbruster for bringing this to my/our attention. As long as QEMU supports -M ? it should not be a problem. The -M option is not scraped from -help output. Paolo -- lib

Re: [libvirt] [PATCH 14/14] Enable systemd socket activation with virtlockd

2011-07-07 Thread Paolo Bonzini
On 07/07/2011 04:17 PM, Daniel P. Berrange wrote: if [ $1 -eq 1 ] ; then # Initial installation +/bin/systemctl enable virtlockd.service>/dev/null 2>&1 || : /bin/systemctl enable libvirtd.service>/dev/null 2>&1 || : /bin/systemctl enable cgconfig.service>/dev/null 2>&1 ||

Re: [libvirt] [PATCH] Do not drop kernel cmdline for xen pv domains

2011-07-07 Thread Paolo Bonzini
On 07/07/2011 11:31 AM, Daniel P. Berrange wrote: On Wed, Jul 06, 2011 at 07:36:26PM -0600, Jim Fehlig wrote: Kernel cmdline args can be passed to xen pv domains even when a bootloader is specified. The current config-to-sxpr mapping ignores cmdline when bootloader is present. Since the xend s

Re: [libvirt] mingw: test-poll pipe part fails

2011-06-30 Thread Paolo Bonzini
On 06/30/2011 07:56 PM, Eric Blake wrote: > Yes, Windows pipes are that broken.:( > > Using socketpair is a possibly good idea, but I would do it on > libvirtd only. I don't know exactly how libvirtd uses this pipe, but > perhaps it can be changed to an eventfd-like abstraction that can be >

Re: [libvirt] [PATCH v2] virsh: time_t is not a long on FreeBSD

2011-05-26 Thread Paolo Bonzini
On 05/25/2011 05:53 PM, Eric Blake wrote: > -localtime_r(&creation,&time_info); > +creation_time_t = creation_longlong; > +if (creation_time_t != creation_longlong) { > +vshError(ctl, "%s", _("time_t overflow")); We shouldn't hit this erro

Re: [libvirt] [PATCHv4] qemu: allow blkstat/blkinfo calls during migration

2011-05-21 Thread Paolo Bonzini
On 05/21/2011 12:11 AM, Eric Blake wrote: I think we're safe. It shouldn't matter if thread 2 reads thread 3's answer (because they are both read-only queries, and should be getting the same answer; or even if the answers differ, reading the newer answer is not horrible because it is still an ac

Re: [libvirt] [PATCHv4] qemu: allow blkstat/blkinfo calls during migration

2011-05-20 Thread Paolo Bonzini
On 05/16/2011 07:30 PM, Eric Blake wrote: > +while (priv->jobSignals& QEMU_JOB_SIGNAL_BLKSTAT) > +ignore_value(virCondWait(&priv->signalCond,&vm->lock)); > + > +priv->jobSignalsData.statDevName = disk->info.alias; > +priv->jobSignalsData.blockStat = stats; > +

Re: [libvirt] [RFC PATCH] support multifunction PCI device

2011-05-20 Thread Paolo Bonzini
On 05/20/2011 11:06 AM, Daniel P. Berrange wrote: So if I'm understanding correctly, the only difference we'll see with assigning devices to functions, instead of slots, is that hotplug of individual devices is not possible. From a guest (driver) POV everything else is 100% functionally unchanged

Re: [libvirt] [RFC PATCH] support multifunction PCI device

2011-05-13 Thread Paolo Bonzini
On 05/11/2011 09:55 AM, Daniel P. Berrange wrote: Hmm, that's kinda wierd& i'm suprised it works, particularly for LSI since I thought guest drivers would need support for multifunction too. For well-behaved {kernel,device,driver}s multifunction should be totally transparent. Example from

[libvirt] [PATCH 2/2] libxl: support enabling the HPET

2011-05-10 Thread Paolo Bonzini
libxl accepts hpet configuration in its domain info struct. Parse the domain definition's element in order to set the value. Signed-off-by: Paolo Bonzini --- src/libxl/libxl_conf.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/libxl/libxl_conf.c

[libvirt] [PATCH 0/2] xen/libxl: support enabling or disabling the HPET

2011-05-10 Thread Paolo Bonzini
This patch series add support for enabling or disabling the HPET in Xen domains. It's split in two because I didn't have means to test the libxl part. Paolo Bonzini (2): xen: parse and generate hpet item in sxpr libxl: support enabling the HPET src/libxl/li

[libvirt] [PATCH 1/2] xen: parse and generate hpet item in sxpr

2011-05-10 Thread Paolo Bonzini
leaving the default to "enabled" for compatibility reasons. This patch provides support for the hpet item in both sexpr and xm formats, and translates it to a element. Signed-off-by: Paolo Bonzini --- src/xenxs/xen_sxpr.c | 26 +++ src/xenx

Re: [libvirt] [PATCH 2/2] Network: Add support for DNS hosts definition

2011-03-31 Thread Paolo Bonzini
On 03/31/2011 01:18 PM, Michal Novotny wrote: You mean to compare command-line from the XML, i.e. to generate the command-line from XML and put the tests whether the generated command-line is the same as mentioned in the *.argv file containing whole command-line? Like for QEMU? Yes. Paolo --

Re: [libvirt] [PATCH 2/2] Network: Add support for DNS hosts definition

2011-03-31 Thread Paolo Bonzini
On 03/31/2011 01:06 PM, Michal Novotny wrote: > - this would be the third patch in the series, and it would add > dnsmasqAddHost calls in networkSaveDnsmasqHostsfile So this patch will be just adding the networkSaveDnsmasqHostsfile() call to the dnsmasqAddHost() and nothing else ? And all th

Re: [libvirt] [PATCH 2/2] Network: Add support for DNS hosts definition

2011-03-31 Thread Paolo Bonzini
+ + + + + + oneOrMore hostname elements seems preferrable. +if ((fd = open(hostsFile, You can use fopen and fprintf. This function also should be in src/util/dnsmasq.c (e.g. with addnhost* APIs in that file and dnsmasqAddHost as a public API). See the hostsfile* APIs there. Then yo

Re: [libvirt] [PATCH 1/2] Network: Add TXT record support for virtual DNS service

2011-03-31 Thread Paolo Bonzini
On 03/30/2011 02:57 PM, Michal Novotny wrote: Thename +attribute doesn't support commas in it's value and therefore you should +avoid using them since they are automatically replaced by spaces No, names with commas should be rejected. Paolo -- libvir-list mailing list libvir-list@redh

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-30 Thread Paolo Bonzini
On 03/30/2011 01:00 PM, Michal Novotny wrote: I think you should triage it a bit more, e.g. with strace -ff. Anyway, there is no hurry of doing this I think. Well, you mean to use strace on the daemonized process? Wherever it helps understanding what's happening. :) Also, I've been testing

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-30 Thread Paolo Bonzini
On 03/30/2011 12:41 PM, Michal Novotny wrote: 1) /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --txt-record="txt-record","some value, which is something" --addn-hosts=/var/run/libvirt/network/default.hosts --l

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-29 Thread Paolo Bonzini
On 03/29/2011 05:08 PM, Michal Novotny wrote: Ok, however vendor-class and user-class should be used together and therefore it could be committed into one commit, right? The next commit could be the dhcp-mac one... right ? No, they can be one patch series, but they should be separate commits.

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-29 Thread Paolo Bonzini
On 03/29/2011 01:37 PM, Michal Novotny wrote: On 03/29/2011 01:16 PM, Paolo Bonzini wrote: On 03/29/2011 12:52 PM, Michal Novotny wrote: [snip] It would be great to: 1) add and tags inside that allow filtering according to user/vendor classes Well, I didn't know this is support

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-29 Thread Paolo Bonzini
On 03/29/2011 12:52 PM, Michal Novotny wrote: [snip] It would be great to: 1) add and tags inside that allow filtering according to user/vendor classes Well, I didn't know this is supported by DNSMasq but it seems to be Yes, I am using it. :) -4, --dhcp-mac=, Map

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-29 Thread Paolo Bonzini
On 03/29/2011 12:52 PM, Michal Novotny wrote: [snip] It would be great to: 1) add and tags inside that allow filtering according to user/vendor classes Well, I didn't know this is supported by DNSMasq but it seems to be Yes, I am using it. :) -4, --dhcp-mac=, Map

Re: [libvirt] [PATCH 4/8] tests: don't alter state in $HOME

2011-03-29 Thread Paolo Bonzini
On 03/28/2011 06:02 PM, Eric Blake wrote: On 03/27/2011 02:59 AM, Laine Stump wrote: On 03/26/2011 08:12 AM, Eric Blake wrote: Diego reported a bug where virsh tries to initialize a readline history directory during 'make check' run as root, but fails because /root was read-only. It turns out

Re: [libvirt] mingw: virsh event loop failure in current git

2011-03-28 Thread Paolo Bonzini
On 03/29/2011 01:27 AM, Eric Blake wrote: Paolo, any thoughts on the best approach to take? (I know which way I'm leaning, but want some feedback before I give away my bias). Without guessing what your bias is, I also :) prefer to implement {g,s}et_nonblock_flag functions. It would use eithe

Re: [libvirt] [PATCH] Add support for DNS TXT records

2011-03-28 Thread Paolo Bonzini
On 03/28/2011 01:34 PM, Michal Novotny wrote: > Hi Laine, > thanks for your reply. Comments inline... > > On 03/25/2011 10:02 PM, Laine Stump wrote: >> I haven't had time yet to look at the code in detail, but thought I >> should send this preliminary commentary. >> >> On 03/24/2011 09:58 AM, Mich

Re: [libvirt] [RFC: PATCHv4 00/15] outgoing migration via fd: rather than exec:

2011-03-11 Thread Paolo Bonzini
On 03/11/2011 05:30 AM, Wen Congyang wrote: > Yep, makes sense. I'm double checking whether I reliably closed the > write end of the socket in all paths, and it may boil down to changing > the child to_always_ sendmsg even if there is no fd to send. I'm still > thinking about it. Using S

Re: [libvirt] [RFC PATCHv4 15/15] qemu: support fd: migration with compression

2011-03-09 Thread Paolo Bonzini
On 03/10/2011 03:18 AM, Eric Blake wrote: +if (qemuCaps&& qemuCapsGet(qemuCaps, QEMU_CAPS_MIGRATE_QEMU_FD)&& +priv->monConfig->type == VIR_DOMAIN_CHR_TYPE_UNIX) { +cmd = virCommandNewArgs(args); +virCommandSetInputFD(cmd, pipeFD[0]); +virCo

Re: [libvirt] [PATCH 5/5] setmem: add the new options to "virsh setmem" command

2011-03-09 Thread Paolo Bonzini
On 03/09/2011 04:59 PM, Daniel P. Berrange wrote: > +if (!flags) { > + if (virDomainSetMemory(dom, kilobytes) != 0) { > +ret = FALSE; > + } Indentation went a little bit wrong here. Also '!flags' could in fact be '!flags || (flags == VIR_DOMAIN_MEM_LIVE)' s

Re: [libvirt] [PATCHv3 07/10] util: rename virFileOperation to virFileOpenAs

2011-03-04 Thread Paolo Bonzini
On 03/04/2011 01:37 AM, Eric Blake wrote: (virFileOperation): Rename... (virFileOpenAs): ...and reduce parameters. As an "external observer" of libvirt development, I must admit virFileOperation always seemed an extremely heavyweight and clunky interface. Thanks for cleaning it up! Paolo

Re: [libvirt] [PATCHv3 09/10] qemu, storage: improve type safety

2011-03-04 Thread Paolo Bonzini
On 03/04/2011 01:37 AM, Eric Blake wrote: * src/storage/storage_backend.c (createRawFileOpHook): Change signature. (struct createRawFileOpHookData): Delete unused struct. (virStorageBackendCreateRaw): Adjust caller. * src/qemu/qemu_driver.c (struct fileOpHookData): Delete unused struct. (qemudDom

Re: [libvirt] [PATCHv3 06/10] storage: simplify fd handling

2011-03-04 Thread Paolo Bonzini
On 03/04/2011 01:37 AM, Eric Blake wrote: - unsigned int flags ATTRIBUTE_UNUSED) + unsigned int flags) Uhm, you're still not using the flags, you're just using the argument as a place to write the flags for virFileOperation. Perhaps the "inn

Re: [libvirt] [PATCH] util: Allow removing hash entries in virHashForEach

2011-03-04 Thread Paolo Bonzini
On 03/03/2011 03:09 PM, Daniel Veillard wrote: ACK, removing should be safe then, but adding will still be a big problem due to virHashGrow(). Removing _the current_ element is safe, on the other hand removing any other element used to be safe and now it may cause a dangling pointer access

Re: [libvirt] [PATCH 2/2] qemu: use -incoming fd:n to avoid qemu holding fd indefinitely

2011-03-01 Thread Paolo Bonzini
On 03/02/2011 06:16 AM, Eric Blake wrote: On 01/03/2011 06:39 AM, Paolo Bonzini wrote: On 12/23/2010 05:51 PM, Eric Blake wrote: In the outgoing direction, we still have to use a unix socket (outgoing migration is started via a monitor command, and I don't know how to pass a new fd into

Re: [libvirt] [Xen-devel] Re: [PATCH V2] Add libxenlight driver

2011-02-24 Thread Paolo Bonzini
On 02/23/2011 06:18 PM, Ian Jackson wrote: Because for now you want to be able to have both drivers. Unless, perhaps, it's somehow possible to select between them at runtime for the same URI scheme ? The Xen driver is already using a multitude of "subdrivers" (query xenstore, query the hyperv

Re: [libvirt] [PATCH V2] Add libxenlight driver

2011-02-23 Thread Paolo Bonzini
On 02/23/2011 03:56 AM, Jim Fehlig wrote: Add a new xen driver based on libxenlight [1], which is the primary toolstack starting with Xen 4.1.0. The driver is stateful, runs privileged only, and is accessed with libxl:/// URI. Why not let the user keep xen:/// ? Paolo -- libvir-list mailing

Re: [libvirt] [PATCH] Add support for multiple serial ports to Xen driver

2011-01-20 Thread Paolo Bonzini
On 01/20/2011 02:39 PM, Michal Novotny wrote: Well, I'm working on support for serial port configuration as serial = [ "/dev/null", "/dev/ttyS0", "/dev/ttyS1" ] to: 1) pass /dev/null to the guest as /dev/ttyS0 2) pass /dev/ttyS0 to the guest as /dev/ttyS1 3) pass /dev/ttyS1 to the guest as /dev/

Re: [libvirt] [PATCH] Add support for multiple serial ports to Xen driver

2011-01-20 Thread Paolo Bonzini
On 01/20/2011 12:58 PM, root wrote: +if ((list->type != VIR_CONF_STRING) || (list->str == NULL)) +goto skipport; + I believe this should do xenXMError(VIR_ERR_INTERNAL_ERROR, _("config value %s was malformed"), name); goto

Re: [libvirt] [PATCH 6/7] qemu: use lighter-weight fd:n on incoming tunneled migration

2011-01-17 Thread Paolo Bonzini
(qemudDomainMigratePrepareTunnel): Replace Unix socket with simpler pipe. Suggested by Paolo Bonzini. --- I've since been corrected; qemu_monitor.c has qemuMonitorIOWriteWithFD that looks like it can be used to avoid exec: on outgoing migrations by instead passing an open fd over a unix socket, although I hav

Re: [libvirt] [PATCH 2/2] qemu: use -incoming fd:n to avoid qemu holding fd indefinitely

2011-01-03 Thread Paolo Bonzini
On 12/23/2010 05:51 PM, Eric Blake wrote: In the outgoing direction, we still have to use a unix socket (outgoing migration is started via a monitor command, and I don't know how to pass a new fd into qemu for using with an fd:n outgoing migration via the monitor - it seems like fd is only useful

Re: [libvirt] [PATCH 2/2] qemu: use -incoming fd:n to avoid qemu holding fd indefinitely

2010-12-27 Thread Paolo Bonzini
On 12/23/2010 05:51 PM, Eric Blake wrote: Since you are at it, you may also want to replace the usage of netcat >> and Unix sockets with "-incoming fd:" and a one-way pipe. > > Not sure it's worth it. Is unix:path any less efficient than creating a > one-way pipe for use by fd:n? Also, we c

Re: [libvirt] [PATCH 2/2] qemu: use -incoming fd:n to avoid qemu holding fd indefinitely

2010-12-23 Thread Paolo Bonzini
On 12/22/2010 11:27 PM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=620363 When using -incoming stdio or -incoming exec:cat, qemu keeps the stdin fd open long after the migration is complete. Not to mention that exec:cat is horribly inefficient, by doubling the I/O and going t

Re: [libvirt] [PATCH 3/6] vbox: Add glue layer for MSCOM on Windows

2010-12-20 Thread Paolo Bonzini
On 12/18/2010 01:10 AM, Eric Blake wrote: case $ac_cv_search_dlopen:$host in no:*-*-mingw* | no:*-*-msvc*) ;; no:*) AC_MSG_ERROR([Unable to find dlopen()]) ;; 'none required:*') DLOPEN_LIBS= ;; *) DLOPEN_LIBS=$ac_cv_search_dlopen ;; esac ? Paolo -- libvir-list mailing list l

Re: [libvirt] [PATCH] remote: Fix TLS transport on Windows

2010-11-22 Thread Paolo Bonzini
custom_gnutls_push); +gnutls_transport_set_pull_function(session, custom_gnutls_pull); +#endif + /* Perform the TLS handshake. */ again: err = gnutls_handshake (session); Acked-By: Paolo Bonzini Paolo -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 10/11] Improve SCSI volume key and name generation

2010-11-12 Thread Paolo Bonzini
On 11/12/2010 07:45 PM, Daniel P. Berrange wrote: On Fri, Nov 12, 2010 at 07:32:05PM +0100, Paolo Bonzini wrote: On 11/12/2010 05:22 PM, Daniel P. Berrange wrote: +{ +const char *cmdargv[] = { +"/lib/udev/scsi_id", +"--replace-whitespace", +

Re: [libvirt] [PATCH 10/11] Improve SCSI volume key and name generation

2010-11-12 Thread Paolo Bonzini
On 11/12/2010 05:22 PM, Daniel P. Berrange wrote: +{ +const char *cmdargv[] = { +"/lib/udev/scsi_id", +"--replace-whitespace", +"--whitelisted", +"--device", dev, +NULL +}; Does this needs to be "/lib/udev/scsi_id -gud " for RHEL5 compatibility?

Re: [libvirt] [PATCH 08/11] Check whether pools are already active upon libvirtd startup

2010-11-12 Thread Paolo Bonzini
On 11/12/2010 05:22 PM, Daniel P. Berrange wrote: src/storage/storage_backend_mpath.c | 20 +++ src/storage/storage_backend_scsi.c| 25 Not related to your patch, but these two drivers are undocumented. Paolo -- libvir-list mailing list lib

Re: [libvirt] RFC: Supporting IPv6 on libvirt virtual networks

2010-11-03 Thread Paolo Bonzini
On 11/02/2010 07:22 PM, Laine Stump wrote: 1) The element of the network xml will be expanded in the following ways: a) can now appear multiple times (although I think only one of these can/should be allowed to have a element). The bridge interface (eg virbr0) will be configured with all give

Re: [libvirt] Valid characters in domain names?

2010-10-04 Thread Paolo Bonzini
On 10/04/2010 06:31 PM, Justin Clift wrote: Heh. Two periods in a name could lead to fun. Stuff like: name="../../../etc/shadow" Well, you know what I mean. :) Not if you prohibit / though... Paolo -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listi

Re: [libvirt] Valid characters in domain names?

2010-10-04 Thread Paolo Bonzini
On 10/03/2010 11:33 AM, Richard W.M. Jones wrote: Indeed. I'm sure we need a whitelist, not a blacklist as suggested by the other comment. All domains I'd ever want to create would match the regexp ^[[:alpha:]][-_[:alnum:]]*$ This might break existing users however. A period in a name is de

Re: [libvirt] [PATCH 12/12] food for thought

2010-10-01 Thread Paolo Bonzini
On 10/01/2010 04:18 PM, Daniel Veillard wrote: I would think augmenting the sexpr should be sufficient for this but the problem is really to find out when the feature is available, and I don't know how to do this reliably either (except trying and if there is an identifiable error keep it disa

Re: [libvirt] [PATCH] build: use portable sed expressions

2010-09-14 Thread Paolo Bonzini
On 09/10/2010 06:43 PM, Eric Blake wrote: > * src/Makefile.am (libvirt.def, libvirt_qemu.def): '\}' and '\t' > are not required by POSIX. Use '}' and literal tab instead. > (install-data-local): Avoid sed -i. > * tests/read-bufsiz: Likewise. > Reported by Mitchell Hashimoto. > --- > > This should

Re: [libvirt] [PATCH] Force FLR on for buggy SR-IOV devices.

2010-07-25 Thread Paolo Bonzini
On 07/23/2010 09:34 PM, Eric Blake wrote: +if (virAsprintf(&path, PCI_SYSFS "devices/%s/physfn", dev->name)< 0) { Weird spacing around < No, instead you are suffering from https://bugzilla.mozilla.org/show_bug.cgi?id=571502 :( Paolo -- libvir-list mailing list libvir-list@redhat.co

Re: [libvirt] [PATCH] Fix several undefined symbol errors in loadable driver modules

2010-06-23 Thread Paolo Bonzini
On 06/23/2010 01:13 PM, Daniel P. Berrange wrote: On Wed, Jun 23, 2010 at 01:08:40PM +0200, Paolo Bonzini wrote: On 06/23/2010 12:50 PM, Daniel P. Berrange wrote: libvirt_driver_test_la_LDFLAGS = -module -avoid-version +libvirt_driver_test_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la

Re: [libvirt] [PATCH] Fix several undefined symbol errors in loadable driver modules

2010-06-23 Thread Paolo Bonzini
On 06/23/2010 12:50 PM, Daniel P. Berrange wrote: >libvirt_driver_test_la_LDFLAGS = -module -avoid-version > +libvirt_driver_test_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la I don't think it is right to link to libvirt.la here or with other driver modules. The libvirtd daemon links to l

Re: [libvirt] [PATCH 2/5] build: replace redundant header check with function check

2010-04-29 Thread Paolo Bonzini
On 04/29/2010 05:41 AM, Eric Blake wrote: Gnulib guarantees that pthread.h exists, but for now, it is a dummy header with no support for most pthread_* functions. Modify our use of pthread to use function checks, rather than header checks, to determine how much pthread support is present. Shou

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-10 Thread Paolo Bonzini
On 04/09/2010 11:30 PM, Eric Blake wrote: Yeah, having the ability to specify an optional wrapper script, that receives the name of the normal interpreter and all the arguments the normal interpreter would have been given, sounds like the ultimate in flexibility at a minimum of xml. You can als

Re: [libvirt] [PATCH] virterror.c: avoid erroneous case "fall-through"

2010-04-06 Thread Paolo Bonzini
ACK Thanks for the ACK. However, when I saw the inconsistent spacing above, (the "break" I added is indented one space less than the "else" above it) I worried that my patch had a problem, so I went looking for the cause. There is no problem on my end. This seems to be coming from your mail cl

Re: [libvirt] [PATCH 14/15] Add HAVE_PTHREAD_H guard for pthread_sigmask

2010-03-31 Thread Paolo Bonzini
On 03/22/2010 02:25 AM, Matthias Bolte wrote: Correctly disable pthread related code if pthread is not avialable, in order to get it compile with MinGW on Windows. What about, instead #ifndef HAVE_PTHREAD_H #define pthread_sigmask sigprocmask #endif (or actually the equivalent if...AC_DEFINE.

Re: [libvirt] [Qemu-devel] Re: Supporting hypervisor specific APIs in libvirt

2010-03-26 Thread Paolo Bonzini
Adding to this C wrappers for QMP commands threatens to make QMP command arguments part of the library ABI. Compatible QMP evolution (like adding an optional argument) turns into a libqmp soname bump. Counter-productive. How do you plan to avoid that? .so versioning. Ugly as hell to do manu

Re: [libvirt] [RFC]: Snapshot API

2010-03-24 Thread Paolo Bonzini
On 03/24/2010 12:02 PM, Daniel P. Berrange wrote: I don't see any need to special case the base image here. The main virDOmainSnapshotDelete() API already lets you discard all snapshots until you get to the base image - VMWare/VirtualBox already demonstrate this is sufficient. Is this as effici

Re: [libvirt] Two issues regarding TFTP support in virtual networks...

2010-03-24 Thread Paolo Bonzini
On 03/24/2010 04:24 PM, Darryl L. Pierce wrote: On Wed, Mar 24, 2010 at 03:34:04PM +0100, Paolo Bonzini wrote: I'm still in the same state here. Shall I open a bug against libvirt regarding it not recognizing the --tftp-root argument? That would be against dnsmasq? I'm not sure i

Re: [libvirt] [RFC]: Snapshot API

2010-03-24 Thread Paolo Bonzini
On 03/24/2010 02:09 PM, Chris Lalancette wrote: The problem, though, is what Mattias points out; there is no (easy) way that, given state C, I can get back to state A to make a new snapshot. I actually have to be at state A to take a new snapshot with a parent of A. I think this is a place where

Re: [libvirt] Two issues regarding TFTP support in virtual networks...

2010-03-24 Thread Paolo Bonzini
On 03/24/2010 01:08 PM, Darryl L. Pierce wrote: On Thu, Mar 11, 2010 at 04:10:24PM -0500, Darryl L. Pierce wrote: Here is what's output by libvirtd: 11:36:57.608: debug : virRun:809 : /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/testbr6762.pid --conf-

Re: [libvirt] [RFC]: Snapshot API

2010-03-24 Thread Paolo Bonzini
> > /* Return the number of snapshots for this domain */ > > int virDomainSnapshotNum(virDomainPtr domain, unsigned int flags); > > Shouldn't this be called virDomainNumOfSnapshots to be consistent with > the naming or other num-of functions? Gah. I struggled with this; I like the fact that all

Re: [libvirt] [PATCH 1/14] Adding recursive locks

2010-03-22 Thread Paolo Bonzini
On 03/18/2010 06:04 PM, Eric Blake wrote: >> >> ACK. I had to double-check MSDN to make sure that threads-win32 already >> creates recursive mutex by default. > > I don't supposed you read if its possible to make it non-recursive, since > the orginal impl is supposed to be non-recursive !

Re: [libvirt] [RFC PATCH] build: consistently use C99 varargs macros

2010-03-01 Thread Paolo Bonzini
On 03/01/2010 06:24 PM, Daniel P. Berrange wrote: mingw == gcc built as a cross-compiler, so there's no issue there. Unfortunately, _native_ mingw (i.e. building under MSYS) uses a hideously old version of GCC (3.4.x), so it's not always a non-issue. But it is fine in this case: http://gcc.

Re: [libvirt] [PATCH] add an assert, to avoid a false-positive NULL-deref warning from clang

2010-03-01 Thread Paolo Bonzini
On the other hand, perhaps a more invasive rewrite would also work while also avoiding assert(), by hoisting the worker->quitRequest into the while loop, something like: while ((client = qemudPendingJob(server)) == NULL) { if (worker->quitRequest || virCondWait(&se

Re: [libvirt] [PATCH] Ignore SIGWINCH in remote client call to poll(2) (RHBZ#567931).

2010-02-24 Thread Paolo Bonzini
On 02/24/2010 05:09 PM, Richard W.M. Jones wrote: In bug 567931 we found that virt-top would exit occasionally when the terminal window was resized. Tracking this down it turned out that SIGWINCH was being delivered to the process at exactly the point where the libvirt remote driver was calling

Re: [libvirt] [PATCH] Ignore SIGWINCH in remote client call to poll(2) (RHBZ#567931).

2010-02-24 Thread Paolo Bonzini
On 02/24/2010 04:09 PM, Richard W.M. Jones wrote: No signal handler will necessarily do things like > longjmp-ing out of the remote driver, so every signal could give rise to > a similar bug. Did you mean "signals handlers might longjmp out ..."? No, I meant what I wrote, as longjmp-ing out

Re: [libvirt] [PATCH 1/4] Avoid searching for windres when not building for cygwin or mingw.

2010-02-24 Thread Paolo Bonzini
On 02/24/2010 04:22 PM, Richard W.M. Jones wrote: On Wed, Feb 24, 2010 at 08:11:45AM -0700, Eric Blake wrote: According to Diego Elio Pettenò on 2/24/2010 8:04 AM: Check the host string before deciding whether to look for windres or not. dnl Look for windres to build a Windows icon resource.

Re: [libvirt] [PATCH 3/4] Add a simple macro to check in which library dlopen() is, and use it.

2010-02-24 Thread Paolo Bonzini
On 02/24/2010 04:21 PM, Eric Blake wrote: > + AC_SEARCH_LIBS([dlopen], [dl], > +[DLOPEN_LIBS=${LIBS#${old_libs}} The shell expansion ${a#b} is not portable to Solaris /bin/sh. Is that a problem for libvirt, or are we Linux-centric enough to not care? It should definitely configure rig

Re: [libvirt] [PATCH] Ignore SIGWINCH in remote client call to poll(2) (RHBZ#567931).

2010-02-24 Thread Paolo Bonzini
On 02/24/2010 02:06 PM, Richard W.M. Jones wrote: The correct solution is to mask out SIGWINCH for the duration of the poll(2) system call. The per-thread mask is changed and restored immediately after the call. Since we are using pthread_sigmask, this should not affect other threads, and since

Re: [libvirt] [PATCH] Fix domain restore for files on root-squash NFS.

2010-02-24 Thread Paolo Bonzini
On 02/24/2010 06:20 AM, Laine Stump wrote: ...since I see nothing in POSIX that guarantees that pipe() will preserve your initialized values across failure. I think it's better to explicitly set things to -1 on the failure path, rather than initializing that way. Interesting point. If we can't

Re: [libvirt] [PATCH 3/3] Add volume zeroing

2010-02-16 Thread Paolo Bonzini
On 02/16/2010 05:31 PM, Dave Allan wrote: ANother option would be to add an explicit virStorageVolZero() API to allow a volume to be wiped independently of create/delete operations. I like this approach. Since the code is already written for pretty much every permutation: regular non-sparse f

Re: [libvirt] [PATCH 3/3] Add volume zeroing

2010-02-16 Thread Paolo Bonzini
On 02/16/2010 12:33 PM, Daniel P. Berrange wrote: The idea of zeroing upon delete, is that we want the currently allocated extents to be overwritten with zeros. If we truncate to 0 size, then extend to original size I imagine that would easily allow the filesystem to give you a new set of extents

Re: [libvirt] [PATCH 3/3] Add volume zeroing

2010-02-16 Thread Paolo Bonzini
On 02/16/2010 05:08 AM, Dave Allan wrote: What about for a sparse file doing just ftruncate (fd, 0); ftruncate (fd, st.st_size); That's a good point. The only thing that makes me hesitate is that I'm not certain that the file is guaranteed to contain zeros following the second call to ftrunc

Re: [libvirt] [PATCH 3/3] Add volume zeroing

2010-02-15 Thread Paolo Bonzini
On 02/15/2010 10:29 PM, David Allan wrote: * If the volume is a sparse file and the fiemap ioctl is available, use fiemap to locate the volume's extents. What about for a sparse file doing just ftruncate (fd, 0); ftruncate (fd, st.st_size); ? It's already sparse, it doesn't hurt to make

Re: [libvirt] [PATCH 7/9] Wire protocol format and dispatcher for virConnectBaselineCPU

2010-02-10 Thread Paolo Bonzini
On 02/10/2010 07:11 PM, Daniel P. Berrange wrote: On Fri, Feb 05, 2010 at 04:56:56PM +0100, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- daemon/remote.c | 25 + daemon/remote_dispatch_args.h |1 + daemon/remote_dispatch_prototy

Re: [libvirt] Two issues regarding TFTP support in virtual networks...

2010-01-13 Thread Paolo Bonzini
testbr31018 Are there any relative pathing values that should be used by the tftp and bootp tags? Should the tftp->root attribute point to the work directory and then bootp->file refer to tftpboot/pxelinux.0? No, the above seems fine (I should have pointed you to tests/networkxml2

Re: [libvirt] [PATCH 21/34] Convert character devices over to use -device

2010-01-13 Thread Paolo Bonzini
On 01/08/2010 06:23 PM, Daniel P. Berrange wrote: diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 5dcd50f..eded887 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1592,6 +1592,9 @@ static char *qemuDiskDriveName(const virDomainDiskDefPtr disk) case VIR_D

Re: [libvirt] [PATCH 07/34] Convert monitor over to use virDomainDeviceAddress

2010-01-13 Thread Paolo Bonzini
On 01/08/2010 06:23 PM, Daniel P. Berrange wrote: @@ -1206,9 +1206,7 @@ int qemuMonitorJSONAddUSBDeviceMatch(qemuMonitorPtr mon, /* XXX qemu also returns a 'function' number now */ Wrong comment now. Paolo -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/lis

Re: [libvirt] Two issues regarding TFTP support in virtual networks...

2010-01-13 Thread Paolo Bonzini
You are not giving BOOTP info (you are missing the tag, which goes inside). Okay, here's the XML that's now being generated by my test script: testbr6253 However, I still get the message "No filename or root path specified" within the VM and it does not boot from the above direct

Re: [libvirt] Two issues regarding TFTP support in virtual networks...

2010-01-11 Thread Paolo Bonzini
(mcpie...@mcpierce-desktop:node-image)$ sudo virsh net-dumpxml testbr541 testbr541 f389317f-8420-7516-df9d-756b7deb3d37 When I start up the VM, I see it get an IP address within the range specified, but it never pxeboots the ISO image. To what

<    2   3   4   5   6   7   8   >