CinderException can be used as a low-level exception so we don't need to
introduce one more wrapper for Exception.
TSM backup driver modified without testing. Removed code was broken
because it tried to use not existing Exception class attributes.
Change-Id: Ie67d919f8f59572268f1f07946fb2d2f14a851f1
This includes implementing a first trivial example of how to use
privsep to run something as root, specifically the cgroup throttling
driver.
This code is modelled strongly on how nova has chosen to use privsep.
Consistency is probably good here, but it does imply that the cinder
team is ok with the decisons nova has made about implementation.
Change-Id: Ic401138a10a72cb4b976a1a6aba272cafcb40d8b
BlkioCgroup._set_limits(): sort devices before iterating on them to
have a reliable behaviour.
The devs variable is a dictionary. On Python 3, the hash function is
now randomized, so iterating on a dictionary gives items in a random
order. Use sorted() to iterate on the list of sorted devices instead.
tox.ini: add cinder.tests.unit.test_volume_throttling to Python 3.
Blueprint cinder-python3
Partial-Bug: #1348818
Change-Id: Icf7141f772397c7ac08f0f1e21ad74cb86a06351
According to the PEP8(H405), multi-line docstring summaries
should be separated by an empty line.
Change-Id: I5cd8a9064dcefc504e85946ecdf1f56f10145d35
Closes-bug: #1407162
This change adds Python 3 compatibility to the modified code.
The itervalues() method of Python 2 dictionaries was renamed to values() on
Python 3. As discussed on the openstack-dev mailing list, itervalues() must be
replaced with values(), six.itervalues() should not be used. In OpenStack, the
overhead of creating a temporary list with dict.values() on Python 2 is
negligible.
Blueprint cinder-python3
Change-Id: Ibcf4597aeef1835f08bee2d6831205c428884c31
LOG.warn is deprecated and LOG.warning should be used.
This patch fixes up instances of LOG.warn usage and adds a
hacking check to make sure it doesn't creep back in.
See Logger.warning note here for background:
https://docs.python.org/3/library/logging.html
Also cleaned up some remaining instances where logging was
preformatting strings rather than passing in formatting
arguments to the logger to handle.
Change-Id: Id2e6cba489d8509601820b5aed83652f71be2bdc
Currently, by setting volume_copy_bps_limit in cinder.conf,
volume/image copy can be throttled to mitigate slow down of
instances' volume access during the copy. However, this is a global
setting and applied to all the backends.
This change enables admins to configure volume_copy_bps_limit to
different values among backends by specifying it in each backend
section.
In addition, with this change, the bps limit will be divided when
multiple volume copy operations run concurrently on the same backend.
For example, if volume_copy_bps_limit is set to 100MB/s, and 2 copies
are running on a backend, each copy can use up to 50MB/s.
This behavior will be useful for QoS which ensures a certain amount
of bandwidth is kept for instances' volume access.
This introduces Throttle classes to count volume copies in a backend
and setup bandwidth limit.
Change-Id: Ie390b46538556fa704b06ffc79cd6cc000bd5936
Implents: blueprint limit-volume-copy-bps-per-backend