Configuring the LB with different subnets for front and back ends and different port security configs is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Openstack Integrator Charm |
Triaged
|
Medium
|
Unassigned |
Bug Description
I'm deploying Charmed Kubernetes 1.20 on top of OpenStack Bionic/Ussuri. openstack-
applications:
openstack-
charm: cs:~containers/
channel: candidate
num_units: 1
options:
lb-subnet: b94b1f43-
to:
- 15
lb-subnet is set to 'ext-subnet' that has port security on (10.254.8.0/24), Kubernetes nodes are deployed to another subnet, 'k8s-subnet' (10.254.9.0/24) with port security disabled:
$ openstack subnet list | grep -e 'ext-subnet\
| b94b1f43-
| d29f503a-
This configuration, while expected to work, actually does not, because the charm does not expect member IPs and the VIP of LB to be deployed to different networks.
1) While the LB itself seems to be configured properly, e.g. its members are deployed to the correct subnet and the VIP as well, the charm tries to set port security on the member IPs, but port security is disabled on k8s-subnet (see also the attached port-security.txt):
2021-04-05 15:03:32 WARNING update-status BadRequestExcep
Port security must be enabled and port must have an IP address in order to use security groups.
2021-04-05 15:03:32 ERROR juju-log Error updating loadbalancer
Traceback (most recent call last):
File "lib/charms/
self.
File "lib/charms/
self.
File "lib/charms/
_run_
File "lib/charms/
result = subprocess.
File "/usr/lib/
raise CalledProcessEr
subprocess.
It seems that after this error, the charm will repeatedly try to update_members() and fail:
2021-04-05 15:54:09 WARNING update-status Another member on this pool is already using ip 10.254.9.237 on protocol_port 6443 (HTTP 409) (Request-ID: req-d32068ce-
2021-04-05 15:54:10 ERROR juju-log Error updating loadbalancer
Traceback (most recent call last):
File "lib/charms/
self.
File "lib/charms/
_openstack(
File "lib/charms/
output = _run_with_
File "lib/charms/
result = subprocess.
File "/usr/lib/
raise CalledProcessEr
subprocess.
Probably the reason for that is that the charm checks if security groups are enabled [1], [2] and [3] on the wrong subnet [4].
[1] https:/
[2] https:/
[3] https:/
[4] https:/
Changed in charm-openstack-integrator: | |
importance: | Undecided → Medium |
status: | New → Triaged |