#3303·bunkerweb

[BUG] Scheduler config saver failures and manual plugin handling issues with poor observability

Author: mkf-sysangelsCreated Mar 10, 2026Updated Sep 18, 2026
Labelsbugschedulernext minor

What happened?

Config saver failures were opaque:

  • Logs only showed: Config saver failed, configuration will not work as expected...
  • No exit code, command, or save_config.py output was logged.
  • Failures happened both: -- On scheduler startup (--first-run path). -- On SIGHUP / reload and on “plugins-only” saves.

Manual external plugin kept breaking:

  • Initial import failed with sqlite3.IntegrityError: NOT NULL constraint failed: bw_settings.regex.
  • When import failed, the UI removed the plugin (“plugin not found”) and the scheduler tried to re‑sync from DB, effectively fighting the on‑disk version.
  • UI and scheduler both tried to overwrite manual plugin content based on database state instead of treating disk as source of truth.

How to reproduce?

Config saver error handling:

  • scheduler/main.py ran save_config.py with check=False and did: -- first-run path: only LOGGER.error("Config saver failed, ..."), no details. -- reload/plugins-only path: same generic message.
  • stdout/stderr from save_config.py were not captured, so the real exception (e.g. DB validation failure, bad setting) was hidden.

Manual plugin + DB schema mismatch:

  • Some malware-scan settings in plugin.json lacked a regex field while the DB schema enforced bw_settings.regex NOT NULL.
  • Database.update_external_plugins passed these settings through unmodified → insert failed.
  • When import failed: -- UI cleanup logic saw “plugin not in DB” and deleted /etc/bunkerweb/plugins/malware-scan. -- Scheduler logic also treated DB as authoritative, re-extracting plugins and overwriting manual changes.

Checksum / method handling for plugins:

  • Scheduler’s external/pro plugin sync logic did not: -- Respect method="manual" for external or Pro plugins. -- Treat /etc/bunkerweb/plugins as the source of truth in the no-version-change + manual case.
  • Result: on‑disk manual changes could be overwritten by DB content.

Configuration file(s) (yaml or .env)

yaml

Relevant log output

bash

BunkerWeb version

1.6.9-rc2

What integration are you using?

Linux

Linux distribution (if applicable)

debian 13.3

Removed private data

  • I have removed all private data from the configuration file and the logs

Code of Conduct

  • I agree to follow this project's Code of Conduct