Skip to content

Commit 42deff8

Browse files
committed
Prevent recalling bootstrap.sh on 'systemctl restart elemental-system-agent'
Signed-off-by: David Cassany <dcassany@suse.com> (cherry picked from commit 6c4d36f)
1 parent 40bd06d commit 42deff8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

controllers/machineselector_controller.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,12 +466,7 @@ func (r *MachineInventorySelectorReconciler) newBootstrapPlan(ctx context.Contex
466466
},
467467
{
468468
CommonInstruction: applyinator.CommonInstruction{
469-
Command: "/var/lib/rancher/bootstrap.sh",
470-
// Ensure local plans will be enabled, this is required to ensure the local
471-
// plan stopping elemental-system-agent is executed
472-
Env: []string{
473-
"CATTLE_LOCAL_ENABLED=true",
474-
},
469+
Command: "bash -c '[ -f /var/lib/rancher/bootstrap_done ] || /var/lib/rancher/bootstrap.sh && touch /var/lib/rancher/bootstrap_done'",
475470
},
476471
},
477472
},

0 commit comments

Comments
 (0)