Skip to content

Commit b6718eb

Browse files
authored
fix(BRE2-662): Ensure ufw is installed during nebius cloudinit (#88)
* fix(BRE2-662): Ensure ufw is installed during nebius cloudinit * wait for cloud-init
1 parent 862f8b2 commit b6718eb

2 files changed

Lines changed: 7 additions & 1 deletion

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

v1/providers/nebius/instance.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,10 @@ func (c *NebiusClient) cleanupOrphanedBootDisks(ctx context.Context, testID stri
17481748
// This is inspired by Shadeform's LaunchConfiguration approach but uses cloud-init instead of base64 scripts
17491749
func generateCloudInitUserData(publicKey string, firewallRules v1.FirewallRules) string {
17501750
// Start with cloud-init header
1751-
script := "#cloud-config\n"
1751+
script := `#cloud-config
1752+
packages:
1753+
- ufw
1754+
`
17521755

17531756
// Add SSH key configuration if provided
17541757
if publicKey != "" {

0 commit comments

Comments
 (0)