Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amhunt-at-cisco opened this issue Feb 23, 2024 · 9 comments
Assignees

Comments

@amhunt-at-cisco
Copy link

amhunt-at-cisco commented Feb 23, 2024

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)

@ParimiNeeraja
Copy link

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

@ParimiNeeraja
Copy link

Hello @amhunt-at-cisco ,

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

@amhunt-at-cisco
Copy link
Author

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

@ParimiNeeraja
Copy link

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"
    }
}

@amhunt-at-cisco
Copy link
Author

Looks great! Thank you !

@ParimiNeeraja
Copy link

ParimiNeeraja commented Mar 20, 2024

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

@amhunt-at-cisco
Copy link
Author

hey Parim, how do i install your changes?

@Neeraja1bala
Copy link

Hello @amhunt-at-cisco

Kindly update your pyATS version to latest.

@amhunt-at-cisco
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants