Forum Discussion

Rob_74473's avatar
Rob_74473
Icon for Cirrus rankCirrus
Oct 23, 2018

trying to enable, disable, and force down a node

I saw Jason's answer to an earlier question about disabling a node, but I'm still running into trouble. I can force offline, but I cannot enable or disable.

node = bigip_root.tm.ltm.nodes.node.load(partition='Common', name='C100_testHost_NODE')
node.session = 'user-disabled'
node.update(state='user-down')

works

node.session = 'user-enabled'
node.update(state='unchecked')

doesn't work

node.session = 'user-disabled'
node.update(state='unchecked')

doesn't work

3 Replies

  • I'm not able to edit the question, so I'll comment some more details. It seems that I can go from Enabled to Disabled, and from Disabled to Forced, but once it's in Forced state I cannot get it back to Enabled or Disabled. Forced seems to be a blackhole in the API.

     

  • I can also get from Disabled to Enabled, so it's just not possible to get from Forced Offline to anything else. Any help would greatly appreciated.

     

  • Use

    state
    and
    session
    fields to modify the state of a node. You can specify either
    user-up
    or
    user-down
    for the state.
    user-enabled
    and
    user disabled
    for the session.

    A node becomes Offline/Enabled (red diamond) by PATCHing

    '{"state":"user-down"}'
    .
    '{"state":"user-up"}'
    to bring it up (green circle).

    A node becomes Available/Disabled (black circle) by patching

    '{"session":"user-disabled"}'
    . Again,
    '{"session":"user-enabled"}'
    will bring it back alive.

    If you patch both in one shot, i.e.,

    '{"state":"user-down", "session":"user-disabled"}'
    , the node status becomes Offline/Disabled (black diamond).

    See also K12213214: Overview of colored status icons in the Configuration utility for the meanings of the states.

    Additional info: You can get the available values for a parameter from

    tmsh
    . Just type the command halfway-through, and TAB. e.g.,

    [root@ltm1213A:Standby:Changes Pending] config  tmsh
    root@(ltm1213A)(cfg-sync Changes Pending)(Standby)(/Common)(tmos) modify ltm node sat state [TAB]
    Values:
      user-down   user-up
    

    I hope this would help.