# ovn-ctl

## NAME



           ovn-ctl - Open Virtual Network northbound daemon lifecycle utility
    


## SYNOPSIS



           **ovn-ctl**[_options_] _command_ [-- _extra_args_]
    


## DESCRIPTION



           This program is intended to be invoked internally by Open Virtual
           Network startup scripts. System administrators should not normally
           invoke it directly.
    


## COMMANDS



           **start_northd**
           **start_controller**
           **start_controller_vtep**
           **start_ic**
           **stop_northd**
           **stop_controller**
           **stop_controller_vtep**
           **stop_ic**
           **restart_northd**
           **restart_controller**
           **restart_controller_vtep**
           **restart_ic**
           **promote_ovnnb**
           **promote_ovnsb**
           **demote_ovnnb**
           **demote_ovnsb**
           **status_ovnnb**
           **status_ovnsb**
           **start_ovsdb**
           **start_nb_ovsdb**
           **start_sb_ovsdb**
           **stop_ovsdb**
           **stop_nb_ovsdb**
           **stop_sb_ovsdb**
           **restart_ovsdb**
           **run_nb_ovsdb**
           **run_sb_ovsdb**
           **promote_ic_nb**
           **promote_ic_sb**
           **demote_ic_nb**
           **demote_ic_sb**
           **status_ic_nb**
           **status_ic_sb**
           **start_ic_ovsdb**
           **start_ic_nb_ovsdb**
           **start_ic_sb_ovsdb**
           **stop_ic_ovsdb**
           **stop_ic_nb_ovsdb**
           **stop_ic_sb_ovsdb**
           **restart_ic_ovsdb**
           **run_ic_nb_ovsdb**
           **run_ic_sb_ovsdb**
    


## OPTIONS



           **--ovn-northd-priority=**_NICE_
    
           **--ovn-northd-wrapper=**_WRAPPER_
    
           **--ovn-controller-priority=**_NICE_
    
           **--ovn-controller-wrapper=**_WRAPPER_
    
           **--ovn-ic-priority=**_NICE_
    
           **--ovn-ic-wrapper=**_WRAPPER_
    
           **--ovsdb-nb-wrapper=**_WRAPPER_
    
           **--ovsdb-sb-wrapper=**_WRAPPER_
    
           **--ovn-user=**_USER:GROUP_
    
           **-h** | **--help**
    


## FILE LOCATION OPTIONS



           **--db-sock=**_SOCKET_
    
           **--db-nb-file=**_FILE_
    
           **--db-sb-file=**_FILE_
    
           **--db-nb-schema=**_FILE_
    
           **--db-sb-schema=**_FILE_
    
           **--db-sb-create-insecure-remote=**_yes|no_
    
           **--db-nb-create-insecure-remote=**_yes|no_
    
           **--db-ic-nb-file=**_FILE_
    
           **--db-ic-sb-file=**_FILE_
    
           **--db-ic-nb-schema=**_FILE_
    
           **--db-ic-sb-schema=**_FILE_
    
           **--db-ic-sb-create-insecure-remote=**_yes|no_
    
           **--db-ic-nb-create-insecure-remote=**_yes|no_
    
           **--db-nb-config-file=**_FILE_
    
           **--db-sb-config-file=**_FILE_
    
           **--db-ic-nb-config-file=**_FILE_
    
           **--db-ic-sb-config-file=**_FILE_
    
           **--db-sb-relay-config-file=**_FILE_
    
           **--ovn-controller-ssl-key=**_KEY_
    
           **--ovn-controller-ssl-cert=**_CERT_
    
           **--ovn-controller-ssl-ca-cert=**_CERT_
    
           **--ovn-controller-ssl-bootstrap-ca-cert=**_CERT_
    


