--- .../usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables
diff --git a/package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables b/package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables new file mode 100755 index 0000000..e931a0e --- /dev/null +++ b/package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables @@ -0,0 +1,6 @@ +#!/bin/sh + +. /lib/gluon/autoupdater/lib.sh + +/etc/init.d/fastd restart +wifi
On 07/19/2016 12:36 AM, Jan-Tarek Butt wrote:
.../usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables
diff --git a/package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables b/package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables new file mode 100755 index 0000000..e931a0e --- /dev/null +++ b/package/gluon-autoupdater/files/usr/lib/autoupdater/upgrade.d/10drop-batman-adv-routing-tables @@ -0,0 +1,6 @@ +#!/bin/sh
+. /lib/gluon/autoupdater/lib.sh
+/etc/init.d/fastd restart +wifi
Thanks, but I see various issues with this patch; I think I'll apply a different version after a few tests.
* You should really stop everything and certainly not restart anything (restarting should happen in the abort.d hook) * fastd and wifi is not enough, there may be other mesh interfaces * This should go into gluon-mesh-batman-adv-core, not gluon-autoupdater * You don't use anything from /lib/gluon/autoupdater/lib.sh, so you should not source it
I'll have to check how the Lua process reacts to "broken pipe" situations (I'm not sure if it ignores SIGPIPE by default), so running the autoupdater manually won't be interrupted when the SSH connection fails.
-- NeoRaider
--- package/gluon-mesh-batman-adv-core/Makefile | 1 + .../files/usr/lib/autoupdater/abort.d/10start-network | 5 +++++ .../files/usr/lib/autoupdater/upgrade.d/10stop-network | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network
diff --git a/package/gluon-mesh-batman-adv-core/Makefile b/package/gluon-mesh-batman-adv-core/Makefile index ec84534..bd6ab49 100644 --- a/package/gluon-mesh-batman-adv-core/Makefile +++ b/package/gluon-mesh-batman-adv-core/Makefile @@ -27,6 +27,7 @@ define Build/Compile endef
define Package/gluon-mesh-batman-adv-core/install + $(CP) ./files/* $(1)/ $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/ $(INSTALL_DIR) $(1)/lib/gluon/respondd $(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/mesh-batman-adv-core.so diff --git a/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network new file mode 100755 index 0000000..9e8429e --- /dev/null +++ b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network @@ -0,0 +1,5 @@ +#!/bin/sh + +. /lib/gluon/autoupdater/lib.sh + +start_enabled network diff --git a/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network new file mode 100755 index 0000000..e6fd2b2 --- /dev/null +++ b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network @@ -0,0 +1,6 @@ +#!/bin/sh + +. /lib/gluon/autoupdater/lib.sh + +stop network +ip link del bat0
On 07/19/2016 02:53 AM, Jan-Tarek Butt wrote:
package/gluon-mesh-batman-adv-core/Makefile | 1 + .../files/usr/lib/autoupdater/abort.d/10start-network | 5 +++++ .../files/usr/lib/autoupdater/upgrade.d/10stop-network | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network
Thanks, I've also applied this (with a few adjustments).
I'd like this patch to get some test coverage in the master before backporting it to v2016.1.x.
-- NeoRaider
diff --git a/package/gluon-mesh-batman-adv-core/Makefile b/package/gluon-mesh-batman-adv-core/Makefile index ec84534..bd6ab49 100644 --- a/package/gluon-mesh-batman-adv-core/Makefile +++ b/package/gluon-mesh-batman-adv-core/Makefile @@ -27,6 +27,7 @@ define Build/Compile endef define Package/gluon-mesh-batman-adv-core/install
- $(CP) ./files/* $(1)/ $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/ $(INSTALL_DIR) $(1)/lib/gluon/respondd $(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/mesh-batman-adv-core.so
diff --git a/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network new file mode 100755 index 0000000..9e8429e --- /dev/null +++ b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network @@ -0,0 +1,5 @@ +#!/bin/sh
+. /lib/gluon/autoupdater/lib.sh
+start_enabled network diff --git a/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network new file mode 100755 index 0000000..e6fd2b2 --- /dev/null +++ b/package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network @@ -0,0 +1,6 @@ +#!/bin/sh
+. /lib/gluon/autoupdater/lib.sh
+stop network +ip link del bat0
On Tue, Jul 19, 2016 at 04:14:49AM +0200, Matthias Schiffer wrote:
On 07/19/2016 02:53 AM, Jan-Tarek Butt wrote:
package/gluon-mesh-batman-adv-core/Makefile | 1 + .../files/usr/lib/autoupdater/abort.d/10start-network | 5 +++++ .../files/usr/lib/autoupdater/upgrade.d/10stop-network | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network
Thanks, I've also applied this (with a few adjustments).
I'd like this patch to get some test coverage in the master before backporting it to v2016.1.x.
-- NeoRaider
I'm a little worried with this, in conjunction with this:
https://www.open-mesh.org/issues/228
Even though this issue got closed, no one actually verified it yet.
A couple of years ago I was able to trigger this bug easily by quickly adding+removing interfaces in batman-adv on some x86 multicore machine. Someone should check that this isn't happening anymore.
(These were three patches I had started on to try to fix this bug:
https://patchwork.open-mesh.org/patch/2798/ https://patchwork.open-mesh.org/patch/2812/ https://patchwork.open-mesh.org/patch/2786/
Could refresh/resubmit these ones if issue #228 still happens)
Cheers, Linus
On 07/19/2016 04:43 AM, Linus Lüssing wrote:
On Tue, Jul 19, 2016 at 04:14:49AM +0200, Matthias Schiffer wrote:
On 07/19/2016 02:53 AM, Jan-Tarek Butt wrote:
package/gluon-mesh-batman-adv-core/Makefile | 1 + .../files/usr/lib/autoupdater/abort.d/10start-network | 5 +++++ .../files/usr/lib/autoupdater/upgrade.d/10stop-network | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/abort.d/10start-network create mode 100755 package/gluon-mesh-batman-adv-core/files/usr/lib/autoupdater/upgrade.d/10stop-network
Thanks, I've also applied this (with a few adjustments).
I'd like this patch to get some test coverage in the master before backporting it to v2016.1.x.
-- NeoRaider
I'm a little worried with this, in conjunction with this:
https://www.open-mesh.org/issues/228
Even though this issue got closed, no one actually verified it yet.
A couple of years ago I was able to trigger this bug easily by quickly adding+removing interfaces in batman-adv on some x86 multicore machine. Someone should check that this isn't happening anymore.
(These were three patches I had started on to try to fix this bug:
https://patchwork.open-mesh.org/patch/2798/ https://patchwork.open-mesh.org/patch/2812/ https://patchwork.open-mesh.org/patch/2786/
Could refresh/resubmit these ones if issue #228 still happens)
Cheers, Linus
I haven't seen any such crashed in a long time, and https://www.open-mesh.org/issues/228 is only a warning. In any case, the crash would occur before the actual upgrade and not during. Sometimes crashing before the upgrade is much better than sometimes crashing while writing the flash :)
-- NeoRaider