Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1484106

Summary: Can not set load balancer V2 quotas using openstack commands in RHOSP 10
Product: Red Hat OpenStack Reporter: Punit Kundal <pkundal>
Component: python-openstackclientAssignee: Nir Magnezi <nmagnezi>
Status: CLOSED DUPLICATE QA Contact: Shai Revivo <srevivo>
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: apevec, beth.white, fdinitto, jpichon, lhh, pablo.iranzo, pkundal, rscarazz, srevivo
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-02 10:38:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Punit Kundal 2017-08-22 17:07:20 UTC
Description of problem:

When trying to set load balancer v2 quotas in RHOSP 10 using the openstack command line client, the command ends up in an HttpException and the quota set command fails.

Version-Release number of selected component (if applicable):

[root@overcloud-controller-0 ~]# rpm -qa | grep python-openstackclient
python-openstackclient-3.2.1-1.el7ost.noarch

[root@overcloud-controller-0 ~]# rpm -qa | grep lbaas
openstack-neutron-lbaas-9.2.0-2.el7ost.noarch
python-neutron-lbaas-9.2.0-2.el7ost.noarch

[root@overcloud-controller-0 ~]# rpm -qa | grep neutron
openstack-neutron-ml2-9.3.1-2.el7ost.noarch
openstack-neutron-lbaas-9.2.0-2.el7ost.noarch
python-neutron-lbaas-9.2.0-2.el7ost.noarch
openstack-neutron-bigswitch-lldp-9.42.1-3.el7ost.noarch
python-neutron-lib-0.4.0-1.el7ost.noarch
openstack-neutron-common-9.3.1-2.el7ost.noarch
openstack-neutron-bigswitch-agent-9.42.1-3.el7ost.noarch
openstack-neutron-9.3.1-2.el7ost.noarch
openstack-neutron-openvswitch-9.3.1-2.el7ost.noarch
openstack-neutron-metering-agent-9.3.1-2.el7ost.noarch
puppet-neutron-9.5.0-2.el7ost.noarch
python-neutron-9.3.1-2.el7ost.noarch
python-neutronclient-6.0.0-2.el7ost.noarch
python-neutron-tests-9.3.1-2.el7ost.noarch
openstack-neutron-sriov-nic-agent-9.3.1-2.el7ost.noarch


How reproducible:
Always

Steps to Reproduce:
1. Created a RHOSP 10 environment and enabled LBaaS V2 on it:

[stack@instack ~]$ neutron agent-list
+---------------------+---------------------+---------------------+-------------------+-------+----------------+---------------------+
| id                  | agent_type          | host                | availability_zone | alive | admin_state_up | binary              |
+---------------------+---------------------+---------------------+-------------------+-------+----------------+---------------------+
| 110be023-abba-4ee8- | DHCP agent          | overcloud-controlle | nova              | :-)   | True           | neutron-dhcp-agent  |
| b9b8-44d569de2d69   |                     | r-0.localdomain     |                   |       |                |                     |
| 8a8bec7c-4178-4e83- | Loadbalancerv2      | overcloud-controlle |                   | :-)   | True           | neutron-            |
| bf17-6b23ceea7aaf   | agent               | r-0.localdomain     |                   |       |                | lbaasv2-agent       |
| 9752c3b5-47c6-4634- | Metadata agent      | overcloud-controlle |                   | :-)   | True           | neutron-metadata-   |
| 9400-2c4bcdd3d500   |                     | r-0.localdomain     |                   |       |                | agent               |
| b1496f20-178c-478b- | Open vSwitch agent  | overcloud-controlle |                   | :-)   | True           | neutron-            |
| b9aa-585d8934f8b7   |                     | r-0.localdomain     |                   |       |                | openvswitch-agent   |
| b7d3c6b3-788e-4bb7- | Open vSwitch agent  | overcloud-compute-0 |                   | :-)   | True           | neutron-            |
| aea6-d05844719278   |                     | .localdomain        |                   |       |                | openvswitch-agent   |
| e246ea4c-f637-4707- | L3 agent            | overcloud-controlle | nova              | :-)   | True           | neutron-l3-agent    |
| 94f1-5a25d5e68bf0   |                     | r-0.localdomain     |                   |       |                |                     |
+---------------------+---------------------+---------------------+-------------------+-------+----------------+---------------------+


2. Tried updating the quotas with openstack quota set command (Load Balancer V2 quotas)

[stack@instack ~]$ openstack quota set --members 25 0252c9a6027a44d48f1cb3e025c92c1b
HttpException: Bad Request
[stack@instack ~]$ openstack quota set --health-monitors 25 0252c9a6027a44d48f1cb3e025c92c1b
HttpException: Bad Request
[stack@instack ~]$ openstack quota set --vips 25 0252c9a6027a44d48f1cb3e025c92c1b
HttpException: Bad Request


3. I also do not see any option to set loadbalancer , listener and pool quotas through the openstack command line client

[stack@instack ~]$ openstack help quota set
usage: openstack quota set [-h] [--class] [--properties <properties>]
                           [--server-groups <server-groups>] [--ram <ram>]
                           [--key-pairs <key-pairs>] [--instances <instances>]
                           [--fixed-ips <fixed-ips>]
                           [--injected-file-size <injected-file-size>]
                           [--server-group-members <server-group-members>]
                           [--injected-files <injected-files>]
                           [--cores <cores>]
                           [--injected-path-size <injected-path-size>]
                           [--gigabytes <gigabytes>] [--volumes <volumes>]
                           [--snapshots <snapshots>]
                           [--subnetpools <subnetpools>] [--vips <vips>]
                           [--members <members>] [--ports <ports>]
                           [--subnets <subnets>] [--networks <networks>]
                           [--floating-ips <floating-ips>]
                           [--health-monitors <health-monitors>]
                           [--secgroup-rules <secgroup-rules>]
                           [--secgroups <secgroups>] [--routers <routers>]
                           [--rbac-policies <rbac-policies>]
                           [--volume-type <volume-type>]
                           <project/class>

Set quotas for project or class

positional arguments:
  <project/class>       Set quotas for this project or class (name/ID)

optional arguments:
  -h, --help            show this help message and exit
  --class               Set quotas for <class>
  --properties <properties>
                        New value for the properties quota
  --server-groups <server-groups>
                        New value for the server-groups quota
  --ram <ram>           New value for the ram quota
  --key-pairs <key-pairs>
                        New value for the key-pairs quota
  --instances <instances>
                        New value for the instances quota
  --fixed-ips <fixed-ips>
                        New value for the fixed-ips quota
  --injected-file-size <injected-file-size>
                        New value for the injected-file-size quota
  --server-group-members <server-group-members>
                        New value for the server-group-members quota
  --injected-files <injected-files>
                        New value for the injected-files quota
  --cores <cores>       New value for the cores quota
  --injected-path-size <injected-path-size>
                        New value for the injected-path-size quota
  --gigabytes <gigabytes>
                        New value for the gigabytes quota
  --volumes <volumes>   New value for the volumes quota
  --snapshots <snapshots>
                        New value for the snapshots quota
  --subnetpools <subnetpools>
                        New value for the subnetpools quota
  --vips <vips>         New value for the vips quota
  --members <members>   New value for the members quota
  --ports <ports>       New value for the ports quota
  --subnets <subnets>   New value for the subnets quota
  --networks <networks>
                        New value for the networks quota
  --floating-ips <floating-ips>
                        New value for the floating-ips quota
  --health-monitors <health-monitors>
                        New value for the health-monitors quota
  --secgroup-rules <secgroup-rules>
                        New value for the secgroup-rules quota
  --secgroups <secgroups>
                        New value for the secgroups quota
  --routers <routers>   New value for the routers quota
  --rbac-policies <rbac-policies>
                        New value for the rbac-policies quota
  --volume-type <volume-type>
                        Set quotas for a specific <volume-type>


4. Just to make sure that there were no issues in the environment itself, I also tried setting some other quotas as well and they seemed to have worked just fine:

[stack@instack ~]$ openstack quota set --floating-ips 45 0252c9a6027a44d48f1cb3e025c92c1b
[stack@instack ~]$ openstack quota show
+----------------------+----------------------------------+
| Field                | Value                            |
+----------------------+----------------------------------+
| backup_gigabytes     | 1000                             |
| backups              | 10                               |
| cores                | 20                               |
| fixed-ips            | -1                               |
| floating-ips         | 45                               |
| gigabytes            | 1000                             |
| gigabytes_nfstype    | -1                               |
| graph                | -1                               |
| healthmonitor        | -1                               |
| injected-file-size   | 10240                            |
| injected-files       | 5                                |
| injected-path-size   | 255                              |
| instances            | 10                               |
| key-pairs            | 100                              |
| l7policy             | -1                               |
| listener             | 25                               |
| loadbalancer         | 25                               |
| networks             | 10                               |
| per_volume_gigabytes | -1                               |
| pool                 | 25                               |
| ports                | 50                               |
| project              | 0252c9a6027a44d48f1cb3e025c92c1b |
| properties           | 128                              |
| ram                  | 51200                            |
| rbac-policies        | 10                               |
| routers              | 10                               |
| secgroup-rules       | 100                              |
| secgroups            | 10                               |
| server-group-members | 10                               |
| server-groups        | 10                               |
| snapshots            | 10                               |
| snapshots_nfstype    | -1                               |
| subnetpools          | -1                               |
| subnets              | 10                               |
| trunk                | -1                               |
| volumes              | 25                               |
| volumes_nfstype      | -1                               |
+----------------------+----------------------------------+

[stack@instack ~]$ openstack quota set --routers 55 0252c9a6027a44d48f1cb3e025c92c1b
[stack@instack ~]$ openstack quota show
+----------------------+----------------------------------+
| Field                | Value                            |
+----------------------+----------------------------------+
| backup_gigabytes     | 1000                             |
| backups              | 10                               |
| cores                | 20                               |
| fixed-ips            | -1                               |
| floating-ips         | 45                               |
| gigabytes            | 1000                             |
| gigabytes_nfstype    | -1                               |
| graph                | -1                               |
| healthmonitor        | -1                               |
| injected-file-size   | 10240                            |
| injected-files       | 5                                |
| injected-path-size   | 255                              |
| instances            | 10                               |
| key-pairs            | 100                              |
| l7policy             | -1                               |
| listener             | 25                               |
| loadbalancer         | 25                               |
| networks             | 10                               |
| per_volume_gigabytes | -1                               |
| pool                 | 25                               |
| ports                | 50                               |
| project              | 0252c9a6027a44d48f1cb3e025c92c1b |
| properties           | 128                              |
| ram                  | 51200                            |
| rbac-policies        | 10                               |
| routers              | 55                               |
| secgroup-rules       | 100                              |
| secgroups            | 10                               |
| server-group-members | 10                               |
| server-groups        | 10                               |
| snapshots            | 10                               |
| snapshots_nfstype    | -1                               |
| subnetpools          | -1                               |
| subnets              | 10                               |
| trunk                | -1                               |
| volumes              | 25                               |
| volumes_nfstype      | -1                               |
+----------------------+----------------------------------+


Actual results:
Can not update load balancer V2 quotas with openstack commands

Expected results:

Load Balancer V2 quota update operations should work fine with the openstack commands

Additional info:

Comment 4 Nir Magnezi 2017-09-10 09:55:22 UTC
Can you please try to use:
python-neutronclient-6.0.0-3.el7ost (bug 1482684)
openstack-neutron-lbaas-9.2.1-4.el7ost (bug 1482678)

The very same customer case was initially filed OSP8 (bug 1478116) and while I investigated for RCA, I've found it's an issue at OSP10 OSP9 and OSP8

Therefore, backported fixed for all of those versions:

OSP8: bug 1482671 and bug 1478116
OSP9: bug 1482599 and bug 1482587
OSP10: bug 1482678 and bug 1482684 (as mentioned above)

Comment 10 Nir Magnezi 2017-10-02 10:38:05 UTC
Tested okay using both builds (client and server) mentioned in bug 1482678 and bug 1482684.

*** This bug has been marked as a duplicate of bug 1482684 ***