## PROTOCOL, CIPHER AND CIPHERSUITE OPTIONS



           **--ovn-controller-ssl-protocols=**_PROTOCOLS_
    
           **--ovn-ic-ssl-protocols=**_PROTOCOLS_
    
           **--ovn-northd-ssl-protocols=**_PROTOCOLS_
    
           **--ovn-nb-db-ssl-protocols=**_PROTOCOLS_
    
           **--ovn-sb-db-ssl-protocols=**_PROTOCOLS_
    
           **--ovn-ic-nb-db-ssl-protocols=**_PROTOCOLS_
    
           **--ovn-ic-sb-db-ssl-protocols=**_PROTOCOLS_
    
           **--ovn-controller-ssl-ciphers=**_CIPHERS_
    
           **--ovn-ic-ssl-ciphers=**_CIPHERS_
    
           **--ovn-northd-ssl-ciphers=**_CIPHERS_
    
           **--ovn-nb-db-ssl-ciphers=**_CIPHERS_
    
           **--ovn-sb-db-ssl-ciphers=**_CIPHERS_
    
           **--ovn-ic-nb-db-ssl-ciphers=**_CIPHERS_
    
           **--ovn-ic-sb-db-ssl-ciphers=**_CIPHERS_
    
           **--ovn-controller-ssl-ciphersuites=**_CIPHERSUITES_
    
           **--ovn-ic-ssl-ciphersuites=**_CIPHERSUITES_
    
           **--ovn-northd-ssl-ciphersuites=**_CIPHERSUITES_
    
           **--ovn-nb-db-ssl-ciphersuites=**_CIPHERSUITES_
    
           **--ovn-sb-db-ssl-ciphersuites=**_CIPHERSUITES_
    
           **--ovn-ic-nb-db-ssl-ciphersuites=**_CIPHERSUITES_
    
           **--ovn-ic-sb-db-ssl-ciphersuites=**_CIPHERSUITES_
    


## ADDRESS AND PORT OPTIONS



           **--db-nb-sync-from-addr=**_IP ADDRESS_
    
           **--db-nb-sync-from-port=**_PORT NUMBER_
    
           **--db-nb-sync-from-proto=**_PROTO_
    
           **--db-sb-sync-from-addr=**_IP ADDRESS_
    
           **--db-sb-sync-from-port=**_PORT NUMBER_
    
           **--db-sb-sync-from-proto=**_PROTO_
    
           **--db-ic-nb-sync-from-addr=**_IP ADDRESS_
    
           **--db-ic-nb-sync-from-port=**_PORT NUMBER_
    
           **--db-ic-nb-sync-from-proto=**_PROTO_
    
           **--db-ic-sb-sync-from-addr=**_IP ADDRESS_
    
           **--db-ic-sb-sync-from-port=**_PORT NUMBER_
    
           **--db-ic-sb-sync-from-proto=**_PROTO_
    
            **--ovn-northd-nb-db=**_PROTO_**:**_IP ADDRESS_**:**_PORT_**..**
    
            **--ovn-northd-sb-db=**_PROTO_**:**_IP ADDRESS_**:**_PORT_**..**
    
            **--ovn-ic-nb-db=**_PROTO_**:**_IP ADDRESS_**:**_PORT_**..**
    
            **--ovn-ic-sb-db=**_PROTO_**:**_IP ADDRESS_**:**_PORT_**..**
    


## CLUSTERING OPTIONS



           **--db-nb-cluster-local-addr=**_IP ADDRESS_
    
           **--db-nb-cluster-local-port=**_PORT NUMBER_
    
           **--db-nb-cluster-local-proto=**_PROTO (tcp/ssl)_
    
           **--db-nb-cluster-remote-addr=**_IP ADDRESS_
    
           **--db-nb-cluster-remote-port=**_PORT NUMBER_
    
           **--db-nb-cluster-remote-proto=**_PROTO (tcp/ssl)_
    
           **--db-nb-election-timer=**_Timeout in milliseconds_
    
           **--db-sb-cluster-local-addr=**_IP ADDRESS_
    
           **--db-sb-cluster-local-port=**_PORT NUMBER_
    
           **--db-sb-cluster-local-proto=**_PROTO (tcp/ssl)_
    
           **--db-sb-cluster-remote-addr=**_IP ADDRESS_
    
           **--db-sb-cluster-remote-port=**_PORT NUMBER_
    
           **--db-sb-cluster-remote-proto=**_PROTO (tcp/ssl)_
    
           **--db-sb-election-timer=**_Timeout in milliseconds_
    
           **--db-ic-nb-cluster-local-addr=**_IP ADDRESS_
    
           **--db-ic-nb-cluster-local-port=**_PORT NUMBER_
    
           **--db-ic-nb-cluster-local-proto=**_PROTO (tcp/ssl)_
    
           **--db-ic-nb-cluster-remote-addr=**_IP ADDRESS_
    
           **--db-ic-nb-cluster-remote-port=**_PORT NUMBER_
    
           **--db-ic-nb-cluster-remote-proto=**_PROTO (tcp/ssl)_
    
           **--db-ic-sb-cluster-local-addr=**_IP ADDRESS_
    
           **--db-ic-sb-cluster-local-port=**_PORT NUMBER_
    
           **--db-ic-sb-cluster-local-proto=**_PROTO (tcp/ssl)_
    
           **--db-ic-sb-cluster-remote-addr=**_IP ADDRESS_
    
           **--db-ic-sb-cluster-remote-port=**_PORT NUMBER_
    
           **--db-ic-sb-cluster-remote-proto=**_PROTO (tcp/ssl)_
    
           **--db-cluster-schema-upgrade=**_yes|no_
    


## PROBE INTERVAL OPTIONS



           **--db-nb-probe-interval-to-active=**_Time in milliseconds_
    
           **--db-sb-probe-interval-to-active=**_Time in milliseconds_
    


## EXTRA OPTIONS



           Any options after ’-’ will be passed on to the binary run by
           _command_ with the exception of start_northd, which can have options
           specified in ovn-northd-db-params.conf. Any _extra_args_ passed to
           start_northd will be passed to the ovsdb-servers if
           **--ovn-manage-ovsdb=yes**
    


## CONFIGURATION FILES



           Following are the optional configuration files. If present, it
           should be located in the etc dir
    
       **ovnnb-active.conf**
           If present, this file should hold the url to connect to the active
           Northbound DB server
    
           **tcp:x.x.x.x:6641**
    
       **ovnsb-active.conf**
           If present, this file should hold the url to connect to the active
           Southbound DB server
    
           **tcp:x.x.x.x:6642**
    
       **ovn-northd-db-params.conf**
           If present, start_northd will not start the DB server even if
           **--ovn-manage-ovsdb=yes**. This file should hold the database url
           parameters to be passed to ovn-northd.
    
           **--ovnnb-db=tcp:x.x.x.x:6641 --ovnsb-db=tcp:x.x.x.x:6642**
    
       **ic-nb-active.conf**
           If present, this file should hold the url to connect to the active
           Interconnection Northbound DB server
    
           **tcp:x.x.x.x:6645**
    
       **ic-sb-active.conf**
           If present, this file should hold the url to connect to the active
           Interconnection Southbound DB server
    
           **tcp:x.x.x.x:6646**
    
       **ovn-ic-db-params.conf**
           If present, this file should hold the database url parameters to
           be passed to ovn-ic.
    
           **--ic-nb-db=tcp:x.x.x.x:6645 --ic-sb-db=tcp:x.x.x.x:6646**
    


## RUNNING OVN DB SERVERS WITHOUT DETACHING



           **# ovn-ctl run_nb_ovsdb**
    
           This command runs the OVN nb ovsdb-server without passing the
           **detach** option, making it to block until ovsdb-server exits. This
           command will be useful for starting the OVN nb ovsdb-server in a
           container.
    
           **# ovn-ctl run_sb_ovsdb**
    
           This command runs the OVN sb ovsdb-server without passing the
           **detach** option, making it to block until ovsdb-server exits. This
           command will be useful for starting the OVN sb ovsdb-server in a
           container.
    
           **# ovn-ctl run_ic_nb_ovsdb**
    
           This command runs the OVN IC-NB ovsdb-server without passing the
           **detach** option, making it to block until ovsdb-server exits. This
           command will be useful for starting the OVN IC-NB ovsdb-server in
           a container.
    
           **# ovn-ctl run_ic_sb_ovsdb**
    
           This command runs the OVN IC-SB ovsdb-server without passing the
           **detach** option, making it to block until ovsdb-server exits. This
           command will be useful for starting the OVN IC-SB ovsdb-server in
           a container.
    


