Found while implementing #15610.
What
playbooks/update-node.yml publishes the SLM frontend to a target node (it includes roles/_shared/tasks/build_publish_slm_frontend.yml) and maps autobot-slm-frontend to the nginx service in role_service_map, so the node it deploys to does serve that bundle. It never renders or re-renders any nginx site config.
Of the four SLM-frontend entry points, only two put the site config on the host:
| Entry point |
Publishes the bundle |
Renders the site config |
roles/slm_manager/tasks/main.yml |
yes |
yes (tasks/nginx_site.yml) |
playbooks/update-all-nodes.yml |
yes |
yes, as of #15610 |
playbooks/provision-fleet-roles.yml |
yes |
yes, for the co-located case (#3012) |
playbooks/update-node.yml |
yes |
no |
Why it matters
Any change to the served path reaches an update-node.yml target only when one of the other three plays next runs against it. #15610 is exactly such a change: the target publishes a new bundle onto current while its nginx keeps opening whatever the last provision aimed it at. The deploy reports green and the UI does not move — the silent-staleness shape #1607 and #15462 both cost time on.
The reason this is filed rather than fixed inside #15610: update-node.yml deploys to an arbitrary target node, and rendering roles/slm_manager/templates/autobot-slm.conf.j2 there needs the whole slm_manager variable set. Rendering it with defaults on a host that is not the SLM manager would write a wrong config, which is a bigger outage than the staleness it fixes. It needs its own design pass.
Acceptance criteria
Found while implementing #15610.
What
playbooks/update-node.ymlpublishes the SLM frontend to a target node (it includesroles/_shared/tasks/build_publish_slm_frontend.yml) and mapsautobot-slm-frontendto thenginxservice inrole_service_map, so the node it deploys to does serve that bundle. It never renders or re-renders any nginx site config.Of the four SLM-frontend entry points, only two put the site config on the host:
roles/slm_manager/tasks/main.ymltasks/nginx_site.yml)playbooks/update-all-nodes.ymlplaybooks/provision-fleet-roles.ymlplaybooks/update-node.ymlWhy it matters
Any change to the served path reaches an
update-node.ymltarget only when one of the other three plays next runs against it. #15610 is exactly such a change: the target publishes a new bundle ontocurrentwhile its nginx keeps opening whatever the last provision aimed it at. The deploy reports green and the UI does not move — the silent-staleness shape #1607 and #15462 both cost time on.The reason this is filed rather than fixed inside #15610:
update-node.ymldeploys to an arbitrary target node, and renderingroles/slm_manager/templates/autobot-slm.conf.j2there needs the whole slm_manager variable set. Rendering it with defaults on a host that is not the SLM manager would write a wrong config, which is a bigger outage than the staleness it fixes. It needs its own design pass.Acceptance criteria
update-node.ymltarget that servesautobot-slm-frontend, with evidence from the play, not assumptionrole_service_mapentry is corrected to say sorepo_tests/slm_frontend_atomic_publish_15610_test.py) is extended to assert whichever of the two conclusions holds, so it cannot regress silently