Re: [libvirt] [PATCH] bhyve: fix error message in bhyveStateInitialize

2014-08-12 Thread Roman Bogorodskiy
), - BHYVE_LOG_DIR); + BHYVE_STATE_DIR); goto cleanup; } ACK, will push today. Roman Bogorodskiy pgpImFQ2l_eTt.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir

Re: [libvirt] [PATCH v2] storage: ZFS support

2014-08-05 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Changes from the initial version: - Update docs/schemas and docs/storage.html.in with ZFS backend information - Drop StartPool and StopPool that does nothing and therefore not needed - Fix memory leak in 'tokens' variable - Fill volume key before

Re: [libvirt] [PATCH] docs: bhyve: document recent changes

2014-07-30 Thread Roman Bogorodskiy
Ján Tomko wrote: On 07/24/2014 05:54 PM, Roman Bogorodskiy wrote: - mention that one disk and one network limitation is no longer actual for 1.2.6 and newer s/actual/current/ - add 'cdrom' device to the sample domain XML --- docs/drvbhyve.html.in | 12 +--- 1

Re: [libvirt] [PATCH] schema: bhyve and nmdm updates

2014-07-29 Thread Roman Bogorodskiy
Eric Blake wrote: On 07/25/2014 10:43 AM, Roman Bogorodskiy wrote: * docs/schemas/domaincommon.rng: Add bhyve domain type, nmdm serial type and master and slave optional attributes for serial that are used by nmdm * tests/domainschematest: Add bhyvexml2argvdata directory

[libvirt] [PATCH v2] storage: ZFS support

2014-07-26 Thread Roman Bogorodskiy
NO size So it should not be a problem to check it once and save in some sort of state struct inside of the ZFS backend. Roman Bogorodskiy (1): storage: ZFS support configure.ac | 43 + docs/schemas/storagepool.rng | 20 +++ docs/storage.html.in

[libvirt] [PATCH v2] storage: ZFS support

2014-07-26 Thread Roman Bogorodskiy
/storage_backend_zfs.c new file mode 100644 index 000..2aeefb5 --- /dev/null +++ b/src/storage/storage_backend_zfs.c @@ -0,0 +1,329 @@ +/* + * storage_backend_zfs.c: storage backend for ZFS handling + * + * Copyright (C) 2014 Roman Bogorodskiy + * + * This library is free software; you can

[libvirt] [PATCH] schema: bhyve and nmdm updates

2014-07-25 Thread Roman Bogorodskiy
* docs/schemas/domaincommon.rng: Add bhyve domain type, nmdm serial type and master and slave optional attributes for serial that are used by nmdm * tests/domainschematest: Add bhyvexml2argvdata directory to validate bhyve XMLs --- docs/schemas/domaincommon.rng | 8

Re: [libvirt] [PATCH RFC] storage: ZFS support

2014-07-24 Thread Roman Bogorodskiy
Ján Tomko wrote: On 07/22/2014 07:08 PM, Roman Bogorodskiy wrote: Implement ZFS storage backend driver. Currently supported only on FreeBSD because of ZFS limitations on Linux. Features supported: - pool-start, pool-stop - pool-info - vol-list - vol-create / vol-delete

Re: [libvirt] [PATCH] bhyve: cdrom support

2014-07-24 Thread Roman Bogorodskiy
Ján Tomko wrote: On 07/19/2014 06:03 PM, Roman Bogorodskiy wrote: Add support for CDROM devices for bhyve driver using bhyve(8)'s 'ahci-cd' device type. As bhyve currently does not support media insertion at runtime, disallow to start a domain with an empty source path for cdrom

[libvirt] [PATCH] docs: bhyve: document recent changes

2014-07-24 Thread Roman Bogorodskiy
- mention that one disk and one network limitation is no longer actual for 1.2.6 and newer - add 'cdrom' device to the sample domain XML --- docs/drvbhyve.html.in | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in

Re: [libvirt] [PATCH libvirt-tck] docs: typo fixes

2014-07-23 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Fix a few typos in docs/intro.pod. --- docs/intro.pod | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) ping? Roman Bogorodskiy -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH libvirt-tck] docs: typo fixes

2014-07-23 Thread Roman Bogorodskiy
Ján Tomko wrote: On 06/27/2014 05:59 PM, Roman Bogorodskiy wrote: Fix a few typos in docs/intro.pod. --- docs/intro.pod | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) ACK Thanks; pushed. Roman Bogorodskiy pgpjSe2uKYbbn.pgp Description: PGP signature -- libvir

[libvirt] [PATCH RFC] storage: ZFS support

2014-07-22 Thread Roman Bogorodskiy
backend for ZFS handling + * + * Copyright (C) 2014 Roman Bogorodskiy + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License

[libvirt] [PATCH] Fix build on non-Linux platforms

2014-07-21 Thread Roman Bogorodskiy
Commit ef48a1b introduced virFindSCSIHostByPCI for Linux and a stub for other platforms that returns -1 while the function should return 'char *', so use 'return NULL' instead. Commit fbd91d4 introduced virReadSCSIUniqueId with the third argument 'int *result', however the stub for non-Linux

[libvirt] [PATCH] storage: logical: drop useless if

2014-07-21 Thread Roman Bogorodskiy
virStorageBackendLogicalCreateVol contains a piece like: if (vol-target.path != NULL) { /* A target path passed to CreateVol has no meaning */ VIR_FREE(vol-target.path); } The 'if' is useless here, but 'syntax-check' doesn't catch that because of the comment, so drop the

Re: [libvirt] [PATCH] Fix build on non-Linux platforms

2014-07-21 Thread Roman Bogorodskiy
John Ferlan wrote: Sorry about that. It's been such a long time since I updated/wrote the code I cannot remember why the arguments changed. No problem, it was a quick fix anyway. :) Roman Bogorodskiy pgpZCezL7OogR.pgp Description: PGP signature -- libvir-list mailing list libvir-list

Re: [libvirt] [PATCH] storage: logical: drop useless if

2014-07-21 Thread Roman Bogorodskiy
John Ferlan wrote: On 07/21/2014 01:39 PM, Roman Bogorodskiy wrote: virStorageBackendLogicalCreateVol contains a piece like: if (vol-target.path != NULL) { /* A target path passed to CreateVol has no meaning */ VIR_FREE(vol-target.path

[libvirt] [PATCH] bhyve: cdrom support

2014-07-19 Thread Roman Bogorodskiy
Add support for CDROM devices for bhyve driver using bhyve(8)'s 'ahci-cd' device type. As bhyve currently does not support media insertion at runtime, disallow to start a domain with an empty source path for cdrom devices. --- src/bhyve/bhyve_command.c | 43

Re: [libvirt] [PATCH libvirt-tck] bhyve: reconnect to domains after libvirtd restart

2014-07-18 Thread Roman Bogorodskiy
Ján Tomko wrote: On 06/29/2014 06:06 PM, Roman Bogorodskiy wrote: Try to reconnect to the running domains after libvirtd restart. To achieve that, do: ... @@ -1207,9 +1218,16 @@ bhyveStateInitialize(bool priveleged ATTRIBUTE_UNUSED, NULL

Re: [libvirt] [PATCH v3 07/16] numatune: Encapsulate numatune configuration in order to unify results

2014-07-17 Thread Roman Bogorodskiy
; ^ 4 errors generated. Should we probably drop the repeating definitions from domain_conf.h as we're including numatune_conf.h anyway? Roman Bogorodskiy pgprEV7Y1QBNm.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com

Re: [libvirt] [PATCH v3 07/16] numatune: Encapsulate numatune configuration in order to unify results

2014-07-17 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Martin Kletzander wrote: There were numerous places where numatune configuration (and thus domain config as well) was changed in different ways. On some places this even resulted in persistent domain definition not to be stable (it would change

Re: [libvirt] [PATCH v3 07/16] numatune: Encapsulate numatune configuration in order to unify results

2014-07-17 Thread Roman Bogorodskiy
Eric Blake wrote: On 07/17/2014 10:57 AM, Roman Bogorodskiy wrote: Roman Bogorodskiy wrote: Looks like this breaks build with clang: gmake[3]: Entering directory `/usr/home/novel/code/libvirt/src' CC util/libvirt_util_la-virclosecallbacks.lo In file included from

Re: [libvirt] [PATCH] bhyve: reconnect to domains after libvirtd restart

2014-07-16 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Roman Bogorodskiy wrote: Roman Bogorodskiy wrote: Try to reconnect to the running domains after libvirtd restart. To achieve that, do: ping? ping? Roman Bogorodskiy -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman

Re: [libvirt] [PATCH 0/2] Implement interface stats for BSD

2014-07-15 Thread Roman Bogorodskiy
Michal Privoznik wrote: ACK to both patches. Pushed, thanks! Roman Bogorodskiy pgpdVFTqkiyz4.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] bhyve: reconnect to domains after libvirtd restart

2014-07-10 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Roman Bogorodskiy wrote: Try to reconnect to the running domains after libvirtd restart. To achieve that, do: ping? Roman Bogorodskiy -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/2] util: virstatslinux: make more generic

2014-07-06 Thread Roman Bogorodskiy
Rename linuxDomainInterfaceStats to virNetInterfaceStats in order to allow adding platform specific implementations without making consumer worrying about specific implementation to be used. Also, rename util/virstatslinux.c to util/virstats.c so placing other platform specific implementations

[libvirt] [PATCH 0/2] Implement interface stats for BSD

2014-07-06 Thread Roman Bogorodskiy
look like: vnet0 rx_bytes 731603341 vnet0 rx_packets 518354 vnet0 rx_errs 0 vnet0 rx_drop 0 vnet0 tx_bytes 17577834 vnet0 tx_packets 264226 vnet0 tx_errs 0 vnet0 tx_drop 0 Roman Bogorodskiy (2): util: virstatslinux: make more

[libvirt] [PATCH 2/2] Implement interface stats for BSD

2014-07-06 Thread Roman Bogorodskiy
--- configure.ac| 13 - src/util/virstats.c | 51 +++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a12186b..8001e24 100644 --- a/configure.ac +++ b/configure.ac @@ -275,7 +275,7

[libvirt] [PATCH libvirt-tck] bhyve: reconnect to domains after libvirtd restart

2014-06-29 Thread Roman Bogorodskiy
Try to reconnect to the running domains after libvirtd restart. To achieve that, do: * Save domain state - Modify virBhyveProcessStart() to save domain state to the state dir - Modify virBhyveProcessStop() to cleanup the pidfile and the state * Detect if the state information loaded

Re: [libvirt] [PATCH] bhyve: reconnect to domains after libvirtd restart

2014-06-29 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Try to reconnect to the running domains after libvirtd restart. To achieve that, do: Oops, messed with my shell history and sent with a wrong subject prefix. Roman Bogorodskiy pgpzhMt9rTB1l.pgp Description: PGP signature -- libvir-list mailing list libvir-list

[libvirt] [PATCH] bhyve: fix build by fixing typo in variable name

2014-06-27 Thread Roman Bogorodskiy
Commit 80d0918b introduced a typo in variable name: s/failIncomaptible/failIncompatible/ Pushed under the build breaker rule. --- src/bhyve/bhyve_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index

[libvirt] [PATCH libvirt-tck] docs: typo fixes

2014-06-27 Thread Roman Bogorodskiy
Fix a few typos in docs/intro.pod. --- docs/intro.pod | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/intro.pod b/docs/intro.pod index 3684d51..09227ae 100644 --- a/docs/intro.pod +++ b/docs/intro.pod @@ -47,7 +47,7 @@ hypervisor and libvirt release is

Re: [libvirt] [PATCH] Fix closedir usage in virNumaGetPages

2014-06-23 Thread Roman Bogorodskiy
requirements, but as POSIX was merely standardizing existing practice, we are stuck with them being different in behavior. The patch is pushed now; thanks. Roman Bogorodskiy pgpJaW8oVBxxu.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com

[libvirt] [PATCH] Fix closedir usage in virNumaGetPages

2014-06-21 Thread Roman Bogorodskiy
virNumaGetPages calls closedir(dir) in cleanup and dir could be NULL if we jump there from the failed opendir() call. While it's not harmful on Linux, FreeBSD libc crashes [1], so make sure that dir is not NULL before calling closedir. 1:

[libvirt] [PATCH] Fix cast error in virsh-host.c

2014-06-19 Thread Roman Bogorodskiy
Build with clang fails on virsh-host.c: virsh-host.c:323:53: error: cast from 'unsigned int *' to 'unsigned long long *' increases required alignment from 4 to 8 [-Werror,-Wcast-align] if (vshCommandOptScaledInt(cmd, pagesize, (unsigned long long *) pagesize, Fix that by casting

Re: [libvirt] [PATCH v6] bhyve: implement PCI address allocation

2014-06-13 Thread Roman Bogorodskiy
Ján Tomko wrote: On 06/01/2014 07:53 PM, Roman Bogorodskiy wrote: Automatically allocate PCI addresses for devices instead of hardcoding them in the driver code. The current allocation schema is to dedicate an entire slot for each devices. Also, allow having arbitrary number

[libvirt] [PATCH 2/2] bhyve: do not cleanup unallocated networks on fail

2014-06-13 Thread Roman Bogorodskiy
virBhyveProcessStart() calls bhyveNetCleanup() if it fails. However, it might fail earlier than networks are allocated, so modify bhyveNetCleanup() to check if net-ifname is not NULL before going further with the cleanup. --- src/bhyve/bhyve_process.c | 10 ++ 1 file changed, 6

[libvirt] [PATCH 1/2] bhyve: fix crash in bhyveBuildNetArgStr

2014-06-13 Thread Roman Bogorodskiy
bhyveBuildNetArgStr() calls virNetDevTapCreateInBridgePort() and passes tapfd = NULL, but tapfdSize = 1. That is wrong, because if virNetDevTapCreateInBridgePort() crashes after successfully creating a TAP device, it'll jump to 'error' label, that loops over tapfd and calls VIR_FORCE_CLOSE:

[libvirt] [PATCH 0/2] bhyve: fix crashes when running without networking

2014-06-13 Thread Roman Bogorodskiy
Craig Rodrigues reported a problem on freebsd-virtualization list when libvirtd with bhyve driver crashes when the bridge does not exist [1]. 1: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=1431191+0+current/freebsd-virtualization These two patches addresses the problem. Roman Bogorodskiy (2

Re: [libvirt] [PATCH 1/2] bhyve: fix crash in bhyveBuildNetArgStr

2014-06-13 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/13/2014 10:48 AM, Roman Bogorodskiy wrote: bhyveBuildNetArgStr() calls virNetDevTapCreateInBridgePort() and passes tapfd = NULL, but tapfdSize = 1. That is wrong, because if virNetDevTapCreateInBridgePort() crashes after successfully creating a TAP device, it'll

Re: [libvirt] [PATCH 2/2] bhyve: do not cleanup unallocated networks on fail

2014-06-13 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/13/2014 10:48 AM, Roman Bogorodskiy wrote: virBhyveProcessStart() calls bhyveNetCleanup() if it fails. However, it might fail earlier than networks are allocated, so modify bhyveNetCleanup() to check if net-ifname is not NULL before going further

[libvirt] [PATCH] bhyve: silent destroy command errors on cleanup

2014-06-13 Thread Roman Bogorodskiy
When virBhyveProcessStart() fails, it tries to unload a guest that could have been already loaded using bhyveload(8) to make sure not to leave it hanging in memory. However, we could fail before loading a VM into memory, so 'bhyvectl --destroy' command will fail and print an error message that

Re: [libvirt] [PATCH] bhyve: silent destroy command errors on cleanup

2014-06-13 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/13/2014 01:00 PM, Roman Bogorodskiy wrote: When virBhyveProcessStart() fails, it tries to unload a guest that could have been already loaded using bhyveload(8) to make sure not to leave it hanging in memory. However, we could fail before loading a VM

Re: [libvirt] [PATCH] maint: exempt graphic binaries from syntax check

2014-06-11 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/11/2014 02:56 AM, Martin Kletzander wrote: On Tue, Jun 10, 2014 at 01:39:03PM -0600, Eric Blake wrote: Roman Bogorodskiy reported a syntax-check failure when using FreeBSD; complaining that: prohibit_empty_first_line tools/libvirt_win_icon_16x16.ico:1

Re: [libvirt] [PATCHv3 07/36] storage: Switch metadata crawler to use storage driver to get unique path

2014-06-11 Thread Roman Bogorodskiy
Peter Krempa wrote: On 06/09/14 16:07, Roman Bogorodskiy wrote: Peter Krempa wrote: On 06/07/14 20:35, Roman Bogorodskiy wrote: Peter Krempa wrote: Use the virStorageFileGetUniqueIdentifier() function to get a unique identifier regardless of the target storage type instead

Re: [libvirt] [PATCH] virsh: include bhyve in virsh -V output

2014-06-11 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/10/2014 12:26 PM, Roman Bogorodskiy wrote: Add 'Bhyve' in hypervisor list reported by 'virsh -V' if it's compiled it. --- tools/virsh.c | 3 +++ 1 file changed, 3 insertions(+) ACK Pushed, thanks! Roman Bogorodskiy pgpVB8oonTwzn.pgp Description: PGP

[libvirt] [PATCH] vbox: fix compilation error

2014-06-10 Thread Roman Bogorodskiy
clang complains about possibly uninitialized variable: vbox/vbox_snapshot_conf.c:1355:9: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!(xPathContext = xmlXPathNewContext(xml))) {

Re: [libvirt] [PATCH] vbox: fix compilation error

2014-06-10 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/10/2014 11:10 AM, Roman Bogorodskiy wrote: clang complains about possibly uninitialized variable: vbox/vbox_snapshot_conf.c:1355:9: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized

Re: [libvirt] [PATCH] vbox: fix compilation error

2014-06-10 Thread Roman Bogorodskiy
Michal Privoznik wrote: On 10.06.2014 19:10, Roman Bogorodskiy wrote: clang complains about possibly uninitialized variable: vbox/vbox_snapshot_conf.c:1355:9: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized

Re: [libvirt] [PATCH v3 2/2] maint: prohibit empty first lines

2014-06-10 Thread Roman Bogorodskiy
--sc_prohibit_empty_first_line = \ - ^(README|daemon/THREADS\.txt|src/esx/README|docs/library.xen|tests/vmwareverdata/fusion-5.0.3.txt)$$ + ^(README|daemon/THREADS\.txt|src/esx/README|docs/library.xen|tests/vmwareverdata/fusion-5.0.3.txt|tools/.*\.ico)$$ Roman Bogorodskiy pgp9L6EGt8MqH.pgp Description: PGP

[libvirt] [PATCH] virsh: include bhyve in virsh -V output

2014-06-10 Thread Roman Bogorodskiy
Add 'Bhyve' in hypervisor list reported by 'virsh -V' if it's compiled it. --- tools/virsh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virsh.c b/tools/virsh.c index 15f3025..828d585 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3233,6 +3233,9 @@ vshShowVersion(vshControl

Re: [libvirt] [PATCHv3 07/36] storage: Switch metadata crawler to use storage driver to get unique path

2014-06-09 Thread Roman Bogorodskiy
Peter Krempa wrote: On 06/07/14 20:35, Roman Bogorodskiy wrote: Peter Krempa wrote: Use the virStorageFileGetUniqueIdentifier() function to get a unique identifier regardless of the target storage type instead of relying on canonicalize_path(). A new function that checks

Re: [libvirt] [PATCHv3 07/36] storage: Switch metadata crawler to use storage driver to get unique path

2014-06-07 Thread Roman Bogorodskiy
Roman Bogorodskiy pgpTpVtxjRkzD.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] docs: bhyve driver documentation improvements

2014-06-01 Thread Roman Bogorodskiy
Ján Tomko wrote: On 05/11/2014 09:30 AM, Roman Bogorodskiy wrote: - Document 'domxml-to-native' command - Mention that the nmdm console support needs an appropriate kernel module loaded --- docs/drvbhyve.html.in | 21 + 1 file changed, 21 insertions(+) ACK

[libvirt] [PATCH v6] bhyve: implement PCI address allocation

2014-06-01 Thread Roman Bogorodskiy
. Changes from v5: - Call bhyveDomainAssignAddresses() in virBhyveProcessStart() in order not to break domains defined in the earlier versions of libvirtd that did no address assignment - Call bhyveDomainAssignAddresses() in bhyveDomainCreateXML() Roman Bogorodskiy (1): bhyve: implement

[libvirt] [PATCH v6] bhyve: implement PCI address allocation

2014-06-01 Thread Roman Bogorodskiy
a/src/bhyve/bhyve_device.c b/src/bhyve/bhyve_device.c new file mode 100644 index 000..fa266de --- /dev/null +++ b/src/bhyve/bhyve_device.c @@ -0,0 +1,174 @@ +/* + * bhyve_device.c: bhyve device management + * + * Copyright (C) 2014 Roman Bogorodskiy + * + * This library is free software; you can

Re: [libvirt] [PATCH v5] bhyve: implement PCI address allocation

2014-06-01 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Ján Tomko wrote: One more thing that bothers me: after this change user needs to re-define a domain, otherwise domain will have no addresses and will fail to start. Could/should it be handled somehow? Yes, it would be nice not to break upgrades

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-31 Thread Roman Bogorodskiy
Sat May 31 19:45:53 VIR 2014 $ TZ=VIR-00:30VID,0/00:00:00,366/23:59:59 date Sat May 31 19:15:58 UTC 2014 So it looks like it's failing back to the UTC time. Roman Bogorodskiy pgpiGEvJR1HGj.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-31 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Laine Stump wrote: Since there isn't a single libc API to get this value, this patch supplies one which gets the value by grabbing current UTC, then converting that into a struct tm with localtime_r(), then back to a time_t using mktime; it again does

Re: [libvirt] [PATCH] util: fix DST end date in virtimetest timezones

2014-05-31 Thread Roman Bogorodskiy
Laine Stump wrote: Reported by: Roman Bogorodskiy bogorods...@gmail.com Some of the tests for virTimeLocalOffsetFromUTC set an imaginary timezone that attempts to force dyalight savings time active all the time by setting a start date of 0/00:00:00 and end date of 366/23:59:59. Since

Re: [libvirt] [PATCH v5] bhyve: implement PCI address allocation

2014-05-29 Thread Roman Bogorodskiy
by calling AssignAddresses from QemuProcessStart. Thanks, I'll take a look how Qemu driver does that. PS Looks like I'm late with getting this feature into the current release as it's unlikely I'll be able to get to it until this weekend. Roman Bogorodskiy -- libvir-list mailing list libvir-list

Re: [libvirt] [PATCH v5] bhyve: implement PCI address allocation

2014-05-26 Thread Roman Bogorodskiy
Ján Tomko wrote: On 05/17/2014 07:49 PM, Roman Bogorodskiy wrote: Automatically allocate PCI addresses for devices instead of hardcoding them in the driver code. The current allocation schema is to dedicate an entire slot for each devices. Also, allow having arbitrary number

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-21 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: On Mon, May 19, 2014 at 11:12:05AM -0600, Eric Blake wrote: On 05/19/2014 10:57 AM, Roman Bogorodskiy wrote: Eric Blake wrote: On 05/17/2014 01:44 PM, Roman Bogorodskiy wrote: In a number of places in the bhyve driver, virObjectUnlock() is called

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-21 Thread Roman Bogorodskiy
Eric Blake wrote: On 05/21/2014 08:02 AM, Roman Bogorodskiy wrote: So, what you propose is checking explicitly for NULL in virObjectUnlock before we do virObjectIsClass(), and if the passed argument is NULL indeed, just return, without logging anything about that? Yes, since we

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-21 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: On Sat, May 17, 2014 at 11:44:48PM +0400, Roman Bogorodskiy wrote: In a number of places in the bhyve driver, virObjectUnlock() is called with an arg without check if the arg is non-NULL, which could result in passing NULL value and a warning like

Re: [libvirt] [PATCH] bhyve: domain events support

2014-05-20 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: On Wed, Apr 23, 2014 at 07:50:09PM +0400, Roman Bogorodskiy wrote: Support events for these functions: - domainDefineXML - domainUndefine - domainCreate{WithFlags,XML} - domainDestroy --- src/bhyve/bhyve_driver.c | 88

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-19 Thread Roman Bogorodskiy
Eric Blake wrote: On 05/17/2014 01:44 PM, Roman Bogorodskiy wrote: In a number of places in the bhyve driver, virObjectUnlock() is called with an arg without check if the arg is non-NULL, which could result in passing NULL value and a warning like: virObjectUnlock:340 : Object 0x0

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-19 Thread Roman Bogorodskiy
of redundant code, we don't have to clean all callers up in a single patch. Good, so I'll add a check for NULL in virObjectUnlock() and prepare a series that cleans up the redundant if (obj) check before calling virObjectUnlock(obj), say, on per-driver basis. Roman Bogorodskiy pgpPGrb6NFUPe.pgp

[libvirt] [PATCH 01/12] Add explicit non-NULL check for virObjectUnlock()

2014-05-19 Thread Roman Bogorodskiy
A lot of users of virObjectUnlock() use it this way: if (obj) virObjectUnlock(obj); And while passing NULL is not harmless, it generates a warning like virObjectUnlock:340 : Object 0x0 ((unknown)) is not a virObjectLockable instance To make this function usage simplier, check if argument is

[libvirt] [PATCH 04/12] libxl: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/libxl/libxl_domain.c | 3 +- src/libxl/libxl_driver.c | 124 --- 2 files changed, 42 insertions(+), 85 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 80d5280..efcdca7 100644 --- a/src/libxl/libxl_domain.c

[libvirt] [PATCH 06/12] openvz: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/openvz/openvz_driver.c | 69 -- 1 file changed, 23 insertions(+), 46 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 87df2a7..2f410c3 100644 --- a/src/openvz/openvz_driver.c +++

[libvirt] [PATCH 05/12] lxc: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/lxc/lxc_driver.c | 129 +- src/lxc/lxc_process.c | 3 +- 2 files changed, 44 insertions(+), 88 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 1086289..76ff824 100644 --- a/src/lxc/lxc_driver.c +++

[libvirt] [PATCH 00/12] Add explicit non-NULL check for virObjectUnlock()

2014-05-19 Thread Roman Bogorodskiy
Background is here: https://www.redhat.com/archives/libvir-list/2014-May/msg00613.html Roman Bogorodskiy (12): Add explicit non-NULL check for virObjectUnlock() qemu: virObjectUnlock usage cleanup bhyve: virObjectUnlock usage cleanup libxl: virObjectUnlock usage cleanup lxc

[libvirt] [PATCH 02/12] qemu: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/qemu/qemu_capabilities.c | 3 +- src/qemu/qemu_driver.c | 324 +++ src/qemu/qemu_migration.c| 12 +- src/qemu/qemu_process.c | 6 +- 4 files changed, 115 insertions(+), 230 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 11/12] util: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/util/virclosecallbacks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virclosecallbacks.c b/src/util/virclosecallbacks.c index 4f26172..b6eb5b5 100644 --- a/src/util/virclosecallbacks.c +++ b/src/util/virclosecallbacks.c @@ -343,8 +343,7 @@

[libvirt] [PATCH 03/12] bhyve: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/bhyve/bhyve_driver.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 580b124..af10ad3 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -522,8 +522,7 @@

[libvirt] [PATCH 08/12] test: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/test/test_driver.c | 156 + 1 file changed, 52 insertions(+), 104 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 37756e7..b7d1153 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -1710,8

[libvirt] [PATCH 07/12] parallels: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/parallels/parallels_driver.c | 30 ++ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index ab59599..5e17bc5 100644 --- a/src/parallels/parallels_driver.c +++

[libvirt] [PATCH 09/12] uml: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/uml/uml_driver.c | 81 ++-- 1 file changed, 27 insertions(+), 54 deletions(-) diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 1e0ec0e..3befd12 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -406,8 +406,7 @@

[libvirt] [PATCH 12/12] maint: add virObjectUnlock to useless_free_options

2014-05-19 Thread Roman Bogorodskiy
Add virObjectUnlock() to a list of functions checking argument for NULL is useless for --- cfg.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/cfg.mk b/cfg.mk index 5ff2721..3ac67a8 100644 --- a/cfg.mk +++ b/cfg.mk @@ -163,6 +163,7 @@ useless_free_options = \

[libvirt] [PATCH 10/12] vmware: virObjectUnlock usage cleanup

2014-05-19 Thread Roman Bogorodskiy
--- src/vmware/vmware_driver.c | 51 -- 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 6edc0bc..4d8bf3c 100644 --- a/src/vmware/vmware_driver.c +++

Re: [libvirt] [PATCH] Revert maint: prefer enum over int for virstoragefile structs

2014-05-17 Thread Roman Bogorodskiy
good, as other workarounds look quite ugly indeed. Roman Bogorodskiy pgptX455NNNyk.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v5] bhyve: implement PCI address allocation

2014-05-17 Thread Roman Bogorodskiy
. Roman Bogorodskiy (1): bhyve: implement PCI address allocation po/POTFILES.in | 1 + src/Makefile.am| 4 + src/bhyve/bhyve_command.c | 112 +++-- src/bhyve/bhyve_device.c

[libvirt] [PATCH v5] bhyve: implement PCI address allocation

2014-05-17 Thread Roman Bogorodskiy
mode 100644 index 000..fa266de --- /dev/null +++ b/src/bhyve/bhyve_device.c @@ -0,0 +1,174 @@ +/* + * bhyve_device.c: bhyve device management + * + * Copyright (C) 2014 Roman Bogorodskiy + * + * This library is free software; you can redistribute it and/or + * modify it under the terms

Re: [libvirt] [PATCH v4 3/3] bhyve: implement PCI address allocation

2014-05-17 Thread Roman Bogorodskiy
controllers are: pci-root, pcie-root, pci-bridge and dmi-to-pci-bridge. Bhyve only supports pci-root that doesn't need an address. So appears this block of code should be dropped? Roman Bogorodskiy pgpXx9UkHeyCq.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https

[libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-17 Thread Roman Bogorodskiy
In a number of places in the bhyve driver, virObjectUnlock() is called with an arg without check if the arg is non-NULL, which could result in passing NULL value and a warning like: virObjectUnlock:340 : Object 0x0 ((unknown)) is not a virObjectLockable instance * src/bhyve/bhyve_driver.c

Re: [libvirt] [PATCH v4 1/3] qemu: extract PCI handling structs

2014-05-13 Thread Roman Bogorodskiy
Eric Blake wrote: On 05/13/2014 03:21 AM, Ján Tomko wrote: On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: Introduce new files (domain_addr.[ch]) to provide an API for domain device handling that could be shared across the drivers. + * Author: Daniel P. Berrange berra

Re: [libvirt] [PATCH v4 3/3] bhyve: implement PCI address allocation

2014-05-13 Thread Roman Bogorodskiy
Ján Tomko wrote: On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: Automatically allocate PCI addresses for devices instead of hardcoding them in the driver code. The current allocation schema is to dedicate an entire slot for each devices. Also, allow having arbitrary number

Re: [libvirt] [PATCH v4 2/3] qemu: extract common PCI handling functions

2014-05-13 Thread Roman Bogorodskiy
Ján Tomko wrote: On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: Move sharable PCI handling functions to domain_addr.[ch], and change theirs prefix from 'qemu' to 'vir': - virDomainPCIAddressAsString; - virDomainPCIAddressBusSetModel; - virDomainPCIAddressEnsureAddr

Re: [libvirt] [PATCH] bhyve: implement connectGetSysinfo

2014-05-12 Thread Roman Bogorodskiy
Ján Tomko wrote: On 04/23/2014 11:35 AM, Roman Bogorodskiy wrote: --- src/bhyve/bhyve_driver.c | 31 +++ src/bhyve/bhyve_utils.h | 1 + 2 files changed, 32 insertions(+) ACK @@ -1173,6 +1203,7 @@ static virDriver bhyveDriver

[libvirt] [PATCH v4 0/3] bhyve: implement PCI address allocation

2014-05-11 Thread Roman Bogorodskiy
bridge, used by console device - Respect addresses provided by user in domain xml file - Fix tests so 'make check' passes Roman Bogorodskiy (3): qemu: extract PCI handling structs qemu: extract common PCI handling functions bhyve: implement PCI address allocation po/POTFILES.in

[libvirt] [PATCH v4 1/3] qemu: extract PCI handling structs

2014-05-11 Thread Roman Bogorodskiy
Introduce new files (domain_addr.[ch]) to provide an API for domain device handling that could be shared across the drivers. A list of data types were extracted and moved there: qemuDomainPCIAddressBus - virDomainPCIAddressBus qemuDomainPCIAddressBusPtr - virDomainPCIAddressBusPtr

[libvirt] [PATCH v4 3/3] bhyve: implement PCI address allocation

2014-05-11 Thread Roman Bogorodskiy
/src/bhyve/bhyve_device.c @@ -0,0 +1,174 @@ +/* + * bhyve_device.c: bhyve device management + * + * Copyright (C) 2014 Roman Bogorodskiy + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published

[libvirt] [PATCH] docs: bhyve driver documentation improvements

2014-05-11 Thread Roman Bogorodskiy
- Document 'domxml-to-native' command - Mention that the nmdm console support needs an appropriate kernel module loaded --- docs/drvbhyve.html.in | 21 + 1 file changed, 21 insertions(+) diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in index 603be80..ecd7c0c

[libvirt] [PATCH v2] maint: use $(SED) instead of sed for syntax-check

2014-05-11 Thread Roman Bogorodskiy
seem to cause any regressions. Roman Bogorodskiy (1): maint: use $(SED) instead of sed for syntax-check cfg.mk | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) -- 1.9.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2] maint: use $(SED) instead of sed for syntax-check

2014-05-11 Thread Roman Bogorodskiy
Some syntax-check rules use GNU sed specific regexps, so make sure we're using $(SED) instead of sed, which might not be a GNU sed. --- cfg.mk | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cfg.mk b/cfg.mk index 3f4bba0..5ff2721 100644 --- a/cfg.mk +++ b/cfg.mk

Re: [libvirt] [PATCH] bhyve: implement connectGetSysinfo

2014-05-09 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: --- src/bhyve/bhyve_driver.c | 31 +++ src/bhyve/bhyve_utils.h | 1 + 2 files changed, 32 insertions(+) ping? Roman Bogorodskiy pgp7sIY06DTih.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https

Re: [libvirt] [PATCH] bhyve: domain events support

2014-05-09 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Tested with a sequance of virsh commands like that: - Redefine already defined domain (bhyve) using 'define' command - 'undefine bhyve' - 'define /path/to/bhyve.xml' - 'start bhyve' - 'destroy bhyve' - 'start --file /path/to/bhyve.xml' - 'destroy bhyve

Re: [libvirt] [PATCH] bhyve: report cpuTime in bhyveDomainGetInfo

2014-05-05 Thread Roman Bogorodskiy
Ján Tomko wrote: On 05/04/2014 03:45 PM, Roman Bogorodskiy wrote: Ján Tomko wrote: On 05/01/2014 02:11 PM, Roman Bogorodskiy wrote: Add a helper function virBhyveGetDomainTotalCpuStats() to obtain process CPU time using kvm (kernel memory interface) and use it to set cpuTime

Re: [libvirt] [PATCH] bhyve: report cpuTime in bhyveDomainGetInfo

2014-05-04 Thread Roman Bogorodskiy
Ján Tomko wrote: On 05/01/2014 02:11 PM, Roman Bogorodskiy wrote: Add a helper function virBhyveGetDomainTotalCpuStats() to obtain process CPU time using kvm (kernel memory interface) and use it to set cpuTime field of the virDomainInfo struct in bhyveDomainGetInfo

<    2   3   4   5   6   7   8   9   10   >