Re: [libvirt] [PATCH v5 0/7] Console corruption patchset

2012-02-27 Thread Peter Krempa
On 02/25/2012 01:27 AM, Eric Blake wrote: On 02/23/2012 07:03 AM, Peter Krempa wrote: Yet another spin of the console corruption patches. ACK series if you make some changes to 6/7. At this point, I don't know if we're going to get a timely review from Dan, so I'm comfortable pushing

[libvirt] [PATCH 2/4] libvirt-guests: Don't try to do a managed-save of transient guests

2012-02-28 Thread Peter Krempa
The libvirt-guests script tried to do a managed save of transient guest that failed. This patch notifies which guests are transient (and not being saved) and saves only the persistent ones. --- tools/libvirt-guests.init.sh | 37 +++-- 1 files changed, 35

[libvirt] [PATCH 3/4] libvirt-guests: Check if URI is reachable before launching commands

2012-02-28 Thread Peter Krempa
This patch adds a check to the libvirt-guests script to check for the URI to be alive before attempting any calls. This avoids nasty error messages and allows us to fail gracefuly and continue on other URIs configured in the script. --- tools/libvirt-guests.init.sh | 24 +++-

[libvirt] [PATCH 1/4] libvirt-guests: Add documentation and clean up to use virsh's improved list

2012-02-28 Thread Peter Krempa
This patch adds documentation to functions defined in the libvirt-guests init script and changes use of virsh's new commands to make the script easier. --- tools/libvirt-guests.init.sh | 60 -- 1 files changed, 40 insertions(+), 20 deletions(-) diff

[libvirt] [PATCH 0/4] libvirt-guests: improve behavior of the guests script

2012-02-28 Thread Peter Krempa
This patchset tweaks the libvirt guest script to enable parallel shutdown of guests and fix some bugs that appeared through time. Peter Krempa (4): libvirt-guests: Add documentation and clean up to use virsh's improved list libvirt-guests: Don't try to do a managed-save of transient

[libvirt] [PATCH 4/4] libvirt-guests: Add parallel startup and shutdown of guests

2012-02-28 Thread Peter Krempa
With this patch, it's possible to shut down guests in parallel. Parallel startup was possible before, but this functionality was not documented properly. To enable parallel startup set the START_DELAY to 0. Parallel shutdown has a configurable parameter PARALLEL_SHUTDOWN that defines the number

Re: [libvirt] [PATCH] storage: fix a typo

2012-02-29 Thread Peter Krempa
Dňa 29.2.2012 7:21, Alex Jia wrote / napísal(a): * src/storage/storage_driver.c (storageVolumeWipeInternal): s/shneier/schneier. http://code.google.com/p/diskscrub/ Signed-off-by: Alex Jiaa...@redhat.com --- src/storage/storage_driver.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [libvirt] [PATCH 3/4] libvirt-guests: Check if URI is reachable before launching commands

2012-02-29 Thread Peter Krempa
On 02/29/2012 04:02 AM, Eric Blake wrote: On 02/28/2012 11:00 AM, Peter Krempa wrote: This patch adds a check to the libvirt-guests script to check for the URI to be alive before attempting any calls. This avoids nasty error messages and allows us to fail gracefuly and continue on other URIs

[libvirt] [PATCH] cpu: Add new flag supported by qemu to the cpu definition

2012-02-29 Thread Peter Krempa
Some new cpu features were added to qemu. This patch adds some of them to our CPU map. --- to ease review, here's an excerpt from qemu.git/target-i386/cpuid.c to ease the review: static const char *ext3_feature_name[] = { lahf_lm /* AMD LahfSahf */, cmp_legacy, svm, extapic /* AMD

[libvirt] [PATCH v2] libvirt-guests: Add parallel startup and shutdown of guests

2012-03-01 Thread Peter Krempa
With this patch, it's possible to shut down guests in parallel. Parallel startup was possible before, but this functionality was not documented properly. To enable parallel startup set the START_DELAY to 0. Parallel shutdown has a configurable parameter PARALLEL_SHUTDOWN that defines the number

Re: [libvirt] [PATCH 1/2] build: use correct type for pid and similar types

2012-03-02 Thread Peter Krempa
On 02/11/2012 12:55 AM, Eric Blake wrote: No thanks to 64-bit windows, with 64-bit pid_t, we have to avoid constructs like 'int pid'. Our API in libvirt-qemu cannot be changed without breaking ABI; but then again, libvirt-qemu can only be used on systems that support UNIX sockets, which rules

Re: [libvirt] [PATCH 2/2] build: fix output of pid values

2012-03-02 Thread Peter Krempa
On 02/11/2012 12:55 AM, Eric Blake wrote: Nuke the last vestiges of printing pid_t values with the wrong types, at least in code compiled on mingw64. There may be other places, but for now they are only compiled on systems where the existing %d doesn't trigger gcc warnings. *

