openwisp-config: instance1 s in a crash loop x
Maintainer: @pandafy, @nemesifier
Environment: mediatek/filogic, Cudy WR3000 v1, OpenWrt 23.05.5 r24106-10cc5fcd00
But likely impacting all users of package openwisp-config version 1.1.0-1
Description: Upgraded the package of openwisp-config to version 1.1.0-1 in OpenWrt 23.05.5. I couldn't connect to the controller anymore.
In logs this message appears (and controller doesn't see the client):
Instance openwisp_config::instance1 s in a crash loop 6
Also see:
https://github.com/openwisp/openwisp-config/issues/223
Hunting down the bug I discovered that /etc/init.d/openwisp_config wants to execute PROG="/usr/sbin/openwisp-config" but it does not exists, it is called PROG="/usr/sbin/openwisp_config" according to the changelog there were changes re: the - 'hyphen' vs _ 'underscore' ; maybe it just gets packaged incorrectly? Once I edited /etc/init.d/openwisp_config and changed the - 'hyphen' to a _ 'underscore' in PROG= the new agent also started to work. Easier than rolling back.
Looks like the problem is in the OpenWrt Makefile - https://github.com/openwrt/packages/blob/dd2e7105e6f0abf9b72155e2b26298ed19a92ab9/admin/openwisp-config/Makefile which needs to be updated to produce hyphens instead of underscores.
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
$(1)/usr/sbin/openwisp_config
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
$(1)/etc/init.d/openwisp_config
should maybe be
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
$(1)/usr/sbin/openwisp-config
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
$(1)/etc/init.d/openwisp-config
We'll send a fix asap.
https://github.com/openwrt/packages/pull/25186 should fix.