genieparser icon indicating copy to clipboard operation
genieparser copied to clipboard

[IOS-XR] Parser Output is empty - Failed to parse command output for "show install commit summary"

Open amhunt-at-cisco opened this issue 1 year ago • 9 comments

Hey, thanks for looking into this - this is the same issue as my previous ticket but with a different command. I see both in the supported command list so hopefully i'm just doing a derp.

Issue: When trying to feed in the full output of "show install commit summary" from an IOS XR device into parse genie I get "Parser Output is empty - Failed to parse command output".

The output is being passed in and displays fine on console, the genie just can't parse it.

To Reproduce I used the following in my playbook:

#----------------------------------Show Install Commit Summary------------------------------------------  
- name: Read in parse_genie role
  include_role:
    name: clay584.parse_genie

# Capturing information from Router - XR_VM

- name: Executing 'show install commit summary'
  cli_command:
    command: show install commit summary
  register: cli_output

- name: Getting status
  debug:
    msg: "{{ cli_output }}"
  #no_log: True

- name: Parsing "show install commit summary" output
  set_fact:
    xr_vm_commit_summary_parsed_output: "{{ cli_output.stdout | parse_genie(command='show install commit summary', os='iosxr') }}"
  #no_log: True

This is part of a large ongoing project so I attached the entire playbook zipped which can be run with the following command: ansible-playbook -i hostinvent EA2-Main-Playbook.yml --vault-password-file vault_password.yml

To navigate to the playbook that reproduces the issue go to roles > Software_Info_Capture > tasks > show_install_commit_summary.yml

I also attached just the output of that command as a text file.

The devices in the hostinvent file are the lab devices in autopod : https://cx-labs.cisco.com/pods/1188/short If you check them out and can SSH to at least one of them, nothing else is needed to reproduce.

Feel free to ping me at amhunt for any questions.

Mult-Stage XR OS Upgrade & Rollback.zip (show_install_commit_summary.txt)

amhunt-at-cisco avatar Feb 23 '24 20:02 amhunt-at-cisco

Hello @amhunt-at-cisco , I will be looking in to your issue. Kindly give me some time

ParimiNeeraja avatar Mar 04 '24 12:03 ParimiNeeraja

Hello @amhunt-at-cisco ,

Is this parser specify any platform/model, kindly share us the details.

ParimiNeeraja avatar Mar 05 '24 09:03 ParimiNeeraja

It's for the Cisco 8202 (and 8000 Series) XR router.

amhunt-at-cisco avatar Mar 05 '24 14:03 amhunt-at-cisco

Hello @amhunt-at-cisco ,

This is how your output will look like, can you please confirm will make changes accordingly.

{
    "Committed Packages": {
        "XR": "201",
        "All": "1532"
    },
    "Label": "7.10.2-meta_7102_fcs_01_25_2024",
    "Software Hash": "454175afbe3ad586c3b39a79db238b53844fe794723ea99fa00ac1acd5442359",
    "Optional Packages": {
        "xr-8000-netflow": "7.10.2v1.0.0-1",
        "xr-bgp": "7.10.2v1.0.0-1",
        "xr-is-is": "7.10.2v1.0.0-1",
        "xr-k9sec": "7.10.2v1.0.0-1",
        "xr-license-util": "7.10.2v1.0.0-1",
        "xr-lldp": "7.10.2v1.0.0-1",
        "xr-mpls-oam": "7.10.2v1.0.0-1",
        "xr-netflow": "7.10.2v1.0.0-1",
        "xr-ops-script-repo": "7.10.2v1.0.0-1",
        "xr-telnet": "7.10.2v1.0.0-1",
        "xr-8000-core": "7.10.2v1.0.1-1",
        "xr-8000-cpa-npu": "7.10.2v1.0.2-1",
        "xr-8000-leabaofa": "7.10.2v1.0.2-1",
        "xr-fib": "7.10.2v1.0.2-1",
        "xr-networkboot": "7.10.2v1.0.1-1",
        "xr-telemetry": "7.10.2v1.0.1-1"
    },
    "Mandatory Packages": {
        "xr-8000-netflow": "7.10.2v1.0.0-1",
        "xr-bgp": "7.10.2v1.0.0-1",
        "xr-is-is": "7.10.2v1.0.0-1",
        "xr-k9sec": "7.10.2v1.0.0-1",
        "xr-license-util": "7.10.2v1.0.0-1",
        "xr-lldp": "7.10.2v1.0.0-1",
        "xr-mpls-oam": "7.10.2v1.0.0-1",
        "xr-netflow": "7.10.2v1.0.0-1",
        "xr-ops-script-repo": "7.10.2v1.0.0-1",
        "xr-telnet": "7.10.2v1.0.0-1",
        "xr-8000-core": "7.10.2v1.0.1-1",
        "xr-8000-cpa-npu": "7.10.2v1.0.2-1",
        "xr-8000-leabaofa": "7.10.2v1.0.2-1",
        "xr-fib": "7.10.2v1.0.2-1",
        "xr-networkboot": "7.10.2v1.0.1-1",
        "xr-telemetry": "7.10.2v1.0.1-1"
    },
    "Committed Fixes": {
        "CSCwh02785": "xr-fib",
        "CSCwh80170": "xr-8000-cpa-npu",
        "CSCwi09896": "xr-8000-leabaofa",
        "CSCwi22574": "xr-telemetry",
        "CSCwi41545": "xr-fib",
        "CSCwi62344": "xr-8000-core, xr-8000-cpa-npu, xr-8000-leabaofa, xr-networkboot"
    }
}

ParimiNeeraja avatar Mar 07 '24 13:03 ParimiNeeraja

Looks great! Thank you !

amhunt-at-cisco avatar Mar 14 '24 15:03 amhunt-at-cisco

This fix is merged, changes will reflect you in next version. Thank you.

ParimiNeeraja avatar Mar 20 '24 06:03 ParimiNeeraja

hey Parim, how do i install your changes?

amhunt-at-cisco avatar Mar 28 '24 16:03 amhunt-at-cisco

Hello @amhunt-at-cisco

Kindly update your pyATS version to latest.

Neeraja1bala avatar Mar 29 '24 06:03 Neeraja1bala

Is the latest pyATS version 24.3?

I issued "pyats version update --pre" and it installed 24.3 and then i tried that section of the playbook again but I got the same error. I want to make sure your changes were committed to my code.

amhunt-at-cisco avatar Apr 01 '24 18:04 amhunt-at-cisco