Change sandbox flavor from 'm1.small' to 'm1.tiny'
Current nova flavor used for sandbox in nova docker driver is 'm1.small', this consumes much resources and we may not be able to create many containers on low configuration machines. Since sandbox container does no processing, we may restrict it to 'm1.tiny'. This change will not impact user's container since sandbox container and user's container do not share same cgroups. Change-Id: Ia0c6ff3efecb48a14e137407ce8a0c349f9e5290
This commit is contained in:
@@ -392,7 +392,7 @@ class DockerDriver(driver.ContainerDriver):
|
||||
|
||||
class NovaDockerDriver(DockerDriver):
|
||||
def create_sandbox(self, context, container, key_name=None,
|
||||
flavor='m1.small', image='kubernetes/pause',
|
||||
flavor='m1.tiny', image='kubernetes/pause',
|
||||
nics='auto'):
|
||||
# FIXME(hongbin): We elevate to admin privilege because the default
|
||||
# policy in nova disallows non-admin users to create instance in
|
||||
|
||||
@@ -472,7 +472,7 @@ class TestNovaDockerDriver(base.DriverTestCase):
|
||||
mock_get_sandbox_name.assert_called_once_with(mock_container)
|
||||
nova_client_instance.create_server.assert_called_once_with(
|
||||
name='test_sanbox_name', image='kubernetes/pause',
|
||||
flavor='m1.small', key_name=None,
|
||||
flavor='m1.tiny', key_name=None,
|
||||
nics='auto', availability_zone=':{0}:'.format(conf.CONF.host))
|
||||
mock_ensure_active.assert_called_once_with(nova_client_instance,
|
||||
'server_instance')
|
||||
|
||||
Reference in New Issue
Block a user