Commit Graph

14 Commits

Author SHA1 Message Date
Michael Still fd4b2aa4cb Move loopback setup and removal to privsep.
Once more, again.

Change-Id: I602582927c30f2929722474f68601ce47b4e98f6
blueprint: hurrah-for-privsep
2017-10-24 18:50:33 +11:00
Ngo Quoc Cuong 6c3520ac5b Remove translation of log messages
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
2017-06-13 11:20:28 +07:00
Daniel P. Berrange 0ea510f556 virt: convert disk mount API to use nova.virt.image.model
Convert the nova.virt.disk.mount classes to use the
nova.virt.image.model classes instead of manually
passing a filename and image format as parameters.

Related-Bug: #1257674
Change-Id: Ibabcf48c95185ba443ef7575590eae6a63e0f8e5
2015-06-04 13:47:40 +01:00
Davanum Srinivas 97d63d8745 Use oslo.log
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
2015-02-22 07:56:40 -05:00
Mike Durnosvistov 8431670ef8 Replacement `_` on `_LI` in all LOG.info - part 1
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

Added a hacking rule for the log info about checking
translation for it.

Change-Id: I96766d723b01082339876ed94bbaa77783322b8c
2014-11-20 10:19:17 +02:00
Davanum Srinivas 826aed0ec7 Use oslo.i18n
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
2014-07-18 14:28:09 -04:00
Gary Kotton cfd0846498 Don't translate debug level logs in nova.virt
Our translation policy
(https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation) calls
for not translating debug level logs. This is to help prioritize log
translation. Furthermore translation has a performance overhead, even if
the log isn't used (since nova doesn't support lazy translation yet).

Change-Id: I524b48f530d8afd59a067074332e3964426e4d70
2014-06-08 00:36:49 -07:00
liu-sheng 74f953a1d7 Remove vi modelines
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
2014-02-03 14:19:44 +00:00
Alex Gaynor cd9d8e45c6 Remove the monkey patching of _ into the builtins
Previous _ was monkey patched into builtins whenever
certain modules were imported. This removes that and
simply imports it when it is needed.

Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
2013-07-26 07:31:17 -07:00
Sean Dague bf31e02d13 Fix N402 for nova/virt
Fix N402 errors (single line docstring should end in a period)
for nova/virt, part of a larger attempt to stop ignoring our own
hacking.py tests.

Change-Id: I523ce41bd2b38c73cf3fdb031101ccc0695f2488
2013-01-08 23:45:07 -05:00
Michael Still a246c5576d Make NBD retry logic more generic, add retry to loop.
Other device implementations require retry logic as well. This
change pushes the retry logic up one layer so that its easy to
implement for the other drivers that will benefit from it, and
then adds retry to the loop driver.

This change also adds some unit test coverage for the loop
driver.

Change-Id: Iab0d42d5075e9d50b4e7eb8c7fcef12cae281b40
2012-12-19 12:00:03 +11:00
Daniel P. Berrange 14d97975af Add debug logging to disk mount modules
To assist in troubleshooting file injection code, add some
LOG.debug() statements to the nova/virt/disk/mount/*.py
modules

blueprint: virt-disk-api-refactoring
Change-Id: I75214145ef489a29a58f69abe6195ff01f36153c
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-11-21 11:53:07 +00:00
Daniel P. Berrange 6aebaca79a Remove img_handlers config parameter usage
Now that the only disk code requiring host filesystem
mounts is the LXC filesystem setup, the img_handlers
config parameter is an solution looking for a purpose.
For any disk image format we can categorically say
whether it should be mounted using loop or qemu-nbd
mount impls. There is no desire to use libguestfs FUSE
for mounting LXC disk images, since users of LXC do
not want a huge KVM process alongside every container!
Move the mount class choice logic into the mount API,
by creating new methods

  nova.virt.disk.mount.API.instance_for_format()
  nova.virt.disk.mount.API.instance_for_device()

and then call these from nova.virt.disk.API code

blueprint: virt-disk-api-refactoring
Change-Id: I088b5debdf62d4a9a6b4521eee68cd4757f2ff42
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-11-21 11:53:07 +00:00
Daniel P. Berrange e85156e20b Move all mount classes into a subdirectory
The disk API will be growing some new classes in future commits.
To avoid ambiguity in module names, move all the mount classes
into a subdirectory nova/virt/disk/mount/

blueprint: virt-disk-api-refactoring
Change-Id: I03898b4060bd0c488713c9d9f19caebdcd39113c
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-11-14 17:11:53 +00:00