Skip to content

Commit

Permalink
fix: deal with ipv6 connection str
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Aug 18, 2019
1 parent 7d6b950 commit 31544ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/images/start-controller.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
export OVN_NB_DAEMON=$(ovn-nbctl --db=tcp:${OVN_NB_SERVICE_HOST}:${OVN_NB_SERVICE_PORT} --pidfile --detach)
export OVN_NB_DAEMON=$(ovn-nbctl --db=tcp:[${OVN_NB_SERVICE_HOST}]:${OVN_NB_SERVICE_PORT} --pidfile --detach)
exec ./kube-ovn-controller --ovn-nb-host=${OVN_NB_SERVICE_HOST} --ovn-nb-port=${OVN_NB_SERVICE_PORT} $@
8 changes: 4 additions & 4 deletions dist/images/start-db.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -eo pipefail

DB_NB_ADDR=${DB_NB_ADDR:-0.0.0.0}
DB_NB_ADDR=${DB_NB_ADDR:-::}
DB_NB_PORT=${DB_NB_PORT:-6641}
DB_SB_ADDR=${DB_SB_ADDR:-0.0.0.0}
DB_SB_ADDR=${DB_SB_ADDR:-::}
DB_SB_PORT=${DB_SB_PORT:-6642}

function gen_conn_str {
Expand Down Expand Up @@ -60,7 +60,7 @@ else
fi

# ovn-nb and ovn-sb listen on tcp ports for ovn-controller to connect
ovn-nbctl set-connection ptcp:${DB_NB_PORT}:${DB_NB_ADDR}
ovn-sbctl set-connection ptcp:${DB_SB_PORT}:${DB_SB_ADDR}
ovn-nbctl set-connection ptcp:${DB_NB_PORT}:[${DB_NB_ADDR}]
ovn-sbctl set-connection ptcp:${DB_SB_PORT}:[${DB_SB_ADDR}]

tail -f /var/log/openvswitch/ovn-northd.log
8 changes: 7 additions & 1 deletion yamls/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ spec:
- name: GatewayType
type: string
JSONPath: .spec.gatewayType
- name: Used
type: integer
JSONPath: .status.usingIPs
- name: Available
type: integer
JSONPath: .status.availableIPs
validation:
openAPIV3Schema:
properties:
Expand All @@ -70,4 +76,4 @@ spec:
cidrBlock:
type: "string"
gateway:
type: "string"
type: "string"

0 comments on commit 31544ab

Please sign in to comment.