ovn-controller(8)

๐Ÿ’– ovn-controller โ€” the manual, but make it make sense ๐Ÿ’–

ovn-controller(8) ยท OVN Manual ยท bestie edition โœจ


๐ŸŒธ NAME ๐ŸŒธ

ovn-controller โ€” the Open Virtual Network local controller. she's the girl on the ground, the one actually doing the work ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

ovn-controller [options] [ovs-database]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so. ovn-controller is the local controller daemon for OVN, aka the Open Virtual Network. she's got two jobs and she's doing both of them at the same time, no cap.

Upward ๐ŸŒˆ she connects to the OVN Southbound database (see ovn-sb(5)) over the OVSDB protocol.

Downward ๐ŸŒธ she connects to the Open vSwitch database (see ovs-vswitchd.conf.db(5)) over the OVSDB protocol, and also to ovs-vswitchd(8) via OpenFlow.

the way that every single hypervisor and software gateway in an OVN deployment runs its own independent copy of ovn-controllerโ€ฆ iconic. which means her downward connections are machine-local and do not run over a physical network. local girl, local business ๐Ÿ’…


๐Ÿ’€ ACL LOGGING ๐Ÿ’€

ACL log messages get logged through ovn-controller's logging mechanism. ACL log entries have the module acl_log at log level info. how do you configure logging, you ask? it's described below in the Logging Options section, keep reading bestie ๐Ÿซถ


โœจ OPTIONS โœจ

๐Ÿ‘‘ Daemon Options

  • --pidfile[=pidfile] โ€” causes a file (by default, program.pid) to be created indicating the PID of the running process. if the pidfile argument isn't specified, or if it doesn't begin with /, then it is created in .

if --pidfile is not specified, no pidfile is created. periodt.

  • --overwrite-pidfile โ€” by default, when --pidfile is specified and that pidfile already exists and is locked by a running process, the daemon refuses to start. specify --overwrite-pidfile and instead she'll overwrite the pidfile. slay.

when --pidfile is not specified, this option has no effect.

  • --detach โ€” runs this program as a background process. the process forks, and in the child it starts a new session, closes the standard file descriptors (which has the side effect of disabling logging to the console), and changes its current directory to the root (unless --no-chdir is specified). after the child completes its initialization, the parent exits. bye mom ๐Ÿ‘‹
  • --monitor โ€” creates an additional process to monitor this program. if it dies due to a signal that indicates a programming error (SIGABRT, SIGALRM, SIGBUS, SIGFPE, SIGILL, SIGPIPE, SIGSEGV, SIGXCPU, or SIGXFSZ) then the monitor process starts a new copy of it. if the daemon dies or exits for another reason, the monitor process exits.

this option is normally used with --detach, but it also functions without it. versatile queen โœจ

  • --no-chdir โ€” by default, when --detach is specified, the daemon changes its current working directory to the root directory after it detaches. otherwise, invoking the daemon from a carelessly chosen directory would prevent the administrator from unmounting the file system that holds that directory. ๐Ÿ˜ญ

specifying --no-chdir suppresses this behavior, preventing the daemon from changing its current working directory. this may be useful for collecting core files, since it's common behavior to write core dumps into the current working directory and the root directory is not a good directory to use.

this option has no effect when --detach is not specified.
  • --no-self-confinement โ€” by default this daemon will try to self-confine itself to work with files under well-known directories determined at build time. it is better to stick with this default behavior and not to use this flag unless some other Access Control is used to confine daemon. note that in contrast to other access control implementations that are typically enforced from kernel-space (e.g. DAC or MAC), self-confinement is imposed from the user-space daemon itself and hence should not be considered as a full confinement strategy, but instead should be viewed as an additional layer of security. ๐Ÿ”’
  • --user=user:group โ€” causes this program to run as a different user specified in user:group, thus dropping most of the root privileges. short forms user and :group are also allowed, with current user or group assumed, respectively. only daemons started by the root user accepts this argument.

on Linux, daemons will be granted CAP_IPC_LOCK and CAP_NET_BIND_SERVICES before dropping root privileges. daemons that interact with a datapath, such as ovs-vswitchd, will be granted three additional capabilities, namely CAP_NET_ADMIN, CAP_NET_BROADCAST and CAP_NET_RAW. the capability change will apply even if the new user is root. ๐Ÿ‘‘


๐ŸŒˆ Logging Options

  • -v[spec] --verbose=[spec] โ€” sets logging levels. without any spec, sets the log level for every module and destination to dbg. otherwise, spec is a list of words separated by spaces or commas or colons, up to one from each category below:
    • a valid module name, as displayed by the vlog/list command on ovs-appctl(8), limits the log level change to the specified module.
    • syslog, console, or file, to limit the log level change to only to the system log, to the console, or to a file, respectively. (if --detach is specified, the daemon closes its standard file descriptors, so logging to the console will have no effect.)
    • off, emer, err, warn, info, or dbg, to control the log level. messages of the given severity or higher will be logged, and messages of lower severity will be filtered out. off filters out all messages. see ovs-appctl(8) for a definition of each log level.

case is not significant within spec.

regardless of the log levels set for file, logging to a file will not take place unless --log-file is also specified (see below).

for compatibility with older versions of OVS, any is accepted as a word but has no effect. (she's just there for the vibes ๐Ÿ’…)

  • -v --verbose โ€” sets the maximum logging verbosity level, equivalent to --verbose=dbg.
  • -vPATTERN:destination:pattern --verbose=PATTERN:destination:pattern โ€” sets the log pattern for destination to pattern. refer to ovs-appctl(8) for a description of the valid syntax for pattern.
  • -vFACILITY:facility --verbose=FACILITY:facility โ€” sets the RFC5424 facility of the log message. facility can be one of kern, user, mail, daemon, auth, syslog, lpr, news, uucp, clock, ftp, ntp, audit, alert, clock2, local0, local1, local2, local3, local4, local5, local6 or local7. if this option is not specified, daemon is used as the default for the local system syslog and local0 is used while sending a message to the target provided via the --syslog-target option.
  • --log-file[=file] โ€” enables logging to a file. if file is specified, then it is used as the exact name for the log file. the default log file name used if file is omitted is /var/log/ovn/program.log. ๐Ÿ“
  • --syslog-target=host:port โ€” send syslog messages to UDP port on host, in addition to the system syslog. the host must be a numerical IP address, not a hostname.
  • --syslog-method=method โ€” specify method as how syslog messages should be sent to syslog daemon. the following forms are supported:
    • libc, to use the libc syslog() function. downside of using this options is that libc adds fixed prefix to every message before it is actually sent to the syslog daemon over /dev/log UNIX domain socket.
    • unix:file, to use a UNIX domain socket directly. it is possible to specify arbitrary message format with this option. however, rsyslogd 8.9 and older versions use hard coded parser function anyway that limits UNIX domain socket use. if you want to use arbitrary message format with older rsyslogd versions, then use UDP socket to localhost IP address instead.
    • udp:ip:port, to use a UDP socket. with this method it is possible to use arbitrary message format also with older rsyslogd. when sending syslog messages over UDP socket extra precaution needs to be taken into account, for example, syslog daemon needs to be configured to listen on the specified UDP port, accidental iptables rules could be interfering with local syslog traffic and there are some security considerations that apply to UDP sockets, but do not apply to UNIX domain sockets.
    • null, to discard all messages logged to syslog.

the default is taken from the OVS_SYSLOG_METHOD environment variable; if it is unset, the default is libc.


๐Ÿ” PKI Options

PKI configuration is required in order to use SSL/TLS for the connections to the Northbound and Southbound databases. no PKI, no TLS, sorry bestie ๐Ÿ˜ญ

  • -p privkey.pem --private-key=privkey.pem โ€” specifies a PEM file containing the private key used as identity for outgoing SSL/TLS connections.
  • -c cert.pem --certificate=cert.pem โ€” specifies a PEM file containing a certificate that certifies the private key specified on -p or --private-key to be trustworthy. the certificate must be signed by the certificate authority (CA) that the peer in SSL/TLS connections will use to verify it.
  • -C cacert.pem --ca-cert=cacert.pem โ€” specifies a PEM file containing the CA certificate for verifying certificates presented to this program by SSL/TLS peers. (this may be the same certificate that SSL/TLS peers use to verify the certificate specified on -c or --certificate, or it may be a different one, depending on the PKI design in use.)
  • -C none --ca-cert=none โ€” disables verification of certificates presented by SSL/TLS peers.
โš ๏ธ this introduces a security risk, because it means that certificates cannot be verified to be those of known trusted hosts. do not do this unless you truly know what you're doing, fr fr.
  • --ssl-server-name=servername โ€” specifies the server name to use for TLS Server Name Indication (SNI). by default, the hostname from the connection string is used for SNI. this option allows overriding the SNI hostname, which is useful when connecting through proxies or service meshes where the connection endpoint differs from the intended server name. ๐Ÿงš

to be continuedโ€ฆ part 2 is coming, don't go anywhere ๐Ÿ’œ

  • --bootstrap-ca-cert=cacert.pem โ€” okay so if cacert.pem is already there, this does literally the exact same thing as -C or --ca-cert. If it is not there, then the executable goes and tries to obtain the CA certificate from the SSL/TLS peer on its very first SSL/TLS connection, and saves it into the named PEM file. And if that works out? It immediately drops the connection and reconnects, and from then on every single SSL/TLS connection must be authenticated by a certificate signed by the CA certificate it just grabbed. slay, but read on.
๐Ÿšจ Warning time, bestie: this option exposes the SSL/TLS connection to a man-in-the-middle attack obtaining that initial CA certificate. It may still be useful for bootstrapping, but like, that's the tradeoff, fr fr.

This option is only useful if the SSL/TLS peer actually sends its CA certificate as part of the SSL/TLS certificate chain. And here's the tea: SSL/TLS protocols do not require the server to send the CA certificate. So it's giving "hope for the best" ๐Ÿ™ˆ.

This option is mutually exclusive with -C and --ca-cert. Choose one, queen. ๐Ÿ’…

  • --peer-ca-cert=peer-cacert.pem โ€” this one specifies a PEM file that contains one or more additional certificates to send to SSL/TLS peers. And peer-cacert.pem should be the CA certificate used to sign the program's own certificate โ€” that is, the certificate you specified on -c or --certificate. If the program's certificate is self-signed, then --certificate and --peer-ca-cert should point at the same file. Same file! ๐Ÿ‘ฏ

Ngl, this option is not useful in normal operation, because the SSL/TLS peer must already have the CA certificate for the peer to have any confidence in the program's identity. But it does offer a way for a new installation to bootstrap the CA certificate on its first SSL/TLS connection. baby's first handshake ๐ŸŽ€


๐ŸŽ€ Other Options ๐ŸŽ€

  • --unixctl=socket โ€” sets the name of the control socket that the program listens on for runtime management commands (peep RUNTIME MANAGEMENT COMMANDS, below ๐Ÿ‘€). If socket does not begin with /, it is interpreted as relative to .. If --unixctl is not used at all, the default socket is /program.pid.ctl, where pid is the program's process ID.

And if you specify none for socket? That disables the control socket feature entirely. bye ๐Ÿ‘‹

  • -h, --help โ€” prints a brief help message to the console. classic.
  • -V, --version โ€” prints version information to the console. also classic.

๐Ÿ’– CONFIGURATION ๐Ÿ’–

okay so here's the whole vibe of how this thing gets configured. ovn-controller retrieves most of its configuration information from the local Open vSwitch's ovsdb-server instance. The default location is db.sock in the local Open vSwitch's "run" directory. You can override that by specifying the ovs-database argument as an OVSDB active or passive connection method, exactly as described in ovsdb(7).

ovn-controller assumes it gets configuration information from the following keys in the Open_vSwitch table of the local OVS instance:

  • external_ids:system-id โ€” the chassis name to use in the Chassis table. Changing the system-id while ovn-controller is running is not directly supported. You've got two options, bestie: either gracefully stop ovn-controller first, or manually delete the stale Chassis and Chassis_Private records after you change the system-id.

Also important: the chassis name can also be provided via the system-id-override file in the local OVN "etc" directory, or via the -n command-line option. And the precedence goes like this, in order:

  1. the command-line option is read;
  2. if it's not present, the system-id-override file is read;
  3. if that's not present, then the name configured in the database is used.
  • external_ids:hostname โ€” the hostname to use in the Chassis table. that's it, that's the key ๐Ÿซถ
  • external_ids:ovn-bridge โ€” the integration bridge to which logical ports are attached. The default is br-int. And if this bridge doesn't exist when ovn-controller starts, it'll be created automatically with the default configuration suggested in ovn-architecture(7).

Now, when more than one controller is running on the same host, external_ids:ovn-bridge-CHASSIS_NAME should be set for each of them, pointing to a unique bridge. This is required to avoid controllers stepping on each others' feet. no tripping, please ๐Ÿ™ˆ

  • external_ids:ovn-bridge-datapath-type โ€” this configuration is optional. If it's set, then the datapath type of the integration bridge gets set to the configured value. If this option is not set, then ovn-controller will not modify the existing datapath-type of the integration bridge. it minds its business ๐Ÿ’…
  • external_ids:ovn-remote โ€” the OVN database that this system should connect to for its configuration, in one of the same forms documented above for the ovs-database.
  • external_ids:ovn-monitor-all โ€” a boolean value that tells whether ovn-controller should monitor all records of tables in the OVN_Southbound. If this option is set to false, ovn-controller will conditionally monitor only the records that are needed for the local chassis.

It's more efficient to set it to true in use cases where the chassis would anyway need to monitor most of the records in the OVN_Southbound database, because that saves the overhead of conditions processing, especially for server side. Typically, set it to true for environments where all workloads need to be reachable from each other.

๐Ÿ“Œ NOTE: for efficiency and scalability in common scenarios, ovn-controller unconditionally monitors all sub-ports (ports with parent_port set) regardless of the ovn-monitor-all value.

Default value is false.

  • external_ids:ovn-remote-probe-interval โ€” the inactivity probe interval of the connection to the OVN database, in milliseconds. If the value is zero, it disables the connection keepalive feature.

If the value is nonzero, then it will be forced to a value of at least 1000 ms. no sneaky tiny probes โฑ๏ธ

  • external_ids:ovn-encap-type โ€” the encapsulation type that a chassis should use to connect to this node. Multiple encapsulation types may be specified with a comma-separated list. Each listed encapsulation type will be paired with ovn-encap-ip. ๐Ÿ’ž

Supported tunnel types for connecting hypervisors and gateways are geneve and vxlan.

โš ๏ธ Due to the limited amount of metadata in vxlan, the capabilities and performance of connected gateways and hypervisors will be reduced versus other tunnel formats.
  • external_ids:ovn-encap-ip โ€” the IP address that a chassis should use to connect to this node using the encapsulation types specified by external_ids:ovn-encap-type. Multiple encapsulation IPs may be specified with a comma-separated list.

In scenarios where multiple encapsulation IPs are present, distinct tunnels are established for each remote chassis. These tunnels are differentiated by setting unique options:local_ip and options:remote_ip values in the tunnel interface. When transmitting a packet to a remote chassis, the selection of local_ip is guided by the Interface:external_ids:encap-ip from the local OVSDB, corresponding to the VIF originating the packet, if specified. The Interface:external_ids:encap-ip setting of the VIF is also populated to the Port_Binding table in the OVN SB database via the encap column. Consequently, when a remote chassis needs to send a packet to a port-binding associated with this VIF, it utilizes the tunnel with the appropriate options:remote_ip that matches the ip in Port_Binding:encap.

This mechanism is particularly beneficial for chassis with multiple physical interfaces designated for tunneling, where each interface is optimized for handling specific traffic associated with particular VIFs. it's giving load balancing, but make it tunnel ๐ŸŒˆ

  • external_ids:ovn-encap-ip-default โ€” when ovn-encap-ip contains multiple IPs, this field indicates the default one. the favorite child, if you will ๐Ÿ‘‘
  • external_ids:ovn-encap-df_default โ€” indicates the DF flag handling of the encapsulation. Set to true to set the DF flag for new data paths, or false to clear the DF flag.
  • external_ids:ovn-enable-flow-based-tunnels โ€” the boolean flag that indicates whether ovn-controller should use flow-based tunnels instead of port-based tunnels for overlay network connectivity. Default value is false.

Port-based tunnels (the default mode) create a dedicated tunnel port for each combination of remote chassis and local encap IP, while flow-based tunnels create a single shared tunnel port for each tunnel type, and use OpenFlow set_field actions to dynamically set tunnel source and destination IP addresses per packet. very main character energy โœจ

๐Ÿงช This feature is experimental and is disabled by default. There are some known limitations to the feature, bestie, don't say I didn't warn you: - IPSec is not supported. - BFD between tunnel endpoints is not supported, thus HA chassis (e.g. for Distributed Gateway Port redundancy) is not supported.
  • external_ids:ovn-bridge-mappings โ€” a list of key-value pairs that map a physical network name to a local ovs bridge that provides connectivity to that network. An example value mapping two physical network names to two ovs bridges would be: physnet1:br-eth0,physnet2:br-eth1.
  • external_ids:ovn-encap-csum โ€” bestie this one says "hey, encapsulation checksums can be sent and received with reasonable performance on this chassis" ๐Ÿ’ซ It's literally a lil hint to anyone sending data to this chassis that they should use checksums to protect OVN metadata. Set it to true to enable or false to disable. Heads up tho: depending on what your network interface card can actually do, enabling encapsulation checksum may cost you performance ๐Ÿ˜ญ and in those cases, encapsulation checksums can be disabled.
  • external_ids:ovn-encap-tos โ€” this tells you the value that gets applied to the OVN tunnel interface's option:tos, exactly as specified in the Open_vSwitch database Interface table. Please refer to the Open VSwitch Manual for the details, iykyk ๐Ÿ“–
  • external_ids:ovn-cms-options โ€” a list of options that the CMS Plugin will consume, and they're specific to this particular chassis. An example would be: cms_option1,cms_option2:foo. Simple as ๐ŸŽ€
  • external_ids:ovn-transport-zones โ€” the transport zone(s) this chassis belongs to ๐Ÿ—บ๏ธ Transport zones are literally just a way to group different chassis together so tunnels only form between members of the same group(s). You can specify multiple transport zones with a comma-separated list, like: tz1,tz2,tz3.

If it's not set, the Chassis gets considered part of a default transport zone. No stress ๐Ÿ’…

  • external_ids:ovn-chassis-mac-mappings โ€” a list of key-value pairs mapping a chassis-specific mac to a physical network name ๐Ÿฆ‹ An example value mapping two chassis macs to two physical network names would be: physnet1:aa:bb:cc:dd:ee:ff,physnet2:a1:b2:c3:d4:e5:f6. These are the macs that ovn-controller will replace a router port mac with, if a packet is going from a distributed router port on a vlan type logical switch.
  • external_ids:ovn-is-interconn โ€” the boolean flag that tells you whether this chassis is being used as an interconnection gateway ๐ŸŒ‰
  • external_ids:ovn-match-northd-version โ€” the boolean flag for whether ovn-controller needs to check the ovn-northd version ๐Ÿ‘€ If this flag is set to true and ovn-northd's version (the one reported in the Southbound database) doesn't match ovn-controller's internal version, then it will stop processing the southbound and local Open vSwitch database changes. The default value is considered false if this option isn't defined.
  • external_ids:ovn-enable-lflow-cache โ€” the boolean flag for whether ovn-controller should enable/disable the logical flow in-memory cache it uses when processing Southbound database logical flow changes โœจ By default, caching is enabled.
  • external_ids:ovn-limit-lflow-cache โ€” when you use this, the configuration value determines the maximum number of logical flow cache entries ovn-controller may create when the logical flow cache is enabled. By default the size of the cache is unlimited ๐Ÿซถ
  • external_ids:ovn-memlimit-lflow-cache-kb โ€” when used, this configuration value determines the maximum size of the logical flow cache (in KB) that ovn-controller may create when the logical flow cache is enabled. By default the size of the cache is unlimited.
  • external_ids:ovn-trim-limit-lflow-cache โ€” when used, this configuration value sets the minimum number of entries in the logical flow cache starting with which automatic memory trimming is performed ๐Ÿงน By default this is set to 10000 entries.
  • external_ids:ovn-trim-wmark-perc-lflow-cache โ€” when used, this configuration value sets the percentage from the high watermark number of entries in the logical flow cache under which automatic memory trimming is performed. E.g., if the trim watermark percentage is set to 50%, automatic memory trimming happens only when the number of entries in the logical flow cache gets reduced to less than half of the last measured high watermark. By default this is set to 50.
  • external_ids:ovn-trim-timeout-ms โ€” when used, this configuration value specifies the time, in milliseconds, since the last logical flow cache operation, after which ovn-controller performs memory trimming regardless of how many entries there are in the cache ๐Ÿ˜ค By default this is set to 30000 (30 seconds).
  • external_ids:garp-max-timeout-sec โ€” when used, this configuration value specifies the maximum timeout (in seconds) between two consecutive GARP packets sent by ovn-controller ๐Ÿ“ฃ By default, ovn-controller sends just 4 GARP packets with an exponential backoff timeout. Setting external_ids:garp-max-timeout-sec allows you to cap that exponential backoff used by ovn-controller to send GARP packets.
  • external_ids:arp-nd-max-timeout-sec โ€” when used, this configuration value specifies the maximum timeout (in seconds) between two consecutive ARP/ND packets sent by ovn-controller to resolve the ECMP nexthop mac address ๐Ÿ‘‘ By default, ovn-controller continuously sends ARP/ND packets. Setting external_ids:arp-nd-max-timeout-sec allows you to cap the exponential backoff used by ovn-controller to send ARPs/NDs packets.
  • external_ids:ovn-bridge-remote โ€” the connection to the OVN management bridge in OvS ๐ŸŒ‰ It defaults to unix:br-int.mgmt when not specified.
  • external_ids:ovn-bridge-remote-probe-interval โ€” the inactivity probe interval of the connection to the OVN management bridge, in milliseconds โฑ๏ธ It defaults to zero. If the value is zero, it disables the inactivity probe.
  • external_ids:dynamic-routing-port-mapping โ€” this setting works together with the Northbound dynamic-routing-port-name option on Logical_Router_Ports. See the ovn-nb(5) for more details ๐Ÿ’œ
Note: when using the routing-protocol-redirect option with veth pairs on Linux systems, this mapping may not be necessary, since ovn-controller can automatically discover the veth peer interface name. See the routing-protocol-redirect option documentation in ovn-nb(5) for details.
  • external_ids:ovn-cleanup-on-exit โ€” the boolean flag for whether ovn-controller should perform cleanup on exit ๐Ÿงผ In order to keep backward compatibility, the --restart exit flag has priority over this flag.
  • external_ids:ovn-evpn-vxlan-ports โ€” a comma-separated list of UDP ports used as a destination port for the EVPN tunnels created by this ovn-controller ๐ŸŒˆ
  • external_ids:ovn-evpn-local-ip โ€” the IP address list used as source addresses for the EVPN traffic leaving this OVN setup. The ovn-evpn-local-ip can be specified by the CMS according to the following syntax:
external_ids:ovn-evpn-local-ip=vni0-IPv4,vni1-IPv4,vni1-IPv6,IPv4,IPv6

where, if no VNI value is specified, OVN will use the provided IP as default IP. Slay ๐Ÿ’–


Most of the configuration options listed above can also be set for a particular chassis name (see external_ids:system-id for more information) ๐Ÿ‘€ You do it by setting external_ids:option-[chassis] instead of external_ids:option. For example, set external_ids:ovn-encap-ip-otherhv to use a particular IP address for the controller instance named otherhv. And bestie, name-specific configuration options always override any global options set in the database. Periodt ๐Ÿ’…

Chassis-specific configuration options in the database, plus the ability to configure the chassis name to use via the system-id-override file or command line, allows you to run multiple ovn-controller instances with unique chassis names on the same host using the same vswitchd instance ๐Ÿ”ฅ This may be useful when running a hybrid setup with more than one CMS managing ports on the host, or to use different datapath types on the same host. And in order to support stateful features (ACLs, LBs, NAT) in multiple OVN deployments co-hosted on the same chassis, the CMS also needs to separate conntrack zone ranges between the co-hosted ovn-controllers through the external_ids:ct-zone-range configuration described in upcoming sections ๐ŸŒธ


ovn-controller reads the following values from the Open_vSwitch database of the local OVS instance:

  • datapath-type from Bridge table โ€” this value is read from the local OVS integration bridge row of the Bridge table and populated in other_config:datapath-type of the Chassis table in the OVN_Southbound database ๐Ÿงš
  • iface-types from Open_vSwitch table โ€” this value is populated in external_ids:iface-types of the Chassis table in the OVN_Southbound database โœจ
  • private_key, certificate, ca_cert, and bootstrap_ca_cert from SSL table โ€” these values provide the SSL/TLS configuration used for connecting to the OVN southbound database server when an SSL/TLS connection type is configured via external_ids:ovn-remote ๐Ÿ” Note that this SSL/TLS configuration can also be provided via command-line options, but the configuration in the database takes precedence if both are present.

โœจ OPEN VSWITCH DATABASE USAGE โœจ

so like, ovn-controller keeps a whole lil bookmark collection in the Open vSwitch database using external_ids keys, tracking ports and interfaces and stuff ๐Ÿซถ. and bestie, listen โ€” for it to actually work right, users should not change or clear these keys. hands off the keys. they're not yours. ๐Ÿ’…


external_ids:ovn-chassis-id in the Port table

if this key is there, it's flagging a tunnel port inside the integration bridge as one that ovn-controller made to reach a remote chassis ๐ŸŒˆ. its value = the chassis ID of that remote chassis.

external_ids:ct-zone-range in the Open_vSwitch table

this key being present means "hey, here's a min and a max for the ct-zone ids that ovn-controller picks dynamically" (and yes, the boundaries are included in the range, inclusive girlies โœจ). minimum value is 1, maximum value is 65535.

external_ids:ct-zone-* in the Bridge table

logical ports and gateway routers get assigned a connection tracking zone by ovn-controller for stateful services ๐Ÿ’–. and because we want that state to survive restarts of ovn-controller, these keys live in the integration bridge's Bridge table. the name has a prefix of ct-zone- followed by the name of the logical port or gateway router's zone key. the value for this key tells you which zone that port is using.

external_ids:ovn-localnet-port in the Port table

this key existing means a patch port was made by ovn-controller to connect the integration bridge to another bridge, implementing a localnet logical port ๐Ÿฆ‹. its value is the name of the logical port whose type is set to localnet that the port implements. check external_ids:ovn-bridge-mappings, above, for more.

each localnet logical port is implemented as a pair of patch ports โ€” one in the integration bridge, one in a different bridge โ€” with the same external_ids:ovn-localnet-port value ๐Ÿ‘ฏ

external_ids:ovn-l2gateway-port in the Port table

same vibe, different layer: this key marks a patch port as one created by ovn-controller to connect the integration bridge and another bridge to implement an l2gateway logical port. its value is the name of the logical port with type set to l2gateway that it implements. again, peep external_ids:ovn-bridge-mappings, above, for more.

each l2gateway logical port is also implemented as a pair of patch ports, one in the integration bridge, one in a different bridge, with the same external_ids:ovn-l2gateway-port value ๐Ÿ’ซ

external-ids:ovn-l3gateway-port in the Port table

(yes this one's external-ids: with a hyphen, not external_ids:, don't come for me, that's just how it is ๐Ÿ™ˆ) this key identifies a patch port as one created by ovn-controller to implement an l3gateway logical port. its value is the name of the logical port with type l3gateway. this patch port is similar to the OVN logical patch port, except that an l3gateway port can only be bound to a particular chassis. picky queen ๐Ÿ‘‘

external-ids:ovn-logical-patch-port in the Port table

this key identifies a patch port as one created by ovn-controller to implement an OVN logical patch port within the integration bridge. its value is the name of the OVN logical patch port that it implements ๐ŸŽ€

external-ids:ovn-startup-ts in the Bridge table

the timestamp (in milliseconds) of when the ovn-controller process was started โฐ

external-ids:ovn-nb-cfg in the Bridge table

this one's the last known OVN_Southbound.SB_Global.nb_cfg value for which all flows have been successfully installed in OVS โœ…

external-ids:ovn-nb-cfg-ts in the Bridge table

the timestamp (in milliseconds) of that last known OVN_Southbound.SB_Global.nb_cfg value for which all flows have been successfully installed in OVS ๐Ÿ•

external-ids:ovn-nb-cfg-sb-ts in the Bridge table

okay this one's the receipts ๐Ÿ“ it records the value of OVN_Southbound.SB_Global.nb_cfg_timestamp that corresponded to the ovn-nb-cfg generation for which all flows have been successfully installed in OVS. it's the wall-clock time (in milliseconds since the Unix epoch) at which ovn-northd wrote that nb_cfg value to the Southbound database. and the glow-up math: the difference between this timestamp and ovn-nb-cfg-ts gives you the per-chassis end-to-end propagation latency for that configuration generation ๐Ÿ“ˆ

the key is absent when no timestamp is available (e.g. when NB_Global.options:enable_chassis_nb_cfg_update is false).

external_ids:ovn-installed and external_ids:ovn-installed-ts in the Interface table

this key gets set after all the openflow operations corresponding to the OVS interface have been processed by ovs-vswitchd ๐Ÿ”ฅ. and at the same time, a timestamp โ€” in milliseconds since the epoch โ€” is stored in external_ids:ovn-installed-ts.

external_ids:ovn-evpn-tunnel in the Port and Interface table

if this key is present, it means the Port/Interface was created by ovn-controller to be used as a tunnel port for EVPN traffic ๐Ÿ›ฐ๏ธ


๐Ÿ’œ OVN SOUTHBOUND DATABASE USAGE ๐Ÿ’œ

ovn-controller reads from a whole bunch of the OVN_Southbound database to guide its operation โ€” it's giving main character energy, absorbing everything โœจ. but it also writes to these tables:

Chassis

on startup, ovn-controller creates a row in this table to represent its own chassis ๐Ÿ’…. and on graceful termination โ€” like with ovn-appctl -t ovn-controller exit (but not SIGTERM, bestie, that one's not graceful ๐Ÿ˜ญ) โ€” ovn-controller removes its row.

Encap

on startup, ovn-controller creates a row or rows in this table representing the tunnel encapsulations by which its chassis can be reached, and points its Chassis row at them ๐Ÿš‡. on graceful termination, ovn-controller removes these rows.

Port_Binding

at runtime, ovn-controller sets the chassis columns of ports that are resident on its chassis to point to its Chassis row ๐Ÿ“ and, conversely, clears the chassis column of ports that point to its Chassis row but are no longer resident on its chassis. the chassis column has a weak reference type, so when ovn-controller gracefully exits and removes its Chassis row, the database server automatically clears any remaining references to that row. self-cleaning icon behavior ๐Ÿงผ

MAC_Binding

at runtime, ovn-controller updates the MAC_Binding table as instructed by put_arp and put_nd logical actions ๐Ÿ“ฎ. heads up though: these changes persist beyond the lifetime of ovn-controller โ€” they outlive her, no cap ๐Ÿ’€

โœจ RUNTIME MANAGEMENT COMMANDS โœจ

okay bestie so ovn-appctl can slide into a running ovn-controller process and send it commands ๐Ÿ’… The ones it supports rn are right here, all listed out, no cap:

  • exit โ€” makes ovn-controller terminate gracefully. like, politely. it says bye and leaves ๐Ÿซถ
  • ct-zone-list โ€” lists every local logical port and its connection tracking zone. receipts for all of them ๐Ÿ’–
  • meter-table-list โ€” lists each meter table entry plus its local meter id.
  • group-table-list โ€” lists each group table entry plus its local group id.
  • inject-pkt microflow โ€” injects microflow into the connected Open vSwitch instance. the microflow must contain an ingress logical port (that's the inport argument) that's actually present on the Open vSwitch instance, okay? otherwise it's not giving what it needs to give.

the microflow argument describes the packet whose forwarding is gonna be simulated, and it's written in the syntax of an OVN logical expression โ€” same as described in ovn-sb(5) โ€” used to express constraints. the parser understands prerequisites which is so iconic of it: so if your expression refers to ip4.src, you literally do not need to explicitly state ip4 or eth.type == 0x800. it already knows ๐Ÿ’…

  • connection-status โ€” shows the OVN SBDB connection status for the chassis. vibe check on the connection fr fr.
  • recompute โ€” triggers a full compute iteration in ovn-controller based on the contents of the Southbound database and the local OVS database.
โš ๏ธ okay so this one is intended to be used only in the event of a bug in the incremental processing engine in ovn-controller, to avoid inconsistent states. so please use it with care bestie, because full recomputes are cpu intensive. it's giving heavy. respect the CPU ๐Ÿ˜ญ
  • sb-cluster-state-reset โ€” resets southbound database cluster status for when databases are destroyed and rebuilt.

if all databases in a clustered southbound database get removed from disk, then the stored index of all databases will be reset to zero. and that causes ovn-controller to be unable to read or write to the southbound database, because it will always detect the data as stale. ๐Ÿ’€ in that case, run this command so that ovn-controller resets its local index so it can interact with the southbound database again. slay, fixed.

  • debug/delay-nb-cfg-report seconds โ€” this command delays ovn-controller updating the nb_cfg back to the OVN_Southbound database. it's useful when ovn-nbctl --wait=hv is used to measure end-to-end latency in a large scale environment. see ovn-nbctl(8) for more details ๐Ÿฆ‹
  • lflow-cache/flush โ€” flushes the ovn-controller logical flow cache. clean sweep, so satisfying โœจ
  • lflow-cache/show-stats โ€” displays logical flow cache statistics: enabled/disabled, per cache type entry counts. the numbers, the tea โ˜•
  • inc-engine/show-stats โ€” displays ovn-controller engine counters. for each engine node the following counters have been added:
    • recompute
    • compute
    • cancel
  • inc-engine/show-stats engine_node_name counter_name โ€” displays the ovn-controller engine counter(s) for the specified engine_node_name. counter_name is optional and can be one of recompute, compute or cancel. pick your fighter ๐ŸŒˆ
  • inc-engine/clear-stats โ€” resets ovn-controller engine counters. back to zero, fresh start, main character energy ๐Ÿ’œ
  • inc-engine/enable-stopwatch [node] โ€” enables the per-node and per-handler stopwatches in the incremental processing engine. if node is specified, only that node's stopwatches are enabled; otherwise all nodes are affected. while enabled, every engine node recompute and change handler invocation gets timed, and the results can be viewed with the stopwatch/show command. stopwatches are disabled by default because they add measurable CPU overhead. so like, it's cute but it costs ๐ŸŽ€
  • inc-engine/disable-stopwatch [node] โ€” disables the per-node and per-handler stopwatches in the incremental processing engine. if node is specified, only that node's stopwatches are disabled; otherwise all nodes are affected. this is the default state. the chill, unbothered baseline ๐Ÿ™ˆ

and that's the whole page bestie, we did it ๐Ÿ’– this was ovn-controller(8), from OVN version 26.09.1, dated ovn-controller. go forth and be iconic with your chassis, mwah ๐Ÿ‘‘๐ŸŒธ

๐Ÿ“ฆ where this page comes from