Jump to content
Welcome to our new Citrix community!

nspepi crashes when set cmp policy in nsconfig


Abdesslem Maktouf

Recommended Posts

Hello, 
the nspepi script crashes when `set cmp parameter -policyType ADVANCED` is the ns.conf file
The error output looks like 
` nspepi -f  /tmp/ns.conf.test
Traceback (most recent call last):
  File "/netscaler/nspepi2/nspepi_main.py", line 235, in <module>
    main()
  File "/netscaler/nspepi2/nspepi_main.py", line 231, in main
    convert_config_file(args.infile, outfile, args.verbose)
  File "/netscaler/nspepi2/nspepi_main.py", line 152, in convert_config_file
    for output in m.method(m.obj, parsed_tree):
  File "/netscaler/nspepi2/convert_cmp_cmd.py", line 82, in set_cmp_parameter
    if cmp_param_tree.get_number_of_params() == 0:
AttributeError: 'CLICommand' object has no attribute 'get_number_of_params'
`
When removing the set cmp line, the script runs normally and output just a warning 

`WARNING - Bindings of advanced CMP policies to cmp global are commented out, because initial global cmp parameter is classic but advanced policies are bound. Now global cmp parameter policy type is set to advanced. If commands are required please take a backup because comments will not be saved in ns.conf after triggering 'save ns config'. Advanced expressions only have a fixed ordering of the types of bindings without interleaving, except that global bindings are allowed before all other bindings and after all bindings. If you have global bindings in the middle of non-global bindings or any other interleaving then you will need to reorder all your bindings for that feature and direction. Refer to nspepi documentation.
`
 

Link to comment
Share on other sites

Are you already on 13.1 or still on 13.0 or early when you run the command?  I think a 12.1 or 13.0 nspepi will map the setting. 

 

Technically the command isn't needed any more on the 13.1 as it is the default (and only value). And the alternative value isn't in use.

The command doesn't show in the 13.1 help set cmp parameter, though it can be manually executed and is still takes the advanced value; classic is invalid.

 

You should be able to omit that parameter and the existing classic policies will be ignored. And still be in "advanced" engine.  nspepi shouldn't choke on it; but omitting it is the correct way to do it too.

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...