Skip to content

bug(compose): the SLM shares a Postgres container with the main app, so its outage stops SLM login #20639

Open

Description

@mrveiss

Problem

Maintainer decision: on Docker compose the SLM gets its own Postgres container. Today autobot_slm, slm_users and autobot_users share autobot-postgres, so when it is down, SLM login fails too. Found on #19406.

Design

  • A new autobot-slm-postgres container and slm_postgres_data volume hold autobot_slm and slm_users. autobot_users stays on autobot-postgres.
  • A one-shot step runs before the SLM. On an existing install it copies the two databases across, once, and leaves the old copies in place. The SLM waits for it, so it can never start on an empty database while the old data exists.
  • The SLM no longer depends on autobot-postgres to start.

Acceptance criteria

  • The SLM starts and logs in with autobot-postgres stopped (test, then a real compose stack).
  • A fresh install creates both containers with the right databases (smoke job).
  • An existing install's SLM data is in the new container after the move, and the old copies are untouched (test).
  • A failed copy stops the SLM from starting and says why, and a rerun completes it (test).
  • The copy runs once; a later start needs nothing from autobot-postgres (test).
  • Deleting the old copies is only proposed, through the review queue (Umbrella: SLM Data hygiene page — detect and safely clean up orphaned data across services #17038).
  • Host: an existing compose stack moved, with the output pasted here.

Activity

  1. mrveiss commented on Nov 2, 2026

    @mrveiss
    OwnerAuthor

    #20641 landed in merge train #20692 (58cbf98). Ticked, each against repo_tests/slm_postgres_copy_20639_test.py on main: test_an_existing_install_is_copied_and_the_originals_stay, test_old_data_it_cannot_reach_stops_the_slm_and_says_why with test_a_rerun_after_a_partial_copy_completes_it, and test_after_the_copy_the_main_postgres_can_be_down.

    Still open: the SLM with autobot-postgres stopped on a real compose stack and the fresh install (docker-smoke-test.yml covers it but I haven't read its result), the deletion proposal, and the host move. Docker isn't available to me here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions