onedriver icon indicating copy to clipboard operation
onedriver copied to clipboard

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

Open droberg opened this issue 1 year ago • 2 comments

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.

droberg avatar Mar 01 '23 15:03 droberg

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

jstaf avatar Jul 15 '23 02:07 jstaf

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

  • docker: I believe the network is created by default upon installation
  • libvirt
    • Start "Virtual Machine Manager"
    • Right click on the local "QEMU/KVM" server, should give a box with tabs
    • Click tab "Virtual Networks"
    • Set up networks. I have one network with NAT and DHCP on a subnet of 192.168 and one completely isolated network
  • Main network is either wifi or cable, I configure using network manager

OneDriver setup with one network

I use the ui tool to set it up.

  • Enable wifi or cable network, disable docker and libvirt networks
  • Connect to Office365 account
  • Test storage using e.g.
    • ls $mountpoint
    • echo "Test" >> $mountpoint/testfile.txt
  • Disable the wifi or cable network, thus leaving no networks connected
  • Try to write to a file (this should report "read only filesystem")
    • echo "Test again" >> $mountpoint/testfile.txt

Triggering the issue

  • Bring back the wifi or cable network
  • Bring back the docker and libvirt networks (I am not sure which one is causing the issue yet)
  • Reconnect to OneDrive by mounting/umounting
  • Stop the wifi or cable network
  • Test using
    • rm $mountpoint/testfile.txt

Result from the latest test is

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

droberg avatar Aug 25 '23 07:08 droberg