## EXAMPLE USAGE



       **Run ovn-controller on a host already running OVS**
           **# ovn-ctl start_controller**
    
       **Run ovn-northd on a host already running OVS**
           **# ovn-ctl start_northd**
    
       **All-in-one OVS+OVN for testing**
           **# ovs-ctl start --system-id="random"**
    
           **# ovn-ctl start_northd**
    
           **# ovn-ctl start_controller**
    
       **Promote and demote ovsdb servers**
           **# ovn-ctl promote_ovnnb**
    
           **# ovn-ctl promote_ovnsb**
    
           **# ovn-ctl --db-nb-sync-from-addr=x.x.x.x**
           **--db-nb-sync-from-port=6641 --db-nb-probe-interval-to-active=60000**
           **demote_ovnnb**
    
           **# ovn-ctl --db-sb-sync-from-addr=x.x.x.x**
           **--db-sb-sync-from-port=6642 --db-sb-probe-interval-to-active=60000**
           **demote_ovnsb**
    
       **Creating a clustered db on 3 nodes with IPs x.x.x.x, y.y.y.y and**
           **z.z.z.z**
         _Starting OVN ovsdb servers and ovn-northd on the node with IP_
         _x.x.x.x_
    
            **# ovn-ctl --db-nb-addr=x.x.x.x --db-nb-create-insecure-remote=yes**
           **--db-sb-addr=x.x.x.x --db-sb-create-insecure-remote=yes**
           **--db-nb-cluster-local-addr=x.x.x.x**
           **--db-sb-cluster-local-addr=x.x.x.x**
           **--ovn-northd-nb-db=tcp:x.x.x.x:6641,tcp:y.y.y.y:6641,tcp:z.z.z.z:6641**
           **--ovn-northd-sb-db=tcp:x.x.x.x:6642,tcp:y.y.y.y:6642,tcp:z.z.z.z:6642**
           **start_northd**
    
         _Starting OVN ovsdb-servers and ovn-northd on the node with IP_
         _y.y.y.y and joining the cluster started at x.x.x.x_
    
            **# ovn-ctl --db-nb-addr=y.y.y.y --db-nb-create-insecure-remote=yes**
           **--db-sb-addr=y.y.y.y --db-sb-create-insecure-remote=yes**
           **--db-nb-cluster-local-addr=y.y.y.y**
           **--db-sb-cluster-local-addr=y.y.y.y**
           **--db-nb-cluster-remote-addr=x.x.x.x**
           **--db-sb-cluster-remote-addr=x.x.x.x**
           **--ovn-northd-nb-db=tcp:x.x.x.x:6641,tcp:y.y.y.y:6641,tcp:z.z.z.z:6641**
           **--ovn-northd-sb-db=tcp:x.x.x.x:6642,tcp:y.y.y.y:6642,tcp:z.z.z.z:6642**
           **start_northd**
    
         _Starting OVN ovsdb-servers and ovn-northd on the node with IP_
         _z.z.z.z and joining the cluster started at x.x.x.x_
    
            **# ovn-ctl --db-nb-addr=z.z.z.z --db-nb-create-insecure-remote=yes**
           **--db-nb-cluster-local-addr=z.z.z.z --db-sb-addr=z.z.z.z**
           **--db-sb-create-insecure-remote=yes**
           **--db-sb-cluster-local-addr=z.z.z.z**
           **--db-nb-cluster-remote-addr=x.x.x.x**
           **--db-sb-cluster-remote-addr=x.x.x.x**
           **--ovn-northd-nb-db=tcp:x.x.x.x:6641,tcp:y.y.y.y:6641,tcp:z.z.z.z:6641**
           **--ovn-northd-sb-db=tcp:x.x.x.x:6642,tcp:y.y.y.y:6642,tcp:z.z.z.z:6642**
           **start_northd**
    
       **Passing ssl keys when starting OVN dbs will supersede the default ssl**
           **values in db**
         _Starting standalone ovn db server passing SSL/TLS certificates_
    
            **# ovn-ctl --ovn-nb-db-ssl-key=/etc/ovn/ovnnb-privkey.pem**
           **--ovn-nb-db-ssl-cert=/etc/ovn/ovnnb-cert.pem**
           **--ovn-nb-db-ssl-ca-cert=/etc/ovn/cacert.pem**
           **--ovn-sb-db-ssl-key=/etc/ovn/ovnsb-privkey.pem**
           **--ovn-sb-db-ssl-cert=/etc/ovn/ovnsb-cert.pem**
           **--ovn-sb-db-ssl-ca-cert=/etc/ovn/cacert.pem start_northd**
    
       **Avoiding automatic clustered OVN database schema upgrade**
           If you desire more control over clustered DB schema upgrade, you
           can opt-out of automatic on-start upgrade attempts with
           **--no-db-cluster-schema-upgrade**.
    
         _Start OVN NB and SB clustered databases on host with IP x.x.x.x_
         _without schema upgrade_
    
            **# ovn-ctl start_nb_ovsdb --db-nb-cluster-local-addr=x.x.x.x**
           **--no-db-cluster-schema-upgrade # ovn-ctl start_sb_ovsdb**
           **--db-sb-cluster-local-addr=x.x.x.x --no-db-cluster-schema-upgrade**
    
         _Trigger clustered DB schema upgrade manually_
    
            **# ovsdb-client convert unix:/var/run/ovn/ovnnb_db.sock**
           **/usr/local/share/ovn/ovn-nb.ovsschema # ovsdb-client convert**
           **unix:/var/run/ovn/ovnsb_db.sock**
           **/usr/local/share/ovn/ovn-sb.ovsschema**
    


* * *