Skip to content

Commit e8f9155

Browse files
committed
wait for cloud-init
1 parent b8d229c commit e8f9155

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

v1/image.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ func ValidateInstanceImage(ctx context.Context, instance Instance, privateKey st
4040
}
4141
}()
4242

43+
// If cloud-init is present, wait until it has finished (e.g. UFW/runcmd done).
44+
_, _, _ = sshClient.RunCommand(ctx, "cloud-init status --wait 2>/dev/null || true")
45+
4346
arch, err := validateArchitecture(ctx, sshClient)
4447
if err != nil {
4548
return err

0 commit comments

Comments
 (0)