This function retrieves the name of the OVS bridge that the given
netdev is attached to. This separate function is necessary because OVS
set the IFLA_MASTER attribute to "ovs-system" for all netdevs that are
attached to an OVS bridge, so the standard method of retrieving the
master can't be used.
When libvirtd is restarted, it checks that each guest tap device is
still attached to the bridge device that the configuration info says
it should be connected to. If not, the tap will be disconnected from
[wherever it is] and connected to [wherever it should be].
The previous code that did this
This BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1596176
and the log message of patch 3 explain the problem.
Laine Stump (3):
util: new function virNetDevOpenvswitchInterfaceGetMaster()
util: add some debug log to virNetDevGetMaster
network: properly check for taps that are
This makes it easier to see why libvirt has decided it must re-attach
a tap device to its bridge.
Signed-off-by: Laine Stump
---
src/util/virnetdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index b250af9e2c..c20022fbc9 100644
---
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virarptable.c | 14
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virfilecache.c | 35
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope.
When a variable of type virJSONValuePtr is declared using
VIR_AUTOPTR, the
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virfcp.c | 20
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope.
When a variable of type virFileWrapperFdPtr is declared using
VIR_AUTOPTR,
The include directive for viralloc.h is added in virauthconfig.h
in a previous patch.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virauth.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virauth.c b/src/util/virauth.c
index adb093e..c6a2ce7 100644
--- a/src/util/virauth.c
+++
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/iohelper.c | 4 +---
1
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virjson.c | 49
The include directive for viralloc.h is added in virauthconfig.h
in a previous patch.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virauthconfig.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c
index 91c9c0c..3487cc2 100644
---
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virauth.c | 45
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/viridentity.c | 52
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope.
When a variable of type virBitmapPtr is declared using
VIR_AUTOPTR, the
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/vireventpoll.c | 7 ++-
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
The include directive for viralloc.h is added in virbitmap.h
in a previous patch.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virbitmap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 0cc5292..ef18dad 100644
--- a/src/util/virbitmap.c
+++
The include directive for viralloc.h is added in virjson.h
in a previous patch.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virjson.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virjson.c b/src/util/virjson.c
index 0559d40..92f3994 100644
--- a/src/util/virjson.c
+++
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/viraudit.c | 3 +--
1 file
The include directive for viralloc.h is added in virfile.h
in a previous patch.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virfile.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 378d03e..2690e2d 100644
--- a/src/util/virfile.c
+++
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virauthconfig.c | 34
Alias virString to (char *) so that the new cleanup macros
can be used for a list of strings (char **).
Signed-off-by: Sukrit Bhatnagar
---
src/util/virstring.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/virstring.h b/src/util/virstring.h
index 607ae66..ac930fd 100644
---
Add rule to ensure that there is exactly one blank space between
the type name and the asterisk when passed as the argument to the
VIR_AUTOFREE macro.
Signed-off-by: Sukrit Bhatnagar
---
cfg.mk | 9 +
1 file changed, 9 insertions(+)
diff --git a/cfg.mk b/cfg.mk
index 196d1b2..d9e90d5
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/vircommand.c | 40
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope.
When a list of strings (virString *) is declared using VIR_AUTOPTR,
the
Add rule to ensure that each variable declaration made using
a cleanup macro is in its own separate line.
Sometimes a variable might be initialized from a value returned
by a macro or a function, which may take on more than one
parameter, thereby introducing a comma, which might be mistaken
for
The include directive for viralloc.h is added in vircommand.h
in a previous patch.
Signed-off-by: Sukrit Bhatnagar
---
src/util/vircommand.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index 6dab105..8681e7b 100644
--- a/src/util/vircommand.c
Add rule to ensure that there is no semicolon at the end of
the line where a VIR_DEFINE_* cleanup macro is invoked.
Signed-off-by: Sukrit Bhatnagar
---
cfg.mk | 9 +
1 file changed, 9 insertions(+)
diff --git a/cfg.mk b/cfg.mk
index 7949fc8..d292005 100644
--- a/cfg.mk
+++ b/cfg.mk
@@
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope.
When a variable of type virCommandPtr is declared using VIR_AUTOPTR,
the
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope.
When a variable of type virAuthConfigPtr is declared using
VIR_AUTOPTR, the
This series of patches first introduces a new set of macros which help
in using GNU C's __attribute__((cleanup)) in the code.
Then a few syntax-check rules are added which help in ensuring correct
usage of the newly introduced cleanup macros.
Then the patches modify a few files in src/util to
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
A variable, which is never assigned a value in the function, might get
passed into the cleanup function which may or may not raise any errors.
To maintain the correct usage, the variable must be initialized, either
with a value or with NULL. This syntax-check rule takes care of that.
By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.
Signed-off-by: Sukrit Bhatnagar
---
src/util/virfile.c | 310
New macros are introduced which help in adding GNU C's cleanup
attribute to variable declarations. Variables declared with these
macros will have their allocated memory freed automatically when
they go out of scope.
Signed-off-by: Sukrit Bhatnagar
---
src/util/viralloc.h | 44
On 06/30/2018 04:51 PM, John Ferlan wrote:
> Although commit e3497f3f noted that the LIVE option doesn't
> matter and removed the call to virDomainDefCompatibleDevice,
> it didn't go quite far enough and change the order of the checks
> and rework the code to just handle the config change causing
On 06/30/2018 04:51 PM, John Ferlan wrote:
> v1: https://www.redhat.com/archives/libvir-list/2018-June/msg01706.html
>
> Changes since v1,
>
> - Insert patch 1 to remove the FORCE flag from the possible/allowed
> list of flags - it was only useful for live anyway
>
> - Continue to rearrange
42 matches
Mail list logo