blue-systems / netrunner-issues-old

Todos for Netrunner Desktop Releases
0 stars 0 forks source link

[sambamounter]: wait for network wifi connection to be established before remounting shares on fresh start #5

Closed star-buck closed 6 years ago

star-buck commented 7 years ago

Is that configurable via systemd? Any ideas?

davidedmundson commented 7 years ago

We can definitely monitor the state of the network connection from any app/daemon. Should be do-able.

davidedmundson commented 7 years ago

The current code does the following:

When a network is established we try and reconnect the shares. However, it also has a try to connect on startup regardless without any checks.

I can change that, but before I do, can you explain why trying to connect without a network causes a problem? It should just do nothing, then will try again when we get a network.

star-buck commented 7 years ago

The problem is that the shares generated at first attempt do not work and leave "empty" items. Those items are shown under "Network" folder, but clicking on them does nothing, as the shares were not established properly at the time of creation.

I guess then once created while not connected, sambamounter fails to overwrite the shared connection items in the Network folder, so if I want to manually add a real share, I have to delete the failed "ghost" items first, then I can re-add the exact same share which then works.

davidedmundson commented 7 years ago

Ok that, makes sense.

I think at that point if I do the obvious fix of not connecting on startup, we'll still have the same problem if you boot up on the wrong network, then later switch to the right one?

I'll set up a samba server and try and reproduce then see if we can make it handle failing far more gracefully.

davidedmundson commented 7 years ago

Went through the code:

The folders are (currently) created when you set up the configuration, not when it tries to connect.

The folder existing doesn't stop it reconnecting if you try again on startup.

The only time it's prevented is if you've got items in your local folder where the mount is going to go and you click "Save", then it fails trying to tell you this folder is in use and doesn't connect from the KCM.

star-buck commented 7 years ago

So the resulting problem still currently is: The folders come up empty if connection is wifi and come up connected (aka linked properly to content) if connection is cable.

So the fix should be that any connection is always properly re-established after hibernation or fresh boot.

star-buck commented 7 years ago

@davidedmundson : any suggestion what we should do to get this reliably fixed?

davidedmundson commented 7 years ago

I pushed a change last week that reconnected shares whenever a network changed. Improved the behaviour for me.

I don't know of thats ended up in a package yet.

star-buck commented 7 years ago

Where did you push it? What package or version number is this supposed to land in?

davidedmundson commented 7 years ago

I pushed it here: git@git.kde.org:scratch/afiestas/samba-mounter.git

which is the address I followed from: https://launchpad.net/~blue-shell/+archive/ubuntu/samba-mounter

Though that page hasn't rebuilt anything in months, I guess that's not outdated by Neon/DCI but does that package scratch repos? There's no version numbers in the code, so I can't say.

I'll poke some people who might know sambamounter tomorrow and find out where things should be.

aleixpol commented 7 years ago

That's the wrong repository. Please use https://cgit.kde.org/samba-mounter.git/