jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.86k stars 91 forks source link

Missing network not detected when used together with libvirt and/or docker #322

Open droberg opened 1 year ago

droberg commented 1 year ago

When using Onedriver on a machine with multiple virtual networks for libvirt and docker it seems like it doesn't properly detect that the network is down. This gives a perceived hang when doing trying to read files when the main network is disconnected. As soon as the virtual networks are disconnected onedriver starts working as expected.

My network config :

> ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
3: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 
    altname enp3s0f3u1u4u4
    inet 192.168.1.50/24 brd 192.168.1.255 scope global dynamic noprefixroute eth2
       valid_lft 86332sec preferred_lft 86332sec
    inet6 ----- scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 
    inet 192.168.2.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
> route -n
0.0.0.0         192.168.1.1   0.0.0.0         UG    100    0        0 eth2
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.2.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
192.168.1.0   0.0.0.0         255.255.255.0   U     100    0        0 eth2
> cat /etc/resolv.conf
search lan
nameserver 192.168.1.1

So, my problem is that when I disable eth2 the network is not considered as down even though there are not possible routes out.

jstaf commented 12 months ago

Interesting, does onedriver print any error messages when this happens? What are the commands to reproduce this on my machine?

droberg commented 10 months ago

I'll give it a try

Operating system

I use opensuse leap 15.3, install is afaik nothing special

Multiple networks

First, to have multiple networks I have installed

OneDriver setup with one network

I use the ui tool to set it up.

Triggering the issue

Result from the latest test is

  1. Hang for some time
  2. "rm: cannot remove 'testfile2.txt': Remote I/O error"