STR: 1. Apply default cr.yml 2. Downscale haproxy 3->2 in cr.yml and apply it (works ok) 3. Downscale haproxy 2->1 in cr.yml and apply it (does not work) 4. Change allowUnsafeConfigurations from false to true and apply 5. You can check cluster configuration in ps.yml (the result of the command below)
We don't have any logs about this behaviour in operator logs(K8SPS-172).
Yep, we should do it as we have in PXC and make it clear for user why we didn’t change haproxy size.
inel.pandzic January 16, 2024 at 9:33 AM
I think is right, I think it would be good for the user that we log this. Wdyt?
natalia.marukovich January 15, 2024 at 9:16 AM
So as I see When I try to change haproxy size from 2 → 1 (allowUnsafeConfigurations: false) We don’t do it and don’t show any logs in operator. It could be confusing for the users. In pxc we have logs about this case. So it looks like: we have in ps object:
But in reality we have 2 haproxy pods:
If I change allowUnsafeConfigurations: false → true we downscale correctly.
inel.pandzic January 9, 2024 at 2:51 PM
I can’t reproduce this issue, I can see that this is working OK. I set allowUnsafeConfigurations to true and can scale down haproxy to 1.
Also regarding your comment, this is also working fine. I just need to set updateStrategy to rollingUpdate or onDelete and haproxy sts is deleted properly.
STR:
1. Apply default cr.yml
2. Downscale haproxy 3->2 in cr.yml and apply it (works ok)
3. Downscale haproxy 2->1 in cr.yml and apply it (does not work)
4. Change allowUnsafeConfigurations from false to true and apply
5. You can check cluster configuration in ps.yml (the result of the command below)
We don't have any logs about this behaviour in operator logs(K8SPS-172).
Should we add https://github.com/percona/percona-server-mysql-operator/blob/main/api/v1alpha1/perconaservermysql_types.go#L513 here the condition about unsafe configuration?
It works for pxc:
Downscale haproxy 2->1 in cr.yml and apply it (does not work) and see logs
Change allowUnsafeConfigurations from false to true and apply (haproxy is downscaled to 1)