Make DD block size adjustable
Currently the block size for DD operations is hard coded to 1 meg. In some enviroments, like where nodes block storage is SAN or NAS based this may be causing sub par performance, This patch makes the block size for DD operations adjustable via a conf file option. Closes-bug: #1411002 Change-Id: I49bf538988ba2fa40047d4ffeffb416ba232e3f2
This commit is contained in:
parent
733efae859
commit
370fea3c11
@ -724,6 +724,17 @@
|
|||||||
#mysql_engine=InnoDB
|
#mysql_engine=InnoDB
|
||||||
|
|
||||||
|
|
||||||
|
[deploy]
|
||||||
|
|
||||||
|
#
|
||||||
|
# Options defined in ironic.drivers.modules.deploy_utils
|
||||||
|
#
|
||||||
|
|
||||||
|
# Block size to use when writing to the nodes disk. (string
|
||||||
|
# value)
|
||||||
|
#dd_block_size=1M
|
||||||
|
|
||||||
|
|
||||||
[dhcp]
|
[dhcp]
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -36,9 +36,16 @@ from ironic.drivers.modules import image_cache
|
|||||||
from ironic.openstack.common import log as logging
|
from ironic.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
deploy_opts = [
|
||||||
|
cfg.StrOpt('dd_block_size',
|
||||||
|
default='1M',
|
||||||
|
help='Block size to use when writing to the nodes disk.'),
|
||||||
|
]
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
CONF.register_opts(deploy_opts, group='deploy')
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
# All functions are called from deploy() directly or indirectly.
|
# All functions are called from deploy() directly or indirectly.
|
||||||
@ -144,7 +151,7 @@ def is_block_device(dev):
|
|||||||
|
|
||||||
def dd(src, dst):
|
def dd(src, dst):
|
||||||
"""Execute dd from src to dst."""
|
"""Execute dd from src to dst."""
|
||||||
utils.dd(src, dst, 'bs=1M', 'oflag=direct')
|
utils.dd(src, dst, 'bs=%s' % CONF.deploy.dd_block_size, 'oflag=direct')
|
||||||
|
|
||||||
|
|
||||||
def populate_image(src, dst):
|
def populate_image(src, dst):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user