incorrect-calculation-of-lp-limit

Bug #1583806 reported by Devdatta Kulkarni on 2016-05-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Critical
Unassigned

Bug Description

Incorrectly getting 'limit reached' error even though the number of languagepacks is less than the configured limit.

Below is an example:

vagrant@devstack:/etc/nova/rootwrap.d$ solum lp create apache-php https://github.com/devdattakulkarni/solum-lp-php.git
ERROR: Resource limit exceeded. Reason: Number of languagepacks reached limit of '10'.

vagrant@devstack:/etc/nova/rootwrap.d$ solum lp list
+--------------------------------------+---------------+-------------+--------+------------------------------------------------------------------------+
| uuid | name | description | status | source_uri |
+--------------------------------------+---------------+-------------+--------+------------------------------------------------------------------------+
| 07687df7-f393-42b8-bad6-0ea35dd6ca97 | alpine-python | None | READY | https://github.com/devdattakulkarni/solum-lp-python-alpine.git |
| 19806103-b6fd-4f80-be80-d34de1eb0636 | php | None | READY | https://github.com/devdattakulkarni/solum-lp-php.git |
| 42bb3908-c09f-44fa-854a-217d9ed12673 | java | None | READY | https://github.com/devdattakulkarni/solum-languagepack-java.git |
| b030baa2-bab1-4028-9541-0283bdf0fe2e | java1 | None | READY | https://github.com/rackspace-solum-samples/solum-languagepack-java.git |
| bfd7baec-7e33-4685-bede-8b2534a50db3 | php1 | None | READY | https://github.com/devdattakulkarni/solum-lp-php.git |
| dd14a066-51db-4a35-9789-5c600a3497fd | python | None | READY | https://github.com/devdattakulkarni/solum-languagepack-python.git |
+--------------------------------------+---------------+-------------+--------+------------------------------------------------------------------------+

Notice that there are only six (6) languagepacks but still we are getting the 'limit reached' error.

Solution:

This error is being thrown because we are not checking for 'artifact_type=language_pack' when calculating the number of languagepacks in:

https://github.com/openstack/solum/blob/master/solum/objects/sqlalchemy/image.py#L58

The image table is used to store both languagepack images and application images (DU images).

Changed in solum:
importance: Undecided → Critical
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers