Forum Discussion
remove a node from multiple pools using bash
I have a node that I would like to delete from multiple pools that is running on different ports. I tried the command below, and while it removes some, I noticed it doesn't delete the members that are in offline or disabled mode. Any help would be grateful.
node="10.131.131.5"; tmsh list ltm pool one-line | grep -E "${node}:[[:alnum:]]" | \ sed -r 's/ltm pool ([^ ]+).*members.*('${node}':[[:alnum:]]+).*/tmsh modify ltm pool \1 members delete { \2 }/g' | bash -x
VFB Would you mind sharing what your output looks like when you run just the following from tmsh?
list ltm pool one-line | grep "10.131.131.5"
- VFBCirrus
The output shows all the pools with the associated member.
VFB Yes, I do realize what the output should be but I'm looking for what it is for you to ensure that what you have command wise will work or we can figure out why it doesn't work. Ideally I would like to see two of the lines, one with all pool members active/working and one with some down/disabled pool members.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com