Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neonvm-runner: run init script before anything else #1318

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions neonvm-runner/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,14 @@ func run(logger *zap.Logger) error {
}
}

// Run init script before doing anything else. It can create
// iptables rules, which we don't want to interleave with rules
// created by code in net.go
if err := runInitScript(logger, vmSpec.InitScript); err != nil {
return fmt.Errorf("failed to run init script: %w", err)
}

tg := taskgroup.NewGroup(logger)
tg.Go("init-script", func(logger *zap.Logger) error {
return runInitScript(logger, vmSpec.InitScript)
})

// create iso9660 disk with runtime options (command, args, envs, mounts)
tg.Go("iso9660-runtime", func(logger *zap.Logger) error {
Expand Down
Loading