Hi all:
The Host Administrator is capable of running any exec in guests via the
qemu-ga command "guest-exec", eg:
virsh qemu-agent-command test_guest '{"execute": "guest-exec",
"arguments": {"path": "ifconfig", "arg": [ "eth1", "192.168.0.99"
],"capture-output": true } }'
{"return"
On Thu, Aug 24, 2017 at 02:31:05PM +0300, Vasiliy Tolstov wrote:
Another lock with libvirt 3.5.0
root@cn12:~# gdb -batch -p $(pgrep libvirtd) -ex 't a a bt'
warning: Unable to find libthread_db matching inferior's thread
library, thread debugging will not be available.
0x7f95b5d4bd3d in int
On Wed, Aug 23, 2017 at 04:47:03PM -0400, John Ferlan wrote:
On 08/23/2017 07:47 AM, Martin Kletzander wrote:
We always truncated the name at 20 bytes instead of characters. In
case 20 bytes were in the middle of a multi-byte character, then the
string became invalid and various parts of the
On Wed, Aug 23, 2017 at 12:56:02PM -0400, John Ferlan wrote:
On 08/21/2017 03:47 AM, Martin Kletzander wrote:
There are many places in the code where virBufferCheckError() is used
and then, right after that, virBufferContentAndReset() is called. The
former has ATTRIBUTE_RETURN_CHECK, so every
On 08/24/2017 12:20 PM, Erik Skultety wrote:
> Revert @f8172388c which broke the build on Centos 6, because of old
> autoconf (< 2.63b) not properly quoting arguments for shell.
> ---
> So, the last working commit is cbc700208, but I didn't want to revert to that
> one directly, since I'd like to p
On 08/24/2017 02:52 AM, Nitesh Konkar wrote:
> Hello John,
>
> In case of PPC, IOMMU in the host kernel either has it or not compiled in.
> The /sys/kernel/iommu_groups check is good enough to verify if it was
> compiled with the kernel or not.
>
> If not, then we can have a ppc specific messa
On 22/08/2017 18:27, Paolo Bonzini wrote:
> Hi all,
>
> I am adding a new daemon to QEMU, that QEMU can connect to in order to
> issue persistent reservation commands.
>
> The daemon can only issue the commands on file descriptor that QEMU
> already has. In addition normal users shouldn't have a
https://bugzilla.redhat.com/show_bug.cgi?id=1437797
Rather than using refreshVol which essentially only updates the
allocation, capacity, and permissions for the volume, but not
the format which does get updated in a pool refresh - let's use
the same helper that pool refresh uses in order to updat
Create a separate function to handle the volume target update
via probe processing.
Signed-off-by: John Ferlan
---
src/storage/storage_util.c | 82 ++
src/storage/storage_util.h | 3 ++
2 files changed, 57 insertions(+), 28 deletions(-)
diff --git a/
Alter wipeVol to do same refresh operation as pool refresh would do.
John Ferlan (2):
storage: Introduce virStorageBackendRefreshVolTargetUpdate
storage: Use virStorageBackendRefreshVolTargetUpdate after wipeVol
src/storage/storage_driver.c | 7 ++--
src/storage/storage_util.c | 82 ++
3 out of 4 uses of gl_WARN_ADD() were incorrectly adding "" around
the argument, which in turn resulted in the argument being used
unquoted (configure had gl_positive=""-fstack-protector-all"",
rather than the intended gl_positive="-fstack-protector-all").
Signed-off-by: Eric Blake
---
m4/virt-c
[adding gnulib]
On 08/24/2017 12:20 PM, Erik Skultety wrote:
> Revert @f8172388c which broke the build on Centos 6, because of old
> autoconf (< 2.63b) not properly quoting arguments for shell.
> ---
> So, the last working commit is cbc700208, but I didn't want to revert to that
> one directly, si
Revert @f8172388c which broke the build on Centos 6, because of old
autoconf (< 2.63b) not properly quoting arguments for shell.
---
So, the last working commit is cbc700208, but I didn't want to revert to that
one directly, since I'd like to poke gnulib about the issue first and find a
proper solu
> On Aug 24, 2017, at 3:24 PM, Andrea Bolognani wrote:
>
> On Thu, 2017-08-24 at 12:34 +0100, George Dunlap wrote:
>> @@ -5401,12 +5401,12 @@ libxlDomainBlockStatsVBD(virDomainObjPtr vm,
>> # define LIBXL_SET_VBDSTAT(FIELD, VAR, MUL) \
>> if ((virAsprintf(&name, "%s/"FIELD, path) <
On Thu, Aug 24, 2017 at 05:12:05PM +0200, Andrea Bolognani wrote:
> This is more user-friendly because the error will be
> displayed directly instead of being buried in the log.
>
> Signed-off-by: Andrea Bolognani
> ---
> src/qemu/qemu_domain_address.c | 17 ++---
> 1 file changed, 1
While formatting disk or chardev element they both uses
virDomainDiskSourceDefFormatSeclabel() function which also closes
the source element. This is not extendable.
Use the new virXMLFormatElement() to properly format the source
element with possible child elements.
As a side effect it fixes a
Signed-off-by: Pavel Hrdina
---
src/conf/capabilities.c | 3 +--
src/conf/cpu_conf.c | 3 +--
src/conf/domain_conf.c | 26 +++---
src/util/virbuffer.h| 9 +
4 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/src/conf/capabilities.c b/src/conf/
This helper allows you to better structurize the code if some element
may or may not contains attributes and/or child elements.
Signed-off-by: Pavel Hrdina
---
src/libvirt_private.syms | 1 +
src/util/virxml.c| 47 +++
src/util/virxml.h
Pavel Hrdina (3):
util: introduce virBufferSetChildIndent macro
util: introduce virXMLFormatElement helper
conf: don't close the source element inside different function
src/conf/capabilities.c| 3 +-
src/conf/cpu_conf.c| 3 +-
We can't retrieve the isolation group of a device that's
not present in the system. However, it's very common for
VFs to be created late in the boot, so they might not be
present yet when libvirtd starts, which would cause the
guests using them to disappear.
If a PCI address has already been set f
This is more user-friendly because the error will be
displayed directly instead of being buried in the log.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain_address.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_domain_address.c b/s
On Thu, Aug 24, 2017 at 16:29:37 +0800, Jay Zhou wrote:
> Hi all,
>
> "f16c", "rdrand" and "vme" are all standard features, the IvyBridge CPU model
> has these three features in the file of src/cpu/cpu_map.xml, but the higher
> model of Haswell-noTSX, Haswell, Broadwell-noTSX and Broadwell do not,
Hi all,
"f16c", "rdrand" and "vme" are all standard features, the IvyBridge CPU model
has these three features in the file of src/cpu/cpu_map.xml, but the higher
model of Haswell-noTSX, Haswell, Broadwell-noTSX and Broadwell do not, which
makes it incompatible.
BTW, I noticed that "f16c", "rdrand
On Thu, 2017-08-24 at 12:34 +0100, George Dunlap wrote:
> @@ -5401,12 +5401,12 @@ libxlDomainBlockStatsVBD(virDomainObjPtr vm,
> # define LIBXL_SET_VBDSTAT(FIELD, VAR, MUL) \
> if ((virAsprintf(&name, "%s/"FIELD, path) < 0) || \
> (virFileReadAll(name, 256, &val) < 0) ||
Use the new accessor APIs for storage_driver.
Signed-off-by: John Ferlan
---
src/storage/storage_driver.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 6fae6f4..83d9ce3 100644
--- a/src
Introduce virStoragePoolObjForEachVolume to scan each volume
calling the passed callback function until all volumes have been
processed in the storage pool volume list, unless the callback
function returns an error.
Introduce virStoragePoolObjSearchVolume to search each volume
calling the passed c
Use the new accessor APIs for storage_driver and test_driver.
Signed-off-by: John Ferlan
---
src/storage/storage_backend_scsi.c | 4 +++-
src/storage/storage_driver.c | 14 +++---
src/test/test_driver.c | 20
3 files changed, 22 insertions(+), 16 d
Use the new accessor APIs for storage_driver and test_driver.
Signed-off-by: John Ferlan
---
src/storage/storage_driver.c | 20 +---
src/test/test_driver.c | 4 ++--
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/storage/storage_driver.c b/src/storage
Use the new accessor APIs for storage_driver, test_driver, and
gluster backend.
Signed-off-by: John Ferlan
---
src/storage/storage_backend_gluster.c | 2 +-
src/storage/storage_driver.c | 16
src/test/test_driver.c| 10 +-
3 files changed, 14 in
In preparation for making a private object, create accessor API's for
consumer storage functions to use:
virStoragePoolObjGetDef
virStoragePoolObjSetDef
virStoragePoolObjGetNewDef
virStoragePoolObjDefUseNewDef
virStoragePoolObjGetConfigFile
virStoragePoolObjSetConfigFile
Create/use virStoragePoolObjAddVol in order to add volumes onto list.
Create/use virStoragePoolObjRemoveVol in order to remove volumes from list.
Create/use virStoragePoolObjGetVolumesCount to get count of volumes on list.
For the storage driver, the logic alters when the volumes.obj list grows
Since it's been used that way anyway, let's just convert it to a bool
and only make the external representation be an int.
Signed-off-by: John Ferlan
---
src/conf/virstorageobj.c | 4 ++--
src/conf/virstorageobj.h | 4 ++--
src/storage/storage_driver.c | 2 +-
src/test/test_driver.c
Use the new accessor API for storage_driver.
Signed-off-by: John Ferlan
---
src/storage/storage_driver.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 83d9ce3..90d4bf3 100644
--- a/src/storage/storage_d
Use the new accessor API for storage_driver.
Signed-off-by: John Ferlan
---
src/storage/storage_driver.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 7b1396f..a7a77ba 100644
--- a/src/
Consider this round 1 of 2 The next series will be 18 patches,
but the majority of those deal with change every {pool|obj}->def->X
to use the accessor virStoragePoolObjGetDef.
v1: https://www.redhat.com/archives/libvir-list/2017-May/msg00218.html
Probably not even worth looking at the v1, but
Create/use a helper to perform object allocation.
Adjust storagevolxml2argvtest.c in order to use the allocator and
setting of the obj->def.
Signed-off-by: John Ferlan
---
src/conf/virstorageobj.c | 31 +--
src/conf/virstorageobj.h | 3 +++
src/libvirt_p
It's a bool not an int, so use true/false and not 1/0
Signed-off-by: John Ferlan
---
src/conf/virstorageobj.c | 4 ++--
src/test/test_driver.c | 8
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index eb7664c..a9fa190
Using a variable named 'stat' clashes with the system function
'stat()' causing compiler warnings on some platforms:
libxl/libxl_driver.c: In function 'libxlDomainBlockStatsVBD':
libxl/libxl_driver.c:5387: error: declaration of 'stat' shadows a global
declaration [-Wshadow]
/usr/include/sys/stat.
Another lock with libvirt 3.5.0
root@cn12:~# gdb -batch -p $(pgrep libvirtd) -ex 't a a bt'
warning: Unable to find libthread_db matching inferior's thread
library, thread debugging will not be available.
0x7f95b5d4bd3d in internal_fallocate (fd=-1177453080,
offset=4294967295, len=121) at ../
This patch splits udevEventHandleCallback in two (introduces
udevEventHandleThread) in order to be later able to refactor the latter
to actually become a detached thread which will wait some time for the
kernel to create the whole sysfs tree for a device as we cannot do that
in the event loop direc
We need to perform some sanity checks on the udev monitor before every
use so that we know nothing changed in the meantime. The reason for
moving the code to a separate function is to be able to perform the same
check from a worker thread that will replace the udevEventHandleCallback
in terms of po
The event loop may get scheduled earlier than the udev event handler
thread which means that it would keep invoking the handler callback with
"new" events, while in fact it's most likely still the same event which
the handler thread hasn't managed to remove from the socket queue yet.
This is due to
v2 here: https://www.redhat.com/archives/libvir-list/2017-July/msg01268.html
Since v2:
- added patch 4/6 that fixes the issue with the handler thread spamming logs
with "udev_monitor_receive_device returned NULL"
-> the event loop callback now disables polling on the udev monitor's fd
every
Adjust udevEventHandleThread to be a proper thread routine running in an
infinite loop handling devices. Also introduce udevEventThreadData
private structure.
Every time there's and incoming event from udev, udevEventHandleCallback
only increments the number of events queuing on the monitor and sig
Since we have a number of places where we workaround timing issues with
devices, attributes (files in general) not being available at the time
of processing them by calling usleep in a loop for a fixed number of
tries, we could as well have a utility function that would do that.
Therefore we won't
If we find ourselves in the situation that the 'add' uevent has been
fired earlier than the sysfs tree for a device was created, we should
use the best-effort approach and give kernel some predetermined amount
of time, thus waiting for the attributes to be ready rather than
discarding the device fr
On Thu, Aug 24, 2017 at 11:14:57AM +0200, Peter Krempa wrote:
> On Thu, Aug 24, 2017 at 10:50:29 +0200, Erik Skultety wrote:
> > This pulls in, among other new things, vc-list-files fix to make
> > syntax-check work with git worktrees.
> >
> > Signed-off-by: Erik Skultety
> > ---
> > .gnulib | 2
On Thu, Aug 24, 2017 at 10:50:29 +0200, Erik Skultety wrote:
> This pulls in, among other new things, vc-list-files fix to make
> syntax-check work with git worktrees.
>
> Signed-off-by: Erik Skultety
> ---
> .gnulib | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Did you push this unde
This pulls in, among other new things, vc-list-files fix to make
syntax-check work with git worktrees.
Signed-off-by: Erik Skultety
---
.gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gnulib b/.gnulib
index ce4ee4cbb..47c634c05 16
--- a/.gnulib
+++ b/.gnulib
@@ -
On Wed, Aug 23, 2017 at 05:22:10PM -0400, John Ferlan wrote:
> Rather than an int, it returns a bool - so let's define it that way
>
> Signed-off-by: John Ferlan
> ---
> src/conf/virnetworkobj.c | 2 +-
> src/conf/virnetworkobj.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Review
On Wed, Aug 23, 2017 at 05:22:06PM -0400, John Ferlan wrote:
> This reverts commit 92840eb3a7e47cdf761e52afccc41d2a35327fbd.
>
> More recent reviews/changes don't have the vir*ObjNew APIs
> consuming the @def, so remove from Interface as well. Changes
> needed to also deal with conflicts from comm
On Thu, Aug 24, 2017 at 10:08:35AM +0300, Nikolay Shirokovskiy wrote:
> 6e6faf6d changed vzDomObjAlloc signature in source but not in header file.
> ---
> src/vz/vz_utils.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h
> index ea2e2d
This patch shows incorrect info when client request comes
when migration routine is stopping mirror jobs or mirror
jobs already stopped. This issue will be addressed in next
patch.
---
src/qemu/qemu_driver.c| 4
src/qemu/qemu_migration.c | 49 +
This patch simply switches code from using VIR_DOMAIN_JOB_* to
introduced QEMU_DOMAIN_JOB_STATUS_*. Later this gives us freedom
to introduce states for postcopy and mirroring phases.
---
src/qemu/qemu_domain.c | 27 --
src/qemu/qemu_domain.h | 10 +++-
s
qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs and
timeRemaining is always 0.
---
src/qemu/qemu_domain.c | 7 ---
src/qemu/qemu_domain.h | 1 -
src/qemu/qemu_migration_cookie.c | 5 -
3 files changed, 13 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qem
In case of real migration (not migrating to file on save, dump etc)
migration info is not complete at time qemu finishes migration
in normal (non postcopy) mode. We need to update disks stats,
downtime info etc. Thus let's not expose this job status as
completed.
To archive this let's set status t
qemuMigrationFetchJobStatus is rather inconvinient. Some of its
callers don't need status to be updated, some don't need to update
elapsed time right away. So let's update status or elapsed time
in callers instead.
In qemuMigrationConfirmPhase we should fetch stats with copy
flag set as stats vari
Let's store disks stats for completed mirror jobs in current
job info. So on getting migration job stats thru API
we take records for completed jobs from current job info
and records for still active jobs by querying qemu process.
As we need to keep disks stats for completed mirror jobs
in current
During stopping mirror block jobs vm lock is droped on awating block
job events, thus next scenario is possible:
1. stop mirror block job is sent
2. migration routine awaits for block job event
3. mirror job stopped and event send
4. getting migration job info routine asks for block job info and a
Current code consults job.current->stats.status to check for postcopy
state. First it is more correct to check for both job.current->status
and job.current->stats.status.code because on some paths on failures
we change only the former. Second if qemu supports migration events
then stats can change
Looks like it is more simple to drop this optimization as we are
going to add getting disks stats during migration via quering qemu
process and checking if we have to acquire job condition becomes
more complicate.
---
src/qemu/qemu_driver.c | 15 +--
1 file changed, 5 insertions(+), 10
Instead of checking stat.status let's set status to migrating
as soon as migrate command is send (waiting for completion
is a good place too).
---
src/qemu/qemu_domain.c| 1 +
src/qemu/qemu_domain.h| 1 +
src/qemu/qemu_driver.c| 4 +++-
src/qemu/qemu_migration.c | 9 +++--
4 files
---
src/qemu/qemu_migration.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 906f8fe..54cfdd0 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3867,6 +3867,13 @@ qemuMigrationRun(virQEMUDriverPtr driv
This way we get stats only in one place. The former code waits for
complete/postcopy status basically and don't need to mess with stats.
The patch drops raising an error on stats updates failure. This
does not make much sense anyway.
---
src/qemu/qemu_migration.c | 24 +++-
1
Setting status to none has little value - getting job status
will not return even elapsed time.
After this patch getting job stats stays correct in a sence
it will not fetch migration stats because it consults
stats.status before doing the fetch.
---
src/qemu/qemu_domain.c| 1 +
src/qemu/qemu
---
src/qemu/qemu_driver.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c62d416..b8a4df7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12905,12 +12905,18 @@ qemuDomainGe
diff from v2:
1. Fix style issues.
2. Rework patch for fetching job info
(save logic to use temporary variable when drop vm lock)
3. Update disk stats when block jobs are canceled.
4. Adress a few more corner cases.
This patch series add disks stats to domain job info(stats) as
w
qemuMonitorGetMigrationStats will do it for us anyway.
---
src/qemu/qemu_migration.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index b7ad65d..cc42f7a 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1387,7 +13
Querying destination migration statistics may result in getting
a failure or getting a elapsed time value depending on stats.status
value which is odd. Instead let's always fail. Clients should
be ready to handle this as currently getting failure period
can be considerable.
---
src/qemu/qemu_drive
Hi John,
For some reason I don't see these errors in my environment,
I would appreciate it if you could fix them before merging.
Thank you!!
-Original Message-
From: John Ferlan [mailto:jfer...@redhat.com]
Sent: Wednesday, August 23, 2017 8:44 PM
To: Edan David ; libvir-list@redhat.com
S
6e6faf6d changed vzDomObjAlloc signature in source but not in header file.
---
src/vz/vz_utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h
index ea2e2da..d213183 100644
--- a/src/vz/vz_utils.h
+++ b/src/vz/vz_utils.h
@@ -116,7 +116,7
71 matches
Mail list logo