Skip to content

Commit 0043b33

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "docs: Deindent code blocks" into stable/zed
2 parents c092e20 + 438e486 commit 0043b33

File tree

8 files changed

+728
-732
lines changed

8 files changed

+728
-732
lines changed

doc/source/admin/config-bgp-floating-ip-over-l2-segmented-network.rst

Lines changed: 209 additions & 211 deletions
Large diffs are not rendered by default.

doc/source/admin/config-logging.rst

Lines changed: 328 additions & 328 deletions
Large diffs are not rendered by default.

doc/source/admin/config-ovs-offload.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ network and has access to the private networks of all nodes.
166166
The PCI bus number of the PF (03:00.0) and VFs (03:00.2 .. 03:00.5)
167167
will be used later.
168168

169-
.. code-block::bash
169+
.. code-block:: bash
170170
171171
# lspci | grep Ethernet
172172
03:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
@@ -176,7 +176,6 @@ network and has access to the private networks of all nodes.
176176
03:00.4 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5 Virtual Function]
177177
03:00.5 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5 Virtual Function]
178178
179-
180179
.. code-block:: bash
181180
182181
# ip link show enp3s0f0

doc/source/admin/config-qos.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,12 @@ On the network and compute nodes:
267267
[agent]
268268
extensions = fip_qos, gateway_ip_qos
269269
270-
271270
#. As rate limit doesn't work on Open vSwitch's ``internal`` ports,
272271
optionally, as a workaround, to make QoS bandwidth limit work on
273272
router's gateway ports, set ``ovs_use_veth`` to ``True`` in ``DEFAULT``
274273
section in ``/etc/neutron/l3_agent.ini``
275274

276-
.. code-block:: ini
275+
.. code-block:: ini
277276
278277
[DEFAULT]
279278
ovs_use_veth = True

doc/source/admin/ovn/routed_provider_networks.rst

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,55 @@ For example, in the OVN Northbound database, this is how a VLAN
1616
Provider Network with two segments (VLAN: 100, 200) is related to their
1717
``Logical_Switch`` counterpart:
1818

19-
.. code-block:: bash
19+
.. code-block:: bash
2020
21-
$ ovn-nbctl list logical_switch public
22-
_uuid : 983719e5-4f32-4fb0-926d-46291457ca41
23-
acls : []
24-
dns_records : []
25-
external_ids : {"neutron:mtu"="1450", "neutron:network_name"=public, "neutron:revision_number"="3"}
26-
forwarding_groups : []
27-
load_balancer : []
28-
name : neutron-6c8be12a-9ed0-4ac4-8130-cb8fad83cd46
29-
other_config : {mcast_flood_unregistered="false", mcast_snoop="true"}
30-
ports : [81bce1ab-87f8-4ed5-8163-f16701499dfe, b23d0c2e-773b-4ecb-8306-53d117006a7b]
31-
qos_rules : []
21+
$ ovn-nbctl list logical_switch public
22+
_uuid : 983719e5-4f32-4fb0-926d-46291457ca41
23+
acls : []
24+
dns_records : []
25+
external_ids : {"neutron:mtu"="1450", "neutron:network_name"=public, "neutron:revision_number"="3"}
26+
forwarding_groups : []
27+
load_balancer : []
28+
name : neutron-6c8be12a-9ed0-4ac4-8130-cb8fad83cd46
29+
other_config : {mcast_flood_unregistered="false", mcast_snoop="true"}
30+
ports : [81bce1ab-87f8-4ed5-8163-f16701499dfe, b23d0c2e-773b-4ecb-8306-53d117006a7b]
31+
qos_rules : []
3232
33-
$ ovn-nbctl list logical_switch_port 81bce1ab-87f8-4ed5-8163-f16701499dfe
34-
_uuid : 81bce1ab-87f8-4ed5-8163-f16701499dfe
35-
addresses : [unknown]
36-
dhcpv4_options : []
37-
dhcpv6_options : []
38-
dynamic_addresses : []
39-
enabled : []
40-
external_ids : {}
41-
ha_chassis_group : []
42-
name : provnet-96f663af-19fa-4c7e-a1b8-1dfdc9cd9e82
43-
options : {network_name=phys-net-1}
44-
parent_name : []
45-
port_security : []
46-
tag : 100
47-
tag_request : []
48-
type : localnet
49-
up : false
33+
$ ovn-nbctl list logical_switch_port 81bce1ab-87f8-4ed5-8163-f16701499dfe
34+
_uuid : 81bce1ab-87f8-4ed5-8163-f16701499dfe
35+
addresses : [unknown]
36+
dhcpv4_options : []
37+
dhcpv6_options : []
38+
dynamic_addresses : []
39+
enabled : []
40+
external_ids : {}
41+
ha_chassis_group : []
42+
name : provnet-96f663af-19fa-4c7e-a1b8-1dfdc9cd9e82
43+
options : {network_name=phys-net-1}
44+
parent_name : []
45+
port_security : []
46+
tag : 100
47+
tag_request : []
48+
type : localnet
49+
up : false
5050
51-
$ ovn-nbctl list logical_switch_port b23d0c2e-773b-4ecb-8306-53d117006a7b
52-
_uuid : b23d0c2e-773b-4ecb-8306-53d117006a7b
53-
addresses : [unknown]
54-
dhcpv4_options : []
55-
dhcpv6_options : []
56-
dynamic_addresses : []
57-
enabled : []
58-
external_ids : {}
59-
ha_chassis_group : []
60-
name : provnet-469cbc3d-8e06-4a8f-be3a-3fcdadfd398a
61-
options : {network_name=phys-net-2}
62-
parent_name : []
63-
port_security : []
64-
tag : 200
65-
tag_request : []
66-
type : localnet
67-
up : false
51+
$ ovn-nbctl list logical_switch_port b23d0c2e-773b-4ecb-8306-53d117006a7b
52+
_uuid : b23d0c2e-773b-4ecb-8306-53d117006a7b
53+
addresses : [unknown]
54+
dhcpv4_options : []
55+
dhcpv6_options : []
56+
dynamic_addresses : []
57+
enabled : []
58+
external_ids : {}
59+
ha_chassis_group : []
60+
name : provnet-469cbc3d-8e06-4a8f-be3a-3fcdadfd398a
61+
options : {network_name=phys-net-2}
62+
parent_name : []
63+
port_security : []
64+
tag : 200
65+
tag_request : []
66+
type : localnet
67+
up : false
6868
6969
7070
As you can see, the two ``localnet`` ports are configured with a
@@ -73,10 +73,10 @@ VLAN tag and are related to a single ``Logical_Switch`` entry. When
7373
node it's running on it will create a patch port to the provider bridge
7474
accordingly to the bridge mappings configuration.
7575

