ovn-ic-sbctl(8)
π¦ ovn-ic-sbctl π¦
from the OVN Manual, section 8 β yes bestie, this is the ovn-ic-sbctl(8) page and we're doing the WHOLE thing, no skipping π
β¨ NAME β¨
ovn-ic-sbctl β the Open Virtual Network interconnection southbound db management utility. That's the whole name section, she's short and she knows it π
πΈ SYNOPSIS πΈ
ovn-ic-sbctl [options] command [arg...]
π DESCRIPTION π
okay so picture this: you've got an OVN interconnection southbound database, right? And you need to manage it. That's literally it. That's the whole job. This utility manages the OVN interconnection southbound database. slay β¨
π GENERAL COMMANDS π
initβ Initializes the database, but only if it's empty. If the database has already been initialized, this command just... does nothing. No effect. Zero. Nada. She's not gonna touch it, bestie π«Άshow[availability_zone]β Prints a brief overview of what's inside the database. And if you pass anavailability_zone, then it only shows you the records related to that availability zone. Filtered. Curated. aesthetic π
π DATABASE COMMANDS π
These commands query and modify the contents of ovsdb tables. Lowkey important: they're a slight abstraction of the ovsdb interface, which means they operate at a lower level than the other ovn-ic-sbctl commands. So like, don't expect them to hold your hand, bestie π
π§ Identifying Tables, Records, and Columns π§
Every one of these commands takes a table parameter to identify a table inside the database. And a bunch of them also take a record parameter, which identifies one specific record within a table.
So what can a record be? It can be the UUID for a record β and you can abbreviate that to its first 4 (or more) hex digits, as long as that abbreviation is unique. Many tables offer additional ways to identify records too, so it's giving options π
Some commands also take column parameters, which identify a particular field within the records in a table.
For a list of tables and their columns, check out ovn-ic-sb(5) β or just look at the table listing from the --help option. Either way, she's there for you β¨
Record names must be specified in full and with correct capitalization. The one exception: UUIDs may be abbreviated to their first 4 (or more) hex digits, as long as that's unique within the table.
Names of tables and columns are not case-sensitive, and - and _ are treated interchangeably. Unique abbreviations of table and column names are totally acceptable β for example, g or gatew is sufficient to identify the Gateway table. Short queen energy π
π Database Values π
Every column in the database accepts a fixed type of data. Here are the currently defined basic types and how you write them:
integerβ A decimal integer in the range-2**63to2**63-1, inclusive. Big range, big vibes.realβ A floating-point number. Yes bestie, decimals exist here πBooleanβ True or false, writtentrueorfalse, respectively. Pick a lane πstringβ An arbitrary Unicode string, with the caveat that null bytes are not allowed. Quotes are optional for most strings that begin with an English letter or underscore and consist only of letters, underscores, hyphens, and periods. BUT β and this is the part people trip on βtrueandfalse, plus any strings that match the syntax of UUIDs (see below), must be enclosed in double quotes to distinguish them from other basic types. When double quotes are used, the syntax is that of strings in JSON, e.g. backslashes may be used to escape special characters. And the empty string must be represented as a pair of double quotes:"".UUIDβ Either a universally unique identifier in the style of RFC 4122, e.g.f81d4fae-7dec-11d0-a765-00a0c91e6bf6, or an@namedefined by agetorcreatecommand within the sameovs-vsctlinvocation. π¦
Multiple values in a single column may be separated by spaces or a single comma. When multiple values are present, duplicates are not allowed, and order is not important. Conversely, some database columns can have an empty set of values, represented as [], and square brackets may optionally enclose other non-empty sets or single values as well. Flexible! β¨
A few database columns are ``maps'' of key-value pairs, where the key and the value are each some fixed database type. These are specified in the form key=value, where key and value follow the syntax for the column's key type and value type, respectively. When multiple pairs are present (separated by spaces or a comma), duplicate keys are not allowed, and again the order is not important. Duplicate values are allowed though, so go off. An empty map is represented as {}. Curly braces may optionally enclose non-empty maps as well β but use quotes to prevent the shell from expanding other-config={0=x,1=y} into other-config=0=x other-config=1=y, which may not have the desired effect. the shell is NOT your friend here, bestie, protect your braces π
π Database Command Syntax π
π list
[--if-exists] [--columns=column[,column]...] list table
[record]...
Lists the data in each specified record. If no records are specified, it lists all the records in table.
If --columns is specified, only the requested columns are listed, in the specified order. Otherwise, all columns are listed, in alphabetical order by column name.
Without --if-exists, it is an error if any specified record does not exist. With --if-exists, the command ignores any record that does not exist, without producing any output. ghosting records, but politely π
π find
[--columns=column[,column]...] find table [column[:key]=value]...
Lists the data in each record in table whose column equals value or, if key is specified, whose column contains a key with the specified value. The following operators may be used where = is written in the syntax summary:
=!=<><=>=β Selects records in which column[:key]equals, does not equal, is less than, is greater than, is less than or equal to, or is greater than or equal to value, respectively.
Now, the way this comparison actually works β buckle up π
Consider column[:key] and value as sets of elements. Identical sets are considered equal. Otherwise, if the sets have different numbers of elements, then the set with more elements is considered to be larger. Otherwise, consider a element from each set pairwise, in increasing order within each set. The first pair that differs determines the result. (For a column that contains key-value pairs, first all the keys are compared, and values are considered only if the two sets contain identical keys.)
{=}{!=}β Test for set equality or inequality, respectively. β¨{<=}β Selects records in which column[:key]is a subset of value. For example,flood-vlans{<=}1,2selects records in which theflood-vlanscolumn is the empty set or contains1or2or both.{<}β Selects records in which column[:key]is a proper subset of value. For example,flood-vlans{<}1,2selects records in which theflood-vlanscolumn is the empty set or contains1or2but not both.{>=}{>}β Same as{<=}and{<}, respectively, except that the relationship is reversed. For example,flood-vlans{>=}1,2selects records in which theflood-vlanscolumn contains both1and2.
The following operators are available only in Open vSwitch 2.16 and later:
{in}β Selects records in which every element in column[:key]is also in value. (This is the same as{<=}.) same energy, different font π{not-in}β Selects records in which every element in column[:key]is not in value.
For arithmetic operators (= != < > <= >=), when key is specified but a particular record's column does not contain key, the record is always omitted from the results. So the condition other-config:mtu!=1500 matches records that have a mtu key whose value is not 1500, but not those that lack an mtu key. if you don't have the key, you're not invited to this party π
For the set operators, when key is specified but a particular record's column does not contain key, the comparison is done against an empty set. So the condition other-config:mtu{!=}1500 matches records that have a mtu key whose value is not 1500 and those that lack an mtu key. See the difference? iconic behavior, honestly π«Ά
Don't forget to escape<or>from interpretation by the shell. bestie. please. your shell will eat them alive π
If --columns is specified, only the requested columns are listed, in the specified order. Otherwise all columns are listed, in alphabetical order by column name.
heads up: The UUIDs shown for rows created in the same ovs-vsctl invocation will be wrong.
π get
[--if-exists] [--id=@name] get table record [column[:key]]...
Prints the value of each specified column in the given record in table. For map columns, a key may optionally be specified β and if you do, the value associated with key in the column is printed, instead of the entire map. just the piece you asked for, no crumbs β¨
Without --if-exists, it is an error if record does not exist, or if key is specified and key does not exist in record. With --if-exists, a missing record yields no output and a missing key prints a blank line. silent treatment, but make it a blank line π
If @name is specified, then the UUID for record may be referred to by that name later in the same ovs-vsctl invocation in contexts where a UUID is expected. Little nickname, big power π
Both --id and the column arguments are optional, but usually at least one or the other should be specified. If both are omitted, then get has no effect except to verify that record exists in table. She's just checking you're real π
--idand--if-existscannot be used together. fr fr, don't try it
βοΈ set
[--if-exists] set table record column[:key]=value...
Sets the value of each specified column in the given record in table to value. For map columns, a key may optionally be specified β and in that case, the value associated with key in that column is changed (or added, if none exists), instead of the entire map. glow-up for one key at a time π¦
Without --if-exists, it is an error if record does not exist. With --if-exists, this command does nothing if record does not exist. no record, no problem, no output πΈ
β¨ add β¨
[--if-exists] add table record column [key=]value...
Okay so this one adds the value or the key=value pair you give it to column inside record inside table. π
If column is a map, then key is required. If it's not a map, then key is prohibited β don't even try it bestie. π«
If key already exists in a map column, the current value does not get replaced. (You want to replace something? That's a set command job. Different vibe entirely. π
)
Without --if-exists, it's an error if record doesn't exist. With --if-exists, this command just does nothing if record doesn't exist. Chill. π§
β¨ remove β¨
[--if-exists] remove table record column value...
[--if-exists] remove table record column key...
[--if-exists] remove table record column key=value...
Removes the specified values or key-value pairs from column in record in table. Three forms, three moods: π
- First form β applies to columns that are not maps. Each
valueyou list gets removed from the column. - Second and third forms β apply to map columns. If you only give a
key, then any key-value pair with that key is removed, no matter what its value is. If you give avaluetoo, then a pair is removed only if both the key and the value match. Matchy matchy. β¨
It is not an error if the column doesn't contain the specified key, value, or pair. No drama.
Without --if-exists, it's an error if record doesn't exist. With --if-exists, this command does nothing if record doesn't exist.
β¨ clear β¨
[--if-exists] clear table record column...
Sets each column in record in table to the empty set or empty map, as appropriate. π«§ This command applies only to columns that are allowed to be empty β it's giving "only if the database lets you."
Without --if-exists, it's an error if record doesn't exist. With --if-exists, this command does nothing if record doesn't exist.
β¨ create β¨
[--id=(@name|uuid)] create table column[:key]=value...
Creates a brand new record in table and sets the initial values of each column. π Columns you don't explicitly set will receive their default values. Then it outputs the UUID of the new row. Slay.
If @name is specified, then the UUID for the new row may be referred to by that name elsewhere in the same ovn-ic-sbctl invocation, in contexts where a UUID is expected. Those references may come before or after the create command β the order literally does not matter bestie. π₯
If a valid uuid is specified, then it is used as the UUID of the new row.
Caution (ovs-vsctl as example) π Records in the Open vSwitch database are significant only when they can be reached directly or indirectly from theOpen_vSwitchtable. Except for records in theQoSorQueuetables, records that are not reachable from theOpen_vSwitchtable are automatically deleted from the database. This deletion happens immediately, without waiting for additionalovs-vsctlcommands or other database activity. So acreatecommand must generally be accompanied by additional commands within the sameovs-vsctlinvocation to add a chain of references to the newly created record from the top-levelOpen_vSwitchrecord. The EXAMPLES section gives some examples that show how to do this.
β¨ destroy β¨
[--if-exists] destroy table record...
Deletes each specified record from table. Unless --if-exists is specified, each record must exist. π
--all destroy table
Deletes all records from the table. The whole thing. Gone. πͺοΈ
Caution (ovs-vsctl as example) π Thedestroycommand is only useful for records in theQoSorQueuetables. Records in other tables are automatically deleted from the database when they become unreachable from theOpen_vSwitchtable. This means that deleting the last reference to a record is sufficient for deleting the record itself. For records in these tables,destroyis silently ignored. See the EXAMPLES section below for more information.
β¨ wait-until β¨
wait-until table record [column[:key]=value]...
Waits until table contains a record named record whose column equals value, or β if key is specified β whose column contains a key with the specified value. This command supports the same operators and semantics described for the find command above. β³
If no column[:key]=value arguments are given, this command waits only until record exists. If more than one such argument is given, the command waits until all of them are satisfied. No partial credit, bestie. β¨
Caution (ovs-vsctl as example) π«Ά Usuallywait-untilshould be placed at the beginning of a set ofovs-vsctlcommands. For example,wait-until bridge br0 -- get bridge br0 datapath_idwaits until a bridge namedbr0is created, then prints itsdatapath_idcolumn, whereasget bridge br0 datapath_id -- wait-until bridge br0will abort if no bridge namedbr0exists whenovs-vsctlinitially connects to the database.
Consider specifying --timeout=0 along with --wait-until, to prevent ovs-vsctl from terminating after waiting only at most 5 seconds. (Yes, that number is exact. Yes, it's rude. π)
β¨ comment β¨
comment [arg]...
This command has no effect on behavior, but any database log record created by the command will include the command and its arguments. It's literally just you leaving a little note in the logs. Notes app energy. π
π REMOTE CONNECTIVITY COMMANDS π
get-connection π¦
Prints the configured connection(s).
del-connection π¦
Deletes the configured connection(s).
[--inactivity-probe=msecs] set-connection target... π¦
Sets the configured manager target or targets. Use --inactivity-probe=msecs to override the default idle connection inactivity probe time. Use 0 to disable inactivity probes.
π SSL/TLS CONFIGURATION COMMANDS π
get-ssl π
Prints the SSL/TLS configuration.
del-ssl π
Deletes the current SSL/TLS configuration.
[--bootstrap] set-ssl private-key certificate ca-cert [ssl-protocol-list [ssl-cipher-list [ssl-ciphersuites]]] π
Sets the SSL/TLS configuration.
β¨ OPTIONS β¨
--db databaseβ The OVSDB database remote to contact. If theOVN_IC_SB_DBenvironment variable is set, its value is used as the default. Otherwise, the default isunix:/ovn_ic_sb_db.sock, but this default is unlikely to be useful outside of single-machine OVN test environments. π«--leader-only,--no-leader-onlyβ By default, or with--leader-only, when the database server is a clustered database,ovn-ic-sbctlwill avoid servers other than the cluster leader. This ensures that any data thatovn-ic-sbctlreads and reports is up-to-date. β
With --no-leader-only, ovn-ic-sbctl will use any server in the cluster, which means that for read-only transactions it can report and act on stale data π (transactions that modify the database are always serialized even with --no-leader-only). Refer to Understanding Cluster Consistency in ovsdb(7) for more information.
β¨ LOGGING OPTIONS β¨
ok so this is the part where you tell ovn-ic-sbctl how much it's allowed to yap, and where it's allowed to yap it. very demure, very mindful, very "please stop filling my terminal" energy. π¬
-v[spec],--verbose=[spec]β sets the logging levels. Nospecat all? Then every module and every destination gets bumped todbg. otherwise,specis 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/listcommand onovs-appctl(8)β this limits the log level change to just that module. syslog,console, orfileβ to limit the log level change to only the system log, to the console, or to a file, respectively. (heads up: if--detachis specified, the daemon closes its standard file descriptors, so logging to the console will have no effect π« )off,emer,err,warn,info, ordbgβ to control the log level. Messages of the given severity or higher get logged, and anything lower severity gets filtered out.offfilters out all messages. Seeovs-appctl(8)for a definition of each log level.
- a valid module name, as displayed by the
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 (peep below π).
For compatibility with older versions of OVS, any is accepted as a word but has no effect. it's giving participation trophy π
-v,--verboseβ sets the maximum logging verbosity level, equivalent to--verbose=dbg. max volume, no thoughts, just logs π₯-vPATTERN:destination:pattern,--verbose=PATTERN:destination:patternβ sets the log pattern for destination to pattern. Refer toovs-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 ofkern,user,mail,daemon,auth,syslog,lpr,news,uucp,clock,ftp,ntp,audit,alert,clock2,local0,local1,local2,local3,local4,local5,local6orlocal7. If this option is not specified,daemonis used as the default for the local system syslog andlocal0is used while sending a message to the target provided via the--syslog-targetoption.--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. no vibes-based DNS, bestie π--syslog-method=methodβ specify method as how syslog messages should be sent to syslog daemon. The following forms are supported:libc, to use the libcsyslog()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/logUNIX domain socket.unix:file, to use a UNIX domain socket directly. It is possible to specify arbitrary message format with this option. However,rsyslogd8.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 olderrsyslogdversions, 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 olderrsyslogd. 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, accidentaliptablesrules 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.
β¨ TABLE FORMATTING OPTIONS β¨
these options control the format of output from the list and find commands. it's giving β¨aestheticβ¨ choices, and honestly? valid.
-f format,--format=formatβ sets the type of table formatting. The following types of format are available:tableβ 2-D text tables with aligned columns.list(default) β a list with one column per line and rows separated by a blank line.htmlβ HTML tables.csvβ comma-separated values as defined in RFC 4180.jsonβ JSON format as defined in RFC 4627. The output is a sequence of JSON objects, each of which corresponds to one table. Each JSON object has the following members with the noted values:captionβ the table's caption. This member is omitted if the table has no caption.headingsβ an array with one element per table column. Each array element is a string giving the corresponding column's heading.dataβ an array with one element per table row. Each element is also an array with one element per table column. The elements of this second-level array are the cells that constitute the table. Cells that represent OVSDB data or data types are expressed in the format described in the OVSDB specification; other cells are simply expressed as text strings.
-d format,--data=formatβ sets the formatting for cells within output tables unless the table format is set tojson, in which casejsonformatting is always used when formatting cells. The following types of format are available:string(default) β the simple format described in the Database Values section ofovs-vsctl(8).bareβ the simple format with punctuation stripped off:[]and{}are omitted around sets, maps, and empty columns, items within sets and maps are space-separated, and strings are never quoted. This format may be easier for scripts to parse. π€jsonβ the RFC 4627 JSON format as described above.
--no-headingsβ this option suppresses the heading row that otherwise appears in the first row of table output.--prettyβ by default, JSON in output is printed as compactly as possible. This option causes JSON in output to be printed in a more readable fashion. Members of objects and elements of arrays are printed one per line, with indentation.
This option does not affect JSON in tables, which is always printed compactly.
--bareβ equivalent to--format=list --data=bare --no-headings. one option, three options, zero effort, we love a shortcut π
π PKI Options π
PKI configuration is required to use SSL/TLS for the connection to the database. no certs, no talking, 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-por--private-keyto 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-cor--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 casually, 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. π§--bootstrap-ca-cert=cacert.pemβ when cacert.pem exists, this option has the same effect as-Cor--ca-cert. If it does not exist, then the executable will attempt to obtain the CA certificate from the SSL/TLS peer on its first SSL/TLS connection and save it to the named PEM file. If it is successful, it will immediately drop the connection and reconnect, and from then on all SSL/TLS connections must be authenticated by a certificate signed by the CA certificate thus obtained.
π This option exposes the SSL/TLS connection to a man-in-the-middle attack obtaining the initial CA certificate, but it may be useful for bootstrapping.
This option is only useful if the SSL/TLS peer sends its CA certificate as part of the SSL/TLS certificate chain. SSL/TLS protocols do not require the server to send the CA certificate.
This option is mutually exclusive with -C and --ca-cert. pick a lane bestie π«
π Other Options π
-h,--helpβ prints a brief help message to the console.-V,--versionβ prints version information to the console.
and that's the whole page, you made it to the end π this was ovn-ic-sbctl from OVN 26.09.1, section ovn-ic-sbctl(8) of the manual β so if you're ever like "wait which version was that again," it's right there in the footer. go forth and slay your IC southbound database, bestie πβ¨π¦π
π¦ where this page comes from
- fedora 44: ovn 26.09.0-33.fc44 Β· Apache-2.0 AND LGPL-2.1-only AND SISSL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms