[libvirt] [PATCH] network: drop back compat code loading actual bridge name

Daniel P. Berrangé posted 1 patch 5 years ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190404135410.20273-1-berrange@redhat.com
src/network/bridge_driver.c | 11 -----------
1 file changed, 11 deletions(-)
[libvirt] [PATCH] network: drop back compat code loading actual bridge name
Posted by Daniel P. Berrangé 5 years ago
The actual network def was updated to save the bridge name back
in 1.2.11:

  commit a3609121799d44898a3e0d0bf92b755e55e7b418
  Author: Laine Stump <laine@laine.org>
  Date:   Fri Nov 21 12:20:37 2014 -0500

    network: save bridge name in ActualNetDef when actualType==network too

The chance that someone is running libvirt < 1.2.11 and wants
todo a live upgrade to 5.3.0 without a host reboot is essentially
zero. We can thus reasonably drop the back compat code now.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/network/bridge_driver.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 6f88adf3b7..0c65c48b1a 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -4812,17 +4812,6 @@ networkNotifyActualDevice(virNetworkPtr net,
         goto error;
     }
 
-    /* if we're restarting libvirtd after an upgrade from a version
-     * that didn't save bridge name in actualNetDef for
-     * actualType==network, we need to copy it in so that it will be
-     * available in all cases
-     */
-    if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK &&
-        !iface->data.network.actual->data.bridge.brname &&
-        (VIR_STRDUP(iface->data.network.actual->data.bridge.brname,
-                    netdef->bridge) < 0))
-            goto error;
-
     /* see if we're connected to the correct bridge */
     if (netdef->bridge) {
         bool useOVS = false;
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] network: drop back compat code loading actual bridge name
Posted by Laine Stump 5 years ago
On 4/4/19 9:54 AM, Daniel P. Berrangé wrote:
> The actual network def was updated to save the bridge name back
> in 1.2.11:
>
>    commit a3609121799d44898a3e0d0bf92b755e55e7b418
>    Author: Laine Stump <laine@laine.org>
>    Date:   Fri Nov 21 12:20:37 2014 -0500
>
>      network: save bridge name in ActualNetDef when actualType==network too
>
> The chance that someone is running libvirt < 1.2.11 and wants
> todo a live upgrade to 5.3.0 without a host reboot is essentially
> zero. We can thus reasonably drop the back compat code now.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


Reviewed-by: Laine Stump <laine@laine.org>


> ---
>   src/network/bridge_driver.c | 11 -----------
>   1 file changed, 11 deletions(-)
>
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 6f88adf3b7..0c65c48b1a 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -4812,17 +4812,6 @@ networkNotifyActualDevice(virNetworkPtr net,
>           goto error;
>       }
>   
> -    /* if we're restarting libvirtd after an upgrade from a version
> -     * that didn't save bridge name in actualNetDef for
> -     * actualType==network, we need to copy it in so that it will be
> -     * available in all cases
> -     */
> -    if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK &&
> -        !iface->data.network.actual->data.bridge.brname &&
> -        (VIR_STRDUP(iface->data.network.actual->data.bridge.brname,
> -                    netdef->bridge) < 0))
> -            goto error;
> -
>       /* see if we're connected to the correct bridge */
>       if (netdef->bridge) {
>           bool useOVS = false;


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list