We skip VE IP destruion in shutdown hook, if NFS is enabled in CT (to allow
NFS mounts to disappear.
Thus we have to destroy it with venet device.

https://jira.sw.ru/browse/PSBM-75120

Signed-off-by: Stanislav Kinsburskiy <skinsbur...@virtuozzo.com>
---
 drivers/net/venetdev.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index 7a546cc..fad232b 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -759,9 +759,12 @@ static void venet_dellink(struct net_device *dev, struct 
list_head *head)
        struct ve_struct *env = dev->nd_net->owner_ve;
 
        /* We check ve_netns to avoid races with veip SHUTDOWN hook, called from
-        * ve_exit_ns()
+        * ve_exit_ns().
+        * Also, in veip SHUTDOWN hook we skip veip destructionif, if container
+        * has VE_FEATURE_NFS enabled. Thus here we have to destroy veip in
+        * this case.
         */
-       if (env->ve_netns)
+       if (env->ve_netns || (env->features & VE_FEATURE_NFS))
                veip_shutdown(env);
 
        env->_venet_dev = NULL;

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to