mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Change drvier name to append version
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
70a5cb95b3
commit
cdfebc2a20
4 changed files with 8 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
|||
package chroot
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/dotcloud/docker/execdriver"
|
||||
"github.com/dotcloud/docker/mount"
|
||||
"os"
|
||||
|
@ -82,9 +83,5 @@ func (d *driver) Info(id string) execdriver.Info {
|
|||
}
|
||||
|
||||
func (d *driver) Name() string {
|
||||
return DriverName
|
||||
}
|
||||
|
||||
func (d *driver) Version() string {
|
||||
return Version
|
||||
return fmt.Sprintf("%s-%s", DriverName, Version)
|
||||
}
|
||||
|
|
|
@ -63,7 +63,6 @@ type Driver interface {
|
|||
Run(c *Process, startCallback StartCallback) (int, error) // Run executes the process and blocks until the process exits and returns the exit code
|
||||
Kill(c *Process, sig int) error
|
||||
Wait(id string) error // Wait on an out of process...process - lxc ghosts
|
||||
Version() string // Driver version number
|
||||
Name() string // Driver name
|
||||
Info(id string) Info // "temporary" hack (until we move state from core to plugins)
|
||||
}
|
||||
|
@ -89,10 +88,10 @@ type Process struct {
|
|||
Entrypoint string `json:"entrypoint"`
|
||||
Arguments []string `json:"arguments"`
|
||||
WorkingDir string `json:"working_dir"`
|
||||
ConfigPath string `json:"config_path"` // This should be able to be removed when the lxc template is moved into the driver
|
||||
ConfigPath string `json:"config_path"` // this should be able to be removed when the lxc template is moved into the driver
|
||||
Tty bool `json:"tty"`
|
||||
Network *Network `json:"network"` // if network is nil then networking is disabled
|
||||
Config []string `json:"config"`
|
||||
Config []string `json:"config"` // generic values that specific drivers can consume
|
||||
Cgroups *cgroups.Values `json:"cgroups"`
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,8 @@ func NewDriver(root string, apparmor bool) (*driver, error) {
|
|||
}
|
||||
|
||||
func (d *driver) Name() string {
|
||||
return DriverName
|
||||
version := d.version()
|
||||
return fmt.Sprintf("%s-%s", DriverName, version)
|
||||
}
|
||||
|
||||
func (d *driver) Run(c *execdriver.Process, startCallback execdriver.StartCallback) (int, error) {
|
||||
|
@ -186,7 +187,7 @@ func (d *driver) Wait(id string) error {
|
|||
}
|
||||
}
|
||||
|
||||
func (d *driver) Version() string {
|
||||
func (d *driver) version() string {
|
||||
version := ""
|
||||
if output, err := exec.Command("lxc-version").CombinedOutput(); err == nil {
|
||||
outputStr := string(output)
|
||||
|
|
|
@ -684,7 +684,7 @@ func (srv *Server) DockerInfo(job *engine.Job) engine.Status {
|
|||
v.SetBool("Debug", os.Getenv("DEBUG") != "")
|
||||
v.SetInt("NFd", utils.GetTotalUsedFds())
|
||||
v.SetInt("NGoroutines", runtime.NumGoroutine())
|
||||
v.Set("LXCVersion", srv.runtime.execDriver.Version())
|
||||
v.Set("ExecutionDriver", srv.runtime.execDriver.Name())
|
||||
v.SetInt("NEventsListener", len(srv.events))
|
||||
v.Set("KernelVersion", kernelVersion)
|
||||
v.Set("IndexServerAddress", auth.IndexServerAddress())
|
||||
|
|
Loading…
Add table
Reference in a new issue