Some compute quotas are not being set

Bug #1475831 reported by jiaxi
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
jiaxi
python-openstackclient
Fix Released
Medium
Richard Theis

Bug Description

The following quotas are not being set correctly:

  --injected-file-size
  --injected-path-size
  --properties
  --secgroup-rules
  --secgroups

Because novaclient expects (novaclient/v2/shell.py):
3877 _quota_resources = ['instances', 'cores', 'ram',
3878 'floating_ips', 'fixed_ips', 'metadata_items',
3879 'injected_files', 'injected_file_content_bytes',
3880 'injected_file_path_bytes', 'key_pairs',
3881 'security_groups', 'security_group_rules',
3882 'server_groups', 'server_group_members']

But we send (python-openstackclient/openstackclient/common/quota.py):

 30 COMPUTE_QUOTAS = {
 34 'injected_file_content_bytes': 'injected-file-size',
 35 'injected_file_path_bytes': 'injected-path-size',
 39 'metadata_items': 'properties',
 41 'security_group_rules': 'secgroup-rules',
 42 'security_groups': 'secgroups',
 43 }

Current behavior
# openstack quota set --injected-file-size 11 testproject_dx
No quotas updated

jiaxi (tjxiter)
Changed in python-openstackclient:
assignee: nobody → jiaxi (tjxiter)
jiaxi (tjxiter)
affects: python-openstackclient → nova
description: updated
jiaxi (tjxiter)
description: updated
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

@iaxi (tjxiter):

Since you are set as assignee, I switch the status to "In Progress".

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/204934

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by jiaxi (<email address hidden>) on branch: master
Review: https://review.openstack.org/204934
Reason: Alex Xu think this should be fixed in novaclient

Revision history for this message
Nikola Đipanov (ndipanov) wrote : Re: injected_file_content_bytes should be changed to injected-file-size

I think Alex was saying that this needs to be fixed in the openstack-client, not Nova client. Nova client does the right thing for what the server expects, it's the unified client that gets it wrong.

Changed in nova:
status: In Progress → Invalid
Revision history for this message
jiaxi (tjxiter) wrote :

@Nikola Đipanov (ndipanov)
Sorry, I'm wrong. I should fix it in openstackclient.

Richard Theis (rtheis)
Changed in python-openstackclient:
assignee: nobody → Richard Theis (rtheis)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/248222

Changed in python-openstackclient:
status: New → In Progress
Changed in python-openstackclient:
importance: Undecided → Medium
summary: - injected_file_content_bytes should be changed to injected-file-size
+ Some compute quotas are not being set
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/248222
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=99498b0ab3f8a131fca3663f170d746d8bb090ae
Submitter: Jenkins
Branch: master

commit 99498b0ab3f8a131fca3663f170d746d8bb090ae
Author: Richard Theis <email address hidden>
Date: Fri Nov 20 12:49:17 2015 -0600

    Unable to set some compute quotas

    The OpenStackClient mapping of 'openstack quota set' arguments isn't
    correct for compute quota items that have to different names. For
    example, the --injected-file-size argument is mapped to
    injected_file_size, but the compute quotas item is actually
    injected_file_content_bytes. This incorrect mapping prevented the
    impacted compute quota items from being set.

    The problem impacts the following 'openstack quota set' arguments:
      --injected-file-size
      --injected-path-size
      --properties
      --secgroup-rules
      --secgroups

    This patch set also expands the compute quota unit tests to verify
    all compute quota items that can be set.

    Change-Id: I0a2f241e425f4811e4ae55be183ac0c8b0805c2a
    Closes-Bug: #1475831

Changed in python-openstackclient:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-openstackclient 2.0.0

This issue was fixed in the openstack/python-openstackclient 2.0.0 release.

Changed in python-openstackclient:
status: Fix Committed → Fix Released
Revision history for this message
Eric Lajoie (elajoie) wrote :

I'm having a similar issues with Mitaka 13.0.0 and floating-ips not changing but other being set without issues:

(openstack) set debug true
debug - was: False
now: True
(openstack) quota set --floating-ips 2 SoftwareTesters
(openstack) quota show SoftwareTesters
+----------------------+----------------------------------+
| Field | Value |
+----------------------+----------------------------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | 5 |
| firewall | 10 |
| firewall_policy | 10 |
| firewall_rule | 100 |
| fixed-ips | 3 |
| floating-ips | 46 |
| gigabytes | 1000 |
| gigabytes_lvm | -1 |
| healthmonitor | -1 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 5 |
| key-pairs | 100 |
| l7policy | -1 |
| listener | -1 |
| loadbalancer | 10 |
| network | 10 |
| per_volume_gigabytes | -1 |
| pool | 10 |
| port | 50 |
| project | 6cd9e1dfa21546d48e1e236a9ffbd084 |
| properties | 128 |
| ram | 51200 |
| rbac_policy | 10 |
| router | 10 |
| secgroup-rules | 100 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| snapshots_lvm | -1 |
| subnet | 10 |
| subnetpool | -1 |
| volumes | 10 |
| volumes_lvm | -1 |
+----------------------+----------------------------------+

Revision history for this message
Jeff Hillman (jhillman) wrote :

This bug exists in the python3-openstackclient package 2.3.1-0ubuntu1 for Ocata on Xenial.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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