03-09-2012 10:54 AM
I posted this once already, but thought I might have more success here.
Currently Being Moderated
I have Redundant WAN's, I want track the availability of both from the Core Nexus 7K, if either WAN is Lost, I want to apply a Service Policy that will remark Video Traffic to DSCP 10. I have the following.
track 120 ip route 10.223.0.120/30 reachability {the CE to PE link on Wan1}
track 124 ip route 10.223.0.124/30 reachability {the CE to PE link on Wan2}
track 401 list boolean and
object 120
object 124
class-map type qos match-all VIDEO
match dscp 34
policy-map type qos VIDEO_STOP
class VIDEO
set dscp 10
event manager applet VIDEO_STOP
event track 401 state down
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "int e8/23"
action 4.0 cli command "service-policy output VIDEO_STOP"
action 5.0 cli command "int e8/24"
action 6.0 cli command "service-policy output VIDEO_STOP"
action 7.0 cli command "end"
labCDCNX1-CS1# sh event manager policy internal VIDEO_STOP
Name : VIDEO_STOP
Policy Type : applet
Event Specification : event track 401 state down
Action : 1.0,vsh,sup:command "enable";2.0,vsh,sup:comman
d "config t";3.0,vsh,sup:command "int e8/23";4.0,vsh,sup:command "service-policy
output VIDEO_STOP";5.0,vsh,sup:command "int e8/24";6.0,vsh,sup:command "service
-policy output VIDEO_STOP";7.0,vsh,sup:command "end"
Event Specification active on : Standby, Active
labCDCNX1-CS1#
But when I meet the tracking criteria, the policy-map is not appied, I plan to do the reverse when the Track 401 state returns to UP
Thanks
Mark
03-09-2012 11:03 AM
Do you see the tracked object 401 going down? The way it's written, it will go down if either the route 120 or the route 124 goes down.
NX-OS EEM is a different beast that IOS EEM. I do not think you need "enable" with NX-OS applets.
03-09-2012 11:21 AM
Yes the tracking function is working correctly,
labCDCNX1-CS1# sh track
Track 120
IP Route 10.223.0.120/30 Reachability
Reachability is DOWN
12 changes, last change 00:01:30
Tracked by:
Track List 401
Track 124
IP Route 10.223.0.124/30 Reachability
Reachability is DOWN
12 changes, last change 00:01:30
Tracked by:
Track List 401
Track 401
List Boolean and
Boolean and is DOWN
12 changes, last change 00:01:30
Track List Members:
object 124 DOWN
object 120 DOWN
I remove the enable command but it still does't run properly, the debug isn't much help,
2012 Mar 10 00:15:09.742257 evmc: avl_ev_type_info_cmp_func: Found ev_type:123393 name:track
2012 Mar 10 00:15:09.742275 evmc: evmc_policy_get_policy_info_by_id: Trying to find policy with id:1426735104
2012 Mar 10 00:15:09.742367 evmc: Malloc in fu_hashtable_2012 Mar 10 00:15:09.742425 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742485 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742497 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742507 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742520 evmc: evmc_util_fix_action_spec: The formatted action spec: 2.0,vsh,sup:command "config t";3.0,vsh,sup:command "int e8/23";4.0,vsh,sup:command "service-policy output VIDEO_STOP";5.0,vsh,sup:command "int e8/24";6.0,vsh,sup:command "service-policy output VIDEO_STOP";7.0,vsh,sup:comman
2012 Mar 10 00:15:09.742553 evmc: evmc_enqueue_action: Trying to enqueue an action
2012 Mar 10 00:15:09.742577 evmc: evmc_enqueue_action: Enqueueing an action
2012 Mar 10 00:15:09.745207 evmc: evmc_exec_action: Starting with policy VIDEO_STOP
2012 Mar 10 00:15:09.745254 evmc: evmc_exec_cmd: Executing command
2012 Mar 10 00:15:09.745291 evmc: fu_fsm_context_set_out_flag: Setting Context flags: ^IFU_FSM_CONTEXT_FLAG_DONT_DROP_MTS_MSG
2012 Mar 10 00:15:09.745307 evmc: fu_fsm_execute_all: match_msg_id(0), log_already_open(0)
2012 Mar 10 00:15:09.745318 evmc: fu_fsm_execute_all: null fsm_event_list
2012 Mar 10 00:15:09.745327 evmc: fu_fsm_engine_post_event_processing
2012 Mar 10 00:15:09.745337 evmc: end of while in fu_fsm_engine
2012 Mar 10 00:15:09.745347 evmc: begin fu_fsm_engine: line[2314]
2012 Mar 10 00:15:09.872099 evmc: fu_priority_select: - setting fd[7] for select call - setting fd[8] for select call
2012 Mar 10 00:15:09.872124 evmc: fu_priority_select_select_queue: round credit(78)
2012 Mar 10 00:15:09.872134 evmc: curr_q - FU_PSEL_Q_CAT_CQ, usr_q_info(1), priority(7), credit(5), empty
2012 Mar 10 00:15:09.872147 evmc: fu_priority_select: returning FU_PSEL_Q_CAT_MTS queue, fd(8), usr_q_info(4)
2012 Mar 10 00:15:09.872192 evmc: evmc_get_data_from_queue(775): dequeued mts msg (16450078), MTS_OPC_MVSH_EXEC_CMDS_DONE
2012 Mar 10 00:15:09.872214 evmc: fu_sdb_publisher_invoke_app_callback:App is not a publisher;Bail-out.
2012 Mar 10 00:15:09.872230 evmc: fsrv_sdb_process_msg: vdc-id[2] mts_opc[3092][MTS_OPC_MVSH_EXEC_CMDS_DONE] 0x80d28b0 0xb5d70674 300
2012 Mar 10 00:15:09.872243 evmc: fu_fsm_engine: fsrv_sdb_process_msg ret 0x0
2012 Mar 10 00:15:09.872253 evmc: fu_fsm_engine: fsrv_sdb_process_msg continue ret 0x0
2012 Mar 10 00:15:09.872268 evmc: fu_sync_pss_to_standby_apply:Set of checks failed
2012 Mar 10 00:15:09.872281 evmc: fu_sdb_handle_update: validation fail
2012 Mar 10 00:15:09.872297 evmc: fu_sdb_handle_update: validation fail, fu_is_state_active = 1, fu_is_sync_pss_to_standby_enabled = 0, mts_sync_event_get(mts_msg) = 0, create_del) = 0
2012 Mar 10 00:15:09.872313 evmc: evmc_handle_eh_resp: evmc_handle_eh_resp: rid = 0x176b06
2012 Mar 10 00:15:09.872518 evmc: evmc_eh_done: evmc_eh_done
No validation for vsh commands
2012 Mar 10 00:15:09.742257 evmc: avl_ev_type_info_cmp_func: Found ev_type:123393 name:track
2012 Mar 10 00:15:09.742275 evmc: evmc_policy_get_policy_info_by_id: Trying to find policy with id:1426735104
2012 Mar 10 00:15:09.742367 evmc: Malloc in fu_hashtable_2012 Mar 10 00:15:09.742425 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742485 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742497 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742507 evmc: evmc_util_fix_action_spec: No validation for vsh commands
2012 Mar 10 00:15:09.742520 evmc: evmc_util_fix_action_spec: The formatted action spec: 2.0,vsh,sup:command "config t";3.0,vsh,sup:command "int e8/23";4.0,vsh,sup:command "service-policy output VIDEO_STOP";5.0,vsh,sup:command "int e8/24";6.0,vsh,sup:command "service-policy output VIDEO_STOP";7.0,vsh,sup:comman
2012 Mar 10 00:15:09.742553 evmc: evmc_enqueue_action: Trying to enqueue an action
2012 Mar 10 00:15:09.742577 evmc: evmc_enqueue_action: Enqueueing an action
2012 Mar 10 00:15:09.745207 evmc: evmc_exec_action: Starting with policy VIDEO_STOP
2012 Mar 10 00:15:09.745254 evmc: evmc_exec_cmd: Executing command
2012 Mar 10 00:15:09.745291 evmc: fu_fsm_context_set_out_flag: Setting Context flags: ^IFU_FSM_CONTEXT_FLAG_DONT_DROP_MTS_MSG
2012 Mar 10 00:15:09.745307 evmc: fu_fsm_execute_all: match_msg_id(0), log_already_open(0)
2012 Mar 10 00:15:09.745318 evmc: fu_fsm_execute_all: null fsm_event_list
2012 Mar 10 00:15:09.745327 evmc: fu_fsm_engine_post_event_processing
2012 Mar 10 00:15:09.745337 evmc: end of while in fu_fsm_engine
2012 Mar 10 00:15:09.745347 evmc: begin fu_fsm_engine: line[2314]
2012 Mar 10 00:15:09.872099 evmc: fu_priority_select: - setting fd[7] for select call - setting fd[8] for select call
2012 Mar 10 00:15:09.872124 evmc: fu_priority_select_select_queue: round credit(78)
2012 Mar 10 00:15:09.872134 evmc: curr_q - FU_PSEL_Q_CAT_CQ, usr_q_info(1), priority(7), credit(5), empty
2012 Mar 10 00:15:09.872147 evmc: fu_priority_select: returning FU_PSEL_Q_CAT_MTS queue, fd(8), usr_q_info(4)
2012 Mar 10 00:15:09.872192 evmc: evmc_get_data_from_queue(775): dequeued mts msg (16450078), MTS_OPC_MVSH_EXEC_CMDS_DONE
2012 Mar 10 00:15:09.872214 evmc: fu_sdb_publisher_invoke_app_callback:App is not a publisher;Bail-out.
2012 Mar 10 00:15:09.872230 evmc: fsrv_sdb_process_msg: vdc-id[2] mts_opc[3092][MTS_OPC_MVSH_EXEC_CMDS_DONE] 0x80d28b0 0xb5d70674 300
2012 Mar 10 00:15:09.872243 evmc: fu_fsm_engine: fsrv_sdb_process_msg ret 0x0
2012 Mar 10 00:15:09.872253 evmc: fu_fsm_engine: fsrv_sdb_process_msg continue ret 0x0
2012 Mar 10 00:15:09.872268 evmc: fu_sync_pss_to_standby_apply:Set of checks failed
2012 Mar 10 00:15:09.872281 evmc: fu_sdb_handle_update: validation fail
2012 Mar 10 00:15:09.872297 evmc: fu_sdb_handle_update: validation fail, fu_is_state_active = 1, fu_is_sync_pss_to_standby_enabled = 0, mts_sync_event_get(mts_msg) = 0, create_del) = 0
2012 Mar 10 00:15:09.872313 evmc: evmc_handle_eh_resp: evmc_handle_eh_resp: rid = 0x176b06
2012 Mar 10 00:15:09.872518 evmc: evmc_eh_done: evmc_eh_done
What is "No validation for vsh commands "?
03-09-2012 12:16 PM
I was able to fix this the IOS Syntax is different than NXOS syntax
I have
event manager applet VIDEO_STOP
event track 401 state down
action 1.0 cli config t
action 2.0 cli int e8/23
action 3.0 cli service-policy output VIDEO_STOP
action 4.0 cli int e8/24
action 5.0 cli service-policy output VIDEO_STOP
action 6.0 cli end
and it now works
03-09-2012 12:40 PM
Heh. I'm so used to the IOS syntax, I missed the errant "command" keyword. Thanks for the follow-up. Glad it's working for you.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: