Smarts NCM: Pull Config job on Juniper MX960 devices shows complete, but partial configuration is present in Device properties
search cancel

Smarts NCM: Pull Config job on Juniper MX960 devices shows complete, but partial configuration is present in Device properties

book

Article ID: 330864

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


When pull configuration is executed on Juniper routers, MX960 model; NCM Schedule Manager shows that job completed successfully. However Device Properties-> Configuration shows partial device configuration.

Environment

VMware Smart Assurance - NCM

Cause

Enabled session logging and debug on DS with steps from KB https://support.emc.com/kb/323701
From session.log, below is observed:
Jun 27 16:16:41 -1413486848/ssh#1: RCV-1003>                        authentication-key "$9$T3aaaaa/yyyy/xxxx
Jun 27 16:16:41 -1413486848/ssh#1: RCV-1003>leXxGDji.5OBR"; ##
Jun 27 16:16:41 -1413486848/ssh#1: ::getCurrentState - State match:[1003][# $][# ]


NCM considers End of Configuration during Pull Configuration operation, if there is state match found.
As per $VOYENCE_HOME/custompackage/pkgxml/JuniperRouter/JuniperRouterPrompts.xml, below is the prompt for State 1003:
<ConfigPromptState>
<ID>1003</ID>
<Expr><![CDATA[# $]]></Expr>
</ConfigPromptState>


The above prompt is for configuration mode. $ means end of string, so the patterns indicates:
If the line ends with # and a space after it, Ex:devicename# , then this is considered as Config Prompt.

As [# $] regex of state 1003 Config Prompt is matched with device configuration line highlighted above/NCM found entry [# ] in the configuration line (leXxGDji.5OBR"; ## ), this line is considered as End of Configuration instead of actual Configuration end.





Resolution

Below workaround can be implemented in NCM device to over come the issue, if the device is configured with "  ##  " 
1) Copy JuniperRouterPrompts.xml from $VOYENCE_HOME/package/pkgxml/JuniperRouter to $VOYENCE_HOME/custompackage/pkgxml/JuniperRouter
2) Open $VOYENCE_HOME/custompackage/pkgxml/JuniperRouter/JuniperRouterPrompts.xml, edit the below from:
<ConfigPromptState>
<ID>1003</ID>
<Expr><![CDATA[# $]]></Expr>
</ConfigPromptState>


To:
<ConfigPromptState>
<ID>1003</ID>
<Expr><![CDATA[^[^\s#]+# *$]]></Expr>
</ConfigPromptState>


Save and close the file.

3) Restart voyence service