Skip to content

bug: gce-start-hub.sh --full overwrites settings.yaml, destroying plugin config #475

Description

@zeroasterisk

Problem

The GCE deploy script (scripts/starter-hub/gce-start-hub.sh) generates a minimal settings.yaml containing only schema_version, default_runtime, server.mode, and telemetry config. On --full deploys, it unconditionally overwrites the existing file:

sudo mv /tmp/scion-settings.yaml /home/scion/.scion/settings.yaml

This silently destroys any hand-configured sections, including:

  • server.message_broker (enables the message broker)
  • server.plugins.broker.telegram (bot token, webhook config, db path)
  • server.plugins.broker.discord (or any other broker plugin config)

The result is that every --full deploy breaks all configured broker plugins. The hub starts without them, and there's no warning or error — the config is simply gone.

Impact

Discovered during a Telegram plugin debugging session. The plugin had been configured and working, but after hub updates the entire plugin config was wiped. Rebuilding required SSH access to the VM to manually re-add the config.

Expected Behavior

The deploy script should preserve existing plugin and message broker configuration when updating settings.yaml. New deployments (or --reset-db) can start fresh, but routine updates should merge, not replace.

Fix

A patch has been prepared that:

  1. Detects an existing settings.yaml and merges using Python's yaml library, preserving server.plugins, server.message_broker, and top-level plugins sections
  2. Falls back to overwrite only if the merge fails or --reset-db is used

Related: #147 (admin settings lost on K8s pod restart — same category of problem, different deployment target)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions