Skip to content

Commit

Permalink
docs/misc: clean up usage of legacy :// DB address format
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
dcbw committed Apr 9, 2020
1 parent d4c3e06 commit 8bcd1d0
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 32 deletions.
8 changes: 4 additions & 4 deletions README_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ uses the hostname. kubelet allows this name to be overridden with
-nodeport \
-init-gateways -gateway-local \
-k8s-token="$TOKEN" \
-nb-address="tcp://$CENTRAL_IP:6641" \
-sb-address="tcp://$CENTRAL_IP:6642" 2>&1 &
-nb-address="tcp:$CENTRAL_IP:6641" \
-sb-address="tcp:$CENTRAL_IP:6642" 2>&1 &
```

Note: Make sure to read /var/log/ovn-kubernetes/ovnkube.log to see that there were
Expand Down Expand Up @@ -172,8 +172,8 @@ nohup sudo ovnkube -k8s-kubeconfig kubeconfig.yaml -loglevel=4 \
-k8s-apiserver="http://$CENTRAL_IP:8080" \
-init-node="$NODE_NAME" \
-nodeport \
-nb-address="tcp://$CENTRAL_IP:6641" \
-sb-address="tcp://$CENTRAL_IP:6642" -k8s-token="$TOKEN" \
-nb-address="tcp:$CENTRAL_IP:6641" \
-sb-address="tcp:$CENTRAL_IP:6642" -k8s-token="$TOKEN" \
-init-gateways \
-k8s-service-cidr=$SERVICE_IP_SUBNET \
-cluster-subnets=$CLUSTER_IP_SUBNET 2>&1 &
Expand Down
4 changes: 2 additions & 2 deletions dist/images/ovnkube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ get_ovn_db_vars() {
ovn_nbdb_str=${ovn_nbdb_str}","
ovn_sbdb_str=${ovn_sbdb_str}","
fi
ovn_nbdb_str=${ovn_nbdb_str}tcp://${ovn_db_hosts[${i}]}:${ovn_nb_port}
ovn_sbdb_str=${ovn_sbdb_str}tcp://${ovn_db_hosts[${i}]}:${ovn_sb_port}
ovn_nbdb_str=${ovn_nbdb_str}tcp:${ovn_db_hosts[${i}]}:${ovn_nb_port}
ovn_sbdb_str=${ovn_sbdb_str}tcp:${ovn_db_hosts[${i}]}:${ovn_sb_port}
done
ovn_nbdb=${OVN_NORTH:-$ovn_nbdb_str}
ovn_sbdb=${OVN_SOUTH:-$ovn_sbdb_str}
Expand Down
4 changes: 2 additions & 2 deletions docs/INSTALL.OPENSHIFT.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ that is needed for ovn to access the cluster apiserver.
# oc get configmap ovn-config -o yaml
apiVersion: v1
data:
OvnNorth: tcp://10.19.188.22:6641
OvnSouth: tcp://10.19.188.22:6642
OvnNorth: tcp:10.19.188.22:6641
OvnSouth: tcp:10.19.188.22:6642
k8s_apiserver: https://wsfd-netdev22.ntdv.lab.eng.bos.redhat.com:8443
net_cidr: 10.128.0.0/14
svc_cidr: 172.30.0.0/16
Expand Down
8 changes: 4 additions & 4 deletions docs/INSTALL.SSL.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ sudo ovnkube -k8s-kubeconfig kubeconfig.yaml -loglevel=4 \
-init-master="$NODE_NAME" -cluster-subnets=$CLUSTER_IP_SUBNET \
-k8s-service-cidr=$SERVICE_IP_SUBNET \
-nodeport \
-nb-address="ssl://$CENTRAL_IP:6641" \
-sb-address="ssl://$CENTRAL_IP:6642" \
-nb-address="ssl:$CENTRAL_IP:6641" \
-sb-address="ssl:$CENTRAL_IP:6642" \
-nb-client-privkey /etc/openvswitch/ovncontroller-privkey.pem \
-nb-client-cert /etc/openvswitch/ovncontroller-cert.pem \
-nb-client-cacert /etc/openvswitch/cacert.pem \
Expand All @@ -187,8 +187,8 @@ sudo ovnkube -k8s-kubeconfig $HOME/kubeconfig.yaml -loglevel=4 \
-k8s-apiserver="http://$CENTRAL_IP:8080" \
-init-node="$MINION_NAME" \
-nodeport \
-nb-address="ssl://$CENTRAL_IP:6641" \
-sb-address="ssl://$CENTRAL_IP:6642" -k8s-token=$TOKEN \
-nb-address="ssl:$CENTRAL_IP:6641" \
-sb-address="ssl:$CENTRAL_IP:6642" -k8s-token=$TOKEN \
-nb-client-privkey /etc/openvswitch/ovncontroller-privkey.pem \
-nb-client-cert /etc/openvswitch/ovncontroller-cert.pem \
-nb-client-cacert /etc/openvswitch/cacert.pem \
Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ This section contains the address and (if the 'ssl' method is used) certificates
needed to use the OVN northbound database API. Only the the ovn-kubernetes
master needs to specify the 'server' options.
```
address=ssl://1.2.3.4:6641
address=ssl:1.2.3.4:6641
client-privkey=/path/to/private.key
client-cert=/path/to/client.crt
client-cacert=/path/to/client-ca.crt
Expand All @@ -109,7 +109,7 @@ This section contains the address and (if the 'ssl' method is used) certificates
needed to use the OVN southbound database API. Only the the ovn-kubernetes
master needs to specify the 'server' options.
```
address=ssl://1.2.3.4:6642
address=ssl:1.2.3.4:6642
client-privkey=/path/to/private.key
client-cert=/path/to/client.crt
client-cacert=/path/to/client-ca.crt
Expand Down
8 changes: 4 additions & 4 deletions docs/ha.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ IP1="$MASTER1"
IP2="$MASTER2"
IP3="$MASTER3"

ovn_nb="tcp://$IP1:6641,tcp://$IP2:6641,tcp://$IP3:6641"
ovn_sb="tcp://$IP1:6642,tcp://$IP2:6642,tcp://$IP3:6642"
ovn_nb="tcp:$IP1:6641,tcp:$IP2:6641,tcp:$IP3:6641"
ovn_sb="tcp:$IP1:6642,tcp:$IP2:6642,tcp:$IP3:6642"

nohup sudo ovnkube -k8s-kubeconfig kubeconfig.yaml \
-loglevel=4 \
Expand Down Expand Up @@ -127,8 +127,8 @@ IP1="$MASTER1"
IP2="$MASTER2"
IP3="$MASTER3"
ovn_nb="tcp://$IP1:6641,tcp://$IP2:6641,tcp://$IP3:6641"
ovn_sb="tcp://$IP1:6642,tcp://$IP2:6642,tcp://$IP3:6642"
ovn_nb="tcp:$IP1:6641,tcp:$IP2:6641,tcp:$IP3:6641"
ovn_sb="tcp:$IP1:6642,tcp:$IP2:6642,tcp:$IP3:6642"
nohup sudo ovnkube -k8s-kubeconfig $HOME/kubeconfig.yaml -loglevel=4 \
-logfile="/var/log/openvswitch/ovnkube.log" \
Expand Down
4 changes: 2 additions & 2 deletions docs/ovn_k8s.conf.5
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ On openshift, the token can be generated on the cluster master as follows:
\fBaddress\fR=
This is the url used to access the northbound database server. The scheme may be ssl or tcp.
When ssl is used, the certs must be provided. The host must be a host IP address, not name.
The port, by default, is 6441. E.g., ssl://1.2.3.4:6641
The port, by default, is 6441. E.g., ssl:1.2.3.4:6641
.TP
\fBclient-privkey\fR=/etc/openvswitch/ovnnb-privkey.pem
.TP
Expand All @@ -100,7 +100,7 @@ For example: /etc/openvswitch/ovnnb-ca.cert
\fBaddress\fR=
This is the url used to access the southbound database server. The scheme may be ssl or tcp.
When ssl is used, the certs must be provided. The host must be a host IP address, not name.
The port, by default, is 6442. E.g., ssl://1.2.3.4:6642
The port, by default, is 6442. E.g., ssl:1.2.3.4:6642
.TP
\fBclient-privkey\fR=/etc/openvswitch/ovnsb-privkey.pem
.TP
Expand Down
4 changes: 2 additions & 2 deletions docs/ovnkube.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The Kubernetes API authentication token (not required if --k8s-kubeconfig is giv
The IP address and port for the metrics server to serve on (set to 0.0.0.0 for all IPv4 interfaces).
.TP
\fB\--nb-address\fR string
IP address and port of the OVN northbound API (eg, ssl://1.2.3.4:6641). Leave empty to use a local unix socket.
IP address and port of the OVN northbound API (eg, ssl:1.2.3.4:6641). Leave empty to use a local unix socket.
.TP
\fB\--nb-client-privkey\fR string
Private key that the client should use for talking to the OVN database. Leave empty to use local unix socket.
Expand All @@ -112,7 +112,7 @@ Client certificate that the client should use for talking to the OVN database.
CA certificate that the client should use for talking to the OVN database. Leave empty to use local unix socket.
.TP
\fB\--sb-address\fR string
IP address and port of the OVN southbound database (eg, ssl://1.2.3.4:6642). Leave empty to use a local unix socket.
IP address and port of the OVN southbound database (eg, ssl:1.2.3.4:6642). Leave empty to use a local unix socket.
.TP
\fB\--sb-client-privkey\fR string
Private key that the client should use for talking to the OVN database. Leave empty to use local unix socket.
Expand Down
4 changes: 2 additions & 2 deletions etc/ovn_k8s.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ conf-dir=/etc/cni/net.d
plugin=ovn-k8s-cni-overlay

[ovnnorth]
address=ssl://1.2.3.4:6641
address=ssl:1.2.3.4:6641
client-privkey=/path/to/private.key
client-cert=/path/to/client.crt
client-cacert=/path/to/client-ca.crt
Expand All @@ -25,7 +25,7 @@ server-cert=/path/to/server.crt
server-cacert=/path/to/server-ca.crt

[ovnsouth]
address=ssl://1.2.3.4:6642
address=ssl:1.2.3.4:6642
client-privkey=/path/to/private.key
client-cert=/path/to/client.crt
client-cacert=/path/to/client-ca.crt
Expand Down
6 changes: 3 additions & 3 deletions go-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ Usage:
-k8s-token string
the Kubernetes API authentication token (not required if --k8s-kubeconfig is given)
-nb-address string
IP address and port of the OVN northbound API (eg, ssl://1.2.3.4:6641). Leave empty to use a local unix socket.
IP address and port of the OVN northbound API (eg, ssl:1.2.3.4:6641). Leave empty to use a local unix socket.
-nb-client-privkey string
Private key that the client should use for talking to the OVN database. Leave empty to use local unix socket. (default: /etc/openvswitch/ovnnb-privkey.pem)
-nb-client-cert string
Client certificate that the client should use for talking to the OVN database. Leave empty to use local unix socket. (default: /etc/openvswitch/ovnnb-cert.pem)
-nb-client-cacert string
CA certificate that the client should use for talking to the OVN database. Leave empty to use local unix socket. (default: /etc/openvswitch/ovnnb-ca.cert)
-sb-address string
IP address and port of the OVN southbound API (eg, ssl://1.2.3.4:6642). Leave empty to use a local unix socket.
IP address and port of the OVN southbound API (eg, ssl:1.2.3.4:6642). Leave empty to use a local unix socket.
-sb-client-privkey string
Private key that the client should use for talking to the OVN database. Leave empty to use local unix socket. (default: /etc/openvswitch/ovnsb-privkey.pem)
-sb-client-cert string
Expand Down Expand Up @@ -134,7 +134,7 @@ conf-dir=/etc/cni/net.d
plugin=ovn-k8s-cni-overlay
[ovnnorth]
address=ssl://1.2.3.4:6641
address=ssl:1.2.3.4:6641
client-privkey=/path/to/private.key
client-cert=/path/to/client.crt
client-cacert=/path/to/client-ca.crt
Expand Down
4 changes: 2 additions & 2 deletions go-controller/etc/ovn_k8s.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ apiserver=https://ovn_master_fqn:8443
token=

[OvnNorth]
address=tcp://ovn_master_ip:6641
address=tcp:ovn_master_ip:6641

[OvnSouth]
address=tcp://ovn_master_ip:6642
address=tcp:ovn_master_ip:6642

[gateway]
mode=shared
Expand Down
7 changes: 4 additions & 3 deletions go-controller/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ var OvnNBFlags = []cli.Flag{
cli.StringFlag{
Name: "nb-address",
Usage: "IP address and port of the OVN northbound API " +
"(eg, ssl://1.2.3.4:6641,ssl://1.2.3.5:6642). Leave empty to " +
"(eg, ssl:1.2.3.4:6641,ssl:1.2.3.5:6642). Leave empty to " +
"use a local unix socket.",
Destination: &cliConfig.OvnNorth.Address,
},
Expand Down Expand Up @@ -640,7 +640,7 @@ var OvnSBFlags = []cli.Flag{
cli.StringFlag{
Name: "sb-address",
Usage: "IP address and port of the OVN southbound API " +
"(eg, ssl://1.2.3.4:6642,ssl://1.2.3.5:6642). " +
"(eg, ssl:1.2.3.4:6642,ssl:1.2.3.5:6642). " +
"Leave empty to use a local unix socket.",
Destination: &cliConfig.OvnSouth.Address,
},
Expand Down Expand Up @@ -1257,7 +1257,8 @@ func pathExists(path string) bool {
}

// parseAddress parses an OVN database address, which can be of form
// "ssl:1.2.3.4:6641,ssl:1.2.3.5:6641" or "ssl://1.2.3.4:6641,ssl://1.2.3.5:6641"
// "ssl:1.2.3.4:6641,ssl:1.2.3.5:6641" (OVS/OVN format) or
// "ssl://1.2.3.4:6641,ssl://1.2.3.5:6641" (legacy ovnkube format)
// or "ssl:[fd01::1]:6641,ssl:[fd01::2]:6641
// and returns the validated address(es) and the scheme
func parseAddress(urlString string) (string, OvnDBScheme, error) {
Expand Down

0 comments on commit 8bcd1d0

Please sign in to comment.