76-
.. code-block:: bash
76+
.. code-block:: bash
7777
78-
compute-1: bridge-mappings = segment-1:br-provider1
79-
compute-2: bridge-mappings = segment-2:br-provider2
78+
compute-1: bridge-mappings = segment-1:br-provider1
79+
compute-2: bridge-mappings = segment-2:br-provider2
8080
8181
For example, when a port in the multisegment network gets bound to
8282
compute-1, ovn-controller will create a patch-port between br-int and

doc/source/configuration/metering-agent.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ also called as legacy) have the following format; bear in mind that if labels
4242
are shared, then the counters are for all routers of all projects where the
4343
labels were applied.
4444

45-
.. code-block:: json
46-
47-
{
48-
"pkts": "<the number of packets that matched the rules of the labels>",
49-
"bytes": "<the number of bytes that matched the rules of the labels>",
50-
"time": "<seconds between the first data collection and the last one>",
51-
"first_update": "timeutils.utcnow_ts() of the first collection",
52-
"last_update": "timeutils.utcnow_ts() of the last collection",
53-
"host": "<neutron metering agent host name>",
54-
"label_id": "<the label id>",
55-
"tenant_id": "<the tenant id>"
56-
}
45+
.. code-block:: json
46+
47+
{
48+
"pkts": "<the number of packets that matched the rules of the labels>",
49+
"bytes": "<the number of bytes that matched the rules of the labels>",
50+
"time": "<seconds between the first data collection and the last one>",
51+
"first_update": "timeutils.utcnow_ts() of the first collection",
52+
"last_update": "timeutils.utcnow_ts() of the last collection",
53+
"host": "<neutron metering agent host name>",
54+
"label_id": "<the label id>",
55+
"tenant_id": "<the tenant id>"
56+
}
5757
5858
The ``first_update`` and ``last_update`` timestamps represent the moment
5959
when the first and last data collection happened within the report interval.
@@ -129,21 +129,21 @@ legacy mode such as ``bytes``, ``pkts``, ``time``, ``first_update``,
129129
``last_update``, and ``host``. As follows we present an example of JSON message
130130
with all of the possible attributes.
131131

