The only use for the 'current' member of virDomainSnapshotDef was with
the PARSE/FORMAT_INTERNAL flag for controlling an internal-use
element marking whether a particular snapshot definition was
current, and even then, only by the qemu driver on output, and by qemu
and test driver on input. But
Pull out the common parts of virDomainSnapshotDef that will be reused
for virDomainCheckpointDef into a new base class. Adjust all callers
that use the direct fields (some of it is churn that disappears when
the next patch refactors virDomainSnapshotObj; oh well...).
Signed-off-by: Eric Blake
An upcoming patch will rework virDomainSnapshotObjList to be generic
for both snapshots and checkpoints; reduce the churn by adding a new
accessor virDomainSnapshotObjGetDef() which returns the
snapshot-specific definition even when the list is rewritten to
operate only on a base class, then using
Prepare for introducing a bunch of new public APIs related to backup
checkpoints by first introducing a new internal type and errors
associated with that type. Checkpoints are modeled heavily after
virDomainSnapshotPtr (both represent a point in time of the guest),
although a snapshot exists with
Upcoming patches want to add virDomainCheckpoint that behaves very
similarly to virDomainSnapshot; the easiest way to share common code
is to give both classes a common base class. Thanks to the accessor
functions in the previous patch, we have very few changes required
outside of datatypes.[ch].
Separate the algorithm for which list members to vist (which is
generic and can be shared with checkpoints, provided that checkpoints
pick the same bit values for some of its flags) from the decision on
which members to return (which is specific to snapshots). The typedef
for the callback
Finish the code motion of generic moment list handling. Well, mostly -
we need to convert to using virObject to get polymorphic cleanup
functions (so for now there are still a few lingering ties specific to
snapshots). In this case, I kept virDomainSnapshotObjList as a
wrapper type around the new
Now that the core of SnapshotObj is agnostic to snapshots and can be
shared with upcoming checkpoint code, it is time to rename the struct
and the functions specific to list operations. A later patch will
shuffle which file holds the common code. This is a fairly mechanical
patch.
Signed-off-by:
Rather than allowing a leaky abstraction where multiple drivers have
to open-code operations that update the relations in a
virDomainSnapshotObjList, it is better to add accessor functions so
that updates to relations are maintained closer to the internals. The
goal here is to avoid access to,
It is easier to track the current snapshot as part of the list of
snapshots. In particular, doing so lets us guarantee that the current
snapshot is cleared if that snapshot is removed from the list (rather
than depending on the caller to do so, and risking a use-after-free
problem). This requires
Change the return value of virDomainSnapshotObjLisParse() to return
the number of snapshots imported, and allow a return of 0 (the
original proposal of adding a flag to virDomainSnapshotCreateXML
required returning an arbitrary non-NULL snapshot, but with a new API
that returns a count, we are no
Another step towards making the object list reusable for both
snapshots and checkpoints: the list code only ever needs items that
are in the common virDomainMomentDef base type. This undoes a lot of
the churn in accessing common members added the earlier patch.
Signed-off-by: Eric Blake
---
Upcoming patches want to add virDomainCheckpoint that behaves very
similarly to virDomainSnapshot; the easiest way to share common code
is to give both classes a common base class. If this were C++, we'd
just use public member inheritance; but since it is C, we instead have
to touch EVERY use of
Now that we have made virDomainMomentObj sufficiently generic to
support both snapshots and checkpoints, it is time to rename the file
that it lives in. The split between a generic object and a list of the
generic objects doesn't buy us as much, so it will be easier to stick
all the moment list
The following virsh command was triggering a use-after-free:
$ virsh -c test:///default '
snapshot-create-as test s1
snapshot-create-as test s2
snapshot-delete --children-only test s1
snapshot-current --name test'
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s1
A couple of these have seen the list before, but most of them are
new. The bulk of this series is about refactoring snapshot_conf.c into
smaller pieces that I can then reuse for implementing checkpoints,
without having to open-code the hierarchy algorithms a second time
(one of John's complaints
An upcoming patch will be reworking virDomainSnapshotDef to have a
base class; minimize the churn by using a local variable to reduce the
number of dereferences required when acessing the domain definition
associated with the snapshot.
Signed-off-by: Eric Blake
---
src/vbox/vbox_common.c | 65
In 669018bc9cb I've introduced def->refresh which might be
allocated by virStoragePoolDefRefreshParse() but is never freed.
Signed-off-by: Michal Privoznik
---
Pushed under trivial rule.
src/conf/storage_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/storage_conf.c
In a1c453dc088, during VIR_AUTOFREE() rewrite this wasn't done
properly. @port might be leaked because it's allocated in a for()
loop.
Signed-off-by: Michal Privoznik
---
Pushed under trivial rule.
src/conf/storage_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git
On Tue, Mar 19, 2019 at 05:30:03PM +0100, Ján Tomko wrote:
> On Tue, Mar 19, 2019 at 05:09:33PM +0100, Michal Privoznik wrote:
> > On 3/19/19 4:53 PM, Ján Tomko wrote:
> > > On Mon, Mar 18, 2019 at 05:27:39PM +0100, Michal Privoznik wrote:
> > > >
The refresh_volume_allocation variable in
virStoragePoolDefParseXML() has been unused since its
introduction in commit 669018bc9cb1, and Clang rightfully
complains about this fact.
Signed-off-by: Andrea Bolognani
---
Pushed under the build breaker rule.
src/conf/storage_conf.c | 1 -
1 file
On Tue, Mar 19, 2019 at 05:09:33PM +0100, Michal Privoznik wrote:
On 3/19/19 4:53 PM, Ján Tomko wrote:
On Mon, Mar 18, 2019 at 05:27:39PM +0100, Michal Privoznik wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1686927
When trying to create a nwfilter binding via
nwfilterBindingCreateXML()
On Tue, 2019-03-19 at 12:10 -0400, Cole Robinson wrote:
> On 3/19/19 11:59 AM, Andrea Bolognani wrote:
> > What I was pointing out is that you're supposed to run ldconfig
> > after (un)installing libraries: our libraries are shipped in the
> > libvirt-libs package, but according to the spec file
On 3/19/19 11:59 AM, Andrea Bolognani wrote:
On Tue, 2019-03-19 at 10:49 -0400, Cole Robinson wrote:
On 3/19/19 4:13 AM, Andrea Bolognani wrote:
On Mon, 2019-03-18 at 15:35 -0400, Cole Robinson wrote:
%post client
+%if 0%{?rhel} == 7
/sbin/ldconfig
+%endif
%systemd_post
On 3/19/19 4:53 PM, Ján Tomko wrote:
On Mon, Mar 18, 2019 at 05:27:39PM +0100, Michal Privoznik wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1686927
When trying to create a nwfilter binding via
nwfilterBindingCreateXML() we may encounter a crash. The sequence
of functions called is as
We previously had to disable RBD on 32-bit platforms since Ceph has
dropped all support for 32-bit. Unfortunately anyone with the RPM
libvirt-daemon-driver-storage-rbd installed on 32-bit now has a
broken upgrade path.
To fix this we must make libvirt-daemon-driver-storage-common
have an
On 3/19/19 2:42 PM, jdill...@redhat.com wrote:
From: Jason Dillaman
The librbd API will transparently revert to a slow disk usage
calculation method if the fast-diff map is marked as invalid.
Signed-off-by: Jason Dillaman
---
src/storage/storage_backend_rbd.c | 41
On 3/19/19 2:42 PM, jdill...@redhat.com wrote:
From: Jason Dillaman
The new 'refresh' element can override the default refresh operations
for a storage pool. The only currently supported override is to set
the volume allocation size to the volume capacity. This can be specified
by adding the
On 3/19/19 2:42 PM, jdill...@redhat.com wrote:
From: Jason Dillaman
The RBD fast-diff feature can vastly reduce the amount of time needed
to calculate actual disk usage of volumes, but it might still be a
slow operation for large RBD pools or pools with large RBD images.
Therefore, this
On 3/19/19 2:42 PM, jdill...@redhat.com wrote:
From: Jason Dillaman
Use the new refresh volume allocation pool override to skip
computing the actual volume usage if disabled.
Signed-off-by: Jason Dillaman
---
src/storage/storage_backend_rbd.c | 3 ++-
1 file changed, 2 insertions(+), 1
On Tue, 2019-03-19 at 10:49 -0400, Cole Robinson wrote:
> On 3/19/19 4:13 AM, Andrea Bolognani wrote:
> > On Mon, 2019-03-18 at 15:35 -0400, Cole Robinson wrote:
> > > %post client
> > >
> > > +%if 0%{?rhel} == 7
> > > /sbin/ldconfig
> > > +%endif
> > > %systemd_post
On Mon, Mar 18, 2019 at 05:27:39PM +0100, Michal Privoznik wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1686927
When trying to create a nwfilter binding via
nwfilterBindingCreateXML() we may encounter a crash. The sequence
of functions called is as follows:
1) nwfilterBindingCreateXML()
The new dependencies are:
- python3
- python3-libxml2
- python3-pytest
- python3-requests
xmllint has been removed in favour of a own crafted test using
python3-libmlx2
Signed-off-by: Fabiano Fidêncio
---
guests/vars/projects/osinfo-db.yml | 5 -
1 file changed, 4 insertions(+), 1
On Mon, Mar 18, 2019 at 04:55:23PM +0100, Peter Krempa wrote:
All callers now pass true so we can remove the argument.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
On Mon, Mar 18, 2019 at 04:55:22PM +0100, Peter Krempa wrote:
All callers pass in 'true' so we can remove the parameter.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 9 -
src/conf/domain_conf.h | 1 -
src/conf/snapshot_conf.c | 2 +-
tests/virstoragetest.c | 2 +-
4 files
On Mon, Mar 18, 2019 at 04:55:21PM +0100, Peter Krempa wrote:
We parse the seclabels and use them internally so omitting them when
formatting would be misleading. Additionally our schema actually allows
them.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c
On Mon, Mar 18, 2019 at 04:55:20PM +0100, Peter Krempa wrote:
Similarly to the disk source we need to keep the disk index (which is in
the qemu driver used for identification of the source for block jobs)
for the element so that when it's replaced as a disk source
after pivoting all the
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> +# define TEST_INTERNAL(_name, _suffix, ...) \
This macro should be called DO_TEST_INTERNAL() - you're still
running the test from it, so the DO_ prefix is fully warranted.
Reviewed-by: Andrea Bolognani
--
Andrea Bolognani / Red
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> @@ -612,20 +614,25 @@ typedef enum {
> ARG_MIGRATE_FD,
> ARG_FLAGS,
> ARG_PARSEFLAGS,
> +ARG_CAPS_ARCH,
> +ARG_CAPS_VER,
I guess these could be simply ARG_ARCH and ARG_VER, but I don't
have a terribly strong
On Mon, Mar 18, 2019 at 04:55:19PM +0100, Peter Krempa wrote:
When the block copy operation is started with a reused external file in
incremental mode libvirt will need to open and insert the backing chain
for that file into qemu (in -blockdev mode). This means that we'll need
to track the
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> +if (gic && testQemuCapsSetGIC(info->qemuCaps, gic) < 0)
> +goto cleanup;
Please change the first part of the condition to 'gic != GIC_NONE'
so that it doesn't implicitly rely on the actual value.
Reviewed-by: Andrea
On Tue, Mar 19, 2019 at 02:08:01PM +0100, Igor Mammedov wrote:
> On Thu, 7 Mar 2019 10:07:05 +
> Daniel P. Berrangé wrote:
>
> > On Wed, Mar 06, 2019 at 07:54:17PM +0100, Igor Mammedov wrote:
> > > On Wed, 6 Mar 2019 18:16:08 +
> > > Daniel P. Berrangé wrote:
> > >
> > > > On Wed,
On 3/19/19 4:13 AM, Andrea Bolognani wrote:
On Mon, 2019-03-18 at 15:35 -0400, Cole Robinson wrote:
Since Fedora 28 (our minimum supported build), ldconfig is called
automatically for us:
https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets
These changes appear to be
On Mon, Mar 18, 2019 at 04:55:18PM +0100, Peter Krempa wrote:
Move parsing of into virDomainStorageSourceParseFull so
that it can be reused easily.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 100 +--
src/conf/domain_conf.h | 3 +-
On Mon, Mar 18, 2019 at 04:55:17PM +0100, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 25 +++--
1 file changed, 7 insertions(+), 18 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: Digital signature
--
libvir-list
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> This is closer to the pattern of qemuxml2xml tests, and will make
> things easier if we extend testInfo to contain more freeable data
>
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 11 ---
> 1 file changed, 8
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> Rather than make callers do it. The operative info is just arch
> and ver which we are passing in already.
>
> Fold in stripmachinealiases too since it is just dependent on
> ver value
>
> Signed-off-by: Cole Robinson
> ---
>
On Tue, Mar 19, 2019 at 02:31:47PM +0100, Andrea Bolognani wrote:
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
-# define DO_TEST_CAPS(name, ver) \
-DO_TEST_CAPS_FULL(name, 0, 0, ver)
I fail to see why this one existed in the first place - isn't it
basically the same as
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 14 +++---
> 1 file changed, 7 insertions(+), 7 deletions(-)
Reviewed-by: Andrea Bolognani
--
Andrea Bolognani / Red Hat / Virtualization
--
libvir-list mailing
On Sun, 10 Mar 2019 11:14:08 +0100
Markus Armbruster wrote:
> Daniel P. Berrangé writes:
>
> > On Mon, Mar 04, 2019 at 12:45:14PM +0100, Markus Armbruster wrote:
> >> Daniel P. Berrangé writes:
> >>
> >> > On Mon, Mar 04, 2019 at 08:13:53AM +0100, Markus Armbruster wrote:
> >> >> If we
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> +# define DO_TEST_CAPS_INTERNAL(_name, _suffix, \
> arch, capsfile, stripmachinealiases, ...) \
> do { \
> static struct testInfo info = { \
> -name, "." suffix, NULL, NULL,
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> +# define DO_TEST_CAPS_INTERNAL(name, suffix, \
> + arch, capsfile, stripmachinealiases, ...) \
> do { \
> static struct testInfo info = { \
> -name, "." suffix, NULL, NULL, -1,\
This bug demonstrates itself for other objects too, but let's
show it for domains. Assume that dummy.xml contains a valid
domain definition. Then
1) virsh create dummy.xml && sleep 1
2) virsh destroy dummy &
3) virsh create ../dummy.xml
Observe error:
error: Failed to create domain from
If there are two concurrent threads, one of which is removing an
nwfilter from the list and the other is trying to add it back they
may serialize in the following order:
1) obj->removing is set and @obj is unlocked.
2) The tread that's trying to add the nwfilter onto the list locks
the list
If there are two concurrent threads, one of which is removing a
domain from the list and the other is trying to add it back they
may serialize in the following order:
1) vm->removing is set and @vm is unlocked.
2) The tread that's trying to add the domain onto the list locks
the list and tries
*** BLURB HERE ***
Michal Prívozník (3):
DO NOT APPLY: Simple reproducer for virDomainObjListRemove
virDomainObjListAddLocked: Produce better error message than
'Duplicate key'
virNWFilterBindingObjListAddLocked: Produce better error message than
'Duplicate key'
From: Jason Dillaman
Use the new refresh volume allocation pool override to skip
computing the actual volume usage if disabled.
Signed-off-by: Jason Dillaman
---
src/storage/storage_backend_rbd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Jason Dillaman
The new 'refresh' element can override the default refresh operations
for a storage pool. The only currently supported override is to set
the volume allocation size to the volume capacity. This can be specified
by adding the following snippet:
...
...
This is
From: Jason Dillaman
The librbd API will transparently revert to a slow disk usage
calculation method if the fast-diff map is marked as invalid.
Signed-off-by: Jason Dillaman
---
src/storage/storage_backend_rbd.c | 41 ---
1 file changed, 37 insertions(+), 4
From: Jason Dillaman
The RBD fast-diff feature can vastly reduce the amount of time needed
to calculate actual disk usage of volumes, but it might still be a
slow operation for large RBD pools or pools with large RBD images.
Therefore, this feature should be able to be optionally disabled if
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Andrea Bolognani
--
Andrea Bolognani / Red Hat / Virtualization
--
libvir-list mailing list
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 130ab29d6e..b555166e82 100644
> ---
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> -# define DO_TEST_CAPS(name, ver) \
> -DO_TEST_CAPS_FULL(name, 0, 0, ver)
I fail to see why this one existed in the first place - isn't it
basically the same as DO_TEST_CAPS_VER()?
Reviewed-by: Andrea Bolognani
--
Andrea
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> +DO_TEST_FULL("missing-machine",
> + ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE,
> + ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE,
> + ARG_QEMU_CAPS, NONE);
On Mon, Mar 18, 2019 at 04:55:16PM +0100, Peter Krempa wrote:
Use the new parser function for disk source.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 27 +++
1 file changed, 7 insertions(+), 20 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> This allows us to drop parseFlags from DO_TEST_FULL
>
> Signed-off-by: Cole Robinson
Reviewed-by: Andrea Bolognani
--
Andrea Bolognani / Red Hat / Virtualization
--
libvir-list mailing list
libvir-list@redhat.com
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> This allows us to drop flags from DO_TEST_FULL
>
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 37 ++---
> 1 file changed, 22 insertions(+), 15 deletions(-)
Reviewed-by: Andrea
On Mon, Mar 18, 2019 at 04:55:15PM +0100, Peter Krempa wrote:
Replace most of the function by using the existing parsing helper.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 53 +-
1 file changed, 11 insertions(+), 42 deletions(-)
On Tue, 2019-03-19 at 14:10 +0100, Andrea Bolognani wrote:
> On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> > This allows us to drop migrateFrom and migrateFd from DO_TEST_FULL
> >
> > Signed-off-by: Cole Robinson
> > ---
> > tests/qemuxml2argvtest.c | 46
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
> This allows us to drop migrateFrom and migrateFd from DO_TEST_FULL
>
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 46 ++--
> 1 file changed, 30 insertions(+), 16 deletions(-)
On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> -DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0,
> +DO_TEST_FULL("restore-v2", 0, 0,
> + ARG_MIGRATE_FROM, "exec:cat", ARG_MIGRATE_FD, 7,
> ARG_QEMU_CAPS, NONE);
> -
On Thu, 7 Mar 2019 10:07:05 +
Daniel P. Berrangé wrote:
> On Wed, Mar 06, 2019 at 07:54:17PM +0100, Igor Mammedov wrote:
> > On Wed, 6 Mar 2019 18:16:08 +
> > Daniel P. Berrangé wrote:
> >
> > > On Wed, Mar 06, 2019 at 06:33:25PM +0100, Igor Mammedov wrote:
> > > > Amend -numa
On Mon, Mar 18, 2019 at 04:55:14PM +0100, Peter Krempa wrote:
virDomainDiskSourceParse was now just a thin wrapper without any extra
value. Replace all usage of it by the function it calls and remove the
function.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 22
On Thu, 2019-03-14 at 10:43 -0400, Cole Robinson wrote:
> Subject: [libvirt] [PATCH 06/21] tests: qemuxml2argv: handle gic with
> vaargs
>
> This allows us to drop stub gic values from DO_TEST_FULL calls
s/vaargs/varargs/
s/gic/GIC/
Reviewed-by: Andrea Bolognani
--
Andrea Bolognani /
On Mon, Mar 18, 2019 at 04:55:13PM +0100, Peter Krempa wrote:
Use the new parser instead of virDomainDiskSourceParse.
Signed-off-by: Peter Krempa
---
src/conf/snapshot_conf.c | 38 +++---
1 file changed, 11 insertions(+), 27 deletions(-)
Reviewed-by: Ján Tomko
On Mon, Mar 18, 2019 at 04:55:12PM +0100, Peter Krempa wrote:
This is part of the effort to minimize use of virDomainDiskSourceParse.
Signed-off-by: Peter Krempa
---
tests/qemublocktest.c | 130 --
1 file changed, 61 insertions(+), 69 deletions(-)
On Thu, 2019-03-14 at 10:43 -0400, Cole Robinson wrote:
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 23 +++
> 1 file changed, 3 insertions(+), 20 deletions(-)
Reviewed-by: Andrea Bolognani
--
Andrea Bolognani / Red Hat / Virtualization
--
On Thu, 2019-03-14 at 10:43 -0400, Cole Robinson wrote:
> This is necessary before we can start adding more optional parameter
> implementations to DO_TEST_FULL
>
> Signed-off-by: Cole Robinson
> ---
> tests/qemuxml2argvtest.c | 38 +-
> 1 file changed, 25
The portid will be the UUID of the virNetworkPort object associated
with the network interface when a guest is running.
Signed-off-by: Daniel P. Berrangé
---
docs/formatdomain.html.in | 8 +++
docs/schemas/domaincommon.rng | 5 +
When starting up it is important to notify the network driver of any
NICs which are used by running guests so that it can account for any
resources they are using.
Signed-off-by: Daniel P. Berrangé
---
src/libxl/libxl_driver.c | 30 ++
src/lxc/lxc_process.c| 30
Signed-off-by: Daniel P. Berrangé
---
tools/virsh-completer.c | 50 +
tools/virsh-completer.h | 4 +
tools/virsh-network.c | 399 +++-
tools/virsh-network.h | 5 +
4 files changed, 457 insertions(+), 1 deletion(-)
diff --git
The various steps involved in reconnecting to a domain may cause updates
to the virDomainObj struct that need to be reflected in the saved status
file.
Signed-off-by: Daniel P. Berrangé
---
src/libxl/libxl_driver.c | 3 +++
src/lxc/lxc_process.c| 5 +
2 files changed, 8 insertions(+)
This initial implementation just wires up the APIs and does tracking of
the port XML definitions. It is not yet integrated into the resource
allocation logic.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 400
1 file changed, 400
Change the domain conf so invoke the new network port public APIs instead
of the network callbacks.
Signed-off-by: Daniel P. Berrangé
---
src/conf/domain_conf.c | 262
src/conf/domain_conf.h | 26
src/libvirt_private.syms| 1 -
The virNetworkObjPtr state will need to maintain a record of all
virNetworkPortDefPtr objects associated with the network. Record these
in a hash and add APIs for manipulating them.
Signed-off-by: Daniel P. Berrangé
---
src/conf/virnetworkobj.c | 303 +++
All but one of the network types supports port profiles. Rather than
duplicating the code to merge profiles 3 times, do it once and then
later report an error if used from the wrong place.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 54
Define the wire protocol for the virNetworkPort APIs and enable the
client/server RPC dispatch.
Signed-off-by: Daniel P. Berrangé
---
src/remote/remote_daemon_dispatch.c | 73
src/remote/remote_driver.c | 69
src/remote/remote_protocol.x| 124
When (un)plugging an interface into a network, the 'plugged'
and 'unplugged' operations are invoked in the hook script.
The data provided to the script contains the network XML, the
domain XML and the domain interface XML. When we strictly split the
drivers up this will no longer be possible and
Separate network port bandwidth update code from the domain driver
network callback implementation.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 115
1 file changed, 65 insertions(+), 50 deletions(-)
diff --git
The virNetDevBandwidthParse method uses the interface type to decide
whether to allow use of the "floor" parameter. Using the interface
type is not convenient as callers may not have that available, but
still wish to allow use of "floor". Switch to an explicit boolean
to control its usage.
Introduce a virNetworkPortDefPtr struct to represent the data associated
with a virtual network port. Add APIs for parsing/formatting XML docs
with the data.
Signed-off-by: Daniel P. Berrangé
---
src/conf/Makefile.inc.am | 2 +
src/conf/virnetworkportdef.c
Separate network port allocation code from the domain driver network
callback implementation.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 143 +++-
1 file changed, 77 insertions(+), 66 deletions(-)
diff --git a/src/network/bridge_driver.c
Signed-off-by: Daniel P. Berrangé
---
src/libvirt_private.syms | 1 +
src/util/virnetdevvportprofile.c | 16
src/util/virnetdevvportprofile.h | 2 ++
3 files changed, 19 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index
The networkPlugBandwidth & networkUnplugBandwidth methods currently take
a virDomainNetDefPtr. To remove the dependency on the domain config
struct, pass individual parameters instead.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 94 -
The current qemu driver code for changing bandwidth on a NIC first asks
the network driver if the change is supported, then changes the
bandwidth on the VIF, and then tells the network driver to update the
bandwidth on the bridge.
This is potentially racing if a parallel API call causes the
Convert the virDomainNetDef object into a virNetworkPortDef object
at the start of networkNotifyActualDevice. This largely decouples
the method impl from the domain object type.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 91 ++---
1 file
Signed-off-by: Daniel P. Berrangé
---
src/access/genpolkit.pl| 2 +-
src/access/viraccessdriver.h | 6
src/access/viraccessdrivernop.c| 11
src/access/viraccessdriverpolkit.c | 26 ++
src/access/viraccessdriverstack.c | 25 +
Helper APIs are needed to
- Populate basic virNetworkPortDef from virDomainNetDef
- Set a virDomainActualNetDef from virNetworkPortDef
- Populate a full virNetworkPortDef from virDomainActualNetDef
Signed-off-by: Daniel P. Berrangé
---
src/conf/domain_conf.c | 272
Separate network port deletion code from the domain driver network
callback implementation.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 91 -
1 file changed, 59 insertions(+), 32 deletions(-)
diff --git a/src/network/bridge_driver.c
Convert the virDomainNetDef object into a virNetworkPortDef object
at the start of networkReleaseActualDevice. This largely decouples
the method impl from the domain object type.
Signed-off-by: Daniel P. Berrangé
---
src/network/bridge_driver.c | 137 +++-
1 file
1 - 100 of 148 matches
Mail list logo