Pool Transactions and Shifting Traffic

A BIG-IP system device group for version 11.x, or later, includes two or more BIG-IP systems, with one or more traffic groups operating in active state. In this example, a version 11.x, or later, device group includes one BIG-IP system with traffic-group-1 operating in active state (Device A), one BIG-IP system with traffic-group-2 operating in active state (Device B), and one BIG-IP system with traffic-group-3 operating in active state (Device C).

When upgrading an 11.x, or later, device group to the new version software, you first need to prepare your devices. After preparing the devices, you force Device A to offline state, and install the new version software onto Device A. When you finish the installation of the new version software onto Device A, the traffic groups remain in standby state on Device A, and in active state on Device B and Device C.

Once Device A reboots, if the BIG-IP system is configured to use a network hardware security module (HSM), we must reinstall network HSM client software on Device A before upgrading Device B, to ensure that traffic groups using the network HSM function properly.

A device group with Device A upgraded to the new version software, and traffic groups in standby state

With the new version software installed on Device A and all traffic groups in standby state, we force Device B to offline state, changing the traffic groups on Device A to active state so that they can pass traffic. We can then install the new version software onto Device B, and reboot Device B to the location of the new version software image.

Below, all of the commands are committed together as a transaction, such that if any of them fail all of the others are rolled back.

#!/bin/bash

USERPASS='admin:password'

## create a transaction and return the transaction ID

transid=`curl -sk -u $USERPASS -H 'Accept: application/json' -H 'Content-Type: application/json' https://[mgmt-ip]/mgmt/tm/transaction -d '{}' |awk -F"," '{ print $1 }' |awk -F":" '{ print $2 }'`


## disable the first pool's member

curl -sk -u $USERPASS -H "X-F5-REST-Coordination-Id: $transid" -H "Accept: application/json" -H "Content-Type: application/json" -X PUT https://[mgmt-ip]/mgmt/tm/ltm/pool/[pool-name] -d '{"name":"[pool-name]","members":[{"name":"[member-name]","state":"user-down"}]}'


## disable the second pool's member
curl -sk -u $USERPASS -H "X-F5-REST-Coordination-Id: $transid" -H "Accept: application/json" -H "Content-Type: application/json" -X PUT https://[mgmt-ip]/mgmt/tm/ltm/pool/[pool-name] -d '{"name":"[pool-name]","members":[{"name":"[member-name]","state":"user-down"}]}'


## commit the transaction
curl -sk -u $USERPASS -H "Accept: application/json" -H "Content-Type: application/json" -X PUT https://[mgmt-ip]/mgmt/tm/transaction/$transid -d '{ "state":"VALIDATING" }'

Abhishek Khandal

Read more posts by this author.

Jaipur, INDIA

Subscribe to Abhishek Khandal

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!