Creating QoS policies
Prerequisites
- A clear understanding of QoS policy rules, which are explained in QoS policy rules.
- To create a QoS policy as a system or domain administrator, ensure that the environment file for this user is created, as described in Connecting to OpenStack command-line interface.
To create a QoS policy with rules
-
Create a QoS policy:
-
If you are creating a policy as a system administrator
-
Use the environment file for the system administrator:
# source /etc/kolla/admin-openrc.sh
-
Create a QoS policy within a project it will be applied to. For example:
# openstack --insecure network qos policy create --project 3823a2d908ea4dd6909a8f93a6f66018 policy1
-
-
If you are creating a policy as a domain administrator
-
Use the environment file for the domain administrator. For example:
# source domain-admin.sh
-
Use the project name variable for the project where you want to create a QoS policy. For example:
# export OS_PROJECT_NAME=testproject
-
Create a QoS policy. For example:
# openstack --insecure network qos policy create policy1
-
-
-
Create a rule for the QoS policy:
-
To create a bandwidth limit, specify
bandwidth-limit
for the--type
option and specify rule parameters. For example, to limit the egress traffic to 3 Mbps, run:# openstack --insecure network qos rule create --type bandwidth-limit \ --max-kbps 3000 --max-burst-kbits 2400 --egress policy1 +----------------+--------------------------------------------------+ | Field | Value | +----------------+--------------------------------------------------+ | direction | egress | | id | 6f036f09-d952-420d-986b-27c7eb14b2da | | location | Munch({'project': Munch({'domain_name': Default, | | | 'domain_id': None, 'name': admin, | | | 'id': u'e215189c0472482f93e71d10e1245253'}), | | | 'cloud': '', 'region_name': '', 'zone': None}) | | max_burst_kbps | 2400 | | max_kbps | 3000 | | name | None | | project_id | | +----------------+--------------------------------------------------+
-
To create a minimum bandwidth guarantee, specify
minimum-bandwidth
for the--type
option and specify rule parameters. For example, to guarantee the minimum of 100 Kbps to the ingress traffic, run:# openstack --insecure network qos rule create --type minimum-bandwidth \ --min-kbps 1000 --ingress policy1 +------------+--------------------------------------------------+ | Field | Value | +------------+--------------------------------------------------+ | direction | ingress | | id | 4eb79c67-e2b7-4ee7-845c-4cbe39f095cd | | location | Munch({'project': Munch({'domain_name': Default, | | | 'domain_id': None, 'name': admin, | | | 'id': u'e215189c0472482f93e71d10e1245253'}), | | | 'cloud': '', 'region_name': '', 'zone': None}) | | min_kbps | 1000 | | name | None | | project_id | | +------------+--------------------------------------------------+
-