conf: Remove deprecated 'remap_vbd_dev' option
This flag was deprecated in a previous cycle. The flag, the feature that the flag enabled, and a related flag that was not deprecated but should have been, can now be removed. Change-Id: I6b38b4e69c0aace4b109f0d083ef665a5c032a15
This commit is contained in:
parent
be3a66781f
commit
29c962f3ba
@ -374,30 +374,6 @@ The iSCSI Target Port.
|
||||
This option represents the port of the iSCSI Target. If the
|
||||
target port is not present in the connection information from the
|
||||
volume provider then the value from this option is taken.
|
||||
"""),
|
||||
# NOTE(sirp): This is a work-around for a bug in Ubuntu Maverick,
|
||||
# when we pull support for it, we should remove this
|
||||
cfg.BoolOpt('remap_vbd_dev',
|
||||
default=False,
|
||||
deprecated_for_removal=True,
|
||||
deprecated_since='15.0.0',
|
||||
deprecated_reason="""
|
||||
This option provided a workaround for issues in Ubuntu Maverick, which
|
||||
was released in April 2010 and was dropped from support in April 2012.
|
||||
There's no reason to continue supporting this option.
|
||||
""",
|
||||
help="""
|
||||
Used to enable the remapping of VBD dev.
|
||||
(Works around an issue in Ubuntu Maverick)
|
||||
"""),
|
||||
cfg.StrOpt('remap_vbd_dev_prefix',
|
||||
default='sd',
|
||||
help="""
|
||||
Specify prefix to remap VBD dev to (ex. /dev/xvdb -> /dev/sdb).
|
||||
|
||||
Related options:
|
||||
|
||||
* If `remap_vbd_dev` is set to False this option has no impact.
|
||||
"""),
|
||||
cfg.BoolOpt('independent_compute',
|
||||
default=False,
|
||||
|
@ -2100,27 +2100,6 @@ def _wait_for_vhd_coalesce(session, instance, sr_ref, vdi_ref,
|
||||
raise exception.NovaException(msg)
|
||||
|
||||
|
||||
def _remap_vbd_dev(dev):
|
||||
"""Return the appropriate location for a plugged-in VBD device
|
||||
|
||||
Ubuntu Maverick moved xvd? -> sd?. This is considered a bug and will be
|
||||
fixed in future versions:
|
||||
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/684875
|
||||
|
||||
For now, we work around it by just doing a string replace.
|
||||
"""
|
||||
# NOTE(sirp): This hack can go away when we pull support for Maverick
|
||||
should_remap = CONF.xenserver.remap_vbd_dev
|
||||
if not should_remap:
|
||||
return dev
|
||||
|
||||
old_prefix = 'xvd'
|
||||
new_prefix = CONF.xenserver.remap_vbd_dev_prefix
|
||||
remapped_dev = dev.replace(old_prefix, new_prefix)
|
||||
|
||||
return remapped_dev
|
||||
|
||||
|
||||
def _wait_for_device(session, dev, dom0, max_seconds):
|
||||
"""Wait for device node to appear."""
|
||||
dev_path = utils.make_dev_path(dev)
|
||||
@ -2179,14 +2158,9 @@ def vdi_attached(session, vdi_ref, read_only=False, dom0=False):
|
||||
session.VBD.plug(vbd_ref, this_vm_ref)
|
||||
try:
|
||||
LOG.debug('Plugging VBD %s done.', vbd_ref)
|
||||
orig_dev = session.call_xenapi("VBD.get_device", vbd_ref)
|
||||
LOG.debug('VBD %(vbd_ref)s plugged as %(orig_dev)s',
|
||||
{'vbd_ref': vbd_ref, 'orig_dev': orig_dev})
|
||||
dev = _remap_vbd_dev(orig_dev)
|
||||
if dev != orig_dev:
|
||||
LOG.debug('VBD %(vbd_ref)s plugged into wrong dev, '
|
||||
'remapping to %(dev)s',
|
||||
{'vbd_ref': vbd_ref, 'dev': dev})
|
||||
dev = session.call_xenapi("VBD.get_device", vbd_ref)
|
||||
LOG.debug('VBD %(vbd_ref)s plugged as %(dev)s',
|
||||
{'vbd_ref': vbd_ref, 'dev': dev})
|
||||
_wait_for_device(session, dev, dom0,
|
||||
CONF.xenserver.block_device_creation_timeout)
|
||||
yield dev
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The following deprecated configuration options have been removed from the
|
||||
``xenserver`` section of ``nova.conf``:
|
||||
|
||||
- ``remap_vbd_dev``
|
||||
- ``remap_vbd_dev_prefix``
|
Loading…
x
Reference in New Issue
Block a user