Jump to content
Welcome to our new Citrix community!

How to unbind Action from CS Policy?


Recommended Posts

On 11.1 ATM.

 

Right now I have CS Policys that call CS Actions that call a Target LB vServer. What I found is SNMP does not provide cs policy action tables, so for remote discovery tools like ServiceNow, its impossible to do a full service mapping with actions.

 

So what I am planning to do is move from CS-Policy>CS-Action>LBvServer to just mapping the LBvServer directly to the CS binding itself (CS-Policy>LbvServer.)

 

The problem is, when using the UI on a Content Switching Policy to unbind an action by selecting the top blank/null value from the dropdown - nothing happens. The page refreshes and the Action is still selected.

 

if I use the "unset cs policy pol-cs-service.domain.com -action" command, I get a "done" success but its still bound.

 

NetScaler will not let me bind a vServer directly to the policy without removing the action first. Short of deleting the policy and recreating it, not really sure where to go.

 

I can also not delete an action that is currently bound.

Link to comment
Share on other sites

To change a policy bound to a vserver, use the unbind command:  unbind cs vserver <vsrv> -policyName <policy>

 

To change a cs policy with action to a cs policy without action, you need to unbind the policy from the vserver before you can make the change. Can't change the policy format from NEW (with action) to legacy (without action) without it being not in use first, because it changes how the policy binds to the vserver.

If you don't want to unbind to make this change, then create a new policy2 with the same expression, but no action.  Then unbind old policy and bind new one.

 

So you're unset command might work, but the policy can't currently be bound to make the change.

 

 

  • Like 2
Link to comment
Share on other sites

That's good to know, thanks.

 

Seems a bit silly that Actions are considered new and I am assuming preferred, but aren't included in the SNMP MIBs.

 

Thanks for the quick reply. I am wondering if I should instead be asking Citrix for a feature request to include this data in SNMP rather than reverting to a legacy policy style.

Link to comment
Share on other sites

There not exactly "new", but content switching evolved from a format where the cs policies were expressions only and the destination was set at the time the policy was bound; but this method supports LB destinations only.

As CS expanded to have more capabilities, such as directing traffic to lb vservers and now to GSLB vserver and VPN vservers, or dynamically via expressions, then the actions were introduced.  Which also allowed cs policies to share the structure of all other advanced policies.

 

Example 1: policy without action:

add cs policy cs_pol_demo -rule 'http.req.url.path.contains("/demo1")'

bind cs vserver cs_vsrv_demo -policyName cs_pol_demo -priority 100 -targetlbvserver <vsrver name>

 

Example 2:  policy with action

add cs action cs_act_demo2 -targetlbvserver lb_vsrv_demo2

add cs policy cs_pol_demo2 -rule 'http.req.url.path.contains("/demo2")' -action cs_act_demo2

bind cs vserver cs_vsrv_demo2 -policyName cs_pol_demo2 -priority 100

 

As a result, the way the policy was created affects the bind command. So if you change the policy structure, you have to change the binding. So you can't change the policy action parameter while the policy is currently bound.

 

NOTE: I was mainly just addressing your question of how to change your policy from one format to another.  I don't know if any of that does anything for what you are trying to get SNMP to do.  

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...