Invalid calls to ufw when cms-client-bound-address contains IPv6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-interface-ovsdb |
Triaged
|
High
|
Unassigned | ||
charm-ovn-central |
Triaged
|
High
|
Unassigned |
Bug Description
The ovsdb-cms interface requires providing the CMS' IP address in cms-client-
When doing so, ufw is called with the square brackets left in place causing an error:
2022-03-22 19:24:43 DEBUG unit.ovn-
2022-03-22 19:24:44 ERROR unit.ovn-
2022-03-22 19:24:44 DEBUG unit.ovn-
2022-03-22 19:24:44 ERROR unit.ovn-
However, omitting the square brackets cause failures somewhere else preventing ufw from even being called.
1: https:/
2: https:/
Changed in charm-ovn-central: | |
status: | New → Triaged |
Changed in charm-interface-ovsdb: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in charm-ovn-central: | |
importance: | Undecided → High |
While chatting with Frode Nordahl, he suggested the following quick fix (that I have not tested):
diff --git a/src/lib/ charm/openstack /ovn_central. py b/src/lib/ charm/openstack /ovn_central. py charm/openstack /ovn_central. py charm/openstack /ovn_central. py harm(charms_ openstack. charm.OpenStack Charm):
for addr in _addrs:
ch_ufw. modify_ access( addr, port=port, proto='tcp',
action= 'allow' , prepend=True,
comment= ufw_comment)
index d9cd65b..f5ba614 100644
--- a/src/lib/
+++ b/src/lib/
@@ -642,6 +642,7 @@ class BaseOVNCentralC
_addrs = list(addrs or [])
for port in ports:
+ addr = addr.replace('[', '').replace(']', '')