Junos
Junos

EX9204 event-options policy not Applicable

‎07-17-2019 09:06 AM
HI All,

I am looking forward to apply below config on EX9204.

- Configuration -
set event-options policy shut-on-system-reboot events ui_reboot_event
set event-options policy shut-on-system-reboot then change-configuration commands "set apply-groups link_all_down"
set event-options policy shut-on-system-reboot then change-configuration commit-options log "interfaces DOWN due to system OFF"
set groups link_all_down interfaces <ge-*> disable
set groups link_all_down interfaces <xe-*> disable

- Log -
s2lab> show log messages |match ui_reboot_event
Jul 17 21:25:34.312 2019 mgd[3354]: UI_REBOOT_EVENT: System rebooted by 's2lab'

s2lab> show log messages| find "Jul 17 21:25:3"
Jul 17 21:25:34.312 2019 mgd[3354]: UI_REBOOT_EVENT: System rebooted by 's2lab'
Jul 17 21:25:34.349 2019 shutdown: reboot requested by s2lab at Wed Jul 17 21:25:34 2019
Jul 17 21:25:34.353 2019 shutdown: reboot by s2lab:
Jul 17 21:25:34.541 2019 rpdc: performing a "rpdc -D chassisd toggletrace" command for user root
Jul 17 21:25:34.556 2019 file[3478]: UI_COMMIT: User 'root' requested 'commit' operation (comment: interfaces DOWN due to system OFF)
Jul 17 21:25:34.597 2019 file[3478]: UI_CHILD_EXITED: Child exited: PID 3484, status 7, command '/usr/sbin/mustd'

After rebooting, there is no set apply-groups link_all_down. All interfaces are online.

Request : How to apply above and working correctly?

Thanks in Advance,
8 REPLIES 8
Junos

Re: EX9204 event-options policy not Applicable

‎07-17-2019 09:50 AM

Hello,

 


@charlies wrote:
HI All,


Jul 17 21:25:34.312 2019 mgd[3354]: UI_REBOOT_EVENT: System rebooted by 's2lab'
Jul 17 21:25:34.349 2019 shutdown: reboot requested by s2lab at Wed Jul 17 21:25:34 2019
Jul 17 21:25:34.353 2019 shutdown: reboot by s2lab:
Jul 17 21:25:34.541 2019 rpdc: performing a "rpdc -D chassisd toggletrace" command for user root
Jul 17 21:25:34.556 2019 file[3478]: UI_COMMIT: User 'root' requested 'commit' operation (comment: interfaces DOWN due to system OFF)



 

Let me see if I understand this correctly:

1/ You have manually requested system reboot

2/ The system duly proceeded to shut down all daemons and stop services 

3/ at this point You expect the commit to go through despite system going down

Not going to happen, in my opinion. Commit requires cooperation between JUNOS and FreeBSD (rotate config files, propagate changed files between master RE and backup RE, etc - and at this point the FreeBSD services are down or going down).

You need to find another way to achieve what You want and in any case, the commit need to happen BEFORE reboot command is issued.

HTH

Thx
Alex

 

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Junos

Re: EX9204 event-options policy not Applicable

‎07-17-2019 10:15 AM

Hi Alex,

 

I don't fully agree. Since event "ui_reboot_event" is available in event-option configuration, we should be able to do something at ui_reboot_event. I agree with you that since router already rebooted, the event-option mostly won't survive a router reboot to achieve what customer wants to achieve. We should have some restrictions on the config, if "obviously" system can't do it. 

 

Hi Charlies: 

In my opinion, if router/switch reboot as admin requested (not because of any hardware/software trigger), it's also straightforward to manually apply the group and then reboot the system.

 

 


Mengzhe Hu
JNCIE x 3 (SP DC ENT)
Junos

Re: EX9204 event-options policy not Applicable

‎07-17-2019 03:31 PM

Hello!

 

Thanks for your answer.

 

So, I think after rebooting interface down apply is okay.

I applied this and working well.

 

set event-options policy shut-on-system-on events chassisd_ifdev_create_notice
set event-options policy shut-on-system-on then change-configuration commands "set interfaces apply-groups link_all_down"
set event-options policy shut-on-system-on then change-configuration commit-options log "interfaces DOWN"

set groups link_all_down interfaces <ge-*> disable

 

But, there are many commit by junoscript.

 

Q1: I want to apply only this condition. 

CHASSISD_IFDEV_CREATE_NOTICE: fpc_create_devs_from_queue: created interface device for pfe-1/0/0

1. CHASSISD_IFDEV_CREATE_NOTICE

2. fpc_create_devs_from_queue

3. created interface device for pfe-

 

How can i make event-options?

 

Thanks in Advance!

Junos

Re: EX9204 event-options policy not Applicable

‎07-17-2019 09:25 PM

Hello,

 


@charlies wrote:

 

set event-options policy shut-on-system-on events chassisd_ifdev_create_notice

 

<skip>

 

But, there are many commit by junoscript.

 

Q1: I want to apply only this condition. 

CHASSISD_IFDEV_CREATE_NOTICE: fpc_create_devs_from_queue: created interface device for pfe-1/0/0

1. CHASSISD_IFDEV_CREATE_NOTICE

2. fpc_create_devs_from_queue

3. created interface device for pfe-

 

Your new event-policy matches on EVERY ifdev_create event, and there could be hundreds of them. Hence You are seeing multiple commits, one per each ifdev_create event.

You need to narrow the match with "attributes-match" knob as below so Your policy executes once when pfe-1/0/0 is created:

 

set event-options policy shut-on-system-on attributes-match "{$$.interface-name}" matches pfe-1/0/0

 

HTH

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Junos

Re: EX9204 event-options policy not Applicable

‎07-19-2019 09:07 AM

Hello!

 

Thanks for your answer.

 

set event-options policy no-shut-on-system-on events chassisd_ifdev_create_notice
set event-options policy no-shut-on-system-on then change-configuration commands "delete apply-groups link_all_down"
set event-options policy no-shut-on-system-on then change-configuration commit-options log "interfaces UP"

set groups link_all_down interfaces <ge-*> disable

 

Q1: I want to apply only this condition. 

CHASSISD_IFDEV_CREATE_NOTICE: create_pics: created interface device for ge-0/0/0

1. CHASSISD_IFDEV_CREATE_NOTICE

2. create_pics

3. created interface device for ge-0/0/0

 

How can i make event-options?

 

Thanks in Advance!

Highlighted
Junos

Re: EX9204 event-options policy not Applicable

‎07-19-2019 09:45 AM

Hello,

 

Same as the other policy, with small edits:

 

set event-options policy no-shut-on-system-on events chassisd_ifdev_create_notice
set event-options policy no-shut-on-system-on attributes-match "{$$.interface-name}" matches ge-0/0/0
set event-options policy no-shut-on-system-on then change-configuration commands "delete apply-groups link_all_down"
set event-options policy no-shut-on-system-on then change-configuration commit-options log "interfaces UP"

set groups link_all_down interfaces <ge-*> disable

 

 

HTH

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Junos

Re: EX9204 event-options policy not Applicable

‎07-22-2019 10:08 AM

Hello!

 

Thanks for your answer.

 

Condition - EX9204 . OS ver: 15.1R4.6 . RE0 & RE1 in use . GRES, NSR, NSB, COMMIT SYNC APPLIED. 

 

set event-options policy shut-on-system-reboot events chassisd_ifdev_detach_all_pseudo
set event-options policy shut-on-system-reboot then change-configuration commands "set interfaces apply-groups link_all_down"
set event-options policy shut-on-system-reboot then change-configuration commit-options log "interfaces DOWN due to system OFF"
set event-options policy no-shut-on-system-on events chassisd_ifdev_create_notice
set event-options policy no-shut-on-system-on attributes-match "{$$.interface-name}" matches xe-5/0/0
set event-options policy no-shut-on-system-on then change-configuration commands "delete interfaces apply-groups link_all_down"
set event-options policy no-shut-on-system-on then change-configuration commit-options log "interfaces UP due to system ON"

set groups link_all_down interfaces <ge-*> disable

 

Q1: I want to apply this for this chassis.. But couldn't ..

I was looking forward to RE0 & RE1 messages log, I knew that they were diffent.

How can i apply above event-options for the chassis?

 

Actuallty, I want to apply below..

0. PING LOSS occurs because the detection of NIC card of Windows server connected to the EX9204 is delayed

1. When I entered 'request system reboot both-routing-engines' , 

2. The interface connected with the Windows server. Disable

3. After the booting is complete, the interface of the device is UP and delete disable.

4. Minimize Windows Server ping loss

 

Thanks in Advance! 

Junos

Re: EX9204 event-options policy not Applicable

[ Edited ]
‎07-22-2019 10:16 PM

Hello,

 


@charlies wrote:

 

Condition - EX9204 . OS ver: 15.1R4.6 . RE0 & RE1 in use . GRES, NSR, NSB, COMMIT SYNC APPLIED. 

 

<skip>

 

Q1: I want to apply this for this chassis.. But couldn't ..

 


 

And what exactly went wrong, please?

 


@charlies wrote:

 

I was looking forward to RE0 & RE1 messages log, I knew that they were diffent.

 


 

AFAIK, it is expected. Chassisd events are raised only on master RE.

 


@charlies wrote:

 

How can i apply above event-options for the chassis?

 

 


 

Not sure what this means. Once You commit Your event-policy on master RE, since You have "commit sync" enabled, it wil be copied to backup RE. And when backup RE becomes master, it will execute policy once trigger event fires. If this is not what You are looking for, please add as much detail as You can.

 


@charlies wrote:

 

 

Actuallty, I want to apply below..

0. PING LOSS occurs because the detection of NIC card of Windows server connected to the EX9204 is delayed

1. When I entered 'request system reboot both-routing-engines' , 

2. The interface connected with the Windows server. Disable

3. After the booting is complete, the interface of the device is UP and delete disable.

4. Minimize Windows Server ping loss

 


 

My answers:

0. If You are looking to disable interfaces once ping is lost, You picked the wrong event.

1 & 2. Since You entered "request system reboot" manually, You also could enter "set interfaces apply-groups blah-blah" manually as well, BEFORE "request system reboot" - no event policy is required. In any case, commit AFTER reboot request is a no-go.

3. The event-policy "no-shut-on-system-on" looks good to me for this requirement.

4. No idea what is meant here - please add more information/details.

 

HTH

Thx
Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !