Merge pull request #2186 from hashicorp/f-driver-cleanup

Add Cleanup method to Driver interface
This commit is contained in:
Michael Schurter
2017-01-20 13:02:14 -08:00
committed by GitHub
23 changed files with 623 additions and 137 deletions

View File

@@ -167,8 +167,8 @@ func (d *JavaDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool,
return true, nil
}
func (d *JavaDriver) Prestart(ctx *ExecContext, task *structs.Task) error {
return nil
func (d *JavaDriver) Prestart(*ExecContext, *structs.Task) (*CreatedResources, error) {
return nil, nil
}
func NewJavaDriverConfig(task *structs.Task, env *env.TaskEnvironment) (*JavaDriverConfig, error) {
@@ -293,6 +293,8 @@ func (d *JavaDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle,
return h, nil
}
func (d *JavaDriver) Cleanup(*ExecContext, *CreatedResources) error { return nil }
// cgroupsMounted returns true if the cgroups are mounted on a system otherwise
// returns false
func (d *JavaDriver) cgroupsMounted(node *structs.Node) bool {