instance ingress bandwidth limiting doesn't works in ocata.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Invalid
|
Undecided
|
Unassigned | ||
Ocata |
Fix Released
|
Wishlist
|
Unassigned | ||
neutron |
Fix Released
|
Undecided
|
Unassigned | ||
neutron (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[Environment]
Xenial-Ocata deployment
[Description]
The instance ingress bandwidth limit implementation was targeted for Ocata [0], but the full implementation ingress/egress was done during the pike [1] cycle.
However, isn't reported or explicit that ingress direction isn't supported in ocata, which causes the following exception when --ingress is specified.
It would be desirable for this feature to be available on Ocata for being able to
set ingress/egress bandwidth limits on the ports.
[Testing]
Without these patches, trying to set a ingress bandwidth-limit rule
the following exception will be raised.
$ openstack network qos rule create --type bandwidth-limit --max-kbps 300 --max-burst-kbits 300 --ingress bw-limiter
Failed to create Network QoS rule: BadRequestExcep
A single policy set (without the --ingress parameter) as supported in Ocata will just create a limiter on the egress side.
1) Check the policy list
$ openstack network qos policy list
+------
| ID | Name | Shared | Default | Project |
+------
| 2c9c85e2-
+------
2) Check that the qoes rule is set to 300 kbps.
$ openstack network qos rule list 2c9c85e2-
| 01eb228d-
3) Set the Qos policy on any port.
$ openstack port set 9a74b3c8-
$ openstack port show 9a74b3c8-
| qos_policy_id | 2c9c85e2-
4) Check that the egress traffic rules have been applied
# iperf3 -c 192.168.21.9 -t 10
Connecting to host 192.168.21.9, port 5201
[ 4] local 192.168.21.3 port 34528 connected to 192.168.21.9 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 121 KBytes 988 Kbits/sec 23 2.44 KBytes
[ 4] 7.00-8.00 sec 40.2 KBytes 330 Kbits/sec 14 3.66 KBytes
[ 4] 8.00-9.00 sec 36.6 KBytes 299 Kbits/sec 15 2.44 KBytes
[ 4] 9.00-10.00 sec 39.0 KBytes 320 Kbits/sec 18 3.66 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 435 KBytes 356 Kbits/sec 159 sender
[ 4] 0.00-10.00 sec 384 KBytes 314 Kbits/sec receiver
iperf Done.
5) Check that no ingress traffic limit has been applied.
# iperf3 -c 192.168.21.9 -R -t 10
Connecting to host 192.168.21.9, port 5201
Reverse mode, remote host 192.168.21.9 is sending
[ 4] local 192.168.21.3 port 34524 connected to 192.168.21.9 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 38.1 MBytes 319 Mbits/sec
[ 4] 8.00-9.00 sec 74.6 MBytes 626 Mbits/sec
[ 4] 9.00-10.00 sec 73.2 MBytes 614 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 1.07 GBytes 918 Mbits/sec 1045 sender
[ 4] 0.00-10.00 sec 1.07 GBytes 916 Mbits/sec receiver
--->
6) With the patches applied from the PPA or proposed, run the migration steps on the neutron-api node, repeat the previous steps, but make sure to specify the traffic direction with --ingress as follows:
$ openstack network qos rule create --type bandwidth-limit --max-kbps 300 --ingress testing-policy
+------
| Field | Value |
+------
| direction | ingress |
| id | 6d01cefa-
| max_burst_kbps | 0 |
| max_kbps | 300 |
| name | None |
| project_id | |
+------
7) Set the policy into any server port.
$ openstack port set 50b8f714-
8) Check that the policy has been applied
$ openstack port show 50b8f714-
| qos_policy_id | fac2be5e-
9) Check that the rules have the "Direction field"
$ openstack network qos rule list fac2be5e-
+------
| ID | QoS Policy ID | Type | Max Kbps | Max Burst Kbits | Min Kbps | DSCP mark | Direction |
+------
| 6d01cefa-
+------
10) Validate that the hypervisor has a ovs queue and qos setup set, max-rate should be set to 300000.
$ sudo ovs-vsctl list qos
_uuid : 2862acaa-
external_ids : {id="tap75d9538
other_config : {}
queues : {0=a15774f7-
type : linux-htb
root@juju-
_uuid : a15774f7-
dscp : []
external_ids : {id="tap75d9538
other_config : {burst="0", max-rate="300000"}
[0] https:/
[1] https:/
Changed in neutron: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
assignee: | Rodolfo Alonso (rodolfo-alonso-hernandez) → nobody |
Changed in neutron (Ubuntu): | |
status: | New → Fix Released |
Changed in neutron: | |
status: | Invalid → Fix Released |
Changed in neutron (Ubuntu Xenial): | |
status: | New → Invalid |
Changed in cloud-archive: | |
status: | New → Invalid |
### Notes ####
The following is an example of how ingress/egress rules are applied
on > pike
130 ubuntu@ niedbalski- bastion: ~/stsstack- bundles/ openstack$ neutron qos-policy-create bw-limiter ------- ----+-- ------- ------- ------- ------- ------- -+ ------- ----+-- ------- ------- ------- ------- ------- -+ 23T17:10: 52Z | eca2-4d9f- 8fdf-9a914b8cea 12 | f90a7a32e0d942d a4 | f90a7a32e0d942d a4 | 23T17:10: 52Z | ------- ----+-- ------- ------- ------- ------- ------- -+
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new policy:
+------
| Field | Value |
+------
| created_at | 2019-08-
| description | |
| id | 9847ba6f-
| is_default | False |
| name | bw-limiter |
| project_id | 8280dd071ff74ca
| revision_number | 0 |
| rules | |
| shared | False |
| tags | |
| tenant_id | 8280dd071ff74ca
| updated_at | 2019-08-
+------
ubuntu@ niedbalski- bastion: ~/stsstack- bundles/ openstack$ neutron qos-bandwidth- limit-rule- create bw-limiter --max-kbps 300 --max-burst-kbps 300 limit_rule: ------- ---+--- ------- ------- ------- ------- ------- + ------- ---+--- ------- ------- ------- ------- ------- + 9cb9-421a- a53d-107abf57f9 14 | ------- ---+--- ------- ------- ------- ------- ------- +
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new bandwidth_
+------
| Field | Value |
+------
| direction | egress |
| id | 749a6867-
| max_burst_kbps | 300 |
| max_kbps | 300 |
+------
ubuntu@ niedbalski- bastion: ~/stsstack- bundles/ openstack$ openstack network qos policy list ------- ------- ------- ------- ----+-- ------- ---+--- -----+- ------- -+----- ------- ------- ------- ------- -+ ------- ------- ------- ------- ----+-- ------- ---+--- -----+- ------- -+----- ------- ------- ------- ------- -+ eca2-4d9f- 8fdf-9a914b8cea 12 | bw-limiter | False | False | 8280dd071ff74ca f90a7a32e0d942d a4 | ------- ------- ------- ------- ----+-- ------- ---+--- -----+- ------- -+----- ------- ------- ------- ------- -+
+------
| ID | Name | Shared | Default | Project |
+------
| 9847ba6f-
+------
ubuntu@ niedbalski- bastion: ~/stsstack- bundles/ openstack$ openstack network qos rule list 9847ba6f- eca2-4d9f- 8fdf-9a914b8cea 12 ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- -----+- ------- --+---- ------- ------+ ------- ---+--- ------- -+----- ------+ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- -----+- ------- --+---- ------- ------+ ------- ---+--. ..
+------
| ID | QoS Policy ID | Type | Max Kbps | Max Burst Kbits | Min Kbps | DSCP mark | Direction |
+------