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

minimega: fix vm config schedule localhost #1134

Merged
merged 1 commit into from
Jul 11, 2018
Merged
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
7 changes: 6 additions & 1 deletion src/minimega/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,13 @@ func schedule(queue []*QueuedVMs, hosts []*HostStats, hostSorter hostSortBy) (ma
}
}

// perform sanity checks to simplify scheduling loop
for _, q := range queue {
// resolve `localhost` to actual hostname
if q.Schedule == Localhost {
q.Schedule = hostname
}

// ensure we can get host stats to simplify scheduling loop
if host := q.Schedule; host != "" {
// host should exist
if findHostStats(host) == nil {
Expand Down