Skip to content

Exec script "working" but generating some errors #4

@Tristou27

Description

@Tristou27

Hi folks,

I've just discovered this new feature addedin XR 7.3 and while trying to implement an EXEC script on a XR 7.4.1 box I get the following errors:

RP/0/RSP0/CPU0:Jun 16 08:49:09.396 CEST: xr_cli_acc[66908]: %MGBL-exec-3-XR_CLI_ACC : ERROR(xr_cli_acc) (5468): aaa_account start failed: 'LOCALD' detected the 'fatal' condition 'An invalid method was specified in the message or required configuration is missing'  
RP/0/RSP0/CPU0:Jun 16 08:49:09.857 CEST: xr_cli_acc[66908]: %MGBL-exec-3-XR_CLI_ACC : ERROR(xr_cli_acc) (5468): aaa_account stop failed: 'LOCALD' detected the 'fatal' condition 'An invalid method was specified in the message or required configuration is missing'  
RP/0/RSP0/CPU0:Jun 16 08:49:10.631 CEST: xr_cli_acc[66926]: %MGBL-exec-3-XR_CLI_ACC : ERROR(xr_cli_acc) (5486): aaa_account start failed: 'LOCALD' detected the 'fatal' condition 'An invalid method was specified in the message or required configuration is missing'  
RP/0/RSP0/CPU0:Jun 16 08:49:11.090 CEST: xr_cli_acc[66926]: %MGBL-exec-3-XR_CLI_ACC : ERROR(xr_cli_acc) (5486): aaa_account stop failed: 'LOCALD' detected the 'fatal' condition 'An invalid method was specified in the message or required configuration is missing'  

I'm running the script to collect the output of 2 clis, namely:

  • "show isis topology flex-algo 128 | i PtoP"
  • "show isis neighbors"

Those 2 commands are succeeding (result['status'] = 'success'), the script is terminating correctly but I have this in the logs. Do you know what can trigger that? I'm supposed to have the full permission on the router.

Thanks for your help!

Snippets of my code:

from iosxr.xrcli.xrcli_helper import *
# To generate syslogs #
from cisco.script_mgmt import xrlog
import re


syslog = xrlog.getSysLogger('exec_script_show_isis_neighbors_fa')
helper = XrcliHelper(debug = True)

def execute_clis(fa_id:str = "128") -> tuple:
    """
    Execute the CLIs 

    Args:
        fa_id (str, optional): Flex Algo ID. Defaults to "128".
    """
    
    cmd_topo = "show isis topology flex-algo {fa_id} | i PtoP".format(fa_id=fa_id)
    cmd_neighbors = "show isis neighbors"

    result_topo = helper.xrcli_exec(cmd_topo)
    result_neighbors = helper.xrcli_exec(cmd_neighbors)
    
    if result_topo['status'] == 'success' and result_neighbors['status'] == 'success':
        content_topo = result_topo['output'].splitlines()
        content_neighbors = result_neighbors['output'].splitlines()
        syslog.info('Script show_isis_neighbors_fa succeeded!')
        return content_topo, content_neighbors
    else:
        syslog.error('Script show_isis_neighbors_fa failed!')
        raise Exception('Script failed')

(...)
if __name__ == '__main__':
    content_topo, content_neighbors = execute_clis(fa_id="128")
    
    ### ANALYZE THE RESULT
    result = analyze_output(content_topo, content_neighbors)
    
    print(result, end='')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions