Upgrade NetScaler HA pair with NetScaler MA Service in Citrix Cloud

In this article, we will review how to upgrade a local NetScaler HA pair with NetScaler MA Service in Citrix Cloud.

We previously reviewed how to setup NetScaler MA Service in Citrix Cloud in Lab: Part 35 – Configure a Hybrid NetScaler MA Service environment in Citrix Cloud and we deployed NetScaler MAS agent on-premises and enabled to communication to Citrix Cloud.

Make sure to catch up this series' previous posts first!

 

Architecture

Upgrade NetScaler HA pair with NetScaler MA Service Architecture
Upgrade NetScaler HA pair with NetScaler MA Service Architecture

Getting started

For this part of the lab, you will need to following:

You will learn:

  • How to upgrade HA pair easily from NetScaler MA Service console in Citrix Cloud
  • How to schedule an upgrade with Maintenance Jobs

Upgrade HA Pair with NetScaler MA Service

During an upgrade with MA Service, the secondary node is upgraded first and HA synchronization and propagation of the nodes are disabled until both the nodes are upgraded successfully. A failover is automatically performed at the end of the upgrade on the secondary node.

Connect to your NetScaler HA pair and take a look at the current HA status.

Here NS01 is the primary, NS02 is the secondary and both nodes are UP and running with HA sync enabled.

Current HA status
Current HA status

Go to MA Service in cloud.com and navigate to Networks > Configuration Jobs > Maintenance Jobs.

Maintenance Jobs in NetScaler MA Service
Maintenance Jobs in NetScaler MA Service

Select Create Job and Upgrade NetScaler/Upgrade NetScaler HA.

Create a new maintenance job in NetScaler MA Service
Create a new maintenance job in NetScaler MA Service

Enter a job name (Ex: Upgrade HA pair) and select the instances you want to upgrade to a new firmware.

Maintenance jobs - Create a new job
Maintenance jobs – Create a new job

MA Service will automatically proceed with Pre-Checks including disk space and User Customization.

Maintenance jobs - Prechecks
Maintenance jobs – Prechecks

Note: only instances that have failed the validations will be displayed.

Then select the new firmware that you want deploy. For NetScaler 12, you can find it here: https://www.citrix.com/downloads/netscaler-adc/virtual-appliances/netscaler-vpx-release-121.html.

Maintenance jobs - Select new NetScaler firmware
Maintenance jobs – Select new NetScaler firmware

MA Service will automatically upload the firmware to Citrix Cloud.

Maintenance jobs - Upload build
Maintenance jobs – Upload build

The next step is to schedule the deployment.

You can either schedule the deployment now or schedule both nodes for a later date.

Maintenance jobs - Schedule job
Maintenance jobs – Schedule job

In this lab, we will schedule the first node now and then the second node will be automatically upgraded 3 hours after that (3H is the minimal duration between node upgrades).

Select Finish to start.

Here is the summary of this job.

Maintenance jobs - Job created
Maintenance jobs – Job created

You can go in Execution Summary > Execution History > Command Log to take a look at the current stage of the upgrade.

Here, NetScaler MA Service has disabled HA sync and HA propagation.

Maintenance jobs - Command log
Maintenance jobs – Command log

You can can to the secondary NetScaler node during the upgrade. And see that there is a connection in CLI to that host. The connection is from MA Service.

Maintenance jobs - Activity on the secondary NetScaler
Maintenance jobs – Activity on the secondary NetScaler

After few minutes, the node will reboot.

The install was successful, now MA Service is waiting for the device to reboot.

Maintenance jobs - Command log - waiting for reboot
Maintenance jobs – Command log – waiting for reboot

Once the appliance has rebooted. The task will be marked as completed in MA Service.

Maintenance jobs - Stage 1 of the job completed
Maintenance jobs – Stage 1 of the job completed

In the command log, you can see that all tasks have been completed for the first node and that NetScaler MA Service has made NS02 the primary in the pair with the  forcefailover -f command.

Maintenance jobs - Stage 1 - Command Log
Maintenance jobs – Stage 1 – Command Log

NS02 is now the primary NetScaler in the HA pair.  NS01 is secondary and pending for upgrade.

HA Pair - NS02 is now primary
HA Pair – NS02 is now primary

You will see that the Stage 1 of of the Upgrade Job has been completed. Stage 2 is pending.

Maintenance Jobs - Stage 2 is pending
Maintenance Jobs – Stage 2 is pending

You can check that the node has been upgraded successfully in MA Service. Go to Networks > Instances > NetScaler ADC > 192.168.1.199-192.168.1.200 (instances) > Overview.

Maintenance Jobs - HA Sync is disabled during the upgrade
Maintenance Jobs – HA Sync is disabled during the upgrade

The version installed is 12.1 Build 48.12.nc.

The secondary node upgrade will start at the time scheduled.

Maintenance Jobs - Stage 2 completed in the background
Maintenance Jobs – Stage 2 completed in the background

You don’t have to stay in front of the MA Service console. Upgrade job will run in the background.

Maintenance Jobs - Stage 2 completed in the background
Maintenance Jobs – Stage 2 completed in the background

You can see that MA Service will upgrade, reboot and then force the failover again to bring back NS01 as the primary NetScaler in the HA pair.

Maintenance Jobs - Stage 2 command log
Maintenance Jobs – Stage 2 command log

Then NetScaler MA Service will enable HA synchronization again.

Maintenance Jobs - HAsync is enabled again
Maintenance Jobs – HAsync is enabled again

That’s all to upgrade a NetScaler HA pair to a new firmware with MA Service in Citrix Cloud. You can see the convenience of this feature, especially when you need to upgrade a huge amount of NetScaler appliances.

Make sure to catch up this series' previous posts first!