[PATCH 1/2] configurehood: Wait with hood file retrieval to allow deletion

Adrian Schmutzler mail at adrianschmutzler.de
Mo Mär 19 16:54:05 CET 2018


Hallo Tim,

ich glaube, du hast recht. Zumindest fällt mir kein Szenario (mehr) ein, das dem widerspricht.

Grüße

Adrian

> -----Original Message-----
> From: Tim Niemeyer [mailto:tim at tn-x.org]
> Sent: Freitag, 16. März 2018 20:04
> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; franken-
> dev at freifunk.net
> Subject: Re: [PATCH 1/2] configurehood: Wait with hood file retrieval to allow
> deletion
> 
> Moin
> 
> Am Donnerstag, den 08.03.2018, 21:24 +0100 schrieb Adrian Schmutzler:
> > If we have a pool of routers connected by LAN, but without uplink,
> > they will loose gateway connection on a serious reconfiguration.
> >
> > Then the routers should be able to delete their $hoodfilecopy before
> > it is access by other routers looking for a file.
> >
> > > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> > ---
> >  src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> > b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> > index 1b9fa2b..127ce5b 100755
> > --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> > +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> > @@ -137,7 +137,12 @@ else
> > >  				wget -T15 -t5
> "http://[fe80::1%w2sta]:2342/sectorfile" -O "$sectortmp" || wget -T15 -t5
> "http://[fe80::1%w5sta]:2342/sectorfile" -O "$sectortmp"
> > >  			fi
> > >  		else
> > > -			echo "We have a Gateway in Range, we load the
> keyxchangev2data from fe80::1"
> > > +			echo "We have a Gateway in Range, we load the
> keyxchangev2data from network or gateway"
> > +
> > > +			# We wait some time, so nodes without network
> connection can delete their $hoodfilecopy
> > > +			# -> as a consequence, all hood files in the wired
> network are from devices with gateway connection
> > > +			sleep 20;
> 
> Wir sind hier an der Stelle, wo wir ein Gateway in der Nähe haben.
> Gelöscht wird $hoodfilecopy auf einem Knoten, wenn es kein Gateway hat.
> An der Stelle hier sind wir aber per Eth verbunden -> alle haben die selben
> Gateways.
> 
> Tim
> 
> PS: Sleep ist keine Adäquate Lösung für Probleme der Nebenläufigkeit!
> 
> +
> > >  			# check eth first
> > >  			oldhood=""
> > >  			ethfile="${hoodfile}eth"
> > --
> > 2.7.4
> >



Mehr Informationen über die Mailingliste franken-dev