func runExtBackoff(capture bool, backoff wait.Backoff, command string, args ...string) string {
	var output string
	err := wait.ExponentialBackoff(backoff, func() (bool, error) {
		if out, e := runImpl(capture, command, args...); e != nil {
			glog.Warningf("%s failed: %v; retrying...", command, e)
			return false, nil
		} else if capture {
			output = strings.TrimSpace(string(out))
		}
		return true, nil
	})
	if err != nil {
		glog.Fatalf("%s: %s", command, err)
	}
	return output
}
runExtBackoff is an extension to runExt that supports configuring retries/duration/backoff.
package utils
import (
	"bytes"
	"os"
	"os/exec"
	"strings"
	"time"
	"github.com/golang/glog"
	"k8s.io/apimachinery/pkg/util/wait"
)
func runImpl(capture bool, command string, args ...string) ([]byte, error) {
	glog.Infof("Running: %s %s\n", command, strings.Join(args, " "))
	cmd := exec.Command(command, args...)
	cmd.Stderr = os.Stderr
	var stdout bytes.Buffer
	if !capture {
		cmd.Stdout = os.Stdout
	} else {
		cmd.Stdout = &stdout
	}
	err := cmd.Run()
	if err != nil {
		return nil, err
	}
	if capture {
		return stdout.Bytes(), nil
	}
	return []byte{}, nil
}