The i18n team has decided not to translate the logs because it
seems like it not very useful; operators prefer to have them in
English so that they can search for those strings on the internet.
Partially fix on nova/virt other paths will be fixed on next commits
Change-Id: Ie7821aa4a5147cdb0616741bd1a1b1fc22080440
Convert the use of the incubated version of the log module
to the new oslo.log library.
Sync oslo-incubator modules to update their imports as well.
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
Change-Id: Ic4932e3f58191869c30bd07a010a6e9fdcb2a12c
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
This commit includes:
- using oslo_utils instead of oslo.utils
- using oslo_serialization instead of oslo.serialization
- using oslo_db instead of oslo.db
- using oslo_i18n instead of oslo.i18n
- using oslo_middleware instead of oslo.middleware
- using oslo_config instead of oslo.config
- using oslo_messaging instead of "from oslo import messaging"
- using oslo_vmware instead of oslo.vmware
Change-Id: I3e2eb147b321ce3e928817b62abcb7d023c5f13f
oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack
There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages
Change-Id: I913077d3b0fdee78e423c35b3a48137a17946a7b
Very simple import change in each file, just touches a
whole lot of files. jsonutils has graduated into a stand alone
library and has been removed from the oslo-incubator repository.
We should be using the library for all projects.
Change-Id: I09d780a47d377871f357654603ee4b0fa0169d66
jsonutils have several benefits in comparison to pure json
implementation, like enabling C boosted encoders and decoders for
Python2.6 by using simplejson when available.
Change-Id: I24d0cd442e8d9d89fac50e43fc97f7bb4a293c3d
Closes-Bug: 1329496
oslo.i18n provides the i18n functions that were provided by
oslo-incubator's gettextutils module. Some tests that were
using internal details of the library were removed.
Change-Id: I44cfd5552e0dd86af21073419d31622f5fdb28e0
Both H305 and H307 are part of the OpenStack style guide.
Ensure that there are 3 groups of imports, stdlib,
third-party and project specific. Within each category
ensure that imports are in alphabetical order.
Change-Id: Id4994551c135c3c1a4982153f0c6cacba6176b95
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.
Also a check is added to hacking to detect if they are re-added.
Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
If CONF.instances_path/compute_nodes is empty when the storage_users
tries to register the storage use (virt.storage_users.register_storage_use)
the exception is uncaught and raised. As a consequence, the image cache
manager won't run.
Closes-Bug: #1252659
Change-Id: If9ed5e75b0bc0b8f3a7c5fd7ec88f6399e4e59c6
This fixes the lock path for storage-registry-lock to prevent a
potential data loss due to a race-condition scenario. Since the
storage-registry-lock is used to modify a json blob that is
authoritative as to which nodes are using the storage so that
we don't remove any "in-use" backing files on the shared storage
segment (if in use).
The potential data-loss could occur in limited cases of the race
that the lock should prevent. This can only occur if the image
cache cleanup is triggerd when a node has been eliminated from
the register_storage_use JSON incorrectly by this race condition.
Most of the time the race simplyresults in a corrupted json blob.
Fixes-bug: 1194696
Change-Id: Ib1a5785646e75dc90bdd2a7e69a697adc4fbb298
The lockfile module has a new convenience API which sets the lockfile prefix.
Using this API, the prefix is not required everytime synchronized is used.
Change-Id: Iac1cfcc83b59108164de924d20127c1cf4dd7dcd
If base image storage is shared, we need to care about remote
instances when we clean up. This patch "learns" which storage is
shared, and then decides what base images are in use anywhere
on the set of compute nodes which share that base storage.
This is complicated because shared instance storage doesn't have
to be per-cluster. It could for example be per rack. We need to
handle that properly.
This should resolve bug 1078594.
Change-Id: I36d0d6e965b114bb68c8f7b7fd43f8e96b2dd8f5