Forum Discussion
alexlindley_346
Oct 20, 2010Nimbostratus
Viewing Pool Member details via API
Hi,
Sorry if this has been answered before but I couldn't find a definitive answer...
I have three Pools of servers each with 9 servers in them. I'm running scripts to automate taking certain members of each pool out so new applications can be installed on the server and then bringing them back into service.
I'm trying to take them out and back in gracefully:
Enabled -> Disabled -> Forced Offline -> Disabled -> Enabled
I've read Joe's article on how this should be done so I'm running the following methods:
my $soapResponse = $PoolMember->set_session_enabled_state(
SOAP:: Data->name ( pool_names => [$pool] ),
SOAP:: Data->name ( session_states => [@nodes_to_change_state] )
);
to stop any new sessions being created to the servers and then:
my $soapResponse = $PoolMember->set_monitor_state(
SOAP:: Data->name ( pool_names => [$pool] ),
SOAP:: Data->name ( monitor_states => [@nodes_to_change_state] )
);
To stop connections to the servers all together.
There is a 25 minute gap between the two commands and during this time I want to query the servers through the API to see which servers are still active and which have been "disabled". Then after the 25 minute wait I want to be able to see the servers which have been "forced offline".
I thought I would be able to do this using the following methods:
my $soapResponse = $PoolMember->get_session_enabled_state(
SOAP:: Data->name ( pool_names => [@pool_list] )
);
my $soapResponse = $PoolMember->get_object_status(
SOAP:: Data->name ( pool_names => [@pool_list] )
);
However when I run these after the initial disable it shows the pool members session_enabled state as: "STATE_DISABLED", but it also shows the object status as "ENABLED_STATUS_DISABLED". It then shows exactly the same thing when I run the command to force down pool members.
What information can I obtain through the API that will show me when a pool member is either:
Enabled (All traffic allowed)
Disabled (Only persistent or active connections allowed)
Forced Offline (Only active connections allowed)
As we see in the Web GUI?
One final question, when a pool member is forced offline is it possible to set it back to "disabled" via the API methods?
Hopefully I've explained myself well enough, let me know if you need any more details.
Thanks for your help its much appreciated!
Alex
- Hi Alex, I'll see if I can address each of your questions.
- alexlindley_346NimbostratusHi Joe,
- JRahmAdminThere is no setting that will block ALL connections, even disabled/disabled allows active connections to finish their job. Only if a monitor itself marks the service as down will the active connections be dropped.
- hooleylistCirrostratusHey Joe,
- Thanks Aaron, that darn three-way toggle in the GUI has spawned so many questions with regards to the API. The core deals with the two different states, but I think the GUI folks thought it was easier to understand as a three-way toggle instead of presenting two different check boxes. Oh well, gives me something to write about B-).
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects