[Openstack] [Neutron] QoS bandwidth rate limit a gateway port created by a Neutron virtual router

Sam Stoelinga sammiestoel at gmail.com
Thu Jan 8 08:45:40 UTC 2015


Hi,

I am trying to rate limit a port which is the gateway of a Neutron virtual
router without success.

I have created a virtual router with 2 ports:
ip netns exec qrouter-6a080f37-4da0-4646-ad36-062b748d15be ip a
10: qg-4bda7108-d2: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UNKNOWN
    link/ether fa:16:3e:95:cc:7b brd ff:ff:ff:ff:ff:ff
    inet 8.8.8.8/27 brd 119.81.159.223 scope global qg-4bda7108-d2
    inet 8.8.8.9/32 brd 119.81.159.207 scope global qg-4bda7108-d2
    inet 8.8.8.10/32 brd 119.81.159.209 scope global qg-4bda7108-d2
    inet6 fe80::f816:3eff:fe95:cc7b/64 scope link
       valid_lft forever preferred_lft forever
16: qr-a9b3962f-d4: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UNKNOWN
    link/ether fa:16:3e:c2:64:dd brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.1/24 brd 192.168.99.255 scope global qr-a9b3962f-d4
    inet6 fe80::f816:3eff:fec2:64dd/64 scope link
       valid_lft forever preferred_lft forever

Now I want to rate limit the port qr-a9b3962f-d4 so that I can efficiently
rate limit the upstream connection of all instances using the virtual
router to connect to the internet. I have tried both to use the
ingress_policy_rate and to use the QoS queues without success.

These were the commands I tried to use QoS queues:
(Using Default queue, doesn't work)
ovs-vsctl set port qr-a9b3962f-d4 qos=@newqos -- --id=@newqos create qos
type=linux-htb queues=0=@q0 -- --id=@q0 create queue
other-config:min-rate=1000000 other-config:max-rate=1000000
download rate was not limited to 1 mbitps

(Using specific queue and modify the flow to enqueue based on FAQ also
doesn't work)
ovs-vsctl set port qr-a9b3962f-d4 qos=@newqos -- --id=@newqos create qos
type=linux-htb queues=0=@q0 -- --id=@q0 create queue
other-config:min-rate=1000000 other-config:max-rate=1000000
ovs-ofctl add-flow br-int out_port=12,actions=set_queue:0,normal
download rate was not limited to 1 mbitps

Now what does work is if I go to the compute node and apply QoS on the
instance port directly like this:
ovs-vsctl set port {{port of instance}} qos=@newqos -- --id=@newqos create
qos type=linux-htb queues=0=@q0 -- --id=@q0 create queue
other-config:min-rate=1000000 other-config:max-rate=1000000
the above command immediately limits the download rate to 1 mbitps

Does anybody know what I'm doing wrong? I also posted a question on
stackexchange:
http://unix.stackexchange.com/questions/177680/is-traffic-control-inside-namespace-on-ports-created-by-openvswitch-supported
which
shows that TC isn't working on interfaces created by openvswitch in a
namespace, which may be the root cause.

Help is greatly appreciated! Thanks in advance.

See related br-int:
    Bridge br-int
        Port int-br-ex
            Interface int-br-ex
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port br-int
            Interface br-int
                type: internal
        Port "tap5074e9db-25"
            tag: 2
            Interface "tap5074e9db-25"
                type: internal
        Port "tap7f0b82cf-b1"
            tag: 3
            Interface "tap7f0b82cf-b1"
                type: internal
        Port "tap842b6685-8c"
            tag: 1
            Interface "tap842b6685-8c"
                type: internal
        Port "qr-a9b3962f-d4"
            tag: 1
            Interface "qr-a9b3962f-d4"
                type: internal
        Port "qr-abc388da-cf"
            tag: 2
            Interface "qr-abc388da-cf"
                type: internal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150108/446054be/attachment.html>


More information about the Openstack mailing list