Removal of collectd breaks LuCI

TOS 3.10
Browser Edge on WIN 10

  • added "collectd" to Uninstall in user.lua
  • ran from cli pkgupdate

INFO:Queue removal of luci-i18n-statistics-en
INFO:Queue removal of luci-app-statistics
INFO:Queue removal of collectd-mod-cpu
INFO:Queue removal of collectd-mod-memory
INFO:Queue removal of collectd-mod-load
INFO:Queue removal of collectd-mod-interface
INFO:Queue removal of rrdtool1
INFO:Queue removal of collectd-mod-network
INFO:Queue removal of collectd-mod-iwinfo
INFO:Queue removal of collectd-mod-rrdtool
INFO:Queue removal of collectd
INFO:Queue removal of librrd1
INFO:Queue removal of libltdl

after which /cgi-bin/luci displayed

/usr/lib/lua/luci/statistics/datatree.lua:16: attempt to index upvalue ‘sections’ (a nil value)
stack traceback:
/usr/lib/lua/luci/statistics/datatree.lua:16: in function ‘init
/usr/lib/lua/luci/util.lua:64: in function ‘Instance’
…/luci/controller/luci_statistics/luci_statistics.lua:107: in function ‘v’
/usr/lib/lua/luci/dispatcher.lua:563: in function ‘createtree’
/usr/lib/lua/luci/dispatcher.lua:220: in function ‘dispatch’
/usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140>

Foris was still accessible. Rebooting the box brought LuCI back.

1 Like

After removing a big luci interface package like collectd and luci-app-statistics you might need to refresh the luci interface.

Pretty sure you can’t do this from the gui in any way, but you can blow away the pages in /tmp:

/tmp/luci-indexcache
/tmp/luci-modulecache/*

If you blow some or all of those away, luci should rebuild them automatically. That’s why a reboot fixes it.

Of course, I’m not sure if it’s the same problem.