mmap can fail on 32-bit systems if we're trying to zero out a lot of data.
Fall back to using block-by-block writing in that case. While we could map
smaller blocks it's unlikely that this code is used a lot and its easier to
just fall back to one of the existing methods.
Also modified the
The qemuDomainChangeNet() is called when 'virsh update-device' is
invoked on a NIC. Currently, we fail to update the QoS even though
we have routines for that.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
src/qemu/qemu_hotplug.c | 20 ++--
1 file changed, 18
*** BLURB HERE ***
Michal Privoznik (2):
qemu_hotplug: Allow QoS update in qemuDomainChangeNet
virNetDevBandwidthEqual: Make it more robust
src/qemu/qemu_hotplug.c | 20 ++--
src/util/virnetdevbandwidth.c | 26 --
2 files changed, 38
So far the virNetDevBandwidthEqual() expected both -in and -out items
to be allocated for both @a and @b compared. This is not necessary true
for all our code. For instance, running 'update-device' twice over a NIC
with the very same XML results in SIGSEGV-ing in this function.
Signed-off-by:
On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote:
On 09/26/2013 02:08 AM, Nehal J Wani wrote:
Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC
and virNetworkDHCPLeaseFree.
* virNetworkGetDHCPLeases: returns the dhcp leases information for a given
On Tue, Oct 01, 2013 at 06:57:56PM +0200, Viktor Mihajlovski wrote:
On 10/01/2013 06:19 PM, Daniel P. Berrange wrote:
What were you doing to get a message greater than 256KB ? This
patch did not attempt to fix all possible combinations. If a
API call such as virConnectListAllDomains has
Hey,
On Tue, Oct 01, 2013 at 01:05:33PM -0700, Jason Helfman wrote:
Here are some build logs. The first is for amd64, and the latter is for
i386.
https://redports.org/~jgh/20131001181900-6317-149023/libvirt-glib-0.1.7.log
On 10/02/2013 03:34 AM, Michal Privoznik wrote:
The qemuDomainChangeNet() is called when 'virsh update-device' is
invoked on a NIC. Currently, we fail to update the QoS even though
we have routines for that.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
src/qemu/qemu_hotplug.c |
On 10/02/2013 03:34 AM, Michal Privoznik wrote:
So far the virNetDevBandwidthEqual() expected both -in and -out items
to be allocated for both @a and @b compared. This is not necessary true
for all our code. For instance, running 'update-device' twice over a NIC
with the very same XML results
The previous veth interface naming scheme tried to find the lowest unused
index for both the parent and container veth interfaces. That's susceptible
to race conditions when multiple containers are started at the same time.
Try to pick a random unused interface id for the parent if one wasn't
On 02.10.2013 10:44, Laine Stump wrote:
On 10/02/2013 03:34 AM, Michal Privoznik wrote:
So far the virNetDevBandwidthEqual() expected both -in and -out items
to be allocated for both @a and @b compared. This is not necessary true
for all our code. For instance, running 'update-device' twice
Il 25/09/2013 10:59, Michael S. Tsirkin ha scritto:
I couldn't find on PCIe spec any mention that Root Complex Integrated
EndPoint
must be PCIe. But, from spec 1.3.2.3:
- A Root Complex Integrated Endpoint must not require I/O resources
claimed through BAR(s).
- A Root Complex
On Mon, Sep 23, 2013 at 01:36:40PM -0400, Cole Robinson wrote:
I basically do:
- quick smoke test to make sure libvirt and virsh are working:
-- stop system libvirtd
-- sudo ./daemon/libvirt
-- sudo ./tools/virsh list --all
- make check make rpm make distcheck
- cd po/ make update-po
On Wed, Oct 02, 2013 at 10:53:07AM +0200, Paolo Bonzini wrote:
Il 25/09/2013 10:59, Michael S. Tsirkin ha scritto:
I couldn't find on PCIe spec any mention that Root Complex Integrated
EndPoint
must be PCIe. But, from spec 1.3.2.3:
- A Root Complex Integrated Endpoint must not
On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com wrote:
On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote:
On 09/26/2013 02:08 AM, Nehal J Wani wrote:
Introduce 3 new APIs, virNetworkGetDHCPLeases,
virNetworkGetDHCPLeasesForMAC
and virNetworkDHCPLeaseFree.
On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote:
On 09/26/2013 02:08 AM, Nehal J Wani wrote:
Introduce 3 new APIs,
On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com wrote:
On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote:
On
On 09/25/2013 03:15 PM, Cole Robinson wrote:
This is just stolen from qemu_driver.c with tweaks to fit the
test driver.
---
src/test/test_driver.c | 392
+
1 file changed, 392 insertions(+)
...
+static int
On Wed, Oct 02, 2013 at 09:13:59AM +0100, Daniel P. Berrange wrote:
On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote:
On 09/26/2013 02:08 AM, Nehal J Wani wrote:
Introduce 3 new APIs, virNetworkGetDHCPLeases,
virNetworkGetDHCPLeasesForMAC
and virNetworkDHCPLeaseFree.
On Wed, Oct 02, 2013 at 03:41:56PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On
On 10/02/2013 06:11 AM, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On Tue, Oct 01, 2013 at
On Wed, Oct 2, 2013 at 4:18 PM, Daniel P. Berrange berra...@redhat.com wrote:
On Wed, Oct 02, 2013 at 03:41:56PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote:
On Wed,
On Wed, Oct 02, 2013 at 04:30:16PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 4:18 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On Wed, Oct 02, 2013 at 03:41:56PM +0530, Nehal J Wani wrote:
On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com
wrote:
On
On Wed, Oct 02, 2013 at 11:45:27AM +0300, Oskari Saarenmaa wrote:
The previous veth interface naming scheme tried to find the lowest unused
index for both the parent and container veth interfaces. That's susceptible
to race conditions when multiple containers are started at the same time.
From: Daniel P. Berrange berra...@redhat.com
The primary goal of this series was to address the race condition in
creation of veth device names. A few other bugs were identified
along the way though fixed.
Daniel P. Berrange (5):
Don't set netdev offline in container cleanup
Avoid reporting
From: Daniel P. Berrange berra...@redhat.com
If veth device allocation has a fatal error, the veths
array may contain NULL device names. Avoid calling the
virNetDevVethDelete function on such names.
Signed-off-by: Daniel P. Berrange berra...@redhat.com
---
src/lxc/lxc_process.c | 2 +-
1 file
From: Daniel P. Berrange berra...@redhat.com
The kernel automatically destroys veth devices when cleaning
up the container network namepace. During normal shutdown, it
is thus likely that the attempt to run 'ip link del vethN'
will fail. If it fails, check if the device exists, and avoid
From: Daniel P. Berrange berra...@redhat.com
During container cleanup there is a race where the kernel may
have destroyed the veth device before we try to set it offline.
This causes log error messages. Given that we're about to
delete the device entirely, setting it offline is pointless.
From: Daniel P. Berrange berra...@redhat.com
The veth device creation code run in two steps, first it looks
for two free veth device names, then it runs ip link to create
the veth pair. There is an obvious race between finding free
names and creating them, when guests are started in parallel.
From: Daniel P. Berrange berra...@redhat.com
The XML parser reserves 'vnet' as a prefix for automatically
generated NIC device names. Switch the veth device creation
to use this prefix, so it does not have to worry about clashes
with user specified names in the XML.
Signed-off-by: Daniel P.
On 02/10/13 14:30, Daniel P. Berrange wrote:
On Wed, Oct 02, 2013 at 11:45:27AM +0300, Oskari Saarenmaa wrote:
This does change the interface names from nice low integers to random larger
integers, but I don't see that an issue. And the caller can select any
other name they like if that's not
On 10/02/2013 04:46 AM, Daniel P. Berrange wrote:
Actually, I see that we already expose the IAID concept to the user
in the XML for networks
ip family=ipv6 address=2001:db8:ca2:2::1 prefix=64
dhcp
host name=paul ip=2001:db8:ca2:2:3::1 /
host
On 09/26/2013 02:08 AM, Nehal J Wani wrote:
+
+typedef struct _virNetworkDHCPLeases virNetworkDHCPLeases;
+typedef virNetworkDHCPLeases *virNetworkDHCPLeasesPtr;
+struct _virNetworkDHCPLeases {
+long long expirytime; /* Seconds since epoch */
+union {
+char *mac;
Kept ((access(dstpath, R_OK) 0) || (!lxcCheckFSSupport(mnt-type)))
when determining support for the mount. Even if the filesystem type is
supported, there is still a chance to fail when building the dstpath
(virFileMakePath). If that call fails, starting the container will fail.
Specifically
So far, we're unit testing some basic functions and some (so called)
simple functions (e.g. qmp_capabilities, system_powerdown). However,
there are more functions which expect simple {'return': {}} reply, but
takes more args to construct the command (for instance set_link). This
patch aims on such
The thread needs to be joined no matter if it was still running when
qemuMonitorTestFree is called or not. The worker is thread spawned in
qemuMonitorTestNew() and has to be joined.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitortestutils.c | 3 +--
1 file changed, 1
After successful @cmd construction the memory where @keys points to is
part of @cmd. Avoid double freeing it.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
src/qemu/qemu_monitor_json.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_monitor_json.c
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 143
1 file changed, 143 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index ba2de45..7a851bd 100644
---
When querying for kvm, we try to find 'enabled' field. Hence the error
message should report we haven't found 'enabled' and not 'running'
(which is not even in the reply). Probably a typo or copy-paste error.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
src/qemu/qemu_monitor_json.c |
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 6eb26a1..587b66f 100644
---
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 50 +
1 file changed, 50 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 52df486..576288b 100644
---
And so do qemuMonitorJSONSetMigrationCapability.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 46 +
1 file changed, 46 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index
And so do qemuMonitorJSONGetBlockIoThrottle.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 185 +++-
1 file changed, 115 insertions(+), 70 deletions(-)
diff --git a/tests/qemumonitorjsontest.c
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 77 +
1 file changed, 77 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index f52e970..6eb26a1 100644
---
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 67 +
1 file changed, 67 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index b6adb35..14c64fd 100644
---
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 40
1 file changed, 40 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 576288b..b6adb35 100644
---
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 587b66f..ba2de45 100644
--- a/tests/qemumonitorjsontest.c
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 9e9dbcc..5636fb6 100644
---
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 14c64fd..2c5c452 100644
--- a/tests/qemumonitorjsontest.c
+++
and fix some bugs I've ran into while writing the tests.
Michal Privoznik (18):
qemuMonitorJSONGetVirtType: Fix error message
qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown
qemuMonitorJSONSendKey: Avoid double free
qemuMonitorTestFree: Join worker thread unconditionally
Right now, we are testing qemuMonitorSystemPowerdown instead of
qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions have
the same header and the former is just a wrapper over the latter. But we
should be consistent as we're testing the JSON functions only in here.
Signed-off-by:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 7ba8ad2..52df486 100644
--- a/tests/qemumonitorjsontest.c
While the reply can be reused test qemuMonitorJSONGetBlockExtent and
qemuMonitorJSONGetBlockExtent too.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 212
1 file changed, 212 insertions(+)
diff --git
On Wed, Oct 02, 2013 at 07:09:53PM +0200, Michal Privoznik wrote:
The thread needs to be joined no matter if it was still running when
qemuMonitorTestFree is called or not. The worker is thread spawned in
qemuMonitorTestNew() and has to be joined.
Signed-off-by: Michal Privoznik
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
When querying for kvm, we try to find 'enabled' field. Hence the error
message should report we haven't found 'enabled' and not 'running'
(which is not even in the reply). Probably a typo or copy-paste error.
Signed-off-by: Michal Privoznik
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
Right now, we are testing qemuMonitorSystemPowerdown instead of
qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions have
the same header and the former is just a wrapper over the latter. But we
should be consistent as we're
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
After successful @cmd construction the memory where @keys points to is
part of @cmd. Avoid double freeing it.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
src/qemu/qemu_monitor_json.c | 3 +++
1 file changed, 3 insertions(+)
ACK.
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
So far, we're unit testing some basic functions and some (so called)
simple functions (e.g. qmp_capabilities, system_powerdown). However,
there are more functions which expect simple {'return': {}} reply, but
takes more args to construct the
On Wed, Oct 02, 2013 at 11:42:13AM -0600, Eric Blake wrote:
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
Right now, we are testing qemuMonitorSystemPowerdown instead of
qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions have
the same header and the former is just a
On Wed, Oct 02, 2013 at 10:59:03AM +0200, Christophe Fergeau wrote:
On Mon, Sep 23, 2013 at 01:36:40PM -0400, Cole Robinson wrote:
I basically do:
- quick smoke test to make sure libvirt and virsh are working:
-- stop system libvirtd
-- sudo ./daemon/libvirt
-- sudo ./tools/virsh
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 77
+
1 file changed, 77 insertions(+)
+ {
+
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 38 ++
1 file changed, 38 insertions(+)
static int
+testQemuMonitorJSONqemuMonitorJSONGetVirtType(const void *data)
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 37 +
1 file changed, 37 insertions(+)
+
+if (qemuMonitorJSONGetBalloonInfo(qemuMonitorTestGetMonitor(test),
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 143
1 file changed, 143 insertions(+)
ACK.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt
On 10/02/2013 11:09 AM, Michal Privoznik wrote:
While the reply can be reused test qemuMonitorJSONGetBlockExtent and
qemuMonitorJSONGetBlockExtent too.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 212
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 37 +
1 file changed, 37 insertions(+)
ACK
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 50
+
1 file changed, 50 insertions(+)
ACK
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 67
+
1 file changed, 67 insertions(+)
ACK.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 40
1 file changed, 40 insertions(+)
ACK
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 26 ++
1 file changed, 26 insertions(+)
static int
+testQemuMonitorJSONqemuMonitorJSONSendKey(const void *data)
+{
+
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
And so do qemuMonitorJSONSetMigrationCapability.
s/And so/Also/
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 46
+
1 file changed, 46 insertions(+)
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote:
From: Daniel P. Berrange berra...@redhat.com
During container cleanup there is a race where the kernel may
have destroyed the veth device before we try to set it offline.
This causes log error messages. Given that we're about to
delete the
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote:
From: Daniel P. Berrange berra...@redhat.com
The kernel automatically destroys veth devices when cleaning
up the container network namepace. During normal shutdown, it
s/namepace/namespace/
is thus likely that the attempt to run 'ip link
So we can get the MAC addr if we use the '--dhcp-script' parameter to
make dnsmasq invoke a helper program we create, to save the lease
details we need.
Incidentally, I see our XML format is actually wrong, because it says
the 'mac' attribute is forbidden for host elements using IPv6.
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote:
From: Daniel P. Berrange berra...@redhat.com
If veth device allocation has a fatal error, the veths
array may contain NULL device names. Avoid calling the
virNetDevVethDelete function on such names.
Signed-off-by: Daniel P. Berrange
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote:
From: Daniel P. Berrange berra...@redhat.com
The veth device creation code run in two steps, first it looks
for two free veth device names, then it runs ip link to create
the veth pair. There is an obvious race between finding free
names and
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote:
From: Daniel P. Berrange berra...@redhat.com
The XML parser reserves 'vnet' as a prefix for automatically
generated NIC device names. Switch the veth device creation
to use this prefix, so it does not have to worry about clashes
with user
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 38 ++
1 file changed, 38 insertions(+)
ACK
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt
On 10/02/2013 11:10 AM, Michal Privoznik wrote:
And so do qemuMonitorJSONGetBlockIoThrottle.
Signed-off-by: Michal Privoznik mpriv...@redhat.com
---
tests/qemumonitorjsontest.c | 185
+++-
1 file changed, 115 insertions(+), 70 deletions(-)
ACK.
79 matches
Mail list logo