Forum Discussion
How to create a new node and it add it to a pool as disabled.
I am trying to create a new node and add it to a pool as disabled. Currently, I cannot find anything in the API that will allow me to do that.
I can create and add it as enabled using LocalLB::Pool.add_member_v2, and then disable it right after that, but I don't want it to ever be enabled.
It sounds like you're running into an issue with your node names. I'm guessing your error is that the address specified already matches an existing node?
When a node is created with
LocalLB::Pool::add_member_v2()
The name of the created node (if it doesn't already exist) is the same as the IP address you gave it.
So when you create the node with
LocalLB::NodeAddressV2::create()
Just pass the IP address as the name as well. That way, you can create it, disable it with
LocalLB::NodeAddressV2::set_session_enabled_state
as stated by the others, and then add it to the pool you want. You won't run into the issue I'm guessing you have. The last call will match the specified AddressPorts to the existing nodes.
- mhite_60883Cirrocumulus
It's a tricky one. I would say to just ensure the host fails health check, but even if the host would fail health check, there is a period of time before it gets marked as down. In the small window, traffic is sent to the node.
Will be interested to hear what suggestion other folks have.
modify ltm pool pool_web members add { 10.131.131.105:80 { session user-disabled state user-down } }
Yes, it´s tmsh. I´ve never touched iControl by now, sorry for ignoring the tags to your request.
How about crafting a node (parent object to pool member) first, marking it as state down:LocalLB::NodeAddressV2::set_session_enabled_state
And create the poolmember afterwards. It´s a workaround as I don´t see a method in the API to define options during poolmember definition.
- travis_94010Nimbostratus
It sounds like you're running into an issue with your node names. I'm guessing your error is that the address specified already matches an existing node?
When a node is created with
LocalLB::Pool::add_member_v2()
The name of the created node (if it doesn't already exist) is the same as the IP address you gave it.
So when you create the node with
LocalLB::NodeAddressV2::create()
Just pass the IP address as the name as well. That way, you can create it, disable it with
LocalLB::NodeAddressV2::set_session_enabled_state
as stated by the others, and then add it to the pool you want. You won't run into the issue I'm guessing you have. The last call will match the specified AddressPorts to the existing nodes.
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