mirror of https://github.com/docker/docs.git
Default storage driver to "" and let provisioner choose default
The storage driver will be "" by default an the provisioner must choose their default provisioner. If the user chosen storage driver is not supported the provisioner should return an error. Signed-off-by: Darren Shepherd <darren@rancher.com>
This commit is contained in:
parent
e4b6ff1ae9
commit
43b5786001
|
|
@ -188,7 +188,6 @@ var sharedCreateFlags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "engine-storage-driver",
|
Name: "engine-storage-driver",
|
||||||
Usage: "Specify a storage driver to use with the engine",
|
Usage: "Specify a storage driver to use with the engine",
|
||||||
Value: "aufs",
|
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "swarm",
|
Name: "swarm",
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,10 @@ func (provisioner *Boot2DockerProvisioner) Provision(swarmOptions swarm.SwarmOpt
|
||||||
provisioner.AuthOptions = authOptions
|
provisioner.AuthOptions = authOptions
|
||||||
provisioner.EngineOptions = engineOptions
|
provisioner.EngineOptions = engineOptions
|
||||||
|
|
||||||
|
if provisioner.EngineOptions.StorageDriver == "" {
|
||||||
|
provisioner.EngineOptions.StorageDriver = "aufs"
|
||||||
|
}
|
||||||
|
|
||||||
if err := provisioner.SetHostname(provisioner.Driver.GetMachineName()); err != nil {
|
if err := provisioner.SetHostname(provisioner.Driver.GetMachineName()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,11 @@ func (provisioner *UbuntuProvisioner) Provision(swarmOptions swarm.SwarmOptions,
|
||||||
provisioner.SwarmOptions = swarmOptions
|
provisioner.SwarmOptions = swarmOptions
|
||||||
provisioner.AuthOptions = authOptions
|
provisioner.AuthOptions = authOptions
|
||||||
provisioner.EngineOptions = engineOptions
|
provisioner.EngineOptions = engineOptions
|
||||||
|
|
||||||
|
if provisioner.EngineOptions.StorageDriver == "" {
|
||||||
|
provisioner.EngineOptions.StorageDriver = "aufs"
|
||||||
|
}
|
||||||
|
|
||||||
if err := provisioner.SetHostname(provisioner.Driver.GetMachineName()); err != nil {
|
if err := provisioner.SetHostname(provisioner.Driver.GetMachineName()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -307,6 +307,11 @@ buildMachineWithOldIsoCheckUpgrade() {
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "$DRIVER: create with no storage driver" {
|
||||||
|
run machine create -d $DRIVER --engine-storage-driver "" $NAME
|
||||||
|
[ "$status" -eq 0 ]
|
||||||
|
}
|
||||||
|
|
||||||
@test "$DRIVER: create with custom disk, cpu count and memory size flags" {
|
@test "$DRIVER: create with custom disk, cpu count and memory size flags" {
|
||||||
run machine create -d $DRIVER --virtualbox-cpu-count $CUSTOM_CPUCOUNT --virtualbox-disk-size $CUSTOM_DISKSIZE --virtualbox-memory $CUSTOM_MEMSIZE $NAME
|
run machine create -d $DRIVER --virtualbox-cpu-count $CUSTOM_CPUCOUNT --virtualbox-disk-size $CUSTOM_DISKSIZE --virtualbox-memory $CUSTOM_MEMSIZE $NAME
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue