The Global Server Load Balancing (GSLB) function of NSX ALB (Avi) enables load balancing for globally distributed applications/workloads (usually, different data centers and public clouds). GSLB offers efficient traffic distribution across widely scattered application servers. This enables an organization to run several sites in either Active-Active (load balancing and disaster recovery) or Active-Standby (DR) mode.
In a GSLB setup, the corporate DNS server delegates one or more subdomains to Avi GSLB, which then owns these domains and provides responses to DNS queries from clients. DNS based load balancing is implemented by creating a DNS Virtual Service in Avi. In a GSLB setup, one site is designated as the GSLB leader, and the rest of the sites are GSLB followers.
If you are new to GSLB, I encourage you to read about the same from the links below:
1: Avi GSLB in VMware Cloud on AWS
2: Avi GSLB for Containerized Workloads
Upgrading Avi controllers is pretty straightforward and is well documented in the product documentation. However, the upgrade procedure for a GSLB environment is slightly different than a regular upgrade. This post is focused on the steps that you must follow for a successful Avi upgrade in a GSLB setup.
If you try to upgrade a controller instance directly, you are going to run into an upgrade failure.
The Avi controller GUI won’t tell you why the upgrade failed. To know the real reason for the failure, connect to the avi controller shell and run the command “show upgrade status detail filter pre_check_status“
So the error is pretty evident; the system is expecting the GSLB to be in maintenance mode, and since it’s not enabled, the upgrade is failing.
Step 1: Enable GSLB Maintenance Mode
When you enable maintenance mode on GSLB, there is no impact to the datapath, i.e., the load balancers across the GSLB sites continue to function. However, you can’t make changes to the GSLB config in this mode. To enable GSLB maintenance mode, connect to the Avi controller of the GSLB leader site and execute the command: gslb maintenancemode enabled
If you are unsure of which site is the leader site, login to the Avi controller GUI and navigate to Infrastructure > GSLB > Sites
Enabling the maintenance mode tells you the correct order in which Avi controller sites should be upgraded.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[admin:192.168.10.31]: > gslb maintenancemode enabled +-------------+-----------------------------------------------------------+ | Field | Value | +-------------+-----------------------------------------------------------+ | enabled | True | | details[1] | ========================================================= | | details[2] | Maintenance mode enabled: Suggested upgrade order: | | details[3] | ========================================================= | | details[4] | Upgrade Avi active members: ['siteb_gslb'] | | details[5] | Upgrade Avi leader: sitea_gslb | | details[6] | ========================================================= | | details[7] | Maintenance mode enabled: Change leader candidates: | | details[8] | ========================================================= | | details[9] | Avi active members ['siteb_gslb'] | | details[10] | ========================================================= | +-------------+-----------------------------------------------------------+ |
Step 2: Upgrade Avi Controllers
All follower sites must be upgraded before you upgrade the GSLB leader site. Follow the process of upgrading the Avi controllers.
Ignore any non-fatal warning by selecting the checkbox “Suppress Warnings”
The upgrade starts and goes smoothly now.
Step 3: Disable GSLB maintenance Mode
After all follower and leader sites are upgraded, disable GSLB maintenance mode by running the command: gslb no maintenancemode
1 2 3 4 5 6 |
[admin:192.168.10.31]: > gslb no maintenancemode +------------+---------------------------+ | Field | Value | +------------+---------------------------+ | details[1] | Maintenance mode disabled | +------------+---------------------------+ |
And that’s it for this post.
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing.