image_conversion_cpu_limit and image_conversion_address_space_limit settings ignored in /etc/cinder/cinder.conf

Bug #1917353 reported by legochen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
High
Pavlo Shchelokovskyy

Bug Description

This is how I found the problem:
I tried to create cinder volume from the image, but, encountered the following errors:
Command: /opt/openstack/venv/cinder/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=60 -- sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C qemu-img info /var/cinder/conversion/tmplioz9ua5example.com
Exit code: -6
Stdout: ''
Stderr: 'fatal error: runtime: cannot allocate memory

After some digging, it related to the size of the address space (https://access.redhat.com/solutions/2800111)

So, I tried to configure /etc/cinder/cinder.conf to define image_conversion_cpu_limit=60 and image_conversion_address_space_limit=10 attributes. However, after I configured the attributes, I continue to see the errors are still showing "--as=1073741824 --cpu=60"...

So the values configured in the conf file did not seem to have an effect on the call to 'qeum-img info'.

Troubleshooting:
I moved https://github.com/openstack/cinder/blob/85975fb2b63866ba6e216e621b84d571b9dbe90e/cinder/image/image_utils.py#L66-L72 these lines inside the qemu_img_info function https://github.com/openstack/cinder/blob/85975fb2b63866ba6e216e621b84d571b9dbe90e/cinder/image/image_utils.py#L122. The configurd values could be loaded as expected.

Please help to investigate this issue, thanks

This issue has been posted in #openstack-cinder channel.
http://eavesdrop.openstack.org/irclogs/%23openstack-cinder/%23openstack-cinder.2021-03-01.log.html

summary: image_conversion_cpu_limit and image_conversion_address_space_limit
- settings cannot not work in /etc/cinder/cinder.conf
+ settings ignored in /etc/cinder/cinder.conf
description: updated
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Looks like the ProcessLimits object is being created too soon. This may not have been reported earlier because the default value for cpu time was raised from 8 -> 30 in victoria by Change-Id: I0c26c400f08d91c8c125c69e06e4c90302bcdbb1

The values were made configurable by Change-Id: I462cecc3152bf838b7d42d5abc3ca31610567e5e , also in Victoria.

Revision history for this message
legochen (chenlego) wrote :

I tried to move image_conversion_cpu_limit=60 and image_conversion_address_space_limit=10 attributes into [default_backends] section and all of my backend sections ex:[scaleio]. However, those attributes are still not applied.

tags: added: image volume
Changed in cinder:
status: New → Confirmed
importance: Undecided → Medium
Changed in cinder:
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/873249

Changed in cinder:
status: Confirmed → In Progress
Changed in cinder:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.