Skip to content

Co-located SLM Manager: nginx duplicate upstream autobot_backend blocks Phase 4c (frontend site not disabled before nginx -t) #9933

Closed

Description

@mrveiss

Summary

On a co-located SLM Manager, nginx -t fails during Phase 4c with:

nginx: [emerg] duplicate upstream "autobot_backend" in /etc/nginx/sites-enabled/autobot-slm:6

This blocks the SLM-wizard provision (the "SLM Nginx Co-location Update" phase) and the host is dropped, so AI Stack / NPU / TTS / LLM / Browser phases run as empty plays.

Root cause — phase ordering

Two enabled site files both declare upstream autobot_backend:

nginx.conf does include sites-enabled/*, so both load → duplicate.

The frontend role already has a "Disable standalone nginx when co-located (#2829)" task gated on slm_colocated_frontend, but that flag is only set later, in the slm_manager role / Phase 4c (provision-fleet-roles.yml L427-448). When the frontend role runs in Phase 4b the flag is still false, so it enables autobot-frontend and never removes it. Phase 4c re-renders autobot-slm and runs nginx -t without first removing the now-conflicting autobot-frontend symlink → emerg.

Fix

In playbooks/provision-fleet-roles.yml Phase 4c, before SLM | Test nginx config after co-location update (L492), remove /etc/nginx/sites-enabled/autobot-frontend when _is_slm_frontend_colocated is true, and include that removal in the nginx test/reload trigger conditions.

Acceptance

  • Co-located SLM Manager passes nginx -t on first provision
  • Only one upstream autobot_backend is loaded (autobot-slm)
  • Idempotent; non-co-located frontend hosts keep their standalone site

Activity

  1. mrveiss commented on Jun 11, 2026

    @mrveiss
    OwnerAuthor

    Fixed in PR #9935 (squash-merged to Dev_new_gui). Verified: ansible-playbook --syntax-check provision-fleet-roles.yml exit 0; co-location removal task placed before nginx -t; backend unit renders LimitNOFILE=65536. Part of umbrella #9919. (Closing manually — merge targeted non-default branch.)

  2. mrveiss commented on Jun 11, 2026

    @mrveiss
    OwnerAuthor

    Solved by commit 19a51ad48fb43acbf1c006a7bca8731ad7eb7b6a (squash merge of PR #9935 into Dev_new_gui).

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions