f-41: lab: FRR après deploy.sh puis redémarrage de l'agent, base BGP par l'agent #41

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-11 23:41:49 +02:00
commit 181fc24d1c
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
10 changed files with 65 additions and 40 deletions

View file

@ -147,7 +147,7 @@ func TestRoles_ProvisioningIsOneScriptThatStopsAtTheFirstFailure(t *testing.T) {
nodes := renderRoles(t)
for name, steps := range map[string]string{
"sw1": "systemctl daemon-reload\nsystemctl enable --now lab-switch.service\n/usr/local/sbin/lab-frr\n",
"hv1": "/usr/local/sbin/lab-deploy\n/usr/local/sbin/lab-frr\n",
"hv1": "/usr/local/sbin/lab-deploy\n/usr/local/sbin/lab-frr\nsystemctl restart agent.service\n",
"hv2": "/usr/local/sbin/lab-deploy\n",
} {
cfg := user(t, nodeNamed(t, nodes, name))

View file

@ -133,6 +133,9 @@ func userData(p *topology.Plan, n topology.NodePlan, o Options) ([]byte, error)
writeFile{Path: FRRScript, Permissions: "0755", Content: frrScript(n)},
)
steps = append(steps, FRRScript)
if n.Role == topology.RoleHypervisor {
steps = append(steps, "systemctl restart agent.service")
}
}
if len(steps) > 0 {
cfg.WriteFiles = append(cfg.WriteFiles,