Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Check runtime specific binary #479

Merged
merged 1 commit into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion pkg/constants/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var BinaryDependencies = [...]string{
"e2fsck",
"resize2fs",
"strings",
"docker",
"dmsetup",
"ssh",
"git",
Expand Down
8 changes: 8 additions & 0 deletions pkg/preflight/checkers/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,18 @@ func StartCmdChecks(vm *api.VM, ignoredPreflightErrors sets.String) error {
checks = append(checks, ExistingFileChecker{filePath: dependency})
}
}

checks = append(checks, providers.Runtime.PreflightChecker())
for _, port := range vm.Spec.Network.Ports {
checks = append(checks, PortOpenChecker{port: port.HostPort})
}

// Binary name of the runtime is just the runtime name in string, "docker" or "containerd"
// So it is OK for us to check only one of them, as people may installing only containerd but not docker
runtimeBinaryName := providers.RuntimeName.String()
checks = append(checks, BinInPathChecker{bin: runtimeBinaryName})

// Check common binaries
for _, dependency := range constants.BinaryDependencies {
checks = append(checks, BinInPathChecker{bin: dependency})
}
Expand Down