Commit graph

39 commits

Author SHA1 Message Date
Sebastian Reuße
f66a343113 Support monitoring systemd-networkd connectivity. 2015-06-02 12:51:17 -04:00
Joey Hess
8f010bb55b also drop old dbus compat 2015-04-22 16:23:41 -04:00
Joey Hess
afc5153157 update my email address and homepage url 2015-01-21 12:50:09 -04:00
Joey Hess
c9a3e80d32 fixed all remaining build warnings on Windows 2014-12-29 17:30:20 -04:00
Joey Hess
da1d9d500d fix warning when building w/o dbus 2014-12-29 16:37:41 -04:00
Joey Hess
ec11e0b89a fix build warning 2014-08-08 13:55:09 -04:00
Joey Hess
f5b1c3841e avoid build warning from new dbus 2014-04-26 19:24:56 -04:00
Joey Hess
ff192ace2f detect wicd network disconnection events 2014-04-12 18:36:48 -04:00
Joey Hess
bb44df206d NetWatcher: detect when networkmanager has lost network connection
This is a better approach to finding both when NM has lost a network
connection, and when a new network connection is made by NM.

Tested with network-manager 0.9.8.8.

This commit was sponsored by Cedric Staub.
2014-04-12 17:58:19 -04:00
Joey Hess
a33b30d0c4 remotedaemon: When network connection is lost, close all cached ssh connections.
This commit was sponsored by Cedric Staub.
2014-04-12 16:32:59 -04:00
Joey Hess
fac7bca05b assistant: Now detects immediately when other repositories push changes to
a ssh remote, and pulls.

XMPP is no longer needed in this configuration!

Requires the remote server have git-annex-shell with notifychanges support.

(untested)

This commit was sponsored by Geog Wechslberger.
2014-04-08 15:23:50 -04:00
Joey Hess
e1cf4e5e4e only warn about no dbus when building on linux 2014-02-25 14:49:27 -04:00
Joey Hess
e2f17e9da3 upgrade alerts
The webapp will check twice a day, when the network is connected, to see if
it can download a distributon upgrade file. If a newer version is found,
display an upgrade alert.

This will need the autobuilders to set UPGRADE_LOCATION to the url
it can be downloaded from when building git-annex. Only builds with that
set need automatic upgrade alerts.

Currently, the upgrade page just requests the user manually download
and upgrade it. But, all the info is provided to do automated upgrades
in the future.

Note that urls used will need to all be https.

This commit was sponsored by Dirk Kraft.
2013-11-21 17:49:56 -04:00
Joey Hess
8587485994 clarify notifyNetMessagerRestart 2013-08-24 13:49:04 -04:00
Joey Hess
97f3aecb17 assistant: Fix NetWatcher to not sync with remotes that have remote.<name>.annex-sync set to false.
This affected both the hourly NetWatcherFallback thread and the syncing
when network connection is detected.

It was a reversion of sorts, introduced in
8861e270be, when annex-ignore was changed to
not control git syncing. I forgot to make it check annex-sync at that
point.
2013-07-26 16:54:20 -04:00
Joey Hess
8861e270be sync, assistant: Sync with remotes that have annex-ignore set
This is so git remotes on servers without git-annex installed can be used
to keep clients' git repos in sync.

This is a behavior change, but since annex-sync can be set to disable
syncing with a remote, I think it's acceptable.
2013-04-22 14:57:09 -04:00
Joey Hess
746ffa773a assistant: Avoid syncing with annex-ignored remotes when reconnecting to the network, or connecting a drive. 2013-03-17 15:59:03 -04:00
Joey Hess
76ddf9b6d3 webapp: Now allows restarting any threads that crash. 2013-01-26 17:09:33 +11:00
Joey Hess
b8585a9452 NetManager is only currently used with dbus 2012-11-07 14:56:32 -04:00
Joey Hess
a1228e27ed refactor XMPP client 2012-11-03 14:16:17 -04:00
Joey Hess
93ffd47d76 finished pushing Assistant monad into all relevant files
All temporary and old functions are removed.
2012-10-30 17:14:51 -04:00
Joey Hess
87ba4f8677 split and lift Assistant.Pushes 2012-10-29 17:52:43 -04:00
Joey Hess
5d57b28a34 lifted Assistant.Sync into Assistant monad
lots of nice cleanups
2012-10-29 16:22:14 -04:00
Joey Hess
4dbdc2b666 Assistant monad, stage 2.5
Converted several threads to run in the monad.

Added a lot of useful combinators for working with the monad.

Now the monad includes the name of the thread.

Some debugging messages are disabled pending converting other threads.
2012-10-29 02:21:04 -04:00
Joey Hess
2dc40ecbd1 reconnect XMPP when NetWatcher notices a change 2012-10-27 00:42:14 -04:00
Joey Hess
d1e5f2d596 Merge branch 'master' into xmpp
Conflicts:
	Assistant/Threads/NetWatcher.hs
2012-10-26 19:42:24 -04:00
Joey Hess
8e4620a6c7 NetWatcher: When dbus connection is lost, try to reconnect.
MountWatcher can't do this, because it uses the session dbus,
and won't have access to the new DBUS_SESSION_BUS_ADDRESS if a new session
is started.

Bumped dbus library version, FD leak in it is fixed.
2012-10-26 19:38:27 -04:00
Joey Hess
0b1cf3a766 Merge branch 'master' into xmpp
Conflicts:
	Assistant/Threads/MountWatcher.hs
	Assistant/Threads/NetWatcher.hs
2012-10-26 00:10:41 -04:00
Joey Hess
ef7b53e784 improved dbus error handling
Now when the dbus connection is dropped, it'll fall back to polling.

I could make it try to reconnect, but there's a FD leak in the dbus
library, so not yet.
2012-10-26 00:02:03 -04:00
Joey Hess
ae8a3ab31e added push notifier thread, currently a no-op
Hooked up everything that needs to notify on pushes. Note that
syncNewRemote does not notify. This is probably ok, and I'd need to thread
more state through to make it do so.

This is only set up to support a single push notification method; I didn't
use a NotificationBroadcaster. Partly because I don't yet know what info
about pushes needs to be communicated, so my data types are only
preliminary.
2012-10-24 13:38:28 -04:00
Joey Hess
74a6e8ff60 avoid some warnings when built w/o dbus 2012-09-29 16:09:07 -04:00
Joey Hess
df337bb63b hlint 2012-09-13 00:57:52 -04:00
Joey Hess
a00f1d26bc display errors when any named thread crashes 2012-09-06 14:56:04 -04:00
Joey Hess
8a796cfa64 improve syncing support for special remotes
Avoid trying to git push/pull to special remotes, but still do transfer
scans of them, after git pull from any other remotes, so we know about
any values that have been placed on them.
2012-09-04 15:56:37 -04:00
Joey Hess
78d3add86b tweak field name 2012-08-26 14:26:43 -04:00
Joey Hess
4a4f8064ae make the NetWatcher always rescan networked remotes every 30 minutes
There are multiple reasons to do this:

* The local network may be up solid, but a route to a networked remote
  is having trouble. Any transfers to it that fail should be retried.
* Someone might have wicd running, but like to bring up new networks
  by hand too. This way, it'll eventually notice them.
2012-08-23 16:13:43 -04:00
Joey Hess
546ba8b7e1 better name 2012-08-22 15:37:26 -04:00
Joey Hess
68659f4998 refactor 2012-08-22 14:32:17 -04:00
Joey Hess
5a68acb521 add NetWatcher thread
This deals with interruptions in network connectevity, by listening
for a new network interface coming up (using dbus to see when
network-manager or wicd do it), and forcing a rescan of
2012-08-21 19:58:53 -04:00