Feature Description
Multiple virtual IP (VIP) groups can be configured for use by the applications being deployed in the K8s cluster.
SMI’s cluster deployer logic has been enhanced to check if any IPv4 or IPv6 VIP address has been assigned to more than one VIP group.
If the same VIP address has been assigned to multiple VIP groups, the deployment configuration validation will fail.
The following is a sample erroneous VIP groups configuration and a sample of the resulting error message logged through the validation:
Example Erroneous keepalived Configuration | Example Error Message |
---|---|
show running-config clusters tb1-smi-blr-c3 virtual-ips
|
Manual validation: clusters tb1-smi-blr-c3 actions validate-config run
Auto-Validation actions sync run: clusters tb1-smi-blr-c3 actions sync run This will run sync. Are you sure? [no,yes] yes message Validation errors occurred: Error: An error occurred validating SSH private key for cluster: tb1-smi-blr-c3 Error: An error occurred validating node proxy for cluster: tb1-smi-blr-c3 Error: An error occurred validating node oam label config for cluster: tb1-smi-blr-c3 |
The keepalived_config container monitors the configmap vip-config for any changes at regular intervals and if a change is detected the keepalived configuration file is reloaded.
With this enhancement, either all or none of the VIP addresses configured in a VIP group must be present on a node. If only some of the addresses exist on the node, that keepalived process wil be stopped and a new process is automatically started and apply the latest configuration. This ensures that the keepalived processes assign those IP addresses appropriately.
The following is an example of the resulting error message logged through the validation:
kubectl logs keepalived-zqlzp -n smi-vips -c keepalived-config --tail 50 --follow
container
INFO:root:group name :rep2
INFO:root:Ip address: 192.168.139.85 on interface ens224 found on this device: True
INFO:root:Ip address: 192.168.139.95 on interface ens256 found on this device: False
INFO:root:Error Occurred: All VIPs in /config/keepalived.yaml must be either present or absent in this device
INFO:root:VIP Split brain Scenario: Restarting the keepalived process.
For more information on deploying clusters, refer to the UCC SMI Deployment Guide > SMI Cluster Manager – Deployment chapter.