Enforce a reboot

My context maas + juju , and deploying a big bundle

Can we enforce a reboot step , just after juju has deployed his agent , but before running the charm ?

One solution is :
create model
create all machines , via a loop juju add-machine
reboot all machines , with a loop juju ssh
and deploy the bundle

Do i have another way to do this ?

Is there a particular reason why you need a reboot at exactly that point? That seems like it wouldn’t be really necessary. MAAS reboots the machine after it’s installed, but if you are installing from infrequently-updated images and want to run updates and reboot afterwards, then doing that with custom cloud-init metadata at the end of the MAAS install (i.e. before model is created, machines are added, and juju agent is installed) would make more sense to me.

Another alternative would be to use a base charm which reboots, and deploy it to the machines before the bundle. I’ve done something along those lines (but you’d need to customise it for your requirements) at https://github.com/paulgear/charm-unattended / https://jujucharms.com/u/paulgear/unattended/.

yes i have a particular reason …
currently a update for snapd
is in update .
see my comment on this bug