132-
.. code-block:: json
133-
134-
{
135-
"resource_id": "router-f0f745d9a59c47fdbbdd187d718f9e41-label-00c714f1-49c8-462c-8f5d-f05f21e035c7",
136-
"project_id": "f0f745d9a59c47fdbbdd187d718f9e41",
137-
"first_update": 1591058790,
138-
"bytes": 0,
139-
"label_id": "00c714f1-49c8-462c-8f5d-f05f21e035c7",
140-
"label_name": "test1",
141-
"last_update": 1591059037,
142-
"host": "<hostname>",
143-
"time": 247,
144-
"pkts": 0,
145-
"label_shared": true
146-
}
132+
.. code-block:: json
133+
134+
{
135+
"resource_id": "router-f0f745d9a59c47fdbbdd187d718f9e41-label-00c714f1-49c8-462c-8f5d-f05f21e035c7",
136+
"project_id": "f0f745d9a59c47fdbbdd187d718f9e41",
137+
"first_update": 1591058790,
138+
"bytes": 0,
139+
"label_id": "00c714f1-49c8-462c-8f5d-f05f21e035c7",
140+
"label_name": "test1",
141+
"last_update": 1591059037,
142+
"host": "<hostname>",
143+
"time": 247,
144+
"pkts": 0,
145+
"label_shared": true
146+
}
147147
148148
The ``resource_id`` is a unique identified for the "resource" being
149149
monitored. Here we consider a resource to be any of the granularities that
@@ -156,4 +156,4 @@ As follows we present all of the possible configuration one can use in the
156156
metering agent init file.
157157

158158
.. show-options::
159-
:config-file: etc/oslo-config-generator/metering_agent.ini
159+
:config-file: etc/oslo-config-generator/metering_agent.ini

doc/source/contributor/internals/ovn/ovn_network_logging.rst

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ manage affected security group rules. Thus, there is no need for an agent.
1010
It is good to keep in mind that Openstack Security Groups (SG) and their rules
1111
(SGR) map 1:1 into OVN's Port Groups (PG) and Access Control Lists (ACL):
1212

13-
.. code-block:: none
13+
.. code-block:: none
1414
15-
Openstack Security Group <=> OVN Port Group
16-
Openstack Security Group Rule <=> OVN ACL
15+
Openstack Security Group <=> OVN Port Group
16+
Openstack Security Group Rule <=> OVN ACL
1717
1818
Just like SGs have a list of SGRs, PGs have a list of ACLs. PGs also have
1919
a list of logical ports, but that is not really relevant in this context.
@@ -50,22 +50,22 @@ https://github.com/ovn-org/ovn/commit/880dca99eaf73db7e783999c29386d03c82093bf
5050
Below is an example of a meter configuration in OVN. You can locate the fair,
5151
unit, burst_size, and rate attributes:
5252

53-
.. code-block:: bash
53+
.. code-block:: bash
5454
55-
$ ovn-nbctl list meter
56-
_uuid : 70c76ba9-f303-471b-9d49-25dee299827f
57-
bands : [f114c205-a170-4425-8ca6-4e71099d1955]
58-
external_ids : {"neutron:device_owner"=logging-plugin}
59-
fair : true
60-
name : acl_log_meter
61-
unit : pktps
55+
$ ovn-nbctl list meter
56+
_uuid : 70c76ba9-f303-471b-9d49-25dee299827f
57+
bands : [f114c205-a170-4425-8ca6-4e71099d1955]
58+
external_ids : {"neutron:device_owner"=logging-plugin}
59+
fair : true
60+
name : acl_log_meter
61+
unit : pktps
6262
63-
$ ovn-nbctl list meter-band
64-
_uuid : f114c205-a170-4425-8ca6-4e71099d1955
65-
action : drop
66-
burst_size : 25
67-
external_ids : {}
68-
rate : 100
63+
$ ovn-nbctl list meter-band
64+
_uuid : f114c205-a170-4425-8ca6-4e71099d1955
65+
action : drop
66+
burst_size : 25
67+
external_ids : {}
68+
rate : 100
6969
7070
The burst_size and rate attributes are configurable through
7171
neutron.conf.services.logging.log_driver_opts. That is not new.
@@ -78,39 +78,39 @@ Moreover, there are a few attributes in each ACL that makes it able to
7878
provide the networking logging feature. Let's use the example below
7979
to point out the relevant fields:
8080

81-
.. code-block:: none
82-
83-
$ openstack network log create --resource-type security_group \
84-
--resource ${SG} --event ACCEPT logme -f value -c ID
85-
2e456c7f-154e-40a8-bb10-f88ba51b90b5
86-
87-
$ openstack security group show ${SG} -f json -c rules | jq '.rules | .[2]' | grep -v 'null'
88-
{
89-
"id": "de4ea1e4-c946-40ed-b5b6-53c59418dc0b",
90-
"tenant_id": "2600067ea3a446dba332d20a30ed44fa",
91-
"security_group_id": "c604e984-0789-4c9a-a297-3e7f62fa73fd",
92-
"ethertype": "IPv4",
93-
"direction": "egress",
94-
"standard_attr_id": 48,
95-
"tags": [],
96-
"created_at": "2021-02-06T22:17:44Z",
97-
"updated_at": "2021-02-06T22:17:44Z",
98-
"revision_number": 0,
99-
"project_id": "2600067ea3a446dba332d20a30ed44fa"
100-
}
101-
102-
$ ovn-nbctl find acl \
103-
"external_ids:\"neutron:security_group_rule_id\""="de4ea1e4-c946-40ed-b5b6-53c59418dc0b"
104-
_uuid : 791679e9-237d-4732-a31e-aa634496e02b
105-
action : allow-related
106-
direction : from-lport
107-
external_ids : {"neutron:security_group_rule_id"="de4ea1e4-c946-40ed-b5b6-53c59418dc0b"}
108-
log : true
109-
match : "inport == @pg_c604e984_0789_4c9a_a297_3e7f62fa73fd && ip4"
110-
meter : acl_log_meter
111-
name : neutron-2e456c7f-154e-40a8-bb10-f88ba51b90b5
112-
priority : 1002
113-
severity : info
81+
.. code-block:: none
82+
83+
$ openstack network log create --resource-type security_group \
84+
--resource ${SG} --event ACCEPT logme -f value -c ID
85+
2e456c7f-154e-40a8-bb10-f88ba51b90b5
86+
87+
$ openstack security group show ${SG} -f json -c rules | jq '.rules | .[2]' | grep -v 'null'
88+
{
89+
"id": "de4ea1e4-c946-40ed-b5b6-53c59418dc0b",
90+
"tenant_id": "2600067ea3a446dba332d20a30ed44fa",
91+
"security_group_id": "c604e984-0789-4c9a-a297-3e7f62fa73fd",
92+
"ethertype": "IPv4",
93+
"direction": "egress",
94+
"standard_attr_id": 48,
95+
"tags": [],
96+
"created_at": "2021-02-06T22:17:44Z",
97+
"updated_at": "2021-02-06T22:17:44Z",
98+
"revision_number": 0,
99+
"project_id": "2600067ea3a446dba332d20a30ed44fa"
100+
}
101+
102+
$ ovn-nbctl find acl \
103+
"external_ids:\"neutron:security_group_rule_id\""="de4ea1e4-c946-40ed-b5b6-53c59418dc0b"
104+
_uuid : 791679e9-237d-4732-a31e-aa634496e02b
105+
action : allow-related
106+
direction : from-lport
107+
external_ids : {"neutron:security_group_rule_id"="de4ea1e4-c946-40ed-b5b6-53c59418dc0b"}
108+
log : true
109+
match : "inport == @pg_c604e984_0789_4c9a_a297_3e7f62fa73fd && ip4"
110+
meter : acl_log_meter
111+
name : neutron-2e456c7f-154e-40a8-bb10-f88ba51b90b5
112+
priority : 1002
113+
severity : info
114114
115115
The first command creates a networking-log for a given SG. The second shows an SGR from that SG.
116116
The third shell command is where we can see how the ACL with the meter information gets populated.
@@ -128,14 +128,14 @@ These are the attributes pertinent to network logging:
128128
If we poked the SGR with packets that match its criteria, the ovn-controller local to where the ACLs
129129
is enforced will log something that looks like this:
130130

131-
.. code-block:: none
131+
.. code-block:: none
132132
133-
2021-02-16T11:59:00.640Z|00045|acl_log(ovn_pinctrl0)|INFO|
134-
name="neutron-2e456c7f-154e-40a8-bb10-f88ba51b90b5",
135-
verdict=allow, severity=info: icmp,vlan_tci=0x0000,dl_src=fa:16:3e:24:dc:88,
136-
dl_dst=fa:16:3e:15:6d:e0,
137-
nw_src=10.0.0.12,nw_dst=10.0.0.11,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,
138-
icmp_code=0
133+
2021-02-16T11:59:00.640Z|00045|acl_log(ovn_pinctrl0)|INFO|
134+
name="neutron-2e456c7f-154e-40a8-bb10-f88ba51b90b5",
135+
verdict=allow, severity=info: icmp,vlan_tci=0x0000,dl_src=fa:16:3e:24:dc:88,
136+
dl_dst=fa:16:3e:15:6d:e0,
137+
nw_src=10.0.0.12,nw_dst=10.0.0.11,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,
138+
icmp_code=0
139139
140140
It is beyond the scope of this document to talk about what happens after the logs are generated
141141
by ovn-controllers. The harvesting of files across compute nodes is something a project like

0 commit comments

Comments
 (0)