Skip to content

Commit

Permalink
Merge pull request #656 from hashicorp/b-qemu-bugs
Browse files Browse the repository at this point in the history
Qemu driver uses BasicExecutor
  • Loading branch information
dadgar committed Jan 7, 2016
2 parents 012db31 + 09a0f40 commit 54c36c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/driver/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ func (d *QemuDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle,
}

// Setup the command
cmd := executor.Command(args[0], args[1:]...)
cmd := executor.NewBasicExecutor()
executor.SetCommand(cmd, args[0], args[1:])
if err := cmd.Limit(task.Resources); err != nil {
return nil, fmt.Errorf("failed to constrain resources: %s", err)
}
Expand Down Expand Up @@ -224,8 +225,8 @@ func (d *QemuDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, erro
}

// Find the process
cmd, err := executor.OpenId(id.ExecutorId)
if err != nil {
cmd := executor.NewBasicExecutor()
if err := cmd.Open(id.ExecutorId); err != nil {
return nil, fmt.Errorf("failed to open ID %v: %v", id.ExecutorId, err)
}

Expand Down

0 comments on commit 54c36c2

Please sign in to comment.