Wrong usage of "a"

Wrong usage of "a" in the mesages:
"lookup the instance after a instance_destroy_at_top hits"
"returns the PCI address of a an device"
"will result in a additional lookup to glance for said attr"
"This will ensure that a image is not deleted during the spawn"
"Lock to ensure that the spawn will not try and access a image"
"cleanup the _events_delayed dictionary when a event"
"it will raise a exception.NovaException"
"we need to allocate a ephemeral disk if required"
"this may be a endless loop, so check the id of"

Should be:
"lookup the instance after an instance_destroy_at_top hits"
"returns the PCI address of a device"
"will result in an additional lookup to glance for said attr"
"This will ensure that an image is not deleted during the spawn"
"Lock to ensure that the spawn will not try and access an image"
"cleanup the _events_delayed dictionary when an event"
"it will raise an exception.NovaException"
"we need to allocate an ephemeral disk if required"
"this may be an endless loop, so check the id of"

Totally 10 occasions in Nova base code.

Change-Id: I5d5d2d08ea2dbeba519adba73139061702233f7a
This commit is contained in:
hgangwx
2015-12-26 21:01:14 +08:00
parent 2cc2e708bc
commit c1a2f49c11
7 changed files with 10 additions and 10 deletions

View File

@@ -247,7 +247,7 @@ class ComputeCellsAPI(compute_api.API):
method_name) method_name)
except exception.InstanceNotFound: except exception.InstanceNotFound:
# NOTE(melwitt): We can get here if anything tries to # NOTE(melwitt): We can get here if anything tries to
# lookup the instance after a instance_destroy_at_top hits. # lookup the instance after an instance_destroy_at_top hits.
pass pass
return return

View File

@@ -631,7 +631,7 @@ def _extract_attributes(image, include_locations=False):
output[attr] = getattr(image, attr) or 0 output[attr] = getattr(image, attr) or 0
else: else:
# NOTE(xarses): Anything that is caught with the default value # NOTE(xarses): Anything that is caught with the default value
# will result in a additional lookup to glance for said attr. # will result in an additional lookup to glance for said attr.
# Notable attributes that could have this issue: # Notable attributes that could have this issue:
# disk_format, container_format, name, deleted, checksum # disk_format, container_format, name, deleted, checksum
output[attr] = getattr(image, attr, None) output[attr] = getattr(image, attr, None)

View File

@@ -71,7 +71,7 @@ def get_pci_address_fields(pci_addr):
def get_function_by_ifname(ifname): def get_function_by_ifname(ifname):
"""Given the device name, returns the PCI address of a an device """Given the device name, returns the PCI address of a device
and returns True if the address in a physical function. and returns True if the address in a physical function.
""" """
try: try:

View File

@@ -804,7 +804,7 @@ class LibvirtDriver(driver.ComputeDriver):
raise loopingcall.LoopingCallDone() raise loopingcall.LoopingCallDone()
# NOTE(wangpan): If the instance was booted again after destroy, # NOTE(wangpan): If the instance was booted again after destroy,
# this may be a endless loop, so check the id of # this may be an endless loop, so check the id of
# domain here, if it changed and the instance is # domain here, if it changed and the instance is
# still running, we should destroy it again. # still running, we should destroy it again.
# see https://bugs.launchpad.net/nova/+bug/1111213 for more details # see https://bugs.launchpad.net/nova/+bug/1111213 for more details

View File

@@ -385,7 +385,7 @@ class Host(object):
"""Emit events - possibly delayed.""" """Emit events - possibly delayed."""
def event_cleanup(gt, *args, **kwargs): def event_cleanup(gt, *args, **kwargs):
"""Callback function for greenthread. Called """Callback function for greenthread. Called
to cleanup the _events_delayed dictionary when a event to cleanup the _events_delayed dictionary when an event
was called. was called.
""" """
event = args[0] event = args[0]
@@ -599,7 +599,7 @@ class Host(object):
corresponding to the Nova instance, based on corresponding to the Nova instance, based on
its name. If not found it will raise an its name. If not found it will raise an
exception.InstanceNotFound exception. On other exception.InstanceNotFound exception. On other
errors, it will raise a exception.NovaException errors, it will raise an exception.NovaException
exception. exception.
:returns: a libvirt.Domain object :returns: a libvirt.Domain object

View File

@@ -32,7 +32,7 @@ If an image is used then the timestamps will be deleted.
When accessing a timestamp we make use of locking. This ensure that aging When accessing a timestamp we make use of locking. This ensure that aging
will not delete an image during the spawn operation. When spawning will not delete an image during the spawn operation. When spawning
the timestamp folder will be locked and the timestamps will be purged. the timestamp folder will be locked and the timestamps will be purged.
This will ensure that a image is not deleted during the spawn. This will ensure that an image is not deleted during the spawn.
""" """
from oslo_concurrency import lockutils from oslo_concurrency import lockutils
@@ -85,7 +85,7 @@ class ImageCacheManager(imagecache.ImageCacheManager):
# is going to be used now. # is going to be used now.
path = self.timestamp_folder_get(cache_root_folder, image_id) path = self.timestamp_folder_get(cache_root_folder, image_id)
# Lock to ensure that the spawn will not try and access a image # Lock to ensure that the spawn will not try and access an image
# that is currently being deleted on the datastore. # that is currently being deleted on the datastore.
with lockutils.lock(str(path), lock_file_prefix='nova-vmware-ts', with lockutils.lock(str(path), lock_file_prefix='nova-vmware-ts',
external=True): external=True):
@@ -148,7 +148,7 @@ class ImageCacheManager(imagecache.ImageCacheManager):
ds_browser = self._get_ds_browser(datastore.ref) ds_browser = self._get_ds_browser(datastore.ref)
for image in unused_images: for image in unused_images:
path = self.timestamp_folder_get(ds_path, image) path = self.timestamp_folder_get(ds_path, image)
# Lock to ensure that the spawn will not try and access a image # Lock to ensure that the spawn will not try and access an image
# that is currently being deleted on the datastore. # that is currently being deleted on the datastore.
with lockutils.lock(str(path), lock_file_prefix='nova-vmware-ts', with lockutils.lock(str(path), lock_file_prefix='nova-vmware-ts',
external=True): external=True):

View File

@@ -613,7 +613,7 @@ class VMwareVMOps(object):
size, at, path) size, at, path)
# There may be block devices defined but no ephemerals. In this case # There may be block devices defined but no ephemerals. In this case
# we need to allocate a ephemeral disk if required # we need to allocate an ephemeral disk if required
if not ephemerals and instance.ephemeral_gb: if not ephemerals and instance.ephemeral_gb:
size = instance.ephemeral_gb * units.Mi size = instance.ephemeral_gb * units.Mi
filename = vm_util.get_ephemeral_name(0) filename = vm_util.get_ephemeral_name(0)