I'm having the same issue in rev 165.
Moreover, when we call ovsdb-cluster/lib/ovsdb.py@_remote_addrs when joining the cluster,
We get the remote addresses via addr = self.format_addr(unit.received.get(key, '')) (key is 'bound-address') which has the square brackets.
This results in the _remote_addrs function returning an empty array for the remote connection string (format_address raises a ValueError because of the brackets, and we *ignore* value errors), and joining the cluster fails as we provide no remote addresses:
unit-ovn-central-0: 08:36:03 INFO unit.ovn-central/0.juju-log ovsdb-peer:17: ['ovsdb-tool', 'join-cluster', '/var/lib/ovn/ovnnb_db.db', 'OVN_Northbound', 'ssl:[my_local_ipv6_addr]:6643']
unit-ovn-central-0: 08:36:03 ERROR unit.ovn-central/0.juju-log ovsdb-peer:17: Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-ovn-central-0/.venv/lib/python3.10/site-packages/charms/reactive/__init__.py", line 74, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-ovn-central-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-ovn-central-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-ovn-central-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-ovn-central-0/charm/reactive/ovn_central_handlers.py", line 245, in render
ovn_charm.join_cluster('ovnnb_db.db', 'OVN_Northbound',
File "/var/lib/juju/agents/unit-ovn-central-0/charm/lib/charm/openstack/ovn_central.py", line 500, in join_cluster
self.run(*cmd)
File "/var/lib/juju/agents/unit-ovn-central-0/charm/lib/charm/openstack/ovn_central.py", line 452, in run
cp = subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('ovsdb-tool', 'join-cluster', '/var/lib/ovn/ovnnb_db.db', 'OVN_Northbound', 'ssl:[my_local_ipv6_addr]:6643')' returned non-zero exit status 1.
The exit status is because we need to pass at least 4 arguments.
I just added a .replace("[", "").replace("]", "") to the format_address function which resolved the first issue and I'm now facing this one.
Both these issues share the same cause and I'd agree with Frode, ipv6 addresses should be passed as pure addresses and formatted when necessary.
I'm having the same issue in rev 165. lib/ovsdb. py@_remote_ addrs when joining the cluster, addr(unit. received. get(key, '')) (key is 'bound-address') which has the square brackets. central/ 0.juju- log ovsdb-peer:17: ['ovsdb-tool', 'join-cluster', '/var/lib/ ovn/ovnnb_ db.db', 'OVN_Northbound', 'ssl:[my_ local_ipv6_ addr]:6643' ] central/ 0.juju- log ovsdb-peer:17: Hook error: juju/agents/ unit-ovn- central- 0/.venv/ lib/python3. 10/site- packages/ charms/ reactive/ __init_ _.py", line 74, in main dispatch( restricted= restricted_ mode) juju/agents/ unit-ovn- central- 0/.venv/ lib/python3. 10/site- packages/ charms/ reactive/ bus.py" , line 390, in dispatch other_handlers) juju/agents/ unit-ovn- central- 0/.venv/ lib/python3. 10/site- packages/ charms/ reactive/ bus.py" , line 359, in _invoke invoke( ) juju/agents/ unit-ovn- central- 0/.venv/ lib/python3. 10/site- packages/ charms/ reactive/ bus.py" , line 181, in invoke _action( *args) juju/agents/ unit-ovn- central- 0/charm/ reactive/ ovn_central_ handlers. py", line 245, in render charm.join_ cluster( 'ovnnb_ db.db', 'OVN_Northbound', juju/agents/ unit-ovn- central- 0/charm/ lib/charm/ openstack/ ovn_central. py", line 500, in join_cluster juju/agents/ unit-ovn- central- 0/charm/ lib/charm/ openstack/ ovn_central. py", line 452, in run python3. 10/subprocess. py", line 526, in run ror(retcode, process.args, CalledProcessEr ror: Command '('ovsdb-tool', 'join-cluster', '/var/lib/ ovn/ovnnb_ db.db', 'OVN_Northbound', 'ssl:[my_ local_ipv6_ addr]:6643' )' returned non-zero exit status 1.
Moreover, when we call ovsdb-cluster/
We get the remote addresses via addr = self.format_
This results in the _remote_addrs function returning an empty array for the remote connection string (format_address raises a ValueError because of the brackets, and we *ignore* value errors), and joining the cluster fails as we provide no remote addresses:
unit-ovn-central-0: 08:36:03 INFO unit.ovn-
unit-ovn-central-0: 08:36:03 ERROR unit.ovn-
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
ovn_
File "/var/lib/
self.run(*cmd)
File "/var/lib/
cp = subprocess.run(
File "/usr/lib/
raise CalledProcessEr
subprocess.
The exit status is because we need to pass at least 4 arguments.
I just added a .replace("[", "").replace("]", "") to the format_address function which resolved the first issue and I'm now facing this one.
Both these issues share the same cause and I'd agree with Frode, ipv6 addresses should be passed as pure addresses and formatted when necessary.