Rename virt driver from 'docker' to 'zun'

The rationals are as following:
* Make it clear that the in-tree virt driver is not the same as the
  nova-docker driver
* Justify that Zun is going to support additional runtime
* Avoid name collision with nova-docker on packaging.

Change-Id: I08f9cc0100837f62c57e2e77cd7f6cd727b91b69
Closes-Bug: #1652387
This commit is contained in:
Hongbin Lu 2016-12-23 15:46:59 -06:00
parent 527a718814
commit 4d16326bb9
9 changed files with 9 additions and 8 deletions

View File

@ -27,7 +27,7 @@ NOVA_CONF=${NOVA_CONF:-NOVA_CONF_DIR/nova.conf}
# configure_nova_docker - Set config files, create data dirs, etc # configure_nova_docker - Set config files, create data dirs, etc
function configure_nova_docker { function configure_nova_docker {
iniset $NOVA_CONF DEFAULT compute_driver docker.DockerDriver iniset $NOVA_CONF DEFAULT compute_driver zun.DockerDriver
# CentOS/RedHat distros don't start the services just after the package # CentOS/RedHat distros don't start the services just after the package
# is installed if it is not explicitily set. So the script fails on # is installed if it is not explicitily set. So the script fails on

View File

@ -3,5 +3,5 @@
ZUN_DRIVER=${ZUN_DRIVER:-docker} ZUN_DRIVER=${ZUN_DRIVER:-docker}
if [[ ${ZUN_DRIVER} == "nova-docker" ]]; then if [[ ${ZUN_DRIVER} == "nova-docker" ]]; then
export VIRT_DRIVER=docker export VIRT_DRIVER=zun
fi fi

View File

@ -17,6 +17,6 @@
:mod:`docker` -- Nova support for Docker Hypervisor to run Linux containers :mod:`docker` -- Nova support for Docker Hypervisor to run Linux containers
=========================================================================== ===========================================================================
""" """
from nova.virt.docker import driver from nova.virt.zun import driver
DockerDriver = driver.DockerDriver DockerDriver = driver.DockerDriver

View File

@ -43,14 +43,15 @@ from nova.i18n import _LW
from nova import objects from nova import objects
from nova.objects import fields from nova.objects import fields
from nova import utils from nova import utils
from nova.virt.docker import client as docker_client
from nova.virt.docker import hostinfo
from nova.virt.docker import network
from nova.virt import driver from nova.virt import driver
from nova.virt import firewall from nova.virt import firewall
from nova.virt import hardware from nova.virt import hardware
from nova.virt import hostutils from nova.virt import hostutils
from nova.virt import images from nova.virt import images
from nova.virt.zun import client as docker_client
from nova.virt.zun import hostinfo
from nova.virt.zun import network
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('instances_path', 'nova.compute.manager') CONF.import_opt('instances_path', 'nova.compute.manager')
@ -76,7 +77,7 @@ docker_opts = [
help='Location of TLS private key file for ' help='Location of TLS private key file for '
'securing docker api requests (tlskey).'), 'securing docker api requests (tlskey).'),
cfg.StrOpt('vif_driver', cfg.StrOpt('vif_driver',
default='nova.virt.docker.vifs.DockerGenericVIFDriver'), default='nova.virt.zun.vifs.DockerGenericVIFDriver'),
cfg.StrOpt('snapshots_directory', cfg.StrOpt('snapshots_directory',
default='$instances_path/snapshots', default='$instances_path/snapshots',
help='Location where docker driver will temporarily store ' help='Location where docker driver will temporarily store '

View File

@ -28,7 +28,7 @@ from nova.network import manager
from nova.network import model as network_model from nova.network import model as network_model
from nova.network import os_vif_util from nova.network import os_vif_util
from nova import utils from nova import utils
from nova.virt.docker import network from nova.virt.zun import network
from oslo_config import cfg from oslo_config import cfg
# We need config opts from manager, but pep8 complains, this silences it. # We need config opts from manager, but pep8 complains, this silences it.