[libvirt] [PATCH] daemon: Remove deprecated HAL from init script dependencies

2012-03-02 Thread Peter Krempa
The init script for the daemon requests to start HAL although it has been deprecated long time ago. This patch removes the dependency. --- daemon/libvirtd.init.in |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in index

Re: [libvirt] [PATCH] daemon: Remove deprecated HAL from init script dependencies

2012-03-02 Thread Peter Krempa
On 03/02/2012 04:38 PM, Eric Blake wrote: On 03/02/2012 08:33 AM, Peter Krempa wrote: The init script for the daemon requests to start HAL although it has been deprecated long time ago. This patch removes the dependency. --- daemon/libvirtd.init.in |1 - 1 files changed, 0 insertions

Re: [libvirt] [PATCH] cpu: Add new flag supported by qemu to the cpu definition

2012-03-05 Thread Peter Krempa
On 03/03/2012 03:06 AM, Eric Blake wrote: On 02/29/2012 07:53 AM, Peter Krempa wrote: Some new cpu features were added to qemu. This patch adds some of them to our CPU map. --- Thanks; that helped review. ACK. Pushed; Thanks Peter -- libvir-list mailing list libvir-list@redhat.com https

Re: [libvirt] [PATCH v2] libvirt-guests: Add parallel startup and shutdown of guests

2012-03-05 Thread Peter Krempa
On 03/03/2012 03:03 AM, Eric Blake wrote: On 03/01/2012 07:23 AM, Peter Krempa wrote: With this patch, it's possible to shut down guests in parallel. Parallel startup was possible before, but this functionality was not documented properly. To enable parallel startup set the START_DELAY to 0

Re: [libvirt] [PATCHv2 01/15] docs: use correct terminology for 1024 bytes

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Yes, I like kilobytes better than kibibytes (when I say kilobytes, I generally mean 1024). But since the term is ambiguous, it can't hurt to say what we mean, by using both the correct name and calling out the numeric equivalent. * src/libvirt.c

Re: [libvirt] [PATCHv2 02/15] api: add overflow error

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Overflow can be user-induced, so it deserves more than being called an internal error. Note that in general, 32-bit platforms have Definitely. Internal error is always somewhat scary to users. far more places to trigger this error (anywhere the

Re: [libvirt] [PATCHv2 03/15] util: new function for scaling numbers

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Scaling an integer based on a suffix is something we plan on reusing in several contexts: XML parsing, virsh CLI parsing, and possibly elsewhere. Make it easy to reuse, as well as adding in support for powers of 1000. * src/util/util.h

Re: [libvirt] [PATCHv2 04/15] xml: share 'unit' in RNG

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: The code supported unit='E' for exabyte, but the RNG did not; conversely, the RNG supported z and y but the code did not (I'm jealous if you have that much storage, particularly since it won't fit in 64-bit off_t). Also, the code supported allocation

[libvirt] [PATCH] xml: Clean up schemas to use shared data types instead of local

2012-03-06 Thread Peter Krempa
The schema files contained duplicate data types that can be shared from the basictypes.rng file. --- docs/schemas/capability.rng | 43 + docs/schemas/interface.rng | 16 docs/schemas/nodedev.rng| 54 +++---

Re: [libvirt] [PATCHv2 01/15] docs: use correct terminology for 1024 bytes

2012-03-06 Thread Peter Krempa
On 03/06/2012 03:34 PM, Christophe Fergeau wrote: On Mon, Mar 05, 2012 at 05:34:16PM -0700, Eric Blake wrote: @@ -3619,7 +3619,7 @@ error: /** * virDomainSetMaxMemory: * @domain: a domain object or NULL - * @memory: the memory size in kilobytes + * @memory: the memory size in kibibytes

Re: [libvirt] [PATCHv2 05/15] xml: output memory unit for clarity

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Make it obvious to 'dumpxml' readers what unit we are using, since our default of KiB for memory (1024) differs from qemu's default of MiB; while we use bytes for storage. Tests were updated via: $ find tests/*data tests/*out -name '*.xml' | \ xargs

Re: [libvirt] [PATCHv2 06/15] storage: support more scaling suffixes

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Disk manufacturers are fond of quoting sizes in powers of 10, rather than powers of 2 (after all, 2.1 GB sounds larger than 2.0 GiB, even though the exact opposite is true). So, we might as well follow coreutils lead in supporting three types of suffix:

Re: [libvirt] [PATCHv2 07/15] xml: drop unenforced minimum memory limit from RNG

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: The test domain allowsmemory0/memory, but the RNG was stating that memory had to be at least 4096000 bytes. Hypervisors should enforce their own limits, rather than complicating the RNG. Meanwhile, some copy and paste had introduced some fishy

Re: [libvirt] [PATCHv2 08/15] xml: use long long internally, to centralize overflow checks

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: On 64-bit platforms, unsigned long and unsigned long long are identical, so we don't have to worry about overflow checks. On 32-bit platforms, anywhere we narrow unsigned long long back to unsigned long, we have to worry about overflow; it's easier to do

Re: [libvirt] [PATCHv2 09/15] xml: use better types for memory values

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Using 'unsigned long' for memory values is risky on 32-bit platforms, as a PAE guest can have more than 4GiB memory. Our API is (unfortunately) locked at 'unsigned long' and a scale of 1024, but the rest of our system should consistently use 64-bit

Re: [libvirt] [PATCHv2 10/15] xml: allow scaled memory on input

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Output is still in kibibytes, but input can now be in different scales for ease of typing. * src/conf/domain_conf.c (virDomainParseMemory): New helper. (virDomainDefParseXML): Use it when parsing. * docs/schemas/domaincommon.rng: Expand XML; rename

Re: [libvirt] [PATCHv2 05/15] xml: output memory unit for clarity

2012-03-06 Thread Peter Krempa
On 03/06/2012 04:14 PM, Peter Krempa wrote: On 03/06/2012 01:34 AM, Eric Blake wrote: Make it obvious to 'dumpxml' readers what unit we are using, since our default of KiB for memory (1024) differs from qemu's default of MiB; while we use bytes for storage. Tests were updated via: $ find

Re: [libvirt] [PATCHv2 11/15] virsh: add option aliases

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: In the past, we have created some virsh options with less-than-stellar names. For back-compat reasons, those names must continue to parse, but we don't want to document them in help output. This introduces a new option type, an alias, which points to a

Re: [libvirt] [PATCHv2 12/15] virsh: use option aliases

2012-03-06 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Command line interfaces should use dash, not underscore, as many keyboard layouts allow that to be typed with fewer shift key presses. Also, the US spelling of --tunneled gets more google hits than the UK spelling of --tunnelled. * tools/virsh.c

Re: [libvirt] [PATCHv2 13/15] virsh: add command aliases, and rename nodedev-detach

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Just because our public API has a typo doesn't mean that virsh has to keep the typo. * tools/virsh.c (VSH_CMD_FLAG_ALIAS): New flag. (nodedevCmds): Use it. (cmdHelp): Omit alias commands. (cmdNodeDeviceDettach): Rename... (cmdNodeDeviceDetach): ...to

Re: [libvirt] [PATCHv2 14/15] virsh: improve storage unit parsing

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Now can now do: virsh vol-resize $vol 10M virsh blockresize $dom $vol 10M to get both interfaces to resize to 10MiB. The remaining wart is that vol-resize defaults to bytes, but blockresize defaults to KiB, but we can't break existing scripts; oh

Re: [libvirt] [PATCHv2 15/15] virsh: improve memory unit parsing

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: The last vestige of the inaccurate 'kilobytes' when we meant 1024 is now gone. And virsh is now useful for setting memory in units other than KiB. * tools/virsh.c (cmdSetmem, cmdSetmaxmem): Use new helper routine, allow passing bogus arguments on to

Re: [libvirt] [PATCHv2 11/15] virsh: add option aliases

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: In the past, we have created some virsh options with less-than-stellar names. For back-compat reasons, those names must continue to parse, but we don't want to document them in help output. This introduces a new option type, an alias, which points to a

[libvirt] [PATCH] cpu: Add cpu definition for Intel Sandy Bridge cpu type

2012-03-07 Thread Peter Krempa
This patch adds support for the new tsc-deadline feature flag and a new model to the supported model list describing the Intel Sandy Bridge platform. --- Patches adding the SandyBridge cpu type in qemu are on review and not upstream yet. Please don't prioritize this patch. I sent it for review as

[libvirt] [PATCH] sanlock: Use STREQ_NULLABLE instead of STREQ on strings that may be null

2012-03-07 Thread Peter Krempa
The function sanlock_inquire can return NULL in the state string if the message consists only of a header. The return value is arbitrary and sent by the server. We should proceed carefully while touching such pointers. --- src/locking/lock_driver_sanlock.c |4 ++-- 1 files changed, 2

[libvirt] [PATCH] sanlock: Fix condition left crippled while debugging

2012-03-07 Thread Peter Krempa
--- Extra context for review. src/locking/lock_driver_sanlock.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index f2623a0..d344d6a 100644 --- a/src/locking/lock_driver_sanlock.c +++

Re: [libvirt] [PATCH] sanlock: Fix condition left crippled while debugging

2012-03-08 Thread Peter Krempa
On 03/07/2012 05:05 PM, Eric Blake wrote: On 03/07/2012 07:36 AM, Peter Krempa wrote: --- src/locking/lock_driver_sanlock.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ACK. Pushed; Thanks Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com

Re: [libvirt] [PATCH] sanlock: Use STREQ_NULLABLE instead of STREQ on strings that may be null

2012-03-08 Thread Peter Krempa
On 03/07/2012 05:04 PM, Eric Blake wrote: On 03/07/2012 07:30 AM, Peter Krempa wrote: The function sanlock_inquire can return NULL in the state string if the message consists only of a header. The return value is arbitrary and sent by the server. We should proceed carefully while touching

Re: [libvirt] [PATCH] xml: Clean up schemas to use shared data types instead of local

2012-03-08 Thread Peter Krempa
On 03/06/2012 04:11 PM, Eric Blake wrote: On 03/06/2012 08:00 AM, Osier Yang wrote: On 2012年03月06日 22:15, Peter Krempa wrote: The schema files contained duplicate data types that can be shared from the basictypes.rng file. --- IIRC, unsignedLong allows the the + sign, and leading spaces

Re: [libvirt] [PATCH] cpu: Add cpu definition for Intel Sandy Bridge cpu type

2012-03-13 Thread Peter Krempa
On 03/07/2012 02:30 PM, Peter Krempa wrote: This patch adds support for the new tsc-deadline feature flag and a new model to the supported model list describing the Intel Sandy Bridge platform. --- The Sandy Bridge processor model along with the tsc-deadline feature were just commited to qemu

Re: [libvirt] [PATCH] Added support for AMD Bulldozer CPU

2012-03-13 Thread Peter Krempa
On 03/13/2012 12:35 PM, Martin Kletzander wrote: AMD Bulldozer (or Opteron_G4 as called in QEMU) was added to the list of cpu models, flags were taken from upstream qemu cpu specifications and should be sorted by bit values (or first occurence in the feature specification part of cpu_map.xml).

Re: [libvirt] [PATCH] cpu: Add cpu definition for Intel Sandy Bridge cpu type

2012-03-14 Thread Peter Krempa
On 03/13/2012 08:01 PM, Eric Blake wrote: On 03/07/2012 06:30 AM, Peter Krempa wrote: This patch adds support for the new tsc-deadline feature flag and a new model to the supported model list describing the Intel Sandy Bridge platform. --- ACK. That promised followup patch that sorts things

Re: [libvirt] [PATCH] qemuDomainDetachPciDiskDevice: Free allocated cgroup

2012-03-15 Thread Peter Krempa
On 03/15/2012 11:49 AM, Michal Privoznik wrote: This function potentially allocates new virCgroup but never frees it. --- ACK. Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] lib: Don't access configuration if none is present

2012-03-15 Thread Peter Krempa
Commit e457d5ef2015e6106094b85f8bbd1582002edc4d adds ability to pass the default URI using the client configuration file. If the file is not present, it still accesses the NULL config object causing a segfault. Caught running make check. --- src/libvirt.c |3 ++- 1 files changed, 2

[libvirt] [PATCH] sanlock: Enhance error message to point to possible problem with selinux

2012-03-15 Thread Peter Krempa
If the connection to the sanlock daemon is forbidden by selinux the error message was not clear enough. This patch adds a check if proper configuration for selinux is used while trying to connect to sanlock. *src/locking/lock_driver_sanlock.c: - add macro virLockSystemError that checks

Re: [libvirt] [PATCH] lib: Don't access configuration if none is present

2012-03-15 Thread Peter Krempa
On 03/15/2012 05:37 PM, Daniel P. Berrange wrote: On Thu, Mar 15, 2012 at 05:22:28PM +0100, Peter Krempa wrote: Commit e457d5ef2015e6106094b85f8bbd1582002edc4d adds ability to pass the default URI using the client configuration file. If the file is not present, it still accesses the NULL config

Re: [libvirt] [PATCH v2] Fixed NULL pointer check

2012-03-19 Thread Peter Krempa
On 03/19/2012 10:38 AM, Michal Privoznik wrote: On 19.03.2012 08:55, Martin Kletzander wrote: This patch fixes a NULL pointer check that was causing SegFault on some specific configurations. --- src/util/conf.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH 1/3] snapshot: add qemu capability for 'transaction' command

2012-03-19 Thread Peter Krempa
On 03/16/2012 11:05 PM, Eric Blake wrote: We need a capability bit to gracefully error out if some of the additions in future patches can't be implemented by the running qemu. * src/qemu/qemu_capabilities.h (QEMU_CAPS_TRANSACTION): New cap. * src/qemu/qemu_capabilities.c (qemuCaps): Name it. *

Re: [libvirt] [PATCH 2/3] snapshot: add atomic create flag

2012-03-19 Thread Peter Krempa
On 03/16/2012 11:05 PM, Eric Blake wrote: Right now, it is appallingly easy to cause qemu disk snapshots to alter a domain then fail; for example, by requesting a two-disk snapshot where the second disk name resides on read-only storage. In this failure scenario, libvirt reports failure, but

Re: [libvirt] [PATCHv2 3/3] snapshot: rudimentary qemu support for atomic disk snapshot

2012-03-19 Thread Peter Krempa
On 03/17/2012 05:33 PM, Eric Blake wrote: Taking an external snapshot of just one disk is atomic, without having to pause and resume the VM. This also paves the way for later patches to interact with the new qemu 'transaction' monitor command. The various scenarios when requesting atomic are:

Re: [libvirt] [PATCHv2 4/3] snapshot: make offline qemu snapshots atomic

2012-03-19 Thread Peter Krempa
On 03/17/2012 05:33 PM, Eric Blake wrote: Offline internal snapshots can be rolled back with just a little bit of refactoring, meaning that we are now automatically atomic. * src/qemu/qemu_domain.c (qemuDomainSnapshotForEachQcow2): Move guts... (qemuDomainSnapshotForEachQcow2Raw): ...to new

[libvirt] [test-API PATCH 2/7] lib: fix streamAPI class

2012-03-21 Thread Peter Krempa
The streamAPI class that encapsulates work with libvirt's streams was fundamentaly broken: - each call to one of the methods created a new stream and performed the call - some methods called virStream methods with different numbers of arguments - there was no way to extract the actual

[libvirt] [test-API PATCH 0/7] Multiple fixes and improvements series

2012-03-21 Thread Peter Krempa
This is a set of more or less independent fixes and improvements to the test API. I ran across these while trying to write a basic test case as a Hello world! to the test-API. Improvements are in fields of cross-distro compatibility, broken API's and typos and usability. Peter Krempa (7

[libvirt] [test-API PATCH 5/7] utils: Allow suffixes in path to the main checkout folder

2012-03-21 Thread Peter Krempa
This patch enables the util scripts to be found in correct path when using a not-so-standard checkout path. (.../libvirt-test-API.git/...). --- utils/Python/utils.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/utils/Python/utils.py b/utils/Python/utils.py index

[libvirt] [test-API PATCH 7/7] domain/[start|destroy]: Add a optional noping flag to skip the ping test

2012-03-21 Thread Peter Krempa
For some tests it's not needed to ping the guest in the startup process. This patch adds a flag to the start and destroy test to skip such attempts (that consume a lot of time) --- repos/domain/destroy.py | 54 ++ repos/domain/start.py | 50

[libvirt] [test-API PATCH 3/7] domainAPI: Add wrapper method to work with domain's console connections

2012-03-21 Thread Peter Krempa
This patch adds a wrapper that enables work with consoles in the test-API. --- lib/domainAPI.py |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/lib/domainAPI.py b/lib/domainAPI.py index 91f2ba3..bc0069b 100644 --- a/lib/domainAPI.py +++ b/lib/domainAPI.py @@

[libvirt] [test-API PATCH 6/7] parser: Be more specific on mistakes in case files

2012-03-21 Thread Peter Krempa
This patch adds an error exception if the specification of the test module from repos/ ends with a colon (does not specify the module name) instead of a meaningless backtrace. --- exception.py | 10 ++ proxy.py |4 2 files changed, 14 insertions(+), 0 deletions(-) diff

[libvirt] [test-API PATCH 4/7] repos/domain/create.py: Fix typo in path to python executable

2012-03-21 Thread Peter Krempa
--- repos/domain/create.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/repos/domain/create.py b/repos/domain/create.py index b6e1e66..4e3e1c4 100644 --- a/repos/domain/create.py +++ b/repos/domain/create.py @@ -1,4 +1,4 @@ -#!/usr/bin/evn python +#!/usr/bin/env

Re: [libvirt] [test-API PATCH] utils: Make ipget.sh more portable

2012-03-21 Thread Peter Krempa
On 03/21/2012 03:53 PM, Peter Krempa wrote: Change the test for existence of nmap to be a little more cross-distro portable. --- Dang! I forgot to add that it's a v2. Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [test-API PATCH] utils: Make ipget.sh more portable

2012-03-21 Thread Peter Krempa
Change the test for existence of nmap to be a little more cross-distro portable. --- utils/ipget.sh |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/ipget.sh b/utils/ipget.sh index cc1949b..8d44b14 100755 --- a/utils/ipget.sh +++ b/utils/ipget.sh @@ -6,8 +6,8 @@

Re: [libvirt] [test-API PATCH 2/7] lib: fix streamAPI class

2012-03-22 Thread Peter Krempa
On 03/21/2012 04:45 PM, Guannan Ren wrote: On 03/21/2012 08:46 PM, Peter Krempa wrote: The streamAPI class that encapsulates work with libvirt's streams was fundamentaly broken: - each call to one of the methods created a new stream and performed the call - some methods called virStream methods

Re: [libvirt] [test-API PATCH 3/7] domainAPI: Add wrapper method to work with domain's console connections

2012-03-22 Thread Peter Krempa
On 03/21/2012 05:02 PM, Guannan Ren wrote: On 03/21/2012 08:46 PM, Peter Krempa wrote: This patch adds a wrapper that enables work with consoles in the test-API. --- lib/domainAPI.py | 9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/lib/domainAPI.py b/lib/domainAPI.py

Re: [libvirt] [test-API PATCH 0/7] Multiple fixes and improvements series

2012-03-22 Thread Peter Krempa
On 03/22/2012 08:54 AM, Guannan Ren wrote: On 03/21/2012 08:46 PM, Peter Krempa wrote: This is a set of more or less independent fixes and improvements to the test API. I ran across these while trying to write a basic test case as a Hello world! to the test-API. Improvements are in fields

[libvirt] [test-API PATCH] streamAPI: Create stream objects that are already encapsulated

2012-03-22 Thread Peter Krempa
With this patch, the newStream() method of the ConnectAPI class returns an already encapsulated StreamAPI object . *lib/connectAPI.py: - modify newStream method to return StreamAPI object *lib/streamAPI.py: - modify constructor to take virStream objects ---

[libvirt] [test-API PATCH] libs: Add flags for streams and the console

2012-03-22 Thread Peter Krempa
Add the local copy of the flags. --- lib/connectAPI.py |2 ++ lib/domainAPI.py |3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/connectAPI.py b/lib/connectAPI.py index dab5e7d..2723fc8 100644 --- a/lib/connectAPI.py +++ b/lib/connectAPI.py @@ -350,3 +350,5 @@

Re: [libvirt] [PATCH 1/2] snapshot: add support for qemu transaction command

2012-03-22 Thread Peter Krempa
On 03/17/2012 10:27 PM, Eric Blake wrote: QEmu 1.1 is adding a 'transaction' command to the JSON monitor. Each element of a transaction corresponds to a top-level command, with the additional guarantee that the transaction flushes all pending I/O, then guarantees that all actions will be

Re: [libvirt] [PATCH 2/2] snapshot: wire up qemu transaction command

2012-03-22 Thread Peter Krempa
On 03/17/2012 10:27 PM, Eric Blake wrote: The hardest part about adding transactions is not using the new monitor command, but undoing the partial changes we made prior to a failed transaction. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateDiskActive): Use transaction when available.

Re: [libvirt] [test-API PATCH] streamAPI: Create stream objects that are already encapsulated

2012-03-26 Thread Peter Krempa
On 03/22/2012 02:51 PM, Guannan Ren wrote: On 03/22/2012 08:54 PM, Peter Krempa wrote: With this patch, the newStream() method of the ConnectAPI class returns an already encapsulated StreamAPI object . *lib/connectAPI.py: - modify newStream method to return StreamAPI object *lib/streamAPI.py

[libvirt] [test-API PATCHv2] libs: Add flags for streams and the console

2012-03-26 Thread Peter Krempa
Add the local copy of the flags. --- lib/domainAPI.py |3 +++ lib/streamAPI.py |3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/domainAPI.py b/lib/domainAPI.py index bc0069b..43565c2 100644 --- a/lib/domainAPI.py +++ b/lib/domainAPI.py @@ -912,3 +912,6 @@

Re: [libvirt] [test-API PATCH 2/6] Added support for Gentoo

2012-03-26 Thread Peter Krempa
On 03/24/2012 06:42 PM, Martin Kletzander wrote: In order to support libvirt-test-API on more distributions, this commit adds support for Gentoo. The file is copy-paste from dist/redhat/env_update.py just modified to make the get_* functions work on Gentoo, some removed. Probably no one else

Re: [libvirt] [test-API PATCH 1/6] Slight cross-distribution support

2012-03-26 Thread Peter Krempa
On 03/24/2012 06:42 PM, Martin Kletzander wrote: There is no support for distributions without 'rpm' as a package manager. This patch modifies (at this time) the only distribution-specific import in order to ease the broadening of distribution list supported by libvirt-test-API. ---

Re: [libvirt] [PATCH] snapshot: improve qemu handling of reused snapshot targets

2012-03-27 Thread Peter Krempa
Dňa 20.3.2012 22:29, Eric Blake wrote / napísal(a): The oVirt developers have stated that the real reasons they want to have qemu reuse existing volumes when creating a snapshot are: 1. the management framework is set up so that creation has to be done from a central node for proper resource

[libvirt] [PATCH] qemu_monitor: Don't output snapshot format argument if type is NULL

2012-03-27 Thread Peter Krempa
If the snapshot format type string was NULL, the JSON framework created an invalid JSON string. --- The other option would be to fix qemuMonitorJSONMakeCommandRaw that string arguments with a NULL argument would suppress outputing the complete option, but I'm afraid of breaking something.

Re: [libvirt] [PATCH] snapshot: don't pass NULL to QMP command creation

2012-03-27 Thread Peter Krempa
Dňa 27.3.2012 16:37, Eric Blake wrote / napísal(a): Commit d42a2ff caused a regression in creating a disk-only snapshot of a qcow2 disk; by passing the wrong variable to the monitor call, libvirt ended up creating JSON that looked like format:null instead of the intended format:qcow2. To make

Re: [libvirt] [test-API] RFC: Stabilization of libvirt-test-API

2012-03-29 Thread Peter Krempa
On 03/29/2012 02:14 PM, Martin Kletzander wrote: Hi everyone, following our minutes, I'd like to start a discussion on what should be done with libvirt-test-API so we can say it's stable and usable. I would like to stress out that everything mentioned here is just an opinion and I don't mean

[libvirt] [test-API PATCH 1/3] utils: Add exception for general test errors

2012-04-03 Thread Peter Krempa
This helper exception helps with reporting test errors that don't produce a libvirt exception. Eg. comparison of returned and expected value fails although the api call succeeded. --- utils/Python/testError.py | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-)

[libvirt] [test-API PATCH 2/3] repo: Add test for mutualy exclusive console access

2012-04-03 Thread Peter Krempa
This test case checks if the console connection code works in a safe way that the connection don't get messed up. --- repos/domain/console_mutex.py | 89 + 1 files changed, 89 insertions(+), 0 deletions(-) create mode 100644 repos/domain/console_mutex.py

[libvirt] [test-API PATCH 3/3] repo: Add test for console input and output operations

2012-04-03 Thread Peter Krempa
This test checks if the console input and output work as desired. The test takes as an argument a string, that is sent to the console and another string that is expected to be read from the console. When those two compare successfuly the test succeeds. --- repos/domain/console_io.py | 76

[libvirt] [test-API PATCH 0/3] Console tests

2012-04-03 Thread Peter Krempa
correctly. Peter Krempa (3): utils: Add exception for general test errors repo: Add test for mutualy exclusive console access repo: Add test for console input and output operations repos/domain/console_io.py| 76 +++ repos/domain/console_mutex.py | 89

Re: [libvirt] [test-API PATCH] Added screenshot test

2012-04-03 Thread Peter Krempa
On 04/02/2012 08:18 PM, Martin Kletzander wrote: This patch adds a test that obtains a screenshot of a domain and saves it in a file. Maybe we shoud later on modify this or add another test to allow comparing the returned image file against a pre-defined pattern, so we could actualy check if

Re: [libvirt] [test-API PATCH 2/3] repo: Add test for mutualy exclusive console access

2012-04-04 Thread Peter Krempa
On 04/04/2012 08:32 AM, Guannan Ren wrote: On 04/03/2012 09:20 PM, Peter Krempa wrote: This test case checks if the console connection code works in a safe way that the connection don't get messed up. --- sure about the stream, if we need to call stream.abort() in finally to close the certain

[libvirt] [test-API PATCHv2 2/2] repo: Add test for mutualy exclusive console access

2012-04-05 Thread Peter Krempa
This test case checks if the console connection code works in a safe way that the connection don't get messed up. --- Diff to v1: -- removed semicolons at the end of statements (the C language left some habits :D) -- added call to usage function (I thought it's called automaticaly. With this

[libvirt] [test-API PATCHv2 1/2] utils: Add exception for general test errors

2012-04-05 Thread Peter Krempa
This helper exception helps with reporting test errors that don't produce a libvirt exception. Eg. comparison of returned and expected value fails although the api call succeeded. --- Diff to v1: -- moved the new exception to the exception module exception.py |4 1 files changed, 4

[libvirt] [PATCH] virsh: Clarify use of the --managed-save flag for the list command

2012-04-10 Thread Peter Krempa
The documentation for the flag doesn't clearly state that the flag only enhances the output and the user needs to specify other flags to list inactive domains, that are enhanced by this flag. --- tools/virsh.c |2 +- tools/virsh.pod |5 +++-- 2 files changed, 4 insertions(+), 3

[libvirt] [PATCH] virsh: Clean up usage of boolean flag variables

2012-04-10 Thread Peter Krempa
This patch cleans up variables used to store boolean command flags that are inquired by vshCommandOptBool to use the bool data type instead of an integer. Additionaly this patch cleans up flag variables that are inferred from existing flags. --- tools/virsh.c | 120

[libvirt] [PATCH] qemu: Fix deadlock when qemuDomainOpenConsole cleans up a connection

2012-04-10 Thread Peter Krempa
The new safe console handling introduced a possibility to deadlock the qemu driver when a new console connection forcibly disconnects a previous console stream that belongs to an already closed connection. The virStreamFree function calls subsequently a the virReleaseConnect function that tries

Re: [libvirt] [PATCH] virsh: Clarify use of the --managed-save flag for the list command

2012-04-10 Thread Peter Krempa
On 04/10/2012 02:43 PM, Eric Blake wrote: On 04/10/2012 04:35 AM, Peter Krempa wrote: The documentation for the flag doesn't clearly state that the flag only enhances the output and the user needs to specify other flags to list inactive domains, that are enhanced by this flag. --- tools

Re: [libvirt] [PATCH] virsh: Clean up usage of boolean flag variables

2012-04-10 Thread Peter Krempa
On 04/10/2012 02:55 PM, Eric Blake wrote: On 04/10/2012 06:44 AM, Peter Krempa wrote: This patch cleans up variables used to store boolean command flags that are inquired by vshCommandOptBool to use the bool data type instead of an integer. Additionaly this patch cleans up flag variables

Re: [libvirt] [PATCH] qemu: Fix deadlock when qemuDomainOpenConsole cleans up a connection

2012-04-11 Thread Peter Krempa
On 04/10/2012 05:43 PM, Eric Blake wrote: On 04/10/2012 07:29 AM, Peter Krempa wrote: The new safe console handling introduced a possibility to deadlock the qemu driver when a new console connection forcibly disconnects a previous console stream that belongs to an already closed connection

Re: [libvirt] [test-API PATCH 0/4]Add feature to check case file before running

2012-04-12 Thread Peter Krempa
I don't think pushing this series without a review was a good idea. You actualy broke all of the tests in the repos/ as you didn't do the modifications to the parameter checking algorithm in a way that didn't require modification of the tests, neither did you change the tests to cope with the

[libvirt] [test-API PATCH] repo: Add test for console input and output operations

2012-04-13 Thread Peter Krempa
This test checks if the console input and output work as desired. The test takes as an argument a filename, whose contents are sent to the console. The optional parameter 'expect' can be set to a filename that should contain expected output from the guest and is compared with the actual output.

[libvirt] [PATCH] cpu: Improve error reporting on incompatible CPUs

2012-04-18 Thread Peter Krempa
This patch modifies the CPU comparrison function to report the incompatibilities in more detail to ease identification of problems. * src/cpu/cpu.h: cpuGuestData(): Add argument to return detailed error message. * src/cpu/cpu.c: cpuGuestData(): Add passthrough for error argument. *

[libvirt] [PATCH] virsh: Fix and clarify the --title flag for the list command in man page

2012-04-19 Thread Peter Krempa
--- tools/virsh.pod |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 140d8e8..25751b6 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -398,13 +398,14 @@ may be combined. Default behavior is as though both were

Re: [libvirt] [PATCH] virsh: Fix and clarify the --title flag for the list command in man page

2012-04-19 Thread Peter Krempa
On 04/19/2012 11:03 AM, Peter Krempa wrote: --- tools/virsh.pod |9 + 1 files changed, 5 insertions(+), 4 deletions(-) Effect of this patch on the manpage: Before: If --title is specified, then the domain note is printed. The output then the output looks as follows

Re: [libvirt] [PATCH] virsh: Fix and clarify the --title flag for the list command in man page

2012-04-19 Thread Peter Krempa
On 04/19/2012 12:01 PM, Osier Yang wrote: On 2012年04月19日 17:03, Peter Krempa wrote: --- tools/virsh.pod | 9 + 1 files changed, 5 insertions(+), 4 deletions(-) ACK. But how about short domain description (title)? That looks better! I changed the hyphens to brackets, added

Re: [libvirt] [test-API 12/17] Substitute 'guest' with 'domain'

2012-04-23 Thread Peter Krempa
On 04/20/2012 08:46 AM, Osier Yang wrote: % for i in $(grep 'guest' * -r | awk -F':' '{print $1}'| uniq); do \ sed -i -e 's/guest/domain/g' $i; \ done This also affects the codes like: -url = global_parser.get_value(guest, gname + src) -dict['kickstart'] =

Re: [libvirt] [PATCH] cpu: Improve error reporting on incompatible CPUs

2012-04-23 Thread Peter Krempa
On 04/19/2012 03:45 PM, Jiri Denemark wrote: On Wed, Apr 18, 2012 at 15:19:53 +0200, Peter Krempa wrote: This patch modifies the CPU comparrison function to report the incompatibilities in more detail to ease identification of problems. * src/cpu/cpu.h: cpuGuestData(): Add argument

[libvirt] [PATCH] build: Fix version of gettext macros

2012-04-24 Thread Peter Krempa
Commit c9cd419caba9effa11ca53e8696e5f6a4b424d60 added copying of the makefile for translation files from gnulib. The makefile from gnulib is of version 0.18 but the build configuration cretes macros from version 0.17 which breaks the build with message: *** error: gettext infrastructure mismatch:

  1   2   3   4   5   6   7   8   9   10   >