Merge "Switch to using hostnames for addressing" into main
This commit is contained in:
commit
f0a937f2d8
@ -37,7 +37,7 @@ LIBAPI = 0
|
||||
|
||||
# Increment this PATCH version before using `charmcraft publish-lib` or reset
|
||||
# to 0 if you are raising the major API version
|
||||
LIBPATCH = 1
|
||||
LIBPATCH = 2
|
||||
|
||||
|
||||
# TODO: add your code here! Happy coding!
|
||||
@ -101,11 +101,11 @@ class OVSDBCMSRequires(Object):
|
||||
logging.debug("OVSDBCMSRequires on_joined")
|
||||
self.on.connected.emit()
|
||||
|
||||
def bound_addresses(self):
|
||||
return self.get_all_unit_values("bound-address")
|
||||
def bound_hostnames(self):
|
||||
return self.get_all_unit_values("bound-hostname")
|
||||
|
||||
def remote_ready(self):
|
||||
return all(self.bound_addresses())
|
||||
return all(self.bound_hostnames())
|
||||
|
||||
def _on_ovsdb_cms_relation_changed(self, event):
|
||||
"""OVSDBCMS relation changed."""
|
||||
|
@ -19,10 +19,10 @@ trap stop_svc EXIT
|
||||
log_msg "Starting"
|
||||
|
||||
/usr/share/ovn/scripts/ovn-ctl run_nb_ovsdb \
|
||||
--db-nb-cluster-local-addr={{ peers.cluster_local_addr }} \
|
||||
--db-nb-cluster-local-addr={{ peers.cluster_local_hostname }} \
|
||||
--db-nb-cluster-local-port={{ peers.db_nb_cluster_port }} \
|
||||
--db-nb-cluster-local-proto=ssl \
|
||||
--db-nb-cluster-remote-addr={{ peers.cluster_remote_addrs | first if not ovs_db.is_charm_leader else '' }} \
|
||||
--db-nb-cluster-remote-addr={{ peers.cluster_remote_hostnames | first if not ovs_db.is_charm_leader else '' }} \
|
||||
--db-nb-cluster-remote-port={{ peers.db_nb_cluster_port }} \
|
||||
--db-nb-cluster-remote-proto=ssl \
|
||||
--ovn-nb-db-ssl-key={{ ovs_db.ovn_key }} \
|
||||
|
@ -19,10 +19,10 @@ trap stop_svc EXIT
|
||||
log_msg "Starting"
|
||||
|
||||
/usr/share/ovn/scripts/ovn-ctl run_sb_ovsdb \
|
||||
--db-sb-cluster-local-addr={{ peers.cluster_local_addr }} \
|
||||
--db-sb-cluster-local-addr={{ peers.cluster_local_hostname }} \
|
||||
--db-sb-cluster-local-port={{ peers.db_sb_cluster_port }} \
|
||||
--db-sb-cluster-local-proto=ssl \
|
||||
--db-sb-cluster-remote-addr={{ peers.cluster_remote_addrs | first if not ovs_db.is_charm_leader else '' }} \
|
||||
--db-sb-cluster-remote-addr={{ peers.cluster_remote_hostnames | first if not ovs_db.is_charm_leader else '' }} \
|
||||
--db-sb-cluster-remote-port={{ peers.db_sb_cluster_port }} \
|
||||
--db-sb-cluster-remote-proto=ssl \
|
||||
--ovn-sb-db-ssl-key={{ ovs_db.ovn_key }} \
|
||||
|
Loading…
x
Reference in New Issue
Block a user