diff options
author | zhaoleilc <15247232416@163.com> | 2021-05-06 16:22:34 +0800 |
---|---|---|
committer | Alan Bishop <abishop@redhat.com> | 2023-01-27 10:10:12 -0800 |
commit | 5c26e504d0a13961c4c37a04160238fbab717483 (patch) | |
tree | 4a69cd85207d07a914b319a87e7fb6c2f452f97a | |
parent | 4cdd18b42925e88b9d777373c0c73dff32aa78ff (diff) | |
download | cinder-5c26e504d0a13961c4c37a04160238fbab717483.tar.gz |
Erroneous log message args location causes a misconception
This patch modifies log message args location so that the log
message can report free space correctly.
stable/xena:
- Two small follow-up patches that fix minor issues are squashed into
this patch: I41080795cc1c3c91de1e35d6d6eba3f05068b26e fixes a bug,
and I6976569ac3617cc247a4c39f786ece8443d43d0b fixes a typo in the
release note.
- Backporting this patch facilitates backporting the patch that fixes
capacity calculations.
Change-Id: Idcaf657692c2597887476ec1834d790f39b1fe94
(cherry picked from commit 4efd313d419253f5c3718867f17b8d229b3c2df8)
(cherry picked from commit fc7cf4a598cfe8b96d6235d7495759d54c36e697)
-rw-r--r-- | cinder/scheduler/filters/capacity_filter.py | 9 | ||||
-rw-r--r-- | releasenotes/notes/bug-1953168-fix-capacity-filter-message-456dea41fa8a4a1b.yaml | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/cinder/scheduler/filters/capacity_filter.py b/cinder/scheduler/filters/capacity_filter.py index 1661d16f4..d1eb7fb7b 100644 --- a/cinder/scheduler/filters/capacity_filter.py +++ b/cinder/scheduler/filters/capacity_filter.py @@ -155,16 +155,13 @@ class CapacityFilter(filters.BaseBackendFilter): # of reserved space) which we can over-subscribe. adjusted_free_virtual = ( free * backend_state.max_over_subscription_ratio) + msg_args["available"] = adjusted_free_virtual res = adjusted_free_virtual >= requested_size if not res: - msg_args = {"available": adjusted_free_virtual, - "size": requested_size, - "grouping": grouping, - "grouping_name": backend_state.backend_id} LOG.warning("Insufficient free virtual space " "(%(available)sGB) to accommodate thin " - "provisioned %(size)sGB volume on %(grouping)s" - " %(grouping_name)s.", msg_args) + "provisioned %(requested)sGB volume on " + "%(grouping)s %(grouping_name)s.", msg_args) else: LOG.debug("Space information for volume creation " "on %(grouping)s %(grouping_name)s " diff --git a/releasenotes/notes/bug-1953168-fix-capacity-filter-message-456dea41fa8a4a1b.yaml b/releasenotes/notes/bug-1953168-fix-capacity-filter-message-456dea41fa8a4a1b.yaml new file mode 100644 index 000000000..fef5eaa7a --- /dev/null +++ b/releasenotes/notes/bug-1953168-fix-capacity-filter-message-456dea41fa8a4a1b.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + `Bug #1953168 <https://bugs.launchpad.net/cinder/+bug/1953168>`_: Fixed + missing parameter in the capacity filter log message. |